diff --git a/dicos/30_cadolesuser.xml b/dicos/30_cadolesuser.xml index 54950501..e6985013 100644 --- a/dicos/30_cadolesuser.xml +++ b/dicos/30_cadolesuser.xml @@ -10,7 +10,7 @@ - + cadolesuser @@ -24,8 +24,11 @@ oui - oui - oui + SQL + SQL + + oui + oui @@ -125,6 +128,14 @@ cadolesuser_dbpass + + LDAP + SSO + + cadolesuser_syncldap + cadolesuser_synceportail + + non @@ -146,6 +157,14 @@ cadolesuser_niveau02icon + + ['LDAP', 'SQL', 'SSO'] + + + + ['CAS', 'SAML', 'SQL', 'LDAP'] + + ['none', 'byuser', 'byadmin'] diff --git a/src/cadolesuser-1.0/.gitignore b/src/cadolesuser-1.0/.gitignore index eff21c3e..fead21ad 100644 --- a/src/cadolesuser-1.0/.gitignore +++ b/src/cadolesuser-1.0/.gitignore @@ -16,10 +16,26 @@ /var/sessions/* !var/sessions/.gitkeep !var/SymfonyRequirements.php +/vendor/ /web/bundles/ +/web/js/* +/web/css/* +/web/fonts/* !/web/uploads/avatar /web/uploads/avatar/* !/web/uploads/avatar/.gitkeep !/web/uploads/avatar/noavatar.png !/web/uploads/avatar/admin.jpg !/web/uploads/avatar/system.jpg +!/web/uploads/logo +/web/uploads/logo/* +!/web/uploads/logo/.gitkeep +!/web/uploads/logo/logo.png +!/web/uploads/header +/web/uploads/header/* +!/web/uploads/header/.gitkeep +!/web/uploads/header/header.png +!/web/uploads/icon +/web/uploads/icon/* +!/web/uploads/icon/.gitkeep +!/web/uploads/icon/icon_*.png diff --git a/src/cadolesuser-1.0/app/AppKernel.php b/src/cadolesuser-1.0/app/AppKernel.php index 4ab922b0..18b8dc5d 100644 --- a/src/cadolesuser-1.0/app/AppKernel.php +++ b/src/cadolesuser-1.0/app/AppKernel.php @@ -25,8 +25,16 @@ class AppKernel extends Kernel new Oneup\UploaderBundle\OneupUploaderBundle(), new Tetranz\Select2EntityBundle\TetranzSelect2EntityBundle(), + new AppBundle\AppBundle(), - new Cadoles\CoreBundle\CadolesCoreBundle(), + + new LightSaml\SymfonyBridgeBundle\LightSamlSymfonyBridgeBundle(), + new LightSaml\SpBundle\LightSamlSpBundle(), + new Cadoles\SAMLBundle\CadolesSAMLBundle(), + + new Cadoles\CASBundle\CadolesCASBundle(), + + new Cadoles\CoreBundle\CadolesCoreBundle() ]; if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { diff --git a/src/cadolesuser-1.0/app/config/config.yml b/src/cadolesuser-1.0/app/config/config.yml index f62e760d..38e2267d 100644 --- a/src/cadolesuser-1.0/app/config/config.yml +++ b/src/cadolesuser-1.0/app/config/config.yml @@ -1,7 +1,6 @@ imports: - { resource: parameters.yml } - { resource: template.yml } - - { resource: local.yml } - { resource: security.yml } - { resource: services.yml } - { resource: "@CadolesCoreBundle/Resources/config/services.yml" } @@ -107,6 +106,22 @@ oneup_uploader: mappings: avatar: frontend: dropzone # or any uploader you use in the frontend - + logo: + frontend: dropzone # or any uploader you use in the frontend + header: + frontend: dropzone # or any uploader you use in the frontend # gregwar captcha configuration gregwar_captcha: ~ + +#light_saml +light_saml_symfony_bridge: + own: + entity_id: '%saml_entityid%' + credentials: + - + certificate: "%kernel.root_dir%/../vendor/lightsaml/lightsaml/web/sp/saml.crt" + key: "%kernel.root_dir%/../vendor/lightsaml/lightsaml/web/sp/saml.key" + password: ~ + party: + idp: + files: '%saml_idps_list%' \ No newline at end of file diff --git a/src/cadolesuser-1.0/app/config/local.yml b/src/cadolesuser-1.0/app/config/local.yml deleted file mode 100644 index a2d325b9..00000000 --- a/src/cadolesuser-1.0/app/config/local.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Parametres spécifiques local (ne sera pas écrasé par un reconfigure) -parameters: - alias: cadolesuser # Alias apache de l'application - appname: CADOLES USER # Nom de l'application - logo: uploads/logo/logo.png # Localisation du logo diff --git a/src/cadolesuser-1.0/app/config/routing.yml b/src/cadolesuser-1.0/app/config/routing.yml index faa5ec74..8c74772b 100644 --- a/src/cadolesuser-1.0/app/config/routing.yml +++ b/src/cadolesuser-1.0/app/config/routing.yml @@ -2,6 +2,14 @@ core: resource: "@CadolesCoreBundle/Resources/config/routing.yml" prefix: / +lightsaml_sp: + resource: "@LightSamlSpBundle/Resources/config/routing.yml" + prefix: saml + +cas_sp: + resource: "@CadolesCASBundle/Resources/config/routing.yml" + prefix: cas + oneup_uploader: resource: . type: uploader \ No newline at end of file diff --git a/src/cadolesuser-1.0/app/config/security.yml b/src/cadolesuser-1.0/app/config/security.yml index a7bfa9e3..15f3ce00 100644 --- a/src/cadolesuser-1.0/app/config/security.yml +++ b/src/cadolesuser-1.0/app/config/security.yml @@ -1,8 +1,4 @@ -# To get started with security, check out the documentation: -# http://symfony.com/doc/current/security.html security: - - # http://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded providers: cadoles_core_db_provider: entity: @@ -16,19 +12,13 @@ security: id: cadoles.core.password.encoder firewalls: - # disables authentication for assets and the profiler, adapt it according to your needs dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false main: provider: cadoles_core_db_provider - anonymous: ~ - # activate different ways to authenticate - - # http_basic: ~ - # http://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate form_login: login_path: cadoles_core_login @@ -37,16 +27,20 @@ security: target_path_parameter: cadoles_core_home csrf_parameter: _csrf_security_token csrf_token_id: a_private_string - + logout: invalidate_session: true - path: cadoles_core_logout - target: cadoles_core_kill - - # http://symfony.com/doc/current/cookbook/security/form_login_setup.html + path: cadoles_core_kill + target: cadoles_core_home + + light_saml_sp: + provider: cadoles_core_db_provider + user_creator: cadoles.saml_user_creator + username_mapper: cadoles.saml_user_mapper + login_path: /saml/login + check_path: /saml/acs access_control: - # Config route - { path: ^/profil, roles: [ROLE_ADMIN, ROLE_MODO, ROLE_USER] } - { path: ^/config/home, roles: [ROLE_ADMIN, ROLE_MODO] } - { path: ^/config/niveau02, roles: [ROLE_ADMIN, ROLE_MODO] } diff --git a/src/cadolesuser-1.0/app/config/template.yml b/src/cadolesuser-1.0/app/config/template.yml index c2b1febe..38d784b0 100644 --- a/src/cadolesuser-1.0/app/config/template.yml +++ b/src/cadolesuser-1.0/app/config/template.yml @@ -1,29 +1,66 @@ # This file is auto-generated during the composer install parameters: - mode_auth: CAS # SQL / LDAP / CAS + # Determine qui est le maitre de l'identitité = SQL / LDAP / SSO + # Si SQL cela veut dire que c'est l'applicatif qui gère les utilisateurs + # Sinon la source est externe soit via un annuaire soit via des attributs venant d'un SSO + # Si la source est externe de fait pas de module d'inscription ni de reset de password + # Et pas de synchronisation vers un annuaire ou vers ePortail + masteridentity: LDAP - ldap_sync: true + # Mode d'authentification soit SQL / LDAP / CAS / SAML + # Pour l'instant SQL - CAS - SAML Reste à faire LDAP + # Attention si le masteridentity est différent de SQL le mode d'authentification est forcement différent de SQL + # Car aucune synchronisation des password n'est possible + mode_auth: CAS + # Mode de registration : none / byuser / byadmin + # none = désactivation de l'inscription mais reset de password possible + # byuser = aucune validation par un administrateur, l'utilisateur valide son inscription par lui-même + # byadmin = validation de l'inscription par un administrateur, sauf si domaine de messagerie dans la liste blanche + moderegistration: none + + # Information de base de l'annuaire ldap_host: 127.0.0.1 ldap_port: 389 ldap_user: cn=admin,o=gouv,c=fr ldap_password: eole ldap_basedn: o=gouv,c=fr - ldap_baseuser: ou=users,ou=cadoles,o=gouv,c=fr - ldap_baseniveau01: ou=departement,ou=cadoles,o=gouv,c=fr - ldap_baseniveau02: ou=service,ou=cadoles,o=gouv,c=fr - ldap_basegroup: ou=groups,ou=cadoles,o=gouv,c=fr + # Mise en page + alias: cadolesuser + libelle_etab: ldapbundle + numero_etab: 0000000A colormain: 428BCA # Couleur principale fontcolorhover: FFFFFF # Couleur des polices sur fond de couleur principale keyterm: 8 # Taille mini du password - moderegistration: byadmin # Mode de registration : none / byuser / byadmin - labelniveau01: Département # Label singulier du niveau 01 d'organisation - labelsniveau01: Départements # Label pluriel du niveau 01 d'organisation + labelniveau01: Ecole # Label singulier du niveau 01 d'organisation + labelsniveau01: Ecoles # Label pluriel du niveau 01 d'organisation iconniveau01: fa-building # Icon du niveau 01 d'organisation - labelniveau02: Service # Label singulier du niveau 02 d'organisation - labelsniveau02: Services # Label pluriel du niveau 02 d'organisation - iconniveau02: fa-sitemap # Icon du niveau 02 d'organisation + labelsirenniveau01: SIREN # Label SIREN + viewniveau02: false # Gérer un niveau 02 d'organisation + labelniveau02: niveau02 # Label singulier du niveau 02 d'organisation + labelsniveau02: niveaus02 # Label pluriel du niveau 02 d'organisation + iconniveau02: fa-sitemap # Icon du niveau 02 d'organisation + labelsiretniveau02: SIRET # Label SIRET + + # Si masteridentity est à SQL = où sont synchronisées les datas dans l'annuaire + ldap_sync: false + ldap_baseuser: + ldap_baseniveau01: + ldap_baseniveau02: + ldap_basegroup: + + # Si masteridentity est à LDAP = quel est le modele d'organisation + # Si open = rien de particulier + # Si scribe = on génére des groupes correspondant au profil / classe / niveau / option + ldap_template: scribe + + # Si masteridentity est à LDAP = quel champs sont à récupérer + ldap_username: uid + ldap_firstname: givenname + ldap_lastname: sn + ldap_email: mail + ldap_usersadmin: [admin,prof.6a] eportail_sync: false eportail_url: # /eportail @@ -34,31 +71,51 @@ parameters: eportail_database_user: # eportail eportail_database_password: # "changme" + # Si mode_auth = CAS + cas_host: ldapbundle.ac-arno.fr + cas_path: ~ + cas_port: 8443 + + # Si mode_aut = SAML + saml_entityid: 'http://dev.nuonet.cadoles' + saml_logout_url: 'http://172.27.7.67:8088/idp/profile/Logout' + saml_idps_list: ['http://172.27.7.67:8088/idp/shibboleth'] + + # Si mode_auth = CAS ou SAML les attributs permettant de matché avec les utilisateurs + user_attr_cas_username: username + user_attr_cas_mail: email + user_attr_cas_lastname: lastname + user_attr_cas_firstname: firstname + + user_attr_saml_username: eduPersonPrincipalName + user_attr_saml_mail: mail + user_attr_saml_lastname: sn + user_attr_saml_firstname: givenName + mailer_port: '2525' mailer_encryption: null mailer_authmode: null noreply: noreply@ldapbundle.ac-arno.fr -# Doctrine Configuration for eportail -#doctrine: -# dbal: -# connections: -# eportail: -# driver: pdo_mysql -# host: '%eportail_database_host%' -# port: '%eportail_database_port%' -# dbname: '%eportail_database_name%' -# user: '%eportail_database_user%' -# password: '%eportail_database_password%' -# charset: UTF8 -# orm: -# default_entity_manager: default -# entity_managers: -# default: -# connection: default -# mappings: -# CadolesCoreBundle: ~ -# eportail: -# connection: eportail -# mappings: -# CadolesCoreBundle: ~ \ No newline at end of file +# Doctrine Configuration +doctrine: + dbal: + default_connection: default + connections: + default: + driver: pdo_mysql + host: '%database_host%' + port: '%database_port%' + dbname: '%database_name%' + user: '%database_user%' + password: '%database_password%' + charset: UTF8 + orm: + default_entity_manager: default + entity_managers: + default: + connection: default + mappings: + CadolesCoreBundle: ~ + + \ No newline at end of file diff --git a/src/cadolesuser-1.0/app/config/twig.yml b/src/cadolesuser-1.0/app/config/twig.yml index 5ade3c91..c0ec1a4f 100644 --- a/src/cadolesuser-1.0/app/config/twig.yml +++ b/src/cadolesuser-1.0/app/config/twig.yml @@ -2,9 +2,10 @@ twig: globals: alias: %alias% - appname: %appname% - logo: %logo% + masteridentity: %masteridentity% + mode_auth: %mode_auth% + eportail_sync: %eportail_sync% moderegistration: %moderegistration% labelniveau01: %labelniveau01% diff --git a/src/cadolesuser-1.0/composer.json b/src/cadolesuser-1.0/composer.json index 38a47d43..d079f038 100644 --- a/src/cadolesuser-1.0/composer.json +++ b/src/cadolesuser-1.0/composer.json @@ -5,14 +5,9 @@ "description": "The \"Symfony Standard Edition\" distribution", "autoload": { "psr-4": { - "AppBundle\\": "src/AppBundle", - "Cadoles\\CoreBundle\\": "src/Cadoles/CoreBundle" + "": "src/" }, - "classmap": [ "app/AppKernel.php", "app/AppCache.php" ], - "files" : [ - "/usr/share/php/CAS/eoleCAS.php", - "/usr/share/php/configCAS/cas.inc.php" - ] + "classmap": [ "app/AppKernel.php", "app/AppCache.php" ] }, "autoload-dev": { "psr-4": { "Tests\\": "tests/" }, @@ -39,7 +34,10 @@ "symfony/swiftmailer-bundle": "^2.6.4", "symfony/symfony": "3.4.*", "tetranz/select2entity-bundle": "2.*", - "twig/twig": "^1.0||^2.0" + "twig/twig": "^1.0||^2.0", + + "lightsaml/sp-bundle": "^1.2", + "jasig/phpcas": "~1.3" }, "require-dev": { "sensio/generator-bundle": "^3.0", diff --git a/src/cadolesuser-1.0/composer.lock b/src/cadolesuser-1.0/composer.lock index 24926bc3..c75c1ce5 100644 --- a/src/cadolesuser-1.0/composer.lock +++ b/src/cadolesuser-1.0/composer.lock @@ -4,21 +4,21 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "4bf005722be0be2b0b9a7646e1089952", - "content-hash": "515644ac69e746b61bcd9f326e75c78f", + "hash": "c141093eaee870ccf4cbfbc4b7286f1b", + "content-hash": "212be3bef6194e471c90d1ffdd6f93ea", "packages": [ { "name": "composer/ca-bundle", - "version": "1.1.3", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "8afa52cd417f4ec417b4bfe86b68106538a87660" + "reference": "558f321c52faeb4828c03e7dc0cfe39a09e09a2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/8afa52cd417f4ec417b4bfe86b68106538a87660", - "reference": "8afa52cd417f4ec417b4bfe86b68106538a87660", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/558f321c52faeb4828c03e7dc0cfe39a09e09a2d", + "reference": "558f321c52faeb4828c03e7dc0cfe39a09e09a2d", "shasum": "" }, "require": { @@ -61,7 +61,7 @@ "ssl", "tls" ], - "time": "2018-10-18 06:09:13" + "time": "2019-01-28 09:30:10" }, { "name": "doctrine/annotations", @@ -473,16 +473,16 @@ }, { "name": "doctrine/doctrine-bundle", - "version": "1.9.1", + "version": "1.10.2", "source": { "type": "git", "url": "https://github.com/doctrine/DoctrineBundle.git", - "reference": "703fad32e4c8cbe609caf45a71a1d4266c830f0f" + "reference": "1f99e6645030542079c57d4680601a4a8778a1bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/703fad32e4c8cbe609caf45a71a1d4266c830f0f", - "reference": "703fad32e4c8cbe609caf45a71a1d4266c830f0f", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/1f99e6645030542079c57d4680601a4a8778a1bd", + "reference": "1f99e6645030542079c57d4680601a4a8778a1bd", "shasum": "" }, "require": { @@ -500,8 +500,8 @@ }, "require-dev": { "doctrine/orm": "~2.4", + "php-coveralls/php-coveralls": "^2.1", "phpunit/phpunit": "^4.8.36|^5.7|^6.4", - "satooshi/php-coveralls": "^1.0", "symfony/phpunit-bridge": "~2.7|~3.0|~4.0", "symfony/property-info": "~2.8|~3.0|~4.0", "symfony/validator": "~2.7|~3.0|~4.0", @@ -516,7 +516,7 @@ "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "1.9.x-dev" } }, "autoload": { @@ -554,7 +554,7 @@ "orm", "persistence" ], - "time": "2018-04-19 14:07:39" + "time": "2019-02-06 13:18:04" }, { "name": "doctrine/doctrine-cache-bundle", @@ -706,16 +706,16 @@ }, { "name": "doctrine/doctrine-migrations-bundle", - "version": "v1.3.1", + "version": "v1.3.2", "source": { "type": "git", "url": "https://github.com/doctrine/DoctrineMigrationsBundle.git", - "reference": "a9e506369f931351a2a6dd2aef588a822802b1b7" + "reference": "49fa399181db4bf4f9f725126bd1cb65c4398dce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineMigrationsBundle/zipball/a9e506369f931351a2a6dd2aef588a822802b1b7", - "reference": "a9e506369f931351a2a6dd2aef588a822802b1b7", + "url": "https://api.github.com/repos/doctrine/DoctrineMigrationsBundle/zipball/49fa399181db4bf4f9f725126bd1cb65c4398dce", + "reference": "49fa399181db4bf4f9f725126bd1cb65c4398dce", "shasum": "" }, "require": { @@ -725,7 +725,7 @@ "symfony/framework-bundle": "~2.7|~3.3|~4.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.36" + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^7.4" }, "type": "symfony-bundle", "extra": { @@ -763,7 +763,7 @@ "migrations", "schema" ], - "time": "2017-11-01 09:13:26" + "time": "2018-12-03 11:55:33" }, { "name": "doctrine/inflector", @@ -1019,12 +1019,12 @@ "version": "v2.5.14", "source": { "type": "git", - "url": "https://github.com/doctrine/doctrine2.git", + "url": "https://github.com/doctrine/orm.git", "reference": "810a7baf81462a5ddf10e8baa8cb94b6eec02754" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/810a7baf81462a5ddf10e8baa8cb94b6eec02754", + "url": "https://api.github.com/repos/doctrine/orm/zipball/810a7baf81462a5ddf10e8baa8cb94b6eec02754", "reference": "810a7baf81462a5ddf10e8baa8cb94b6eec02754", "shasum": "" }, @@ -1302,6 +1302,61 @@ ], "time": "2018-02-13 18:05:56" }, + { + "name": "jasig/phpcas", + "version": "1.3.6", + "source": { + "type": "git", + "url": "https://github.com/apereo/phpCAS.git", + "reference": "7972833e84f6ee5fa41f1479eab5d855109627f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/apereo/phpCAS/zipball/7972833e84f6ee5fa41f1479eab5d855109627f5", + "reference": "7972833e84f6ee5fa41f1479eab5d855109627f5", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.10" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "source/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Joachim Fritschi", + "homepage": "https://wiki.jasig.org/display/~fritschi" + }, + { + "name": "Adam Franco", + "homepage": "https://wiki.jasig.org/display/~adamfranco" + } + ], + "description": "Provides a simple API for authenticating users against a CAS server", + "homepage": "https://wiki.jasig.org/display/CASC/phpCAS", + "keywords": [ + "apereo", + "cas", + "jasig" + ], + "time": "2018-10-25 20:22:09" + }, { "name": "jdorn/sql-formatter", "version": "v1.2.17", @@ -1429,6 +1484,172 @@ ], "time": "2016-11-11 18:43:20" }, + { + "name": "lightsaml/lightsaml", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/lightSAML/lightSAML.git", + "reference": "377f04d1fb25f2fb2e72dabeff10b336f1cbe4c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lightSAML/lightSAML/zipball/377f04d1fb25f2fb2e72dabeff10b336f1cbe4c5", + "reference": "377f04d1fb25f2fb2e72dabeff10b336f1cbe4c5", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "robrichards/xmlseclibs": "~2.0|~3.0|~4.0", + "symfony/event-dispatcher": "~2.3|~3.0|~4.0", + "symfony/http-foundation": "~2.3|~3.0|~4.0" + }, + "require-dev": { + "monolog/monolog": "~1.3", + "phpunit/phpunit": ">=5.7", + "pimple/pimple": "~3.0", + "symfony/css-selector": "~2.3|~3.0|~4.0", + "symfony/dom-crawler": "~2.3|~3.0|~4.0" + }, + "suggest": { + "lightsaml/sp-bundle": "Symfony 2 SP security bundle", + "lightsaml/symfony-bridge": "Symfony 2 build container bridge" + }, + "type": "library", + "autoload": { + "psr-0": { + "LightSaml\\Tests\\": "tests/", + "LightSaml\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Milos Tomic", + "email": "tmilos@gmail.com", + "homepage": "https://github.com/tmilos/", + "role": "Developer" + } + ], + "description": "Light SAML 2.0 PHP library", + "homepage": "https://www.lightsaml.com/", + "keywords": [ + "SAML 2.0", + "Single Logout", + "Single SignOn", + "library", + "lightSAML", + "php" + ], + "time": "2018-05-28 11:21:22" + }, + { + "name": "lightsaml/sp-bundle", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/lightSAML/SpBundle.git", + "reference": "b31182d23d93b696305f57f9a66d6770a53d5f8e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lightSAML/SpBundle/zipball/b31182d23d93b696305f57f9a66d6770a53d5f8e", + "reference": "b31182d23d93b696305f57f9a66d6770a53d5f8e", + "shasum": "" + }, + "require": { + "lightsaml/symfony-bridge": "~1.3", + "php": ">=5.6", + "symfony/framework-bundle": "~2.7|~3.0|~4.0", + "symfony/security-bundle": "~2.7|~3.0|~4.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7", + "sebastian/comparator": "^1.2.4|~2.0|~3.0", + "symfony/monolog-bundle": "~2.7|~3.0|~4.0", + "symfony/symfony": "~2.7|~3.0|~4.0" + }, + "type": "symfony-bundle", + "autoload": { + "psr-0": { + "LightSaml\\SpBundle\\Tests\\": "tests/", + "LightSaml\\SpBundle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Milos Tomic", + "email": "tmilos@gmail.com", + "homepage": "http://github.com/tmilos", + "role": "Developer" + } + ], + "description": "Light SAML2 SP Symfony Bundle", + "homepage": "http://www.lightsaml.com/SP-Bundle/", + "time": "2018-05-23 09:11:16" + }, + { + "name": "lightsaml/symfony-bridge", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/lightSAML/SymfonyBridgeBundle.git", + "reference": "8d3120825032a7468e894d0ae68630f21cd6035b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lightSAML/SymfonyBridgeBundle/zipball/8d3120825032a7468e894d0ae68630f21cd6035b", + "reference": "8d3120825032a7468e894d0ae68630f21cd6035b", + "shasum": "" + }, + "require": { + "lightsaml/lightsaml": "~1.1", + "php": ">=5.5.1", + "symfony/dependency-injection": "~2.7|~3.0|~4.0", + "symfony/framework-bundle": "~2.7|~3.0|~4.0", + "symfony/yaml": "~2.7|~3.0|~4.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "~2.0", + "phpunit/phpunit": "^5.7", + "symfony/browser-kit": "~2.7|~3.0|~4.0", + "symfony/filesystem": "~2.7|~3.0|~4.0", + "symfony/finder": "~2.7|~3.0|~4.0", + "symfony/routing": "~2.7|~3.0|~4.0" + }, + "suggest": { + "lightsaml/lightsamp-idp": "If you will be using IDP LightSAML services" + }, + "type": "symfony-bundle", + "autoload": { + "psr-0": { + "LightSaml\\SymfonyBridgeBundle\\Tests\\": "tests/", + "LightSaml\\SymfonyBridgeBundle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Milos Tomic", + "email": "tmilos@gmail.com", + "homepage": "http://github.com/tmilos", + "role": "Developer" + } + ], + "description": "Light SAML Symfony bridge bundle", + "homepage": "http://www.lightsaml.com", + "time": "2018-05-23 08:11:59" + }, { "name": "monolog/monolog", "version": "1.24.0", @@ -1698,16 +1919,16 @@ }, { "name": "paragonie/random_compat", - "version": "v2.0.17", + "version": "v2.0.18", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d" + "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/29af24f25bab834fcbb38ad2a69fa93b867e070d", - "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", + "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", "shasum": "" }, "require": { @@ -1743,7 +1964,7 @@ "pseudorandom", "random" ], - "time": "2018-07-04 16:31:37" + "time": "2019-01-03 20:59:08" }, { "name": "psr/cache", @@ -2067,17 +2288,55 @@ "time": "2018-07-19 23:38:55" }, { - "name": "sensio/distribution-bundle", - "version": "v5.0.23", + "name": "robrichards/xmlseclibs", + "version": "3.0.3", "source": { "type": "git", - "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", - "reference": "088b116a0e27faa0e1a7384dd4f3f6a9d5a8a3b6" + "url": "https://github.com/robrichards/xmlseclibs.git", + "reference": "406c68ac9124db033d079284b719958b829cb830" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/088b116a0e27faa0e1a7384dd4f3f6a9d5a8a3b6", - "reference": "088b116a0e27faa0e1a7384dd4f3f6a9d5a8a3b6", + "url": "https://api.github.com/repos/robrichards/xmlseclibs/zipball/406c68ac9124db033d079284b719958b829cb830", + "reference": "406c68ac9124db033d079284b719958b829cb830", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "php": ">= 5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "RobRichards\\XMLSecLibs\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "A PHP library for XML Security", + "homepage": "https://github.com/robrichards/xmlseclibs", + "keywords": [ + "security", + "signature", + "xml", + "xmldsig" + ], + "time": "2018-11-15 11:59:02" + }, + { + "name": "sensio/distribution-bundle", + "version": "v5.0.24", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", + "reference": "59eac70f15f97ee945924948a6f5e2f6f86b7a4b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/59eac70f15f97ee945924948a6f5e2f6f86b7a4b", + "reference": "59eac70f15f97ee945924948a6f5e2f6f86b7a4b", "shasum": "" }, "require": { @@ -2116,20 +2375,20 @@ "configuration", "distribution" ], - "time": "2018-10-25 15:26:23" + "time": "2018-12-14 17:36:15" }, { "name": "sensio/framework-extra-bundle", - "version": "v5.2.2", + "version": "v5.2.4", "source": { "type": "git", "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", - "reference": "9ef408febe2f12e70118ef61c6515035a06c5830" + "reference": "1fdf591c4b388e62dbb2579de89c1560b33f865d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/9ef408febe2f12e70118ef61c6515035a06c5830", - "reference": "9ef408febe2f12e70118ef61c6515035a06c5830", + "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/1fdf591c4b388e62dbb2579de89c1560b33f865d", + "reference": "1fdf591c4b388e62dbb2579de89c1560b33f865d", "shasum": "" }, "require": { @@ -2148,7 +2407,7 @@ "symfony/finder": "^3.3|^4.0", "symfony/monolog-bridge": "^3.0|^4.0", "symfony/monolog-bundle": "^3.2", - "symfony/phpunit-bridge": "^3.3|^4.0", + "symfony/phpunit-bridge": "^3.4.19|^4.1.8", "symfony/psr-http-message-bridge": "^0.3", "symfony/security-bundle": "^3.3|^4.0", "symfony/twig-bundle": "^3.3|^4.0", @@ -2187,20 +2446,20 @@ "annotations", "controllers" ], - "time": "2018-10-26 14:09:02" + "time": "2018-12-11 16:59:23" }, { "name": "sensiolabs/security-checker", - "version": "v5.0.1", + "version": "v5.0.3", "source": { "type": "git", "url": "https://github.com/sensiolabs/security-checker.git", - "reference": "9ea927417c949039a9cfb0d92af76fd1c538d9e9" + "reference": "46be3f58adac13084497961e10eed9a7fb4d44d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/9ea927417c949039a9cfb0d92af76fd1c538d9e9", - "reference": "9ea927417c949039a9cfb0d92af76fd1c538d9e9", + "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/46be3f58adac13084497961e10eed9a7fb4d44d1", + "reference": "46be3f58adac13084497961e10eed9a7fb4d44d1", "shasum": "" }, "require": { @@ -2233,7 +2492,7 @@ } ], "description": "A security checker for your composer.lock", - "time": "2018-10-16 10:30:44" + "time": "2018-12-19 17:14:59" }, { "name": "swiftmailer/swiftmailer", @@ -2424,21 +2683,21 @@ }, { "name": "symfony/orm-pack", - "version": "v1.0.5", + "version": "v1.0.6", "source": { "type": "git", "url": "https://github.com/symfony/orm-pack.git", - "reference": "1b58f752cd917a08c9c8df020781d9c46a2275b1" + "reference": "36c2a928482dc5f05c5c1c1b947242ae03ff1335" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/orm-pack/zipball/1b58f752cd917a08c9c8df020781d9c46a2275b1", - "reference": "1b58f752cd917a08c9c8df020781d9c46a2275b1", + "url": "https://api.github.com/repos/symfony/orm-pack/zipball/36c2a928482dc5f05c5c1c1b947242ae03ff1335", + "reference": "36c2a928482dc5f05c5c1c1b947242ae03ff1335", "shasum": "" }, "require": { "doctrine/doctrine-bundle": "^1.6.10", - "doctrine/doctrine-migrations-bundle": "^1.3", + "doctrine/doctrine-migrations-bundle": "^1.3|^2.0", "doctrine/orm": "^2.5.11", "php": "^7.0" }, @@ -2448,7 +2707,7 @@ "MIT" ], "description": "A pack for the Doctrine ORM", - "time": "2017-12-12 01:47:50" + "time": "2019-01-16 09:49:15" }, { "name": "symfony/polyfill-apcu", @@ -2909,16 +3168,16 @@ }, { "name": "symfony/symfony", - "version": "v3.4.19", + "version": "v3.4.23", "source": { "type": "git", "url": "https://github.com/symfony/symfony.git", - "reference": "a8ff5a534372763544031ae68c981d396ffeb43f" + "reference": "336cf12e5e82d71874e8522e0879794340351b56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/a8ff5a534372763544031ae68c981d396ffeb43f", - "reference": "a8ff5a534372763544031ae68c981d396ffeb43f", + "url": "https://api.github.com/repos/symfony/symfony/zipball/336cf12e5e82d71874e8522e0879794340351b56", + "reference": "336cf12e5e82d71874e8522e0879794340351b56", "shasum": "" }, "require": { @@ -3060,7 +3319,7 @@ "keywords": [ "framework" ], - "time": "2018-11-26 14:07:44" + "time": "2019-03-03 18:52:48" }, { "name": "tetranz/select2entity-bundle", @@ -3111,32 +3370,32 @@ }, { "name": "twig/twig", - "version": "v2.5.0", + "version": "v2.6.2", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "6a5f676b77a90823c2d4eaf76137b771adf31323" + "reference": "7d7342c8a4059fefb9b8d07db0cc14007021f9b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/6a5f676b77a90823c2d4eaf76137b771adf31323", - "reference": "6a5f676b77a90823c2d4eaf76137b771adf31323", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/7d7342c8a4059fefb9b8d07db0cc14007021f9b7", + "reference": "7d7342c8a4059fefb9b8d07db0cc14007021f9b7", "shasum": "" }, "require": { "php": "^7.0", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "~1.0" + "symfony/polyfill-mbstring": "^1.3" }, "require-dev": { "psr/container": "^1.0", "symfony/debug": "^2.7", - "symfony/phpunit-bridge": "^3.3" + "symfony/phpunit-bridge": "^3.4.19|^4.1.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.6-dev" } }, "autoload": { @@ -3174,7 +3433,7 @@ "keywords": [ "templating" ], - "time": "2018-07-13 07:18:09" + "time": "2019-01-14 15:00:48" }, { "name": "zendframework/zend-code", @@ -3287,16 +3546,16 @@ "packages-dev": [ { "name": "nikic/php-parser", - "version": "v4.1.0", + "version": "v4.2.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "d0230c5c77a7e3cfa69446febf340978540958c0" + "reference": "5221f49a608808c1e4d436df32884cbc1b821ac0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/d0230c5c77a7e3cfa69446febf340978540958c0", - "reference": "d0230c5c77a7e3cfa69446febf340978540958c0", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/5221f49a608808c1e4d436df32884cbc1b821ac0", + "reference": "5221f49a608808c1e4d436df32884cbc1b821ac0", "shasum": "" }, "require": { @@ -3312,7 +3571,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -3334,7 +3593,7 @@ "parser", "php" ], - "time": "2018-10-10 09:24:14" + "time": "2019-02-16 20:54:15" }, { "name": "sensio/generator-bundle", @@ -3392,16 +3651,16 @@ }, { "name": "symfony/maker-bundle", - "version": "v1.9.0", + "version": "v1.11.4", "source": { "type": "git", "url": "https://github.com/symfony/maker-bundle.git", - "reference": "e873047b6022a0343c9354f65d5d47b9e351dd53" + "reference": "540996bfdcc14ca38dfe4865c020d965020ae821" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/maker-bundle/zipball/e873047b6022a0343c9354f65d5d47b9e351dd53", - "reference": "e873047b6022a0343c9354f65d5d47b9e351dd53", + "url": "https://api.github.com/repos/symfony/maker-bundle/zipball/540996bfdcc14ca38dfe4865c020d965020ae821", + "reference": "540996bfdcc14ca38dfe4865c020d965020ae821", "shasum": "" }, "require": { @@ -3454,20 +3713,20 @@ "scaffold", "scaffolding" ], - "time": "2018-11-03 18:25:11" + "time": "2019-03-01 20:45:16" }, { "name": "symfony/phpunit-bridge", - "version": "v3.4.19", + "version": "v3.4.23", "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "2155067dfc73e0e77dbc26f236af17e4df552de5" + "reference": "b539f37134c10edbf85dc0567be4151c56870f5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/2155067dfc73e0e77dbc26f236af17e4df552de5", - "reference": "2155067dfc73e0e77dbc26f236af17e4df552de5", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/b539f37134c10edbf85dc0567be4151c56870f5e", + "reference": "b539f37134c10edbf85dc0567be4151c56870f5e", "shasum": "" }, "require": { @@ -3477,7 +3736,6 @@ "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" }, "suggest": { - "ext-zip": "Zip support is required when using bin/simple-phpunit", "symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader" }, "bin": [ @@ -3520,7 +3778,7 @@ ], "description": "Symfony PHPUnit Bridge", "homepage": "https://symfony.com", - "time": "2018-11-20 16:47:12" + "time": "2019-02-16 18:50:26" } ], "aliases": [], diff --git a/src/cadolesuser-1.0/scripts/cadolesuser-postservice-01.sh b/src/cadolesuser-1.0/scripts/cadolesuser-postservice-01.sh index 7e8b2b80..b40fd001 100755 --- a/src/cadolesuser-1.0/scripts/cadolesuser-postservice-01.sh +++ b/src/cadolesuser-1.0/scripts/cadolesuser-postservice-01.sh @@ -29,6 +29,8 @@ php bin/console Core:InitData # Generation des assets bin/console --env=dev assetic:dump +# Copie des polices du projet dans le rep web +cp -rf src/Cadoles/CoreBundle/Resources/public/fonts web/ # Pointer le repertoire des avatar d'eportail sur celui de draaf # Paramétrage eportail diff --git a/src/cadolesuser-1.0/src/Cadoles/CASBundle/CadolesCASBundle.php b/src/cadolesuser-1.0/src/Cadoles/CASBundle/CadolesCASBundle.php new file mode 100644 index 00000000..65644ad3 --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CASBundle/CadolesCASBundle.php @@ -0,0 +1,10 @@ +getParameter("masteridentity"); + + // Init Client CAS + \phpCAS::setDebug(false); + \phpCAS::client(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), true); + \phpCAS::setNoCasServerValidation(); + + // Authentification + \phpCAS::forceAuthentication(); + + // Récupération UID + $username = \phpCAS::getUser(); + + // Récupération Attribut + $attributes = \phpCAS::getAttributes(); + + // Suppression des Attributs en tableaux + foreach ($attributes as $key => $value) { + if(is_array($value)) + unset($attributes[$key]); + } + + // Rechercher l'utilisateur + $em = $this->getDoctrine()->getManager(); + if(isset($attributes[$this->getParameter('user_attr_cas_username')])) + $username = $attributes[$this->getParameter('user_attr_cas_username')]; + + if(isset($attributes[$this->getParameter('user_attr_cas_mail')])) + $email = $attributes[$this->getParameter('user_attr_cas_mail')]; + + if(isset($attributes[$this->getParameter('user_attr_cas_lastname')])) + $lastname = $attributes[$this->getParameter('user_attr_cas_lastname')]; + + if(isset($attributes[$this->getParameter('user_attr_cas_firstname')])) + $firstname = $attributes[$this->getParameter('user_attr_cas_firstname')]; + + $user = $em->getRepository('CadolesCoreBundle:User')->findOneBy(array("username"=>$username)); + $exists = $user ? true : false; + + if (!$exists) { + if($masteridentity=="SQL") { + // C'est pas normal que l'on puisse se connecter alors que l'utilisateur n'est pas connu en base + // La base étant le maitre de l'identité + throw $this->createNotFoundException('Permission denied'); + } + + if($masteridentity=="LDAP") { + // Normalement la synchronisation des comptes aurait du générer le compte en base c'est donc pas normal + // Peut-être juste relancer une synchronisation + throw $this->createNotFoundException('Permission denied. Need to synchronize LDAP ? Contact your administrator'); + } + + if($masteridentity=="SSO") { + // Là c'est normal que potentiellement il n'existe pas il faut donc l'autogénérer + $user = new User(); + + // On calcule le niveau01 de l'utilisateur + $niveau01=$em->getRepository('CadolesCoreBundle:Niveau01')->calculateNiveau01($attributes); + if(!$niveau01) + throw $this->createNotFoundException('Permission denied. No Organisation Niveau 01 match'); + + $user->setUsername($username); + $user->setEmail($email); + $user->setLastname($lastname); + $user->setFirstname($firstname); + + $user->setPassword("CASPWD-".$username); + $user->setSalt("CASPWD-".$username); + + $user->setNiveau01($niveau01); + $user->setSiren($niveau01->getSiren()); + $user->setSiret(""); + + $user->setAvatar("noavatar.png"); + $user->setVisible(true); + $user->setAuthlevel("simple"); + $user->setRole("ROLE_USER"); + + $em->persist($user); + $em->flush(); + + // On calcule les groupes de l'utilisateur + $user=$groups=$em->getRepository('CadolesCoreBundle:Group')->calculateGroup($user,$attributes); + } + } + else { + // Mise à jour des valeurs uniquement si le maitre de l'identité est le SSO + if($masteridentity=="SSO") { + // On calcule le niveau01 de l'utilisateur + $niveau01=$em->getRepository('CadolesCoreBundle:Niveau01')->calculateNiveau01($attributes); + if(!$niveau01) + throw $this->createNotFoundException('Permission denied. No Organisation Niveau 01 match'); + + // On s'assure que le niveau 02 appartient bien au niveau 01 calculé + $sameniveau01=(!is_null($user->getNiveau02())&&$niveau01==$user->getNiveau02()->getNiveau01()); + + // On calcule les groupes de l'utilisateur + $user=$groups=$em->getRepository('CadolesCoreBundle:Group')->calculateGroup($user,$attributes); + + $user->setLastname($lastname); + $user->setFirstname($firstname); + $user->setEmail($email); + if(!$sameniveau01) $user->setNiveau02(null); + + $em->persist($user); + $em->flush(); + } + } + + // Calcul Service + /* + $user = $em->getRepository('CadolesCoreBundle:User')->calculateServices($user, $attributes); + + // Attributs calculés + $attributes = $em->getRepository('CadolesCoreBundle:User')->calculateAttributes($user, $attributes); + */ + + // Sauvegarde des attributes en session + $this->get('session')->set('attributes', $attributes); + + // Autoconnexion + // Récupérer le token de l'utilisateur + $token = new UsernamePasswordToken($user, null, "main", $user->getRoles()); + $this->get("security.token_storage")->setToken($token); + + // Simuler l'evenement de connexion + $event = new InteractiveLoginEvent($request, $token); + $dispatcher = new EventDispatcher(); + $dispatcher->dispatch("security.interactive_login", $event); + + + return $this->redirect($this->generateUrl('cadoles_core_home')); + } + + public function logoutAction() { + // Init Client CAS + \phpCAS::setDebug(false); + \phpCAS::client(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), true); + \phpCAS::setNoCasServerValidation(); + + // Logout + $url=$this->generateUrl('cadoles_core_home', array(), UrlGeneratorInterface::ABSOLUTE_URL); + \phpCAS::logout(array("service"=>$url)); + } +} diff --git a/src/cadolesuser-1.0/src/Cadoles/CASBundle/Resources/config/routing.yml b/src/cadolesuser-1.0/src/Cadoles/CASBundle/Resources/config/routing.yml new file mode 100644 index 00000000..728e4a44 --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CASBundle/Resources/config/routing.yml @@ -0,0 +1,8 @@ +cas_sp.login: + path: /login + defaults: { _controller: CadolesCASBundle:Security:login } + +cas_sp.logout: + path: /logout + defaults: { _controller: CadolesCASBundle:Security:logout } + diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/InitDataCommand.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/InitDataCommand.php index 0052c205..dc282428 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/InitDataCommand.php +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/InitDataCommand.php @@ -35,10 +35,9 @@ class InitDataCommand extends Command $kernel->boot(); $kernel->loadClassCache(); $em = $kernel->getContainer()->get('service_container')->get('doctrine.orm.default_entity_manager'); - - + $finder = new Finder(); - $finder->in('src/Cadoles/CoreBundle/Command'); + $finder->in('src/Cadoles/CoreBundle/Command/data'); $output->writeln('Init Data for Core !'); // Init 01 = ce qui templetisé @@ -46,7 +45,7 @@ class InitDataCommand extends Command foreach( $finder as $file ){ $content = $file->getContents(); - $stmt = $em->getConnection()->prepare($content); + $stmt = $em->getConnection()->prepare($content); $stmt->execute(); } @@ -88,6 +87,7 @@ class InitDataCommand extends Command $group->setLabel("Tout le Monde"); $group->setFgopen(false); $group->setFgall(true); + $group->setFgtemplate(false); $em->persist($group); $em->flush(); } diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/SynchroCommand.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/SynchroCommand.php index 63d6c5e8..c63201f0 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/SynchroCommand.php +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/SynchroCommand.php @@ -12,6 +12,9 @@ use Doctrine\ORM\EntityManager; use Cadoles\CoreBundle\Entity\Niveau01; use Cadoles\CoreBundle\Entity\Niveau02; +use Cadoles\CoreBundle\Entity\User; +use Cadoles\CoreBundle\Entity\Group; +use Cadoles\CoreBundle\Entity\UserGroup; global $bdd01; global $config; @@ -43,8 +46,9 @@ class SynchroCommand extends Command $em = $kernel->getContainer()->get('service_container')->get('doctrine.orm.default_entity_manager'); setlocale( LC_CTYPE, 'fr_FR' ); - $labelniveau01=mb_strtoupper($kernel->getContainer()->getParameter('labelniveau01')); - $labelniveau02=mb_strtoupper($kernel->getContainer()->getParameter('labelniveau02')); + $labelniveau01 = mb_strtoupper($kernel->getContainer()->getParameter('labelniveau01')); + $labelniveau02 = mb_strtoupper($kernel->getContainer()->getParameter('labelniveau02')); + $masteridentity = $kernel->getContainer()->getParameter('masteridentity'); $simulate = $input->getArgument('simulate'); if($simulate=="") $simulate="true"; @@ -59,8 +63,188 @@ class SynchroCommand extends Command if($simulate) $output->writeln('** SIMULATION'); else $output->writeln('** REEL'); + $output->writeln(''); + $output->writeln('====================================================='); + $output->writeln('== SYNCHONISATION ANNUAIRE =========================='); + $output->writeln('====================================================='); + $ldap = $kernel->getContainer()->get('cadoles.core.service.ldap'); - if($ldap->isEnabled()) { + if(!$ldap->isEnabled()) { + if($masteridentity !="LDAP") { + $output->writeln(''); + $output->writeln(' Synchronisation annuaire désactivée'); + } + else { + $output->writeln(''); + $output->writeln('====================================================='); + $output->writeln('== SYNCHONISATION LDAP TO BUNDLE ===================='); + $output->writeln('====================================================='); + + + $ldap_basedn = $kernel->getContainer()->getParameter('ldap_basedn'); + $ldap_template = $kernel->getContainer()->getParameter('ldap_template'); + $ldap_username = $kernel->getContainer()->getParameter('ldap_username'); + $ldap_firstname = $kernel->getContainer()->getParameter('ldap_firstname'); + $ldap_lastname = $kernel->getContainer()->getParameter('ldap_lastname'); + $ldap_email = $kernel->getContainer()->getParameter('ldap_email'); + $ldap_usersadmin = $kernel->getContainer()->getParameter('ldap_usersadmin'); + $fieldstoread = array($ldap_username,$ldap_firstname,$ldap_lastname,$ldap_email); + $ldapusers = array(); + + if($ldap_template=="scribe") { + $output->writeln(''); + $output->writeln('== PROFILS =========================================='); + + // Eleves + $ldapfilter="(&(uid=*)(ENTPersonProfils=eleve))"; + $label="PROFIL = Elèves"; + $output->writeln(" - $label"); + if(!$simulate) $this->addmodGroup($em,$label,$ldapfilter); + + // Enseignants + $ldapfilter="(|(&(uid=*)(ENTPersonProfils=enseignant))(&(uid=*)(typeadmin=0))(&(uid=*)(typeadmin=2)))"; + $label="PROFIL = Enseignants"; + $output->writeln(" - $label"); + if(!$simulate) $this->addmodGroup($em,$label,$ldapfilter); + + // Responsables + $ldapfilter="(&(uid=*)(ENTPersonProfils=responsable))"; + $label="PROFIL = Responsables"; + $output->writeln(" - $label"); + if(!$simulate) $this->addmodGroup($em,$label,$ldapfilter); + + // Administratifs + $ldapfilter="(&(uid=*)(ENTPersonProfils=administratif))"; + $label="PROFIL = Administratifs"; + $output->writeln(" - $label"); + if(!$simulate) $this->addmodGroup($em,$label,$ldapfilter); + + $output->writeln(''); + $output->writeln('== CLASSES =========================================='); + $results = $ldap->search("type=Classe", ['cn','description','gidNumber'], $ldap_basedn); + foreach($results as $result) { + $cn=$result["cn"]; + $ldapfilter="(|(&(type=Classe)(cn=$cn))(&(type=Equipe)(cn=profs-$cn))(&(ENTPersonProfils=Administratif)(divcod=$cn)))"; + + $label="CLASSE = ".$result["cn"]; + $output->writeln(" - $label"); + if(!$simulate) $this->addmodGroup($em,$label,$ldapfilter); + } + } + + $output->writeln(''); + $output->writeln('== USERS ============================================'); + + // On parcours les niveaux 01 pour connaitre les filtres ldap associé + $datas=$em->createQueryBuilder()->select('table')->from('CadolesCoreBundle:Niveau01','table')->where('table.ldapfilter IS NOT NULL')->getQuery()->getResult(); + foreach($datas as $data) { + // On execute le filtre d'appartenance à ce niveau + $results = $ldap->search($data->getLdapfilter(), $fieldstoread, $ldap_basedn); + + // Pour chaque utilisateur ldap + foreach($results as $result) { + // On sauvegarde ce user + array_push($ldapusers,$result[$ldap_username]); + + // Création ou Modification du user + $user=$em->getRepository('CadolesCoreBundle:User')->findBy(array('username' => $result[$ldap_username])); + if(!$user) { + $output->writeln(" - Création dans Bundle >> ".$result[$ldap_username]); + if(!$simulate) $this->addUser($em,$data,$result[$ldap_username],$result[$ldap_firstname],$result[$ldap_lastname],$result[$ldap_email],$ldap_usersadmin); + } + else { + $output->writeln(" - Modification dans Bundle >> ".$result[$ldap_username]); + if(!$simulate) $this->modUser($em,$user[0],$result[$ldap_username],$result[$ldap_firstname],$result[$ldap_lastname],$result[$ldap_email],$ldap_usersadmin); + } + } + } + + $output->writeln(''); + $output->writeln('== USERS GROUP ======================================'); + + $groups=$em->getRepository('CadolesCoreBundle:Group')->findAll(); + foreach($groups as $group) { + $ldapusersgroup=array(); + + $ldapfilter=$group->getLdapfilter(); + + $output->writeln(''); + $output->writeln('== '.$group->getLabel()); + + if(!is_null($ldapfilter)) { + $results = $ldap->search($ldapfilter,[$ldap_username,"memberuid"] , $ldap_basedn); + foreach($results as $result) { + if(isset($result["memberuid"])) { + // Si memberid est un tableau il y a plusieur user dedans + if(is_array($result["memberuid"])) { + foreach($result["memberuid"] as $key => $value) { + if(is_int($key)) { + $user=$em->getRepository('CadolesCoreBundle:User')->findOneBy(array('username' => $value)); + if($user) { + array_push($ldapusersgroup,$value); + $output->writeln(" - Rattacher >> ".$value); + if(!$simulate) $this->addtoGroup($em,$user,$group); + } + } + } + } + // sinon m'a qu'un seul uid + else { + $user=$em->getRepository('CadolesCoreBundle:User')->findOneBy(array('username' => $result["memberuid"])); + if($user) { + array_push($ldapusersgroup,$result["memberuid"]); + $output->writeln(" - Rattacher >> ".$result["memberuid"]); + if(!$simulate) $this->addtoGroup($em,$user,$group); + } + } + } + + if(isset($result[$ldap_username])) { + $user=$em->getRepository('CadolesCoreBundle:User')->findOneBy(array('username' => $result[$ldap_username])); + if($user) { + array_push($ldapusersgroup,$result[$ldap_username]); + $output->writeln(" - Rattacher >> ".$result[$ldap_username]); + if(!$simulate) $this->addtoGroup($em,$user,$group); + } + } + } + + $members=$em->getRepository('CadolesCoreBundle:UserGroup')->findBy(array('group' => $group)); + foreach($members as $member) { + if(!in_array($member->getUser()->getUsername(),$ldapusersgroup)) { + $output->writeln(" - Détattacher >> ".$member->getUser()->getUsername()); + if(!$simulate) { + $em->remove($member); + $em->flush(); + } + } + } + } + } + + $output->writeln(''); + $output->writeln('====================================================='); + $output->writeln('== SYNCHONISATION BUNDLE TO LDAP ===================='); + $output->writeln('====================================================='); + + $output->writeln(''); + $output->writeln('== USERS ============================================'); + + // Pour chaque utilisateur de la base + $users=$em->getRepository('CadolesCoreBundle:User')->findAll(); + foreach($users as $user) { + // Si l'utilisateur n'est pas dans la liste des users ldap : on le supprime + if(!in_array($user->getUsername(),$ldapusers)) { + $output->writeln(" - Suppression dans Bundle >> ".$user->getUsername()); + if(!$simulate) { + $em->remove($user); + $em->flush(); + } + } + } + } + } + else { $output->writeln(''); $output->writeln('====================================================='); $output->writeln('== SYNCHONISATION BUNDLE TO LDAP ===================='); @@ -291,12 +475,12 @@ class SynchroCommand extends Command } } + + $output->writeln(''); $output->writeln('====================================================='); $output->writeln('== SYNCHONISATION BUNDLE TO EPORTAIL ================'); $output->writeln('====================================================='); - - $eportail = $kernel->getContainer()->get('cadoles.core.service.eportail'); if(!$eportail->isEnabled()) { @@ -429,4 +613,68 @@ class SynchroCommand extends Command $rootdir = rtrim(getcwd(), '/'); return $rootdir . '/' . trim($extra['symfony-app-dir'], '/'); } + + protected static function addmodGroup($em,$label,$ldapfilter) { + $group=$em->getRepository('CadolesCoreBundle:Group')->findOneBy(array('fgtemplate' => true, 'label' => $label)); + if(!$group) { + $group=new Group(); + } + + $group->setLabel($label); + $group->setFgopen(false); + $group->setFgall(false); + $group->setLdapfilter($ldapfilter); + $group->setFgtemplate(true); + + $em->persist($group); + $em->flush(); + } + + protected static function addtoGroup($em,$user,$group) { + $member=$em->getRepository('CadolesCoreBundle:UserGroup')->findOneBy(array('group' => $group, 'user' => $user)); + if(!$member) { + $member= new UserGroup(); + $member->setGroup($group); + $member->setUser($user); + + $em->persist($member); + $em->flush(); + } + } + + protected static function addUser($em,$niveau01,$username,$firstname,$lastname,$email,$usersadmin) { + $user = new User(); + + $user->setUsername($username); + $user->setLastname($lastname); + $user->setFirstname($firstname); + $user->setEmail($email); + $user->setNiveau01($niveau01); + $user->setSiren($niveau01->getSiren()); + $user->setPassword("PASSWORDFROMEXTERNE"); + $user->setVisible(true); + $user->setAuthlevel("simple"); + $user->setBelongingpopulation("agent"); + + if(in_array($username,$usersadmin)) + $user->setRole("ROLE_ADMIN"); + else + $user->setRole("ROLE_USER"); + + $em->persist($user); + $em->flush(); + } + + protected static function modUser($em,$user,$username,$firstname,$lastname,$email,$usersadmin) { + $user->setLastname($lastname); + $user->setFirstname($firstname); + $user->setEmail($email); + + if(in_array($username,$usersadmin)) + $user->setRole("ROLE_ADMIN"); + + $em->persist($user); + $em->flush(); + } + } diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/core-init-01.sql b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/core-init-01.sql deleted file mode 100644 index 658cb1bc..00000000 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/core-init-01.sql +++ /dev/null @@ -1,22 +0,0 @@ - -SET NAMES utf8; -SET time_zone = '+00:00'; -SET foreign_key_checks = 0; -SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; - -INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES -(-100, 'ac-dijon', '21000'); - -INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES -(-100, -100, 'admin', 'Administrateur', 'envole', '{SSHA}rQFMx40DYL1RTC6sXgFEfygLHAXa69wI -', 'tina-boot@ac-dijon.fr', 'admin.jpg', 'ROLE_ADMIN', '21000', 'simple'); - -TRUNCATE TABLE sidebar; -INSERT IGNORE INTO `sidebar` (`id`, `parent_id`, `roworder`, `label`, `path`, `fonticon`, `permission`) VALUES -(1000, NULL, 1000, 'CONFIGIRATION', '', 'fa-gear', 'ROLE_ADMIN,ROLE_MODO'), -(1200, 1000, 1200, 'Organisations', NULL, 'fa-sitemap', 'ROLE_ADMIN,ROLE_MODO'), -(1210, 1200, 1210, 'Listes Blanche', 'cadoles_core_config_whitelist', 'fa-tasks', 'ROLE_ADMIN'), -(1220, 1200, 1220, 'Niveau 01', 'cadoles_core_config_niveau01', 'fa-building', 'ROLE_ADMIN'), -(1240, 1200, 1240, 'Groupes', 'cadoles_core_config_group', 'fa-users', 'ROLE_ADMIN,ROLE_MODO'), -(1250, 1200, 1250, 'Inscriptions', 'cadoles_core_config_registration', 'fa-pencil-square-o', 'ROLE_ADMIN,ROLE_MODO'), -(1260, 1200, 1260, 'Utilisateurs', 'cadoles_core_config_user', 'fa-child', 'ROLE_ADMIN,ROLE_MODO'); \ No newline at end of file diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/city.sql b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/data/city.sql similarity index 100% rename from src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/city.sql rename to src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/data/city.sql diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql new file mode 100644 index 00000000..c751af25 --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql @@ -0,0 +1,44 @@ + +SET NAMES utf8; +SET time_zone = '+00:00'; +SET foreign_key_checks = 0; +SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; + +INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES +(-100, 'ldapbundle', '0000000A'); + +INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES +(-100, -100, 'admin', 'Administrateur', 'ldapbundle', 'PWD_CAS', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '0000000A', 'simple'); + +TRUNCATE TABLE sidebar; +INSERT IGNORE INTO `sidebar` (`id`, `parent_id`, `roworder`, `label`, `path`, `fonticon`, `permission`) VALUES +(1000, NULL, 1000, 'CONFIGIRATION', '', 'fa-gear', 'ROLE_ADMIN,ROLE_MODO'), +(1010, 1000, 1010, 'Générale', 'cadoles_core_config_commun', 'fa-table', 'ROLE_ADMIN'), +(1200, 1000, 1200, 'Organisations', NULL, 'fa-sitemap', 'ROLE_ADMIN,ROLE_MODO'), +(1210, 1200, 1210, 'Listes Blanche', 'cadoles_core_config_whitelist', 'fa-tasks', 'ROLE_ADMIN'), +(1220, 1200, 1220, 'Niveau 01', 'cadoles_core_config_niveau01', 'fa-building', 'ROLE_ADMIN'), +(1240, 1200, 1240, 'Groupes', 'cadoles_core_config_group', 'fa-users', 'ROLE_ADMIN,ROLE_MODO'), +(1250, 1200, 1250, 'Inscriptions', 'cadoles_core_config_registration', 'fa-pencil-square-o', 'ROLE_ADMIN,ROLE_MODO'), +(1260, 1200, 1260, 'Utilisateurs', 'cadoles_core_config_user', 'fa-child', 'ROLE_ADMIN,ROLE_MODO'); + + +DELETE FROM `config` WHERE `changeable` = 0; +INSERT IGNORE INTO `config` (`order`, `visible`, `changeable`, `required`, `type`, `id`, `value`, `grouped`, `help`) VALUES +('001', 1, 1, 1, 'string', 'appname', 'Cadoles User', '', 'Le titre de votre site'), +('002', 1, 0, 1, 'string', 'version', '1.0.0', '', 'Version de l\'application'), +('003', 1, 1, 0, 'string', 'subappname', 'Portail', '', 'Le sous titre de votre site'), +('004', 1, 1, 1, 'logo', 'logo', 'uploads/logo/logo.png', '', 'Le logo de votre site'), + +('040', 1, 1, 1, 'boolean', 'fgheader', '0', '', 'Utiliser une image en bannière du site'), +('041', 1, 1, 1, 'header', 'header', 'uploads/header/header.png', 'fgheader', 'Image en bannière du site'), +('042', 1, 1, 1, 'integer', 'heightheader', '100', 'fgheader', 'Hauteur de la bannière du site'), + +('050', 1, 1, 1, 'color', 'colormain', 'bfbfbf', '', 'Couleur principale de votre site'), +('051', 1, 1, 1, 'color', 'fontcolorhover', '2e3131', '', 'Couleur de la police sur couleur principale'), + +('060', 1, 1, 1, 'font', 'fontfacetitle', 'Helvetica Neue', '', 'Police des titres de votre site'), +('061', 1, 1, 1, 'font', 'fontfacebody', 'Helvetica Neue', '', 'Police des titres de votre site'), + +('200', 1, 1, 1, 'boolean', 'PROXYactivate', '1', '', 'Définit un Proxy'), +('201', 1, 1, 1, 'string', 'PROXYserver', '192.168.57.160', 'PROXYactivate','Adresse du Proxy'), +('202', 1, 1, 1, 'string', 'PROXYport', '8080', 'PROXYactivate','Port du Proxy'); \ No newline at end of file diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/core-init-02.sql b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/data/core-init-02.sql similarity index 100% rename from src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/core-init-02.sql rename to src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/data/core-init-02.sql diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/country.csv b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/data/country.csv similarity index 100% rename from src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/country.csv rename to src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/data/country.csv diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/country.sql b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/data/country.sql similarity index 100% rename from src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/country.sql rename to src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/data/country.sql diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/country.xls b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/data/country.xls similarity index 100% rename from src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/country.xls rename to src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/data/country.xls diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/import.csv b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/data/import.csv similarity index 100% rename from src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/import.csv rename to src/cadolesuser-1.0/src/Cadoles/CoreBundle/Command/data/import.csv diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/ConfigController.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/ConfigController.php old mode 100644 new mode 100755 index 1e1e4b33..17f4ba7b --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/ConfigController.php +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/ConfigController.php @@ -4,7 +4,9 @@ namespace Cadoles\CoreBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Session\Session; + +use Cadoles\CoreBundle\Entity\Config; +use Cadoles\CoreBundle\Form\ConfigType; class ConfigController extends Controller { @@ -12,4 +14,123 @@ class ConfigController extends Controller { return $this->render('CadolesCoreBundle:Core:config.html.twig'); } + + public function listAction() + { + $em = $this->getDoctrine()->getManager(); + + $configs = $em->createQueryBuilder() + ->select('b') + ->from('CadolesCoreBundle:Config', 'b') + ->where('b.visible = :visible') + ->setParameter('visible', 1) + ->addOrderBy('b.order') + ->getQuery() + ->getResult(); + + return $this->render('CadolesCoreBundle:Config:list.html.twig', array('configs' => $configs)); + } + + public function updateAction($id,Request $request) + { + // Récupération de l'enregistrement courant + $config=$this->getConfig($id); + + // Vérifier que cet enregistrement est modifiable + $type=$config->getType(); + $required=$config->getRequired(); + $visible=$config->getVisible(); + $changeable=$config->getChangeable(); + if(!$visible||!$changeable) { + return $this->redirectToRoute('cadoles_core_config_commun'); + } + + // Création du formulaire + $form = $this->createForm(ConfigType::class,$config,array("key" => $id, "type" => $type, "required" => $required)); + + // Récupération des data du formulaire + $form->handleRequest($request); + + // Sur erreur + $this->getErrorForm($form,$request,$config); + + // Sur validation + if ($form->get('submit')->isClicked() && $form->isValid()) { + $em = $this->getDoctrine()->getManager(); + $config = $form->getData(); + $em->persist($config); + $em->flush(); + + // Sur type boolean + if($type=="boolean") { + $qb = $em->createQueryBuilder(); + $q = $qb->update('CadolesCoreBundle:Config', 'c') + ->set('c.visible', ':visible') + ->where('c.grouped = :key') + ->setParameter('visible', $config->getValue()) + ->setParameter('key', $id) + ->getQuery(); + $q->execute(); + } + return $this->redirectToRoute('cadoles_core_config_commun'); + } + + // Affichage du formulaire + return $this->render('CadolesCoreBundle:Config:update.html.twig', array( + 'config' => $config, + 'type' => $type, + 'form' => $form->createView() + )); + } + + public function deleteAction($id,Request $request) + { + // Récupération de l'enregistrement courant + $config=$this->getConfig($id); + if(!$config->getRequired()) { + $config->setValue(""); + $em = $this->getDoctrine()->getManager(); + $em->persist($config); + $em->flush(); + } + return $this->redirectToRoute('cadoles_core_config_commun'); + } + + public function logoAction() + { + return $this->render('CadolesCoreBundle:Config:logo.html.twig'); + } + + public function headerAction() + { + return $this->render('CadolesCoreBundle:Config:header.html.twig'); + } + + protected function getConfig($id) + { + $em = $this->getDoctrine()->getManager(); + $config = $em->getRepository('CadolesCoreBundle:Config')->find($id); + + if (!$config) { + throw $this->createNotFoundException('Unable to find config.'); + } + + return $config; + } + + protected function getErrorForm($form,$request,$data) { + if ($form->get('submit')->isClicked() && !$form->isValid()) { + $this->get('session')->getFlashBag()->clear(); + $validator = $this->get('validator'); + $errors = $validator->validate($data); + foreach( $errors as $error ) { + $request->getSession()->getFlashBag()->add("error", $error->getMessage()); + } + + $errors = $form->getErrors(); + foreach( $errors as $error ) { + $request->getSession()->getFlashBag()->add("error", $error->getMessage()); + } + } + } } diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php index 0de5e2b0..db0cdda9 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php @@ -85,8 +85,8 @@ class GroupController extends Controller foreach($datas as $data) { $action = ""; - if(!$data->getFgall()) $action .="$data->getId()))."'>"; - if($data->getId()>0&&!$data->getFgall()&&$this->isGranted('ROLE_ADMIN')) $action.="$data->getId()))."'>"; + if(!$data->getFgall()&&!$data->getFgTemplate()) $action .="$data->getId()))."'>"; + if($data->getId()>0&&!$data->getFgall()&&!$data->getFgTemplate()&&$this->isGranted('ROLE_ADMIN')) $action.="$data->getId()))."'>"; if(!$data->getFgall()) $action .="$data->getId()))."'>"; array_push($output["data"],array($action,$data->getLabel(),($data->getFgopen()?"oui":"non"))); @@ -105,6 +105,7 @@ class GroupController extends Controller } $em = $this->getDoctrine()->getManager(); + $group=$this->getData($id); $sub = $em->createQueryBuilder(); $sub->select("usergroup"); @@ -210,7 +211,8 @@ class GroupController extends Controller foreach($datas as $data) { // Action $action = ""; - $action.=""; + if($group->getLdapfilter()==""&&$group->getAttributes()=="") + $action.=""; // Avatar $avatar="getAvatar()."' style='width:30px;background-color:#337ab7;margin:auto;display:block;'>"; @@ -230,6 +232,7 @@ class GroupController extends Controller } $em = $this->getDoctrine()->getManager(); + $group=$this->getData($id); $sub = $em->createQueryBuilder(); $sub->select("usergroup"); @@ -335,7 +338,8 @@ class GroupController extends Controller foreach($datas as $data) { // Action $action = ""; - $action.=""; + if($group->getLdapfilter()==""&&$group->getAttributes()=="") + $action.=""; // Avatar $avatar="getAvatar()."' style='width:30px;background-color:#337ab7;margin:auto;display:block;'>"; @@ -360,9 +364,13 @@ class GroupController extends Controller $userid=$request->request->get('userid'); $groupid=$request->request->get('groupid'); + $group=$em->getRepository("CadolesCoreBundle:Group")->find($groupid); + if($group->getFgAll()||$group->getFgtemplate()) + throw $this->createNotFoundException('Permission denied'); + $usergroup=new Usergroup; $usergroup->setUser($em->getRepository("CadolesCoreBundle:User")->find($userid)); - $usergroup->setGroup($em->getRepository("CadolesCoreBundle:Group")->find($groupid)); + $usergroup->setGroup($group); $em->persist($usergroup); $em->flush(); @@ -383,7 +391,10 @@ class GroupController extends Controller $output=array(); $userid=$request->request->get('userid'); $groupid=$request->request->get('groupid'); - //dump($em->getRepository("CadolesCoreBundle:User")->find($userid)); + + $group=$em->getRepository("CadolesCoreBundle:Group")->find($groupid); + if($group->getFgAll()||$group->getFgTemplate()) + throw $this->createNotFoundException('Permission denied'); $data = $em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(array("user"=>$userid,"group"=>$groupid)); $em->remove($data); @@ -400,7 +411,7 @@ class GroupController extends Controller $data = new Group(); // Création du formulaire - $form = $this->createForm(GroupType::class,$data,array("mode"=>"submit")); + $form = $this->createForm(GroupType::class,$data,array("mode"=>"submit","masteridentity"=> $this->GetParameter("masteridentity"))); // Récupération des data du formulaire $form->handleRequest($request); @@ -412,6 +423,10 @@ class GroupController extends Controller if ($form->get('submit')->isClicked() && $form->isValid()) { $data = $form->getData(); $data->setFgall(false); + $data->setFgtemplate(false); + if($data->getLdapfilter()!="") $data->setFgopen(false); + if($data->getAttributes()!="") $data->setFgopen(false); + $em = $this->getDoctrine()->getManager(); // Sauvegarde @@ -434,11 +449,13 @@ class GroupController extends Controller { // Récupération de l'enregistrement courant $data=$this->getData($id); - + // Vérifier que cet enregistrement est modifiable - + if($data->getFgAll()||$data->getFgTemplate()) + throw $this->createNotFoundException('Permission denied'); + // Création du formulaire - $form = $this->createForm(GroupType::class,$data,array("mode"=>"update")); + $form = $this->createForm(GroupType::class,$data,array("mode"=>"update","masteridentity"=> $this->GetParameter("masteridentity"))); // Récupération des data du formulaire $form->handleRequest($request); @@ -448,9 +465,15 @@ class GroupController extends Controller // Sur validation if ($form->get('submit')->isClicked() && $form->isValid()) { + $masteridentity=$this->GetParameter("masteridentity"); $em = $this->getDoctrine()->getManager(); $data = $form->getData(); - + + if($masteridentity!="LDAP") $data->setLdapfilter(null); + if($masteridentity!="SSO") $data->setAttributes(null); + if($data->getLdapfilter()!="") $data->setFgopen(false); + if($data->getAttributes()!="") $data->setFgopen(false); + // Sauvegarde $em->persist($data); $em->flush(); @@ -478,9 +501,11 @@ class GroupController extends Controller $data=$this->getData($id); // Vérifier que cet enregistrement est supprimable + if($data->getFgAll()||$data->getFgTemplate()) + throw $this->createNotFoundException('Permission denied'); // Création du formulaire - $form = $this->createForm(GroupType::class,$data,array("mode"=>"delete")); + $form = $this->createForm(GroupType::class,$data,array("mode"=>"delete","masteridentity"=> $this->GetParameter("masteridentity"))); // Récupération des data du formulaire $form->handleRequest($request); diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/Niveau01Controller.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/Niveau01Controller.php index 0142ecaa..1afc2113 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/Niveau01Controller.php +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/Niveau01Controller.php @@ -94,7 +94,11 @@ class Niveau01Controller extends Controller $data = new Niveau01(); // Création du formulaire - $form = $this->createForm(Niveau01Type::class,$data,array("mode"=>"submit")); + $form = $this->createForm(Niveau01Type::class,$data,array( + "mode" => "submit", + "labelsiren" => $this->GetParameter("labelsirenniveau01"), + "masteridentity" => $this->GetParameter("masteridentity") + )); // Récupération des data du formulaire $form->handleRequest($request); @@ -131,7 +135,11 @@ class Niveau01Controller extends Controller // Vérifier que cet enregistrement est modifiable // Création du formulaire - $form = $this->createForm(Niveau01Type::class,$data,array("mode"=>"update")); + $form = $this->createForm(Niveau01Type::class,$data,array( + "mode" => "update", + "labelsiren" => $this->GetParameter("labelsirenniveau01"), + "masteridentity" => $this->GetParameter("masteridentity") + )); // Récupération des data du formulaire $form->handleRequest($request); @@ -169,7 +177,11 @@ class Niveau01Controller extends Controller // Vérifier que cet enregistrement est supprimable // Création du formulaire - $form = $this->createForm(Niveau01Type::class,$data,array("mode"=>"delete")); + $form = $this->createForm(Niveau01Type::class,$data,array( + "mode" =>"delete", + "labelsiren" => $this->GetParameter("labelsirenniveau01"), + "masteridentity" => $this->GetParameter("masteridentity") + )); // Récupération des data du formulaire $form->handleRequest($request); diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/RegistrationController.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/RegistrationController.php index dc2260eb..59c2a5a0 100755 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/RegistrationController.php +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/RegistrationController.php @@ -27,6 +27,11 @@ class RegistrationController extends Controller public function listAction() { + $moderegistration = $this->getParameter('moderegistration'); + $masteridentity = $this->getParameter('masteridentity'); + if($moderegistration=="none"||$masteridentity!="SQL") + throw $this->createNotFoundException('Permission denied'); + return $this->render($this->labelentity.':list.html.twig'); } @@ -163,7 +168,11 @@ class RegistrationController extends Controller public function submitAction(Request $request) { - $session = new Session(); + $moderegistration = $this->getParameter('moderegistration'); + $masteridentity = $this->getParameter('masteridentity'); + if($moderegistration=="none"||$masteridentity!="SQL") + throw $this->createNotFoundException('Permission denied'); + $data = new Registration(); // Création du formulaire @@ -180,10 +189,10 @@ class RegistrationController extends Controller $em = $this->getDoctrine()->getManager(); $data = $form->getData(); - $appname = $this->getParameter('appname'); + $appname = $this->get('session')->get('appname'); $noreply = $this->getParameter('noreply'); $keyterm = $this->getParameter('keyterm'); - $moderegistration = $this->getParameter('moderegistration'); + // Encodage password /* @@ -322,6 +331,11 @@ class RegistrationController extends Controller public function sendAction($id,Request $request) { + $moderegistration = $this->getParameter('moderegistration'); + $masteridentity = $this->getParameter('masteridentity'); + if($moderegistration=="none"||$masteridentity!="SQL") + throw $this->createNotFoundException('Permission denied'); + // Récupération de l'enregistrement courant $data=$this->getData($id); @@ -340,7 +354,8 @@ class RegistrationController extends Controller if ($form->get('submit')->isClicked() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); $data = $form->getData(); - $appname = $this->getParameter('appname'); + + $appname = $this->get('session')->get('appname'); $noreply = $this->getParameter('noreply'); $keyterm = $this->getParameter('keyterm'); @@ -391,6 +406,11 @@ class RegistrationController extends Controller public function validationAction($key,Request $request) { + $moderegistration = $this->getParameter('moderegistration'); + $masteridentity = $this->getParameter('masteridentity'); + if($moderegistration=="none"||$masteridentity!="SQL") + throw $this->createNotFoundException('Permission denied'); + $now=new \DateTime(); $em = $this->getDoctrine()->getManager(); @@ -464,6 +484,11 @@ class RegistrationController extends Controller public function deleteAction($id,Request $request) { + $moderegistration = $this->getParameter('moderegistration'); + $masteridentity = $this->getParameter('masteridentity'); + if($moderegistration=="none"||$masteridentity!="SQL") + throw $this->createNotFoundException('Permission denied'); + // Récupération de l'enregistrement courant $data=$this->getData($id); @@ -497,6 +522,11 @@ class RegistrationController extends Controller public function resetpwd01Action(Request $request) { + $moderegistration = $this->getParameter('moderegistration'); + $masteridentity = $this->getParameter('masteridentity'); + if($moderegistration=="none"||$masteridentity!="SQL") + throw $this->createNotFoundException('Permission denied'); + // Création du formulaire $form = $this->createForm(ResetpwdType::class,null,array("mode"=>"resetpwd01")); @@ -526,7 +556,7 @@ class RegistrationController extends Controller // Sur validation if ($form->get('submit')->isClicked() && $form->isValid()) { - $appname = $this->getParameter('appname'); + $appname = $this->get('session')->get('appname'); $noreply = $this->getParameter('noreply'); $keyterm = $this->getParameter('keyterm'); @@ -578,6 +608,11 @@ class RegistrationController extends Controller public function resetpwd02Action($key,Request $request) { + $moderegistration = $this->getParameter('moderegistration'); + $masteridentity = $this->getParameter('masteridentity'); + if($moderegistration=="none"||$masteridentity!="SQL") + throw $this->createNotFoundException('Permission denied'); + $now=new \DateTime(); $em = $this->getDoctrine()->getManager(); @@ -714,7 +749,7 @@ class RegistrationController extends Controller } // On s'assure que le username ne contient pas des caractères speciaux - $string = preg_replace('~[^a-zA-Z0-9._-]~', '', $data->getUsername()); + $string = preg_replace('~[^@a-zA-Z0-9._-]~', '', $data->getUsername()); if($string!=$data->getUsername()) { $form->addError(new FormError('Caractères interdit dans votre login')); diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/SecurityController.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/SecurityController.php index 2bf802eb..72691168 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/SecurityController.php +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/SecurityController.php @@ -42,124 +42,23 @@ class SecurityController extends Controller 'error' => $error )); break; - - case "CAS": - // Création d'une instance de eolephpCAS - $myphpCAS = new \eolephpCAS(); - - if (__CAS_LOGOUT){ - if (method_exists($myphpCAS, 'eolelogoutRequests')){ - $myphpCAS->eolelogoutRequests(false); - } - } - - if (__CAS_VALIDER_CA) { - $myphpCAS->setCasServerCACert(__CAS_CA_LOCATION); // verification par rapport a la CA - } else { - if (method_exists("EolephpCAS", "setNoCasServerValidation")){ - $myphpCAS->setNoCasServerValidation(); - } - } - - $myphpCAS->forceAuthentication(); - $username = $myphpCAS->getUser(); - $details = $myphpCAS->getDetails(); - if(!isset($details["utilisateur"])&&isset($details["attributes"])) { - $details["utilisateur"]=$details["attributes"]; - } - - $em = $this->getDoctrine()->getManager(); - $user = $em->getRepository('CadolesCoreBundle:User')->findOneBy(array("username"=>$username)); - $em = $this->getDoctrine()->getManager(); - - // Autosubmit - if (!$user) { - $niveau01=$em->getRepository('CadolesCoreBundle:Niveau01')->findOneBy(array("id"=>-100)); - $user = new User(); - $user->setUsername($username); - $user->setPassword("CASPWD-".$username); - $user->setSalt("CASPWD-".$username); - $user->setNiveau01($niveau01); - $user->setSiren($user->getNiveau01()->getSiren()); - $user->setSiret($user->getNiveau02()!==null?$user->getNiveau02()->getSiret():""); - $user->setEmail($details["utilisateur"]["email"][0]); - $user->setAvatar("noavatar.png"); - $user->setVisible(true); - $user->setAuthlevel("simple"); - $user->setRole("ROLE_USER"); - } - - // Autoupdate - $user->setFirstname($details["utilisateur"]["firstname"][0]); - $user->setLastname($details["utilisateur"]["lastname"][0]); - $user->setEmail($details["utilisateur"]["email"][0]); - - $em->persist($user); - $em->flush(); - - // Autoconnexion - // Récupérer le token de l'utilisateur - $token = new UsernamePasswordToken($user, null, "main", $user->getRoles()); - $this->get("security.token_storage")->setToken($token); - - // Simuler l'evenement de connexion - $event = new InteractiveLoginEvent($request, $token); - $dispatcher = new EventDispatcher(); - $dispatcher->dispatch("security.interactive_login", $event); - - // Aller sur la page souhaitée au départ - if(empty($targetpath)) { - $targetpath="\\".$this->getParameter('alias'); - return $this->redirect($targetpath); - } - else { - return $this->redirect($targetpath); - } - break; } } public function logoutAction(Request $request) { - /* - return $this->render('Security:logout.html.twig'); $this->get('security.context')->setToken(null); $this->get('request')->getSession()->invalidate(); - - - return $this->render('Security:logout.html.twig'); - */ } public function killAction(Request $request) { - if(isset($_GET["redirect"])) { - /* - $redirect=$_GET["redirect"]; - $alias=$this->getParameter('alias'); - $url=str_replace("/".$alias."/kill?redirect=".$redirect,"",urldecode($request->getUri())); - $url.=$redirect; - */ - $url=str_replace("kill","killall",urldecode($request->getUri())); + $session = new Session(); + if($this->getParameter("auth_mode")=="SAML") { + $samlLogout = $this->getParameter("saml_logout_url"); + return $this->redirect($samlLogout); } - else $url = str_replace("/kill","",$request->getUri()); - - // Création d'une instance de eolephpCAS - $myphpCAS = new \eolephpCAS(); - - if (__CAS_VALIDER_CA) { - $myphpCAS->setCasServerCACert(__CAS_CA_LOCATION); // verification par rapport a la CA - } else { - if (method_exists("EolephpCAS", "setNoCasServerValidation")){ - $myphpCAS->setNoCasServerValidation(); - } - } - - $myphpCAS->logout(array("service"=>$url)); - } - - public function killallAction(Request $request) { - $redirect=$_GET["redirect"]; - return $this->render('CadolesCoreBundle:Security:logout.html.twig', array('redirect' => $redirect)); + else + return $this->redirectToRoute("myapp_webzine_home"); } } diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/UserController.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/UserController.php index 10dd3881..bee34a62 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/UserController.php +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Controller/UserController.php @@ -9,6 +9,12 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\Form\FormError; +use Symfony\Bundle\FrameworkBundle\Console\Application; +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Output\BufferedOutput; +use Symfony\Component\Console\Output\OutputInterface; + + use Cadoles\CoreBundle\Entity\User; use Cadoles\CoreBundle\Entity\UserGroup; use Cadoles\CoreBundle\Entity\UserModo; @@ -43,11 +49,10 @@ class UserController extends Controller $order= $request->query->get('order'); $viewniveau02=$this->getParameter('viewniveau02'); - // Nombre total d'enregistrement // Nombre total d'enregistrement if($this->isGranted('ROLE_ADMIN')) $total = $em->createQueryBuilder()->select('COUNT(user)')->from($this->labelentity,'user')->getQuery()->getSingleScalarResult(); - else { + elseif($this->isGranted('ROLE_MODO')) { $usermodo=$this->get('security.token_storage')->getToken()->getUser()->getId(); $total = $em->createQueryBuilder() ->select('COUNT(user)') @@ -58,6 +63,15 @@ class UserController extends Controller ->setParameter("userid", $usermodo) ->getQuery()->getSingleScalarResult(); } + elseif($this->isGranted('ROLE_USER')) { + $niveau01=$this->get('security.token_storage')->getToken()->getUser()->getNiveau01(); + $total = $em->createQueryBuilder() + ->select('COUNT(user)') + ->from($this->labelentity,'user') + ->where("user.niveau01 = :niveau01") + ->setParameter("niveau01", $niveau01) + ->getQuery()->getSingleScalarResult(); + } // Nombre d'enregistrement filtré if($search["value"]=="") @@ -73,7 +87,7 @@ class UserController extends Controller ->setParameter("value", "%".$search["value"]."%") ->getQuery() ->getSingleScalarResult(); - else + elseif($this->isGranted('ROLE_MODO')) $totalf= $em->createQueryBuilder() ->select('COUNT(user)') ->from('CadolesCoreBundle:User','user') @@ -87,7 +101,18 @@ class UserController extends Controller ->setParameter("value", "%".$search["value"]."%") ->getQuery() ->getSingleScalarResult(); - + elseif($this->isGranted('ROLE_USER')) + $totalf= $em->createQueryBuilder() + ->select('COUNT(user)') + ->from('CadolesCoreBundle:User','user') + ->from('CadolesCoreBundle:Niveau01', 'niveau01') + ->where('user.niveau01=niveau01.id') + ->andWhere('user.username LIKE :value OR user.firstname LIKE :value OR user.lastname LIKE :value OR user.email LIKE :value OR user.role LIKE :value OR niveau01.label LIKE :value') + ->andWhere("user.niveau01 = :niveau01") + ->setParameter("niveau01", $niveau01) + ->setParameter("value", "%".$search["value"]."%") + ->getQuery() + ->getSingleScalarResult(); } // Construction du tableau de retour @@ -104,13 +129,19 @@ class UserController extends Controller $qb->select('user')->from($this->labelentity,'user')->from('CadolesCoreBundle:Niveau01','niveau01'); $qb->where('user.niveau01=niveau01.id'); } - else { + elseif($this->isGranted('ROLE_MODO')) { $qb->select('user')->from($this->labelentity,'user')->from('CadolesCoreBundle:Niveau01','niveau01')->from('CadolesCoreBundle:UserModo', 'usermodo'); $qb->where('user.niveau01=niveau01.id') ->andwhere("usermodo.niveau01 = user.niveau01") ->andWhere("usermodo.user = :userid") ->setParameter("userid", $usermodo); } + elseif($this->isGranted('ROLE_USER')) { + $qb->select('user')->from($this->labelentity,'user')->from('CadolesCoreBundle:Niveau01','niveau01'); + $qb->where('user.niveau01=niveau01.id') + ->andwhere("user.niveau01 = :niveau01") + ->setParameter("niveau01", $niveau01); + } if($search["value"]!="") { $qb ->andWhere('user.username LIKE :value OR user.firstname LIKE :value OR user.lastname LIKE :value OR user.email LIKE :value OR user.role LIKE :value OR niveau01.label LIKE :value') @@ -179,7 +210,7 @@ class UserController extends Controller $action = ""; if($access=="config") { $action.="$data->getId()))."'>"; - if($data->getId()>0) { + if($data->getId()>0&&$this->GetParameter("masteridentity")!="LDAP") { $action.="$data->getId()))."'>"; } } @@ -192,7 +223,7 @@ class UserController extends Controller $tmp=array(); if($access=="config") array_push($tmp,$action); - array_push($tmp,"getAvatar()."' style='width:30px;background-color:#337ab7;margin:auto;display:block;'>"); + array_push($tmp,"getAvatar()."' class='avatar' style='margin:auto;display:block;'>"); array_push($tmp,$data->getUsername()); array_push($tmp,$data->getLastname()); array_push($tmp,$data->getFirstname()); @@ -211,11 +242,20 @@ class UserController extends Controller public function submitAction(Request $request) { + // Vérifier que l'on puisse créer + if($this->GetParameter("masteridentity")!="SQL") + throw $this->createNotFoundException('Permission denied'); + // Initialisation de l'enregistrement $data = new User(); // Création du formulaire - $form = $this->createForm(UserType::class,$data,array("mode"=>"submit","access"=>"config","perm"=>$this->isGranted('ROLE_ADMIN'),"userid"=>$this->get('security.token_storage')->getToken()->getUser()->getId())); + $form = $this->createForm(UserType::class,$data,array( + "mode"=>"submit", + "access"=>"config", + "perm"=>$this->isGranted('ROLE_ADMIN'),"userid"=>$this->get('security.token_storage')->getToken()->getUser()->getId(), + "masteridentity"=>$this->GetParameter("masteridentity") + )); // Récupération des data du formulaire $form->handleRequest($request); @@ -314,7 +354,13 @@ class UserController extends Controller // Vérifier que cet enregistrement est modifiable // Création du formulaire - $form = $this->createForm(UserType::class,$data,array("mode"=>"update","access"=>$access,"perm"=>($access=="config"?$this->isGranted('ROLE_ADMIN'):false),"userid"=>$this->get('security.token_storage')->getToken()->getUser()->getId())); + $form = $this->createForm(UserType::class,$data,array( + "mode"=>"update", + "access"=>$access, + "perm"=>($access=="config"?$this->isGranted('ROLE_ADMIN'):false), + "userid"=>$this->get('security.token_storage')->getToken()->getUser()->getId(), + "masteridentity"=>$this->GetParameter("masteridentity") + )); // Récupération des data du formulaire $form->handleRequest($request); @@ -414,7 +460,7 @@ class UserController extends Controller if($access=="config") return $this->redirectToRoute($this->labelroute); else - return $this->redirectToRoute("cadoles_core_refresh"); + return $this->redirectToRoute("cadoles_core_home"); } @@ -446,9 +492,17 @@ class UserController extends Controller } // Vérifier que cet enregistrement est supprimable + if($this->GetParameter("masteridentity")=="LDAP") + throw $this->createNotFoundException('Permission denied'); // Création du formulaire - $form = $this->createForm(UserType::class,$data,array("mode"=>"delete","access"=>"config","perm"=>false,"userid"=>$this->get('security.token_storage')->getToken()->getUser()->getId())); + $form = $this->createForm(UserType::class,$data,array( + "mode"=>"delete", + "access"=>"config", + "perm"=>false, + "userid"=>$this->get('security.token_storage')->getToken()->getUser()->getId(), + "masteridentity"=>$this->GetParameter("masteridentity") + )); // Récupération des data du formulaire $form->handleRequest($request); @@ -476,6 +530,28 @@ class UserController extends Controller )); } + public function syncAction(Request $request) + { + $kernel = $this->get('kernel'); + $application = new Application($kernel); + $application->setAutoExit(false); + + $input = new ArrayInput([ + 'command' => 'Core:Synchro', + 'simulate' => 'false', + ]); + + $output = new BufferedOutput(OutputInterface::VERBOSITY_NORMAL,false); + $application->run($input, $output); + $content = $output->fetch(); + + return $this->render('CadolesCoreBundle:Core:command.html.twig', array( + "title"=>"Synchronisation avec Annuaire", + "return_path"=>"cadoles_core_config_user", + "content"=>$content + )); + } + public function profilAction(Request $request) { $user = $this->get('security.token_storage')->getToken()->getUser(); @@ -523,8 +599,10 @@ class UserController extends Controller $qb->select('b')->from('CadolesCoreBundle:Group','b'); if($access!="config") $qb->where("b.fgopen=true"); - + $qb->andWhere("b.ldapfilter IS NULL"); + $qb->andWhere("b.attributes IS NULL"); $datas=$qb->getQuery()->getResult(); + return $datas; } @@ -550,7 +628,7 @@ class UserController extends Controller } // On s'assure que le username ne contient pas des caractères speciaux - $string = preg_replace('~[^a-zA-Z0-9._-]~', '', $data->getUsername()); + $string = preg_replace('~[^@a-zA-Z0-9._-]~', '', $data->getUsername()); if($string!=$data->getUsername()) { $form->addError(new FormError('Caractères interdit dans votre login')); diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Config.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Config.php new file mode 100644 index 00000000..0dcd41cc --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Config.php @@ -0,0 +1,322 @@ +id; + } + + /** + * Set key + * + * @param string $key + * + * @return Config + */ + public function setKey($key) + { + $this->key = $key; + + return $this; + } + + /** + * Get key + * + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Set value + * + * @param string $value + * + * @return Config + */ + public function setValue($value) + { + $this->value = $value; + + return $this; + } + + /** + * Get value + * + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Set order + * + * @param integer $order + * + * @return Config + */ + public function setOrder($order) + { + $this->order = $order; + + return $this; + } + + /** + * Get order + * + * @return integer + */ + public function getOrder() + { + return $this->order; + } + + /** + * Set visible + * + * @param boolean $visible + * + * @return Config + */ + public function setVisible($visible) + { + $this->visible = $visible; + + return $this; + } + + /** + * Get visible + * + * @return boolean + */ + public function getVisible() + { + return $this->visible; + } + + /** + * Set type + * + * @param string $type + * + * @return Config + */ + public function setType($type) + { + $this->type = $type; + + return $this; + } + + /** + * Get type + * + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Set id + * + * @param string $id + * + * @return Config + */ + public function setId($id) + { + $this->id = $id; + + return $this; + } + + /** + * Set changeable + * + * @param boolean $changeable + * + * @return Config + */ + public function setChangeable($changeable) + { + $this->changeable = $changeable; + + return $this; + } + + /** + * Get changeable + * + * @return boolean + */ + public function getChangeable() + { + return $this->changeable; + } + + /** + * Set required + * + * @param boolean $required + * + * @return Config + */ + public function setRequired($required) + { + $this->required = $required; + + return $this; + } + + /** + * Get required + * + * @return boolean + */ + public function getRequired() + { + return $this->required; + } + + /** + * Set group + * + * @param string $group + * + * @return Config + */ + public function setGroup($group) + { + $this->group = $group; + + return $this; + } + + /** + * Get group + * + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Set help + * + * @param string $help + * + * @return Config + */ + public function setHelp($help) + { + $this->help = $help; + + return $this; + } + + /** + * Get help + * + * @return string + */ + public function getHelp() + { + return $this->help; + } + + /** + * Set grouped + * + * @param string $grouped + * + * @return Config + */ + public function setGrouped($grouped) + { + $this->grouped = $grouped; + + return $this; + } + + /** + * Get grouped + * + * @return string + */ + public function getGrouped() + { + return $this->grouped; + } +} diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Config.php~ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Config.php~ new file mode 100644 index 00000000..0dcd41cc --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Config.php~ @@ -0,0 +1,322 @@ +id; + } + + /** + * Set key + * + * @param string $key + * + * @return Config + */ + public function setKey($key) + { + $this->key = $key; + + return $this; + } + + /** + * Get key + * + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Set value + * + * @param string $value + * + * @return Config + */ + public function setValue($value) + { + $this->value = $value; + + return $this; + } + + /** + * Get value + * + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Set order + * + * @param integer $order + * + * @return Config + */ + public function setOrder($order) + { + $this->order = $order; + + return $this; + } + + /** + * Get order + * + * @return integer + */ + public function getOrder() + { + return $this->order; + } + + /** + * Set visible + * + * @param boolean $visible + * + * @return Config + */ + public function setVisible($visible) + { + $this->visible = $visible; + + return $this; + } + + /** + * Get visible + * + * @return boolean + */ + public function getVisible() + { + return $this->visible; + } + + /** + * Set type + * + * @param string $type + * + * @return Config + */ + public function setType($type) + { + $this->type = $type; + + return $this; + } + + /** + * Get type + * + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Set id + * + * @param string $id + * + * @return Config + */ + public function setId($id) + { + $this->id = $id; + + return $this; + } + + /** + * Set changeable + * + * @param boolean $changeable + * + * @return Config + */ + public function setChangeable($changeable) + { + $this->changeable = $changeable; + + return $this; + } + + /** + * Get changeable + * + * @return boolean + */ + public function getChangeable() + { + return $this->changeable; + } + + /** + * Set required + * + * @param boolean $required + * + * @return Config + */ + public function setRequired($required) + { + $this->required = $required; + + return $this; + } + + /** + * Get required + * + * @return boolean + */ + public function getRequired() + { + return $this->required; + } + + /** + * Set group + * + * @param string $group + * + * @return Config + */ + public function setGroup($group) + { + $this->group = $group; + + return $this; + } + + /** + * Get group + * + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Set help + * + * @param string $help + * + * @return Config + */ + public function setHelp($help) + { + $this->help = $help; + + return $this; + } + + /** + * Get help + * + * @return string + */ + public function getHelp() + { + return $this->help; + } + + /** + * Set grouped + * + * @param string $grouped + * + * @return Config + */ + public function setGrouped($grouped) + { + $this->grouped = $grouped; + + return $this; + } + + /** + * Get grouped + * + * @return string + */ + public function getGrouped() + { + return $this->grouped; + } +} diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Group.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Group.php index 2640930d..c3b4dd35 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Group.php +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Group.php @@ -12,7 +12,8 @@ use Symfony\Component\Validator\Constraints as Assert; * @ORM\Entity * @ORM\Table(name="groupe") * @ORM\HasLifecycleCallbacks() - * + * @ORM\Entity(repositoryClass="Cadoles\CoreBundle\Repository\GroupRepository") + * * @UniqueEntity(fields="label", message="Un group existe déjà avec ce label") */ class Group @@ -38,7 +39,22 @@ class Group * @ORM\Column(type="boolean") */ private $fgall; - + + /** + * @ORM\Column(type="boolean") + */ + private $fgtemplate; + + /** + * @ORM\Column(type="text", nullable=true) + */ + private $ldapfilter; + + /** + * @ORM\Column(type="text", nullable=true) + */ + private $attributes; + /** * @var ArrayCollection $users * @var UserGroup @@ -47,6 +63,8 @@ class Group */ private $users; + + /** * Constructor */ @@ -137,6 +155,78 @@ class Group return $this->fgall; } + /** + * Set fgtemplate + * + * @param boolean $fgtemplate + * + * @return Group + */ + public function setFgtemplate($fgtemplate) + { + $this->fgtemplate = $fgtemplate; + + return $this; + } + + /** + * Get fgtemplate + * + * @return boolean + */ + public function getFgtemplate() + { + return $this->fgtemplate; + } + + /** + * Set ldapfilter + * + * @param string $ldapfilter + * + * @return Group + */ + public function setLdapfilter($ldapfilter) + { + $this->ldapfilter = $ldapfilter; + + return $this; + } + + /** + * Get ldapfilter + * + * @return string + */ + public function getLdapfilter() + { + return $this->ldapfilter; + } + + /** + * Set attributes + * + * @param string $attributes + * + * @return Group + */ + public function setAttributes($attributes) + { + $this->attributes = $attributes; + + return $this; + } + + /** + * Get attributes + * + * @return string + */ + public function getAttributes() + { + return $this->attributes; + } + /** * Add user * diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Group.php~ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Group.php~ index 2640930d..659aa9e5 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Group.php~ +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Group.php~ @@ -38,7 +38,22 @@ class Group * @ORM\Column(type="boolean") */ private $fgall; - + + /** + * @ORM\Column(type="boolean") + */ + private $fgtemplate; + + /** + * @ORM\Column(type="text", nullable=true) + */ + private $ldapfilter; + + /** + * @ORM\Column(type="text", nullable=true) + */ + private $attributes; + /** * @var ArrayCollection $users * @var UserGroup @@ -47,6 +62,8 @@ class Group */ private $users; + + /** * Constructor */ @@ -137,6 +154,78 @@ class Group return $this->fgall; } + /** + * Set fgtemplate + * + * @param boolean $fgtemplate + * + * @return Group + */ + public function setFgtemplate($fgtemplate) + { + $this->fgtemplate = $fgtemplate; + + return $this; + } + + /** + * Get fgtemplate + * + * @return boolean + */ + public function getFgtemplate() + { + return $this->fgtemplate; + } + + /** + * Set ldapfilter + * + * @param string $ldapfilter + * + * @return Group + */ + public function setLdapfilter($ldapfilter) + { + $this->ldapfilter = $ldapfilter; + + return $this; + } + + /** + * Get ldapfilter + * + * @return string + */ + public function getLdapfilter() + { + return $this->ldapfilter; + } + + /** + * Set attributes + * + * @param string $attributes + * + * @return Group + */ + public function setAttributes($attributes) + { + $this->attributes = $attributes; + + return $this; + } + + /** + * Get attributes + * + * @return string + */ + public function getAttributes() + { + return $this->attributes; + } + /** * Add user * diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Niveau01.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Niveau01.php index 8ba4a944..4af01f8d 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Niveau01.php +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Niveau01.php @@ -12,7 +12,8 @@ use Symfony\Component\Validator\Constraints as Assert; * @ORM\Entity * @ORM\Table(name="niveau01") * @ORM\HasLifecycleCallbacks() - * + * @ORM\Entity(repositoryClass="Cadoles\CoreBundle\Repository\Niveau01Repository") + * * @UniqueEntity(fields="label", message="Un Niveau de rang 1 existe déjà avec ce label") */ class Niveau01 @@ -34,6 +35,16 @@ class Niveau01 */ private $siren; + /** + * @ORM\Column(type="text", nullable=true) + */ + private $ldapfilter; + + /** + * @ORM\Column(type="text", nullable=true) + */ + private $attributes; + /** * @var ArrayCollection $niveau02s * @var Registration @@ -65,7 +76,8 @@ class Niveau01 * @ORM\OneToMany(targetEntity="UserModo", mappedBy="service", cascade={"persist"}, orphanRemoval=false) */ private $modos; - + + /** * Constructor */ @@ -74,6 +86,7 @@ class Niveau01 $this->niveau02s = new \Doctrine\Common\Collections\ArrayCollection(); $this->registrations = new \Doctrine\Common\Collections\ArrayCollection(); $this->users = new \Doctrine\Common\Collections\ArrayCollection(); + $this->modos = new \Doctrine\Common\Collections\ArrayCollection(); } /** @@ -134,6 +147,54 @@ class Niveau01 return $this->siren; } + /** + * Set ldapfilter + * + * @param string $ldapfilter + * + * @return Niveau01 + */ + public function setLdapfilter($ldapfilter) + { + $this->ldapfilter = $ldapfilter; + + return $this; + } + + /** + * Get ldapfilter + * + * @return string + */ + public function getLdapfilter() + { + return $this->ldapfilter; + } + + /** + * Set attributes + * + * @param string $attributes + * + * @return Niveau01 + */ + public function setAttributes($attributes) + { + $this->attributes = $attributes; + + return $this; + } + + /** + * Get attributes + * + * @return string + */ + public function getAttributes() + { + return $this->attributes; + } + /** * Add niveau02 * diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Niveau01.php~ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Niveau01.php~ index 8ba4a944..4af01f8d 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Niveau01.php~ +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/Niveau01.php~ @@ -12,7 +12,8 @@ use Symfony\Component\Validator\Constraints as Assert; * @ORM\Entity * @ORM\Table(name="niveau01") * @ORM\HasLifecycleCallbacks() - * + * @ORM\Entity(repositoryClass="Cadoles\CoreBundle\Repository\Niveau01Repository") + * * @UniqueEntity(fields="label", message="Un Niveau de rang 1 existe déjà avec ce label") */ class Niveau01 @@ -34,6 +35,16 @@ class Niveau01 */ private $siren; + /** + * @ORM\Column(type="text", nullable=true) + */ + private $ldapfilter; + + /** + * @ORM\Column(type="text", nullable=true) + */ + private $attributes; + /** * @var ArrayCollection $niveau02s * @var Registration @@ -65,7 +76,8 @@ class Niveau01 * @ORM\OneToMany(targetEntity="UserModo", mappedBy="service", cascade={"persist"}, orphanRemoval=false) */ private $modos; - + + /** * Constructor */ @@ -74,6 +86,7 @@ class Niveau01 $this->niveau02s = new \Doctrine\Common\Collections\ArrayCollection(); $this->registrations = new \Doctrine\Common\Collections\ArrayCollection(); $this->users = new \Doctrine\Common\Collections\ArrayCollection(); + $this->modos = new \Doctrine\Common\Collections\ArrayCollection(); } /** @@ -134,6 +147,54 @@ class Niveau01 return $this->siren; } + /** + * Set ldapfilter + * + * @param string $ldapfilter + * + * @return Niveau01 + */ + public function setLdapfilter($ldapfilter) + { + $this->ldapfilter = $ldapfilter; + + return $this; + } + + /** + * Get ldapfilter + * + * @return string + */ + public function getLdapfilter() + { + return $this->ldapfilter; + } + + /** + * Set attributes + * + * @param string $attributes + * + * @return Niveau01 + */ + public function setAttributes($attributes) + { + $this->attributes = $attributes; + + return $this; + } + + /** + * Get attributes + * + * @return string + */ + public function getAttributes() + { + return $this->attributes; + } + /** * Add niveau02 * diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/User.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/User.php index 858324ac..1d7d57d3 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/User.php +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/User.php @@ -28,7 +28,7 @@ class User implements UserInterface, \Serializable private $id; /** - * @ORM\Column(type="string", length=25, unique=true) + * @ORM\Column(type="string", length=50, unique=true) */ private $username; diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/User.php~ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/User.php~ index 3eb7c558..1d7d57d3 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/User.php~ +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Entity/User.php~ @@ -28,7 +28,7 @@ class User implements UserInterface, \Serializable private $id; /** - * @ORM\Column(type="string", length=25, unique=true) + * @ORM\Column(type="string", length=50, unique=true) */ private $username; @@ -908,4 +908,52 @@ class User implements UserInterface, \Serializable { return $this->modos; } + + /** + * Set keyexpire + * + * @param \DateTime $keyexpire + * + * @return User + */ + public function setKeyexpire($keyexpire) + { + $this->keyexpire = $keyexpire; + + return $this; + } + + /** + * Get keyexpire + * + * @return \DateTime + */ + public function getKeyexpire() + { + return $this->keyexpire; + } + + /** + * Set keyvalue + * + * @param string $keyvalue + * + * @return User + */ + public function setKeyvalue($keyvalue) + { + $this->keyvalue = $keyvalue; + + return $this; + } + + /** + * Get keyvalue + * + * @return string + */ + public function getKeyvalue() + { + return $this->keyvalue; + } } diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/EventListener/sessionListener.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/EventListener/sessionListener.php index 1f2c09a5..f836ade7 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/EventListener/sessionListener.php +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/EventListener/sessionListener.php @@ -38,6 +38,10 @@ public function onDomainParse(Event $event) { $session = new Session(); + $configs = $this->em->getRepository("CadolesCoreBundle:Config")->findAll(); + foreach($configs as $config) { + $session->set($config->getId(), $config->getValue()); + } // Calcul des couleurs $color = $this->container->get('cadoles.core.service.color'); @@ -53,22 +57,29 @@ if($curentuser=="anon.") $roles=""; else $roles=$curentuser->getRoles(); + // Masteridentity + $masteridentity =$this->container->getParameter('masteridentity'); + $session->set('masteridentity',$masteridentity); + // Chargement de la sidebar $iconniveau01 =$this->container->getParameter('iconniveau01'); $labelsniveau01 =$this->container->getParameter('labelsniveau01'); $labelniveau01 =$this->container->getParameter('labelsniveau01'); $session->set('labelniveau01',$labelniveau01); + $viewniveau02 =$this->container->getParameter('viewniveau02'); $iconniveau02 =$this->container->getParameter('iconniveau02'); $labelsniveau02 =$this->container->getParameter('labelsniveau02'); $labelniveau02 =$this->container->getParameter('labelsniveau02'); $session->set('labelniveau02',$labelniveau02); $moderegistration =$this->container->getParameter('moderegistration'); + if($masteridentity!="SQL") $moderegistration="none"; $sidebar=array(); $nvs1 = $this->em->getRepository("CadolesCoreBundle:Sidebar")->findBy(array('parent'=> NULL), array('roworder' => 'ASC')); foreach($nvs1 as $nv1) { + if($this->haveRole($roles,$nv1->getPermission())) { $sidebar[$nv1->getRoworder()] = array( "fonticon" => $nv1->getFonticon(), @@ -81,8 +92,12 @@ $sidebar[$nv1->getRoworder()]["fonticon"]=$iconniveau01; } if($nv1->getPath()=="cadoles_core_config_niveau02") { - $sidebar[$nv1->getRoworder()]["label"]=$labelsniveau02; - $sidebar[$nv1->getRoworder()]["fonticon"]=$iconniveau02; + if(!$viewniveau02) + unset($sidebar[$nv1->getRoworder()]); + else { + $sidebar[$nv1->getRoworder()]["label"]=$labelsniveau02; + $sidebar[$nv1->getRoworder()]["fonticon"]=$iconniveau02; + } } if($nv1->getPath()=="cadoles_core_config_whitelist") { if($moderegistration=="none") @@ -102,8 +117,12 @@ $sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["fonticon"]=$iconniveau01; } if($nv2->getPath()=="cadoles_core_config_niveau02") { - $sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["label"]=$labelsniveau02; - $sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["fonticon"]=$iconniveau02; + if(!$viewniveau02) + unset($sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]); + else { + $sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["label"]=$labelsniveau02; + $sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["fonticon"]=$iconniveau02; + } } if($nv2->getPath()=="cadoles_core_config_whitelist") { if($moderegistration=="none") @@ -123,8 +142,12 @@ $sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["childs"][$nv3->getRoworder()]["fonticon"]=$iconniveau01; } if($nv3->getPath()=="cadoles_core_config_niveau02") { - $sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["childs"][$nv3->getRoworder()]["label"]=$labelsniveau02; - $sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["childs"][$nv3->getRoworder()]["fonticon"]=$iconniveau02; + if(!$viewniveau02) + unset($sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["childs"][$nv3->getRoworder()]); + else { + $sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["childs"][$nv3->getRoworder()]["label"]=$labelsniveau02; + $sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["childs"][$nv3->getRoworder()]["fonticon"]=$iconniveau02; + } } if($nv3->getPath()=="cadoles_core_config_whitelist") { if($moderegistration=="none"||$moderegistration=="byuser") @@ -142,31 +165,5 @@ } } $session->set('sidebar', $sidebar); - - // CAS et non appel Ajax - $request=$event->getRequest(); - if(!$request->isXmlHttpRequest()) { - // Création d'une instance de eolephpCAS - $myphpCAS = new \eolephpCAS(); - - // Déclaration du client - if(!$myphpCAS->EoleTestphpCAS()) { - $myphpCAS->client(__CAS_VERSION, __CAS_SERVER, __CAS_PORT, __CAS_FOLDER, false); - } - - if (__CAS_LOGOUT){ - if (method_exists($myphpCAS, 'eolelogoutRequests')){ - $myphpCAS->eolelogoutRequests(false); - } - } - - if (__CAS_VALIDER_CA) { - $myphpCAS->setCasServerCACert(__CAS_CA_LOCATION); // verification par rapport a la CA - } else { - if (method_exists("EolephpCAS", "setNoCasServerValidation")){ - $myphpCAS->setNoCasServerValidation(); - } - } - } } } diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/EventListener/uploadListener.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/EventListener/uploadListener.php index 075dbe50..97e7e728 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/EventListener/uploadListener.php +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/EventListener/uploadListener.php @@ -90,6 +90,13 @@ class uploadListener $session = new Session(); $session->set('uploadavatar', $filename); break; + + default: + $file=$event->getFile(); + $filename=$file->getFilename(); + $response = $event->getResponse(); + $response['file'] = $filename; + break; } } } diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Form/ConfigType.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Form/ConfigType.php new file mode 100644 index 00000000..e8cdcedd --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Form/ConfigType.php @@ -0,0 +1,142 @@ +getFlashBag()->clear(); + + $config = $session->get('configs'); + + $builder->add('submit', + SubmitType::class, + array("label" => "Valider", + "attr" => array("class" => "btn btn-success"))); + + $builder->add('id', + TextType::class, + array("label" =>"Clé", + "label_attr" => array("style" => 'margin-top:15px;'), + "attr" => array("class" => "form-control"), + 'disabled' => true)); + + switch($options["type"]) { + case "string": + $builder->add('value', + TextType::class, + array("label" => "Valeur", + "label_attr" => array("style" => 'margin-top:15px;'), + "attr" => array("class" => "form-control"), + 'required' => ($options["required"]==0?false:true))); + break; + + case "integer": + $builder->add('value', + IntegerType::class, + array("label" => "Valeur", + "label_attr" => array("style" => 'margin-top:15px;'), + "attr" => array("class" => "form-control"), + 'required' => ($options["required"]==0?false:true))); + break; + + case "boolean": + if($options["key"]=="LDAPactivate"&&$config["authentication"]=="LDAP") { + $session->getFlashBag()->add("notice", "Impossible de désactiver LDAP car votre mode d'authentification est LDAP"); + $choices=array("oui" => "1"); + } + else + $choices=array("oui" => "1","non" => "0"); + + $builder->add("value", ChoiceType::class, + array("label" =>"Valeur", + "label_attr" => array("style" => 'margin-top:15px;'), + "attr" => array("class" => "form-control"), + 'required' => ($options["required"]==0?false:true), + "choices" => $choices)); + break; + + case "font": + $choices=array( + "Helvetica" => "Helvetica", + "Peacesans" => "Peacesans", + "Acme-Regular" => "Acme-Regular", + "Redressed" => "Redressed", + "Roboto-Regular" => "Roboto-Regular", + "Justanotherhand-Regular" => "Justanotherhand-Regular", + + ); + + $builder->add("value", ChoiceType::class, + array("label" =>"Valeur", + "label_attr" => array("style" => 'margin-top:15px;'), + "attr" => array("class" => "form-control"), + 'required' => ($options["required"]==0?false:true), + "choices" => $choices)); + break; + + case "editor": + $builder->add('value', CKEditorType::class, + array("config_name" => 'medium_config', + "required" => ($options["required"]==0?false:true), + "config" => array("height" => "250px"))); + + break; + + case "logo": + $builder->add('value',HiddenType::class); + break; + + case "header": + $builder->add('value',HiddenType::class); + break; + + case "color": + $builder->add('value', + TextType::class, + array("label" => "Valeur", + "label_attr" => array("style" => 'margin-top:15px;'), + "attr" => array("class" => "pick-a-color form-control"), + 'required' => ($options["required"]==0?false:true))); + break; + } + + $builder->add('help', + TextareaType::class, + array("label" =>"Aide", + "attr" => array("class" => "form-control", "style" => "margin-top:15px; height: 200px;"), + 'required' => false, + 'disabled' => true)); + } + + /** + * {@inheritdoc} + */ + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults(array( + 'data_class' => 'Cadoles\CoreBundle\Entity\Config', + 'key' => "string", + 'type' => "string", + 'required' => "string", + )); + } +} diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Form/GroupType.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Form/GroupType.php index 3e39b58f..7badbdbb 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Form/GroupType.php +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Form/GroupType.php @@ -6,6 +6,7 @@ use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Form\Extension\Core\Type\EmailType; use Symfony\Component\Form\Extension\Core\Type\TextType; +use Symfony\Component\Form\Extension\Core\Type\TextareaType; use Symfony\Component\Form\Extension\Core\Type\RepeatedType; use Symfony\Component\Form\Extension\Core\Type\PasswordType; use Symfony\Component\Form\Extension\Core\Type\HiddenType; @@ -45,14 +46,64 @@ class GroupType extends AbstractType "attr" => array("class" => "form-control", "style" => "margin-bottom:15px"), "choices" => $choices ) - ); + ); + + // Si masteridentity = LDAP alors on demande le filtre des utilisateurs qui appartiennent à ce groupe + if($options["masteridentity"]=="LDAP") + { + $choices=array("oui" => "1","non" => "0"); + $builder->add("fgassoc", + ChoiceType::class,array( + "mapped" => false, + "label" => "Groupe associé à l'annuaire ?", + 'disabled' => ($options["mode"]=="delete"?true:false), + "attr" => array("class" => "form-control", "style" => "margin-bottom:15px"), + "choices" => $choices + ) + ); + + $builder->add('ldapfilter', + TextType::class, array( + "label" => "Filtre LDAP des utilisateurs", + "label_attr" => array("id" => "label_group_ldapfilter"), + "disabled" => ($options["mode"]=="delete"?true:false), + "required" => false, + "attr" => array("class" => "form-control", "style" => "margin-bottom:15px") + ) + ); + } + + if($options["masteridentity"]=="SSO") + { + $choices=array("oui" => "1","non" => "0"); + $builder->add("fgassoc", + ChoiceType::class,array( + "mapped" => false, + "label" => "Groupe associé à des attributs SSO ?", + 'disabled' => ($options["mode"]=="delete"?true:false), + "attr" => array("class" => "form-control", "style" => "margin-bottom:15px"), + "choices" => $choices + ) + ); + + $builder->add('attributes', + TextareaType::class, array( + "label" => "Attributs SSO des utilisateurs", + "label_attr" => array("id" => "label_group_attributes"), + "disabled" => ($options["mode"]=="delete"?true:false), + "required" => false, + "attr" => array("rows" => 10, "class" => "form-control", "style" => "margin-bottom:15px") + ) + ); + } } public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults(array( 'data_class' => 'Cadoles\CoreBundle\Entity\Group', - 'mode' => "string" + 'mode' => "string", + 'masteridentity' => "string" )); } } diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Form/Niveau01Type.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Form/Niveau01Type.php index e75f20ed..2a1e1b0a 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Form/Niveau01Type.php +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Form/Niveau01Type.php @@ -6,6 +6,7 @@ use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Form\Extension\Core\Type\EmailType; use Symfony\Component\Form\Extension\Core\Type\TextType; +use Symfony\Component\Form\Extension\Core\Type\TextareaType; use Symfony\Component\Form\Extension\Core\Type\RepeatedType; use Symfony\Component\Form\Extension\Core\Type\PasswordType; use Symfony\Component\Form\Extension\Core\Type\HiddenType; @@ -38,18 +39,44 @@ class Niveau01Type extends AbstractType $builder->add('siren', TextType::class, array( - "label" =>"SIREN", + "label" => $options["labelsiren"], "disabled" => ($options["mode"]=="delete"?true:false), "attr" => array("class" => "form-control", "style" => "margin-bottom:15px") ) - ); + ); + + // Si masteridentity = LDAP alors on demande obligatoirement le filtre des utilisateurs qui appartiennent à ce niveau01 + if($options["masteridentity"]=="LDAP") + { + $builder->add('ldapfilter', + TextType::class, array( + "label" => "Filtre LDAP des utilisateurs", + "disabled" => ($options["mode"]=="delete"?true:false), + "attr" => array("class" => "form-control", "style" => "margin-bottom:15px") + ) + ); + } + + if($options["masteridentity"]=="SSO") + { + $builder->add('attributes', + TextareaType::class, array( + "label" => "Attributs SSO des utilisateurs", + "disabled" => ($options["mode"]=="delete"?true:false), + "attr" => array("rows" => 10, "class" => "form-control", "style" => "margin-bottom:15px") + ) + ); + } + } public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults(array( 'data_class' => 'Cadoles\CoreBundle\Entity\Niveau01', - 'mode' => "string" + 'mode' => "string", + 'labelsiren' => "string", + 'masteridentity' => "string" )); } } diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Form/UserType.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Form/UserType.php index fc65c227..4ae26e54 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Form/UserType.php +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Form/UserType.php @@ -47,7 +47,7 @@ class UserType extends AbstractType $builder->add('firstname', TextType::class, array( "label" =>"Prénom", - "disabled" => ($options["mode"]=="delete"?true:false), + "disabled" => ($options["mode"]=="delete"||$options["masteridentity"]!="SQL"?true:false), "attr" => array("class" => "form-control", "style" => "margin-bottom:15px") ) ); @@ -55,7 +55,7 @@ class UserType extends AbstractType $builder->add('lastname', TextType::class, array( "label" =>"Nom", - "disabled" => ($options["mode"]=="delete"?true:false), + "disabled" => ($options["mode"]=="delete"||$options["masteridentity"]!="SQL"?true:false), "attr" => array("class" => "form-control", "style" => "margin-bottom:15px") ) ); @@ -63,7 +63,7 @@ class UserType extends AbstractType $builder->add('email', EmailType::class, array( "label" =>"Mail", - "disabled" => ($options["mode"]=="delete"||$options["mode"]=="send"?true:false), + "disabled" => ($options["mode"]=="delete"||$options["mode"]=="send"||$options["masteridentity"]!="SQL"?true:false), "attr" => array("class" => "form-control", "style" => "margin-bottom:15px") ) ); @@ -114,12 +114,12 @@ class UserType extends AbstractType return $er->createQueryBuilder('niveau01'); } }, - "disabled" => ($options["mode"]=="delete"?true:false), + "disabled" => ($options["mode"]=="delete"||$options["masteridentity"]!="SQL"?true:false), "attr" => array("class" => "form-control", "style" => "margin-bottom:15px","readonly" => ($options["mode"]=="delete"?true:false)))); # Password - if($options["mode"]!="delete") { + if($options["mode"]!="delete"&&$options["masteridentity"]=="SQL") { $builder->add('password', RepeatedType::class, array( "type" => PasswordType::class, @@ -319,7 +319,8 @@ class UserType extends AbstractType 'mode' => "string", 'access' => "string", 'perm' => "boolean", - 'userid' => "integer" + 'userid' => "integer", + 'masteridentity' => "string" )); } } diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Repository/GroupRepository.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Repository/GroupRepository.php new file mode 100644 index 00000000..69ce83aa --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Repository/GroupRepository.php @@ -0,0 +1,71 @@ +_em->getRepository('CadolesCoreBundle:Group')->findAll(); + $retgroups= new ArrayCollection(); + foreach($groups as $group) { + if($group->getAttributes()) { + + $attgroup=json_decode($group->getAttributes(),true); + + foreach($attgroup as $key => $value) { + if(array_key_exists($key,$attruser)) { + if(is_array($value)) { + foreach($value as $val) { + if($val=="*") + $retgroups->add($group); + elseif($val==$attruser[$key]) + $retgroups->add($group); + } + } + elseif(array_key_exists($key,$attruser)) { + if($value=="*") + $retgroups->add($group); + elseif($value==$attruser[$key]) + $retgroups->add($group); + } + } + } + } + } + + // Pour chaque groupe de l'utilisateur + $usergroups=$user->getGroups(); + + // On le détache des groupes auxquelles il n'appartient plus + if($usergroups) { + foreach($usergroups as $usergroup) { + if($usergroup->getGroup()->getAttributes()!="") { + if(!$retgroups->contains($usergroup->getGroup())) { + $user->removeGroup($usergroup); + } + } + } + } + + // On attache le user aux groupes + foreach($retgroups as $retgroup) { + $usergroup=$this->_em->getRepository('CadolesCoreBundle:UserGroup')->findBy(["user"=>$user,"group"=>$retgroup]); + if(!$usergroup) { + $usergroup=new UserGroup(); + $usergroup->setUser($user); + $usergroup->setGroup($retgroup); + + $this->_em->persist($usergroup); + $this->_em->flush(); + } + } + + return $user; + } + +} diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Repository/Niveau01Repository.php b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Repository/Niveau01Repository.php new file mode 100644 index 00000000..b221d163 --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Repository/Niveau01Repository.php @@ -0,0 +1,40 @@ +_em->getRepository('CadolesCoreBundle:Niveau01')->findAll(); + foreach($niveau01s as $niveau01) { + if($niveau01->getAttributes()) { + + $attniveau=json_decode($niveau01->getAttributes(),true); + + foreach($attniveau as $key => $value) { + if(array_key_exists($key,$attruser)) { + if(is_array($value)) { + foreach($value as $val) { + if($val=="*") + return $niveau01; + elseif($val==$attruser[$key]) + return $niveau01; + } + } + else if(array_key_exists($key,$attruser)) { + if($value=="*") + return $niveau01; + elseif($value==$attruser[$key]) + return $niveau01; + } + } + } + } + } + + return false; + } + +} diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/config/routing.yml b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/config/routing.yml index b22b68b9..123e63a6 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/config/routing.yml +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/config/routing.yml @@ -14,16 +14,12 @@ cadoles_core_login: cadoles_core_logout: path: /logout - defaults: { _controller: CadolesCoreBundle:Security:logout } + defaults: { _controller: CadolesCoreBundle:Security:logout } cadoles_core_kill: path: /kill defaults: { _controller: CadolesCoreBundle:Security:kill } -cadoles_core_killall: - path: /killall - defaults: { _controller: CadolesCoreBundle:Security:killall } - #== Crop Image cadoles_core_crop01: path: /crop01 @@ -90,6 +86,27 @@ cadoles_core_config: path: /config/home defaults: { _controller: CadolesCoreBundle:Config:home } +#== Commun Config Commun +cadoles_core_config_commun: + path: /config/commun + defaults: { _controller: CadolesCoreBundle:Config:list } + +cadoles_core_config_commun_update: + path: /config/commun/update/{id} + defaults: { _controller: CadolesCoreBundle:Config:update } + +cadoles_core_config_commun_delete: + path: /config/commun/delete/{id} + defaults: { _controller: CadolesCoreBundle:Config:delete } + +cadoles_core_config_logo: + path: /config/commun/logo + defaults: { _controller: CadolesCoreBundle:Config:logo } + +cadoles_core_config_header: + path: /config/commun/header + defaults: { _controller: CadolesCoreBundle:Config:header } + #== Config Registration cadoles_core_config_registration: path: /config/registration @@ -124,6 +141,10 @@ cadoles_core_config_user_delete: path: /config/user/delete/{id} defaults: { _controller: CadolesCoreBundle:User:delete } +cadoles_core_config_user_sync: + path: /config/user/sync + defaults: { _controller: CadolesCoreBundle:User:sync } + cadoles_core_config_user_ajax_list: path: /config/user/ajax/list defaults: { _controller: CadolesCoreBundle:User:ajaxlist, access: config } diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/config/services.yml b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/config/services.yml index 6650c3ad..4bf12960 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/config/services.yml +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/config/services.yml @@ -77,14 +77,14 @@ services: - [setBaseNiveau01, ["%ldap_baseniveau01%"]] - [setBaseNiveau02, ["%ldap_baseniveau02%"]] - [setBaseGroup, ["%ldap_basegroup%"]] - - [setLdapSync, ["%ldap_sync%"]] + - [setLdapSync, ["%ldap_sync%","%masteridentity%"]] cadoles.core.service.eportail: class: Cadoles\CoreBundle\Service\eportailService arguments: - "@doctrine" calls: - - [setEportailSync, ["%eportail_sync%"]] + - [setEportailSync, ["%eportail_sync%","%masteridentity%"]] - [setLabelniveau01, ["%labelniveau01%"]] - [setLabelniveau02, ["%labelniveau02%"]] @@ -94,4 +94,21 @@ services: cadoles.core.service.color: class: Cadoles\CoreBundle\Service\colorService - arguments: ['@service_container'] \ No newline at end of file + arguments: ['@service_container'] + + cadoles.saml_user_mapper: + class: Cadoles\CoreBundle\Service\samlUserMapperService + arguments: + - "@=service('doctrine').getManager()" + - "@service_container" + - "@session" + + cadoles.saml_user_creator: + class: Cadoles\CoreBundle\Service\samlUserCreatorService + arguments: + - "@=service('doctrine').getManager()" + - "@service_container" + - "@session" + + cadoles.saml_attribute_mapper: + class: Cadoles\CoreBundle\Service\samlAttributeMapperService \ No newline at end of file diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/css/font.css b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/css/font.css new file mode 100644 index 00000000..4adce7b5 --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/css/font.css @@ -0,0 +1,55 @@ + @font-face { + font-family: 'Redressed'; + src: url('../fonts/typo/Redressed-webfont.eot'); + src: url('../fonts/typo/Redressed-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/typo/Redressed-webfont.woff') format('woff'), + url('../fonts/typo/Redressed-webfont.ttf') format('truetype'), + url('../fonts/typo/Redressed-webfont.svg#redressedregular') format('svg'); + font-weight: normal; + font-style: normal; + } + + @font-face { + font-family: 'Acme-Regular'; + src: url('../fonts/typo/Acme-Regular-webfont.eot'); + src: url('../fonts/typo/Acme-Regular-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/typo/Acme-Regular-webfont.woff') format('woff'), + url('../fonts/typo/Acme-Regular-webfont.ttf') format('truetype'), + url('../fonts/typo/Acme-Regular-webfont.svg#acmeregular') format('svg'); + font-weight: normal; + font-style: normal; + } + + @font-face { + font-family: 'Peacesans'; + src: url('../fonts/typo/Peacesans-webfont.eot'); + src: url('../fonts/typo/Peacesans-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/typo/Peacesans-webfont.woff') format('woff'), + url('../fonts/typo/Peacesans-webfont.ttf') format('truetype'), + url('../fonts/typo/Peacesans-webfont.svg#peacesans') format('svg'); + font-weight: normal; + font-style: normal; + } + + @font-face { + font-family: 'Roboto-Regular'; + src: url('../fonts/typo/Roboto-Regular-webfont.eot'); + src: url('../fonts/typo/Roboto-Regular-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/typo/Roboto-Regular-webfont.woff') format('woff'), + url('../fonts/typo/Roboto-Regular-webfont.ttf') format('truetype'), + url('../fonts/typo/Roboto-Regular-webfont.svg#peacesansregular') format('svg'); + font-weight: normal; + font-style: normal; + } + + @font-face { + font-family: 'Justanotherhand-Regular'; + src: url('../fonts/typo/Justanotherhand-Regular-webfont.eot'); + src: url('../fonts/typo/Justanotherhand-Regular-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/typo/Justanotherhand-Regular-webfont.woff') format('woff'), + url('../fonts/typo/Justanotherhand-Regular-webfont.ttf') format('truetype'), + url('../fonts/typo/Justanotherhand-Regular-webfont.svg#justanotherhandregular') format('svg'); + font-weight: normal; + font-style: normal; + } + \ No newline at end of file diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/css/sb-admin-2.css b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/css/sb-admin-2.css index a8f90408..8232b65d 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/css/sb-admin-2.css +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/css/sb-admin-2.css @@ -132,7 +132,6 @@ body { z-index: 1; position: absolute; width: 250px; - margin-top: 53px; } .navbar-top-links .dropdown-messages, diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Acme-Regular-webfont.eot b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Acme-Regular-webfont.eot new file mode 100644 index 00000000..7a117ed3 Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Acme-Regular-webfont.eot differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Acme-Regular-webfont.svg b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Acme-Regular-webfont.svg new file mode 100644 index 00000000..74015720 --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Acme-Regular-webfont.svg @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Acme-Regular-webfont.ttf b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Acme-Regular-webfont.ttf new file mode 100644 index 00000000..3b09df5b Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Acme-Regular-webfont.ttf differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Acme-Regular-webfont.woff b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Acme-Regular-webfont.woff new file mode 100644 index 00000000..a3a2c5b9 Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Acme-Regular-webfont.woff differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Bebas-webfont.eot b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Bebas-webfont.eot new file mode 100644 index 00000000..d9e992fb Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Bebas-webfont.eot differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Bebas-webfont.svg b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Bebas-webfont.svg new file mode 100644 index 00000000..fd2265e4 --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Bebas-webfont.svg @@ -0,0 +1,2807 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Bebas-webfont.ttf b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Bebas-webfont.ttf new file mode 100644 index 00000000..d5cab643 Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Bebas-webfont.ttf differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Bebas-webfont.woff b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Bebas-webfont.woff new file mode 100644 index 00000000..ebd62d59 Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Bebas-webfont.woff differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Justanotherhand-Regular-webfont.eot b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Justanotherhand-Regular-webfont.eot new file mode 100644 index 00000000..aacaa0e5 Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Justanotherhand-Regular-webfont.eot differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Justanotherhand-Regular-webfont.svg b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Justanotherhand-Regular-webfont.svg new file mode 100644 index 00000000..db5d4b76 --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Justanotherhand-Regular-webfont.svg @@ -0,0 +1,4440 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Justanotherhand-Regular-webfont.ttf b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Justanotherhand-Regular-webfont.ttf new file mode 100644 index 00000000..84d0ba85 Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Justanotherhand-Regular-webfont.ttf differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Justanotherhand-Regular-webfont.woff b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Justanotherhand-Regular-webfont.woff new file mode 100644 index 00000000..c268dc1a Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Justanotherhand-Regular-webfont.woff differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Peacesans-webfont.eot b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Peacesans-webfont.eot new file mode 100644 index 00000000..cb105845 Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Peacesans-webfont.eot differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Peacesans-webfont.svg b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Peacesans-webfont.svg new file mode 100644 index 00000000..1a751ed5 --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Peacesans-webfont.svg @@ -0,0 +1,3063 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Peacesans-webfont.ttf b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Peacesans-webfont.ttf new file mode 100644 index 00000000..7513e6c9 Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Peacesans-webfont.ttf differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Peacesans-webfont.woff b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Peacesans-webfont.woff new file mode 100644 index 00000000..5ce0e119 Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Peacesans-webfont.woff differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Redressed-webfont.eot b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Redressed-webfont.eot new file mode 100644 index 00000000..9bc06559 Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Redressed-webfont.eot differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Redressed-webfont.svg b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Redressed-webfont.svg new file mode 100644 index 00000000..b587e9ee --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Redressed-webfont.svg @@ -0,0 +1,5160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Redressed-webfont.ttf b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Redressed-webfont.ttf new file mode 100644 index 00000000..47cddf84 Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Redressed-webfont.ttf differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Redressed-webfont.woff b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Redressed-webfont.woff new file mode 100644 index 00000000..ed79ece1 Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Redressed-webfont.woff differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Roboto-Regular-webfont.eot b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Roboto-Regular-webfont.eot new file mode 100644 index 00000000..c42f2400 Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Roboto-Regular-webfont.eot differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Roboto-Regular-webfont.svg b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Roboto-Regular-webfont.svg new file mode 100644 index 00000000..57a15c66 --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Roboto-Regular-webfont.svg @@ -0,0 +1,635 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Roboto-Regular-webfont.ttf b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Roboto-Regular-webfont.ttf new file mode 100644 index 00000000..30be1e43 Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Roboto-Regular-webfont.ttf differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Roboto-Regular-webfont.woff b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Roboto-Regular-webfont.woff new file mode 100644 index 00000000..8aa07d73 Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Roboto-Regular-webfont.woff differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Snickles-webfont.eot b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Snickles-webfont.eot new file mode 100644 index 00000000..6b14cf24 Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Snickles-webfont.eot differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Snickles-webfont.svg b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Snickles-webfont.svg new file mode 100644 index 00000000..65d49104 --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Snickles-webfont.svg @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Snickles-webfont.ttf b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Snickles-webfont.ttf new file mode 100644 index 00000000..a5ee5028 Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Snickles-webfont.ttf differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Snickles-webfont.woff b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Snickles-webfont.woff new file mode 100644 index 00000000..a6dbc75f Binary files /dev/null and b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/public/fonts/typo/Snickles-webfont.woff differ diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Config/header.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Config/header.html.twig new file mode 100755 index 00000000..c02a0edb --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Config/header.html.twig @@ -0,0 +1,36 @@ +{% extends '@CadolesCore/simple.html.twig' %} + +{% block pagewrapper %} + + Annuler + +
+
+{% endblock %} + + + +{% block localjavascript %} + Dropzone.options.MyDropZone = { + acceptedMimeTypes: 'image/*', + maxFiles: 1, + resizeWidth:2500, + + success: function( file, response ){ + parent.$("#config_value").val("uploads/header/"+response["file"]); + parent.$("#config_value_img").attr("src","/{{ alias }}/uploads/header/"+response["file"]); + closeModal(); + } + } + + function closeModal() { + window.parent.$("#mymodal").modal('hide'); + } + + $(window).load(function () { + // On vérifie que l'execution se fait bien dans le cadre d'une modal + if(!window.parent.$("#mymodal #framemodal").length) { + $(location).attr('href',"{{ path('cadoles_core_home') }}"); + } + }); +{% endblock %} diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Config/list.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Config/list.html.twig new file mode 100644 index 00000000..7a8e0202 --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Config/list.html.twig @@ -0,0 +1,78 @@ +{% extends '@CadolesCore/base.html.twig' %} + +{% block pagewrapper %} +
+

Configuration Générale

+ +
+
+ Liste des Configurations +
+ +
+
+ + + + + + + + + + + {% for config in configs %} + {% if (config.required) and (config.value=="" ) %} + + {% else %} + + {% endif %} + + + + + + {% endfor %} +
ActionOrdreCléValeur
+ + {% if config.changeable %} + + {% if not config.required %} + + {% endif %} + {% endif %} + {{ config.order }}{{ config.id }} + {% if config.type == "boolean" %} + {% if config.value == "0" %} + non + {% else %} + oui + {% endif %} + {% elseif config.type == "logo" %} + + {% elseif config.type == "header" %} + + + {% else %} + {{ config.value }} + {% endif %} +
+
+
+
+
+{% endblock %} + +{% block localjavascript %} + function showInfo(id) { + $("#modalinfo #modalinfotext").html($("#"+id).attr("data").replace(/\n/g, "
")); + } + + + $(document).ready(function() { + $('#dataTables').DataTable({ + responsive: true, + order: [[ 1, "asc" ]] + }); + }); +{% endblock %} diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Config/logo.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Config/logo.html.twig new file mode 100755 index 00000000..f9650801 --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Config/logo.html.twig @@ -0,0 +1,36 @@ +{% extends '@CadolesCore/simple.html.twig' %} + +{% block pagewrapper %} + + Annuler + +
+
+{% endblock %} + + + +{% block localjavascript %} + Dropzone.options.MyDropZone = { + acceptedMimeTypes: 'image/*', + maxFiles: 1, + resizeWidth:500, + + success: function( file, response ){ + parent.$("#config_value").val("uploads/logo/"+response["file"]); + parent.$("#config_value_img").attr("src","/{{ alias }}/uploads/logo/"+response["file"]); + closeModal(); + } + } + + function closeModal() { + window.parent.$("#mymodal").modal('hide'); + } + + $(window).load(function () { + // On vérifie que l'execution se fait bien dans le cadre d'une modal + if(!window.parent.$("#mymodal #framemodal").length) { + $(location).attr('href',"{{ path('cadoles_core_home') }}"); + } + }); +{% endblock %} diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Config/update.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Config/update.html.twig new file mode 100755 index 00000000..e27a21d9 --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Config/update.html.twig @@ -0,0 +1,71 @@ +{% extends '@CadolesCore/base.html.twig' %} + +{% block pagewrapper %} +{{ form_start(form) }} +

Modification Configuration Générale

+ + {{ form_widget(form.submit) }} Annuler + +

+ + {% if app.session.flashbag.has('error') %} +
+ Erreur
+ {% for flashMessage in app.session.flashbag.get('error') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} + + {% if app.session.flashbag.has('notice') %} +
+ Information
+ {% for flashMessage in app.session.flashbag.get('notice') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} + +
+
+ Informations +
+ +
+ {{ form_label(form.id) }} + {{ form_widget(form.id) }} + + {% if type=="logo" %} +
+ + {{ form_widget(form.value) }} + Modifier +
+ + {% elseif type=="header" %} +
+ + {{ form_widget(form.value) }} + Modifier +
+ + {% else %} + {{ form_label(form.value) }} + {{ form_widget(form.value) }} + {% endif %} + + {{ form_widget(form.help) }} +
+
+ +{{ form_end(form) }} +{% endblock %} + +{% block localjavascript %} + $('#mymodal').on('hidden.bs.modal', function () { + var imgSrc = $("#config_value_img").attr('src'); + $("#config_value_img").attr('src',imgSrc); + }); + + +{% endblock %} diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Core/command.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Core/command.html.twig new file mode 100644 index 00000000..119ca04f --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Core/command.html.twig @@ -0,0 +1,17 @@ +{% extends '@CadolesCore/base.html.twig' %} + +{% block pagewrapper %} +

{{ title }}

+ + Retour +

+
+
+ Logs +
+ +
+ {{ content | nl2br }} +
+
+{% endblock %} \ No newline at end of file diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Core/config.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Core/config.html.twig index 37b2db55..1211a0b9 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Core/config.html.twig +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Core/config.html.twig @@ -3,9 +3,9 @@ {% block pagewrapper %} {% endblock %} \ No newline at end of file diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Core/home.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Core/home.html.twig index f2719cc1..3c181287 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Core/home.html.twig +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Core/home.html.twig @@ -3,13 +3,13 @@ {% block pagewrapper %}
- + -

{{ appname }}

+

{{ app.session.get('appname') }}


- {% if not app.user %} + {% if not app.user and moderegistration!="none" and masteridentity=="SQL"%} Mot de passe oublié ? {% endif %}
diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Group/edit.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Group/edit.html.twig index e4bc6963..432b6d46 100755 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Group/edit.html.twig +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Group/edit.html.twig @@ -44,10 +44,73 @@ {{ form_label(form.fgopen) }} {{ form_widget(form.fgopen) }} + + {% if masteridentity=="LDAP" %} + {{ form_row(form.fgassoc) }} + {{ form_row(form.ldapfilter) }} + {% endif %} + + {% if masteridentity=="SSO" %} + {{ form_row(form.fgassoc) }} + {{ form_row(form.attributes) }} + {% endif %} {{ form_end(form) }} {% endblock %} {% block localjavascript %} + $('document').ready(function(){ + {% if masteridentity=="LDAP" %} + fgaff=($("#group_ldapfilter").val()!=""); + if(!fgaff) { + $("#group_ldapfilter").hide(); + $("#label_group_ldapfilter").hide(); + $("#group_fgassoc").val(0); + } + {% endif %} + + {% if masteridentity=="LDAP" %} + $( "#group_fgassoc").change(function() { + + if($("#group_fgassoc").val()==0) { + $("#group_ldapfilter").hide(); + $("#label_group_ldapfilter").hide(); + $("#group_ldapfilter").val(""); + } + else { + $("#group_ldapfilter").show(); + $("#label_group_ldapfilter").show(); + } + }); + {% endif %} + + + {% if masteridentity=="SSO" %} + fgaff=($("#group_attributes").val()!=""); + if(!fgaff) { + $("#group_attributes").hide(); + $("#label_group_attributes").hide(); + $("#group_fgassoc").val(0); + } + {% endif %} + + {% if masteridentity=="SSO" %} + $( "#group_fgassoc").change(function() { + + if($("#group_fgassoc").val()==0) { + $("#group_attributes").hide(); + $("#label_group_attributes").hide(); + $("#group_attributes").val(""); + } + else { + $("#group_attributes").show(); + $("#label_group_attributes").show(); + } + }); + {% endif %} + }); + + + {% endblock %} diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Group/list.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Group/list.html.twig index d7f345f0..6c0d5e13 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Group/list.html.twig +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Group/list.html.twig @@ -12,7 +12,7 @@
- +
diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Group/users.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Group/users.html.twig index 5044b5b9..fb153c7f 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Group/users.html.twig +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Group/users.html.twig @@ -15,7 +15,7 @@
-
Action
+
@@ -38,7 +38,7 @@
-
Action
+
diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Include/footer.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Include/footer.html.twig index 2ac9b85c..a12ac05b 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Include/footer.html.twig +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Include/footer.html.twig @@ -1,3 +1,34 @@ + + + + + {% block javascripts %} {% javascripts '@CadolesCoreBundle/Resources/public/js/jquery.min.js' diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Include/head.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Include/head.html.twig index 6eb632a7..e25b2163 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Include/head.html.twig +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Include/head.html.twig @@ -3,7 +3,7 @@ - {% block title %}{{ appname }}{% endblock %} + {% block title %}{{ app.session.get('appname') }}{% endblock %} @@ -29,6 +29,7 @@ '@CadolesCoreBundle/Resources/public/css/bootstrap-slider.css' '@CadolesCoreBundle/Resources/public/css/bootstrap-iconpicker.min.css' '@CadolesCoreBundle/Resources/public/css/select2.min.css' + '@CadolesCoreBundle/Resources/public/css/font.css' '@CadolesCoreBundle/Resources/public/css/style.css' debug=false @@ -36,10 +37,36 @@ {% endstylesheets %} - + {% endblock %} diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Include/hero.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Include/hero.html.twig new file mode 100644 index 00000000..8422f804 --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Include/hero.html.twig @@ -0,0 +1,71 @@ +{% if app.session.get('fgheader') %} + + + {% set color = app.session.get('color') %} + +
+ + + {{ app.session.get('appname') }} + + + + + +
+ + +{% endif %} + + + + +{% if usesidebar %} + +{% endif %} + diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Include/menu.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Include/menu.html.twig new file mode 100644 index 00000000..f8f4195b --- /dev/null +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Include/menu.html.twig @@ -0,0 +1,34 @@ + {% if app.user %} + {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_MODO') %} +
  • + {% endif %} +
  • +
  • + + +
  • + {% if mode_auth == "SAML" %} + + {% elseif mode_auth == "CAS" %} + + {% elseif mode_auth == "SQL" %} + + {% endif %} +
  • + + + {% else %} + {% if moderegistration!="none" and masteridentity=="SQL"%} +
  • + {% endif %} + +
  • + {% if mode_auth == "SAML" %} + + {% elseif mode_auth == "CAS" %} + + {% elseif mode_auth == "SQL" %} + + {% endif %} +
  • + {% endif %} \ No newline at end of file diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Niveau01/edit.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Niveau01/edit.html.twig index 150a47e5..998c01ff 100755 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Niveau01/edit.html.twig +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Niveau01/edit.html.twig @@ -41,6 +41,13 @@
    {{ form_row(form.label) }} {{ form_row(form.siren) }} + {% if masteridentity=="LDAP" %} + {{ form_row(form.ldapfilter) }} + {% endif %} + + {% if masteridentity=="SSO" %} + {{ form_row(form.attributes) }} + {% endif %}
    {{ form_end(form) }} diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Niveau01/list.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Niveau01/list.html.twig index 91b71d08..bca0f0e6 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Niveau01/list.html.twig +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Niveau01/list.html.twig @@ -12,7 +12,7 @@
    -
    Action
    +
    diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Niveau02/list.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Niveau02/list.html.twig index 7437d89b..d8cd7884 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Niveau02/list.html.twig +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Niveau02/list.html.twig @@ -12,7 +12,7 @@
    -
    Action
    +
    diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/edit.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/edit.html.twig index 615883dc..d633ca65 100755 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/edit.html.twig +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/edit.html.twig @@ -66,15 +66,15 @@ {{ form_widget(form.username) }}
    - Le login peut être sous forme prenom.nom et ne doit pas comporter d’espace.
    - Il ne doit pas être votre adresse mail. + Caractères interdits = accent, espace, caractères spéciaux sauf @ . - _
    + Taille minimum = 5 caractères
    {% if form.password is defined %} {{ form_row(form.password) }}
    - Le mot de passe doit comporter au moins 8 caractères, avec obligatoirement des lettres, chiffres et caractères spéciaux. + Le mot de passe doit comporter au moins {{ keyterm }} caractères, avec obligatoirement des lettres, chiffres et caractères spéciaux.
    {% endif %} diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/list.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/list.html.twig index 05282ddd..df5a2c21 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/list.html.twig +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/list.html.twig @@ -10,7 +10,7 @@
    -
    Action
    +
    diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Security/login.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Security/login.html.twig index 82c8193f..30636a87 100644 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Security/login.html.twig +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/Security/login.html.twig @@ -7,9 +7,9 @@
    diff --git a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/User/edit.html.twig b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/User/edit.html.twig index 3382701d..27876a96 100755 --- a/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/User/edit.html.twig +++ b/src/cadolesuser-1.0/src/Cadoles/CoreBundle/Resources/views/User/edit.html.twig @@ -18,7 +18,7 @@ {{ form_widget(form.submit) }} {% if access=="config" %} - Annuler + Annuler {% else %} + + + + + +
    + + +
    + +
    +
    +
    +

    Permanently set your Home Organisation

    +
    + +
    +
    +

    Pour acceder a la ressource 'chronos.cnous.fr' veuillez selectionner ou chercher l'organisation a laquelle vous appartenez.


    +
    + +

    + +
    +
    +

    +
    + +
    +
    +
    + +
    Mission communication Cnous & Crous de Dijon
    +
    + + + + + + + + + diff --git a/src/cadolesuser-1.0/vendor/composer/autoload_classmap.php b/src/cadolesuser-1.0/vendor/composer/autoload_classmap.php index 6539490e..863c1014 100644 --- a/src/cadolesuser-1.0/vendor/composer/autoload_classmap.php +++ b/src/cadolesuser-1.0/vendor/composer/autoload_classmap.php @@ -10,6 +10,50 @@ return array( 'AppKernel' => $baseDir . '/app/AppKernel.php', 'ArithmeticError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php', 'AssertionError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php', + 'CAS_AuthenticationException' => $vendorDir . '/jasig/phpcas/source/CAS/AuthenticationException.php', + 'CAS_Client' => $vendorDir . '/jasig/phpcas/source/CAS/Client.php', + 'CAS_CookieJar' => $vendorDir . '/jasig/phpcas/source/CAS/CookieJar.php', + 'CAS_Exception' => $vendorDir . '/jasig/phpcas/source/CAS/Exception.php', + 'CAS_GracefullTerminationException' => $vendorDir . '/jasig/phpcas/source/CAS/GracefullTerminationException.php', + 'CAS_InvalidArgumentException' => $vendorDir . '/jasig/phpcas/source/CAS/InvalidArgumentException.php', + 'CAS_Languages_Catalan' => $vendorDir . '/jasig/phpcas/source/CAS/Languages/Catalan.php', + 'CAS_Languages_ChineseSimplified' => $vendorDir . '/jasig/phpcas/source/CAS/Languages/ChineseSimplified.php', + 'CAS_Languages_English' => $vendorDir . '/jasig/phpcas/source/CAS/Languages/English.php', + 'CAS_Languages_French' => $vendorDir . '/jasig/phpcas/source/CAS/Languages/French.php', + 'CAS_Languages_German' => $vendorDir . '/jasig/phpcas/source/CAS/Languages/German.php', + 'CAS_Languages_Greek' => $vendorDir . '/jasig/phpcas/source/CAS/Languages/Greek.php', + 'CAS_Languages_Japanese' => $vendorDir . '/jasig/phpcas/source/CAS/Languages/Japanese.php', + 'CAS_Languages_LanguageInterface' => $vendorDir . '/jasig/phpcas/source/CAS/Languages/LanguageInterface.php', + 'CAS_Languages_Spanish' => $vendorDir . '/jasig/phpcas/source/CAS/Languages/Spanish.php', + 'CAS_OutOfSequenceBeforeAuthenticationCallException' => $vendorDir . '/jasig/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php', + 'CAS_OutOfSequenceBeforeClientException' => $vendorDir . '/jasig/phpcas/source/CAS/OutOfSequenceBeforeClientException.php', + 'CAS_OutOfSequenceBeforeProxyException' => $vendorDir . '/jasig/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php', + 'CAS_OutOfSequenceException' => $vendorDir . '/jasig/phpcas/source/CAS/OutOfSequenceException.php', + 'CAS_PGTStorage_AbstractStorage' => $vendorDir . '/jasig/phpcas/source/CAS/PGTStorage/AbstractStorage.php', + 'CAS_PGTStorage_Db' => $vendorDir . '/jasig/phpcas/source/CAS/PGTStorage/Db.php', + 'CAS_PGTStorage_File' => $vendorDir . '/jasig/phpcas/source/CAS/PGTStorage/File.php', + 'CAS_ProxiedService' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService.php', + 'CAS_ProxiedService_Abstract' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService/Abstract.php', + 'CAS_ProxiedService_Exception' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService/Exception.php', + 'CAS_ProxiedService_Http' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService/Http.php', + 'CAS_ProxiedService_Http_Abstract' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService/Http/Abstract.php', + 'CAS_ProxiedService_Http_Get' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService/Http/Get.php', + 'CAS_ProxiedService_Http_Post' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService/Http/Post.php', + 'CAS_ProxiedService_Imap' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService/Imap.php', + 'CAS_ProxiedService_Testable' => $vendorDir . '/jasig/phpcas/source/CAS/ProxiedService/Testable.php', + 'CAS_ProxyChain' => $vendorDir . '/jasig/phpcas/source/CAS/ProxyChain.php', + 'CAS_ProxyChain_AllowedList' => $vendorDir . '/jasig/phpcas/source/CAS/ProxyChain/AllowedList.php', + 'CAS_ProxyChain_Any' => $vendorDir . '/jasig/phpcas/source/CAS/ProxyChain/Any.php', + 'CAS_ProxyChain_Interface' => $vendorDir . '/jasig/phpcas/source/CAS/ProxyChain/Interface.php', + 'CAS_ProxyChain_Trusted' => $vendorDir . '/jasig/phpcas/source/CAS/ProxyChain/Trusted.php', + 'CAS_ProxyTicketException' => $vendorDir . '/jasig/phpcas/source/CAS/ProxyTicketException.php', + 'CAS_Request_AbstractRequest' => $vendorDir . '/jasig/phpcas/source/CAS/Request/AbstractRequest.php', + 'CAS_Request_CurlMultiRequest' => $vendorDir . '/jasig/phpcas/source/CAS/Request/CurlMultiRequest.php', + 'CAS_Request_CurlRequest' => $vendorDir . '/jasig/phpcas/source/CAS/Request/CurlRequest.php', + 'CAS_Request_Exception' => $vendorDir . '/jasig/phpcas/source/CAS/Request/Exception.php', + 'CAS_Request_MultiRequestInterface' => $vendorDir . '/jasig/phpcas/source/CAS/Request/MultiRequestInterface.php', + 'CAS_Request_RequestInterface' => $vendorDir . '/jasig/phpcas/source/CAS/Request/RequestInterface.php', + 'CAS_TypeMismatchException' => $vendorDir . '/jasig/phpcas/source/CAS/TypeMismatchException.php', 'Collator' => $vendorDir . '/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/Collator.php', 'DivisionByZeroError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php', 'Error' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/Error.php', @@ -20,4 +64,5 @@ return array( 'SessionUpdateTimestampHandlerInterface' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php', 'SqlFormatter' => $vendorDir . '/jdorn/sql-formatter/lib/SqlFormatter.php', 'TypeError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/TypeError.php', + 'phpCAS' => $vendorDir . '/jasig/phpcas/source/CAS.php', ); diff --git a/src/cadolesuser-1.0/vendor/composer/autoload_files.php b/src/cadolesuser-1.0/vendor/composer/autoload_files.php index b8eaf12a..a87adb03 100644 --- a/src/cadolesuser-1.0/vendor/composer/autoload_files.php +++ b/src/cadolesuser-1.0/vendor/composer/autoload_files.php @@ -11,12 +11,10 @@ return array( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php', '5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php', - 'ce89ac35a6c330c55f4710717db9ff78' => $vendorDir . '/kriswallsmith/assetic/src/functions.php', '023d27dca8066ef29e6739335ea73bad' => $vendorDir . '/symfony/polyfill-php70/bootstrap.php', 'bd9634f2d41831496de0d3dfe4c94881' => $vendorDir . '/symfony/polyfill-php56/bootstrap.php', '6a47392539ca2329373e0d33e1dba053' => $vendorDir . '/symfony/polyfill-intl-icu/bootstrap.php', '32dcc8afd4335739640db7d200c1971d' => $vendorDir . '/symfony/polyfill-apcu/bootstrap.php', - '2ccc22162d23695119e60eb70f6eab83' => '/usr/share/php/CAS/eoleCAS.php', - 'fc619f776ead8eebcf8ed8b24aa3cee8' => '/usr/share/php/configCAS/cas.inc.php', + 'ce89ac35a6c330c55f4710717db9ff78' => $vendorDir . '/kriswallsmith/assetic/src/functions.php', '719971e375036615a0685b6fb054583d' => $vendorDir . '/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php', ); diff --git a/src/cadolesuser-1.0/vendor/composer/autoload_namespaces.php b/src/cadolesuser-1.0/vendor/composer/autoload_namespaces.php index dbc44df6..3e9ec671 100644 --- a/src/cadolesuser-1.0/vendor/composer/autoload_namespaces.php +++ b/src/cadolesuser-1.0/vendor/composer/autoload_namespaces.php @@ -10,6 +10,12 @@ return array( 'Tetranz\\Select2EntityBundle' => array($vendorDir . '/tetranz/select2entity-bundle'), 'ProxyManager\\' => array($vendorDir . '/ocramius/proxy-manager/src'), 'Oneup\\UploaderBundle' => array($vendorDir . '/oneup/uploader-bundle'), + 'LightSaml\\Tests\\' => array($vendorDir . '/lightsaml/lightsaml/tests'), + 'LightSaml\\SymfonyBridgeBundle\\Tests\\' => array($vendorDir . '/lightsaml/symfony-bridge/tests'), + 'LightSaml\\SymfonyBridgeBundle\\' => array($vendorDir . '/lightsaml/symfony-bridge/src'), + 'LightSaml\\SpBundle\\Tests\\' => array($vendorDir . '/lightsaml/sp-bundle/tests'), + 'LightSaml\\SpBundle\\' => array($vendorDir . '/lightsaml/sp-bundle/src'), + 'LightSaml\\' => array($vendorDir . '/lightsaml/lightsaml/src'), 'Doctrine\\ORM\\' => array($vendorDir . '/doctrine/orm/lib'), 'Doctrine\\DBAL\\' => array($vendorDir . '/doctrine/dbal/lib'), 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib'), diff --git a/src/cadolesuser-1.0/vendor/composer/autoload_psr4.php b/src/cadolesuser-1.0/vendor/composer/autoload_psr4.php index 41edb238..71e1584e 100644 --- a/src/cadolesuser-1.0/vendor/composer/autoload_psr4.php +++ b/src/cadolesuser-1.0/vendor/composer/autoload_psr4.php @@ -31,6 +31,7 @@ return array( 'Sensio\\Bundle\\FrameworkExtraBundle\\' => array($vendorDir . '/sensio/framework-extra-bundle'), 'Sensio\\Bundle\\DistributionBundle\\' => array($vendorDir . '/sensio/distribution-bundle'), 'SensioLabs\\Security\\' => array($vendorDir . '/sensiolabs/security-checker/SensioLabs/Security'), + 'RobRichards\\XMLSecLibs\\' => array($vendorDir . '/robrichards/xmlseclibs/src'), 'Ramsey\\Uuid\\' => array($vendorDir . '/ramsey/uuid/src'), 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), @@ -55,6 +56,5 @@ return array( 'Doctrine\\Bundle\\DoctrineCacheBundle\\' => array($vendorDir . '/doctrine/doctrine-cache-bundle'), 'Doctrine\\Bundle\\DoctrineBundle\\' => array($vendorDir . '/doctrine/doctrine-bundle'), 'Composer\\CaBundle\\' => array($vendorDir . '/composer/ca-bundle/src'), - 'Cadoles\\CoreBundle\\' => array($baseDir . '/src/Cadoles/CoreBundle'), - 'AppBundle\\' => array($baseDir . '/src/AppBundle'), + '' => array($baseDir . '/src'), ); diff --git a/src/cadolesuser-1.0/vendor/composer/ca-bundle/res/cacert.pem b/src/cadolesuser-1.0/vendor/composer/ca-bundle/res/cacert.pem index 0cb1d007..09b4ce16 100644 --- a/src/cadolesuser-1.0/vendor/composer/ca-bundle/res/cacert.pem +++ b/src/cadolesuser-1.0/vendor/composer/ca-bundle/res/cacert.pem @@ -1,7 +1,7 @@ ## ## Bundle of CA Root Certificates ## -## Certificate data from Mozilla as of: Wed Oct 17 03:12:10 2018 GMT +## Certificate data from Mozilla as of: Wed Jan 23 04:12:09 2019 GMT ## ## This is a bundle of X.509 certificates of public Certificate Authorities ## (CA). These were automatically extracted from Mozilla's root certificates @@ -14,7 +14,7 @@ ## Just configure this file as the SSLCACertificateFile. ## ## Conversion done with mk-ca-bundle.pl version 1.27. -## SHA256: 3f875d87fee4ce3d966c69f1d6c111aa95c0143ade59e4fa24882c582bb5f0ca +## SHA256: 18372117493b5b7ec006c31d966143fc95a9464a2b5f8d5188e23c5557b2292d ## @@ -261,28 +261,6 @@ gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS -----END CERTIFICATE----- -Visa eCommerce Root -=================== ------BEGIN CERTIFICATE----- -MIIDojCCAoqgAwIBAgIQE4Y1TR0/BvLB+WUF1ZAcYjANBgkqhkiG9w0BAQUFADBrMQswCQYDVQQG -EwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2Ug -QXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNvbW1lcmNlIFJvb3QwHhcNMDIwNjI2MDIxODM2 -WhcNMjIwNjI0MDAxNjEyWjBrMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMm -VmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNv -bW1lcmNlIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvV95WHm6h2mCxlCfL -F9sHP4CFT8icttD0b0/Pmdjh28JIXDqsOTPHH2qLJj0rNfVIsZHBAk4ElpF7sDPwsRROEW+1QK8b -RaVK7362rPKgH1g/EkZgPI2h4H3PVz4zHvtH8aoVlwdVZqW1LS7YgFmypw23RuwhY/81q6UCzyr0 -TP579ZRdhE2o8mCP2w4lPJ9zcc+U30rq299yOIzzlr3xF7zSujtFWsan9sYXiwGd/BmoKoMWuDpI -/k4+oKsGGelT84ATB+0tvz8KPFUgOSwsAGl0lUq8ILKpeeUYiZGo3BxN77t+Nwtd/jmliFKMAGzs -GHxBvfaLdXe6YJ2E5/4tAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEG -MB0GA1UdDgQWBBQVOIMPPyw/cDMezUb+B4wg4NfDtzANBgkqhkiG9w0BAQUFAAOCAQEAX/FBfXxc -CLkr4NWSR/pnXKUTwwMhmytMiUbPWU3J/qVAtmPN3XEolWcRzCSs00Rsca4BIGsDoo8Ytyk6feUW -YFN4PMCvFYP3j1IzJL1kk5fui/fbGKhtcbP3LBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pz -zkWKsKZJ/0x9nXGIxHYdkFsd7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBu -YQa7FkKMcPcw++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt -398znM/jra6O1I7mT1GvFpLgXPYHDw== ------END CERTIFICATE----- - Comodo AAA Services root ======================== -----BEGIN CERTIFICATE----- @@ -3238,3 +3216,186 @@ BgNVHQ4EFgQUSIcUrOPDnpBgOtfKie7TrYy0UGYwEAYJKwYBBAGCNxUBBAMCAQAwCgYIKoZIzj0E AwMDaAAwZQIwJsdpW9zV57LnyAyMjMPdeYwbY9XJUpROTYJKcx6ygISpJcBMWm1JKWB4E+J+SOtk AjEA2zQgMgj/mkkCtojeFK9dbJlxjRo/i9fgojaGHAeCOnZT/cKi7e97sIBPWA9LUzm9 -----END CERTIFICATE----- + +GTS Root R1 +=========== +-----BEGIN CERTIFICATE----- +MIIFWjCCA0KgAwIBAgIQbkepxUtHDA3sM9CJuRz04TANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQG +EwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJv +b3QgUjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAG +A1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx +9vaMf/vo27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7wCl7r +aKb0xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjwTcLCeoiKu7rPWRnW +r4+wB7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0PfyblqAj+lug8aJRT7oM6iCsVlgmy4HqM +LnXWnOunVmSPlk9orj2XwoSPwLxAwAtcvfaHszVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly +4cpk9+aCEI3oncKKiPo4Zor8Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr +06zqkUspzBmkMiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+C12LOORc92 +wO1AK/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYWk70paDPvOmbsB4om +3xPXV2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+DVrNVjzRlwW5y0vtOUucxD/SVRNu +JLDWcfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgFlQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD +VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEM +BQADggIBADiWCu49tJYeX++dnAsznyvgyv3SjgofQXSlfKqE1OXyHuY3UjKcC9FhHb8owbZEKTV1 +d5iyfNm9dKyKaOOpMQkpAWBz40d8U6iQSifvS9efk+eCNs6aaAyC58/UEBZvXw6ZXPYfcX3v73sv +fuo21pdwCxXu11xWajOl40k4DLh9+42FpLFZXvRq4d2h9mREruZRgyFmxhE+885H7pwoHyXa/6xm +ld01D1zvICxi/ZG6qcz8WpyTgYMpl0p8WnK0OdC3d8t5/Wk6kjftbjhlRn7pYL15iJdfOBL07q9b +gsiG1eGZbYwE8na6SfZu6W0eX6DvJ4J2QPim01hcDyxC2kLGe4g0x8HYRZvBPsVhHdljUEn2NIVq +4BjFbkerQUIpm/ZgDdIx02OYI5NaAIFItO/Nis3Jz5nu2Z6qNuFoS3FJFDYoOj0dzpqPJeaAcWEr +tXvM+SUWgeExX6GjfhaknBZqlxi9dnKlC54dNuYvoS++cJEPqOba+MSSQGwlfnuzCdyyF62ARPBo +pY+Udf90WuioAnwMCeKpSwughQtiue+hMZL77/ZRBIls6Kl0obsXs7X9SQ98POyDGCBDTtWTurQ0 +sR8WNh8M5mQ5Fkzc4P4dyKliPUDqysU0ArSuiYgzNdwsE3PYJ/HQcu51OyLemGhmW/HGY0dVHLql +CFF1pkgl +-----END CERTIFICATE----- + +GTS Root R2 +=========== +-----BEGIN CERTIFICATE----- +MIIFWjCCA0KgAwIBAgIQbkepxlqz5yDFMJo/aFLybzANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQG +EwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJv +b3QgUjIwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAG +A1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjIwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDO3v2m++zsFDQ8BwZabFn3GTXd98GdVarTzTuk +k3LvCvptnfbwhYBboUhSnznFt+4orO/LdmgUud+tAWyZH8QiHZ/+cnfgLFuv5AS/T3KgGjSY6Dlo +7JUle3ah5mm5hRm9iYz+re026nO8/4Piy33B0s5Ks40FnotJk9/BW9BuXvAuMC6C/Pq8tBcKSOWI +m8Wba96wyrQD8Nr0kLhlZPdcTK3ofmZemde4wj7I0BOdre7kRXuJVfeKH2JShBKzwkCX44ofR5Gm +dFrS+LFjKBC4swm4VndAoiaYecb+3yXuPuWgf9RhD1FLPD+M2uFwdNjCaKH5wQzpoeJ/u1U8dgbu +ak7MkogwTZq9TwtImoS1mKPV+3PBV2HdKFZ1E66HjucMUQkQdYhMvI35ezzUIkgfKtzra7tEscsz +cTJGr61K8YzodDqs5xoic4DSMPclQsciOzsSrZYuxsN2B6ogtzVJV+mSSeh2FnIxZyuWfoqjx5RW +Ir9qS34BIbIjMt/kmkRtWVtd9QCgHJvGeJeNkP+byKq0rxFROV7Z+2et1VsRnTKaG73Vululycsl +aVNVJ1zgyjbLiGH7HrfQy+4W+9OmTN6SpdTi3/UGVN4unUu0kzCqgc7dGtxRcw1PcOnlthYhGXmy +5okLdWTK1au8CcEYof/UVKGFPP0UJAOyh9OktwIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD +VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUu//KjiOfT5nK2+JopqUVJxce2Q4wDQYJKoZIhvcNAQEM +BQADggIBALZp8KZ3/p7uC4Gt4cCpx/k1HUCCq+YEtN/L9x0Pg/B+E02NjO7jMyLDOfxA325BS0JT +vhaI8dI4XsRomRyYUpOM52jtG2pzegVATX9lO9ZY8c6DR2Dj/5epnGB3GFW1fgiTz9D2PGcDFWEJ ++YF59exTpJ/JjwGLc8R3dtyDovUMSRqodt6Sm2T4syzFJ9MHwAiApJiS4wGWAqoC7o87xdFtCjMw +c3i5T1QWvwsHoaRc5svJXISPD+AVdyx+Jn7axEvbpxZ3B7DNdehyQtaVhJ2Gg/LkkM0JR9SLA3Da +WsYDQvTtN6LwG1BUSw7YhN4ZKJmBR64JGz9I0cNv4rBgF/XuIwKl2gBbbZCr7qLpGzvpx0QnRY5r +n/WkhLx3+WuXrD5RRaIRpsyF7gpo8j5QOHokYh4XIDdtak23CZvJ/KRY9bb7nE4Yu5UC56Gtmwfu +Nmsk0jmGwZODUNKBRqhfYlcsu2xkiAhu7xNUX90txGdj08+JN7+dIPT7eoOboB6BAFDC5AwiWVIQ +7UNWhwD4FFKnHYuTjKJNRn8nxnGbJN7k2oaLDX5rIMHAnuFl2GqjpuiFizoHCBy69Y9Vmhh1fuXs +gWbRIXOhNUQLgD1bnF5vKheW0YMjiGZt5obicDIvUiLnyOd/xCxgXS/Dr55FBcOEArf9LAhST4Ld +o/DUhgkC +-----END CERTIFICATE----- + +GTS Root R3 +=========== +-----BEGIN CERTIFICATE----- +MIICDDCCAZGgAwIBAgIQbkepx2ypcyRAiQ8DVd2NHTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV +UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg +UjMwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE +ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMwdjAQBgcq +hkjOPQIBBgUrgQQAIgNiAAQfTzOHMymKoYTey8chWEGJ6ladK0uFxh1MJ7x/JlFyb+Kf1qPKzEUU +Rout736GjOyxfi//qXGdGIRFBEFVbivqJn+7kAHjSxm65FSWRQmx1WyRRK2EE46ajA2ADDL24Cej +QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTB8Sa6oC2uhYHP +0/EqEr24Cmf9vDAKBggqhkjOPQQDAwNpADBmAjEAgFukfCPAlaUs3L6JbyO5o91lAFJekazInXJ0 +glMLfalAvWhgxeG4VDvBNhcl2MG9AjEAnjWSdIUlUfUk7GRSJFClH9voy8l27OyCbvWFGFPouOOa +KaqW04MjyaR7YbPMAuhd +-----END CERTIFICATE----- + +GTS Root R4 +=========== +-----BEGIN CERTIFICATE----- +MIICCjCCAZGgAwIBAgIQbkepyIuUtui7OyrYorLBmTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV +UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg +UjQwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE +ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQwdjAQBgcq +hkjOPQIBBgUrgQQAIgNiAATzdHOnaItgrkO4NcWBMHtLSZ37wWHO5t5GvWvVYRg1rkDdc/eJkTBa +6zzuhXyiQHY7qca4R9gq55KRanPpsXI5nymfopjTX15YhmUPoYRlBtHci8nHc8iMai/lxKvRHYqj +QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSATNbrdP9JNqPV +2Py1PsVq8JQdjDAKBggqhkjOPQQDAwNnADBkAjBqUFJ0CMRw3J5QdCHojXohw0+WbhXRIjVhLfoI +N+4Zba3bssx9BzT1YBkstTTZbyACMANxsbqjYAuG7ZoIapVon+Kz4ZNkfF6Tpt95LY2F45TPI11x +zPKwTdb+mciUqXWi4w== +-----END CERTIFICATE----- + +UCA Global G2 Root +================== +-----BEGIN CERTIFICATE----- +MIIFRjCCAy6gAwIBAgIQXd+x2lqj7V2+WmUgZQOQ7zANBgkqhkiG9w0BAQsFADA9MQswCQYDVQQG +EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxGzAZBgNVBAMMElVDQSBHbG9iYWwgRzIgUm9vdDAeFw0x +NjAzMTEwMDAwMDBaFw00MDEyMzEwMDAwMDBaMD0xCzAJBgNVBAYTAkNOMREwDwYDVQQKDAhVbmlU +cnVzdDEbMBkGA1UEAwwSVUNBIEdsb2JhbCBHMiBSb290MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A +MIICCgKCAgEAxeYrb3zvJgUno4Ek2m/LAfmZmqkywiKHYUGRO8vDaBsGxUypK8FnFyIdK+35KYmT +oni9kmugow2ifsqTs6bRjDXVdfkX9s9FxeV67HeToI8jrg4aA3++1NDtLnurRiNb/yzmVHqUwCoV +8MmNsHo7JOHXaOIxPAYzRrZUEaalLyJUKlgNAQLx+hVRZ2zA+te2G3/RVogvGjqNO7uCEeBHANBS +h6v7hn4PJGtAnTRnvI3HLYZveT6OqTwXS3+wmeOwcWDcC/Vkw85DvG1xudLeJ1uK6NjGruFZfc8o +LTW4lVYa8bJYS7cSN8h8s+1LgOGN+jIjtm+3SJUIsUROhYw6AlQgL9+/V087OpAh18EmNVQg7Mc/ +R+zvWr9LesGtOxdQXGLYD0tK3Cv6brxzks3sx1DoQZbXqX5t2Okdj4q1uViSukqSKwxW/YDrCPBe +KW4bHAyvj5OJrdu9o54hyokZ7N+1wxrrFv54NkzWbtA+FxyQF2smuvt6L78RHBgOLXMDj6DlNaBa +4kx1HXHhOThTeEDMg5PXCp6dW4+K5OXgSORIskfNTip1KnvyIvbJvgmRlld6iIis7nCs+dwp4wwc +OxJORNanTrAmyPPZGpeRaOrvjUYG0lZFWJo8DA+DuAUlwznPO6Q0ibd5Ei9Hxeepl2n8pndntd97 +8XplFeRhVmUCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O +BBYEFIHEjMz15DD/pQwIX4wVZyF0Ad/fMA0GCSqGSIb3DQEBCwUAA4ICAQATZSL1jiutROTL/7lo +5sOASD0Ee/ojL3rtNtqyzm325p7lX1iPyzcyochltq44PTUbPrw7tgTQvPlJ9Zv3hcU2tsu8+Mg5 +1eRfB70VVJd0ysrtT7q6ZHafgbiERUlMjW+i67HM0cOU2kTC5uLqGOiiHycFutfl1qnN3e92mI0A +Ds0b+gO3joBYDic/UvuUospeZcnWhNq5NXHzJsBPd+aBJ9J3O5oUb3n09tDh05S60FdRvScFDcH9 +yBIw7m+NESsIndTUv4BFFJqIRNow6rSn4+7vW4LVPtateJLbXDzz2K36uGt/xDYotgIVilQsnLAX +c47QN6MUPJiVAAwpBVueSUmxX8fjy88nZY41F7dXyDDZQVu5FLbowg+UMaeUmMxq67XhJ/UQqAHo +jhJi6IjMtX9Gl8CbEGY4GjZGXyJoPd/JxhMnq1MGrKI8hgZlb7F+sSlEmqO6SWkoaY/X5V+tBIZk +bxqgDMUIYs6Ao9Dz7GjevjPHF1t/gMRMTLGmhIrDO7gJzRSBuhjjVFc2/tsvfEehOjPI+Vg7RE+x +ygKJBJYoaMVLuCaJu9YzL1DV/pqJuhgyklTGW+Cd+V7lDSKb9triyCGyYiGqhkCyLmTTX8jjfhFn +RR8F/uOi77Oos/N9j/gMHyIfLXC0uAE0djAA5SN4p1bXUB+K+wb1whnw0A== +-----END CERTIFICATE----- + +UCA Extended Validation Root +============================ +-----BEGIN CERTIFICATE----- +MIIFWjCCA0KgAwIBAgIQT9Irj/VkyDOeTzRYZiNwYDANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQG +EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9u +IFJvb3QwHhcNMTUwMzEzMDAwMDAwWhcNMzgxMjMxMDAwMDAwWjBHMQswCQYDVQQGEwJDTjERMA8G +A1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9uIFJvb3QwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCpCQcoEwKwmeBkqh5DFnpzsZGgdT6o+uM4AHrs +iWogD4vFsJszA1qGxliG1cGFu0/GnEBNyr7uaZa4rYEwmnySBesFK5pI0Lh2PpbIILvSsPGP2KxF +Rv+qZ2C0d35qHzwaUnoEPQc8hQ2E0B92CvdqFN9y4zR8V05WAT558aopO2z6+I9tTcg1367r3CTu +eUWnhbYFiN6IXSV8l2RnCdm/WhUFhvMJHuxYMjMR83dksHYf5BA1FxvyDrFspCqjc/wJHx4yGVMR +59mzLC52LqGj3n5qiAno8geK+LLNEOfic0CTuwjRP+H8C5SzJe98ptfRr5//lpr1kXuYC3fUfugH +0mK1lTnj8/FtDw5lhIpjVMWAtuCeS31HJqcBCF3RiJ7XwzJE+oJKCmhUfzhTA8ykADNkUVkLo4KR +el7sFsLzKuZi2irbWWIQJUoqgQtHB0MGcIfS+pMRKXpITeuUx3BNr2fVUbGAIAEBtHoIppB/TuDv +B0GHr2qlXov7z1CymlSvw4m6WC31MJixNnI5fkkE/SmnTHnkBVfblLkWU41Gsx2VYVdWf6/wFlth +WG82UBEL2KwrlRYaDh8IzTY0ZRBiZtWAXxQgXy0MoHgKaNYs1+lvK9JKBZP8nm9rZ/+I8U6laUpS +NwXqxhaN0sSZ0YIrO7o1dfdRUVjzyAfd5LQDfwIDAQABo0IwQDAdBgNVHQ4EFgQU2XQ65DA9DfcS +3H5aBZ8eNJr34RQwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQEL +BQADggIBADaNl8xCFWQpN5smLNb7rhVpLGsaGvdftvkHTFnq88nIua7Mui563MD1sC3AO6+fcAUR +ap8lTwEpcOPlDOHqWnzcSbvBHiqB9RZLcpHIojG5qtr8nR/zXUACE/xOHAbKsxSQVBcZEhrxH9cM +aVr2cXj0lH2RC47skFSOvG+hTKv8dGT9cZr4QQehzZHkPJrgmzI5c6sq1WnIeJEmMX3ixzDx/BR4 +dxIOE/TdFpS/S2d7cFOFyrC78zhNLJA5wA3CXWvp4uXViI3WLL+rG761KIcSF3Ru/H38j9CHJrAb ++7lsq+KePRXBOy5nAliRn+/4Qh8st2j1da3Ptfb/EX3C8CSlrdP6oDyp+l3cpaDvRKS+1ujl5BOW +F3sGPjLtx7dCvHaj2GU4Kzg1USEODm8uNBNA4StnDG1KQTAYI1oyVZnJF+A83vbsea0rWBmirSwi +GpWOvpaQXUJXxPkUAzUrHC1RVwinOt4/5Mi0A3PCwSaAuwtCH60NryZy2sy+s6ODWA2CxR9GUeOc +GMyNm43sSet1UNWMKFnKdDTajAshqx7qG+XH/RU+wBeq+yNuJkbL+vmxcmtpzyKEC2IPrNkZAJSi +djzULZrtBJ4tBmIQN1IchXIbJ+XMxjHsN+xjWZsLHXbMfjKaiJUINlK73nZfdklJrX+9ZSCyycEr +dhh2n1ax +-----END CERTIFICATE----- + +Certigna Root CA +================ +-----BEGIN CERTIFICATE----- +MIIGWzCCBEOgAwIBAgIRAMrpG4nxVQMNo+ZBbcTjpuEwDQYJKoZIhvcNAQELBQAwWjELMAkGA1UE +BhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczEcMBoGA1UECwwTMDAwMiA0ODE0NjMwODEwMDAzNjEZ +MBcGA1UEAwwQQ2VydGlnbmEgUm9vdCBDQTAeFw0xMzEwMDEwODMyMjdaFw0zMzEwMDEwODMyMjda +MFoxCzAJBgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxHDAaBgNVBAsMEzAwMDIgNDgxNDYz +MDgxMDAwMzYxGTAXBgNVBAMMEENlcnRpZ25hIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQDNGDllGlmx6mQWDoyUJJV8g9PFOSbcDO8WV43X2KyjQn+Cyu3NW9sOty3tRQgX +stmzy9YXUnIo245Onoq2C/mehJpNdt4iKVzSs9IGPjA5qXSjklYcoW9MCiBtnyN6tMbaLOQdLNyz +KNAT8kxOAkmhVECe5uUFoC2EyP+YbNDrihqECB63aCPuI9Vwzm1RaRDuoXrC0SIxwoKF0vJVdlB8 +JXrJhFwLrN1CTivngqIkicuQstDuI7pmTLtipPlTWmR7fJj6o0ieD5Wupxj0auwuA0Wv8HT4Ks16 +XdG+RCYyKfHx9WzMfgIhC59vpD++nVPiz32pLHxYGpfhPTc3GGYo0kDFUYqMwy3OU4gkWGQwFsWq +4NYKpkDfePb1BHxpE4S80dGnBs8B92jAqFe7OmGtBIyT46388NtEbVncSVmurJqZNjBBe3YzIoej +wpKGbvlw7q6Hh5UbxHq9MfPU0uWZ/75I7HX1eBYdpnDBfzwboZL7z8g81sWTCo/1VTp2lc5ZmIoJ +lXcymoO6LAQ6l73UL77XbJuiyn1tJslV1c/DeVIICZkHJC1kJWumIWmbat10TWuXekG9qxf5kBdI +jzb5LdXF2+6qhUVB+s06RbFo5jZMm5BX7CO5hwjCxAnxl4YqKE3idMDaxIzb3+KhF1nOJFl0Mdp/ +/TBt2dzhauH8XwIDAQABo4IBGjCCARYwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw +HQYDVR0OBBYEFBiHVuBud+4kNTxOc5of1uHieX4rMB8GA1UdIwQYMBaAFBiHVuBud+4kNTxOc5of +1uHieX4rMEQGA1UdIAQ9MDswOQYEVR0gADAxMC8GCCsGAQUFBwIBFiNodHRwczovL3d3d3cuY2Vy +dGlnbmEuZnIvYXV0b3JpdGVzLzBtBgNVHR8EZjBkMC+gLaArhilodHRwOi8vY3JsLmNlcnRpZ25h +LmZyL2NlcnRpZ25hcm9vdGNhLmNybDAxoC+gLYYraHR0cDovL2NybC5kaGlteW90aXMuY29tL2Nl +cnRpZ25hcm9vdGNhLmNybDANBgkqhkiG9w0BAQsFAAOCAgEAlLieT/DjlQgi581oQfccVdV8AOIt +OoldaDgvUSILSo3L6btdPrtcPbEo/uRTVRPPoZAbAh1fZkYJMyjhDSSXcNMQH+pkV5a7XdrnxIxP +TGRGHVyH41neQtGbqH6mid2PHMkwgu07nM3A6RngatgCdTer9zQoKJHyBApPNeNgJgH60BGM+RFq +7q89w1DTj18zeTyGqHNFkIwgtnJzFyO+B2XleJINugHA64wcZr+shncBlA2c5uk5jR+mUYyZDDl3 +4bSb+hxnV29qao6pK0xXeXpXIs/NX2NGjVxZOob4Mkdio2cNGJHc+6Zr9UhhcyNZjgKnvETq9Emd +8VRY+WCv2hikLyhF3HqgiIZd8zvn/yk1gPxkQ5Tm4xxvvq0OKmOZK8l+hfZx6AYDlf7ej0gcWtSS +6Cvu5zHbugRqh5jnxV/vfaci9wHYTfmJ0A6aBVmknpjZbyvKcL5kwlWj9Omvw5Ip3IgWJJk8jSaY +tlu3zM63Nwf9JtmYhST/WSMDmu2dnajkXjjO11INb9I/bbEFa0nOipFGc/T2L/Coc3cOZayhjWZS +aX5LaAzHHjcng6WMxwLkFM1JAbBzs/3GkDpv0mztO+7skb6iQ12LAEpmJURw3kAP+HwV96LOPNde +E4yBFxgX0b3xdxA61GU5wSesVywlVP+i2k+KYTlerj1KjL0= +-----END CERTIFICATE----- diff --git a/src/cadolesuser-1.0/vendor/composer/installed.json b/src/cadolesuser-1.0/vendor/composer/installed.json index 939b4e71..ff408bc7 100644 --- a/src/cadolesuser-1.0/vendor/composer/installed.json +++ b/src/cadolesuser-1.0/vendor/composer/installed.json @@ -245,126 +245,6 @@ "iterator" ] }, - { - "name": "twig/twig", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "6a5f676b77a90823c2d4eaf76137b771adf31323" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/6a5f676b77a90823c2d4eaf76137b771adf31323", - "reference": "6a5f676b77a90823c2d4eaf76137b771adf31323", - "shasum": "" - }, - "require": { - "php": "^7.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "~1.0" - }, - "require-dev": { - "psr/container": "^1.0", - "symfony/debug": "^2.7", - "symfony/phpunit-bridge": "^3.3" - }, - "time": "2018-07-13 07:18:09", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Twig_": "lib/" - }, - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - }, - { - "name": "Twig Team", - "homepage": "https://twig.symfony.com/contributors", - "role": "Contributors" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "https://twig.symfony.com", - "keywords": [ - "templating" - ] - }, - { - "name": "paragonie/random_compat", - "version": "v2.0.17", - "version_normalized": "2.0.17.0", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/29af24f25bab834fcbb38ad2a69fa93b867e070d", - "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d", - "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": "2018-07-04 16:31:37", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "lib/random.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ] - }, { "name": "psr/simple-cache", "version": "1.0.1", @@ -962,93 +842,6 @@ "queryobject" ] }, - { - "name": "doctrine/doctrine-bundle", - "version": "1.9.1", - "version_normalized": "1.9.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/DoctrineBundle.git", - "reference": "703fad32e4c8cbe609caf45a71a1d4266c830f0f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/703fad32e4c8cbe609caf45a71a1d4266c830f0f", - "reference": "703fad32e4c8cbe609caf45a71a1d4266c830f0f", - "shasum": "" - }, - "require": { - "doctrine/dbal": "^2.5.12", - "doctrine/doctrine-cache-bundle": "~1.2", - "jdorn/sql-formatter": "^1.2.16", - "php": "^5.5.9|^7.0", - "symfony/console": "~2.7|~3.0|~4.0", - "symfony/dependency-injection": "~2.7|~3.0|~4.0", - "symfony/doctrine-bridge": "~2.7|~3.0|~4.0", - "symfony/framework-bundle": "^2.7.22|~3.0|~4.0" - }, - "conflict": { - "symfony/http-foundation": "<2.6" - }, - "require-dev": { - "doctrine/orm": "~2.4", - "phpunit/phpunit": "^4.8.36|^5.7|^6.4", - "satooshi/php-coveralls": "^1.0", - "symfony/phpunit-bridge": "~2.7|~3.0|~4.0", - "symfony/property-info": "~2.8|~3.0|~4.0", - "symfony/validator": "~2.7|~3.0|~4.0", - "symfony/web-profiler-bundle": "~2.7|~3.0|~4.0", - "symfony/yaml": "~2.7|~3.0|~4.0", - "twig/twig": "~1.26|~2.0" - }, - "suggest": { - "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", - "symfony/web-profiler-bundle": "To use the data collector." - }, - "time": "2018-04-19 14:07:39", - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "1.8.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Bundle\\DoctrineBundle\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Doctrine Project", - "homepage": "http://www.doctrine-project.org/" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony DoctrineBundle", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "database", - "dbal", - "orm", - "persistence" - ] - }, { "name": "doctrine/data-fixtures", "version": "v1.2.2", @@ -1766,12 +1559,12 @@ "version_normalized": "2.5.14.0", "source": { "type": "git", - "url": "https://github.com/doctrine/doctrine2.git", + "url": "https://github.com/doctrine/orm.git", "reference": "810a7baf81462a5ddf10e8baa8cb94b6eec02754" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/810a7baf81462a5ddf10e8baa8cb94b6eec02754", + "url": "https://api.github.com/repos/doctrine/orm/zipball/810a7baf81462a5ddf10e8baa8cb94b6eec02754", "reference": "810a7baf81462a5ddf10e8baa8cb94b6eec02754", "shasum": "" }, @@ -1838,99 +1631,6 @@ "orm" ] }, - { - "name": "doctrine/doctrine-migrations-bundle", - "version": "v1.3.1", - "version_normalized": "1.3.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/DoctrineMigrationsBundle.git", - "reference": "a9e506369f931351a2a6dd2aef588a822802b1b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineMigrationsBundle/zipball/a9e506369f931351a2a6dd2aef588a822802b1b7", - "reference": "a9e506369f931351a2a6dd2aef588a822802b1b7", - "shasum": "" - }, - "require": { - "doctrine/doctrine-bundle": "~1.0", - "doctrine/migrations": "^1.1", - "php": ">=5.4.0", - "symfony/framework-bundle": "~2.7|~3.3|~4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "time": "2017-11-01 09:13:26", - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Bundle\\MigrationsBundle\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Doctrine Project", - "homepage": "http://www.doctrine-project.org" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony DoctrineMigrationsBundle", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "dbal", - "migrations", - "schema" - ] - }, - { - "name": "symfony/orm-pack", - "version": "v1.0.5", - "version_normalized": "1.0.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/orm-pack.git", - "reference": "1b58f752cd917a08c9c8df020781d9c46a2275b1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/orm-pack/zipball/1b58f752cd917a08c9c8df020781d9c46a2275b1", - "reference": "1b58f752cd917a08c9c8df020781d9c46a2275b1", - "shasum": "" - }, - "require": { - "doctrine/doctrine-bundle": "^1.6.10", - "doctrine/doctrine-migrations-bundle": "^1.3", - "doctrine/orm": "^2.5.11", - "php": "^7.0" - }, - "time": "2017-12-12 01:47:50", - "type": "symfony-pack", - "installation-source": "dist", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A pack for the Doctrine ORM" - }, { "name": "symfony/swiftmailer-bundle", "version": "v2.6.7", @@ -2391,163 +2091,6 @@ "shim" ] }, - { - "name": "symfony/symfony", - "version": "v3.4.19", - "version_normalized": "3.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/symfony.git", - "reference": "a8ff5a534372763544031ae68c981d396ffeb43f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/a8ff5a534372763544031ae68c981d396ffeb43f", - "reference": "a8ff5a534372763544031ae68c981d396ffeb43f", - "shasum": "" - }, - "require": { - "doctrine/common": "~2.4", - "ext-xml": "*", - "fig/link-util": "^1.0", - "php": "^5.5.9|>=7.0.8", - "psr/cache": "~1.0", - "psr/container": "^1.0", - "psr/link": "^1.0", - "psr/log": "~1.0", - "psr/simple-cache": "^1.0", - "symfony/polyfill-apcu": "~1.1", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-icu": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php56": "~1.0", - "symfony/polyfill-php70": "~1.6", - "twig/twig": "^1.35|^2.4.4" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "<3.0||>=3.2.0,<3.2.2", - "phpdocumentor/type-resolver": "<0.3.0", - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" - }, - "provide": { - "psr/cache-implementation": "1.0", - "psr/container-implementation": "1.0", - "psr/log-implementation": "1.0", - "psr/simple-cache-implementation": "1.0" - }, - "replace": { - "symfony/asset": "self.version", - "symfony/browser-kit": "self.version", - "symfony/cache": "self.version", - "symfony/class-loader": "self.version", - "symfony/config": "self.version", - "symfony/console": "self.version", - "symfony/css-selector": "self.version", - "symfony/debug": "self.version", - "symfony/debug-bundle": "self.version", - "symfony/dependency-injection": "self.version", - "symfony/doctrine-bridge": "self.version", - "symfony/dom-crawler": "self.version", - "symfony/dotenv": "self.version", - "symfony/event-dispatcher": "self.version", - "symfony/expression-language": "self.version", - "symfony/filesystem": "self.version", - "symfony/finder": "self.version", - "symfony/form": "self.version", - "symfony/framework-bundle": "self.version", - "symfony/http-foundation": "self.version", - "symfony/http-kernel": "self.version", - "symfony/inflector": "self.version", - "symfony/intl": "self.version", - "symfony/ldap": "self.version", - "symfony/lock": "self.version", - "symfony/monolog-bridge": "self.version", - "symfony/options-resolver": "self.version", - "symfony/process": "self.version", - "symfony/property-access": "self.version", - "symfony/property-info": "self.version", - "symfony/proxy-manager-bridge": "self.version", - "symfony/routing": "self.version", - "symfony/security": "self.version", - "symfony/security-bundle": "self.version", - "symfony/security-core": "self.version", - "symfony/security-csrf": "self.version", - "symfony/security-guard": "self.version", - "symfony/security-http": "self.version", - "symfony/serializer": "self.version", - "symfony/stopwatch": "self.version", - "symfony/templating": "self.version", - "symfony/translation": "self.version", - "symfony/twig-bridge": "self.version", - "symfony/twig-bundle": "self.version", - "symfony/validator": "self.version", - "symfony/var-dumper": "self.version", - "symfony/web-link": "self.version", - "symfony/web-profiler-bundle": "self.version", - "symfony/web-server-bundle": "self.version", - "symfony/workflow": "self.version", - "symfony/yaml": "self.version" - }, - "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/annotations": "~1.0", - "doctrine/cache": "~1.6", - "doctrine/data-fixtures": "1.0.*", - "doctrine/dbal": "~2.4", - "doctrine/doctrine-bundle": "~1.4", - "doctrine/orm": "~2.4,>=2.4.5", - "egulias/email-validator": "~1.2,>=1.2.8|~2.0", - "monolog/monolog": "~1.11", - "ocramius/proxy-manager": "~0.4|~1.0|~2.0", - "phpdocumentor/reflection-docblock": "^3.0|^4.0", - "predis/predis": "~1.0", - "symfony/phpunit-bridge": "~3.4|~4.0", - "symfony/security-acl": "~2.8|~3.0" - }, - "time": "2018-11-26 14:07:44", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/", - "Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/", - "Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/", - "Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/", - "Symfony\\Bundle\\": "src/Symfony/Bundle/", - "Symfony\\Component\\": "src/Symfony/Component/" - }, - "classmap": [ - "src/Symfony/Component/Intl/Resources/stubs" - ], - "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": "The Symfony PHP framework", - "homepage": "https://symfony.com", - "keywords": [ - "framework" - ] - }, { "name": "symfony/polyfill-intl-icu", "version": "v1.10.0", @@ -3003,239 +2546,6 @@ "uuid" ] }, - { - "name": "composer/ca-bundle", - "version": "1.1.3", - "version_normalized": "1.1.3.0", - "source": { - "type": "git", - "url": "https://github.com/composer/ca-bundle.git", - "reference": "8afa52cd417f4ec417b4bfe86b68106538a87660" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/8afa52cd417f4ec417b4bfe86b68106538a87660", - "reference": "8afa52cd417f4ec417b4bfe86b68106538a87660", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "ext-pcre": "*", - "php": "^5.3.2 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5", - "psr/log": "^1.0", - "symfony/process": "^2.5 || ^3.0 || ^4.0" - }, - "time": "2018-10-18 06:09:13", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Composer\\CaBundle\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", - "keywords": [ - "cabundle", - "cacert", - "certificate", - "ssl", - "tls" - ] - }, - { - "name": "sensiolabs/security-checker", - "version": "v5.0.1", - "version_normalized": "5.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/sensiolabs/security-checker.git", - "reference": "9ea927417c949039a9cfb0d92af76fd1c538d9e9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/9ea927417c949039a9cfb0d92af76fd1c538d9e9", - "reference": "9ea927417c949039a9cfb0d92af76fd1c538d9e9", - "shasum": "" - }, - "require": { - "composer/ca-bundle": "^1.0", - "php": ">=5.5.9", - "symfony/console": "~2.7|~3.0|~4.0" - }, - "time": "2018-10-16 10:30:44", - "bin": [ - "security-checker" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "SensioLabs\\Security\\": "SensioLabs/Security" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien.potencier@gmail.com" - } - ], - "description": "A security checker for your composer.lock" - }, - { - "name": "sensio/distribution-bundle", - "version": "v5.0.23", - "version_normalized": "5.0.23.0", - "source": { - "type": "git", - "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", - "reference": "088b116a0e27faa0e1a7384dd4f3f6a9d5a8a3b6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/088b116a0e27faa0e1a7384dd4f3f6a9d5a8a3b6", - "reference": "088b116a0e27faa0e1a7384dd4f3f6a9d5a8a3b6", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "sensiolabs/security-checker": "~5.0", - "symfony/class-loader": "~2.3|~3.0", - "symfony/config": "~2.3|~3.0", - "symfony/dependency-injection": "~2.3|~3.0", - "symfony/filesystem": "~2.3|~3.0", - "symfony/http-kernel": "~2.3|~3.0", - "symfony/process": "~2.3|~3.0" - }, - "time": "2018-10-25 15:26:23", - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Sensio\\Bundle\\DistributionBundle\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Base bundle for Symfony Distributions", - "keywords": [ - "configuration", - "distribution" - ] - }, - { - "name": "sensio/framework-extra-bundle", - "version": "v5.2.2", - "version_normalized": "5.2.2.0", - "source": { - "type": "git", - "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", - "reference": "9ef408febe2f12e70118ef61c6515035a06c5830" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/9ef408febe2f12e70118ef61c6515035a06c5830", - "reference": "9ef408febe2f12e70118ef61c6515035a06c5830", - "shasum": "" - }, - "require": { - "doctrine/common": "^2.2", - "symfony/config": "^3.3|^4.0", - "symfony/dependency-injection": "^3.3|^4.0", - "symfony/framework-bundle": "^3.4|^4.0", - "symfony/http-kernel": "^3.3|^4.0" - }, - "require-dev": { - "doctrine/doctrine-bundle": "^1.6", - "doctrine/orm": "^2.5", - "symfony/browser-kit": "^3.3|^4.0", - "symfony/dom-crawler": "^3.3|^4.0", - "symfony/expression-language": "^3.3|^4.0", - "symfony/finder": "^3.3|^4.0", - "symfony/monolog-bridge": "^3.0|^4.0", - "symfony/monolog-bundle": "^3.2", - "symfony/phpunit-bridge": "^3.3|^4.0", - "symfony/psr-http-message-bridge": "^0.3", - "symfony/security-bundle": "^3.3|^4.0", - "symfony/twig-bundle": "^3.3|^4.0", - "symfony/yaml": "^3.3|^4.0", - "twig/twig": "~1.12|~2.0", - "zendframework/zend-diactoros": "^1.3" - }, - "suggest": { - "symfony/expression-language": "", - "symfony/psr-http-message-bridge": "To use the PSR-7 converters", - "symfony/security-bundle": "" - }, - "time": "2018-10-26 14:09:02", - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "5.2.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Sensio\\Bundle\\FrameworkExtraBundle\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "This bundle provides a way to configure your controllers with annotations", - "keywords": [ - "annotations", - "controllers" - ] - }, { "name": "monolog/monolog", "version": "1.24.0", @@ -3381,195 +2691,6 @@ "logging" ] }, - { - "name": "nikic/php-parser", - "version": "v4.1.0", - "version_normalized": "4.1.0.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "d0230c5c77a7e3cfa69446febf340978540958c0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/d0230c5c77a7e3cfa69446febf340978540958c0", - "reference": "d0230c5c77a7e3cfa69446febf340978540958c0", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.5 || ^7.0" - }, - "time": "2018-10-10 09:24:14", - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.1-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": "symfony/maker-bundle", - "version": "v1.9.0", - "version_normalized": "1.9.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/maker-bundle.git", - "reference": "e873047b6022a0343c9354f65d5d47b9e351dd53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/maker-bundle/zipball/e873047b6022a0343c9354f65d5d47b9e351dd53", - "reference": "e873047b6022a0343c9354f65d5d47b9e351dd53", - "shasum": "" - }, - "require": { - "doctrine/inflector": "^1.2", - "nikic/php-parser": "^4.0", - "php": "^7.0.8", - "symfony/config": "^3.4|^4.0", - "symfony/console": "^3.4|^4.0", - "symfony/dependency-injection": "^3.4|^4.0", - "symfony/filesystem": "^3.4|^4.0", - "symfony/finder": "^3.4|^4.0", - "symfony/framework-bundle": "^3.4|^4.0", - "symfony/http-kernel": "^3.4|^4.0" - }, - "require-dev": { - "allocine/twigcs": "^3.0", - "doctrine/doctrine-bundle": "^1.8", - "doctrine/orm": "^2.3", - "friendsofphp/php-cs-fixer": "^2.8", - "symfony/phpunit-bridge": "^3.4|^4.0", - "symfony/process": "^3.4|^4.0", - "symfony/yaml": "^3.4|^4.0" - }, - "time": "2018-11-03 18:25:11", - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Bundle\\MakerBundle\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.", - "homepage": "https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html", - "keywords": [ - "code generator", - "generator", - "scaffold", - "scaffolding" - ] - }, - { - "name": "symfony/phpunit-bridge", - "version": "v3.4.19", - "version_normalized": "3.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "2155067dfc73e0e77dbc26f236af17e4df552de5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/2155067dfc73e0e77dbc26f236af17e4df552de5", - "reference": "2155067dfc73e0e77dbc26f236af17e4df552de5", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" - }, - "suggest": { - "ext-zip": "Zip support is required when using bin/simple-phpunit", - "symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader" - }, - "time": "2018-11-20 16:47:12", - "bin": [ - "bin/simple-phpunit" - ], - "type": "symfony-bridge", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - }, - "thanks": { - "name": "phpunit/phpunit", - "url": "https://github.com/sebastianbergmann/phpunit" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Bridge\\PhpUnit\\": "" - }, - "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 PHPUnit Bridge", - "homepage": "https://symfony.com" - }, { "name": "swiftmailer/swiftmailer", "version": "v5.4.12", @@ -3625,5 +2746,1152 @@ "mail", "mailer" ] + }, + { + "name": "twig/twig", + "version": "v2.6.2", + "version_normalized": "2.6.2.0", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "7d7342c8a4059fefb9b8d07db0cc14007021f9b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/7d7342c8a4059fefb9b8d07db0cc14007021f9b7", + "reference": "7d7342c8a4059fefb9b8d07db0cc14007021f9b7", + "shasum": "" + }, + "require": { + "php": "^7.0", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-mbstring": "^1.3" + }, + "require-dev": { + "psr/container": "^1.0", + "symfony/debug": "^2.7", + "symfony/phpunit-bridge": "^3.4.19|^4.1.8" + }, + "time": "2019-01-14 15:00:48", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Twig_": "lib/" + }, + "psr-4": { + "Twig\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + }, + { + "name": "Twig Team", + "homepage": "https://twig.symfony.com/contributors", + "role": "Contributors" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "https://twig.symfony.com", + "keywords": [ + "templating" + ] + }, + { + "name": "paragonie/random_compat", + "version": "v2.0.18", + "version_normalized": "2.0.18.0", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", + "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", + "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": "2019-01-03 20:59:08", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ] + }, + { + "name": "symfony/symfony", + "version": "v3.4.23", + "version_normalized": "3.4.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/symfony.git", + "reference": "336cf12e5e82d71874e8522e0879794340351b56" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/symfony/zipball/336cf12e5e82d71874e8522e0879794340351b56", + "reference": "336cf12e5e82d71874e8522e0879794340351b56", + "shasum": "" + }, + "require": { + "doctrine/common": "~2.4", + "ext-xml": "*", + "fig/link-util": "^1.0", + "php": "^5.5.9|>=7.0.8", + "psr/cache": "~1.0", + "psr/container": "^1.0", + "psr/link": "^1.0", + "psr/log": "~1.0", + "psr/simple-cache": "^1.0", + "symfony/polyfill-apcu": "~1.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php56": "~1.0", + "symfony/polyfill-php70": "~1.6", + "twig/twig": "^1.35|^2.4.4" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<3.0||>=3.2.0,<3.2.2", + "phpdocumentor/type-resolver": "<0.3.0", + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + }, + "provide": { + "psr/cache-implementation": "1.0", + "psr/container-implementation": "1.0", + "psr/log-implementation": "1.0", + "psr/simple-cache-implementation": "1.0" + }, + "replace": { + "symfony/asset": "self.version", + "symfony/browser-kit": "self.version", + "symfony/cache": "self.version", + "symfony/class-loader": "self.version", + "symfony/config": "self.version", + "symfony/console": "self.version", + "symfony/css-selector": "self.version", + "symfony/debug": "self.version", + "symfony/debug-bundle": "self.version", + "symfony/dependency-injection": "self.version", + "symfony/doctrine-bridge": "self.version", + "symfony/dom-crawler": "self.version", + "symfony/dotenv": "self.version", + "symfony/event-dispatcher": "self.version", + "symfony/expression-language": "self.version", + "symfony/filesystem": "self.version", + "symfony/finder": "self.version", + "symfony/form": "self.version", + "symfony/framework-bundle": "self.version", + "symfony/http-foundation": "self.version", + "symfony/http-kernel": "self.version", + "symfony/inflector": "self.version", + "symfony/intl": "self.version", + "symfony/ldap": "self.version", + "symfony/lock": "self.version", + "symfony/monolog-bridge": "self.version", + "symfony/options-resolver": "self.version", + "symfony/process": "self.version", + "symfony/property-access": "self.version", + "symfony/property-info": "self.version", + "symfony/proxy-manager-bridge": "self.version", + "symfony/routing": "self.version", + "symfony/security": "self.version", + "symfony/security-bundle": "self.version", + "symfony/security-core": "self.version", + "symfony/security-csrf": "self.version", + "symfony/security-guard": "self.version", + "symfony/security-http": "self.version", + "symfony/serializer": "self.version", + "symfony/stopwatch": "self.version", + "symfony/templating": "self.version", + "symfony/translation": "self.version", + "symfony/twig-bridge": "self.version", + "symfony/twig-bundle": "self.version", + "symfony/validator": "self.version", + "symfony/var-dumper": "self.version", + "symfony/web-link": "self.version", + "symfony/web-profiler-bundle": "self.version", + "symfony/web-server-bundle": "self.version", + "symfony/workflow": "self.version", + "symfony/yaml": "self.version" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/annotations": "~1.0", + "doctrine/cache": "~1.6", + "doctrine/data-fixtures": "1.0.*", + "doctrine/dbal": "~2.4", + "doctrine/doctrine-bundle": "~1.4", + "doctrine/orm": "~2.4,>=2.4.5", + "egulias/email-validator": "~1.2,>=1.2.8|~2.0", + "monolog/monolog": "~1.11", + "ocramius/proxy-manager": "~0.4|~1.0|~2.0", + "phpdocumentor/reflection-docblock": "^3.0|^4.0", + "predis/predis": "~1.0", + "symfony/phpunit-bridge": "~3.4|~4.0", + "symfony/security-acl": "~2.8|~3.0" + }, + "time": "2019-03-03 18:52:48", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/", + "Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/", + "Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/", + "Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/", + "Symfony\\Bundle\\": "src/Symfony/Bundle/", + "Symfony\\Component\\": "src/Symfony/Component/" + }, + "classmap": [ + "src/Symfony/Component/Intl/Resources/stubs" + ], + "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": "The Symfony PHP framework", + "homepage": "https://symfony.com", + "keywords": [ + "framework" + ] + }, + { + "name": "composer/ca-bundle", + "version": "1.1.4", + "version_normalized": "1.1.4.0", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "558f321c52faeb4828c03e7dc0cfe39a09e09a2d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/558f321c52faeb4828c03e7dc0cfe39a09e09a2d", + "reference": "558f321c52faeb4828c03e7dc0cfe39a09e09a2d", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5", + "psr/log": "^1.0", + "symfony/process": "^2.5 || ^3.0 || ^4.0" + }, + "time": "2019-01-28 09:30:10", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ] + }, + { + "name": "sensiolabs/security-checker", + "version": "v5.0.3", + "version_normalized": "5.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/security-checker.git", + "reference": "46be3f58adac13084497961e10eed9a7fb4d44d1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/46be3f58adac13084497961e10eed9a7fb4d44d1", + "reference": "46be3f58adac13084497961e10eed9a7fb4d44d1", + "shasum": "" + }, + "require": { + "composer/ca-bundle": "^1.0", + "php": ">=5.5.9", + "symfony/console": "~2.7|~3.0|~4.0" + }, + "time": "2018-12-19 17:14:59", + "bin": [ + "security-checker" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "SensioLabs\\Security\\": "SensioLabs/Security" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien.potencier@gmail.com" + } + ], + "description": "A security checker for your composer.lock" + }, + { + "name": "sensio/distribution-bundle", + "version": "v5.0.24", + "version_normalized": "5.0.24.0", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", + "reference": "59eac70f15f97ee945924948a6f5e2f6f86b7a4b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/59eac70f15f97ee945924948a6f5e2f6f86b7a4b", + "reference": "59eac70f15f97ee945924948a6f5e2f6f86b7a4b", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "sensiolabs/security-checker": "~5.0", + "symfony/class-loader": "~2.3|~3.0", + "symfony/config": "~2.3|~3.0", + "symfony/dependency-injection": "~2.3|~3.0", + "symfony/filesystem": "~2.3|~3.0", + "symfony/http-kernel": "~2.3|~3.0", + "symfony/process": "~2.3|~3.0" + }, + "time": "2018-12-14 17:36:15", + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Sensio\\Bundle\\DistributionBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Base bundle for Symfony Distributions", + "keywords": [ + "configuration", + "distribution" + ] + }, + { + "name": "sensio/framework-extra-bundle", + "version": "v5.2.4", + "version_normalized": "5.2.4.0", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", + "reference": "1fdf591c4b388e62dbb2579de89c1560b33f865d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/1fdf591c4b388e62dbb2579de89c1560b33f865d", + "reference": "1fdf591c4b388e62dbb2579de89c1560b33f865d", + "shasum": "" + }, + "require": { + "doctrine/common": "^2.2", + "symfony/config": "^3.3|^4.0", + "symfony/dependency-injection": "^3.3|^4.0", + "symfony/framework-bundle": "^3.4|^4.0", + "symfony/http-kernel": "^3.3|^4.0" + }, + "require-dev": { + "doctrine/doctrine-bundle": "^1.6", + "doctrine/orm": "^2.5", + "symfony/browser-kit": "^3.3|^4.0", + "symfony/dom-crawler": "^3.3|^4.0", + "symfony/expression-language": "^3.3|^4.0", + "symfony/finder": "^3.3|^4.0", + "symfony/monolog-bridge": "^3.0|^4.0", + "symfony/monolog-bundle": "^3.2", + "symfony/phpunit-bridge": "^3.4.19|^4.1.8", + "symfony/psr-http-message-bridge": "^0.3", + "symfony/security-bundle": "^3.3|^4.0", + "symfony/twig-bundle": "^3.3|^4.0", + "symfony/yaml": "^3.3|^4.0", + "twig/twig": "~1.12|~2.0", + "zendframework/zend-diactoros": "^1.3" + }, + "suggest": { + "symfony/expression-language": "", + "symfony/psr-http-message-bridge": "To use the PSR-7 converters", + "symfony/security-bundle": "" + }, + "time": "2018-12-11 16:59:23", + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "5.2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Sensio\\Bundle\\FrameworkExtraBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "This bundle provides a way to configure your controllers with annotations", + "keywords": [ + "annotations", + "controllers" + ] + }, + { + "name": "doctrine/doctrine-bundle", + "version": "1.10.2", + "version_normalized": "1.10.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineBundle.git", + "reference": "1f99e6645030542079c57d4680601a4a8778a1bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/1f99e6645030542079c57d4680601a4a8778a1bd", + "reference": "1f99e6645030542079c57d4680601a4a8778a1bd", + "shasum": "" + }, + "require": { + "doctrine/dbal": "^2.5.12", + "doctrine/doctrine-cache-bundle": "~1.2", + "jdorn/sql-formatter": "^1.2.16", + "php": "^5.5.9|^7.0", + "symfony/console": "~2.7|~3.0|~4.0", + "symfony/dependency-injection": "~2.7|~3.0|~4.0", + "symfony/doctrine-bridge": "~2.7|~3.0|~4.0", + "symfony/framework-bundle": "^2.7.22|~3.0|~4.0" + }, + "conflict": { + "symfony/http-foundation": "<2.6" + }, + "require-dev": { + "doctrine/orm": "~2.4", + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^4.8.36|^5.7|^6.4", + "symfony/phpunit-bridge": "~2.7|~3.0|~4.0", + "symfony/property-info": "~2.8|~3.0|~4.0", + "symfony/validator": "~2.7|~3.0|~4.0", + "symfony/web-profiler-bundle": "~2.7|~3.0|~4.0", + "symfony/yaml": "~2.7|~3.0|~4.0", + "twig/twig": "~1.26|~2.0" + }, + "suggest": { + "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", + "symfony/web-profiler-bundle": "To use the data collector." + }, + "time": "2019-02-06 13:18:04", + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.9.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\DoctrineBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Doctrine Project", + "homepage": "http://www.doctrine-project.org/" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony DoctrineBundle", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "dbal", + "orm", + "persistence" + ] + }, + { + "name": "doctrine/doctrine-migrations-bundle", + "version": "v1.3.2", + "version_normalized": "1.3.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineMigrationsBundle.git", + "reference": "49fa399181db4bf4f9f725126bd1cb65c4398dce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineMigrationsBundle/zipball/49fa399181db4bf4f9f725126bd1cb65c4398dce", + "reference": "49fa399181db4bf4f9f725126bd1cb65c4398dce", + "shasum": "" + }, + "require": { + "doctrine/doctrine-bundle": "~1.0", + "doctrine/migrations": "^1.1", + "php": ">=5.4.0", + "symfony/framework-bundle": "~2.7|~3.3|~4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^7.4" + }, + "time": "2018-12-03 11:55:33", + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\MigrationsBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Doctrine Project", + "homepage": "http://www.doctrine-project.org" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony DoctrineMigrationsBundle", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "dbal", + "migrations", + "schema" + ] + }, + { + "name": "symfony/orm-pack", + "version": "v1.0.6", + "version_normalized": "1.0.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/orm-pack.git", + "reference": "36c2a928482dc5f05c5c1c1b947242ae03ff1335" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/orm-pack/zipball/36c2a928482dc5f05c5c1c1b947242ae03ff1335", + "reference": "36c2a928482dc5f05c5c1c1b947242ae03ff1335", + "shasum": "" + }, + "require": { + "doctrine/doctrine-bundle": "^1.6.10", + "doctrine/doctrine-migrations-bundle": "^1.3|^2.0", + "doctrine/orm": "^2.5.11", + "php": "^7.0" + }, + "time": "2019-01-16 09:49:15", + "type": "symfony-pack", + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A pack for the Doctrine ORM" + }, + { + "name": "nikic/php-parser", + "version": "v4.2.1", + "version_normalized": "4.2.1.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "5221f49a608808c1e4d436df32884cbc1b821ac0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/5221f49a608808c1e4d436df32884cbc1b821ac0", + "reference": "5221f49a608808c1e4d436df32884cbc1b821ac0", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.5 || ^7.0" + }, + "time": "2019-02-16 20:54:15", + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-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": "symfony/maker-bundle", + "version": "v1.11.4", + "version_normalized": "1.11.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/maker-bundle.git", + "reference": "540996bfdcc14ca38dfe4865c020d965020ae821" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/maker-bundle/zipball/540996bfdcc14ca38dfe4865c020d965020ae821", + "reference": "540996bfdcc14ca38dfe4865c020d965020ae821", + "shasum": "" + }, + "require": { + "doctrine/inflector": "^1.2", + "nikic/php-parser": "^4.0", + "php": "^7.0.8", + "symfony/config": "^3.4|^4.0", + "symfony/console": "^3.4|^4.0", + "symfony/dependency-injection": "^3.4|^4.0", + "symfony/filesystem": "^3.4|^4.0", + "symfony/finder": "^3.4|^4.0", + "symfony/framework-bundle": "^3.4|^4.0", + "symfony/http-kernel": "^3.4|^4.0" + }, + "require-dev": { + "allocine/twigcs": "^3.0", + "doctrine/doctrine-bundle": "^1.8", + "doctrine/orm": "^2.3", + "friendsofphp/php-cs-fixer": "^2.8", + "symfony/phpunit-bridge": "^3.4|^4.0", + "symfony/process": "^3.4|^4.0", + "symfony/yaml": "^3.4|^4.0" + }, + "time": "2019-03-01 20:45:16", + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Bundle\\MakerBundle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.", + "homepage": "https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html", + "keywords": [ + "code generator", + "generator", + "scaffold", + "scaffolding" + ] + }, + { + "name": "symfony/phpunit-bridge", + "version": "v3.4.23", + "version_normalized": "3.4.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/phpunit-bridge.git", + "reference": "b539f37134c10edbf85dc0567be4151c56870f5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/b539f37134c10edbf85dc0567be4151c56870f5e", + "reference": "b539f37134c10edbf85dc0567be4151c56870f5e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + }, + "suggest": { + "symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader" + }, + "time": "2019-02-16 18:50:26", + "bin": [ + "bin/simple-phpunit" + ], + "type": "symfony-bridge", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + }, + "thanks": { + "name": "phpunit/phpunit", + "url": "https://github.com/sebastianbergmann/phpunit" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Bridge\\PhpUnit\\": "" + }, + "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 PHPUnit Bridge", + "homepage": "https://symfony.com" + }, + { + "name": "robrichards/xmlseclibs", + "version": "3.0.3", + "version_normalized": "3.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/robrichards/xmlseclibs.git", + "reference": "406c68ac9124db033d079284b719958b829cb830" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/robrichards/xmlseclibs/zipball/406c68ac9124db033d079284b719958b829cb830", + "reference": "406c68ac9124db033d079284b719958b829cb830", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "php": ">= 5.4" + }, + "time": "2018-11-15 11:59:02", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "RobRichards\\XMLSecLibs\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "A PHP library for XML Security", + "homepage": "https://github.com/robrichards/xmlseclibs", + "keywords": [ + "security", + "signature", + "xml", + "xmldsig" + ] + }, + { + "name": "lightsaml/lightsaml", + "version": "1.4.1", + "version_normalized": "1.4.1.0", + "source": { + "type": "git", + "url": "https://github.com/lightSAML/lightSAML.git", + "reference": "377f04d1fb25f2fb2e72dabeff10b336f1cbe4c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lightSAML/lightSAML/zipball/377f04d1fb25f2fb2e72dabeff10b336f1cbe4c5", + "reference": "377f04d1fb25f2fb2e72dabeff10b336f1cbe4c5", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "robrichards/xmlseclibs": "~2.0|~3.0|~4.0", + "symfony/event-dispatcher": "~2.3|~3.0|~4.0", + "symfony/http-foundation": "~2.3|~3.0|~4.0" + }, + "require-dev": { + "monolog/monolog": "~1.3", + "phpunit/phpunit": ">=5.7", + "pimple/pimple": "~3.0", + "symfony/css-selector": "~2.3|~3.0|~4.0", + "symfony/dom-crawler": "~2.3|~3.0|~4.0" + }, + "suggest": { + "lightsaml/sp-bundle": "Symfony 2 SP security bundle", + "lightsaml/symfony-bridge": "Symfony 2 build container bridge" + }, + "time": "2018-05-28 11:21:22", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "LightSaml\\Tests\\": "tests/", + "LightSaml\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Milos Tomic", + "email": "tmilos@gmail.com", + "homepage": "https://github.com/tmilos/", + "role": "Developer" + } + ], + "description": "Light SAML 2.0 PHP library", + "homepage": "https://www.lightsaml.com/", + "keywords": [ + "SAML 2.0", + "Single Logout", + "Single SignOn", + "library", + "lightSAML", + "php" + ] + }, + { + "name": "lightsaml/symfony-bridge", + "version": "1.3.0", + "version_normalized": "1.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/lightSAML/SymfonyBridgeBundle.git", + "reference": "8d3120825032a7468e894d0ae68630f21cd6035b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lightSAML/SymfonyBridgeBundle/zipball/8d3120825032a7468e894d0ae68630f21cd6035b", + "reference": "8d3120825032a7468e894d0ae68630f21cd6035b", + "shasum": "" + }, + "require": { + "lightsaml/lightsaml": "~1.1", + "php": ">=5.5.1", + "symfony/dependency-injection": "~2.7|~3.0|~4.0", + "symfony/framework-bundle": "~2.7|~3.0|~4.0", + "symfony/yaml": "~2.7|~3.0|~4.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "~2.0", + "phpunit/phpunit": "^5.7", + "symfony/browser-kit": "~2.7|~3.0|~4.0", + "symfony/filesystem": "~2.7|~3.0|~4.0", + "symfony/finder": "~2.7|~3.0|~4.0", + "symfony/routing": "~2.7|~3.0|~4.0" + }, + "suggest": { + "lightsaml/lightsamp-idp": "If you will be using IDP LightSAML services" + }, + "time": "2018-05-23 08:11:59", + "type": "symfony-bundle", + "installation-source": "dist", + "autoload": { + "psr-0": { + "LightSaml\\SymfonyBridgeBundle\\Tests\\": "tests/", + "LightSaml\\SymfonyBridgeBundle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Milos Tomic", + "email": "tmilos@gmail.com", + "homepage": "http://github.com/tmilos", + "role": "Developer" + } + ], + "description": "Light SAML Symfony bridge bundle", + "homepage": "http://www.lightsaml.com" + }, + { + "name": "lightsaml/sp-bundle", + "version": "1.2.0", + "version_normalized": "1.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/lightSAML/SpBundle.git", + "reference": "b31182d23d93b696305f57f9a66d6770a53d5f8e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lightSAML/SpBundle/zipball/b31182d23d93b696305f57f9a66d6770a53d5f8e", + "reference": "b31182d23d93b696305f57f9a66d6770a53d5f8e", + "shasum": "" + }, + "require": { + "lightsaml/symfony-bridge": "~1.3", + "php": ">=5.6", + "symfony/framework-bundle": "~2.7|~3.0|~4.0", + "symfony/security-bundle": "~2.7|~3.0|~4.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7", + "sebastian/comparator": "^1.2.4|~2.0|~3.0", + "symfony/monolog-bundle": "~2.7|~3.0|~4.0", + "symfony/symfony": "~2.7|~3.0|~4.0" + }, + "time": "2018-05-23 09:11:16", + "type": "symfony-bundle", + "installation-source": "dist", + "autoload": { + "psr-0": { + "LightSaml\\SpBundle\\Tests\\": "tests/", + "LightSaml\\SpBundle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Milos Tomic", + "email": "tmilos@gmail.com", + "homepage": "http://github.com/tmilos", + "role": "Developer" + } + ], + "description": "Light SAML2 SP Symfony Bundle", + "homepage": "http://www.lightsaml.com/SP-Bundle/" + }, + { + "name": "jasig/phpcas", + "version": "1.3.6", + "version_normalized": "1.3.6.0", + "source": { + "type": "git", + "url": "https://github.com/apereo/phpCAS.git", + "reference": "7972833e84f6ee5fa41f1479eab5d855109627f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/apereo/phpCAS/zipball/7972833e84f6ee5fa41f1479eab5d855109627f5", + "reference": "7972833e84f6ee5fa41f1479eab5d855109627f5", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.10" + }, + "time": "2018-10-25 20:22:09", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "source/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Joachim Fritschi", + "homepage": "https://wiki.jasig.org/display/~fritschi" + }, + { + "name": "Adam Franco", + "homepage": "https://wiki.jasig.org/display/~adamfranco" + } + ], + "description": "Provides a simple API for authenticating users against a CAS server", + "homepage": "https://wiki.jasig.org/display/CASC/phpCAS", + "keywords": [ + "apereo", + "cas", + "jasig" + ] } ] diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/CreateDatabaseDoctrineCommand.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/CreateDatabaseDoctrineCommand.php index d5de6f76..a4c645c9 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/CreateDatabaseDoctrineCommand.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/CreateDatabaseDoctrineCommand.php @@ -3,12 +3,16 @@ namespace Doctrine\Bundle\DoctrineBundle\Command; use Doctrine\DBAL\DriverManager; +use Exception; +use InvalidArgumentException; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; /** - * Database tool allows you to easily drop and create your configured databases. + * Database tool allows you to easily create your configured databases. + * + * @final */ class CreateDatabaseDoctrineCommand extends DoctrineCommand { @@ -41,8 +45,8 @@ EOT protected function execute(InputInterface $input, OutputInterface $output) { $connectionName = $input->getOption('connection'); - if (empty($connectionName) === true) { - $connectionName = $this->getContainer()->get('doctrine')->getDefaultConnectionName(); + if (empty($connectionName)) { + $connectionName = $this->getDoctrine()->getDefaultConnectionName(); } $connection = $this->getDoctrineConnection($connectionName); @@ -59,13 +63,13 @@ EOT $shards = $params['shards']; // Default select global $params = array_merge($params, $params['global']); - unset($params['global']['dbname']); + unset($params['global']['dbname'], $params['global']['path'], $params['global']['url']); if ($input->getOption('shard')) { foreach ($shards as $i => $shard) { if ($shard['id'] === (int) $input->getOption('shard')) { // Select sharded database $params = array_merge($params, $shard); - unset($params['shards'][$i]['dbname'], $params['id']); + unset($params['shards'][$i]['dbname'], $params['shards'][$i]['path'], $params['shards'][$i]['url'], $params['id']); break; } } @@ -75,7 +79,7 @@ EOT $hasPath = isset($params['path']); $name = $hasPath ? $params['path'] : (isset($params['dbname']) ? $params['dbname'] : false); if (! $name) { - throw new \InvalidArgumentException("Connection does not contain a 'path' or 'dbname' parameter and cannot be dropped."); + throw new InvalidArgumentException("Connection does not contain a 'path' or 'dbname' parameter and cannot be created."); } // Need to get rid of _every_ occurrence of dbname from connection configuration and we have already extracted all relevant info from url unset($params['dbname'], $params['path'], $params['url']); @@ -97,7 +101,7 @@ EOT $tmpConnection->getSchemaManager()->createDatabase($name); $output->writeln(sprintf('Created database %s for connection named %s', $name, $connectionName)); } - } catch (\Exception $e) { + } catch (Exception $e) { $output->writeln(sprintf('Could not create database %s for connection named %s', $name, $connectionName)); $output->writeln(sprintf('%s', $e->getMessage())); $error = true; diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/DoctrineCommand.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/DoctrineCommand.php index a8f0ef86..e881d02a 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/DoctrineCommand.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/DoctrineCommand.php @@ -2,17 +2,64 @@ namespace Doctrine\Bundle\DoctrineBundle\Command; +use Doctrine\Common\Persistence\ManagerRegistry; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Sharding\PoolingShardConnection; use Doctrine\ORM\EntityManager; use Doctrine\ORM\Tools\EntityGenerator; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use LogicException; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Base class for Doctrine console commands to extend from. + * + * @internal */ -abstract class DoctrineCommand extends ContainerAwareCommand +abstract class DoctrineCommand extends Command { + /** @var ManagerRegistry|null */ + private $doctrine; + + /** @var ContainerInterface|null */ + private $container; + + public function __construct(ManagerRegistry $doctrine = null) + { + parent::__construct(); + + $this->doctrine = $doctrine; + } + + /** + * @deprecated + */ + public function setContainer(ContainerInterface $container = null) + { + $this->container = $container; + } + + /** + * @deprecated + * + * @return ContainerInterface + * + * @throws LogicException + */ + protected function getContainer() + { + if ($this->container === null) { + $application = $this->getApplication(); + if ($application === null) { + throw new LogicException('The container cannot be retrieved as the application instance is not yet set.'); + } + + $this->container = $application->getKernel()->getContainer(); + } + + return $this->container; + } + /** * get a doctrine entity generator * @@ -35,17 +82,17 @@ abstract class DoctrineCommand extends ContainerAwareCommand * Get a doctrine entity manager by symfony name. * * @param string $name - * @param null|int $shardId + * @param int|null $shardId * * @return EntityManager */ protected function getEntityManager($name, $shardId = null) { - $manager = $this->getContainer()->get('doctrine')->getManager($name); + $manager = $this->getDoctrine()->getManager($name); if ($shardId) { if (! $manager->getConnection() instanceof PoolingShardConnection) { - throw new \LogicException(sprintf("Connection of EntityManager '%s' must implement shards configuration.", $name)); + throw new LogicException(sprintf("Connection of EntityManager '%s' must implement shards configuration.", $name)); } $manager->getConnection()->connect($shardId); @@ -63,6 +110,14 @@ abstract class DoctrineCommand extends ContainerAwareCommand */ protected function getDoctrineConnection($name) { - return $this->getContainer()->get('doctrine')->getConnection($name); + return $this->getDoctrine()->getConnection($name); + } + + /** + * @return ManagerRegistry + */ + protected function getDoctrine() + { + return $this->doctrine ?: $this->doctrine = $this->getContainer()->get('doctrine'); } } diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/DropDatabaseDoctrineCommand.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/DropDatabaseDoctrineCommand.php index 8c257b78..e34442e4 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/DropDatabaseDoctrineCommand.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/DropDatabaseDoctrineCommand.php @@ -3,12 +3,16 @@ namespace Doctrine\Bundle\DoctrineBundle\Command; use Doctrine\DBAL\DriverManager; +use Exception; +use InvalidArgumentException; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; /** - * Database tool allows you to easily drop and create your configured databases. + * Database tool allows you to easily drop your configured databases. + * + * @final */ class DropDatabaseDoctrineCommand extends DoctrineCommand { @@ -24,8 +28,8 @@ class DropDatabaseDoctrineCommand extends DoctrineCommand $this ->setName('doctrine:database:drop') ->setDescription('Drops the configured database') - ->addOption('connection', null, InputOption::VALUE_OPTIONAL, 'The connection to use for this command') ->addOption('shard', null, InputOption::VALUE_REQUIRED, 'The shard connection to use for this command') + ->addOption('connection', null, InputOption::VALUE_OPTIONAL, 'The connection to use for this command') ->addOption('if-exists', null, InputOption::VALUE_NONE, 'Don\'t trigger an error, when the database doesn\'t exist') ->addOption('force', null, InputOption::VALUE_NONE, 'Set this parameter to execute this action') ->setHelp(<<getDoctrineConnection($input->getOption('connection')); - $ifExists = $input->getOption('if-exists'); + $connectionName = $input->getOption('connection'); + if (empty($connectionName)) { + $connectionName = $this->getDoctrine()->getDefaultConnectionName(); + } + $connection = $this->getDoctrineConnection($connectionName); + + $ifExists = $input->getOption('if-exists'); $params = $connection->getParams(); if (isset($params['master'])) { @@ -75,14 +84,14 @@ EOT $name = isset($params['path']) ? $params['path'] : (isset($params['dbname']) ? $params['dbname'] : false); if (! $name) { - throw new \InvalidArgumentException("Connection does not contain a 'path' or 'dbname' parameter and cannot be dropped."); + throw new InvalidArgumentException("Connection does not contain a 'path' or 'dbname' parameter and cannot be dropped."); } unset($params['dbname'], $params['url']); if (! $input->getOption('force')) { $output->writeln('ATTENTION: This operation should not be executed in a production environment.'); $output->writeln(''); - $output->writeln(sprintf('Would drop the database named %s.', $name)); + $output->writeln(sprintf('Would drop the database %s for connection named %s.', $name, $connectionName)); $output->writeln('Please run the operation with --force to execute'); $output->writeln('All data will be lost!'); @@ -103,12 +112,12 @@ EOT try { if ($shouldDropDatabase) { $connection->getSchemaManager()->dropDatabase($name); - $output->writeln(sprintf('Dropped database for connection named %s', $name)); + $output->writeln(sprintf('Dropped database %s for connection named %s', $name, $connectionName)); } else { - $output->writeln(sprintf('Database for connection named %s doesn\'t exist. Skipped.', $name)); + $output->writeln(sprintf('Database %s for connection named %s doesn\'t exist. Skipped.', $name, $connectionName)); } - } catch (\Exception $e) { - $output->writeln(sprintf('Could not drop database for connection named %s', $name)); + } catch (Exception $e) { + $output->writeln(sprintf('Could not drop database %s for connection named %s', $name, $connectionName)); $output->writeln(sprintf('%s', $e->getMessage())); return self::RETURN_CODE_NOT_DROP; diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/GenerateEntitiesDoctrineCommand.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/GenerateEntitiesDoctrineCommand.php index 0c31fd48..2baeae29 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/GenerateEntitiesDoctrineCommand.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/GenerateEntitiesDoctrineCommand.php @@ -4,6 +4,8 @@ namespace Doctrine\Bundle\DoctrineBundle\Command; use Doctrine\Bundle\DoctrineBundle\Mapping\DisconnectedMetadataFactory; use Doctrine\ORM\Tools\EntityRepositoryGenerator; +use InvalidArgumentException; +use RuntimeException; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -11,6 +13,8 @@ use Symfony\Component\Console\Output\OutputInterface; /** * Generate entity classes from mapping information + * + * @final */ class GenerateEntitiesDoctrineCommand extends DoctrineCommand { @@ -79,19 +83,19 @@ EOT ' If you wish to generate your entities, use make:entity --regenerate from MakerBundle instead.', ]); - $manager = new DisconnectedMetadataFactory($this->getContainer()->get('doctrine')); + $manager = new DisconnectedMetadataFactory($this->getDoctrine()); try { $bundle = $this->getApplication()->getKernel()->getBundle($input->getArgument('name')); $output->writeln(sprintf('Generating entities for bundle "%s"', $bundle->getName())); $metadata = $manager->getBundleMetadata($bundle); - } catch (\InvalidArgumentException $e) { + } catch (InvalidArgumentException $e) { $name = strtr($input->getArgument('name'), '/', '\\'); $pos = strpos($name, ':'); if ($pos !== false) { - $name = $this->getContainer()->get('doctrine')->getAliasNamespace(substr($name, 0, $pos)) . '\\' . substr($name, $pos + 1); + $name = $this->getDoctrine()->getAliasNamespace(substr($name, 0, $pos)) . '\\' . substr($name, $pos + 1); } if (class_exists($name)) { @@ -117,7 +121,7 @@ EOT // Getting the metadata for the entity class once more to get the correct path if the namespace has multiple occurrences try { $entityMetadata = $manager->getClassMetadata($m->getName(), $input->getOption('path')); - } catch (\RuntimeException $e) { + } catch (RuntimeException $e) { // fall back to the bundle metadata when no entity class could be found $entityMetadata = $metadata; } diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/ImportMappingDoctrineCommand.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/ImportMappingDoctrineCommand.php index e3ffed5d..c358e92f 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/ImportMappingDoctrineCommand.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/ImportMappingDoctrineCommand.php @@ -2,10 +2,12 @@ namespace Doctrine\Bundle\DoctrineBundle\Command; +use Doctrine\Common\Persistence\ManagerRegistry; use Doctrine\ORM\Mapping\Driver\DatabaseDriver; use Doctrine\ORM\Tools\Console\MetadataFilter; use Doctrine\ORM\Tools\DisconnectedClassMetadataFactory; use Doctrine\ORM\Tools\Export\ClassMetadataExporter; +use InvalidArgumentException; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -13,9 +15,24 @@ use Symfony\Component\Console\Output\OutputInterface; /** * Import Doctrine ORM metadata mapping information from an existing database. + * + * @final */ class ImportMappingDoctrineCommand extends DoctrineCommand { + /** @var string[] */ + private $bundles; + + /** + * @param string[] $bundles + */ + public function __construct(ManagerRegistry $doctrine, array $bundles) + { + parent::__construct($doctrine); + + $this->bundles = $bundles; + } + /** * {@inheritDoc} */ @@ -38,7 +55,7 @@ from an existing database: Generate annotation mappings into the src/ directory using App as the namespace: php %command.full_name% App\\\Entity annotation --path=src/Entity -Generate annotation mappings into the config/doctrine/ directory using App as the namespace: +Generate xml mappings into the config/doctrine/ directory using App as the namespace: php %command.full_name% App\\\Entity xml --path=config/doctrine Generate XML mappings into a bundle: @@ -73,8 +90,7 @@ EOT } $namespaceOrBundle = $input->getArgument('name'); - $bundles = $this->getContainer()->getParameter('kernel.bundles'); - if (isset($bundles[$namespaceOrBundle])) { + if (isset($this->bundles[$namespaceOrBundle])) { $bundle = $this->getApplication()->getKernel()->getBundle($namespaceOrBundle); $namespace = $bundle->getNamespace() . '\Entity'; @@ -89,7 +105,7 @@ EOT $namespace = $namespaceOrBundle; $destPath = $input->getOption('path'); if ($destPath === null) { - throw new \InvalidArgumentException('The --path option is required when passing a namespace (e.g. --path=src). If you intended to pass a bundle name, check your spelling.'); + throw new InvalidArgumentException('The --path option is required when passing a namespace (e.g. --path=src). If you intended to pass a bundle name, check your spelling.'); } } diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/Proxy/DelegateCommand.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/Proxy/DelegateCommand.php index 32ae4e92..500db6fd 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/Proxy/DelegateCommand.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Command/Proxy/DelegateCommand.php @@ -3,6 +3,7 @@ namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; use Doctrine\ORM\Version; +use RuntimeException; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -53,7 +54,7 @@ abstract class DelegateCommand extends Command protected function wrapCommand($entityManagerName) { if (! $this->isVersionCompatible()) { - throw new \RuntimeException(sprintf('"%s" requires doctrine-orm "%s" or newer', $this->getName(), $this->getMinimalVersion())); + throw new RuntimeException(sprintf('"%s" requires doctrine-orm "%s" or newer', $this->getName(), $this->getMinimalVersion())); } DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $entityManagerName); diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/ConnectionFactory.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/ConnectionFactory.php index 08a77612..f557fc19 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/ConnectionFactory.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/ConnectionFactory.php @@ -74,26 +74,23 @@ class ConnectionFactory * and the platform version is unknown. * For details have a look at DoctrineBundle issue #673. * - * * @return AbstractPlatform + * * @throws DBALException */ private function getDatabasePlatform(Connection $connection) { try { return $connection->getDatabasePlatform(); - } catch (DBALException $driverException) { - if ($driverException instanceof DriverException) { - throw new DBALException( - 'An exception occured while establishing a connection to figure out your platform version.' . PHP_EOL . - "You can circumvent this by setting a 'server_version' configuration value" . PHP_EOL . PHP_EOL . - 'For further information have a look at:' . PHP_EOL . - 'https://github.com/doctrine/DoctrineBundle/issues/673', - 0, - $driverException - ); - } - throw $driverException; + } catch (DriverException $driverException) { + throw new DBALException( + 'An exception occured while establishing a connection to figure out your platform version.' . PHP_EOL . + "You can circumvent this by setting a 'server_version' configuration value" . PHP_EOL . PHP_EOL . + 'For further information have a look at:' . PHP_EOL . + 'https://github.com/doctrine/DoctrineBundle/issues/673', + 0, + $driverException + ); } } diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Controller/ProfilerController.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Controller/ProfilerController.php index 9d1e7692..11afae31 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Controller/ProfilerController.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Controller/ProfilerController.php @@ -4,10 +4,13 @@ namespace Doctrine\Bundle\DoctrineBundle\Controller; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Platforms\SQLServerPlatform; +use Exception; +use PDO; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Profiler\Profiler; +use Symfony\Component\VarDumper\Cloner\Data; /** * ProfilerController. @@ -60,7 +63,7 @@ class ProfilerController implements ContainerAwareInterface } else { $results = $this->explainOtherPlatform($connection, $query); } - } catch (\Exception $e) { + } catch (Exception $e) { return new Response('This query cannot be explained.'); } @@ -77,14 +80,27 @@ class ProfilerController implements ContainerAwareInterface } else { $sql = 'SET SHOWPLAN_TEXT ON; GO; SET NOEXEC ON; ' . $query['sql'] . '; SET NOEXEC OFF; GO; SET SHOWPLAN_TEXT OFF;'; } - $stmt = $connection->executeQuery($sql, $query['params'], $query['types']); + + $params = $query['params']; + + if ($params instanceof Data) { + $params = $params->getValue(true); + } + + $stmt = $connection->executeQuery($sql, $params, $query['types']); $stmt->nextRowset(); - return $stmt->fetchAll(\PDO::FETCH_ASSOC); + return $stmt->fetchAll(PDO::FETCH_ASSOC); } private function explainOtherPlatform(Connection $connection, $query) { - return $connection->executeQuery('EXPLAIN ' . $query['sql'], $query['params'], $query['types']) - ->fetchAll(\PDO::FETCH_ASSOC); + $params = $query['params']; + + if ($params instanceof Data) { + $params = $params->getValue(true); + } + + return $connection->executeQuery('EXPLAIN ' . $query['sql'], $params, $query['types']) + ->fetchAll(PDO::FETCH_ASSOC); } } diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DataCollector/DoctrineDataCollector.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DataCollector/DoctrineDataCollector.php index 784ae19c..b1e2af66 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DataCollector/DoctrineDataCollector.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DataCollector/DoctrineDataCollector.php @@ -6,9 +6,12 @@ use Doctrine\Common\Persistence\ManagerRegistry; use Doctrine\ORM\Cache\Logging\CacheLoggerChain; use Doctrine\ORM\Cache\Logging\StatisticsCacheLogger; use Doctrine\ORM\Configuration; +use Doctrine\ORM\EntityManager; use Doctrine\ORM\Mapping\ClassMetadataFactory; +use Doctrine\ORM\Mapping\ClassMetadataInfo; use Doctrine\ORM\Tools\SchemaValidator; use Doctrine\ORM\Version; +use Exception; use Symfony\Bridge\Doctrine\DataCollector\DoctrineDataCollector as BaseCollector; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -37,7 +40,7 @@ class DoctrineDataCollector extends BaseCollector /** * {@inheritdoc} */ - public function collect(Request $request, Response $response, \Exception $exception = null) + public function collect(Request $request, Response $response, Exception $exception = null) { parent::collect($request, $response, $exception); @@ -58,13 +61,14 @@ class DoctrineDataCollector extends BaseCollector ], ]; + /** @var EntityManager $em */ foreach ($this->registry->getManagers() as $name => $em) { $entities[$name] = []; /** @var ClassMetadataFactory $factory */ $factory = $em->getMetadataFactory(); $validator = new SchemaValidator($em); - /** @var $class \Doctrine\ORM\Mapping\ClassMetadataInfo */ + /** @var ClassMetadataInfo $class */ foreach ($factory->getLoadedMetadata() as $class) { if (isset($entities[$name][$class->getName()])) { continue; @@ -224,11 +228,11 @@ class DoctrineDataCollector extends BaseCollector $connectionGroupedQueries[$key]['count']++; $totalExecutionMS += $query['executionMS']; } - usort($connectionGroupedQueries, function ($a, $b) { + usort($connectionGroupedQueries, static function ($a, $b) { if ($a['executionMS'] === $b['executionMS']) { return 0; } - return ($a['executionMS'] < $b['executionMS']) ? 1 : -1; + return $a['executionMS'] < $b['executionMS'] ? 1 : -1; }); $this->groupedQueries[$connection] = $connectionGroupedQueries; } diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DependencyInjection/Compiler/ServiceRepositoryCompilerPass.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DependencyInjection/Compiler/ServiceRepositoryCompilerPass.php index 516badf0..7ccafb74 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DependencyInjection/Compiler/ServiceRepositoryCompilerPass.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DependencyInjection/Compiler/ServiceRepositoryCompilerPass.php @@ -32,7 +32,7 @@ final class ServiceRepositoryCompilerPass implements CompilerPassInterface return; } - $repoReferences = array_map(function ($id) { + $repoReferences = array_map(static function ($id) { return new Reference($id); }, $repoServiceIds); diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DependencyInjection/Configuration.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DependencyInjection/Configuration.php index b8d4f3e2..f93d01be 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DependencyInjection/Configuration.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DependencyInjection/Configuration.php @@ -2,10 +2,13 @@ namespace Doctrine\Bundle\DoctrineBundle\DependencyInjection; +use Doctrine\ORM\EntityManager; +use ReflectionClass; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\NodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; +use Symfony\Component\DependencyInjection\Exception\LogicException; /** * This class contains the configuration information for the bundle @@ -33,8 +36,14 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('doctrine'); + $treeBuilder = new TreeBuilder('doctrine'); + + if (method_exists($treeBuilder, 'getRootNode')) { + $rootNode = $treeBuilder->getRootNode(); + } else { + // BC layer for symfony/config 4.1 and older + $rootNode = $treeBuilder->root('doctrine'); + } $this->addDbalSection($rootNode); $this->addOrmSection($rootNode); @@ -51,10 +60,10 @@ class Configuration implements ConfigurationInterface ->children() ->arrayNode('dbal') ->beforeNormalization() - ->ifTrue(function ($v) { + ->ifTrue(static function ($v) { return is_array($v) && ! array_key_exists('connections', $v) && ! array_key_exists('connection', $v); }) - ->then(function ($v) { + ->then(static function ($v) { // Key that should not be rewritten to the connection config $excludedKeys = ['default_connection' => true, 'types' => true, 'type' => true]; $connection = []; @@ -81,7 +90,7 @@ class Configuration implements ConfigurationInterface ->prototype('array') ->beforeNormalization() ->ifString() - ->then(function ($v) { + ->then(static function ($v) { return ['class' => $v]; }) ->end() @@ -94,8 +103,7 @@ class Configuration implements ConfigurationInterface ->end() ->fixXmlConfig('connection') ->append($this->getDbalConnectionsNode()) - ->end() - ; + ->end(); } /** @@ -105,15 +113,20 @@ class Configuration implements ConfigurationInterface */ private function getDbalConnectionsNode() { - $treeBuilder = new TreeBuilder(); - $node = $treeBuilder->root('connections'); + $treeBuilder = new TreeBuilder('connections'); + + if (method_exists($treeBuilder, 'getRootNode')) { + $node = $treeBuilder->getRootNode(); + } else { + // BC layer for symfony/config 4.1 and older + $node = $treeBuilder->root('connections'); + } /** @var ArrayNodeDefinition $connectionNode */ $connectionNode = $node ->requiresAtLeastOneElement() ->useAttributeAsKey('name') - ->prototype('array') - ; + ->prototype('array'); $this->configureDbalDriverNode($connectionNode); @@ -150,15 +163,13 @@ class Configuration implements ConfigurationInterface ->useAttributeAsKey('name') ->prototype('scalar')->end() ->end() - ->end() - ; + ->end(); $slaveNode = $connectionNode ->children() ->arrayNode('slaves') ->useAttributeAsKey('name') - ->prototype('array') - ; + ->prototype('array'); $this->configureDbalDriverNode($slaveNode); $shardNode = $connectionNode @@ -170,8 +181,7 @@ class Configuration implements ConfigurationInterface ->min(1) ->isRequired() ->end() - ->end() - ; + ->end(); $this->configureDbalDriverNode($shardNode); return $node; @@ -214,6 +224,11 @@ class Configuration implements ConfigurationInterface ->scalarNode('server') ->info('The name of a running database server to connect to for SQL Anywhere.') ->end() + ->scalarNode('default_dbname') + ->info( + 'Override the default database (postgres) to connect to for PostgreSQL connexion.' + ) + ->end() ->scalarNode('sslmode') ->info( 'Determines whether or with what priority a SSL TCP/IP connection will be negotiated with ' . @@ -226,6 +241,21 @@ class Configuration implements ConfigurationInterface 'If the file exists, the server\'s certificate will be verified to be signed by one of these authorities.' ) ->end() + ->scalarNode('sslcert') + ->info( + 'The path to the SSL client certificate file for PostgreSQL.' + ) + ->end() + ->scalarNode('sslkey') + ->info( + 'The path to the SSL client key file for PostgreSQL.' + ) + ->end() + ->scalarNode('sslcrl') + ->info( + 'The file name of the SSL certificate revocation list for PostgreSQL.' + ) + ->end() ->booleanNode('pooled')->info('True to use a pooled server with the oci8/pdo_oracle driver')->end() ->booleanNode('MultipleActiveResultSets')->info('Configuring MultipleActiveResultSets for the pdo_sqlsrv driver')->end() ->booleanNode('use_savepoints')->info('Use savepoints for nested transactions')->end() @@ -246,10 +276,10 @@ class Configuration implements ConfigurationInterface ->end() ->end() ->beforeNormalization() - ->ifTrue(function ($v) { + ->ifTrue(static function ($v) { return ! isset($v['sessionMode']) && isset($v['session_mode']); }) - ->then(function ($v) { + ->then(static function ($v) { $v['sessionMode'] = $v['session_mode']; unset($v['session_mode']); @@ -257,17 +287,16 @@ class Configuration implements ConfigurationInterface }) ->end() ->beforeNormalization() - ->ifTrue(function ($v) { + ->ifTrue(static function ($v) { return ! isset($v['MultipleActiveResultSets']) && isset($v['multiple_active_result_sets']); }) - ->then(function ($v) { + ->then(static function ($v) { $v['MultipleActiveResultSets'] = $v['multiple_active_result_sets']; unset($v['multiple_active_result_sets']); return $v; }) - ->end() - ; + ->end(); } /** @@ -275,24 +304,26 @@ class Configuration implements ConfigurationInterface */ private function addOrmSection(ArrayNodeDefinition $node) { - $generationModes = $this->getAutoGenerateModes(); - $node ->children() ->arrayNode('orm') ->beforeNormalization() - ->ifTrue(function ($v) { + ->ifTrue(static function ($v) { + if (! empty($v) && ! class_exists(EntityManager::class)) { + throw new LogicException('The doctrine/orm package is required when the doctrine.orm config is set.'); + } + return $v === null || (is_array($v) && ! array_key_exists('entity_managers', $v) && ! array_key_exists('entity_manager', $v)); }) - ->then(function ($v) { + ->then(static function ($v) { $v = (array) $v; // Key that should not be rewritten to the connection config $excludedKeys = [ 'default_entity_manager' => true, - 'auto_generate_proxy_classes' => true, + 'auto_generate_proxy_classes' => true, 'proxy_dir' => true, - 'proxy_namespace' => true, - 'resolve_target_entities' => true, + 'proxy_namespace' => true, + 'resolve_target_entities' => true, 'resolve_target_entity' => true, ]; $entityManager = []; @@ -314,7 +345,9 @@ class Configuration implements ConfigurationInterface ->scalarNode('auto_generate_proxy_classes')->defaultValue(false) ->info('Auto generate mode possible values are: "NEVER", "ALWAYS", "FILE_NOT_EXISTS", "EVAL"') ->validate() - ->ifTrue(function ($v) use ($generationModes) { + ->ifTrue(function ($v) { + $generationModes = $this->getAutoGenerateModes(); + if (is_int($v) && in_array($v, $generationModes['values']/*array(0, 1, 2, 3)*/)) { return false; } @@ -333,7 +366,7 @@ class Configuration implements ConfigurationInterface ->end() ->validate() ->ifString() - ->then(function ($v) { + ->then(static function ($v) { return constant('Doctrine\Common\Proxy\AbstractProxyFactory::AUTOGENERATE_' . strtoupper($v)); }) ->end() @@ -346,8 +379,7 @@ class Configuration implements ConfigurationInterface ->fixXmlConfig('resolve_target_entity', 'resolve_target_entities') ->append($this->getOrmTargetEntityResolverNode()) ->end() - ->end() - ; + ->end(); } /** @@ -357,15 +389,20 @@ class Configuration implements ConfigurationInterface */ private function getOrmTargetEntityResolverNode() { - $treeBuilder = new TreeBuilder(); - $node = $treeBuilder->root('resolve_target_entities'); + $treeBuilder = new TreeBuilder('resolve_target_entities'); + + if (method_exists($treeBuilder, 'getRootNode')) { + $node = $treeBuilder->getRootNode(); + } else { + // BC layer for symfony/config 4.1 and older + $node = $treeBuilder->root('resolve_target_entities'); + } $node ->useAttributeAsKey('interface') ->prototype('scalar') ->cannotBeEmpty() - ->end() - ; + ->end(); return $node; } @@ -377,9 +414,16 @@ class Configuration implements ConfigurationInterface */ private function getOrmEntityListenersNode() { - $builder = new TreeBuilder(); - $node = $builder->root('entity_listeners'); - $normalizer = function ($mappings) { + $treeBuilder = new TreeBuilder('entity_listeners'); + + if (method_exists($treeBuilder, 'getRootNode')) { + $node = $treeBuilder->getRootNode(); + } else { + // BC layer for symfony/config 4.1 and older + $node = $treeBuilder->root('entity_listeners'); + } + + $normalizer = static function ($mappings) { $entities = []; foreach ($mappings as $entityClass => $mapping) { @@ -395,8 +439,8 @@ class Configuration implements ConfigurationInterface foreach ($eventMapping as $method) { $events[] = [ - 'type' => $eventType, - 'method' => $method, + 'type' => $eventType, + 'method' => $method, ]; } } @@ -419,7 +463,7 @@ class Configuration implements ConfigurationInterface $node ->beforeNormalization() // Yaml normalization - ->ifTrue(function ($v) { + ->ifTrue(static function ($v) { return is_array(reset($v)) && is_string(key(reset($v))); }) ->then($normalizer) @@ -450,8 +494,7 @@ class Configuration implements ConfigurationInterface ->end() ->end() ->end() - ->end() - ; + ->end(); return $node; } @@ -463,8 +506,14 @@ class Configuration implements ConfigurationInterface */ private function getOrmEntityManagersNode() { - $treeBuilder = new TreeBuilder(); - $node = $treeBuilder->root('entity_managers'); + $treeBuilder = new TreeBuilder('entity_managers'); + + if (method_exists($treeBuilder, 'getRootNode')) { + $node = $treeBuilder->getRootNode(); + } else { + // BC layer for symfony/config 4.1 and older + $node = $treeBuilder->root('entity_managers'); + } $node ->requiresAtLeastOneElement() @@ -540,7 +589,7 @@ class Configuration implements ConfigurationInterface ->prototype('array') ->beforeNormalization() ->ifString() - ->then(function ($v) { + ->then(static function ($v) { return ['type' => $v]; }) ->end() @@ -585,16 +634,16 @@ class Configuration implements ConfigurationInterface ->prototype('array') ->beforeNormalization() ->ifString() - ->then(function ($v) { + ->then(static function ($v) { return ['class' => $v]; }) ->end() ->beforeNormalization() // The content of the XML node is returned as the "value" key so we need to rename it - ->ifTrue(function ($v) { + ->ifTrue(static function ($v) { return is_array($v) && isset($v['value']); }) - ->then(function ($v) { + ->then(static function ($v) { $v['class'] = $v['value']; unset($v['value']); @@ -613,8 +662,7 @@ class Configuration implements ConfigurationInterface ->end() ->end() ->end() - ->end() - ; + ->end(); return $node; } @@ -628,14 +676,20 @@ class Configuration implements ConfigurationInterface */ private function getOrmCacheDriverNode($name) { - $treeBuilder = new TreeBuilder(); - $node = $treeBuilder->root($name); + $treeBuilder = new TreeBuilder($name); + + if (method_exists($treeBuilder, 'getRootNode')) { + $node = $treeBuilder->getRootNode(); + } else { + // BC layer for symfony/config 4.1 and older + $node = $treeBuilder->root($name); + } $node ->addDefaultsIfNotSet() ->beforeNormalization() ->ifString() - ->then(function ($v) { + ->then(static function ($v) { return ['type' => $v]; }) ->end() @@ -649,8 +703,7 @@ class Configuration implements ConfigurationInterface ->scalarNode('id')->end() ->scalarNode('namespace')->defaultNull()->end() ->scalarNode('cache_provider')->defaultNull()->end() - ->end() - ; + ->end(); return $node; } @@ -664,7 +717,7 @@ class Configuration implements ConfigurationInterface { $constPrefix = 'AUTOGENERATE_'; $prefixLen = strlen($constPrefix); - $refClass = new \ReflectionClass('Doctrine\Common\Proxy\AbstractProxyFactory'); + $refClass = new ReflectionClass('Doctrine\Common\Proxy\AbstractProxyFactory'); $constsArray = $refClass->getConstants(); $namesArray = []; $valuesArray = []; diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DependencyInjection/DoctrineExtension.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DependencyInjection/DoctrineExtension.php index b9eaee73..b295804b 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DependencyInjection/DoctrineExtension.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DependencyInjection/DoctrineExtension.php @@ -6,9 +6,13 @@ use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\ServiceRepositor use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepositoryInterface; use Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\CacheProviderLoader; use Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\SymfonyBridgeAdapter; +use Doctrine\Common\Persistence\Mapping\ClassMetadataFactory; use Doctrine\ORM\Version; +use LogicException; use Symfony\Bridge\Doctrine\DependencyInjection\AbstractDoctrineExtension; use Symfony\Bridge\Doctrine\Form\Type\DoctrineType; +use Symfony\Bridge\Doctrine\Messenger\DoctrineTransactionMiddleware; +use Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\ChildDefinition; @@ -20,6 +24,7 @@ use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ServiceLocator; use Symfony\Component\Form\AbstractType; +use Symfony\Component\Messenger\MessageBusInterface; /** * DoctrineExtension is an extension for the Doctrine DBAL and ORM library. @@ -56,11 +61,11 @@ class DoctrineExtension extends AbstractDoctrineExtension } if (empty($config['dbal'])) { - throw new \LogicException('Configuring the ORM layer requires to configure the DBAL layer as well.'); + throw new LogicException('Configuring the ORM layer requires to configure the DBAL layer as well.'); } if (! class_exists('Doctrine\ORM\Version')) { - throw new \LogicException('To configure the ORM layer, you must first install the doctrine/orm package.'); + throw new LogicException('To configure the ORM layer, you must first install the doctrine/orm package.'); } $this->ormLoad($config['orm'], $container); @@ -175,8 +180,7 @@ class DoctrineExtension extends AbstractDoctrineExtension new Reference(sprintf('doctrine.dbal.%s_connection.configuration', $name)), new Reference(sprintf('doctrine.dbal.%s_connection.event_manager', $name)), $connection['mapping_types'], - ]) - ; + ]); // Set class in case "wrapper_class" option was used to assist IDEs if (isset($options['wrapperClass'])) { @@ -246,6 +250,7 @@ class DoctrineExtension extends AbstractDoctrineExtension 'master' => true, 'shards' => true, 'serverVersion' => true, + 'defaultTableOptions' => true, // included by safety but should have been unset already 'logging' => true, 'profiling' => true, @@ -280,6 +285,7 @@ class DoctrineExtension extends AbstractDoctrineExtension 'global' => true, 'shards' => true, 'serverVersion' => true, + 'defaultTableOptions' => true, // included by safety but should have been unset already 'logging' => true, 'profiling' => true, @@ -388,6 +394,12 @@ class DoctrineExtension extends AbstractDoctrineExtension ->addTag(ServiceRepositoryCompilerPass::REPOSITORY_SERVICE_TAG); } + // If the Messenger component is installed and the doctrine transaction middleware is available, wire it: + if (interface_exists(MessageBusInterface::class) && class_exists(DoctrineTransactionMiddleware::class)) { + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); + $loader->load('messenger.xml'); + } + /* * Compatibility for Symfony 3.2 and lower: gives the service a default argument. * When DoctrineBundle requires 3.3 or higher, this can be moved to an anonymous @@ -507,8 +519,7 @@ class DoctrineExtension extends AbstractDoctrineExtension $container ->setDefinition($managerConfiguratorName, new $definitionClassname('doctrine.orm.manager_configurator.abstract')) ->replaceArgument(0, $enabledFilters) - ->replaceArgument(1, $filtersParameters) - ; + ->replaceArgument(1, $filtersParameters); if (! isset($entityManager['connection'])) { $entityManager['connection'] = $this->defaultConnection; @@ -521,8 +532,7 @@ class DoctrineExtension extends AbstractDoctrineExtension new Reference(sprintf('doctrine.dbal.%s_connection', $entityManager['connection'])), new Reference(sprintf('doctrine.orm.%s_configuration', $entityManager['name'])), ]) - ->setConfigurator([new Reference($managerConfiguratorName), 'configure']) - ; + ->setConfigurator([new Reference($managerConfiguratorName), 'configure']); $container->setAlias( sprintf('doctrine.orm.%s_entity_manager.event_manager', $entityManager['name']), @@ -564,6 +574,10 @@ class DoctrineExtension extends AbstractDoctrineExtension * 1. Specify a bundle and optionally details where the entity and mapping information reside. * 2. Specify an arbitrary mapping location. * + * @param array $entityManager A configured ORM entity manager + * @param Definition $ormConfigDef A Definition instance + * @param ContainerBuilder $container A ContainerBuilder instance + * * @example * * doctrine.orm: @@ -584,10 +598,6 @@ class DoctrineExtension extends AbstractDoctrineExtension * * In the case of bundles everything is really optional (which leads to autodetection for this bundle) but * in the mappings key everything except alias is a required argument. - * - * @param array $entityManager A configured ORM entity manager - * @param Definition $ormConfigDef A Definition instance - * @param ContainerBuilder $container A ContainerBuilder instance */ protected function loadOrmEntityManagerMappingInformation(array $entityManager, Definition $ormConfigDef, ContainerBuilder $container) { @@ -604,6 +614,10 @@ class DoctrineExtension extends AbstractDoctrineExtension /** * Loads an ORM second level cache bundle mapping information. * + * @param array $entityManager A configured ORM entity manager + * @param Definition $ormConfigDef A Definition instance + * @param ContainerBuilder $container A ContainerBuilder instance + * * @example * entity_managers: * default: @@ -624,10 +638,6 @@ class DoctrineExtension extends AbstractDoctrineExtension * lifetime: 600 * cache_driver: * type: apc - * - * @param array $entityManager A configured ORM entity manager - * @param Definition $ormConfigDef A Definition instance - * @param ContainerBuilder $container A ContainerBuilder instance */ protected function loadOrmSecondLevelCache(array $entityManager, Definition $ormConfigDef, ContainerBuilder $container) { @@ -788,17 +798,22 @@ class DoctrineExtension extends AbstractDoctrineExtension */ private function loadPropertyInfoExtractor($entityManagerName, ContainerBuilder $container) { - $metadataFactoryService = sprintf('doctrine.orm.%s_entity_manager.metadata_factory', $entityManagerName); + $propertyExtractorDefinition = $container->register(sprintf('doctrine.orm.%s_entity_manager.property_info_extractor', $entityManagerName), DoctrineExtractor::class); + if (property_exists(DoctrineExtractor::class, 'entityManager')) { + $argumentId = sprintf('doctrine.orm.%s_entity_manager', $entityManagerName); + } else { + $argumentId = sprintf('doctrine.orm.%s_entity_manager.metadata_factory', $entityManagerName); - $metadataFactoryDefinition = $container->register($metadataFactoryService, 'Doctrine\Common\Persistence\Mapping\ClassMetadataFactory'); - $metadataFactoryDefinition->setFactory([ - new Reference(sprintf('doctrine.orm.%s_entity_manager', $entityManagerName)), - 'getMetadataFactory', - ]); - $metadataFactoryDefinition->setPublic(false); + $metadataFactoryDefinition = $container->register($argumentId, ClassMetadataFactory::class); + $metadataFactoryDefinition->setFactory([ + new Reference(sprintf('doctrine.orm.%s_entity_manager', $entityManagerName)), + 'getMetadataFactory', + ]); + $metadataFactoryDefinition->setPublic(false); + } + + $propertyExtractorDefinition->addArgument(new Reference($argumentId)); - $propertyExtractorDefinition = $container->register(sprintf('doctrine.orm.%s_entity_manager.property_info_extractor', $entityManagerName), 'Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor'); - $propertyExtractorDefinition->addArgument(new Reference($metadataFactoryService)); $propertyExtractorDefinition->addTag('property_info.list_extractor', ['priority' => -1001]); $propertyExtractorDefinition->addTag('property_info.type_extractor', ['priority' => -999]); } diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DoctrineBundle.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DoctrineBundle.php index 637d6ed9..d1f84ae5 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DoctrineBundle.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/DoctrineBundle.php @@ -5,6 +5,7 @@ namespace Doctrine\Bundle\DoctrineBundle; use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\EntityListenerPass; use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\ServiceRepositoryCompilerPass; use Doctrine\Common\Util\ClassUtils; +use Doctrine\ORM\EntityManager; use Doctrine\ORM\Proxy\Autoloader; use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\DoctrineValidationPass; use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterEventListenersAndSubscribersPass; @@ -59,13 +60,13 @@ class DoctrineBundle extends Bundle // See https://github.com/symfony/symfony/pull/3419 for usage of references $container = &$this->container; - $proxyGenerator = function ($proxyDir, $proxyNamespace, $class) use (&$container) { + $proxyGenerator = static function ($proxyDir, $proxyNamespace, $class) use (&$container) { $originalClassName = ClassUtils::getRealClass($class); /** @var Registry $registry */ $registry = $container->get('doctrine'); // Tries to auto-generate the proxy file - /** @var $em \Doctrine\ORM\EntityManager */ + /** @var EntityManager $em */ foreach ($registry->getManagers() as $em) { if (! $em->getConfiguration()->getAutoGenerateProxyClasses()) { continue; diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/ManagerConfigurator.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/ManagerConfigurator.php index eb12b3f2..6143890a 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/ManagerConfigurator.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/ManagerConfigurator.php @@ -28,7 +28,6 @@ class ManagerConfigurator /** * Create a connection by name. - * */ public function configure(EntityManagerInterface $entityManager) { @@ -37,7 +36,6 @@ class ManagerConfigurator /** * Enables filters for a given entity manager - * */ private function enableFilters(EntityManagerInterface $entityManager) { diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Mapping/ContainerAwareEntityListenerResolver.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Mapping/ContainerAwareEntityListenerResolver.php index e52da4d9..4345015b 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Mapping/ContainerAwareEntityListenerResolver.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Mapping/ContainerAwareEntityListenerResolver.php @@ -2,6 +2,8 @@ namespace Doctrine\Bundle\DoctrineBundle\Mapping; +use InvalidArgumentException; +use RuntimeException; use Symfony\Component\DependencyInjection\ContainerInterface; class ContainerAwareEntityListenerResolver implements EntityListenerServiceResolver @@ -46,7 +48,7 @@ class ContainerAwareEntityListenerResolver implements EntityListenerServiceResol public function register($object) { if (! is_object($object)) { - throw new \InvalidArgumentException(sprintf('An object was expected, but got "%s".', gettype($object))); + throw new InvalidArgumentException(sprintf('An object was expected, but got "%s".', gettype($object))); } $className = $this->normalizeClassName(get_class($object)); @@ -88,7 +90,7 @@ class ContainerAwareEntityListenerResolver implements EntityListenerServiceResol private function resolveService($serviceId) { if (! $this->container->has($serviceId)) { - throw new \RuntimeException(sprintf('There is no service named "%s"', $serviceId)); + throw new RuntimeException(sprintf('There is no service named "%s"', $serviceId)); } return $this->container->get($serviceId); diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Mapping/DisconnectedMetadataFactory.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Mapping/DisconnectedMetadataFactory.php index 24aaa9b5..199b5a69 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Mapping/DisconnectedMetadataFactory.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Mapping/DisconnectedMetadataFactory.php @@ -6,6 +6,8 @@ use Doctrine\Common\Persistence\ManagerRegistry; use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\Mapping\MappingException; use Doctrine\ORM\Tools\DisconnectedClassMetadataFactory; +use ReflectionClass; +use RuntimeException; use Symfony\Component\HttpKernel\Bundle\BundleInterface; /** @@ -32,14 +34,14 @@ class DisconnectedMetadataFactory * * @return ClassMetadataCollection A ClassMetadataCollection instance * - * @throws \RuntimeException When bundle does not contain mapped entities. + * @throws RuntimeException When bundle does not contain mapped entities. */ public function getBundleMetadata(BundleInterface $bundle) { $namespace = $bundle->getNamespace(); $metadata = $this->getMetadataForNamespace($namespace); if (! $metadata->getMetadata()) { - throw new \RuntimeException(sprintf('Bundle "%s" does not contain any mapped entities.', $bundle->getName())); + throw new RuntimeException(sprintf('Bundle "%s" does not contain any mapped entities.', $bundle->getName())); } $path = $this->getBasePathForClass($bundle->getName(), $bundle->getNamespace(), $bundle->getPath()); @@ -80,13 +82,13 @@ class DisconnectedMetadataFactory * * @return ClassMetadataCollection A ClassMetadataCollection instance * - * @throws \RuntimeException When namespace not contain mapped entities. + * @throws RuntimeException When namespace not contain mapped entities. */ public function getNamespaceMetadata($namespace, $path = null) { $metadata = $this->getMetadataForNamespace($namespace); if (! $metadata->getMetadata()) { - throw new \RuntimeException(sprintf('Namespace "%s" does not contain any mapped entities.', $namespace)); + throw new RuntimeException(sprintf('Namespace "%s" does not contain any mapped entities.', $namespace)); } $this->findNamespaceAndPathForMetadata($metadata, $path); @@ -99,13 +101,13 @@ class DisconnectedMetadataFactory * * @param string|null $path * - * @throws \RuntimeException When unable to determine the path. + * @throws RuntimeException When unable to determine the path. */ public function findNamespaceAndPathForMetadata(ClassMetadataCollection $metadata, $path = null) { $all = $metadata->getMetadata(); if (class_exists($all[0]->name)) { - $r = new \ReflectionClass($all[0]->name); + $r = new ReflectionClass($all[0]->name); $path = $this->getBasePathForClass($r->getName(), $r->getNamespaceName(), dirname($r->getFilename())); $ns = $r->getNamespaceName(); } elseif ($path) { @@ -114,7 +116,7 @@ class DisconnectedMetadataFactory array_pop($nsParts); $ns = implode('\\', $nsParts); } else { - throw new \RuntimeException(sprintf('Unable to determine where to save the "%s" class (use the --path option).', $all[0]->name)); + throw new RuntimeException(sprintf('Unable to determine where to save the "%s" class (use the --path option).', $all[0]->name)); } $metadata->setPath($path); @@ -130,7 +132,7 @@ class DisconnectedMetadataFactory * * @return string * - * @throws \RuntimeException When base path not found. + * @throws RuntimeException When base path not found. */ private function getBasePathForClass($name, $namespace, $path) { @@ -139,7 +141,7 @@ class DisconnectedMetadataFactory $destination = str_replace('/' . $namespace, '', $search, $c); if ($c !== 1) { - throw new \RuntimeException(sprintf('Can\'t find base path for "%s" (path: "%s", destination: "%s").', $name, $path, $destination)); + throw new RuntimeException(sprintf('Can\'t find base path for "%s" (path: "%s", destination: "%s").', $name, $path, $destination)); } return $destination; diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/README.md b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/README.md index a46276ca..cc217ce5 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/README.md +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/README.md @@ -2,7 +2,7 @@ Doctrine DBAL & ORM Bundle for the Symfony Framework. -Build Status: [![Build Status](https://secure.travis-ci.org/doctrine/DoctrineBundle.png?branch=master)](http://travis-ci.org/doctrine/DoctrineBundle) +Build Status: [![Build Status](https://travis-ci.org/doctrine/DoctrineBundle.svg?branch=master)](https://travis-ci.org/doctrine/DoctrineBundle) ## What is Doctrine? diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Registry.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Registry.php index 0c376d68..cf1cb509 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Registry.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Registry.php @@ -41,9 +41,9 @@ class Registry extends ManagerRegistry implements RegistryInterface /** * Gets the default entity manager name. * - * @return string The default entity manager name - * * @deprecated + * + * @return string The default entity manager name */ public function getDefaultEntityManagerName() { @@ -55,11 +55,11 @@ class Registry extends ManagerRegistry implements RegistryInterface /** * Gets a named entity manager. * + * @deprecated + * * @param string $name The entity manager name (null for the default one) * * @return EntityManager - * - * @deprecated */ public function getEntityManager($name = null) { @@ -71,9 +71,9 @@ class Registry extends ManagerRegistry implements RegistryInterface /** * Gets an array of all registered entity managers * - * @return EntityManager[] an array of all EntityManager instances - * * @deprecated + * + * @return EntityManager[] an array of all EntityManager instances */ public function getEntityManagers() { @@ -95,10 +95,9 @@ class Registry extends ManagerRegistry implements RegistryInterface * hold an obsolete reference. You can inject the registry instead * to avoid this problem. * - * @param string $name The entity manager name (null for the default one) - * - * * @deprecated + * + * @param string $name The entity manager name (null for the default one) */ public function resetEntityManager($name = null) { @@ -112,11 +111,11 @@ class Registry extends ManagerRegistry implements RegistryInterface * * This method looks for the alias in all registered entity managers. * + * @deprecated + * * @param string $alias The alias * * @return string The full namespace - * - * @deprecated */ public function getEntityNamespace($alias) { @@ -130,11 +129,11 @@ class Registry extends ManagerRegistry implements RegistryInterface * * This method looks for the alias in all registered entity managers. * + * @see Configuration::getEntityNamespace + * * @param string $alias The alias * * @return string The full namespace - * - * @see Configuration::getEntityNamespace */ public function getAliasNamespace($alias) { @@ -151,9 +150,9 @@ class Registry extends ManagerRegistry implements RegistryInterface /** * Gets all connection names. * - * @return string[] An array of connection names - * * @deprecated + * + * @return string[] An array of connection names */ public function getEntityManagerNames() { @@ -165,11 +164,11 @@ class Registry extends ManagerRegistry implements RegistryInterface /** * Gets the entity manager associated with a given class. * + * @deprecated + * * @param string $class A Doctrine Entity class name * * @return EntityManager|null - * - * @deprecated */ public function getEntityManagerForClass($class) { diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Repository/ContainerRepositoryFactory.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Repository/ContainerRepositoryFactory.php index 02ef8b5d..cd1b4720 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Repository/ContainerRepositoryFactory.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Repository/ContainerRepositoryFactory.php @@ -5,10 +5,11 @@ namespace Doctrine\Bundle\DoctrineBundle\Repository; use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\ServiceRepositoryCompilerPass; use Doctrine\Common\Persistence\ObjectRepository; use Doctrine\ORM\EntityManagerInterface; -use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\Repository\RepositoryFactory; +use InvalidArgumentException; use Psr\Container\ContainerInterface; +use RuntimeException; use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; /** @@ -30,7 +31,7 @@ final class ContainerRepositoryFactory implements RepositoryFactory // When DoctrineBundle requires Symfony 3.3+, this can be removed // and the $container argument can become required. if ($container === null && class_exists(ServiceLocatorTagPass::class)) { - throw new \InvalidArgumentException(sprintf('The first argument of %s::__construct() is required on Symfony 3.3 or higher.', self::class)); + throw new InvalidArgumentException(sprintf('The first argument of %s::__construct() is required on Symfony 3.3 or higher.', self::class)); } $this->container = $container; @@ -50,8 +51,8 @@ final class ContainerRepositoryFactory implements RepositoryFactory if ($this->container && $this->container->has($customRepositoryName)) { $repository = $this->container->get($customRepositoryName); - if (! $repository instanceof EntityRepository) { - throw new \RuntimeException(sprintf('The service "%s" must extend EntityRepository (or a base class, like ServiceEntityRepository).', $repositoryServiceId)); + if (! $repository instanceof ObjectRepository) { + throw new RuntimeException(sprintf('The service "%s" must implement ObjectRepository (or extend a base class, like ServiceEntityRepository).', $repositoryServiceId)); } return $repository; @@ -61,14 +62,14 @@ final class ContainerRepositoryFactory implements RepositoryFactory if (is_a($customRepositoryName, ServiceEntityRepositoryInterface::class, true)) { // can be removed when DoctrineBundle requires Symfony 3.3 if ($this->container === null) { - throw new \RuntimeException(sprintf('Support for loading entities from the service container only works for Symfony 3.3 or higher. Upgrade your version of Symfony or make sure your "%s" class does not implement "%s"', $customRepositoryName, ServiceEntityRepositoryInterface::class)); + throw new RuntimeException(sprintf('Support for loading entities from the service container only works for Symfony 3.3 or higher. Upgrade your version of Symfony or make sure your "%s" class does not implement "%s"', $customRepositoryName, ServiceEntityRepositoryInterface::class)); } - throw new \RuntimeException(sprintf('The "%s" entity repository implements "%s", but its service could not be found. Make sure the service exists and is tagged with "%s".', $customRepositoryName, ServiceEntityRepositoryInterface::class, ServiceRepositoryCompilerPass::REPOSITORY_SERVICE_TAG)); + throw new RuntimeException(sprintf('The "%s" entity repository implements "%s", but its service could not be found. Make sure the service exists and is tagged with "%s".', $customRepositoryName, ServiceEntityRepositoryInterface::class, ServiceRepositoryCompilerPass::REPOSITORY_SERVICE_TAG)); } if (! class_exists($customRepositoryName)) { - throw new \RuntimeException(sprintf('The "%s" entity has a repositoryClass set to "%s", but this is not a valid class. Check your class naming. If this is meant to be a service id, make sure this service exists and is tagged with "%s".', $metadata->name, $customRepositoryName, ServiceRepositoryCompilerPass::REPOSITORY_SERVICE_TAG)); + throw new RuntimeException(sprintf('The "%s" entity has a repositoryClass set to "%s", but this is not a valid class. Check your class naming. If this is meant to be a service id, make sure this service exists and is tagged with "%s".', $metadata->name, $customRepositoryName, ServiceRepositoryCompilerPass::REPOSITORY_SERVICE_TAG)); } // allow the repository to be created below diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Repository/ServiceEntityRepository.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Repository/ServiceEntityRepository.php index 0b36f233..639634f2 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Repository/ServiceEntityRepository.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Repository/ServiceEntityRepository.php @@ -4,6 +4,7 @@ namespace Doctrine\Bundle\DoctrineBundle\Repository; use Doctrine\Common\Persistence\ManagerRegistry; use Doctrine\ORM\EntityRepository; +use LogicException; /** * Optional EntityRepository base class with a simplified constructor (for autowiring). @@ -28,6 +29,13 @@ class ServiceEntityRepository extends EntityRepository implements ServiceEntityR { $manager = $registry->getManagerForClass($entityClass); + if ($manager === null) { + throw new LogicException(sprintf( + 'Could not find the entity manager for class "%s". Check your Doctrine configuration to make sure it is configured to load this entity’s metadata.', + $entityClass + )); + } + parent::__construct($manager, $manager->getClassMetadata($entityClass)); } } diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Resources/config/dbal.xml b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Resources/config/dbal.xml index 91883922..a94e9175 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Resources/config/dbal.xml +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Resources/config/dbal.xml @@ -72,10 +72,14 @@ + + + + @@ -83,8 +87,8 @@ - - + + diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Resources/config/orm.xml b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Resources/config/orm.xml index 5763e190..78b039c5 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Resources/config/orm.xml +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Resources/config/orm.xml @@ -192,10 +192,6 @@ - - - - @@ -204,5 +200,18 @@ + + + %kernel.bundles% + + + + + + + + + + diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Resources/config/schema/doctrine-1.0.xsd b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Resources/config/schema/doctrine-1.0.xsd index c19ecba8..1d1dcac0 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Resources/config/schema/doctrine-1.0.xsd +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Resources/config/schema/doctrine-1.0.xsd @@ -59,8 +59,12 @@ + + + + diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Twig/DoctrineExtension.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Twig/DoctrineExtension.php index 5a368db2..6df74cdb 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Twig/DoctrineExtension.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/Twig/DoctrineExtension.php @@ -2,12 +2,15 @@ namespace Doctrine\Bundle\DoctrineBundle\Twig; +use SqlFormatter; use Symfony\Component\VarDumper\Cloner\Data; +use Twig_Extension; +use Twig_SimpleFilter; /** * This class contains the needed functions in order to do the query highlighting */ -class DoctrineExtension extends \Twig_Extension +class DoctrineExtension extends Twig_Extension { /** * Number of maximum characters that one single line can hold in the interface @@ -19,14 +22,14 @@ class DoctrineExtension extends \Twig_Extension /** * Define our functions * - * @return \Twig_SimpleFilter[] + * @return Twig_SimpleFilter[] */ public function getFilters() { return [ - new \Twig_SimpleFilter('doctrine_minify_query', [$this, 'minifyQuery'], ['deprecated' => true]), - new \Twig_SimpleFilter('doctrine_pretty_query', [$this, 'formatQuery'], ['is_safe' => ['html']]), - new \Twig_SimpleFilter('doctrine_replace_query_parameters', [$this, 'replaceQueryParameters']), + new Twig_SimpleFilter('doctrine_minify_query', [$this, 'minifyQuery'], ['deprecated' => true]), + new Twig_SimpleFilter('doctrine_pretty_query', [$this, 'formatQuery'], ['is_safe' => ['html']]), + new Twig_SimpleFilter('doctrine_replace_query_parameters', [$this, 'replaceQueryParameters']), ]; } @@ -92,7 +95,7 @@ class DoctrineExtension extends \Twig_Extension $maxLength = $this->maxCharWidth; $maxLength -= count($parameters) * 5; - $maxLength = $maxLength / count($parameters); + $maxLength /= count($parameters); foreach ($parameters as $key => $value) { $isLarger = false; @@ -151,9 +154,7 @@ class DoctrineExtension extends \Twig_Extension $regexp = '/^' . $regexp . '/is'; if (preg_match($regexp, $query, $matches)) { - $result = $this->shrinkParameters($matches, $combination); - - return $result; + return $this->shrinkParameters($matches, $combination); } } @@ -162,15 +163,11 @@ class DoctrineExtension extends \Twig_Extension $regexp = '/^' . $regexp . '/is'; if (preg_match($regexp, $query, $matches)) { - $result = $this->shrinkParameters($matches, $mandatoryKeywords); - - return $result; + return $this->shrinkParameters($matches, $mandatoryKeywords); } // Fallback in case we didn't managed to find any good match (can we actually have that happen?!) - $result = substr($query, 0, $this->maxCharWidth); - - return $result; + return substr($query, 0, $this->maxCharWidth); } /** @@ -290,9 +287,9 @@ class DoctrineExtension extends \Twig_Extension $i = 1; } - $result = preg_replace_callback( + return preg_replace_callback( '/\?|((?([^"]*+)<\/pre>/Us', '\1', $html); } else { - $html = \SqlFormatter::format($sql); + $html = SqlFormatter::format($sql); $html = preg_replace('/
    ([^"]*+)<\/pre>/Us', '
    \2
    ', $html); } diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/composer.json b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/composer.json index a317139b..86e04d70 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/composer.json +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-bundle/composer.json @@ -40,7 +40,7 @@ "symfony/property-info": "~2.8|~3.0|~4.0", "symfony/phpunit-bridge": "~2.7|~3.0|~4.0", "twig/twig": "~1.26|~2.0", - "satooshi/php-coveralls": "^1.0", + "php-coveralls/php-coveralls": "^2.1", "phpunit/phpunit": "^4.8.36|^5.7|^6.4", "symfony/web-profiler-bundle": "~2.7|~3.0|~4.0" }, @@ -59,7 +59,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "1.9.x-dev" } } } diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/DependencyInjection/Configuration.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/DependencyInjection/Configuration.php index 017342ba..a2e47919 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/DependencyInjection/Configuration.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/DependencyInjection/Configuration.php @@ -20,8 +20,14 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('doctrine_migrations', 'array'); + $treeBuilder = new TreeBuilder('doctrine_migrations'); + + if (method_exists($treeBuilder, 'getRootNode')) { + $rootNode = $treeBuilder->getRootNode(); + } else { + // BC layer for symfony/config 4.1 and older + $rootNode = $treeBuilder->root('doctrine_migrations', 'array'); + } $organizeMigrationModes = $this->getOrganizeMigrationsModes(); diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/Resources/doc/index.rst b/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/Resources/doc/index.rst index 022abc92..49b23ba5 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/Resources/doc/index.rst +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/Resources/doc/index.rst @@ -286,12 +286,12 @@ to add the table to your database: $ php app/console doctrine:migrations:migrate -The moral of the story is this: after each change you make to your Doctrine +The moral of the story is this: After each change you make to your Doctrine mapping information, run the ``doctrine:migrations:diff`` command to automatically generate your migration classes. If you do this from the very beginning of your project (i.e. so that even -the first tables were loaded via a migration class), you'll always be able +the first tables were created via a migration class), you'll always be able to create a fresh database and run your migrations in order to get your database schema fully up to date. In fact, this is an easy and dependable workflow for your project. @@ -312,8 +312,8 @@ In some cases you might need access to the container to ensure the proper update your data structure. This could be necessary to update relations with some specific logic or to create new entities. -Therefore you can just implement the ContainerAwareInterface with its needed methods -to get full access to the container or ContainerAwareTrait if you use Symfony >= 2.4. +Therefore you can just implement the ``ContainerAwareInterface`` with its needed methods +to get full access to the container or ``ContainerAwareTrait``. .. code-block:: php @@ -342,7 +342,7 @@ to get full access to the container or ContainerAwareTrait if you use Symfony >= } } -With the trait +Or with the trait (since Symfony 2.4): .. code-block:: php @@ -372,7 +372,7 @@ Manual Tables It is a common use case, that in addition to your generated database structure based on your doctrine entities you might need custom tables. By default such -tables will be removed by the doctrine:migrations:diff command. +tables will be removed by the ``doctrine:migrations:diff`` command. If you follow a specific scheme you can configure doctrine/dbal to ignore those tables. Let's say all custom tables will be prefixed by ``t_``. In this case you @@ -401,10 +401,10 @@ just have to add the following configuration option to your doctrine configurati // ... )); -This ignores the tables on the DBAL level and they will be ignored by the diff command. +This ignores the tables on the DBAL level and they will be ignored by the ``diff`` command. -Note that if you have multiple connections configured then the ``schema_filter`` configuration -will need to be placed per-connection. +Note that if you have multiple connections configured, the ``schema_filter`` configuration +must be placed for each connection. .. _documentation: http://docs.doctrine-project.org/projects/doctrine-migrations/en/latest/index.html .. _DoctrineMigrationsBundle: https://github.com/doctrine/DoctrineMigrationsBundle diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/Tests/Command/DoctrineCommandTest.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/Tests/Command/DoctrineCommandTest.php index 3400243e..6ffceb3c 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/Tests/Command/DoctrineCommandTest.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/Tests/Command/DoctrineCommandTest.php @@ -4,6 +4,7 @@ namespace Doctrine\Bundle\MigrationsBundle\Tests\DependencyInjection; use Doctrine\Bundle\MigrationsBundle\Command\DoctrineCommand; use Doctrine\DBAL\Migrations\Configuration\Configuration; +use ReflectionClass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; @@ -18,17 +19,41 @@ class DoctrineCommandTest extends \PHPUnit\Framework\TestCase $configurationMock->method('getMigrations') ->willReturn(array()); + $reflectionClass = new ReflectionClass('Doctrine\DBAL\Migrations\Configuration\Configuration'); + if ($reflectionClass->hasMethod('getCustomTemplate')) { + $configurationMock + ->expects($this->once()) + ->method('setCustomTemplate') + ->with('migrations.tpl'); + } + + $configurationMock + ->expects($this->once()) + ->method('setMigrationsTableName') + ->with('migrations'); + + $configurationMock + ->expects($this->once()) + ->method('setMigrationsNamespace') + ->with('App\Migrations'); + + $configurationMock + ->expects($this->once()) + ->method('setMigrationsDirectory') + ->with(__DIR__ . '/../../'); + DoctrineCommand::configureMigrations($this->getContainer(), $configurationMock); } private function getContainer() { return new ContainerBuilder(new ParameterBag(array( - 'doctrine_migrations.dir_name' => __DIR__.'/../../', - 'doctrine_migrations.namespace' => 'test', - 'doctrine_migrations.name' => 'test', - 'doctrine_migrations.table_name' => 'test', + 'doctrine_migrations.dir_name' => __DIR__ . '/../../', + 'doctrine_migrations.namespace' => 'App\\Migrations', + 'doctrine_migrations.name' => 'App migrations', + 'doctrine_migrations.table_name' => 'migrations', 'doctrine_migrations.organize_migrations' => Configuration::VERSIONS_ORGANIZATION_BY_YEAR, + 'doctrine_migrations.custom_template' => 'migrations.tpl', ))); } } diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/Tests/DependencyInjection/DoctrineMigrationsExtensionTest.php b/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/Tests/DependencyInjection/DoctrineMigrationsExtensionTest.php index f6f26601..6afa74a0 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/Tests/DependencyInjection/DoctrineMigrationsExtensionTest.php +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/Tests/DependencyInjection/DoctrineMigrationsExtensionTest.php @@ -4,10 +4,11 @@ namespace Doctrine\Bundle\MigrationsBundle\Tests\DependencyInjection; use Doctrine\Bundle\MigrationsBundle\DependencyInjection\DoctrineMigrationsExtension; use Doctrine\DBAL\Migrations\Configuration\Configuration; +use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -class DoctrineMigrationsExtensionTest extends \PHPUnit_Framework_TestCase +class DoctrineMigrationsExtensionTest extends TestCase { public function testOrganizeMigrations() { diff --git a/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/composer.json b/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/composer.json index 713cda38..ca253f62 100644 --- a/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/composer.json +++ b/src/cadolesuser-1.0/vendor/doctrine/doctrine-migrations-bundle/composer.json @@ -26,7 +26,7 @@ "doctrine/migrations": "^1.1" }, "require-dev": { - "phpunit/phpunit": "^4.8.36" + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^7.4" }, "autoload": { "psr-4": { "Doctrine\\Bundle\\MigrationsBundle\\": "" } diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/.travis.yml b/src/cadolesuser-1.0/vendor/nikic/php-parser/.travis.yml index ee8eba99..e37b14ea 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/.travis.yml +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/.travis.yml @@ -1,5 +1,5 @@ language: php -dist: trusty +dist: xenial sudo: false cache: @@ -10,6 +10,8 @@ php: - 7.0 - 7.1 - 7.2 + - 7.3 + - 7.4snapshot - nightly install: diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/CHANGELOG.md b/src/cadolesuser-1.0/vendor/nikic/php-parser/CHANGELOG.md index 4a3f0063..526d5c43 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/CHANGELOG.md +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/CHANGELOG.md @@ -1,8 +1,40 @@ -Version 4.1.1-dev +Version 4.2.2-dev ----------------- Nothing yet. +Version 4.2.1 (2019-02-16) +-------------------------- + +### Added + +* [PHP 7.4] Add support for `??=` operator through a new `AssignOp\Coalesce` node. (#575) + +Version 4.2.0 (2019-01-12) +-------------------------- + +### Added + +* [PHP 7.4] Add support for typed properties through a new `type` subnode of `Stmt\Property`. + Additionally `Builder\Property` now has a `setType()` method. (#567) +* Add `kind` attribute to `Cast\Double_`, which allows to distinguish between `(float)`, + `(double)` and `(real)`. The form of the cast will be preserved by the pretty printer. (#565) + +### Fixed + +* Remove assertion when pretty printing anonymous class with a name (#554). + +Version 4.1.1 (2018-12-26) +-------------------------- + +### Fixed + +* Fix "undefined offset" notice when parsing specific malformed code (#551). + +### Added + +* Support error recovery for missing return type (`function foo() : {}`) (#544). + Version 4.1.0 (2018-10-10) -------------------------- @@ -17,7 +49,7 @@ Version 4.1.0 (2018-10-10) and some cases which we do not expect to occur in practice (such as flexible doc strings being nested within each other through abuse of variable-variable interpolation syntax) may not be recognized correctly. -* Added `DONT_TRAVERSER_CURRENT_AND_CHILDREN` to `NodeTraverser` to skip both traversal of child +* Added `DONT_TRAVERSE_CURRENT_AND_CHILDREN` to `NodeTraverser` to skip both traversal of child nodes, and prevent subsequent visitors from visiting the current node. Version 4.0.4 (2018-09-18) diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/README.md b/src/cadolesuser-1.0/vendor/nikic/php-parser/README.md index 5ae789f9..e62748eb 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/README.md +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/README.md @@ -3,7 +3,7 @@ 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.2 parser written in PHP. Its purpose is to simplify static code analysis and +This is a PHP 5.2 to PHP 7.3 parser written in PHP. Its purpose is to simplify static code analysis and manipulation. [**Documentation for version 4.x**][doc_master] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 7.3). diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/composer.json b/src/cadolesuser-1.0/vendor/nikic/php-parser/composer.json index 12e8458a..97428539 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/composer.json +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/composer.json @@ -1,8 +1,11 @@ { "name": "nikic/php-parser", - "description": "A PHP parser written in PHP", - "keywords": ["php", "parser"], "type": "library", + "description": "A PHP parser written in PHP", + "keywords": [ + "php", + "parser" + ], "license": "BSD-3-Clause", "authors": [ { @@ -16,15 +19,22 @@ "require-dev": { "phpunit/phpunit": "^6.5 || ^7.0" }, + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, "autoload": { "psr-4": { "PhpParser\\": "lib/PhpParser" } }, - "bin": ["bin/php-parse"], - "extra": { - "branch-alias": { - "dev-master": "4.1-dev" + "autoload-dev": { + "psr-4": { + "PhpParser\\": "test/PhpParser/" } - } + }, + "bin": [ + "bin/php-parse" + ] } diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/0_Introduction.markdown b/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/0_Introduction.markdown index 240f7fde..abc40f2b 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/0_Introduction.markdown +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/0_Introduction.markdown @@ -1,7 +1,7 @@ Introduction ============ -This project is a PHP 5.2 to PHP 7.2 parser **written in PHP itself**. +This project is a PHP 5.2 to PHP 7.3 parser **written in PHP itself**. What is this for? ----------------- @@ -26,11 +26,11 @@ programmatic PHP code analysis are incidentally PHP developers, not C developers What can it parse? ------------------ -The parser supports parsing PHP 5.2-7.2. +The parser supports parsing PHP 5.2-7.3. 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.2 source code running on PHP 5.5, for example. This emulation is somewhat +This allows to parse PHP 7.3 source code running on PHP 7.0, for example. This emulation is somewhat hacky and not perfect, but it should work well on any sane code. What output does it produce? diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/2_Usage_of_basic_components.markdown b/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/2_Usage_of_basic_components.markdown index 462b5637..9a809ec8 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/2_Usage_of_basic_components.markdown +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/2_Usage_of_basic_components.markdown @@ -339,7 +339,8 @@ All four methods can either return the changed node or not return at all (i.e. ` 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. +which instructs the traverser to skip all children of the current node. To furthermore prevent subsequent +visitors from visiting the current node, `NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN` can be used instead. 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 diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/component/AST_builders.markdown b/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/component/AST_builders.markdown index 4f338f6e..60ae0192 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/component/AST_builders.markdown +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/component/AST_builders.markdown @@ -48,7 +48,7 @@ $node = $factory->namespace('Name\Space') ->makePublic() ->makeAbstract() // ->makeFinal() ->setReturnType('bool') // ->makeReturnByRef() - ->addParam($factory->param('someParam')->setTypeHint('SomeClass')) + ->addParam($factory->param('someParam')->setType('SomeClass')) ->setDocComment('/** * This method does something. * diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/component/JSON_representation.markdown b/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/component/JSON_representation.markdown index a4d39335..47c3429c 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/component/JSON_representation.markdown +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/component/JSON_representation.markdown @@ -116,8 +116,8 @@ The JSON representation may be converted back into an AST using the `JsonDecoder ```php decode($json); +$jsonDecoder = new PhpParser\JsonDecoder(); +$ast = $jsonDecoder->decode($json); ``` Note that not all ASTs can be represented using JSON. In particular: @@ -128,4 +128,4 @@ Note that not all ASTs can be represented using JSON. In particular: If the node tree is not representable in JSON, the initial `json_encode()` call will fail. -From the command line, a JSON dump can be obtained using `vendor/bin/php-parse -j file.php`. \ No newline at end of file +From the command line, a JSON dump can be obtained using `vendor/bin/php-parse -j file.php`. diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/component/Walking_the_AST.markdown b/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/component/Walking_the_AST.markdown index fd979d5a..69af1e83 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/component/Walking_the_AST.markdown +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/doc/component/Walking_the_AST.markdown @@ -215,7 +215,7 @@ once you found it: private $class = null; public function enterNode(Node $node) { if ($node instanceof Node\Stmt\Class_ && - $node->namespaceName->toString() === 'Foo\Bar\Baz' + $node->namespacedName->toString() === 'Foo\Bar\Baz' ) { $this->class = $node; return NodeTraverser::STOP_TRAVERSAL; @@ -235,7 +235,7 @@ A single traverser can be used with multiple visitors: $traverser = new NodeTraverser; $traverser->addVisitor($visitorA); $traverser->addVisitor($visitorB); -$stmts = $traverser->traverser($stmts); +$stmts = $traverser->traverse($stmts); ``` It is important to understand that if a traverser is run with multiple visitors, the visitors will @@ -281,6 +281,8 @@ special enterNode/leaveNode return values: * If *any* visitor returns `DONT_TRAVERSE_CHILDREN`, the children will be skipped for *all* visitors. + * If *any* visitor returns `DONT_TRAVERSE_CURRENT_AND_CHILDREN`, the children will be skipped for *all* + visitors, and all *subsequent* visitors will not visit the current node. * If *any* visitor returns `STOP_TRAVERSAL`, traversal is stopped for *all* visitors. * If a visitor returns a replacement node, subsequent visitors will be passed the replacement node, not the original one. @@ -305,7 +307,7 @@ $nodeFinder = new NodeFinder; $classes = $nodeFinder->findInstanceOf($stmts, Node\Stmt\Class_::class); // Find all classes that extend another class -$extendingClasses = $nodeFinder->findInstanceOf($stmts, function(Node $node) { +$extendingClasses = $nodeFinder->find($stmts, function(Node $node) { return $node instanceof Node\Stmt\Class_ && $node->extends !== null; }); @@ -332,4 +334,4 @@ reverse direction: When working on a node, you might want to check if the parent certain property. PHP-Parser does not add parent (or sibling) references to nodes by itself, but you can easily -emulate this with a visitor. See the [FAQ](FAQ.markdown) for more information. \ No newline at end of file +emulate this with a visitor. See the [FAQ](FAQ.markdown) for more information. diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/grammar/php5.y b/src/cadolesuser-1.0/vendor/nikic/php-parser/grammar/php5.y index abc5cedf..9f7b6cfe 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/grammar/php5.y +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/grammar/php5.y @@ -579,6 +579,7 @@ expr: | 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_COALESCE_EQUAL expr { $$ = Expr\AssignOp\Coalesce [$1, $3]; } | variable T_INC { $$ = Expr\PostInc[$1]; } | T_INC variable { $$ = Expr\PreInc [$2]; } | variable T_DEC { $$ = Expr\PostDec[$1]; } @@ -628,7 +629,10 @@ expr: | 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_DOUBLE_CAST expr + { $attrs = attributes(); + $attrs['kind'] = $this->getFloatCastKind($1); + $$ = new Expr\Cast\Double($2, $attrs); } | T_STRING_CAST expr { $$ = Expr\Cast\String_ [$2]; } | T_ARRAY_CAST expr { $$ = Expr\Cast\Array_ [$2]; } | T_OBJECT_CAST expr { $$ = Expr\Cast\Object_ [$2]; } diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/grammar/php7.y b/src/cadolesuser-1.0/vendor/nikic/php-parser/grammar/php7.y index f7d32ef4..0d927ab6 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/grammar/php7.y +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/grammar/php7.y @@ -450,11 +450,11 @@ non_empty_parameter_list: ; parameter: - optional_param_type optional_ref optional_ellipsis plain_variable + optional_type optional_ref optional_ellipsis plain_variable { $$ = Node\Param[$4, null, $1, $2, $3]; $this->checkParam($$); } - | optional_param_type optional_ref optional_ellipsis plain_variable '=' expr + | optional_type optional_ref optional_ellipsis plain_variable '=' expr { $$ = Node\Param[$4, $6, $1, $2, $3]; $this->checkParam($$); } - | optional_param_type optional_ref optional_ellipsis error + | optional_type optional_ref optional_ellipsis error { $$ = Node\Param[Expr\Error[], null, $1, $2, $3]; } ; @@ -469,7 +469,7 @@ type: | T_CALLABLE { $$ = Node\Identifier['callable']; } ; -optional_param_type: +optional_type: /* empty */ { $$ = null; } | type_expr { $$ = $1; } ; @@ -477,6 +477,7 @@ optional_param_type: optional_return_type: /* empty */ { $$ = null; } | ':' type_expr { $$ = $2; } + | ':' error { $$ = null; } ; argument_list: @@ -534,8 +535,9 @@ class_statement_list: ; class_statement: - variable_modifiers property_declaration_list ';' - { $$ = Stmt\Property[$1, $2]; $this->checkProperty($$, #1); } + variable_modifiers optional_type property_declaration_list ';' + { $attrs = attributes(); + $$ = new Stmt\Property($1, $3, $attrs, $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_ex '(' parameter_list ')' optional_return_type method_body @@ -658,6 +660,7 @@ expr: | 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_COALESCE_EQUAL expr { $$ = Expr\AssignOp\Coalesce [$1, $3]; } | variable T_INC { $$ = Expr\PostInc[$1]; } | T_INC variable { $$ = Expr\PreInc [$2]; } | variable T_DEC { $$ = Expr\PostDec[$1]; } @@ -705,7 +708,10 @@ expr: | 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_DOUBLE_CAST expr + { $attrs = attributes(); + $attrs['kind'] = $this->getFloatCastKind($1); + $$ = new Expr\Cast\Double($2, $attrs); } | T_STRING_CAST expr { $$ = Expr\Cast\String_ [$2]; } | T_ARRAY_CAST expr { $$ = Expr\Cast\Array_ [$2]; } | T_OBJECT_CAST expr { $$ = Expr\Cast\Object_ [$2]; } @@ -958,6 +964,7 @@ array_pair_list: comma_or_error: ',' | error + { /* do nothing -- prevent default action of $$=$1. See #551. */ } ; inner_array_pair_list: diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/grammar/tokens.y b/src/cadolesuser-1.0/vendor/nikic/php-parser/grammar/tokens.y index 2b54f80b..fe7beff0 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/grammar/tokens.y +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/grammar/tokens.y @@ -10,7 +10,7 @@ %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 '=' 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 T_COALESCE_EQUAL %left '?' ':' %right T_COALESCE %left T_BOOLEAN_OR diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php index 439bd09c..1f3bdb27 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php @@ -4,6 +4,9 @@ namespace PhpParser\Builder; use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Node\Identifier; +use PhpParser\Node\Name; +use PhpParser\Node\NullableType; use PhpParser\Node\Stmt; class Property implements PhpParser\Builder @@ -14,6 +17,9 @@ class Property implements PhpParser\Builder protected $default = null; protected $attributes = []; + /** @var null|Identifier|Name|NullableType */ + protected $type; + /** * Creates a property builder. * @@ -95,6 +101,19 @@ class Property implements PhpParser\Builder return $this; } + /** + * Sets the property type for PHP 7.4+. + * + * @param string|Name|NullableType|Identifier $type + * + * @return $this + */ + public function setType($type) { + $this->type = BuilderHelpers::normalizeType($type); + + return $this; + } + /** * Returns the built class node. * @@ -106,7 +125,8 @@ class Property implements PhpParser\Builder [ new Stmt\PropertyProperty($this->name, $this->default) ], - $this->attributes + $this->attributes, + $this->type ); } } diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php index 77d282e0..18bd1cd5 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php @@ -8,7 +8,6 @@ use PhpParser\Node\Expr\BinaryOp\Concat; use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\Scalar\String_; -use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Use_; class BuilderFactory @@ -77,7 +76,7 @@ class BuilderFactory * @return Builder\TraitUseAdaptation The create trait use adaptation builder */ public function traitUseAdaptation($trait, $method = null) : Builder\TraitUseAdaptation { - if (is_null($method)) { + if ($method === null) { $method = $trait; $trait = null; } diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php index dcacbfb6..7b019db8 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php @@ -39,7 +39,8 @@ class PrintableNewAnonClassNode extends Expr public static function fromNewNode(Expr\New_ $newNode) { $class = $newNode->class; assert($class instanceof Node\Stmt\Class_); - assert($class->name === null); + // We don't assert that $class->name is null here, to allow consumers to assign unique names + // to anonymous classes for their own purposes. We simplify ignore the name here. return new self( $newNode->args, $class->extends, $class->implements, $class->stmts, $newNode->getAttributes() diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php index b62d79cc..3bae4a47 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php @@ -4,27 +4,54 @@ namespace PhpParser\Lexer; use PhpParser\Error; use PhpParser\ErrorHandler; +use PhpParser\Parser; class Emulative extends \PhpParser\Lexer { const PHP_7_3 = '7.3.0dev'; + const PHP_7_4 = '7.4.0dev'; + + const FLEXIBLE_DOC_STRING_REGEX = <<<'REGEX' +/<<<[ \t]*(['"]?)([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)\1\r?\n +(?:.*\r?\n)*? +(?\h*)\2(?![a-zA-Z_\x80-\xff])(?(?:;?[\r\n])?)/x +REGEX; + + const T_COALESCE_EQUAL = 1007; /** - * @var array Patches used to reverse changes introduced in the code + * @var mixed[] Patches used to reverse changes introduced in the code */ - private $patches; + private $patches = []; + + /** + * @param mixed[] $options + */ + public function __construct(array $options = []) + { + parent::__construct($options); + + // add emulated tokens here + $this->tokenMap[self::T_COALESCE_EQUAL] = Parser\Tokens::T_COALESCE_EQUAL; + } public function startLexing(string $code, ErrorHandler $errorHandler = null) { $this->patches = []; - $preparedCode = $this->prepareCode($code); - if (null === $preparedCode) { + + if ($this->isEmulationNeeded($code) === false) { // Nothing to emulate, yay parent::startLexing($code, $errorHandler); return; } $collector = new ErrorHandler\Collecting(); + + // 1. emulation of heredoc and nowdoc new syntax + $preparedCode = $this->processHeredocNowdoc($code); parent::startLexing($preparedCode, $collector); + + // 2. emulation of ??= token + $this->processCoaleseEqual($code); $this->fixupTokens(); $errors = $collector->getErrors(); @@ -36,30 +63,60 @@ class Emulative extends \PhpParser\Lexer } } - /** - * Prepares code for emulation. If nothing has to be emulated null is returned. - * - * @param string $code - * @return null|string - */ - private function prepareCode(string $code) { + private function isCoalesceEqualEmulationNeeded(string $code): bool + { + // skip version where this works without emulation + if (version_compare(\PHP_VERSION, self::PHP_7_4, '>=')) { + return false; + } + + return strpos($code, '??=') !== false; + } + + private function processCoaleseEqual(string $code) + { + if ($this->isCoalesceEqualEmulationNeeded($code) === false) { + return; + } + + // We need to manually iterate and manage a count because we'll change + // the tokens array on the way + $line = 1; + for ($i = 0, $c = count($this->tokens); $i < $c; ++$i) { + if (isset($this->tokens[$i + 1])) { + if ($this->tokens[$i][0] === T_COALESCE && $this->tokens[$i + 1] === '=') { + array_splice($this->tokens, $i, 2, [ + [self::T_COALESCE_EQUAL, '??=', $line] + ]); + $c--; + continue; + } + } + if (\is_array($this->tokens[$i])) { + $line += substr_count($this->tokens[$i][1], "\n"); + } + } + } + + private function isHeredocNowdocEmulationNeeded(string $code): bool + { + // skip version where this works without emulation if (version_compare(\PHP_VERSION, self::PHP_7_3, '>=')) { - return null; + return false; } - if (strpos($code, '<<<') === false) { - // Definitely doesn't contain heredoc/nowdoc - return null; + return strpos($code, '<<<') !== false; + } + + private function processHeredocNowdoc(string $code): string + { + if ($this->isHeredocNowdocEmulationNeeded($code) === false) { + return $code; } - $flexibleDocStringRegex = <<<'REGEX' -/<<<[ \t]*(['"]?)([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)\1\r?\n -(?:.*\r?\n)*? -(?\h*)\2(?![a-zA-Z_\x80-\xff])(?(?:;?[\r\n])?)/x -REGEX; - if (!preg_match_all($flexibleDocStringRegex, $code, $matches, PREG_SET_ORDER|PREG_OFFSET_CAPTURE)) { + if (!preg_match_all(self::FLEXIBLE_DOC_STRING_REGEX, $code, $matches, PREG_SET_ORDER|PREG_OFFSET_CAPTURE)) { // No heredoc/nowdoc found - return null; + return $code; } // Keep track of how much we need to adjust string offsets due to the modifications we @@ -93,19 +150,31 @@ REGEX; } } - if (empty($this->patches)) { - // We did not end up emulating anything - return null; - } - return $code; } - private function fixupTokens() { - assert(count($this->patches) > 0); + private function isEmulationNeeded(string $code): bool + { + if ($this->isHeredocNowdocEmulationNeeded($code)) { + return true; + } + + if ($this->isCoalesceEqualEmulationNeeded($code)) { + return true; + } + + return false; + } + + private function fixupTokens() + { + if (\count($this->patches) === 0) { + return; + } // Load first patch $patchIdx = 0; + list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; // We use a manual loop over the tokens, because we modify the array on the fly @@ -200,4 +269,4 @@ REGEX; $error->setAttributes($attrs); } } -} \ No newline at end of file +} diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php index 0cee5543..891ba5f8 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php @@ -6,6 +6,11 @@ use PhpParser\Node\Expr\Cast; class Double extends Cast { + // For use in "kind" attribute + const KIND_DOUBLE = 1; // "double" syntax + const KIND_FLOAT = 2; // "float" syntax + const KIND_REAL = 3; // "real" syntax + public function getType() : string { return 'Expr_Cast_Double'; } diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php index 0b53f67c..37d99392 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php @@ -6,7 +6,7 @@ use PhpParser\NodeAbstract; class Param extends NodeAbstract { - /** @var null|Identifier|Name|NullableType Typehint */ + /** @var null|Identifier|Name|NullableType Type declaration */ public $type; /** @var bool Whether parameter is passed by reference */ public $byRef; @@ -20,12 +20,12 @@ class Param extends NodeAbstract /** * Constructs a parameter node. * - * @param Expr\Variable|Expr\Error $var Parameter variable - * @param null|Expr $default Default value - * @param null|string|Name|NullableType $type Typehint - * @param bool $byRef Whether is passed by reference - * @param bool $variadic Whether this is a variadic argument - * @param array $attributes Additional attributes + * @param Expr\Variable|Expr\Error $var Parameter variable + * @param null|Expr $default Default value + * @param null|string|Identifier|Name|NullableType $type Type declaration + * @param bool $byRef Whether is passed by reference + * @param bool $variadic Whether this is a variadic argument + * @param array $attributes Additional attributes */ public function __construct( $var, Expr $default = null, $type = null, @@ -42,7 +42,7 @@ class Param extends NodeAbstract public function getSubNodeNames() : array { return ['type', 'byRef', 'variadic', 'var', 'default']; } - + public function getType() : string { return 'Param'; } diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php index 30528509..81952be0 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php @@ -6,7 +6,7 @@ use PhpParser\Node; class Case_ extends Node\Stmt { - /** @var null|Node\Expr $cond Condition (null for default) */ + /** @var null|Node\Expr Condition (null for default) */ public $cond; /** @var Node\Stmt[] Statements */ public $stmts; diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php index 91291aa1..1888bbb6 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php @@ -3,6 +3,9 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; +use PhpParser\Node\Identifier; +use PhpParser\Node\Name; +use PhpParser\Node\NullableType; class Property extends Node\Stmt { @@ -10,22 +13,26 @@ class Property extends Node\Stmt public $flags; /** @var PropertyProperty[] Properties */ public $props; + /** @var null|Identifier|Name|NullableType Type declaration */ + public $type; /** * Constructs a class property list node. * - * @param int $flags Modifiers - * @param PropertyProperty[] $props Properties - * @param array $attributes Additional attributes + * @param int $flags Modifiers + * @param PropertyProperty[] $props Properties + * @param array $attributes Additional attributes + * @param null|string|Identifier|Name|NullableType $type Type declaration */ - public function __construct(int $flags, array $props, array $attributes = []) { + public function __construct(int $flags, array $props, array $attributes = [], $type = null) { parent::__construct($attributes); $this->flags = $flags; $this->props = $props; + $this->type = \is_string($type) ? new Identifier($type) : $type; } public function getSubNodeNames() : array { - return ['flags', 'props']; + return ['flags', 'type', 'props']; } /** @@ -64,7 +71,7 @@ class Property extends Node\Stmt public function isStatic() : bool { return (bool) ($this->flags & Class_::MODIFIER_STATIC); } - + public function getType() : string { return 'Stmt_Property'; } diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php index 29d42b4f..fda59599 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php @@ -2,8 +2,6 @@ namespace PhpParser; -use PhpParser\Node; - abstract class NodeAbstract implements Node, \JsonSerializable { protected $attributes; @@ -159,11 +157,11 @@ abstract class NodeAbstract implements Node, \JsonSerializable } public function getAttribute(string $key, $default = null) { - if (!array_key_exists($key, $this->attributes)) { - return $default; - } else { + if (array_key_exists($key, $this->attributes)) { return $this->attributes[$key]; } + + return $default; } public function getAttributes() : array { diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php index 44d01e10..cfe8ce76 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php @@ -2,7 +2,6 @@ namespace PhpParser\NodeVisitor; -use PhpParser\Error; use PhpParser\ErrorHandler; use PhpParser\NameContext; use PhpParser\Node; @@ -94,6 +93,10 @@ class NameResolver extends NodeVisitorAbstract || $node instanceof Expr\Closure ) { $this->resolveSignature($node); + } elseif ($node instanceof Stmt\Property) { + if (null !== $node->type) { + $node->type = $this->resolveType($node->type); + } } elseif ($node instanceof Stmt\Const_) { foreach ($node->consts as $const) { $this->addNamespacedName($const); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php index 4da2dc97..643aa7f0 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php @@ -17,17 +17,17 @@ use PhpParser\Node\Stmt; */ class Php5 extends \PhpParser\ParserAbstract { - protected $tokenToSymbolMapSize = 392; - protected $actionTableSize = 1072; - protected $gotoTableSize = 644; + protected $tokenToSymbolMapSize = 393; + protected $actionTableSize = 1111; + protected $gotoTableSize = 647; - protected $invalidSymbol = 157; + protected $invalidSymbol = 158; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 403; - protected $numNonLeafStates = 672; + protected $YY2TBLSTATE = 405; + protected $numNonLeafStates = 674; protected $symbolToName = array( "EOF", @@ -58,6 +58,7 @@ class Php5 extends \PhpParser\ParserAbstract "T_SL_EQUAL", "T_SR_EQUAL", "T_POW_EQUAL", + "T_COALESCE_EQUAL", "'?'", "':'", "T_COALESCE", @@ -190,388 +191,396 @@ class Php5 extends \PhpParser\ParserAbstract ); 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, + 0, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 54, 157, 158, 154, 53, 36, 158, + 152, 153, 51, 48, 7, 49, 50, 52, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 30, 149, + 42, 15, 44, 29, 66, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 68, 158, 156, 35, 158, 155, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 150, 34, 151, 56, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 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, + 27, 28, 31, 32, 33, 37, 38, 39, 40, 41, + 43, 45, 46, 47, 55, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 67, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 158, + 158, 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 + 132, 133, 134, 135, 136, 137, 138, 158, 158, 158, + 158, 158, 158, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148 ); protected $action = array( - 677, 678, 679, 680, 681, 279, 682, 683, 684, 720, - 721, 218, 219, 220, 221, 222, 223, 224, 225, 226, - 0, 227, 228, 229, 230, 231, 232, 233, 234, 235, - 236, 237, 238,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - -32766,-32767,-32767,-32767,-32767, 206, 239, 240,-32766,-32766, - -32766,-32766, 685,-32766, 123,-32766,-32766,-32766,-32766,-32766, - -32766,-32767,-32767,-32767,-32767,-32767, 686, 687, 688, 689, - 690, 691, 692, 350, 30, 752, 954, 955, 956, 953, - 952, 951, 693, 694, 695, 696, 697, 698, 699, 700, - 701, 702, 703, 723, 724, 725, 726, 727, 715, 716, - 717, 718, 719, 704, 705, 706, 707, 708, 709, 710, - 746, 747, 748, 749, 750, 751, 711, 712, 713, 714, - 744, 735, 733, 734, 730, 731, 1046, 722, 728, 729, - 736, 737, 739, 738, 740, 741, 54, 55, 422, 56, - 57, 732, 743, 742, -219, 58, 59, 413, 60,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, 1046,-32767, - -32767,-32767,-32767,-32767,-32767,-32767,-32767, 96, 97, 98, - 99, 100,-32766,-32766,-32766,-32766,-32766, 1224, 52, 829, - 1225, 61, 62,-32766,-32766,-32766, 294, 63, 590, 64, - 290, 291, 65, 66, 67, 68, 69, 70, 71, 72, - 1046, 26, 298, 73, 414,-32766,-32766,-32766, 877, 1097, - 1098, 756, 754, 759, 815, 771, 772, 471,-32766,-32766, - -32766, 830, 421, 294, 548,-32766, 1182,-32766,-32766,-32766, - -32766,-32766,-32766, 215, 216, 217, 434, 420,-32766, 306, - -32766,-32766,-32766,-32766,-32766, 1109, 495, 954, 955, 956, - 953, 952, 951, 202, 479, 480, 215, 216, 217, 407, - 122, 241, 813, 481, 482, 1046, 1103, 1104, 1105, 1106, - 1100, 1101, 309, 901, 902, 328, 202, 496, 1107, 1102, - 430,-32766, 215, 216, 217, 41, 496, 332, 320, 430, - 321, 423, -125, -125, -125, -4, 830, 470, 126, 417, - 336, 818, 202, 907, 40, 21, 424, -125, 472, -125, - 473, -125, 474, -125,-32766, 425, 215, 216, 217, 31, - 32, 426, 427, 10, 33, 475, 820, 878, 74, 216, - 217, 348, 349, 476, 477, 126, 202, 243, 418, 478, - 1046, 444, 801, 848, 428, 429, 281, 756, 202, 759, - 35, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116,-32766,-32766,-32766, 423, 1064, 832, 643, - -125, 830, 470, 215, 216, 217, 818, 1148, 927, 40, - 21, 424, 1074, 472, 628, 473,-32766, 474,-32766, 419, - 425, 985, 987, 202, 31, 32, 426, 427, 405, 33, - 475, 811, 1046, 74, 319, 1046, 348, 349, 476, 477, - -32766,-32766,-32766, 496, 478, 25, 430, 763, 848, 428, - 429, 435, 48, 332, 415, 295, 901, 902, 282, 1147, - -32766, 297,-32766,-32766,-32766,-32766, 1182, 347, 333, 496, - 770, 423, 430, 832, 643, -4, 830, 470, -223, 331, - 629, 818,-32766, 430, 40, 21, 424, 932, 472, 308, - 473, 445, 474, -502, 928, 425, -203, -203, -203, 31, - 32, 426, 427, 296, 33, 475, 809, 759, 74, 816, - 1215, 348, 349, 476, 477,-32766,-32766,-32766, 1046, 478, - 335, 1197, 801, 848, 428, 429, 236, 237, 238, 217, - 49,-32766,-32766,-32766, 118,-32766, 127,-32766,-32766,-32766, - 336, 292, 239, 240, 1046, 1196, 423, 202, 832, 643, - -203,-32766, 470,-32766,-32766, 481, 818, 208, 131, 40, - 21, 424, 581, 472, 20, 473, 36, 474, 29, 293, - 425, -204, -204, -204, 31, 32, 426, 427, 51, 33, - 475, 447, 121, 74, 202, 830, 348, 349, 476, 477, - 908,-32766,-32766,-32766, 478, 244, 522, 801, 848, 428, - 429, 101, 102, 103, 9, 300, 78, 79, 80, 246, - 324,-32766, 119, 646, 233, 234, 235, 104, 77, 946, - 130, 754, 332, 832, 643, -204, 34, 245, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, -254, 300, 1109, 830, 423, 98, 99, 100, 496, - 120, 470, 430, 1046, 104, 818,-32766,-32766, 40, 21, - 424, 117, 472, 828, 473, 440, 474, 207, 645, 425, - 125, 209, 647, 31, 32, 426, 830, 841, 33, 475, - -32766,-32766, 74, 128, 657, 348, 349, 332, 239, 240, - 459, 597, 654, 478, 312, 454, 22, 132, 358, 771, - 772, 604, 605, -82, 660, 300, 943, 663, 931, 671, - 764, 649,-32766, 104, 423, 756, 757, 53, 612, 959, - 470, 43, 832, 643, 818, 44, 45, 40, 21, 424, - 298, 472, -273, 473, 46, 474, 50, 47, 425, 129, - 759, 754, 31, 32, 426, 830, 423, 33, 475, 637, - 528, 74, 470,-32766, 348, 349, 818, 624, 850, 40, - 21, 424, 478, 472, 443, 473, 584, 474, 849, 616, - 425, -80, 1108, 655, 31, 32, 426, 830, 11, 33, - 475, 446, 278, 74, 438, 601, 348, 349, 587, 602, - 283, 832, 643, 464, 478, 325, 1154, 0, 0, 327, - 0, 0, 0, 0, 0, 651, 0, 0, 0, 322, - 0, 0, 0, 323, 0, 423, 0, 0, 307, 0, - 0, 470, 305, 832, 643, 818, -503, -502, 40, 21, - 424, 481, 472, 0, 473, -403, 474, 14, 5, 425, - 0, 0, 6, 31, 32, 426, 830, 423, 33, 475, - 357, -411, 74, 470, 12, 348, 349, 818, -412, 440, - 40, 21, 424, 478, 472, 382, 473, 409, 474, 408, - 383, 425, 391, 371, 530, 31, 32, 426, 843, 329, - 33, 475, 666, 810, 74, 39, 38, 348, 349, 880, - 821, 769, 832, 643, 819, 478, 937, 806, 667, 768, - 827, 936, 939, 812, 767, 814, 826, 872, 804, 938, - 865, 862, 817, 860, 935, 871, 423, 77, 644, 648, - 650, 652, 470, 653, 864, 643, 818, 656, 658, 40, - 21, 424, 659, 472, 661, 473, 242, 474, 662, 330, - 425, 403, 404, 124, 31, 32, 426, 845, 773, 33, - 475, 776, 775, 74, 210, 211, 348, 349, 870, 668, - 212, 802, 213, 1221, 478, 458, 1220, 1190, 1188, 1173, - 1186, 1088, 919, 1194, 204, 1184, 869, 944, 835, 210, - 211, 1049, 1097, 1098, 844, 212,-32766, 213, 1048, 837, - 1099, 1060, 774, 832, 643, 42, 1222, 846, 765, 204, - 847, 766, 1223, 1044, 37, 28, 412, 1097, 1098, 406, - 337,-32766, 75, 76, 304, 1099, 303, 302, 301, 27, - 24, 289, 288, 280,-32766, 205, 0, 1025, 573, 1026, - 1050, -220, 1090, -219, 16, 1113, 909, 569, 1054, 1103, - 1104, 1105, 1106, 1100, 1101, 381, 1051, 634, 563, 468, - 463, 1107, 1102, 462, 455, 376, 18, 17, 214, 0, - -32766, 608, 569, -421, 1103, 1104, 1105, 1106, 1100, 1101, - 381, 1168, 1167, 1114, 1218, 1087, 1107, 1102, 1185, 1057, - 1172, 1187, 1073, 214, 1058,-32766, 1059, 0, 1056, 1055, - 0, 1153 + 679, 680, 681, 682, 683, 0, 684, 685, 686, 722, + 723, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 208, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + -32766,-32767,-32767,-32767,-32767, 124, 241, 242,-32766,-32766, + -32766,-32766,-32766, 687,-32766, 30,-32766,-32766,-32766,-32766, + -32766,-32766,-32767,-32767,-32767,-32767,-32767, 688, 689, 690, + 691, 692, 693, 694, 1185, 415, 754, 956, 957, 958, + 955, 954, 953, 695, 696, 697, 698, 699, 700, 701, + 702, 703, 704, 705, 725, 726, 727, 728, 729, 717, + 718, 719, 720, 721, 706, 707, 708, 709, 710, 711, + 712, 748, 749, 750, 751, 752, 753, 713, 714, 715, + 716, 746, 737, 735, 736, 732, 733, 281, 724, 730, + 731, 738, 739, 741, 740, 742, 743, 54, 55, 424, + 56, 57, 734, 745, 744, 423, 58, 59, 338, 60, + -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + -32767,-32767,-32767,-32767,-32767,-32767,-32767,-32767, 96, 97, + 98, 99, 100, 330, 101, 102, 103, 831, 302,-32766, + -32766,-32766,-32766, 61, 62, 758, 1049, 761, 296, 63, + 104, 64, 292, 293, 65, 66, 67, 68, 69, 70, + 71, 72, 349, 26, 300, 73, 416,-32766,-32766,-32766, + 219, 1100, 1101, 758,-32766, 761,-32766,-32766,-32766, 473, + 1077, 1049, 832,-32766,-32766,-32766, 333, 283,-32766, 204, + -32766,-32766,-32766,-32766,-32766,-32766, 48,-32766, 436,-32766, + -32766,-32766,-32766,-32766,-32766, 296,-32766,-32766, 497, 352, + 422, 498, 310, 550, 432, 1199, 481, 482, 52, 437, + 446, 334, 903, 904, 298, 483, 484, -219, 1106, 1107, + 1108, 1109, 1103, 1104, 311, 498, 773, 774, 432, 498, + 1110, 1105, 432, 217, 218, 219,-32766, 41,-32766, 334, + 322, 1067, 323, 425, -125, -125, -125, -4, 832, 472, + 127, 1049, 419, 820, 204, 909, 40, 21, 426, -125, + 474, -125, 475, -125, 476, -125, 756, 427, 119, 308, + 409, 31, 32, 428, 429, 822, 33, 477, 218, 219, + 74, 421, 756, 350, 351, 478, 479,-32766,-32766,-32766, + 123, 480, 25, 879, 803, 850, 430, 431, 204, 1049, + 49, 956, 957, 958, 955, 954, 953, 127,-32766, 36, + -32766,-32766,-32766,-32766, 630, 903, 904, 299, 832, 425, + 834, 645, -125, 1200, 761, 472, 1049, 1218, 498, 820, + 447, 432, 40, 21, 426, 1185, 474, -223, 475, 10, + 476, 817, 929, 427,-32766,-32766,-32766, 31, 32, 428, + 429, 407, 33, 477, 129, 420, 74, 321, 334, 350, + 351, 478, 479, 217, 218, 219, 1049, 480,-32766,-32766, + 765, 850, 430, 431,-32766,-32766, 238, 239, 240, 51, + 631, 1150, 120, 432, 204, 29, 295, 934, 832, 425, + 210, 335, 241, 242, 772, 472, 834, 645, -4, 820, + 417, 1049, 40, 21, 426, 128, 474, 592, 475, 338, + 476, 483, 880, 427, -203, -203, -203, 31, 32, 428, + 429, 337, 33, 477, 122, 297, 74, 20,-32766, 350, + 351, 478, 479,-32766,-32766,-32766, 815, 480, 910, 246, + 803, 850, 430, 431,-32766,-32766,-32766, 9, 132, 217, + 218, 219, 583, 326,-32766, 1049,-32766,-32766,-32766, 425, + 524, 121, 948, 813, 1112, 472, 834, 645, -203, 820, + 204, 245, 40, 21, 426, 248, 474, 247, 475, 284, + 476, 930, 449, 427, -204, -204, -204, 31, 32, 428, + 429, 118, 33, 477, -254, 832, 74, 818, 209, 350, + 351, 478, 479, 811, 217, 218, 219, 480, 1151, 243, + 803, 850, 430, 431,-32766,-32766,-32766, 1112, 78, 79, + 80, 235, 236, 237, 648, 204, 98, 99, 100, 77, + 211, 1227, 131, 334, 1228,-32766, 834, 645, -204, 34, + 204, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 832, 302, 425, 217, 218, 219, + 241, 242, 472, 1049, 1049, 498, 820, 104, 432, 40, + 21, 426, 830, 474, 659, 475, 442, 476, 204, 647, + 427, 843, 126, 649, 31, 32, 428, 294, 656, 33, + 477, 461, 599, 74, 456, 22, 350, 351, 773, 774, + 832, 133, 360, 314, 480, 606, 607, 945, 665, 933, + 673, 766, 651, -82,-32766, 302, 53, 104, 614, 758, + 961, 530, 43, 44, 45, 425, 300, 46, 626, 653, + 50, 472, 47, 834, 645, 820, 130, 639, 40, 21, + 426, 759, 474, 756, 475, 604, 476, -273, 445, 427, + 761, 832,-32766, 31, 32, 428, 852, 327, 33, 477, + 586, -80, 74, 851, 329, 350, 351, 1111, 618, 1157, + 11, 425, 448, 480, 280, 603, -404, 472, 589, 440, + 662, 820, 845, 466, 40, 21, 426, 610, 474, 0, + 475, 0, 476, 0, 0, 427, 0, 832, 324, 31, + 32, 428, 834, 645, 33, 477, 0, 0, 74, 0, + 0, 350, 351, 325, 483, 309, 307, -504, -503, 480, + 0, 0, 425, 0, 0, 0, 657, 0, 472, 0, + 0, 0, 820, 14, 5, 40, 21, 426, 6, 474, + 359, 475, 668, 476, -412, 12, 427, -413, 866, 645, + 31, 32, 428, 442, 384, 33, 477, 411, 410, 74, + 385, 393, 350, 351, 373, 532, 832, 847, 425, 812, + 480, 39, 38, 882, 472, 823, 771, 821, 820, 939, + 808, 40, 21, 426, 669, 474, 770, 475, 244, 476, + 829, 938, 427, 941, 814, 769, 31, 32, 428, 834, + 645, 33, 477, 816, 828, 74, 212, 213, 350, 351, + 874, 806, 214, 940, 215, 867, 480, 864, 819, 862, + 937, 873, 1047, 331, 77, 646, 206, 650, 652, 654, + 655, 658, 660, 661, 1100, 1101, 663, 425,-32766, 664, + 332, 405, 1102, 472, 406, 834, 645, 820, 125, 42, + 40, 21, 426, 775, 474, 778, 475, 777, 476, 872, + 670, 427, 804, 1224, 460, 31, 32, 428, 1223, 1193, + 33, 477, 1191, 1176, 74, 1189, 1091, 350, 351, 921, + 1197, 1187, 871, 946, 837, 480, 1052, 846, 1051, 571, + 839, 1106, 1107, 1108, 1109, 1103, 1104, 383, 1063, 212, + 213, 776, 1225, 1110, 1105, 214, 848, 215, 767, 1028, + 216, 849,-32766, 768, 834, 645, 37, 1226, -422, 206, + 28, 414, 408, 339, 75, 76, 306, 1100, 1101, 305, + 304,-32766, 303, 27, 24, 1102, 35, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 291, 290, 282,-32766, 207, 0, 575, 1029, 1053, -220, + 1093, -219, 16, 1116, 911, 1057, 1054, 636, 565, 470, + 465, 464, 457, 378, 18, 17, 0, 285, 988, 990, + 1171, 1170, 571, 1117, 1106, 1107, 1108, 1109, 1103, 1104, + 383, 1221, 1090, 1188, 1060, 1175, 1110, 1105, 1190, 1076, + 1061, 1062, 1059, 216, 1058,-32766, 1156, 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, + -503 ); protected $actionCheck = array( - 2, 3, 4, 5, 6, 13, 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, 7, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 68, 69, 70, 71, - 72, 73, 74, 7, 7, 77, 112, 113, 114, 115, - 116, 117, 84, 85, 86, 87, 88, 89, 90, 91, + 2, 3, 4, 5, 6, 0, 8, 9, 10, 11, + 12, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 7, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 8, 9, 10, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 7, 67, 68, 32, 33, + 34, 35, 36, 55, 29, 7, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 69, 70, 71, + 72, 73, 74, 75, 80, 7, 78, 113, 114, 115, + 116, 117, 118, 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, 12, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 2, 3, 4, 5, - 6, 143, 144, 145, 152, 11, 12, 7, 14, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 12, 41, - 42, 43, 44, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 31, 32, 33, 34, 35, 77, 67, 1, - 80, 47, 48, 8, 9, 10, 35, 53, 82, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 12, 67, 68, 69, 70, 8, 9, 10, 29, 75, - 76, 77, 77, 79, 148, 102, 103, 83, 8, 9, - 10, 1, 7, 35, 78, 28, 79, 30, 31, 32, - 33, 34, 35, 8, 9, 10, 102, 7, 28, 128, - 30, 31, 32, 33, 34, 139, 112, 112, 113, 114, - 115, 116, 117, 28, 120, 121, 8, 9, 10, 146, - 149, 13, 148, 129, 130, 12, 132, 133, 134, 135, - 136, 137, 138, 130, 131, 7, 28, 143, 144, 145, - 146, 8, 8, 9, 10, 151, 143, 153, 154, 146, - 156, 71, 72, 73, 74, 0, 1, 77, 147, 7, - 153, 81, 28, 152, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 79, 95, 8, 9, 10, 99, - 100, 101, 102, 7, 104, 105, 148, 148, 108, 9, - 10, 111, 112, 113, 114, 147, 28, 29, 7, 119, - 12, 29, 122, 123, 124, 125, 7, 77, 28, 79, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 31, 32, 33, 71, 152, 148, 149, - 150, 1, 77, 8, 9, 10, 81, 152, 148, 84, - 85, 86, 112, 88, 77, 90, 151, 92, 153, 7, - 95, 56, 57, 28, 99, 100, 101, 102, 103, 104, - 105, 148, 12, 108, 109, 12, 111, 112, 113, 114, - 8, 9, 10, 143, 119, 7, 146, 122, 123, 124, - 125, 151, 67, 153, 123, 35, 130, 131, 35, 155, - 28, 35, 30, 31, 32, 33, 79, 7, 143, 143, - 148, 71, 146, 148, 149, 150, 1, 77, 152, 7, - 143, 81, 151, 146, 84, 85, 86, 150, 88, 7, - 90, 149, 92, 128, 148, 95, 96, 97, 98, 99, - 100, 101, 102, 7, 104, 105, 148, 79, 108, 148, - 82, 111, 112, 113, 114, 8, 9, 10, 12, 119, - 67, 152, 122, 123, 124, 125, 50, 51, 52, 10, - 67, 8, 9, 10, 149, 28, 149, 30, 31, 32, - 153, 35, 66, 67, 12, 1, 71, 28, 148, 149, - 150, 28, 77, 30, 31, 129, 81, 15, 149, 84, - 85, 86, 153, 88, 152, 90, 13, 92, 140, 141, - 95, 96, 97, 98, 99, 100, 101, 102, 67, 104, - 105, 128, 13, 108, 28, 1, 111, 112, 113, 114, - 152, 8, 9, 10, 119, 15, 82, 122, 123, 124, - 125, 50, 51, 52, 103, 54, 8, 9, 10, 15, - 109, 28, 149, 29, 47, 48, 49, 66, 149, 118, - 29, 77, 153, 148, 149, 150, 28, 15, 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, 139, 1, 71, 47, 48, 49, 143, - 149, 77, 146, 12, 66, 81, 8, 9, 84, 85, - 86, 15, 88, 29, 90, 146, 92, 15, 149, 95, - 29, 15, 29, 99, 100, 101, 1, 35, 104, 105, - 31, 32, 108, 149, 29, 111, 112, 153, 66, 67, - 72, 73, 29, 119, 29, 72, 73, 97, 98, 102, - 103, 106, 107, 29, 29, 54, 148, 149, 148, 149, - 148, 149, 31, 66, 71, 77, 77, 67, 74, 79, - 77, 67, 148, 149, 81, 67, 67, 84, 85, 86, - 68, 88, 79, 90, 67, 92, 67, 67, 95, 67, - 79, 77, 99, 100, 101, 1, 71, 104, 105, 89, - 82, 108, 77, 82, 111, 112, 81, 91, 123, 84, - 85, 86, 119, 88, 86, 90, 87, 92, 123, 93, - 95, 94, 139, 29, 99, 100, 101, 1, 94, 104, - 105, 94, 94, 108, 102, 96, 111, 112, 96, 109, - 153, 148, 149, 102, 119, 110, 139, -1, -1, 126, - -1, -1, -1, -1, -1, 29, -1, -1, -1, 126, - -1, -1, -1, 127, -1, 71, -1, -1, 128, -1, - -1, 77, 128, 148, 149, 81, 128, 128, 84, 85, - 86, 129, 88, -1, 90, 142, 92, 142, 142, 95, - -1, -1, 142, 99, 100, 101, 1, 71, 104, 105, - 142, 142, 108, 77, 142, 111, 112, 81, 142, 146, - 84, 85, 86, 119, 88, 146, 90, 146, 92, 146, - 146, 95, 146, 146, 146, 99, 100, 101, 147, 149, - 104, 105, 148, 148, 108, 148, 148, 111, 112, 148, - 148, 148, 148, 149, 148, 119, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 71, 149, 149, 149, - 149, 149, 77, 149, 148, 149, 81, 149, 149, 84, - 85, 86, 149, 88, 149, 90, 29, 92, 149, 149, - 95, 149, 149, 149, 99, 100, 101, 150, 150, 104, - 105, 150, 150, 108, 47, 48, 111, 112, 150, 150, - 53, 150, 55, 150, 119, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 67, 150, 150, 150, 150, 47, - 48, 150, 75, 76, 150, 53, 79, 55, 150, 150, - 83, 150, 150, 148, 149, 151, 150, 150, 150, 67, - 150, 150, 150, 154, 151, 151, 151, 75, 76, 151, - 151, 79, 151, 151, 151, 83, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, -1, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 130, 152, 132, - 133, 134, 135, 136, 137, 138, 152, 152, 152, 152, - 152, 144, 145, 152, 152, 152, 152, 152, 151, -1, - 153, 155, 130, 154, 132, 133, 134, 135, 136, 137, - 138, 155, 155, 155, 155, 155, 144, 145, 155, 155, - 155, 155, 155, 151, 155, 153, 155, -1, 155, 155, - -1, 156 + 122, 123, 124, 125, 126, 127, 128, 13, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 2, 3, 4, + 5, 6, 144, 145, 146, 7, 11, 12, 154, 14, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 8, + 42, 43, 44, 45, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 7, 51, 52, 53, 1, 55, 32, + 33, 34, 35, 48, 49, 78, 12, 80, 36, 54, + 67, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 7, 68, 69, 70, 71, 8, 9, 10, + 10, 76, 77, 78, 80, 80, 8, 9, 10, 84, + 113, 12, 1, 8, 9, 10, 7, 7, 29, 29, + 31, 32, 33, 34, 35, 36, 68, 29, 103, 31, + 32, 33, 34, 35, 29, 36, 31, 32, 113, 7, + 7, 144, 7, 79, 147, 1, 121, 122, 68, 152, + 30, 154, 131, 132, 7, 130, 131, 153, 133, 134, + 135, 136, 137, 138, 139, 144, 103, 104, 147, 144, + 145, 146, 147, 8, 9, 10, 152, 152, 154, 154, + 155, 153, 157, 72, 73, 74, 75, 0, 1, 78, + 148, 12, 7, 82, 29, 153, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 78, 96, 150, 129, + 147, 100, 101, 102, 103, 149, 105, 106, 9, 10, + 109, 7, 78, 112, 113, 114, 115, 8, 9, 10, + 150, 120, 7, 30, 123, 124, 125, 126, 29, 12, + 68, 113, 114, 115, 116, 117, 118, 148, 29, 13, + 31, 32, 33, 34, 78, 131, 132, 36, 1, 72, + 149, 150, 151, 153, 80, 78, 12, 83, 144, 82, + 150, 147, 85, 86, 87, 80, 89, 153, 91, 7, + 93, 149, 149, 96, 8, 9, 10, 100, 101, 102, + 103, 104, 105, 106, 150, 7, 109, 110, 154, 112, + 113, 114, 115, 8, 9, 10, 12, 120, 8, 9, + 123, 124, 125, 126, 32, 33, 51, 52, 53, 68, + 144, 156, 150, 147, 29, 141, 142, 151, 1, 72, + 15, 144, 67, 68, 149, 78, 149, 150, 151, 82, + 124, 12, 85, 86, 87, 150, 89, 83, 91, 154, + 93, 130, 149, 96, 97, 98, 99, 100, 101, 102, + 103, 68, 105, 106, 13, 36, 109, 153, 152, 112, + 113, 114, 115, 8, 9, 10, 149, 120, 153, 15, + 123, 124, 125, 126, 32, 33, 34, 104, 150, 8, + 9, 10, 154, 110, 29, 12, 31, 32, 33, 72, + 83, 150, 119, 149, 140, 78, 149, 150, 151, 82, + 29, 30, 85, 86, 87, 15, 89, 15, 91, 36, + 93, 149, 129, 96, 97, 98, 99, 100, 101, 102, + 103, 15, 105, 106, 151, 1, 109, 149, 15, 112, + 113, 114, 115, 149, 8, 9, 10, 120, 153, 13, + 123, 124, 125, 126, 8, 9, 10, 140, 8, 9, + 10, 48, 49, 50, 30, 29, 48, 49, 50, 150, + 15, 78, 30, 154, 81, 29, 149, 150, 151, 29, + 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 1, 55, 72, 8, 9, 10, + 67, 68, 78, 12, 12, 144, 82, 67, 147, 85, + 86, 87, 30, 89, 30, 91, 147, 93, 29, 150, + 96, 36, 30, 30, 100, 101, 102, 36, 30, 105, + 106, 73, 74, 109, 73, 74, 112, 113, 103, 104, + 1, 98, 99, 30, 120, 107, 108, 149, 150, 149, + 150, 149, 150, 30, 32, 55, 68, 67, 75, 78, + 80, 83, 68, 68, 68, 72, 69, 68, 92, 30, + 68, 78, 68, 149, 150, 82, 68, 90, 85, 86, + 87, 78, 89, 78, 91, 110, 93, 80, 87, 96, + 80, 1, 83, 100, 101, 102, 124, 111, 105, 106, + 88, 95, 109, 124, 127, 112, 113, 140, 94, 140, + 95, 72, 95, 120, 95, 97, 143, 78, 97, 103, + 30, 82, 148, 103, 85, 86, 87, 156, 89, -1, + 91, -1, 93, -1, -1, 96, -1, 1, 127, 100, + 101, 102, 149, 150, 105, 106, -1, -1, 109, -1, + -1, 112, 113, 128, 130, 129, 129, 129, 129, 120, + -1, -1, 72, -1, -1, -1, 30, -1, 78, -1, + -1, -1, 82, 143, 143, 85, 86, 87, 143, 89, + 143, 91, 149, 93, 143, 143, 96, 143, 149, 150, + 100, 101, 102, 147, 147, 105, 106, 147, 147, 109, + 147, 147, 112, 113, 147, 147, 1, 151, 72, 149, + 120, 149, 149, 149, 78, 149, 149, 149, 82, 149, + 149, 85, 86, 87, 149, 89, 149, 91, 30, 93, + 149, 149, 96, 149, 149, 149, 100, 101, 102, 149, + 150, 105, 106, 149, 149, 109, 48, 49, 112, 113, + 149, 149, 54, 149, 56, 149, 120, 149, 149, 149, + 149, 149, 155, 150, 150, 150, 68, 150, 150, 150, + 150, 150, 150, 150, 76, 77, 150, 72, 80, 150, + 150, 150, 84, 78, 150, 149, 150, 82, 150, 152, + 85, 86, 87, 151, 89, 151, 91, 151, 93, 151, + 151, 96, 151, 151, 151, 100, 101, 102, 151, 151, + 105, 106, 151, 151, 109, 151, 151, 112, 113, 151, + 151, 151, 151, 151, 151, 120, 151, 151, 151, 131, + 151, 133, 134, 135, 136, 137, 138, 139, 151, 48, + 49, 151, 151, 145, 146, 54, 151, 56, 151, 153, + 152, 151, 154, 151, 149, 150, 152, 151, 155, 68, + 152, 152, 152, 152, 152, 152, 152, 76, 77, 152, + 152, 80, 152, 152, 152, 84, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 152, 152, 152, 152, 152, -1, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, -1, 154, 57, 58, + 156, 156, 131, 156, 133, 134, 135, 136, 137, 138, + 139, 156, 156, 156, 156, 156, 145, 146, 156, 156, + 156, 156, 156, 152, 156, 154, 157, -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, + 129 ); protected $actionBase = array( - 0, 220, 295, 445, 370, 357, 357, 307, 728, -2, - -2, 135, -2, -2, -2, 623, 724, 655, 724, 554, - 756, 825, 825, 825, 151, 188, 476, 476, 860, 146, - 476, 328, 253, 114, 621, 393, 390, 502, 502, 502, - 502, 134, 134, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 179, 178, 539, 523, 715, 735, 737, - 738, 858, 668, 857, 796, 797, 561, 798, 799, 800, - 801, 802, 795, 803, 886, 805, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 273, 248, 225, - 308, 274, 628, 365, 365, 365, 365, 365, 365, 365, - 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 320, 553, 553, - 553, 489, 887, 526, 912, 912, 912, 912, 912, 912, - 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, - 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, - 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, - 912, 912, 912, 912, 912, 912, 912, 493, -20, -20, - 477, 661, 402, 629, 210, 332, 197, 25, 25, 25, - 25, 25, 17, 141, 5, 5, 5, 5, 335, 122, - 122, 122, 122, 118, 118, 118, 118, 471, 396, 396, - 682, 682, 642, 774, 579, 579, 537, 537, 270, 270, - 270, 270, 270, 270, 270, 270, 270, 270, 301, 633, - 853, 296, 296, 296, 296, 514, 514, 514, 143, 484, - 637, 915, 143, 521, 521, 521, 446, 446, 446, 113, - 648, 398, 235, 235, 235, 235, 398, 235, 235, 577, - 577, 577, 439, 499, 651, 100, 379, 486, 433, 672, - 806, 669, 788, 540, 696, 111, 703, 701, 617, 662, - 617, 603, 598, 575, 673, 312, 847, 147, 179, 538, - 481, 631, 744, 292, 736, 66, 331, 423, 542, 355, - 382, 710, 731, 856, 855, 339, 678, 631, 631, 631, - 408, 106, 770, 772, 355, -8, 602, 602, 602, 602, - 782, 773, 602, 602, 602, 602, 781, 778, 316, 230, - 822, 215, 746, 618, 618, 644, 644, 618, 618, 618, - 618, 620, 622, 618, 834, 849, 849, 644, 641, 644, - 620, 622, 824, 824, 824, 824, 644, 622, 644, 644, - 618, 644, 849, 849, 622, 642, 849, 67, 622, 663, - 618, 653, 653, 824, 714, 730, 644, 644, 666, 849, - 849, 849, 666, 622, 824, 660, 711, 38, 849, 824, - 645, 641, 645, 660, 622, 645, 641, 641, 645, 20, - 654, 634, 833, 841, 838, 749, 625, 615, 851, 850, - 842, 852, 848, 614, 708, 723, 726, 626, 638, 639, - 647, 650, 676, 649, 674, 662, 693, 627, 627, 627, - 679, 680, 679, 627, 627, 627, 627, 627, 627, 627, - 627, 914, 689, 688, 670, 658, 732, 632, 707, 667, - 512, 750, 613, 708, 708, 791, 874, 883, 889, 829, - 619, 847, 876, 679, 904, 718, 47, 636, 846, 789, - 699, 704, 679, 845, 679, 751, 679, 866, 793, 652, - 832, 708, 831, 627, 864, 913, 911, 909, 907, 906, - 905, 896, 903, 630, 900, 729, 659, 882, 452, 854, - 673, 692, 706, 722, 830, 268, 899, 828, 679, 679, - 752, 748, 679, 754, 721, 717, 862, 747, 881, 898, - 613, 878, 679, 671, 827, 897, 268, 643, 624, 859, - 656, 739, 835, 863, 839, 758, 550, 582, 826, 777, - 821, 635, 740, 885, 884, 861, 742, 759, 564, 763, - 646, 819, 765, 843, 743, 818, 814, 875, 657, 693, - 675, 665, 664, 640, 769, 811, 877, 745, 741, 734, - 808, 733, 807, 0, 0, 0, 0, 0, 0, 0, + 0, 221, 297, 437, 367, 305, 305, 286, 690, -2, + -2, 238, -2, -2, -2, 613, 756, 710, 756, 544, + 659, 825, 825, 825, 152, 209, 611, 611, 867, 174, + 611, 404, 364, 337, 612, 493, 439, 289, 289, 289, + 289, 135, 135, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 313, 176, 461, 346, 680, 705, + 714, 715, 865, 639, 864, 777, 778, 552, 781, 782, + 784, 785, 788, 773, 789, 591, 790, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 151, 546, + 405, 491, 275, 410, 609, 609, 609, 609, 609, 609, + 609, 386, 386, 386, 386, 386, 386, 386, 386, 386, + 386, 386, 386, 386, 386, 386, 386, 386, 386, 319, + 556, 556, 556, 200, 818, 561, 911, 911, 911, 911, + 911, 911, 911, 911, 911, 911, 911, 911, 911, 911, + 911, 911, 911, 911, 911, 911, 911, 911, 911, 911, + 911, 911, 911, 911, 911, 911, 911, 911, 911, 911, + 911, 911, 911, 911, 911, 911, 911, 911, 911, 215, + -21, -21, 475, 642, 329, 392, 208, 462, 199, 25, + 25, 25, 25, 25, 147, 16, 4, 4, 4, 4, + 981, 122, 122, 122, 122, 118, 118, 118, 118, 393, + 331, 331, 644, 644, 617, 758, 528, 528, 523, 523, + 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, + 326, 627, 861, 234, 234, 234, 234, 254, 254, 254, + 131, 427, 589, 909, 131, 123, 123, 123, 375, 375, + 375, 173, 598, 294, 134, 134, 134, 134, 294, 134, + 134, 555, 555, 555, 429, 489, 629, 503, 348, 481, + 282, 641, 791, 638, 768, 520, 664, 190, 671, 670, + 883, 636, 883, 581, 578, 558, 593, 230, 840, -6, + 313, 518, 361, 620, 729, 295, 706, 242, 398, 403, + 522, 168, 324, 733, 697, 863, 816, 220, 648, 620, + 620, 620, 335, 374, 750, 751, 168, 114, 553, 553, + 553, 553, 766, 754, 553, 553, 553, 553, 764, 762, + 382, 243, 810, 138, 731, 601, 601, 625, 625, 601, + 601, 601, 601, 600, 605, 601, 828, 842, 842, 625, + 630, 625, 600, 605, 757, 757, 757, 757, 625, 605, + 625, 625, 601, 625, 842, 842, 605, 617, 842, 48, + 605, 631, 601, 597, 597, 757, 653, 695, 625, 625, + 645, 842, 842, 842, 645, 605, 757, 595, 594, 13, + 842, 757, 633, 630, 633, 595, 605, 633, 630, 630, + 633, 5, 643, 614, 824, 832, 830, 735, 599, 592, + 859, 858, 833, 860, 841, 602, 678, 687, 688, 526, + 615, 616, 619, 624, 651, 622, 647, 636, 666, 610, + 610, 610, 649, 655, 649, 610, 610, 610, 610, 610, + 610, 610, 610, 908, 661, 657, 646, 621, 701, 533, + 677, 637, 425, 737, 587, 678, 678, 771, 873, 880, + 823, 727, 623, 840, 875, 649, 898, 683, 38, 565, + 838, 769, 667, 673, 649, 837, 649, 738, 649, 872, + 772, 628, 826, 678, 822, 610, 871, 906, 905, 904, + 903, 902, 899, 884, 897, 608, 896, 691, 632, 879, + 245, 862, 593, 662, 674, 686, 820, 166, 895, 817, + 649, 649, 739, 734, 649, 740, 684, 682, 869, 732, + 878, 887, 587, 877, 649, 640, 815, 885, 166, 618, + 603, 866, 634, 721, 829, 870, 831, 741, 474, 512, + 811, 676, 807, 604, 722, 882, 881, 868, 726, 742, + 510, 743, 596, 799, 746, 834, 728, 797, 796, 874, + 626, 666, 650, 606, 635, 607, 749, 795, 876, 730, + 724, 704, 793, 702, 792, 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, 134, 134, -2, -2, -2, - -2, 0, 0, -2, 0, 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, 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, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 568, - -20, -20, -20, -20, 568, -20, -20, -20, -20, -20, - -20, -20, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, -20, - 568, 568, 568, -20, 270, -20, 270, 270, 270, 270, - 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, - 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, - 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, - 270, 270, 270, 270, 270, 270, 270, 270, 270, 568, - 0, 0, 568, -20, 568, -20, 568, -20, 568, 568, - 568, 568, 568, 568, -20, -20, -20, -20, -20, -20, - 0, 521, 521, 521, 521, -20, -20, -20, -20, -36, - 270, 270, 270, 270, 270, 270, 521, 521, 446, 446, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 270, -36, 270, 618, 618, 618, 618, 641, 641, 641, - 618, 398, 398, 398, 618, 0, 0, 0, 0, 0, - 0, 618, 398, 0, 270, 270, 270, 270, 0, 270, - 270, 618, 618, 618, 641, 618, 398, 641, 641, 618, - 849, 580, 580, 580, 580, 268, 355, 0, 618, 618, - 641, 641, 641, 0, 0, 0, 849, 0, 644, 0, - 0, 0, 0, 627, 47, 0, 430, 0, 0, 0, - 0, 0, 0, 619, 430, 466, 466, 0, 630, 627, - 627, 627, 0, 0, 619, 619, 0, 0, 0, 0, - 0, 0, 442, 619, 0, 0, 0, 0, 442, 140, - 0, 0, 140, 0, 268 + 0, 0, 0, 0, 0, 135, 135, 135, 135, -2, + -2, -2, -2, 0, 0, -2, 0, 0, 0, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 0, 0, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 560, -21, -21, -21, -21, 560, -21, -21, + -21, -21, -21, -21, -21, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, -21, 560, 560, 560, -21, 107, -21, + 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 560, 0, 0, 560, -21, 560, -21, + 560, -21, 560, 560, 560, 560, 560, 560, -21, -21, + -21, -21, -21, -21, 0, 123, 123, 123, 123, -21, + -21, -21, -21, -36, 107, 107, 107, 107, 107, 107, + 123, 123, 375, 375, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 107, -36, 107, 601, 601, 601, + 601, 630, 630, 630, 601, 294, 294, 294, 601, 0, + 0, 0, 0, 0, 0, 601, 294, 0, 107, 107, + 107, 107, 0, 107, 107, 601, 601, 601, 630, 601, + 294, 630, 630, 601, 842, 563, 563, 563, 563, 166, + 168, 0, 601, 601, 630, 630, 630, 0, 0, 0, + 842, 0, 625, 0, 0, 0, 0, 610, 38, 0, + 195, 0, 0, 0, 0, 0, 0, 623, 195, 257, + 257, 0, 608, 610, 610, 610, 0, 0, 623, 623, + 0, 0, 0, 0, 0, 0, 219, 623, 0, 0, + 0, 0, 219, 68, 0, 0, 68, 0, 166 ); 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,32767,32767, 531, 531,32767,32767, - 486,32767,32767,32767,32767,32767,32767, 292, 292, 292, - 32767,32767,32767, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519,32767,32767,32767,32767,32767, 374, + 32767,32767,32767,32767,32767,32767, 532, 532,32767,32767, + 487,32767,32767,32767,32767,32767,32767, 292, 292, 292, + 32767,32767,32767, 520, 520, 520, 520, 520, 520, 520, + 520, 520, 520, 520,32767,32767,32767,32767,32767, 375, 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, @@ -579,129 +588,129 @@ class Php5 extends \PhpParser\ParserAbstract 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, 380, 536,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 381, 537,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 355, 356, 358, 359, - 291, 520, 240, 381, 535, 290, 242, 319, 490,32767, - 32767,32767, 321, 119, 251, 196, 489, 122, 289, 227, - 373, 375, 320, 296, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 295, 446, 352, 351, - 350, 448,32767, 447, 483, 483, 486,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 356, 357, 359, + 360, 291, 521, 240, 382, 536, 290, 242, 320, 491, + 32767,32767,32767, 322, 119, 251, 196, 490, 122, 289, + 227, 374, 376, 321, 296, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 295, 447, + 353, 352, 351, 449,32767, 448, 484, 484, 487,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, 317, 474, 473, - 318, 444, 322, 445, 324, 449, 323, 340, 341, 338, - 339, 342, 451, 450, 467, 468, 465, 466, 294, 343, - 344, 345, 346, 469, 470, 471, 472, 275,32767,32767, - 530, 530,32767,32767, 331, 332, 458, 459,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 276, - 32767, 231, 231, 231, 231,32767,32767,32767, 231,32767, - 32767,32767,32767, 326, 327, 325, 453, 454, 452,32767, - 420,32767,32767,32767,32767,32767, 422,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 491,32767, - 32767,32767,32767,32767, 504, 409,32767,32767,32767, 402, - 32767, 215, 217, 164, 477,32767,32767,32767,32767,32767, - 509, 336,32767,32767,32767,32767,32767, 545,32767, 504, - 32767,32767,32767,32767,32767,32767, 349, 328, 329, 330, - 32767,32767,32767,32767, 508, 502, 461, 462, 463, 464, - 32767,32767, 455, 456, 457, 460,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 318, + 475, 474, 319, 445, 323, 446, 325, 450, 324, 341, + 342, 339, 340, 343, 452, 451, 468, 469, 466, 467, + 294, 344, 345, 346, 347, 470, 471, 472, 473, 275, + 32767,32767, 531, 531,32767,32767, 332, 333, 459, 460, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 168,32767, 417, 423, 423,32767,32767,32767, - 32767, 168,32767,32767,32767,32767,32767, 168,32767,32767, - 32767,32767, 507, 506, 168,32767, 403, 485, 168, 181, - 32767, 179, 179,32767, 201, 201,32767,32767, 183, 478, - 497,32767, 183, 168,32767, 391, 170, 485,32767,32767, - 233,32767, 233, 391, 168, 233,32767,32767, 233,32767, - 84, 427,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 404,32767,32767,32767, 370, 371, - 480, 493,32767, 494,32767, 402,32767, 334, 335, 337, - 314,32767, 316, 360, 361, 362, 363, 364, 365, 366, - 368,32767, 407,32767, 410,32767,32767,32767, 86, 111, - 250,32767, 543, 86, 405,32767,32767, 299, 543,32767, - 32767,32767,32767, 538,32767,32767, 293,32767,32767,32767, - 86, 86, 246,32767, 166,32767, 528,32767, 544,32767, - 502, 406,32767, 333,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 503,32767,32767,32767,32767, 222,32767, - 440,32767, 86,32767,32767, 182,32767,32767, 297, 241, - 32767,32767, 537,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 167,32767,32767,32767, 184,32767,32767, 502, - 32767,32767,32767,32767,32767,32767,32767, 288,32767,32767, - 32767,32767,32767,32767,32767, 502,32767,32767, 226,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 84, 60, - 32767, 269,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 124, 124, 3, 124, 124, 253, 3, - 253, 124, 253, 253, 124, 124, 124, 124, 124, 124, - 124, 124, 124, 124, 209, 212, 201, 201, 161, 124, - 124, 261 + 32767, 276,32767, 231, 231, 231, 231,32767,32767,32767, + 231,32767,32767,32767,32767, 327, 328, 326, 454, 455, + 453,32767, 421,32767,32767,32767,32767,32767, 423,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 492,32767,32767,32767,32767,32767, 505, 410,32767,32767, + 32767, 403,32767, 215, 217, 164, 478,32767,32767,32767, + 32767,32767, 510, 337,32767,32767,32767,32767,32767, 546, + 32767, 505,32767,32767,32767,32767,32767,32767, 350, 329, + 330, 331,32767,32767,32767,32767, 509, 503, 462, 463, + 464, 465,32767,32767, 456, 457, 458, 461,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 168,32767, 418, 424, 424,32767, + 32767,32767,32767, 168,32767,32767,32767,32767,32767, 168, + 32767,32767,32767,32767, 508, 507, 168,32767, 404, 486, + 168, 181,32767, 179, 179,32767, 201, 201,32767,32767, + 183, 479, 498,32767, 183, 168,32767, 392, 170, 486, + 32767,32767, 233,32767, 233, 392, 168, 233,32767,32767, + 233,32767, 84, 428,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 405,32767,32767,32767, + 371, 372, 481, 494,32767, 495,32767, 403,32767, 335, + 336, 338, 315,32767, 317, 361, 362, 363, 364, 365, + 366, 367, 369,32767, 408,32767, 411,32767,32767,32767, + 86, 111, 250,32767, 544, 86, 406,32767,32767, 299, + 544,32767,32767,32767,32767, 539,32767,32767, 293,32767, + 32767,32767, 86, 86, 246,32767, 166,32767, 529,32767, + 545,32767, 503, 407,32767, 334,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 504,32767,32767,32767,32767, + 222,32767, 441,32767, 86,32767,32767, 182,32767,32767, + 297, 241,32767,32767, 538,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 167,32767,32767,32767, 184,32767, + 32767, 503,32767,32767,32767,32767,32767,32767,32767, 288, + 32767,32767,32767,32767,32767,32767,32767, 503,32767,32767, + 226,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 84, 60,32767, 269,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 124, 124, 3, 124, 124, + 253, 3, 253, 124, 253, 253, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 209, 212, 201, 201, + 161, 124, 124, 261 ); protected $goto = array( - 162, 162, 136, 136, 141, 144, 136, 137, 138, 139, - 146, 183, 164, 160, 160, 160, 160, 141, 141, 161, - 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, - 156, 157, 158, 159, 180, 135, 181, 497, 498, 361, - 499, 503, 504, 505, 506, 507, 508, 509, 510, 972, - 140, 142, 143, 145, 167, 172, 182, 198, 247, 250, - 252, 254, 256, 257, 258, 259, 260, 261, 269, 270, - 271, 272, 284, 285, 313, 314, 315, 377, 378, 379, - 553, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 147, 148, 149, 163, 150, 165, - 151, 199, 166, 152, 153, 154, 200, 155, 133, 630, - 571, 792, 571, 571, 571, 571, 571, 571, 571, 571, - 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, - 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, - 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, - 571, 571, 571, 571, 571, 1110, 762, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 501, 501, 501, 501, 501, 501, 512, 638, 512, 761, - 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, - 513, 755, 513, 893, 893, 1201, 1201, 527, 585, 613, - 857, 857, 857, 857, 170, 852, 858, 1086, 1085, 173, - 174, 175, 386, 387, 388, 389, 169, 197, 201, 203, - 251, 253, 255, 262, 263, 264, 265, 266, 267, 273, - 274, 275, 276, 286, 287, 316, 317, 318, 392, 393, - 394, 395, 171, 176, 248, 249, 177, 178, 179, 385, - 615, 546, 546, 578, 542, 1212, 1212, 823, 340, 544, - 544, 500, 502, 533, 550, 579, 582, 592, 599, 619, - 863, 1212, 622, 911, 570, 359, 570, 570, 570, 570, - 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, - 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, - 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, - 570, 570, 570, 570, 570, 570, 570, 570, 570, 555, - 556, 557, 558, 559, 560, 561, 562, 564, 595, 518, - 554, 326, 311, 594, 526, 609, 610, 949, 552, 523, - 523, 523, 577, 523, 588, 591, 636, 526, 526, 547, - 436, 436, 436, 436, 436, 436, 541, 523, 1205, 950, - 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, - 1075, 362, 1075, 900, 900, 900, 900, 596, 343, 402, - 900, 514, 1159, 514, 900, 1179, 603, 1179, 3, 4, - 367, 367, 367, 614, 1075, 1075, 1075, 1075, 785, 1075, - 1075, 367, 367, 1178, 1198, 1178, 1171, 367, 374, 467, - 1195, 1195, 1195, 523, 523, 367, 1226, 540, 572, 523, - 523, 1019, 1068, 523, 897, 785, 785, 906, 346, 917, - 520, 917, 396, 368, 781, 372, 915, 1177, 970, 779, - 524, 539, 669, 665, 566, 400, 1061, 920, 600, 760, - 551, 890, 620, 621, 886, 625, 626, 633, 635, 640, - 642, 789, 879, 861, 859, 861, 664, 1091, 515, 888, - 883, 1193, 1193, 1193, 867, 1029, 19, 15, 355, 341, - 342, 958, 778, 778, 356, 1066, 786, 786, 786, 788, - 452, 531, 777, 1156, 465, 543, 565, 583, 0, 520, - 1071, 1072, 0, 0, 1068, 0, 0, 23, 1211, 1211, - 456, 0, 611, 369, 369, 369, 0, 1069, 1170, 1069, - 0, 13, 538, 0, 1211, 0, 1070, 449, 451, 942, - 641, 0, 1214, 0, 1111, 623, 940, 0, 0, 0, - 369, 0, 618, 0, 384, 0, 0, 1067, 627, 0, + 163, 163, 137, 137, 142, 145, 137, 138, 139, 140, + 147, 184, 165, 161, 161, 161, 161, 142, 142, 162, + 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, + 157, 158, 159, 160, 181, 136, 182, 499, 500, 363, + 501, 505, 506, 507, 508, 509, 510, 511, 512, 974, + 141, 143, 144, 146, 168, 173, 183, 200, 249, 252, + 254, 256, 258, 259, 260, 261, 262, 263, 271, 272, + 273, 274, 286, 287, 315, 316, 317, 379, 380, 381, + 555, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 148, 149, 150, 164, 151, + 166, 152, 201, 167, 153, 154, 155, 202, 156, 134, + 632, 573, 794, 573, 573, 573, 573, 573, 573, 573, + 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + 573, 573, 573, 573, 573, 573, 1113, 342, 1113, 1113, + 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, + 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, + 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, + 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, + 1113, 503, 503, 503, 503, 503, 503, 514, 640, 514, + 764, 503, 503, 503, 503, 503, 503, 503, 503, 503, + 503, 515, 763, 515, 895, 895, 1204, 1204, 529, 587, + 615, 859, 859, 859, 859, 171, 854, 860, 1089, 1088, + 174, 175, 176, 388, 389, 390, 391, 170, 199, 203, + 205, 253, 255, 257, 264, 265, 266, 267, 268, 269, + 275, 276, 277, 278, 288, 289, 318, 319, 320, 394, + 395, 396, 397, 172, 177, 250, 251, 178, 179, 180, + 757, 387, 617, 548, 548, 580, 544, 1215, 1215, 328, + 313, 546, 546, 502, 504, 535, 552, 581, 584, 594, + 601, 825, 621, 1215, 516, 624, 516, 572, 361, 572, + 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, + 572, 572, 557, 558, 559, 560, 561, 562, 563, 564, + 566, 597, 520, 556, 3, 4, 596, 528, 611, 612, + 951, 554, 525, 525, 525, 579, 525, 865, 343, 344, + 528, 528, 549, 438, 438, 438, 438, 438, 438, 543, + 525, 913, 952, 438, 438, 438, 438, 438, 438, 438, + 438, 438, 438, 1078, 1208, 1078, 902, 902, 902, 902, + 590, 593, 638, 902, 598, 345, 404, 902, 1182, 364, + 1182, 605, 616, 369, 369, 369, 1162, 1078, 1078, 1078, + 1078, 787, 1078, 1078, 369, 369, 1181, 1201, 1181, 1174, + 369, 376, 469, 1198, 1198, 1198, 525, 525, 369, 1229, + 542, 574, 525, 525, 1022, 1071, 525, 899, 787, 787, + 908, 348, 919, 522, 919, 398, 370, 783, 374, 917, + 1180, 972, 781, 526, 541, 671, 667, 568, 402, 1064, + 922, 602, 762, 553, 892, 622, 623, 888, 627, 628, + 635, 637, 642, 644, 791, 881, 863, 861, 863, 666, + 1094, 517, 890, 885, 1196, 1196, 1196, 869, 1032, 19, + 15, 357, 960, 454, 1159, 780, 780, 358, 1069, 788, + 788, 788, 790, 467, 533, 779, 0, 585, 545, 567, + 0, 0, 522, 1074, 1075, 0, 0, 1071, 0, 0, + 23, 1214, 1214, 458, 0, 613, 371, 371, 371, 0, + 1072, 1173, 1072, 0, 13, 540, 0, 1214, 0, 1073, + 451, 453, 944, 643, 0, 1217, 0, 1114, 625, 942, + 0, 0, 0, 371, 0, 620, 0, 386, 0, 0, + 1070, 629, 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, 517, 537, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 517, 0, 537, 0, 0, 0, 0, - 0, 532, 516, 0, 521, 439, 0, 441, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 784, 1219 + 0, 0, 0, 0, 519, 539, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 519, 0, 539, 0, + 0, 0, 0, 0, 534, 518, 0, 523, 441, 0, + 443, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 786, 1222 ); protected $gotoCheck = array( @@ -715,97 +724,97 @@ class Php5 extends \PhpParser\ParserAbstract 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, 56, - 66, 28, 66, 66, 66, 66, 66, 66, 66, 66, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 56, 66, 28, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 124, 15, 124, 124, 124, + 66, 66, 66, 66, 66, 66, 124, 69, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, - 115, 115, 115, 115, 115, 115, 66, 8, 66, 14, - 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 115, 5, 115, 74, 74, 74, 74, 99, 39, 39, - 66, 66, 66, 66, 26, 66, 66, 122, 122, 26, + 124, 115, 115, 115, 115, 115, 115, 66, 8, 66, + 15, 115, 115, 115, 115, 115, 115, 115, 115, 115, + 115, 115, 14, 115, 74, 74, 74, 74, 99, 39, + 39, 66, 66, 66, 66, 26, 66, 66, 122, 122, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, 26, 50, - 50, 50, 50, 50, 50, 140, 140, 49, 69, 50, - 50, 50, 50, 50, 50, 50, 50, 50, 50, 60, - 32, 140, 60, 81, 56, 60, 56, 56, 56, 56, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 5, 50, 50, 50, 50, 50, 50, 140, 140, 123, + 123, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 49, 60, 140, 120, 60, 120, 56, 60, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 108, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 10, - 46, 123, 123, 64, 46, 64, 64, 95, 2, 10, - 10, 10, 2, 10, 59, 59, 59, 46, 46, 107, - 56, 56, 56, 56, 56, 56, 10, 10, 138, 95, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 45, 56, 56, 56, 56, 56, 67, 67, 67, - 56, 120, 129, 120, 56, 116, 125, 116, 29, 29, - 12, 12, 12, 48, 56, 56, 56, 56, 22, 56, - 56, 12, 12, 117, 136, 117, 79, 12, 47, 56, - 117, 117, 117, 10, 10, 12, 12, 10, 10, 10, - 10, 100, 79, 10, 76, 22, 22, 78, 17, 12, - 12, 12, 21, 11, 24, 16, 82, 117, 99, 23, - 10, 31, 71, 31, 31, 20, 111, 83, 31, 13, - 10, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 25, 13, 13, 13, 13, 13, 33, 13, 13, - 13, 8, 8, 8, 68, 33, 33, 33, 33, 69, - 69, 97, 22, 22, 57, 113, 22, 22, 22, 22, - 62, 57, 22, 128, 106, 57, 33, 63, -1, 12, - 79, 79, -1, -1, 79, -1, -1, 33, 139, 139, - 57, -1, 33, 121, 121, 121, -1, 79, 79, 79, - -1, 57, 8, -1, 139, -1, 79, 7, 7, 7, - 7, -1, 139, -1, 7, 7, 7, -1, -1, -1, - 121, -1, 12, -1, 121, -1, -1, 12, 12, -1, + 56, 56, 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 10, 46, 29, 29, 64, 46, 64, 64, + 95, 2, 10, 10, 10, 2, 10, 32, 69, 69, + 46, 46, 107, 56, 56, 56, 56, 56, 56, 10, + 10, 81, 95, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 138, 56, 56, 56, 56, 56, + 59, 59, 59, 56, 67, 67, 67, 56, 116, 45, + 116, 125, 48, 12, 12, 12, 129, 56, 56, 56, + 56, 22, 56, 56, 12, 12, 117, 136, 117, 79, + 12, 47, 56, 117, 117, 117, 10, 10, 12, 12, + 10, 10, 10, 10, 100, 79, 10, 76, 22, 22, + 78, 17, 12, 12, 12, 21, 11, 24, 16, 82, + 117, 99, 23, 10, 31, 71, 31, 31, 20, 111, + 83, 31, 13, 10, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 25, 13, 13, 13, 13, 13, + 33, 13, 13, 13, 8, 8, 8, 68, 33, 33, + 33, 33, 97, 62, 128, 22, 22, 57, 113, 22, + 22, 22, 22, 106, 57, 22, -1, 63, 57, 33, + -1, -1, 12, 79, 79, -1, -1, 79, -1, -1, + 33, 139, 139, 57, -1, 33, 121, 121, 121, -1, + 79, 79, 79, -1, 57, 8, -1, 139, -1, 79, + 7, 7, 7, 7, -1, 139, -1, 7, 7, 7, + -1, -1, -1, 121, -1, 12, -1, 121, -1, -1, + 12, 12, -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, 8, 8, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 8, -1, 8, -1, -1, -1, -1, - -1, 99, 8, -1, 8, 8, -1, 8, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 8, 8 + -1, -1, -1, -1, 8, 8, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 8, -1, 8, -1, + -1, -1, -1, -1, 99, 8, -1, 8, 8, -1, + 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 8, 8 ); protected $gotoBase = array( - 0, 0, -277, 0, 0, 210, 0, 552, 196, 0, - 40, 130, 111, 477, 207, 154, 119, 139, 0, 0, - 71, 132, 109, 122, 133, 74, 32, 0, 101, -251, - 0, -173, 280, 83, 0, 0, 0, 0, 0, 190, - 0, 0, -24, 0, 0, 361, 336, 149, 144, 269, - 1, 0, 0, 0, 0, 0, 102, 87, 0, 72, - -163, 0, 78, 75, -287, 0, -92, 84, 85, -157, - 0, 114, 0, 0, -55, 0, 146, 0, 145, 98, - 0, 278, 116, 59, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 90, 0, 91, 0, 186, - 151, 0, 0, 0, 0, 0, 61, 352, 305, 0, - 0, 60, 0, 94, 0, -78, 117, 135, 0, 0, - 113, 238, -69, 41, -47, 211, 0, 0, 66, 206, - 0, 0, 0, 0, 0, 0, 153, 0, 358, 228, + 0, 0, -276, 0, 0, 269, 0, 555, 197, 0, + 41, 131, 112, 480, 220, 208, 120, 140, 0, 0, + 72, 133, 110, 123, 134, 75, 31, 0, 102, -307, + 0, -172, 357, 84, 0, 0, 0, 0, 0, 191, + 0, 0, -24, 0, 0, 379, 339, 150, 141, 283, + 1, 0, 0, 0, 0, 0, 103, 88, 0, 106, + -162, 0, 69, 73, -286, 0, -93, 89, 86, -290, + 0, 115, 0, 0, -56, 0, 147, 0, 146, 99, + 0, 366, 117, 60, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 91, 0, 90, 0, 187, + 152, 0, 0, 0, 0, 0, 58, 355, 308, 0, + 0, 61, 0, 95, 0, -79, 118, 136, 0, 0, + 4, 239, -70, -33, -48, 214, 0, 0, 55, 218, + 0, 0, 0, 0, 0, 0, 154, 0, 374, 229, -25, 0, 0 ); protected $gotoDefault = array( - -32768, 469, 673, 2, 674, 745, 753, 606, 483, 639, - 484, 519, 1189, 798, 799, 800, 364, 410, 485, 363, - 397, 390, 787, 780, 782, 790, 168, 398, 793, 1, - 795, 525, 831, 1020, 351, 803, 352, 598, 805, 535, - 807, 808, 134, 365, 366, 536, 486, 373, 586, 822, - 268, 370, 824, 353, 825, 834, 354, 466, 461, 567, - 617, 431, 448, 580, 574, 545, 1083, 575, 866, 339, - 874, 670, 882, 885, 487, 568, 896, 453, 904, 1096, - 380, 910, 916, 921, 277, 924, 411, 399, 593, 929, - 930, 7, 934, 631, 632, 8, 299, 957, 607, 971, - 416, 1039, 1041, 488, 489, 529, 460, 511, 534, 490, - 1062, 442, 401, 1065, 491, 492, 432, 433, 1080, 345, - 1164, 344, 450, 310, 1151, 589, 1115, 457, 1204, 1160, - 338, 493, 494, 360, 1183, 375, 1199, 437, 1206, 1213, - 334, 549, 576 + -32768, 471, 675, 2, 676, 747, 755, 608, 485, 641, + 486, 521, 1192, 800, 801, 802, 366, 412, 487, 365, + 399, 392, 789, 782, 784, 792, 169, 400, 795, 1, + 797, 527, 833, 1023, 353, 805, 354, 600, 807, 537, + 809, 810, 135, 367, 368, 538, 488, 375, 588, 824, + 270, 372, 826, 355, 827, 836, 356, 468, 463, 569, + 619, 433, 450, 582, 576, 547, 1086, 577, 868, 341, + 876, 672, 884, 887, 489, 570, 898, 455, 906, 1099, + 382, 912, 918, 923, 279, 926, 413, 401, 595, 931, + 932, 7, 936, 633, 634, 8, 301, 959, 609, 973, + 418, 1042, 1044, 490, 491, 531, 462, 513, 536, 492, + 1065, 444, 403, 1068, 493, 494, 434, 435, 1083, 347, + 1167, 346, 452, 312, 1154, 591, 1118, 459, 1207, 1163, + 340, 495, 496, 362, 1186, 377, 1202, 439, 1209, 1216, + 336, 551, 578 ); protected $ruleToNonTerminal = array( @@ -846,25 +855,25 @@ class Php5 extends \PhpParser\ParserAbstract 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, 33, 33, - 46, 46, 103, 103, 104, 104, 104, 104, 110, 99, - 99, 106, 106, 112, 112, 113, 114, 114, 114, 114, - 114, 114, 66, 66, 56, 56, 56, 100, 100, 118, - 118, 115, 115, 119, 119, 119, 119, 101, 101, 101, - 105, 105, 105, 111, 111, 124, 124, 124, 124, 124, - 124, 124, 124, 124, 124, 124, 124, 124, 26, 26, - 26, 26, 26, 26, 126, 126, 126, 126, 126, 126, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 33, + 33, 46, 46, 103, 103, 104, 104, 104, 104, 110, + 99, 99, 106, 106, 112, 112, 113, 114, 114, 114, + 114, 114, 114, 66, 66, 56, 56, 56, 100, 100, + 118, 118, 115, 115, 119, 119, 119, 119, 101, 101, + 101, 105, 105, 105, 111, 111, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 26, + 26, 26, 26, 26, 26, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 109, 109, 102, - 102, 102, 102, 125, 125, 128, 128, 127, 127, 129, - 129, 50, 50, 50, 50, 131, 131, 130, 130, 130, - 130, 130, 132, 132, 117, 117, 120, 120, 116, 116, - 134, 133, 133, 133, 133, 121, 121, 121, 121, 108, - 108, 122, 122, 122, 122, 74, 135, 135, 136, 136, - 136, 107, 107, 137, 137, 138, 138, 138, 138, 123, - 123, 123, 123, 140, 141, 139, 139, 139, 139, 139, - 139, 139, 142, 142, 142 + 126, 126, 126, 126, 126, 126, 126, 126, 109, 109, + 102, 102, 102, 102, 125, 125, 128, 128, 127, 127, + 129, 129, 50, 50, 50, 50, 131, 131, 130, 130, + 130, 130, 130, 132, 132, 117, 117, 120, 120, 116, + 116, 134, 133, 133, 133, 133, 121, 121, 121, 121, + 108, 108, 122, 122, 122, 122, 74, 135, 135, 136, + 136, 136, 107, 107, 137, 137, 138, 138, 138, 138, + 123, 123, 123, 123, 140, 141, 139, 139, 139, 139, + 139, 139, 139, 142, 142, 142 ); protected $ruleToLength = array( @@ -899,31 +908,31 @@ class Php5 extends \PhpParser\ParserAbstract 1, 1, 1, 1, 1, 1, 3, 1, 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, - 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 + 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, 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 initReduceCallbacks() { @@ -1888,177 +1897,179 @@ class Php5 extends \PhpParser\ParserAbstract $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 313 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 314 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 315 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 316 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 317 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 318 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 319 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 320 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 321 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 322 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 323 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 324 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 325 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 326 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 327 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 328 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 329 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 330 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 331 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 332 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 333 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 334 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 335 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 336 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 337 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 338 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 339 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 340 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 341 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 342 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 343 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 344 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 345 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 346 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 347 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 348 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 349 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 350 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 351 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 352 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 353 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 354 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 355 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 356 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 357 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 358 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 359 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 360 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 361 => function ($stackPos) { - $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 362 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; + $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); + $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, 363 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 364 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 365 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 366 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 367 => function ($stackPos) { + $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 368 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 368 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, 369 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 370 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2067,116 +2078,116 @@ class Php5 extends \PhpParser\ParserAbstract $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 372 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 373 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 374 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 375 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 376 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(10-2)], 'params' => $this->semStack[$stackPos-(10-4)], 'uses' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-7)], 'stmts' => $this->semStack[$stackPos-(10-9)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 377 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(11-3)], 'params' => $this->semStack[$stackPos-(11-5)], 'uses' => $this->semStack[$stackPos-(11-7)], 'returnType' => $this->semStack[$stackPos-(11-8)], 'stmts' => $this->semStack[$stackPos-(11-10)]], $this->startAttributeStack[$stackPos-(11-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(10-2)], 'params' => $this->semStack[$stackPos-(10-4)], 'uses' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-7)], 'stmts' => $this->semStack[$stackPos-(10-9)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 378 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(11-3)], 'params' => $this->semStack[$stackPos-(11-5)], 'uses' => $this->semStack[$stackPos-(11-7)], 'returnType' => $this->semStack[$stackPos-(11-8)], 'stmts' => $this->semStack[$stackPos-(11-10)]], $this->startAttributeStack[$stackPos-(11-1)] + $this->endAttributes); }, 379 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 380 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 381 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 382 => function ($stackPos) { + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 383 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); }, - 383 => function ($stackPos) { + 384 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 384 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, 385 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(4-1)][0] === "'" || ($this->semStack[$stackPos-(4-1)][1] === "'" && ($this->semStack[$stackPos-(4-1)][0] === 'b' || $this->semStack[$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[$stackPos-(4-1)]), $attrs), $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 386 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(4-1)][0] === "'" || ($this->semStack[$stackPos-(4-1)][1] === "'" && ($this->semStack[$stackPos-(4-1)][0] === 'b' || $this->semStack[$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[$stackPos-(4-1)]), $attrs), $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 387 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 388 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 389 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes), $this->semStack[$stackPos-(7-2)]); $this->checkClass($this->semValue[0], -1); }, - 389 => function ($stackPos) { + 390 => function ($stackPos) { $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 390 => function ($stackPos) { + 391 => function ($stackPos) { list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 391 => function ($stackPos) { + 392 => function ($stackPos) { $this->semValue = array(); }, - 392 => function ($stackPos) { + 393 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 393 => function ($stackPos) { + 394 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 394 => function ($stackPos) { + 395 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 395 => function ($stackPos) { + 396 => function ($stackPos) { $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 396 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, 397 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 398 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 399 => function ($stackPos) { - $this->semValue = $this->fixupPhp5StaticPropCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 400 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->fixupPhp5StaticPropCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 401 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 402 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 403 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 404 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, + 404 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, 405 => function ($stackPos) { - $this->semValue = new Name\FullyQualified($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 406 => function ($stackPos) { - $this->semValue = new Name\Relative($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Name\FullyQualified($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 407 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\Relative($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 408 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2194,243 +2205,243 @@ class Php5 extends \PhpParser\ParserAbstract $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 413 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 414 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 415 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 416 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 417 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 418 => function ($stackPos) { $this->semValue = null; }, 419 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 420 => function ($stackPos) { - $this->semValue = array(); - }, - 421 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`', false), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); - }, - 422 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', false); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 423 => function ($stackPos) { - $this->semValue = array(); - }, - 424 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 421 => function ($stackPos) { + $this->semValue = array(); + }, + 422 => function ($stackPos) { + $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`', false), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + }, + 423 => function ($stackPos) { + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', false); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 424 => function ($stackPos) { + $this->semValue = array(); + }, 425 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 426 => function ($stackPos) { - $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, true); }, 427 => function ($stackPos) { + $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 428 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$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[$stackPos-(1-1)], false), $attrs); }, - 428 => function ($stackPos) { + 429 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 429 => function ($stackPos) { + 430 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 430 => function ($stackPos) { + 431 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 431 => function ($stackPos) { + 432 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 432 => function ($stackPos) { + 433 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 433 => function ($stackPos) { + 434 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 434 => function ($stackPos) { + 435 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 435 => function ($stackPos) { + 436 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 436 => function ($stackPos) { + 437 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], false); }, - 437 => function ($stackPos) { + 438 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], false); }, - 438 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, 439 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 440 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 441 => function ($stackPos) { - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 442 => function ($stackPos) { - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 443 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 444 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 445 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 446 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 447 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 448 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 449 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 450 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 451 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 452 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 453 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 454 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 455 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 456 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 457 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 458 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 459 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 460 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 461 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 462 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 463 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 464 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 465 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 466 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 467 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 468 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 469 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 470 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 471 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 472 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 473 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 474 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 475 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 476 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 477 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 478 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 479 => function ($stackPos) { + 441 => function ($stackPos) { + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 442 => function ($stackPos) { + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 443 => function ($stackPos) { + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 444 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 445 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 446 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 447 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 448 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 449 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 450 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 451 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 452 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 453 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 454 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 455 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 456 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 457 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 458 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 459 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 460 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 461 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 462 => function ($stackPos) { + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 463 => function ($stackPos) { + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 464 => function ($stackPos) { + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 465 => function ($stackPos) { + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 466 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 467 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 468 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 469 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 470 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 471 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 472 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 473 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 474 => function ($stackPos) { + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + }, + 475 => function ($stackPos) { + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 476 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 477 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 478 => function ($stackPos) { + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 479 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, 480 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 481 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 482 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); }, - 482 => function ($stackPos) { + 483 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, - 483 => function ($stackPos) { + 484 => function ($stackPos) { $this->semValue = array(); }, - 484 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, 485 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 486 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, 487 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos]; }, 488 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 489 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 490 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 491 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 492 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2442,61 +2453,61 @@ class Php5 extends \PhpParser\ParserAbstract $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 495 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 496 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 497 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 498 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 499 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 500 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 501 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 502 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 503 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 504 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 505 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 506 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 507 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 508 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 509 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 509 => function ($stackPos) { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, 510 => function ($stackPos) { - $var = substr($this->semStack[$stackPos-(1-1)], 1); $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 511 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $var = substr($this->semStack[$stackPos-(1-1)], 1); $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 512 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 513 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 514 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); @@ -2508,117 +2519,120 @@ class Php5 extends \PhpParser\ParserAbstract $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 517 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 518 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 519 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 520 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 521 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 522 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 523 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 523 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, 524 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 525 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 526 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 527 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 528 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 529 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 530 => function ($stackPos) { - $this->semValue = null; - }, - 531 => function ($stackPos) { - $this->semValue = array(); - }, - 532 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 533 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 534 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 535 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 536 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, + 531 => function ($stackPos) { + $this->semValue = null; + }, + 532 => function ($stackPos) { + $this->semValue = array(); + }, + 533 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 534 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 535 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 536 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, 537 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 538 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 539 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 540 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 541 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 542 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 543 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 544 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 545 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 546 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 547 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 548 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 549 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 550 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 551 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 552 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 553 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 554 => function ($stackPos) { + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 555 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php index 768da721..fc8fa6ac 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php @@ -17,17 +17,17 @@ use PhpParser\Node\Stmt; */ class Php7 extends \PhpParser\ParserAbstract { - protected $tokenToSymbolMapSize = 392; - protected $actionTableSize = 940; - protected $gotoTableSize = 486; + protected $tokenToSymbolMapSize = 393; + protected $actionTableSize = 951; + protected $gotoTableSize = 515; - protected $invalidSymbol = 157; + protected $invalidSymbol = 158; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 336; - protected $numNonLeafStates = 581; + protected $YY2TBLSTATE = 339; + protected $numNonLeafStates = 584; protected $symbolToName = array( "EOF", @@ -58,6 +58,7 @@ class Php7 extends \PhpParser\ParserAbstract "T_SL_EQUAL", "T_SR_EQUAL", "T_POW_EQUAL", + "T_COALESCE_EQUAL", "'?'", "':'", "T_COALESCE", @@ -190,449 +191,457 @@ class Php7 extends \PhpParser\ParserAbstract ); 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, + 0, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 54, 156, 158, 157, 53, 36, 158, + 152, 153, 51, 48, 7, 49, 50, 52, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 30, 149, + 42, 15, 44, 29, 66, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 68, 158, 155, 35, 158, 154, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 150, 34, 151, 56, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 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, + 27, 28, 31, 32, 33, 37, 38, 39, 40, 41, + 43, 45, 46, 47, 55, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 67, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 158, + 158, 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 + 132, 133, 134, 135, 136, 137, 138, 158, 158, 158, + 158, 158, 158, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148 ); protected $action = array( - 586, 587, 588, 589, 590, 218, 591, 592, 593, 629, - 630, 665, 32, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113,-32766,-32766,-32766, 881, 882, - 883, 880, 879, 878, 0,-32766,-32766,-32766,-32766,-32766, - -32766, 663, 824, 117, 24,-32766, 428,-32766,-32766,-32766, - -32766,-32766, 594, 914, 916,-32766, 9,-32766,-32766,-32766, - -32766,-32766,-32766, 857, 250, 350, 595, 596, 597, 598, - 599, 600, 601, 119, 250, 661, 881, 882, 883, 880, - 879, 878, 602, 603, 604, 605, 606, 607, 608, 609, - 610, 611, 612, 632, 633, 634, 635, 636, 624, 625, - 626, 627, 628, 613, 614, 615, 616, 617, 618, 619, - 655, 656, 657, 658, 659, 660, 620, 621, 622, 623, - 653, 644, 642, 643, 639, 640, 800, 631, 637, 638, - 645, 646, 648, 647, 649, 650, 45, 46, 405, 47, - 48, 641, 652, 651, -233, 49, 50, 231, 51,-32767, - -32767,-32767,-32767, 93, 94, 95, 96, 97,-32766,-32766, - -32766, 42, -451, 25, -293, -293, 828, 829, 98, 99, - 100, 260, 241, 230, -453, 1047, 828, 829,-32766, 1013, - 873, 52, 53, 486, 101, 670, 242, 54, -238, 55, - 223, 224, 56, 57, 58, 59, 60, 61, 62, 63, - -452, 25, 234, 64, 357,-32766,-32766,-32766, 990, 1014, - 1015, 407, -271, 1047, -488, 665, 265, 1013,-32766,-32766, - -32766, 746, 248, -451, 250,-32766, 420,-32766,-32766,-32766, - -32766, 388, -258, 1078, 277, -453, 365, -451,-32766, 1077, - -32766,-32766,-32766, 116, -451, 801, 291, 68, 665, -453, - 428, 292, 267, 1065, 417, 418, -453, -489, -456, 373, - 997, -452, 557, 419, 420, 1050, 1019, 1020, 1021, 1022, - 1016, 1017, 245, 764, -451, -452, 217, 429, 1023, 1018, - 362, 295, -452, 1047, -455, 66, 1009, 257,-32766, 262, - 267, 406, -136, -136, -136, -4, 746, 686, 687, 299, - 668, 735, 266, 1090, 37, 20, 408, -136, 409, -136, - 410, -136, 411, -136, 429, 412, 229, 362, 490, 38, - 39, 358, 359, 355, 40, 413, 828, 829, 65, 663, - 44, 290, 669, 414, 415, -451, -492, 33, 1047, 416, - 122, 346, 721, 769, 360, 361, 353, 1099, -91, -451, - 1100, 389,-32766,-32766,-32766, 354, -451, 121, 665, -488, - 267, 28, 226, 379, 1047, 228, 406, 746, 748, 555, - -136, 990,-32766, 219,-32766,-32766, 735, -258, 233, 37, - 20, 408, 351, 409, -495, 410, -495, 411, 665, 451, - 412, 249, 232, 428, 38, 39, 358, 359, 342, 40, - 413, 125, -489, 65, 256, 294, 290, 665, 414, 415, - 25, 30, 118, 74, 416, 267, 356, 678, 769, 360, - 361, 568, 1047, 428, 25, 127, 1013, 540, 123,-32766, - -32766,-32766, -176, 834, 124, -177, 1047, 406, 279, 746, - 1013, 267, 428, 748, 555, -4, 1027, 735, 665, 474, - 37, 20, 408, 281, 409, 990, 410, 115, 411,-32766, - -32766, 412, -218, -218, -218, 38, 39, 358, 359, 990, - 40, 413, 419, 420, 65, -491, 225, 290, 229, 414, - 415, -492, 569, 428, 114, 416, 419, 420, 721, 769, - 360, 361, 131, 541, 68, 133, 362, 130, 317, 267, - 859, 134, 227, 529, 530, 997, 517, 21, 68, 406, - 95, 96, 97, 267, 748, 555, -218, 120, 665, 735, - 665, 129, 37, 20, 408, 745, 409, 244, 410, -82, - 411, 686, 687, 412, -217, -217, -217, 38, 39, 358, - 359, 572, 40, 413, 665, 760, 65, 241, 746, 290, - 101, 414, 415, 428, 43, 428, 1066, 416, 398, 8, - 721, 769, 360, 361, 508, 509, 828, 829, 128, 75, - 76, 77, 858, 578, 665, 1101, 570, -176, -291, 428, - -177, 537, 666, 1047, 523, 663, 748, 555, -217, 31, - 123, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 589, 590, 591, 592, 593, 666, 594, 595, 596, 632, + 633, 0, 32, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114,-32767,-32767,-32767,-32767, + 93, 94, 95, 96, 97,-32766,-32766,-32766, 837, 668, + 885, 886, 887, 884, 883, 882, 885, 886, 887, 884, + 883, 882, 861, 597, 919, 921,-32766, 24,-32766,-32766, + -32766,-32766,-32766,-32766,-32766,-32766, 253, 598, 599, 600, + 601, 602, 603, 604, 431, 827, 664,-32766,-32766,-32766, + 1055,-32766, 118, 605, 606, 607, 608, 609, 610, 611, + 612, 613, 614, 615, 635, 636, 637, 638, 639, 627, + 628, 629, 630, 631, 616, 617, 618, 619, 620, 621, + 622, 658, 659, 660, 661, 662, 663, 623, 624, 625, + 626, 656, 647, 645, 646, 642, 643, 220, 634, 640, + 641, 648, 649, 651, 650, 652, 653, 45, 46, 408, + 47, 48, 644, 655, 654, 9, 49, 50, 120, 51, + -32766,-32766,-32766, 233, -294, -294, 673,-32766,-32766,-32766, + -455, 263, 123, 33,-32766,-32766,-32766, 767, 831, 832, + 877,-32766, 1002,-32766,-32766,-32766,-32766,-32766,-32766, -454, + -32766,-32766,-32766, 52, 53,-32766, 543,-32766,-32766, 54, + 245, 55, 225, 226, 56, 57, 58, 59, 60, 61, + 62, 63, -272, 25, 236, 64, 360,-32766,-32766,-32766, + 668, 1019, 1020, 410, 671, 1052, -490, 1095, 493, 1018, + 1002, -455, 749, 98, 99, 100, 221, 244,-32766, 74, + -32766,-32766,-32766,-32766, -259, -455, 668, 253, 368, 101, + -454, 231, -455, 231, -458, 431, 253, 1104, 294, 268, + 1105, 1052, 544, 280, -454, 365, 420, 421, -491, 863, + 295, -454, 489, -457, -494, 422, 423, -233, 1024, 1025, + 1026, 1027, 1021, 1022, 248, 28, 228, -453, 1014, 432, + 1028, 1023, 365, 668, 995, 668, 30, 66, 298, 260, + 115, 265, 270, 409, -136, -136, -136, -4, 749, 1052, + 1052, 1070, 432, 738, 672, 365, 37, 20, 411, -136, + 412, -136, 413, -136, 414, -136, 571, 415, 431, 235, + 431, 38, 39, 361, 362, 302, 40, 416, 270, 353, + 65, 1083, 995, 293, 42, 417, 418, 1082, -453, 831, + 832, 419, 25, 354, 724, 772, 363, 364, 831, 832, + -176, 25, -453, 124, 1052, 124, 219, 1052, 1018, -453, + 838, -91, -490, 1052,-32766,-32766,-32766, 1018, 749, 409, + 751, 558, -136, 668, 477, 253, 270, 270, 666, 738, + -259, -177, 37, 20, 411,-32766, 412, 995, 413, 803, + 414, 391, 356, 415, 232, 251, 995, 38, 39, 361, + 362, 345, 40, 416, -491, 423, 65, 259, 431, 293, + -494, 417, 418, 422, 423, 357, 117, 419, -493, -453, + 681, 772, 363, 364, 748, 44, 68, 125,-32766,-32766, + -32766, 270, 1071, 230, 270, 68, 668, 269, 749, 409, + 270, 282, 131, 320, 689, 690, 751, 558, -4, 738, + 126, 116, 37, 20, 411, 227, 412, 121, 413, 376, + 414, 122, 560, 415, -218, -218, -218, 38, 39, 361, + 362, 431, 40, 416, 358, 668, 65, 831, 832, 293, + -453, 417, 418, -497, 454, -497, 252, 419, 349, 229, + 724, 772, 363, 364, -453, 359, -176, 668, 382, -238, + 297, -453, 95, 96, 97, 518, 21, 119, 804, 409, + 431, 392, 532, 533, 511, 512, 751, 558, -218, 738, + 400, 8, 37, 20, 411, 128, 412, -177, 413, 133, + 414, 668, 431, 415, -217, -217, -217, 38, 39, 361, + 362, 1032, 40, 416, 134, 749, 65, 689, 690, 293, + 135, 417, 418, -295, -295, 831, 832, 419, 862, 581, + 724, 772, 363, 364, -493, 284, 431, -82, 75, 76, + 77, 130, 246, 575, 569, 572, 763, 244, 101, 540, + 43, 129, 891, 669, 666, 668, 751, 558, -217, 31, + 1106, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 887, 241, 990, 746, 406, 668, - -491, 455, 460,-32766, 518, 532, -80, 101, 735, 533, - 370, 37, 20, 408, 549, 409, 377, 410, 10, 411, - 507, 990, 412, 770, 524, 566, 38, 39, 358, 746, - 771, 40, 413, 261, 1029, 65, 264, 1026, 290, 12, - 267, 293, 373, -410, 258, 5, 416, 970, 347, 0, - 335, 348, 331, 259, 0, 0, 0, 563, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 406, 0, 0, - 0, 0, 0, 0, 0, 748, 555, 735, 330, 324, - 37, 20, 408, 457, 409, 762, 410, 853, 411, 556, - 870, 412, 726, 577, 36, 38, 39, 358, 746, 406, - 40, 413, 35, 576, 65, 803, 863, 290, 866, 735, - 787, 865, 37, 20, 408, 416, 409, 862, 410, 782, - 411, 724, 795, 412, 784, 854, 561, 38, 39, 358, - 746, 794, 40, 413, 864, 793, 65, 558, 341, 290, - 340, 560, 276, 275, 748, 555, 571, 416, 567, 565, - 564, 559, 514, 792, 753, 763, 755, 689, 562, 978, - 766, 1097, 1048, 722, 1096, 1098, 681, 768, 406, 746, - 680, 690, 767, 691, 688, 1095, 786, 555, 735, 1063, - 1041, 37, 20, 408, 1055, 409, 1060, 410, 573, 411, - 41, 34, 412, 27, 26, 23, 38, 39, 358, -454, - 406, 40, 413, -455, -456, 65, -478, -480, 290, 237, - 735, 345, 343, 37, 20, 408, 416, 409, 278, 410, - 240, 411, 239, 238, 412, 222, 221, 135, 38, 39, - 358, 132, 126, 40, 413, 73, 72, 65, 71, 406, - 290, 70, 69, 67, 1028, 748, 555, 954, 416, 735, - 957, 548, 37, 20, 408, 503, 409, 484, 410, 313, - 411, 252, 22, 412, 18, 13, -236, 38, 39, 358, - 982, 835, 40, 413, 1011, 953, 65, 748, 555, 290, - -32766,-32766,-32766, 1001, 546, 403, 396, 416, 394, 390, - 314, 19, 17, 16, -91, 15, 14, -233, -234, 0, - -32766, -422,-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767, - -32767,-32767,-32767, 1010, 1093, 1054, 748, 555, 1040, 1039 + 97, 98, 99, 100, 749, 244, 409, 458, 671,-32766, + 463, 524, 552, 10, 373, -80, 738, 101, 510, 37, + 20, 411, 995, 412, 519, 413, 525, 414, 1034, 535, + 415, 773, 267, 565, 38, 39, 361, 380, 536, 40, + 416, 261, 806, 65, 262, 376, 293, 1033, 0, 234, + 749, 264, 0, 1031, 419, 874, 0, 350, 12, 0, + 0, 0, 774, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 409, 0, 0, 0, 566, + 0, 25, 296, 751, 558, 738, -412, 5, 37, 20, + 411, 0, 412, 1052, 413, 351, 414, 1018, 327, 415, + 338, 749, 334, 38, 39, 361, 333, 460, 40, 416, + 765, 559, 65, 729, 580, 293, 36, 35, 579, 790, + 867, 409, 797, 419, 870, 869, 995, 866, 785, 727, + 564, 738, 798, 749, 37, 20, 411, 787, 412, 858, + 413, 857, 414, 422, 423, 415, 868, 796, 561, 38, + 39, 361, 751, 558, 40, 416, 344, 343, 65, 563, + 279, 293, 573, 795, 278, 68, 574, 570, 568, 419, + 270, 567, 409, 562, 41, 749, 756, 766, 758, 692, + 983, 769, 738, 725, 1046, 37, 20, 411, 1101, 412, + 1103, 413, 684, 414, 771, 683, 415, 693, 789, 558, + 38, 39, 361, 770, 409, 40, 416, 694, 691, 65, + 1100, 1053, 293, 1102, 738, 1060, 1065, 37, 20, 411, + 419, 412, 1068, 413, 576, 414, 34, 27, 415, 26, + 23, -456, 38, 39, 361, -457, -458, 40, 416, -480, + -482, 65, 240, 348, 293, 346, 409, 281, 243, 751, + 558, 242, 419, 241, 224, 223, 738, 136, 132, 37, + 20, 411, 127, 412, 73, 413, 72, 414, 71, 70, + 415, 69, 67, 515, 38, 39, 361, 959, 962, 40, + 416, 751, 558, 65, 551, 1015, 293,-32766,-32766,-32766, + 506, 487, 316, 255, 419, 22, 18, 13, -236, 987, + 839, 1016, 958, 1006, 549, 406, 399, 397,-32766, 393, + -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, + -32767, 317, 19, 751, 558, 17, -91, 0, 16, 15, + 14, -233, -234, 0, 975, -424, 0, 1098, 1059, 1045, + 1044 ); protected $actionCheck = array( - 2, 3, 4, 5, 6, 13, 8, 9, 10, 11, - 12, 77, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 8, 9, 10, 112, 113, - 114, 115, 116, 117, 0, 8, 9, 10, 8, 9, - 10, 77, 1, 13, 7, 28, 112, 30, 31, 32, - 33, 34, 54, 56, 57, 28, 7, 30, 31, 32, - 33, 34, 35, 1, 28, 7, 68, 69, 70, 71, - 72, 73, 74, 7, 28, 77, 112, 113, 114, 115, - 116, 117, 84, 85, 86, 87, 88, 89, 90, 91, + 2, 3, 4, 5, 6, 78, 8, 9, 10, 11, + 12, 0, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 8, 9, 10, 1, 78, + 113, 114, 115, 116, 117, 118, 113, 114, 115, 116, + 117, 118, 1, 55, 57, 58, 29, 7, 31, 32, + 33, 34, 35, 36, 8, 9, 29, 69, 70, 71, + 72, 73, 74, 75, 113, 1, 78, 8, 9, 10, + 1, 8, 13, 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, 29, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 2, 3, 4, 5, - 6, 143, 144, 145, 152, 11, 12, 7, 14, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 8, 9, - 10, 67, 67, 67, 102, 103, 130, 131, 50, 51, - 52, 109, 54, 35, 67, 79, 130, 131, 28, 83, - 118, 47, 48, 1, 66, 1, 7, 53, 152, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 67, 67, 68, 69, 70, 8, 9, 10, 112, 75, - 76, 77, 150, 79, 7, 77, 7, 83, 8, 9, - 10, 1, 128, 128, 28, 28, 130, 30, 31, 32, - 33, 29, 7, 1, 7, 128, 102, 142, 28, 7, - 30, 31, 32, 149, 149, 148, 112, 151, 77, 142, - 112, 7, 156, 1, 120, 121, 149, 7, 151, 146, - 1, 128, 149, 129, 130, 1, 132, 133, 134, 135, - 136, 137, 138, 1, 67, 142, 94, 143, 144, 145, - 146, 7, 149, 79, 151, 151, 1, 153, 8, 155, - 156, 71, 72, 73, 74, 0, 1, 102, 103, 7, - 79, 81, 67, 82, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 143, 95, 35, 146, 48, 99, - 100, 101, 102, 7, 104, 105, 130, 131, 108, 77, - 67, 111, 148, 113, 114, 128, 7, 13, 79, 119, - 29, 146, 122, 123, 124, 125, 7, 77, 152, 142, - 80, 149, 8, 9, 10, 7, 149, 15, 77, 152, - 156, 140, 141, 128, 79, 35, 71, 1, 148, 149, - 150, 112, 28, 13, 30, 31, 81, 152, 35, 84, - 85, 86, 123, 88, 152, 90, 154, 92, 77, 82, - 95, 128, 35, 112, 99, 100, 101, 102, 103, 104, - 105, 149, 152, 108, 109, 142, 111, 77, 113, 114, - 67, 7, 149, 149, 119, 156, 7, 122, 123, 124, - 125, 149, 79, 112, 67, 15, 83, 77, 147, 8, - 9, 10, 7, 152, 149, 7, 79, 71, 143, 1, - 83, 156, 112, 148, 149, 150, 139, 81, 77, 78, - 84, 85, 86, 33, 88, 112, 90, 15, 92, 8, - 9, 95, 96, 97, 98, 99, 100, 101, 102, 112, - 104, 105, 129, 130, 108, 7, 35, 111, 35, 113, - 114, 152, 29, 112, 15, 119, 129, 130, 122, 123, - 124, 125, 15, 143, 151, 15, 146, 97, 98, 156, - 150, 15, 35, 72, 73, 1, 72, 73, 151, 71, - 47, 48, 49, 156, 148, 149, 150, 15, 77, 81, - 77, 29, 84, 85, 86, 29, 88, 29, 90, 29, - 92, 102, 103, 95, 96, 97, 98, 99, 100, 101, - 102, 29, 104, 105, 77, 35, 108, 54, 1, 111, - 66, 113, 114, 112, 67, 112, 152, 119, 102, 103, - 122, 123, 124, 125, 106, 107, 130, 131, 67, 8, - 9, 10, 148, 149, 77, 80, 29, 152, 79, 112, - 152, 74, 77, 79, 93, 77, 148, 149, 150, 28, - 147, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 79, 54, 112, 1, 71, 79, - 152, 82, 86, 82, 87, 91, 94, 66, 81, 96, - 102, 84, 85, 86, 89, 88, 94, 90, 94, 92, - 109, 112, 95, 123, 96, 29, 99, 100, 101, 1, - 123, 104, 105, 110, 139, 108, 126, 139, 111, 142, - 156, 142, 146, 142, 126, 142, 119, 153, 146, -1, - 146, 146, 146, 127, -1, -1, -1, 29, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 71, -1, -1, - -1, -1, -1, -1, -1, 148, 149, 81, 146, 146, - 84, 85, 86, 146, 88, 147, 90, 148, 92, 149, - 148, 95, 148, 148, 148, 99, 100, 101, 1, 71, - 104, 105, 148, 148, 108, 148, 148, 111, 148, 81, - 148, 148, 84, 85, 86, 119, 88, 148, 90, 148, - 92, 148, 148, 95, 148, 148, 29, 99, 100, 101, - 1, 148, 104, 105, 148, 150, 108, 149, 149, 111, - 149, 149, 149, 149, 148, 149, 149, 119, 149, 149, - 149, 149, 154, 150, 150, 150, 150, 150, 29, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 71, 1, - 150, 150, 150, 150, 150, 150, 148, 149, 81, 150, - 150, 84, 85, 86, 150, 88, 150, 90, 150, 92, - 151, 151, 95, 151, 151, 151, 99, 100, 101, 151, - 71, 104, 105, 151, 151, 108, 151, 151, 111, 151, - 81, 151, 151, 84, 85, 86, 119, 88, 151, 90, - 151, 92, 151, 151, 95, 151, 151, 151, 99, 100, - 101, 151, 151, 104, 105, 151, 151, 108, 151, 71, - 111, 151, 151, 151, 155, 148, 149, 152, 119, 81, - 152, 152, 84, 85, 86, 152, 88, 152, 90, 152, - 92, 152, 152, 95, 152, 152, 152, 99, 100, 101, - 152, 152, 104, 105, 152, 152, 108, 148, 149, 111, - 8, 9, 10, 152, 152, 152, 152, 119, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, -1, - 28, 153, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 154, 154, 154, 148, 149, 154, 154 + 122, 123, 124, 125, 126, 127, 128, 13, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 2, 3, 4, + 5, 6, 144, 145, 146, 7, 11, 12, 7, 14, + 8, 9, 10, 7, 103, 104, 1, 8, 9, 10, + 68, 110, 30, 13, 8, 9, 10, 1, 131, 132, + 119, 29, 1, 31, 32, 33, 34, 35, 29, 68, + 31, 32, 33, 48, 49, 29, 78, 31, 32, 54, + 7, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 151, 68, 69, 70, 71, 8, 9, 10, + 78, 76, 77, 78, 80, 80, 7, 83, 49, 84, + 1, 129, 1, 51, 52, 53, 13, 55, 29, 150, + 31, 32, 33, 34, 7, 143, 78, 29, 103, 67, + 129, 36, 150, 36, 152, 113, 29, 78, 113, 7, + 81, 80, 144, 7, 143, 147, 121, 122, 7, 151, + 7, 150, 1, 152, 7, 130, 131, 153, 133, 134, + 135, 136, 137, 138, 139, 141, 142, 68, 1, 144, + 145, 146, 147, 78, 113, 78, 7, 152, 7, 154, + 15, 156, 157, 72, 73, 74, 75, 0, 1, 80, + 80, 1, 144, 82, 149, 147, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 150, 96, 113, 36, + 113, 100, 101, 102, 103, 7, 105, 106, 157, 7, + 109, 1, 113, 112, 68, 114, 115, 7, 129, 131, + 132, 120, 68, 124, 123, 124, 125, 126, 131, 132, + 7, 68, 143, 148, 80, 148, 95, 80, 84, 150, + 153, 153, 153, 80, 8, 9, 10, 84, 1, 72, + 149, 150, 151, 78, 79, 29, 157, 157, 78, 82, + 153, 7, 85, 86, 87, 29, 89, 113, 91, 30, + 93, 30, 7, 96, 36, 129, 113, 100, 101, 102, + 103, 104, 105, 106, 153, 131, 109, 110, 113, 112, + 153, 114, 115, 130, 131, 7, 150, 120, 7, 68, + 123, 124, 125, 126, 30, 68, 152, 150, 8, 9, + 10, 157, 153, 36, 157, 152, 78, 68, 1, 72, + 157, 144, 98, 99, 103, 104, 149, 150, 151, 82, + 150, 15, 85, 86, 87, 36, 89, 15, 91, 147, + 93, 15, 150, 96, 97, 98, 99, 100, 101, 102, + 103, 113, 105, 106, 7, 78, 109, 131, 132, 112, + 129, 114, 115, 153, 83, 155, 129, 120, 147, 36, + 123, 124, 125, 126, 143, 7, 153, 78, 129, 153, + 143, 150, 48, 49, 50, 73, 74, 150, 149, 72, + 113, 150, 73, 74, 107, 108, 149, 150, 151, 82, + 103, 104, 85, 86, 87, 15, 89, 153, 91, 15, + 93, 78, 113, 96, 97, 98, 99, 100, 101, 102, + 103, 140, 105, 106, 15, 1, 109, 103, 104, 112, + 15, 114, 115, 103, 104, 131, 132, 120, 149, 150, + 123, 124, 125, 126, 153, 34, 113, 30, 8, 9, + 10, 30, 30, 30, 30, 30, 36, 55, 67, 75, + 68, 68, 80, 78, 78, 78, 149, 150, 151, 29, + 81, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 1, 55, 72, 83, 80, 83, + 87, 94, 90, 95, 103, 95, 82, 67, 110, 85, + 86, 87, 113, 89, 88, 91, 97, 93, 140, 92, + 96, 124, 127, 30, 100, 101, 102, 95, 97, 105, + 106, 127, 149, 109, 128, 147, 112, 156, -1, 36, + 1, 111, -1, 140, 120, 149, -1, 147, 143, -1, + -1, -1, 124, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 72, -1, -1, -1, 30, + -1, 68, 143, 149, 150, 82, 143, 143, 85, 86, + 87, -1, 89, 80, 91, 147, 93, 84, 147, 96, + 147, 1, 147, 100, 101, 102, 147, 147, 105, 106, + 148, 150, 109, 149, 149, 112, 149, 149, 149, 149, + 149, 72, 149, 120, 149, 149, 113, 149, 149, 149, + 30, 82, 149, 1, 85, 86, 87, 149, 89, 149, + 91, 149, 93, 130, 131, 96, 149, 151, 150, 100, + 101, 102, 149, 150, 105, 106, 150, 150, 109, 150, + 150, 112, 30, 151, 150, 152, 150, 150, 150, 120, + 157, 150, 72, 150, 152, 1, 151, 151, 151, 151, + 151, 151, 82, 151, 151, 85, 86, 87, 151, 89, + 151, 91, 151, 93, 151, 151, 96, 151, 149, 150, + 100, 101, 102, 151, 72, 105, 106, 151, 151, 109, + 151, 151, 112, 151, 82, 151, 151, 85, 86, 87, + 120, 89, 151, 91, 151, 93, 152, 152, 96, 152, + 152, 152, 100, 101, 102, 152, 152, 105, 106, 152, + 152, 109, 152, 152, 112, 152, 72, 152, 152, 149, + 150, 152, 120, 152, 152, 152, 82, 152, 152, 85, + 86, 87, 152, 89, 152, 91, 152, 93, 152, 152, + 96, 152, 152, 155, 100, 101, 102, 153, 153, 105, + 106, 149, 150, 109, 153, 155, 112, 8, 9, 10, + 153, 153, 153, 153, 120, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, 29, 153, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 153, 153, 149, 150, 153, 153, -1, 153, 153, + 153, 153, 153, -1, 154, 154, -1, 155, 155, 155, + 155 ); protected $actionBase = array( - 0, 220, 295, 366, 438, 285, 350, 606, -2, -2, - -36, -2, -2, 749, 616, 616, 547, 616, 717, 648, - 788, 788, 788, 281, 443, 441, 441, 467, 371, 441, - 467, 311, 330, 138, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, 184, 184, 97, 182, - 324, 729, 718, 725, 732, 733, 727, 715, 360, 645, - 632, 492, 650, 654, 656, 649, 723, 618, 730, 719, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 280, 30, 451, 421, - 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, - 421, 421, 421, 421, 421, 421, 421, 421, 150, 150, - 150, 344, 210, 207, 197, 17, 95, 27, 892, 892, - 892, 892, 892, 108, 108, 108, 108, 357, 357, 343, - 62, 96, 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 259, 463, 463, 36, 36, 36, - 36, 504, 196, 499, 46, 307, 515, 709, 252, 252, - 436, 107, 133, 118, 118, 118, 195, 539, 529, 529, - 529, 529, 221, 221, 529, 529, 270, 264, 232, 95, - 95, 263, 95, 95, 95, 429, 429, 429, 171, 113, - 541, 171, 562, 622, 548, 623, 533, 605, 94, 522, - 204, 528, 525, 204, 204, 204, 458, 434, 431, 762, - 184, 521, 184, 184, 184, 184, 678, 184, 184, 184, - 184, 184, 184, 202, 184, 41, 424, 97, 272, 272, - 420, 272, 493, 235, 614, 425, 404, 493, 493, 493, - 613, 611, 250, 225, -8, 609, 428, 456, 468, 329, - 497, 497, 508, 508, 535, 510, 497, 497, 497, 497, - 497, 664, 664, 508, 540, 508, 535, 659, 508, 510, - 508, 508, 497, 508, 664, 510, 66, 339, 244, 274, - 510, 348, 538, 497, 530, 530, 316, 508, 140, 508, - 37, 546, 664, 664, 546, 179, 510, 209, 575, 565, - 531, 558, 227, 498, 498, 58, 531, 409, 510, 498, - 49, 540, 292, 498, 34, 712, 711, 500, 710, 660, - 707, 681, 705, 560, 520, 527, 695, 694, 704, 662, - 663, 496, 557, 469, 442, 523, 487, 668, 528, 516, - 484, 484, 484, 487, 673, 484, 484, 484, 484, 484, - 484, 484, 484, 779, 519, 536, 502, 553, 542, 342, - 608, 518, 557, 557, 633, 768, 514, 505, 678, 751, - 701, 574, 410, 759, 692, 658, 552, 526, 691, 758, - 743, 612, 469, 742, 634, 501, 635, 557, 636, 484, - 675, 676, 785, 784, 672, 781, 764, 757, 524, 637, - 495, 780, 640, 739, 621, 620, 566, 763, 734, 756, - 641, 754, 642, 564, 537, 766, 491, 680, 687, 619, - 643, 644, 559, 477, 631, 630, 629, 700, 577, 761, - 534, 760, 765, 582, 603, 480, 627, 486, 597, 696, - 453, 507, 596, 594, 738, 626, 689, 593, 625, 752, - 532, 516, 517, 543, 544, 545, 617, 753, 512, 591, - 589, 583, 580, 624, 578, 0, 0, 0, 0, 0, + 0, 221, 297, 367, 437, 277, 108, 607, -2, -2, + -73, -2, -2, 613, 544, 544, 742, 544, 710, 659, + 784, 784, 784, 207, 205, 419, 419, 453, 295, 419, + 453, 132, 397, 358, -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, 155, 155, 359, + 261, 150, 750, 735, 748, 753, 754, 749, 734, 213, + 669, 670, 541, 643, 674, 675, 681, 747, 728, 752, + 741, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 73, 69, 56, + 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, + 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, + 356, 356, 356, 156, 209, 149, 199, 351, 142, 27, + 889, 889, 889, 889, 889, -16, -16, -16, -16, 623, + 623, 283, 51, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 219, 450, 454, 454, + 346, 346, 346, 346, 171, 208, 37, 217, 401, 498, + 501, 300, 300, 424, 92, 111, 172, 172, 172, 341, + 534, 519, 519, 519, 519, 134, 134, 519, 519, 169, + 79, 330, 351, 351, 357, 351, 351, 351, 444, 444, + 444, 158, 312, 536, 158, 516, 633, 539, 622, 551, + 606, 266, 520, 220, 521, 558, 220, 220, 220, 407, + 432, 439, 783, 155, 553, 155, 155, 155, 155, 700, + 155, 155, 155, 155, 155, 155, 361, 155, 74, 409, + 359, 166, 166, 531, 166, 522, 369, 624, 343, 279, + 522, 522, 522, 620, 617, 251, 227, 114, 616, 374, + 417, 411, 257, 507, 507, 506, 506, 502, 540, 507, + 507, 507, 507, 507, 688, 688, 506, 538, 506, 502, + 632, 506, 540, 506, 506, 507, 506, 688, 540, 141, + 385, 253, 281, 540, 408, 524, 507, 515, 515, 467, + 506, 146, 506, 50, 526, 688, 688, 526, 183, 540, + 242, 579, 575, 518, 572, 246, 542, 542, 322, 518, + 540, 542, 488, 138, 538, 318, 542, 11, 730, 729, + 537, 727, 684, 726, 703, 724, 571, 517, 548, 713, + 712, 722, 685, 687, 394, 570, 275, 436, 554, 512, + 689, 521, 508, 511, 511, 511, 512, 694, 511, 511, + 511, 511, 511, 511, 511, 511, 740, 549, 533, 442, + 561, 552, 446, 608, 523, 570, 570, 642, 791, 790, + 505, 700, 760, 720, 578, 510, 779, 711, 683, 569, + 565, 709, 778, 759, 619, 275, 758, 647, 513, 649, + 570, 651, 511, 697, 698, 795, 794, 693, 793, 787, + 766, 563, 653, 509, 792, 654, 757, 631, 628, 577, + 786, 755, 764, 656, 763, 662, 574, 546, 789, 527, + 701, 705, 627, 666, 667, 672, 640, 639, 716, 503, + 785, 547, 782, 788, 580, 583, 514, 638, 602, 529, + 535, 600, 715, 545, 504, 598, 593, 756, 637, 706, + 590, 636, 761, 530, 508, 525, 550, 528, 532, 626, + 762, 543, 589, 588, 586, 585, 635, 581, 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, 134, 134, -2, -2, -2, 0, - 0, -2, 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, 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, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, -3, 561, 561, -3, 561, 561, - 561, 561, 561, 561, 118, 118, 118, 118, 171, 171, - 171, -84, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 118, 118, 171, 171, - 171, 171, 171, 171, -84, 171, 221, 221, 221, 204, - 204, 171, 0, 0, 0, 0, 0, 497, 221, 171, - 171, 171, 171, 0, 0, 171, 171, 540, 204, 0, - 0, 0, 0, 0, 0, 0, 497, 497, 497, 0, - 497, 221, 0, 272, 184, 400, 400, 400, 400, 0, - 497, 0, 540, 497, 0, 0, 0, 0, 0, 0, - 510, 0, 664, 0, 0, 0, 0, 508, 0, 0, - 0, 0, 0, 0, 0, 0, 540, 0, 0, 0, - 0, 540, 0, 484, 0, 505, 0, 0, 484, 484, - 484, 505, 505, 0, 0, 0, 505 + 0, 0, 0, 0, 0, 135, 135, 135, 135, -2, + -2, -2, 0, 0, -2, 0, 0, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, -3, 560, + 560, -3, 560, 560, 560, 560, 560, 560, 560, 172, + 172, 172, 172, 158, 158, 158, -67, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, -67, 172, 172, 158, 158, 158, 158, 158, 158, + 158, 158, 134, 134, 134, 220, 220, 158, 0, 0, + 0, 0, 0, 507, 134, 158, 158, 158, 158, 0, + 0, 158, 158, 538, 220, 0, 0, 0, 0, 0, + 0, 0, 507, 507, 507, 0, 507, 134, 0, 166, + 155, 344, 344, 344, 344, 0, 507, 0, 538, 507, + 0, 0, 0, 0, 0, 0, 540, 0, 688, 0, + 0, 0, 0, 506, 0, 0, 0, 0, 0, 0, + 0, 0, 538, 0, 0, 0, 0, 538, 0, 511, + 0, 505, 0, 0, 511, 511, 511, 505, 505, 0, + 0, 0, 505 ); protected $actionDefault = array( 3,32767,32767,32767,32767,32767,32767,32767,32767, 91, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 93, 504, 504, 494,32767, 504, - 494,32767,32767,32767, 312, 312, 312,32767, 449, 449, - 449, 449, 449, 449, 449,32767,32767,32767,32767,32767, - 391,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 93, 506, 506, 496,32767, 506, + 496,32767,32767,32767, 313, 313, 313,32767, 451, 451, + 451, 451, 451, 451, 451,32767,32767,32767,32767,32767, + 393,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, 91, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 91,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 501,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 503,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 374, 375, 377, 378, 311, 450, 257, 500, 310, 129, - 268, 259, 210, 308, 242, 133, 339, 392, 341, 390, - 394, 340, 317, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 315, 316, 393, 371, 370, - 369, 337, 338, 314, 342, 344, 314, 343, 360, 361, - 358, 359, 362, 363, 364, 365, 366,32767,32767,32767, + 32767, 376, 377, 379, 380, 312, 452, 258, 502, 311, + 129, 269, 260, 210, 242, 309, 133, 341, 394, 343, + 392, 396, 342, 318, 322, 323, 324, 325, 326, 327, + 328, 329, 330, 331, 332, 333, 334, 316, 317, 395, + 373, 372, 371, 339, 315, 340, 344, 315, 346, 345, + 362, 363, 360, 361, 364, 365, 366, 367, 368,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 93,32767,32767,32767, 351, 352, 249, 249, 249, - 249,32767, 249, 294,32767,32767,32767,32767,32767,32767, - 32767, 443, 368, 346, 347, 345,32767, 421,32767,32767, - 32767,32767,32767, 423,32767, 91,32767,32767,32767, 334, - 336, 415, 503, 318, 502,32767,32767, 93,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 418,32767, - 32767, 409, 91,32767,32767, 91, 173, 229, 231, 178, - 32767, 426,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 93,32767,32767,32767, 292, 353, 354, + 249, 249, 249, 249,32767, 249,32767, 249,32767,32767, + 32767,32767,32767,32767, 445, 370, 348, 349, 347,32767, + 423,32767,32767,32767,32767,32767, 425,32767, 91,32767, + 32767,32767, 336, 338, 417, 505, 319, 504,32767,32767, + 93,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 420,32767,32767, 411, 91,32767,32767, 91, 173, + 229, 231, 178,32767, 428,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 356, 511,32767, 451,32767, 348, 349, 350, - 32767,32767, 451, 451, 451,32767, 451,32767, 451, 451, - 32767,32767,32767,32767,32767, 178,32767,32767,32767,32767, - 93, 424, 424, 91, 91, 91, 91, 419,32767, 178, - 32767,32767,32767,32767,32767, 178, 90, 90, 90, 90, - 178, 90, 193,32767, 191, 191, 90,32767, 92,32767, - 92, 195,32767, 465, 195, 90, 178, 90, 215, 215, - 400, 180, 92, 251, 251, 92, 400, 90, 178, 251, - 90,32767, 90, 251,32767,32767,32767, 84,32767,32767, + 32767,32767,32767,32767,32767, 358, 513,32767, 453,32767, + 350, 351, 352,32767,32767, 453, 453, 453,32767, 453, + 32767, 453, 453,32767,32767,32767,32767,32767, 178,32767, + 32767,32767,32767, 93, 426, 426, 91, 91, 91, 91, + 421,32767, 178,32767,32767,32767,32767,32767, 178, 90, + 90, 90, 90, 178, 90, 193,32767, 191, 191, 90, + 32767, 92,32767, 92, 195,32767, 467, 195, 90, 178, + 90, 215, 215, 402, 180, 92, 251, 251, 92, 402, + 178, 251, 90, 90,32767, 90, 251,32767,32767,32767, + 84,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 413,32767, 433,32767, 446, + 465, 411,32767, 356, 357, 359,32767, 455, 381, 382, + 383, 384, 385, 386, 387, 389,32767, 416,32767,32767, + 86, 120, 268,32767, 511, 86, 414,32767, 511,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 86, + 86,32767,32767,32767,32767, 492,32767, 512,32767, 453, + 415,32767, 355, 429, 472,32767,32767, 454,32767,32767, + 32767, 86,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 433,32767,32767,32767,32767,32767,32767, 453,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 411,32767, 431,32767, 444, 463, 409,32767, - 354, 355, 357,32767, 453, 379, 380, 381, 382, 383, - 384, 385, 387,32767, 414,32767,32767, 86, 120, 267, - 32767, 509, 86, 412,32767, 509,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 86, 86,32767,32767, - 32767,32767, 490,32767, 510,32767, 451, 413,32767, 353, - 427, 470,32767,32767, 452,32767,32767,32767, 86,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 431,32767, - 32767,32767,32767,32767,32767, 451,32767,32767,32767,32767, - 32767,32767,32767, 307,32767,32767,32767,32767,32767,32767, - 32767,32767, 451,32767,32767, 241,32767,32767,32767,32767, + 32767,32767,32767, 453,32767,32767, 241,32767,32767, 308, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 84, 60,32767, 287,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 135, 135, 3, 270, 3, - 270, 135, 135, 135, 270, 270, 135, 135, 135, 135, - 135, 135, 135, 168, 223, 226, 215, 215, 279, 135, - 135 + 32767,32767,32767, 84, 60,32767, 288,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 135, 135, + 3, 271, 3, 271, 135, 135, 135, 271, 271, 135, + 135, 135, 135, 135, 135, 135, 168, 223, 226, 215, + 215, 280, 135, 135 ); protected $goto = array( - 166, 166, 140, 140, 148, 149, 140, 148, 151, 182, - 167, 164, 164, 164, 164, 165, 165, 165, 165, 165, - 165, 165, 160, 161, 162, 163, 179, 177, 180, 430, - 431, 322, 432, 435, 436, 437, 438, 439, 440, 441, - 442, 901, 137, 141, 142, 143, 144, 145, 139, 146, - 147, 150, 176, 178, 181, 198, 201, 202, 204, 205, - 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 235, 236, 253, 254, 255, 327, 328, 329, 479, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 152, 197, 153, 168, 169, 170, 199, - 171, 154, 155, 156, 172, 157, 200, 138, 173, 158, - 174, 175, 159, 542, 203, 447, 551, 203, 743, 444, - 304, 308, 459, 482, 483, 485, 444, 493, 496, 519, - 1087, 1087, 987, 481, 452, 452, 452, 472, 452, 698, - 472, 677, 692, 779, 779, 779, 779, 1087, 467, 773, - 780, 452, 433, 433, 433, 285, 433, 433, 433, 433, - 433, 433, 433, 433, 433, 433, 433, 433, 433, 434, - 434, 434, 676, 434, 434, 434, 434, 434, 434, 434, - 434, 434, 434, 434, 434, 434, 480, 869, 554, 319, - 664, 263, 536, 867, 321, 988, 247, 502, 282, 452, - 452, 515, 516, 1057, 1058, 466, 488, 452, 452, 452, - 3, 4, 465, 989, 1043, 712, 785, 575, 504, 506, - 837, 453, 520, 535, 538, 813, 545, 553, 809, 498, - 498, 1012, 477, 1012, 1012, 1012, 1012, 1012, 1012, 1012, - 1012, 1012, 1012, 1012, 1012, 1012, 703, 675, 976, 765, - 738, 977, 739, 1086, 1086, 499, 501, 547, 802, 783, - 783, 781, 783, 574, 679, 445, 811, 806, 473, 1079, - 1086, 876, 1102, 777, 316, 550, 478, 1067, 492, 703, - 302, 684, 703, 734, 729, 730, 744, 1089, 685, 731, - 682, 732, 733, 683, 877, 737, 306, 449, 521, 470, - 948, 833, 458, 821, 334, 522, 338, 468, 325, 325, - 269, 270, 272, 476, 332, 273, 333, 274, 336, 505, - 339, 525, 1056, 391, 826, 289, 539, 816, 816, 1074, - 694, 694, 510, 283, 312, 11, 704, 704, 704, 706, - 693, 991, 286, 287, 827, 827, 827, 827, 991, 827, - 696, 827, 699, 579, 1062, 1062, 526, 827, 842, 846, - 449, 984, 1053, 708, 790, 991, 991, 991, 991, 1053, - 979, 991, 991, 384, 399, 886, 1064, 1064, 707, 695, - 841, 495, 845, 0, 0, 751, 0, 788, 752, 0, - 0, 0, 0, 0, 0, 1049, 818, 0, 778, 0, - 0, 0, 0, 0, 0, 0, 0, 986, 884, 0, - 0, 711, 464, 983, 0, 0, 0, 0, 844, 0, - 0, 1051, 1051, 844, 0, 0, 0, 0, 0, 0, + 167, 167, 141, 141, 149, 150, 141, 149, 152, 183, + 168, 165, 165, 165, 165, 166, 166, 166, 166, 166, + 166, 166, 161, 162, 163, 164, 180, 178, 181, 433, + 434, 325, 435, 438, 439, 440, 441, 442, 443, 444, + 445, 905, 138, 142, 143, 144, 145, 146, 140, 147, + 148, 151, 177, 179, 182, 200, 203, 205, 206, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 238, 239, 256, 257, 258, 330, 331, 332, 482, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 153, 199, 154, 169, 170, 171, + 201, 172, 155, 156, 157, 173, 158, 202, 139, 159, + 174, 175, 176, 160, 545, 204, 450, 554, 204, 746, + 307, 311, 462, 485, 486, 488, 483, 873, 557, 680, + 992, 496, 539, 871, 484, 455, 455, 455, 288, 455, + 266, 475, 679, 701, 475, 250, 695, 322, 741, 470, + 742, 324, 455, 436, 436, 436, 285, 436, 436, 436, + 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, + 437, 437, 437, 715, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 1091, 1091, 481, + 505, 495, 667, 993, 516, 517, 788, 1092, 1092, 841, + 455, 455, 981, 768, 1091, 982, 469, 491, 455, 455, + 455, 994, 1048, 468, 1092, 780, 319, 553, 578, 507, + 509, 1094, 456, 521, 538, 541, 816, 548, 556, 812, + 501, 501, 1017, 480, 1017, 1017, 1017, 1017, 1017, 1017, + 1017, 1017, 1017, 1017, 1017, 1017, 1017, 706, 499, 520, + 678, 502, 504, 550, 1062, 1063, 880, 3, 4, 476, + 1084, 805, 786, 786, 784, 786, 577, 682, 448, 814, + 809, 881, 1072, 305, 447, 522, 473, 953, 836, 1061, + 706, 824, 447, 706, 687, 292, 737, 732, 733, 747, + 347, 688, 734, 685, 735, 736, 686, 829, 740, 782, + 782, 782, 782, 513, 286, 776, 783, 337, 523, 341, + 702, 328, 328, 272, 273, 275, 479, 335, 276, 336, + 277, 339, 508, 342, 699, 289, 290, 315, 582, 846, + 527, 697, 697, 819, 819, 1079, 309, 707, 707, 707, + 709, 696, 461, 989, 996, 984, 850, 471, 830, 830, + 830, 830, 996, 830, 830, 830, 793, 711, 1067, 1067, + 387, 830, 890, 394, 401, 1058, 498, 0, 0, 996, + 996, 996, 996, 1058, 11, 996, 996, 0, 0, 1107, + 1069, 1069, 710, 698, 845, 0, 849, 0, 0, 754, + 0, 791, 755, 0, 0, 0, 0, 0, 0, 1054, + 821, 0, 781, 0, 452, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 888, 714, 467, 988, 0, 0, + 0, 0, 848, 0, 0, 1056, 1056, 848, 526, 0, + 0, 0, 0, 542, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 446, 462, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 446, - 0, 462, 0, 0, 305, 0, 450, 372, 0, 374, + 0, 0, 449, 465, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 449, 0, 465, 0, 452, 308, 0, + 453, 375, 0, 377, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 705, 0, 1099, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 702, 0, 1094 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 991 ); protected $gotoCheck = array( @@ -647,82 +656,85 @@ class Php7 extends \PhpParser\ParserAbstract 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 63, 56, 10, 8, 56, 13, 75, - 49, 49, 49, 49, 49, 49, 75, 15, 46, 46, - 148, 148, 92, 97, 10, 10, 10, 85, 10, 15, - 85, 18, 15, 75, 75, 75, 75, 148, 10, 75, - 75, 10, 135, 135, 135, 80, 135, 135, 135, 135, - 135, 135, 135, 135, 135, 135, 135, 135, 135, 137, - 137, 137, 17, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 7, 7, 7, 69, - 5, 134, 7, 7, 69, 92, 134, 73, 69, 10, - 10, 73, 73, 141, 141, 10, 10, 10, 10, 10, - 37, 37, 39, 92, 92, 36, 40, 39, 39, 39, - 94, 10, 39, 39, 39, 39, 39, 39, 39, 86, - 86, 86, 10, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 26, 16, 67, 67, - 55, 67, 55, 147, 147, 68, 68, 68, 16, 16, - 16, 16, 16, 16, 13, 16, 16, 16, 136, 146, - 147, 111, 12, 76, 76, 76, 2, 143, 2, 26, - 52, 13, 26, 13, 13, 13, 13, 147, 13, 13, - 13, 13, 13, 13, 111, 13, 65, 12, 54, 53, - 118, 90, 65, 88, 56, 56, 56, 65, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 12, 139, 65, 91, 20, 12, 85, 85, 85, - 26, 26, 24, 11, 19, 65, 26, 26, 26, 26, - 26, 63, 80, 80, 63, 63, 63, 63, 63, 63, - 28, 63, 30, 82, 8, 8, 23, 63, 96, 99, - 12, 127, 97, 32, 79, 63, 63, 63, 63, 97, - 124, 63, 63, 71, 122, 114, 97, 97, 14, 14, - 14, 72, 14, -1, -1, 63, -1, 14, 63, -1, - -1, -1, -1, -1, -1, 97, 14, -1, 14, -1, - -1, -1, -1, -1, -1, -1, -1, 12, 14, -1, - -1, 14, 8, 14, -1, -1, -1, -1, 97, -1, - -1, 97, 97, 97, -1, -1, -1, -1, -1, -1, + 33, 33, 33, 33, 63, 56, 10, 8, 56, 13, + 49, 49, 49, 49, 49, 49, 7, 7, 7, 18, + 92, 15, 7, 7, 97, 10, 10, 10, 80, 10, + 134, 85, 17, 15, 85, 134, 15, 69, 55, 10, + 55, 69, 10, 135, 135, 135, 69, 135, 135, 135, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 137, 137, 137, 36, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 147, 147, 2, + 73, 2, 5, 92, 73, 73, 40, 148, 148, 94, + 10, 10, 67, 67, 147, 67, 10, 10, 10, 10, + 10, 92, 92, 39, 148, 76, 76, 76, 39, 39, + 39, 147, 10, 39, 39, 39, 39, 39, 39, 39, + 86, 86, 86, 10, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 26, 46, 46, + 16, 68, 68, 68, 141, 141, 111, 37, 37, 136, + 146, 16, 16, 16, 16, 16, 16, 13, 16, 16, + 16, 111, 143, 52, 75, 54, 53, 118, 90, 139, + 26, 88, 75, 26, 13, 20, 13, 13, 13, 13, + 89, 13, 13, 13, 13, 13, 13, 91, 13, 75, + 75, 75, 75, 24, 11, 75, 75, 56, 56, 56, + 30, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 28, 80, 80, 19, 82, 96, + 23, 26, 26, 85, 85, 85, 65, 26, 26, 26, + 26, 26, 65, 127, 63, 124, 99, 65, 63, 63, + 63, 63, 63, 63, 63, 63, 79, 32, 8, 8, + 71, 63, 114, 65, 122, 97, 72, -1, -1, 63, + 63, 63, 63, 97, 65, 63, 63, -1, -1, 12, + 97, 97, 14, 14, 14, -1, 14, -1, -1, 63, + -1, 14, 63, -1, -1, -1, -1, -1, -1, 97, + 14, -1, 14, -1, 12, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 14, 14, 8, 14, -1, -1, + -1, -1, 97, -1, -1, 97, 97, 97, 12, -1, + -1, -1, -1, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 8, 8, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, - -1, 8, -1, -1, 8, -1, 8, 8, -1, 8, + -1, -1, 8, 8, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 8, -1, 8, -1, 12, 8, -1, + 8, 8, -1, 8, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 8, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 8, -1, 8 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 12 ); protected $gotoBase = array( - 0, 0, -281, 0, 0, 180, 0, 181, 106, 0, - -141, 54, 6, -19, 11, -253, 245, 170, 139, 45, - 69, 0, 0, 15, 56, 0, -10, 0, 58, 0, - 75, 0, 10, -23, 0, 0, 206, -369, 0, -344, - 197, 0, 0, 0, 0, 0, 93, 0, 0, 81, - 0, 0, 243, 77, 80, 235, 87, 0, 0, 0, - 0, 0, 0, 107, 0, -63, 0, -70, 17, -205, - 0, -2, -3, -363, 0, -115, 14, 0, 0, 9, - -234, 0, 36, 0, 0, 110, 12, 0, 61, 0, - 57, 74, -169, 0, 196, 0, 63, 128, 0, 5, + 0, 0, -371, 0, 0, 182, 0, 121, 107, 0, + -143, 22, 110, -19, 12, -252, 248, 140, 127, 35, + 26, 0, 0, -14, 24, 0, -12, 0, 29, 0, + 30, 0, 1, -23, 0, 0, 164, -325, 0, -346, + 177, 0, 0, 0, 0, 0, 213, 0, 0, 81, + 0, 0, 236, 52, 55, 133, 88, 0, 0, 0, + 0, 0, 0, 108, 0, -26, 0, -119, 10, -250, + 0, -18, -21, -373, 0, 38, -47, 0, 0, -2, + -254, 0, 8, 0, 0, 114, 11, 0, 36, 43, + 32, 44, -174, 0, 175, 0, 31, 129, 0, -11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 51, 0, 0, 19, 0, 0, 0, 59, 0, - 0, 0, -22, 0, 18, 0, 0, 16, 0, 0, - 0, 0, 0, 0, -66, -65, 242, -48, 0, 73, - 0, -90, 0, 247, 0, 0, 240, 7, -116, 0, + 0, 34, 0, 0, 3, 0, 0, 0, 33, 0, + 0, 0, -35, 0, -10, 0, 0, -5, 0, 0, + 0, 0, 0, 0, -120, -66, 233, -49, 0, 27, + 0, -42, 0, 242, 0, 0, 231, -62, -52, 0, 0 ); protected $gotoDefault = array( - -32768, 404, 582, 2, 583, 654, 662, 527, 421, 552, - 422, 448, 323, 736, 890, 756, 718, 719, 720, 309, - 349, 300, 307, 511, 500, 395, 705, 368, 697, 392, - 700, 367, 709, 136, 528, 400, 713, 1, 715, 454, - 747, 297, 723, 298, 531, 725, 461, 727, 728, 303, - 310, 311, 894, 469, 497, 740, 206, 463, 741, 296, - 742, 750, 320, 301, 378, 401, 315, 871, 487, 318, - 363, 381, 494, 489, 471, 998, 775, 387, 376, 789, - 284, 797, 580, 805, 808, 423, 424, 385, 820, 386, - 831, 825, 1006, 380, 836, 369, 843, 1038, 371, 847, - 220, 850, 344, 512, 337, 855, 856, 6, 861, 543, - 544, 7, 243, 397, 885, 513, 366, 900, 352, 967, - 969, 456, 393, 980, 375, 534, 402, 985, 1042, 364, - 425, 382, 271, 288, 246, 426, 443, 251, 427, 383, - 1045, 1052, 326, 1068, 268, 29, 1080, 1088, 280, 475, - 491 + -32768, 407, 585, 2, 586, 657, 665, 530, 424, 555, + 425, 451, 326, 739, 894, 759, 721, 722, 723, 312, + 352, 303, 310, 514, 503, 398, 708, 371, 700, 395, + 703, 370, 712, 137, 531, 403, 716, 1, 718, 457, + 750, 300, 726, 301, 534, 728, 464, 730, 731, 306, + 313, 314, 898, 472, 500, 743, 207, 466, 744, 299, + 745, 753, 323, 304, 381, 404, 318, 875, 490, 321, + 366, 384, 497, 492, 474, 1003, 778, 390, 379, 792, + 287, 800, 583, 808, 811, 426, 427, 388, 823, 389, + 834, 828, 1011, 383, 840, 372, 847, 1043, 374, 851, + 222, 854, 247, 528, 340, 859, 860, 6, 865, 546, + 547, 7, 237, 402, 889, 529, 369, 904, 355, 972, + 974, 459, 396, 985, 378, 537, 405, 990, 1047, 367, + 428, 385, 274, 291, 249, 429, 446, 254, 430, 386, + 1050, 1057, 329, 1073, 271, 29, 1085, 1093, 283, 478, + 494 ); protected $ruleToNonTerminal = array( @@ -751,13 +763,13 @@ class Php7 extends \PhpParser\ParserAbstract 82, 45, 45, 41, 41, 83, 43, 43, 84, 42, 42, 44, 44, 54, 54, 54, 54, 68, 68, 87, 87, 88, 88, 88, 90, 90, 91, 91, 91, 89, - 89, 69, 69, 92, 92, 93, 93, 94, 94, 94, - 50, 95, 95, 96, 51, 98, 98, 99, 99, 100, - 100, 73, 101, 101, 101, 101, 101, 106, 106, 107, - 107, 108, 108, 108, 108, 108, 109, 110, 110, 105, - 105, 102, 102, 104, 104, 112, 112, 111, 111, 111, - 111, 111, 111, 103, 113, 113, 115, 114, 114, 52, - 116, 116, 46, 46, 33, 33, 33, 33, 33, 33, + 89, 69, 69, 69, 92, 92, 93, 93, 94, 94, + 94, 50, 95, 95, 96, 51, 98, 98, 99, 99, + 100, 100, 73, 101, 101, 101, 101, 101, 106, 106, + 107, 107, 108, 108, 108, 108, 108, 109, 110, 110, + 105, 105, 102, 102, 104, 104, 112, 112, 111, 111, + 111, 111, 111, 111, 103, 113, 113, 115, 114, 114, + 52, 116, 116, 46, 46, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, @@ -765,20 +777,20 @@ class Php7 extends \PhpParser\ParserAbstract 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 123, 117, 117, - 122, 122, 125, 126, 126, 127, 128, 128, 128, 75, - 75, 63, 63, 63, 118, 118, 118, 130, 130, 119, - 119, 121, 121, 121, 124, 124, 135, 135, 135, 86, - 137, 137, 137, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, 120, 49, - 49, 133, 133, 133, 129, 129, 129, 138, 138, 138, - 138, 138, 138, 56, 56, 56, 97, 97, 97, 97, - 141, 140, 132, 132, 132, 132, 132, 132, 131, 131, - 131, 139, 139, 139, 139, 85, 142, 142, 143, 143, - 143, 143, 143, 143, 143, 136, 145, 145, 144, 144, - 146, 146, 146, 146, 146, 134, 134, 134, 134, 148, - 149, 147, 147, 147, 147, 147, 147, 147, 150, 150, - 150, 150 + 33, 33, 33, 33, 33, 33, 33, 33, 33, 123, + 117, 117, 122, 122, 125, 126, 126, 127, 128, 128, + 128, 75, 75, 63, 63, 63, 118, 118, 118, 130, + 130, 119, 119, 121, 121, 121, 124, 124, 135, 135, + 135, 86, 137, 137, 137, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 49, 49, 133, 133, 133, 129, 129, 129, 138, + 138, 138, 138, 138, 138, 56, 56, 56, 97, 97, + 97, 97, 141, 140, 132, 132, 132, 132, 132, 132, + 131, 131, 131, 139, 139, 139, 139, 85, 142, 142, + 143, 143, 143, 143, 143, 143, 143, 136, 145, 145, + 144, 144, 146, 146, 146, 146, 146, 134, 134, 134, + 134, 148, 149, 147, 147, 147, 147, 147, 147, 147, + 150, 150, 150, 150 ); protected $ruleToLength = array( @@ -807,34 +819,34 @@ class Php7 extends \PhpParser\ParserAbstract 1, 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, 4, 6, 4, 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, 1, 3, 4, 9, 3, 1, 1, 3, 0, - 2, 4, 5, 4, 4, 4, 3, 1, 1, 1, - 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, - 1, 1, 1, 2, 1, 3, 1, 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, + 1, 0, 2, 2, 2, 4, 1, 3, 1, 2, + 2, 2, 3, 1, 1, 2, 3, 1, 1, 3, + 2, 0, 1, 4, 4, 9, 3, 1, 1, 3, + 0, 2, 4, 5, 4, 4, 4, 3, 1, 1, + 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, + 1, 1, 1, 1, 2, 1, 3, 1, 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, 3, 2, 2, 2, 2, 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, 8, 9, 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, - 1, 3, 1, 4, 4, 3, 3, 3, 1, 3, - 1, 1, 3, 1, 1, 4, 3, 1, 1, 2, - 1, 3, 4, 3, 0, 1, 1, 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 + 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, 8, 9, 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, 1, 3, 1, 4, 4, 3, 3, 3, + 1, 3, 1, 1, 3, 1, 1, 4, 3, 1, + 1, 2, 1, 3, 4, 3, 0, 1, 1, 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 initReduceCallbacks() { @@ -1617,195 +1629,196 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 253 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; }, 254 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 255 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 256 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 257 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 258 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 259 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 260 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 261 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 262 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 263 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 264 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 265 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 266 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 267 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 268 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 269 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } - }, - 270 => function ($stackPos) { $this->semValue = array(); }, + 255 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 256 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 257 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 258 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 259 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 260 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 261 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 262 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 263 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 264 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 265 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 266 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 267 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 268 => function ($stackPos) { + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 269 => function ($stackPos) { + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 270 => function ($stackPos) { + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + }, 271 => function ($stackPos) { + $this->semValue = array(); + }, + 272 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 272 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkProperty($this->semValue, $stackPos-(3-1)); - }, 273 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-1)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->checkClassConst($this->semValue, $stackPos-(4-1)); + $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; + $this->semValue = new Stmt\Property($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $attrs, $this->semStack[$stackPos-(4-2)]); $this->checkProperty($this->semValue, $stackPos-(4-1)); }, 274 => function ($stackPos) { + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-1)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->checkClassConst($this->semValue, $stackPos-(4-1)); + }, + 275 => function ($stackPos) { $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(9-4)], ['type' => $this->semStack[$stackPos-(9-1)], 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); $this->checkClassMethod($this->semValue, $stackPos-(9-1)); }, - 275 => function ($stackPos) { + 276 => function ($stackPos) { $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 276 => function ($stackPos) { + 277 => function ($stackPos) { $this->semValue = null; /* will be skipped */ }, - 277 => function ($stackPos) { - $this->semValue = array(); - }, 278 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = array(); }, 279 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 280 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 281 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 282 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 283 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 284 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 285 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 286 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 287 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 288 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 289 => function ($stackPos) { - $this->semValue = null; + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, 290 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 291 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 292 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 293 => function ($stackPos) { $this->semValue = 0; }, 294 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = 0; }, 295 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 296 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 297 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 298 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, 299 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, 300 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, 301 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = Stmt\Class_::MODIFIER_STATIC; }, 302 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, 303 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, 304 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 305 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 306 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 307 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 308 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 309 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 310 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 311 => function ($stackPos) { + 305 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, + 306 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 307 => function ($stackPos) { + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 308 => function ($stackPos) { + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 309 => function ($stackPos) { + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 310 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 311 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, 312 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 313 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); }, 314 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 315 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 316 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); @@ -1814,622 +1827,630 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 318 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 319 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 320 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 321 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 322 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 323 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 324 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 325 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 326 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 327 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 328 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 329 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 330 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 331 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 332 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 333 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 334 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 335 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 336 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 337 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 338 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 339 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 340 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 341 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 342 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 343 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 344 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 345 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 346 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 347 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 348 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 349 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 350 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 351 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 352 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 353 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 354 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 355 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 356 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 357 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 358 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 359 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 360 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 361 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 362 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 363 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 364 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 365 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 366 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 367 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 368 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 369 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 370 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 371 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 372 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 373 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 374 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 375 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 376 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 377 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 378 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 379 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 380 => function ($stackPos) { - $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 381 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 382 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; + $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); + $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, 383 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 384 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 385 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 386 => function ($stackPos) { + $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 387 => function ($stackPos) { + $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 388 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 387 => function ($stackPos) { + 389 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 388 => function ($stackPos) { + 390 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 389 => function ($stackPos) { + 391 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 390 => function ($stackPos) { + 392 => function ($stackPos) { $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 391 => function ($stackPos) { + 393 => function ($stackPos) { $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 392 => function ($stackPos) { + 394 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 393 => function ($stackPos) { + 395 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 394 => function ($stackPos) { + 396 => function ($stackPos) { $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 395 => function ($stackPos) { + 397 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 396 => function ($stackPos) { + 398 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 397 => function ($stackPos) { + 399 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes), $this->semStack[$stackPos-(7-2)]); $this->checkClass($this->semValue[0], -1); }, - 398 => function ($stackPos) { + 400 => function ($stackPos) { $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 399 => function ($stackPos) { + 401 => function ($stackPos) { list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 400 => function ($stackPos) { + 402 => function ($stackPos) { $this->semValue = array(); }, - 401 => function ($stackPos) { + 403 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 402 => function ($stackPos) { + 404 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 403 => function ($stackPos) { + 405 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 404 => function ($stackPos) { + 406 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 405 => function ($stackPos) { + 407 => function ($stackPos) { $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 406 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 407 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, 408 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 409 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 410 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 411 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 412 => function ($stackPos) { - $this->semValue = new Name\FullyQualified($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 413 => function ($stackPos) { - $this->semValue = new Name\Relative($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 414 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\FullyQualified($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 415 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\Relative($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 416 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 417 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 418 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 419 => function ($stackPos) { - $this->semValue = null; - }, - 420 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 421 => function ($stackPos) { - $this->semValue = array(); - }, - 422 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); - }, - 423 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 424 => function ($stackPos) { - $this->semValue = array(); - }, - 425 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 420 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 421 => function ($stackPos) { + $this->semValue = null; + }, + 422 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 423 => function ($stackPos) { + $this->semValue = array(); + }, + 424 => function ($stackPos) { + $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + }, + 425 => function ($stackPos) { + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, 426 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 427 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 428 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 429 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 430 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + }, + 431 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 430 => function ($stackPos) { + 432 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); }, - 431 => function ($stackPos) { + 433 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 432 => function ($stackPos) { + 434 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$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[$stackPos-(1-1)]), $attrs); }, - 433 => function ($stackPos) { + 435 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 434 => function ($stackPos) { + 436 => function ($stackPos) { $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 435 => function ($stackPos) { + 437 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 436 => function ($stackPos) { + 438 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 437 => function ($stackPos) { + 439 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 438 => function ($stackPos) { + 440 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 439 => function ($stackPos) { + 441 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 440 => function ($stackPos) { + 442 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 441 => function ($stackPos) { + 443 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 442 => function ($stackPos) { + 444 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 443 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 444 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, 445 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 446 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 447 => function ($stackPos) { + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + }, + 448 => function ($stackPos) { + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + }, + 449 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); }, - 448 => function ($stackPos) { + 450 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, - 449 => function ($stackPos) { + 451 => function ($stackPos) { $this->semValue = null; }, - 450 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 451 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, 452 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 453 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 454 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 455 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 456 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 457 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 458 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 459 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 460 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 461 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 462 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 463 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 464 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 465 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 466 => function ($stackPos) { - $this->semValue = substr($this->semStack[$stackPos-(1-1)], 1); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 467 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; - }, - 468 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 469 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; - }, - 470 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; - }, - 471 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 472 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 473 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 474 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 475 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 476 => function ($stackPos) { + 468 => function ($stackPos) { + $this->semValue = substr($this->semStack[$stackPos-(1-1)], 1); + }, + 469 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-3)]; + }, + 470 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 471 => function ($stackPos) { + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + }, + 472 => function ($stackPos) { + $var = $this->semStack[$stackPos-(1-1)]; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + }, + 473 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, + 474 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 475 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 476 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, 477 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 478 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 479 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 480 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 481 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 482 => function ($stackPos) { + 481 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 483 => function ($stackPos) { + 482 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, + 483 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, 484 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 485 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 486 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 487 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 488 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 489 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 490 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 491 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 492 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 493 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 494 => function ($stackPos) { - $this->semValue = null; - }, - 495 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); - }, - 496 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 497 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 498 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 499 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 500 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 501 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 502 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 503 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + 495 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 504 => function ($stackPos) { + 496 => function ($stackPos) { $this->semValue = null; }, - 505 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 497 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); }, - 506 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 498 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; }, - 507 => function ($stackPos) { + 499 => function ($stackPos) { + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + }, + 500 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 501 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, + 502 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 503 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 504 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 505 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 506 => function ($stackPos) { + $this->semValue = null; + }, + 507 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, 508 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 509 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 510 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 511 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 512 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 513 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 514 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 515 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 516 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 517 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 518 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 519 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 520 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 521 => function ($stackPos) { + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 522 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 523 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php index 861663fa..3fb3fb44 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php @@ -30,115 +30,116 @@ final class Tokens const T_SL_EQUAL = 278; const T_SR_EQUAL = 279; const T_POW_EQUAL = 280; - const T_COALESCE = 281; - const T_BOOLEAN_OR = 282; - const T_BOOLEAN_AND = 283; - const T_IS_EQUAL = 284; - const T_IS_NOT_EQUAL = 285; - const T_IS_IDENTICAL = 286; - const T_IS_NOT_IDENTICAL = 287; - const T_SPACESHIP = 288; - const T_IS_SMALLER_OR_EQUAL = 289; - const T_IS_GREATER_OR_EQUAL = 290; - const T_SL = 291; - const T_SR = 292; - const T_INSTANCEOF = 293; - const T_INC = 294; - const T_DEC = 295; - const T_INT_CAST = 296; - const T_DOUBLE_CAST = 297; - const T_STRING_CAST = 298; - const T_ARRAY_CAST = 299; - const T_OBJECT_CAST = 300; - const T_BOOL_CAST = 301; - const T_UNSET_CAST = 302; - const T_POW = 303; - const T_NEW = 304; - const T_CLONE = 305; - const T_EXIT = 306; - const T_IF = 307; - const T_ELSEIF = 308; - const T_ELSE = 309; - const T_ENDIF = 310; - const T_LNUMBER = 311; - const T_DNUMBER = 312; - const T_STRING = 313; - const T_STRING_VARNAME = 314; - const T_VARIABLE = 315; - const T_NUM_STRING = 316; - const T_INLINE_HTML = 317; - const T_CHARACTER = 318; - const T_BAD_CHARACTER = 319; - const T_ENCAPSED_AND_WHITESPACE = 320; - const T_CONSTANT_ENCAPSED_STRING = 321; - const T_ECHO = 322; - const T_DO = 323; - const T_WHILE = 324; - const T_ENDWHILE = 325; - const T_FOR = 326; - const T_ENDFOR = 327; - const T_FOREACH = 328; - const T_ENDFOREACH = 329; - const T_DECLARE = 330; - const T_ENDDECLARE = 331; - const T_AS = 332; - const T_SWITCH = 333; - const T_ENDSWITCH = 334; - const T_CASE = 335; - const T_DEFAULT = 336; - const T_BREAK = 337; - const T_CONTINUE = 338; - const T_GOTO = 339; - const T_FUNCTION = 340; - const T_CONST = 341; - const T_RETURN = 342; - const T_TRY = 343; - const T_CATCH = 344; - const T_FINALLY = 345; - const T_THROW = 346; - const T_USE = 347; - const T_INSTEADOF = 348; - const T_GLOBAL = 349; - const T_STATIC = 350; - const T_ABSTRACT = 351; - const T_FINAL = 352; - const T_PRIVATE = 353; - const T_PROTECTED = 354; - const T_PUBLIC = 355; - const T_VAR = 356; - const T_UNSET = 357; - const T_ISSET = 358; - const T_EMPTY = 359; - const T_HALT_COMPILER = 360; - const T_CLASS = 361; - const T_TRAIT = 362; - const T_INTERFACE = 363; - const T_EXTENDS = 364; - const T_IMPLEMENTS = 365; - const T_OBJECT_OPERATOR = 366; - const T_LIST = 367; - const T_ARRAY = 368; - const T_CALLABLE = 369; - const T_CLASS_C = 370; - const T_TRAIT_C = 371; - const T_METHOD_C = 372; - const T_FUNC_C = 373; - const T_LINE = 374; - const T_FILE = 375; - const T_COMMENT = 376; - const T_DOC_COMMENT = 377; - const T_OPEN_TAG = 378; - const T_OPEN_TAG_WITH_ECHO = 379; - const T_CLOSE_TAG = 380; - const T_WHITESPACE = 381; - const T_START_HEREDOC = 382; - const T_END_HEREDOC = 383; - const T_DOLLAR_OPEN_CURLY_BRACES = 384; - const T_CURLY_OPEN = 385; - const T_PAAMAYIM_NEKUDOTAYIM = 386; - const T_NAMESPACE = 387; - const T_NS_C = 388; - const T_DIR = 389; - const T_NS_SEPARATOR = 390; - const T_ELLIPSIS = 391; + const T_COALESCE_EQUAL = 281; + const T_COALESCE = 282; + const T_BOOLEAN_OR = 283; + const T_BOOLEAN_AND = 284; + const T_IS_EQUAL = 285; + const T_IS_NOT_EQUAL = 286; + const T_IS_IDENTICAL = 287; + const T_IS_NOT_IDENTICAL = 288; + const T_SPACESHIP = 289; + const T_IS_SMALLER_OR_EQUAL = 290; + const T_IS_GREATER_OR_EQUAL = 291; + const T_SL = 292; + const T_SR = 293; + const T_INSTANCEOF = 294; + const T_INC = 295; + const T_DEC = 296; + const T_INT_CAST = 297; + const T_DOUBLE_CAST = 298; + const T_STRING_CAST = 299; + const T_ARRAY_CAST = 300; + const T_OBJECT_CAST = 301; + const T_BOOL_CAST = 302; + const T_UNSET_CAST = 303; + const T_POW = 304; + const T_NEW = 305; + const T_CLONE = 306; + const T_EXIT = 307; + const T_IF = 308; + const T_ELSEIF = 309; + const T_ELSE = 310; + const T_ENDIF = 311; + const T_LNUMBER = 312; + const T_DNUMBER = 313; + const T_STRING = 314; + const T_STRING_VARNAME = 315; + const T_VARIABLE = 316; + const T_NUM_STRING = 317; + const T_INLINE_HTML = 318; + const T_CHARACTER = 319; + const T_BAD_CHARACTER = 320; + const T_ENCAPSED_AND_WHITESPACE = 321; + const T_CONSTANT_ENCAPSED_STRING = 322; + const T_ECHO = 323; + const T_DO = 324; + const T_WHILE = 325; + const T_ENDWHILE = 326; + const T_FOR = 327; + const T_ENDFOR = 328; + const T_FOREACH = 329; + const T_ENDFOREACH = 330; + const T_DECLARE = 331; + const T_ENDDECLARE = 332; + const T_AS = 333; + const T_SWITCH = 334; + const T_ENDSWITCH = 335; + const T_CASE = 336; + const T_DEFAULT = 337; + const T_BREAK = 338; + const T_CONTINUE = 339; + const T_GOTO = 340; + const T_FUNCTION = 341; + const T_CONST = 342; + const T_RETURN = 343; + const T_TRY = 344; + const T_CATCH = 345; + const T_FINALLY = 346; + const T_THROW = 347; + const T_USE = 348; + const T_INSTEADOF = 349; + const T_GLOBAL = 350; + const T_STATIC = 351; + const T_ABSTRACT = 352; + const T_FINAL = 353; + const T_PRIVATE = 354; + const T_PROTECTED = 355; + const T_PUBLIC = 356; + const T_VAR = 357; + const T_UNSET = 358; + const T_ISSET = 359; + const T_EMPTY = 360; + const T_HALT_COMPILER = 361; + const T_CLASS = 362; + const T_TRAIT = 363; + const T_INTERFACE = 364; + const T_EXTENDS = 365; + const T_IMPLEMENTS = 366; + const T_OBJECT_OPERATOR = 367; + const T_LIST = 368; + const T_ARRAY = 369; + const T_CALLABLE = 370; + const T_CLASS_C = 371; + const T_TRAIT_C = 372; + const T_METHOD_C = 373; + const T_FUNC_C = 374; + const T_LINE = 375; + const T_FILE = 376; + const T_COMMENT = 377; + const T_DOC_COMMENT = 378; + const T_OPEN_TAG = 379; + const T_OPEN_TAG_WITH_ECHO = 380; + const T_CLOSE_TAG = 381; + const T_WHITESPACE = 382; + const T_START_HEREDOC = 383; + const T_END_HEREDOC = 384; + const T_DOLLAR_OPEN_CURLY_BRACES = 385; + const T_CURLY_OPEN = 386; + const T_PAAMAYIM_NEKUDOTAYIM = 387; + const T_NAMESPACE = 388; + const T_NS_C = 389; + const T_DIR = 390; + const T_NS_SEPARATOR = 391; + const T_ELLIPSIS = 392; } diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php index 8b7bba83..4d95a6f6 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php @@ -7,6 +7,7 @@ namespace PhpParser; * turn is based on work by Masato Bito. */ use PhpParser\Node\Expr; +use PhpParser\Node\Expr\Cast\Double; use PhpParser\Node\Name; use PhpParser\Node\Param; use PhpParser\Node\Scalar\Encapsed; @@ -680,6 +681,20 @@ abstract class ParserAbstract implements Parser return $this->startAttributeStack[$pos] + $this->endAttributeStack[$pos]; } + protected function getFloatCastKind(string $cast): int + { + $cast = strtolower($cast); + if (strpos($cast, 'float') !== false) { + return Double::KIND_FLOAT; + } + + if (strpos($cast, 'real') !== false) { + return Double::KIND_REAL; + } + + return Double::KIND_DOUBLE; + } + protected function parseLNumber($str, $attributes, $allowInvalidOctal = false) { try { return LNumber::fromString($str, $attributes, $allowInvalidOctal); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php index 96963307..8d5930b4 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php @@ -260,6 +260,10 @@ class Standard extends PrettyPrinterAbstract return $this->pInfixOp(AssignOp\Pow::class, $node->var, ' **= ', $node->expr); } + protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node) { + return $this->pInfixOp(AssignOp\Coalesce::class, $node->var, ' ??= ', $node->expr); + } + // Binary expressions protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node) { @@ -435,7 +439,15 @@ class Standard extends PrettyPrinterAbstract } protected function pExpr_Cast_Double(Cast\Double $node) { - return $this->pPrefixOp(Cast\Double::class, '(double) ', $node->expr); + $kind = $node->getAttribute('kind', Cast\Double::KIND_DOUBLE); + if ($kind === Cast\Double::KIND_DOUBLE) { + $cast = '(double)'; + } elseif ($kind === Cast\Double::KIND_FLOAT) { + $cast = '(float)'; + } elseif ($kind === Cast\Double::KIND_REAL) { + $cast = '(real)'; + } + return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr); } protected function pExpr_Cast_String(Cast\String_ $node) { @@ -680,7 +692,9 @@ class Standard extends PrettyPrinterAbstract } protected function pStmt_Property(Stmt\Property $node) { - return (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) . $this->pCommaSeparated($node->props) . ';'; + return (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) + . ($node->type ? $this->p($node->type) . ' ' : '') + . $this->pCommaSeparated($node->props) . ';'; } protected function pStmt_PropertyProperty(Stmt\PropertyProperty $node) { diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php index 2339c75a..f6789a15 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php @@ -9,7 +9,6 @@ use PhpParser\Node\Expr; use PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\Cast; -use PhpParser\Node\Name; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; @@ -83,6 +82,7 @@ abstract class PrettyPrinterAbstract AssignOp\ShiftLeft::class => [160, 1], AssignOp\ShiftRight::class => [160, 1], AssignOp\Pow::class => [160, 1], + AssignOp\Coalesce::class => [160, 1], Expr\YieldFrom::class => [165, 1], Expr\Print_::class => [168, 1], BinaryOp\LogicalAnd::class => [170, -1], @@ -617,12 +617,14 @@ abstract class PrettyPrinterAbstract return $this->pFallback($fallbackNode); } - list($findToken, $extraLeft, $extraRight) = $this->insertionMap[$key]; + list($findToken, $beforeToken, $extraLeft, $extraRight) = $this->insertionMap[$key]; if (null !== $findToken) { - $subStartPos = $this->origTokens->findRight($pos, $findToken) + 1; + $subStartPos = $this->origTokens->findRight($pos, $findToken) + + (int) !$beforeToken; } else { $subStartPos = $pos; } + if (null === $extraLeft && null !== $extraRight) { // If inserting on the right only, skipping whitespace looks better $subStartPos = $this->origTokens->skipRightWhitespace($subStartPos); @@ -1155,7 +1157,7 @@ abstract class PrettyPrinterAbstract Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, - AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, + AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class ]; foreach ($assignOps as $assignOp) { $this->fixupMap[$assignOp] = [ @@ -1209,6 +1211,7 @@ abstract class PrettyPrinterAbstract 'Stmt_Function->returnType' => $stripColon, 'Stmt_If->else' => $stripLeft, 'Stmt_Namespace->name' => $stripLeft, + 'Stmt_Property->type' => $stripRight, 'Stmt_PropertyProperty->default' => $stripEquals, 'Stmt_Return->expr' => $stripBoth, 'Stmt_StaticVar->default' => $stripEquals, @@ -1226,28 +1229,29 @@ abstract class PrettyPrinterAbstract // TODO: "yield" where both key and value are inserted doesn't work $this->insertionMap = [ - 'Expr_ArrayDimFetch->dim' => ['[', null, null], - 'Expr_ArrayItem->key' => [null, null, ' => '], - 'Expr_Closure->returnType' => [')', ' : ', null], - 'Expr_Ternary->if' => ['?', ' ', ' '], - 'Expr_Yield->key' => [\T_YIELD, null, ' => '], - 'Expr_Yield->value' => [\T_YIELD, ' ', null], - 'Param->type' => [null, null, ' '], - 'Param->default' => [null, ' = ', null], - 'Stmt_Break->num' => [\T_BREAK, ' ', null], - 'Stmt_ClassMethod->returnType' => [')', ' : ', null], - 'Stmt_Class->extends' => [null, ' extends ', null], + 'Expr_ArrayDimFetch->dim' => ['[', false, null, null], + 'Expr_ArrayItem->key' => [null, false, null, ' => '], + 'Expr_Closure->returnType' => [')', false, ' : ', null], + 'Expr_Ternary->if' => ['?', false, ' ', ' '], + 'Expr_Yield->key' => [\T_YIELD, false, null, ' => '], + 'Expr_Yield->value' => [\T_YIELD, false, ' ', null], + 'Param->type' => [null, false, null, ' '], + 'Param->default' => [null, false, ' = ', null], + 'Stmt_Break->num' => [\T_BREAK, false, ' ', null], + 'Stmt_ClassMethod->returnType' => [')', false, ' : ', null], + 'Stmt_Class->extends' => [null, false, ' extends ', null], 'Expr_PrintableNewAnonClass->extends' => [null, ' extends ', null], - 'Stmt_Continue->num' => [\T_CONTINUE, ' ', null], - 'Stmt_Foreach->keyVar' => [\T_AS, null, ' => '], - 'Stmt_Function->returnType' => [')', ' : ', null], - 'Stmt_If->else' => [null, ' ', null], - 'Stmt_Namespace->name' => [\T_NAMESPACE, ' ', null], - 'Stmt_PropertyProperty->default' => [null, ' = ', null], - 'Stmt_Return->expr' => [\T_RETURN, ' ', null], - 'Stmt_StaticVar->default' => [null, ' = ', null], - //'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, ' ', null], // TODO - 'Stmt_TryCatch->finally' => [null, ' ', null], + 'Stmt_Continue->num' => [\T_CONTINUE, false, ' ', null], + 'Stmt_Foreach->keyVar' => [\T_AS, false, null, ' => '], + 'Stmt_Function->returnType' => [')', false, ' : ', null], + 'Stmt_If->else' => [null, false, ' ', null], + 'Stmt_Namespace->name' => [\T_NAMESPACE, false, ' ', null], + 'Stmt_Property->type' => [\T_VARIABLE, true, null, ' '], + 'Stmt_PropertyProperty->default' => [null, false, ' = ', null], + 'Stmt_Return->expr' => [\T_RETURN, false, ' ', null], + 'Stmt_StaticVar->default' => [null, false, ' = ', null], + //'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, false, ' ', null], // TODO + 'Stmt_TryCatch->finally' => [null, false, ' ', null], // 'Expr_Exit->expr': Complicated due to optional () // 'Stmt_Case->cond': Conversion from default to case diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/phpunit.xml.dist b/src/cadolesuser-1.0/vendor/nikic/php-parser/phpunit.xml.dist index b375637b..5271264c 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/phpunit.xml.dist +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/phpunit.xml.dist @@ -1,6 +1,8 @@ - diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/ClassTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/ClassTest.php index 27d911b0..2cfa7872 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/ClassTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/ClassTest.php @@ -6,9 +6,8 @@ use PhpParser\Comment; use PhpParser\Node; use PhpParser\Node\Name; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class ClassTest extends TestCase +class ClassTest extends \PHPUnit\Framework\TestCase { protected function createClassBuilder($class) { return new Class_($class); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/FunctionTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/FunctionTest.php index b7413e1f..c17045b8 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/FunctionTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/FunctionTest.php @@ -8,9 +8,8 @@ use PhpParser\Node\Expr\Print_; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class FunctionTest extends TestCase +class FunctionTest extends \PHPUnit\Framework\TestCase { public function createFunctionBuilder($name) { return new Function_($name); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/InterfaceTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/InterfaceTest.php index 3ea3533c..7f7f56a2 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/InterfaceTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/InterfaceTest.php @@ -6,9 +6,8 @@ use PhpParser\Comment; use PhpParser\Node; use PhpParser\Node\Scalar\DNumber; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class InterfaceTest extends TestCase +class InterfaceTest extends \PHPUnit\Framework\TestCase { /** @var Interface_ */ protected $builder; diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php index 14196790..529f0354 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php @@ -8,9 +8,8 @@ use PhpParser\Node\Expr\Print_; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class MethodTest extends TestCase +class MethodTest extends \PHPUnit\Framework\TestCase { public function createMethodBuilder($name) { return new Method($name); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/NamespaceTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/NamespaceTest.php index b8dce39c..689001bc 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/NamespaceTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/NamespaceTest.php @@ -5,9 +5,8 @@ namespace PhpParser\Builder; use PhpParser\Comment\Doc; use PhpParser\Node; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class NamespaceTest extends TestCase +class NamespaceTest extends \PHPUnit\Framework\TestCase { protected function createNamespaceBuilder($fqn) { return new Namespace_($fqn); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/ParamTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/ParamTest.php index 9ed283b7..c9cbfcac 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/ParamTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/ParamTest.php @@ -5,9 +5,8 @@ namespace PhpParser\Builder; use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Scalar; -use PHPUnit\Framework\TestCase; -class ParamTest extends TestCase +class ParamTest extends \PHPUnit\Framework\TestCase { public function createParamBuilder($name) { return new Param($name); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/PropertyTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/PropertyTest.php index d7a5a70e..a15cd43c 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/PropertyTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/PropertyTest.php @@ -7,9 +7,8 @@ use PhpParser\Node\Expr; use PhpParser\Node\Name; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class PropertyTest extends TestCase +class PropertyTest extends \PHPUnit\Framework\TestCase { public function createPropertyBuilder($name) { return new Property($name); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php index 31535b2c..4d99ef88 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php @@ -5,9 +5,8 @@ namespace PhpParser\Builder; use PhpParser\Comment; use PhpParser\Node\Name; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class TraitTest extends TestCase +class TraitTest extends \PHPUnit\Framework\TestCase { protected function createTraitBuilder($class) { return new Trait_($class); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseAdaptationTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseAdaptationTest.php index 18f00b9d..4961ccfa 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseAdaptationTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseAdaptationTest.php @@ -2,14 +2,11 @@ namespace PhpParser\Builder; -use PhpParser\Comment; -use PhpParser\Node; use PhpParser\Node\Name; use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Class_; -use PHPUnit\Framework\TestCase; -class TraitUseAdaptationTest extends TestCase +class TraitUseAdaptationTest extends \PHPUnit\Framework\TestCase { protected function createTraitUseAdaptationBuilder($trait, $method) { return new TraitUseAdaptation($trait, $method); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseTest.php index ec4e9400..8d20dfbd 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseTest.php @@ -2,13 +2,10 @@ namespace PhpParser\Builder; -use PhpParser\Comment; -use PhpParser\Node; use PhpParser\Node\Name; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class TraitUseTest extends TestCase +class TraitUseTest extends \PHPUnit\Framework\TestCase { protected function createTraitUseBuilder(...$traits) { return new TraitUse(...$traits); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php index 54ede584..f17da59b 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php @@ -1,11 +1,12 @@ hasColumnInfo()) { return $e->getMessageWithColumnInfo($code); - } else { - return $e->getMessage(); } + + return $e->getMessage(); } private function checkAttributes($stmts) { diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/CodeTestAbstract.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/CodeTestAbstract.php index 5eaf9d1b..f5f40875 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/CodeTestAbstract.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/CodeTestAbstract.php @@ -2,11 +2,7 @@ namespace PhpParser; -use PHPUnit\Framework\TestCase; - -require_once __DIR__ . '/CodeTestParser.php'; - -abstract class CodeTestAbstract extends TestCase +abstract class CodeTestAbstract extends \PHPUnit\Framework\TestCase { protected function getTests($directory, $fileExtension, $chunksPerTest = 2) { $parser = new CodeTestParser; diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/CommentTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/CommentTest.php index 7b6c2aab..409841aa 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/CommentTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/CommentTest.php @@ -2,9 +2,7 @@ namespace PhpParser; -use PHPUnit\Framework\TestCase; - -class CommentTest extends TestCase +class CommentTest extends \PHPUnit\Framework\TestCase { public function testGetSet() { $comment = new Comment('/* Some comment */', 1, 10, 2); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ConstExprEvaluatorTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ConstExprEvaluatorTest.php index 7cd56b5b..02d992e5 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ConstExprEvaluatorTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ConstExprEvaluatorTest.php @@ -4,9 +4,8 @@ namespace PhpParser; use PhpParser\Node\Expr; use PhpParser\Node\Scalar; -use PHPUnit\Framework\TestCase; -class ConstExprEvaluatorTest extends TestCase +class ConstExprEvaluatorTest extends \PHPUnit\Framework\TestCase { /** @dataProvider provideTestEvaluate */ public function testEvaluate($exprString, $expected) { diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/CollectingTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/CollectingTest.php index 842f131d..a20101a8 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/CollectingTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/CollectingTest.php @@ -3,9 +3,8 @@ namespace PhpParser\ErrorHandler; use PhpParser\Error; -use PHPUnit\Framework\TestCase; -class CollectingTest extends TestCase +class CollectingTest extends \PHPUnit\Framework\TestCase { public function testHandleError() { $errorHandler = new Collecting(); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php index 8735be8c..be641ec7 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php @@ -3,9 +3,8 @@ namespace PhpParser\ErrorHandler; use PhpParser\Error; -use PHPUnit\Framework\TestCase; -class ThrowingTest extends TestCase +class ThrowingTest extends \PHPUnit\Framework\TestCase { public function testHandleError() { $this->expectException(Error::class); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ErrorTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ErrorTest.php index 07a3288f..cc2d3fa5 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ErrorTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ErrorTest.php @@ -2,9 +2,7 @@ namespace PhpParser; -use PHPUnit\Framework\TestCase; - -class ErrorTest extends TestCase +class ErrorTest extends \PHPUnit\Framework\TestCase { public function testConstruct() { $attributes = [ diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Internal/DifferTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Internal/DifferTest.php index 0cf878b6..6fac3fd3 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Internal/DifferTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Internal/DifferTest.php @@ -2,9 +2,7 @@ namespace PhpParser\Internal; -use PHPUnit\Framework\TestCase; - -class DifferTest extends TestCase +class DifferTest extends \PHPUnit\Framework\TestCase { private function formatDiffString(array $diff) { $diffStr = ''; diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/JsonDecoderTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/JsonDecoderTest.php index 7ef60787..d5cb0597 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/JsonDecoderTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/JsonDecoderTest.php @@ -2,9 +2,7 @@ namespace PhpParser; -use PHPUnit\Framework\TestCase; - -class JsonDecoderTest extends TestCase +class JsonDecoderTest extends \PHPUnit\Framework\TestCase { public function testRoundTrip() { $code = <<<'PHP' diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Lexer/EmulativeTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Lexer/EmulativeTest.php index 533547ae..cc00caac 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Lexer/EmulativeTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Lexer/EmulativeTest.php @@ -6,8 +6,6 @@ use PhpParser\ErrorHandler; use PhpParser\LexerTest; use PhpParser\Parser\Tokens; -require_once __DIR__ . '/../LexerTest.php'; - class EmulativeTest extends LexerTest { protected function getLexer(array $options = []) { @@ -110,6 +108,10 @@ class EmulativeTest extends LexerTest public function provideTestLexNewFeatures() { return [ + // PHP 7.4 + ['??=', [ + [Tokens::T_COALESCE_EQUAL, '??='], + ]], ['yield from', [ [Tokens::T_YIELD_FROM, 'yield from'], ]], diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/LexerTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/LexerTest.php index 99ed68a3..f24c64d5 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/LexerTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/LexerTest.php @@ -3,9 +3,8 @@ namespace PhpParser; use PhpParser\Parser\Tokens; -use PHPUnit\Framework\TestCase; -class LexerTest extends TestCase +class LexerTest extends \PHPUnit\Framework\TestCase { /* To allow overwriting in parent class */ protected function getLexer(array $options = []) { diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NameContextTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NameContextTest.php index 41c3460d..ee8458b6 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NameContextTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NameContextTest.php @@ -4,9 +4,8 @@ namespace PhpParser; use PhpParser\Node\Name; use PhpParser\Node\Stmt\Use_; -use PHPUnit\Framework\TestCase; -class NameContextTest extends TestCase +class NameContextTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideTestGetPossibleNames diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/IdentifierTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/IdentifierTest.php index fa2e72a8..2bd58fc8 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/IdentifierTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/IdentifierTest.php @@ -2,9 +2,7 @@ namespace PhpParser\Node; -use PHPUnit\Framework\TestCase; - -class IdentifierTest extends TestCase +class IdentifierTest extends \PHPUnit\Framework\TestCase { public function testToString() { $identifier = new Identifier('Foo'); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/NameTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/NameTest.php index bf7d7967..5e69ebba 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/NameTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/NameTest.php @@ -2,9 +2,7 @@ namespace PhpParser\Node; -use PHPUnit\Framework\TestCase; - -class NameTest extends TestCase +class NameTest extends \PHPUnit\Framework\TestCase { public function testConstruct() { $name = new Name(['foo', 'bar']); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/MagicConstTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/MagicConstTest.php index 42b94874..c8ae433b 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/MagicConstTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/MagicConstTest.php @@ -2,9 +2,7 @@ namespace PhpParser\Node\Scalar; -use PHPUnit\Framework\TestCase; - -class MagicConstTest extends TestCase +class MagicConstTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideTestGetName diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/StringTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/StringTest.php index d7629f35..814a7758 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/StringTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/StringTest.php @@ -2,9 +2,7 @@ namespace PhpParser\Node\Scalar; -use PHPUnit\Framework\TestCase; - -class StringTest extends TestCase +class StringTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideTestParseEscapeSequences diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassConstTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassConstTest.php index a5b6ce46..9a1b4697 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassConstTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassConstTest.php @@ -2,9 +2,7 @@ namespace PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; - -class ClassConstTest extends TestCase +class ClassConstTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideModifiers diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassMethodTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassMethodTest.php index 4000495e..51c5f1c2 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassMethodTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassMethodTest.php @@ -5,9 +5,8 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Name; use PhpParser\Node\Param; -use PHPUnit\Framework\TestCase; -class ClassMethodTest extends TestCase +class ClassMethodTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideModifiers diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassTest.php index 5d2b5dc0..9b7c7de1 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassTest.php @@ -2,9 +2,7 @@ namespace PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; - -class ClassTest extends TestCase +class ClassTest extends \PHPUnit\Framework\TestCase { public function testIsAbstract() { $class = new Class_('Foo', ['type' => Class_::MODIFIER_ABSTRACT]); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php index e3e90e47..da6e8eb6 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php @@ -3,9 +3,8 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -use PHPUnit\Framework\TestCase; -class InterfaceTest extends TestCase +class InterfaceTest extends \PHPUnit\Framework\TestCase { public function testGetMethods() { $methods = [ diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php index 39387f96..e5d69fba 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php @@ -2,9 +2,7 @@ namespace PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; - -class PropertyTest extends TestCase +class PropertyTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideModifiers diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeAbstractTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeAbstractTest.php index c8c785db..071b8f2a 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeAbstractTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeAbstractTest.php @@ -2,8 +2,6 @@ namespace PhpParser; -use PHPUnit\Framework\TestCase; - class DummyNode extends NodeAbstract { public $subNode1; @@ -25,7 +23,7 @@ class DummyNode extends NodeAbstract } } -class NodeAbstractTest extends TestCase +class NodeAbstractTest extends \PHPUnit\Framework\TestCase { public function provideNodes() { $attributes = [ diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeDumperTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeDumperTest.php index 9f887a7d..cfba269e 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeDumperTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeDumperTest.php @@ -2,9 +2,7 @@ namespace PhpParser; -use PHPUnit\Framework\TestCase; - -class NodeDumperTest extends TestCase +class NodeDumperTest extends \PHPUnit\Framework\TestCase { private function canonicalize($string) { return str_replace("\r\n", "\n", $string); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeFinderTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeFinderTest.php index daf42729..909738a7 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeFinderTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeFinderTest.php @@ -3,9 +3,8 @@ namespace PhpParser; use PhpParser\Node\Expr; -use PHPUnit\Framework\TestCase; -class NodeFinderTest extends TestCase +class NodeFinderTest extends \PHPUnit\Framework\TestCase { private function getStmtsAndVars() { $assign = new Expr\Assign(new Expr\Variable('a'), new Expr\BinaryOp\Concat( diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeTraverserTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeTraverserTest.php index 4818457a..2daa9cea 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeTraverserTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeTraverserTest.php @@ -4,10 +4,8 @@ namespace PhpParser; use PhpParser\Node\Expr; use PhpParser\Node\Scalar\String_; -use PhpParser\NodeVisitor; -use PHPUnit\Framework\TestCase; -class NodeTraverserTest extends TestCase +class NodeTraverserTest extends \PHPUnit\Framework\TestCase { public function testNonModifying() { $str1Node = new String_('Foo'); @@ -43,32 +41,32 @@ class NodeTraverserTest extends TestCase // replace empty statements with string1 node $visitor1->expects($this->at(0))->method('beforeTraverse')->with([]) - ->will($this->returnValue([$str1Node])); + ->willReturn([$str1Node]); $visitor2->expects($this->at(0))->method('beforeTraverse')->with([$str1Node]); // replace string1 node with print node $visitor1->expects($this->at(1))->method('enterNode')->with($str1Node) - ->will($this->returnValue($printNode)); + ->willReturn($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)); + ->willReturn($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)); + ->willReturn($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)); + ->willReturn($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([$str1Node]) - ->will($this->returnValue([])); + ->willReturn([]); $visitor2->expects($this->at(5))->method('afterTraverse')->with([]); $traverser = new NodeTraverser; @@ -87,7 +85,7 @@ class NodeTraverserTest extends TestCase // remove the string1 node, leave the string2 node $visitor->expects($this->at(2))->method('leaveNode')->with($str1Node) - ->will($this->returnValue(NodeTraverser::REMOVE_NODE)); + ->willReturn(NodeTraverser::REMOVE_NODE); $traverser = new NodeTraverser; $traverser->addVisitor($visitor); @@ -106,7 +104,7 @@ class NodeTraverserTest extends TestCase // replace strMiddle with strR1 and strR2 by merge $visitor->expects($this->at(4))->method('leaveNode')->with($strMiddle) - ->will($this->returnValue([$strR1, $strR2])); + ->willReturn([$strR1, $strR2]); $traverser = new NodeTraverser; $traverser->addVisitor($visitor); @@ -139,7 +137,7 @@ class NodeTraverserTest extends TestCase $visitor2 = $this->getMockBuilder(NodeVisitor::class)->getMock(); $visitor1->expects($this->at(1))->method('enterNode')->with($printNode) - ->will($this->returnValue(NodeTraverser::DONT_TRAVERSE_CHILDREN)); + ->willReturn(NodeTraverser::DONT_TRAVERSE_CHILDREN); $visitor2->expects($this->at(1))->method('enterNode')->with($printNode); $visitor1->expects($this->at(2))->method('leaveNode')->with($printNode); @@ -150,7 +148,7 @@ class NodeTraverserTest extends TestCase $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)); + ->willReturn(NodeTraverser::DONT_TRAVERSE_CHILDREN); $visitor1->expects($this->at(5))->method('leaveNode')->with($mulNode); $visitor2->expects($this->at(5))->method('leaveNode')->with($mulNode); @@ -179,14 +177,14 @@ class NodeTraverserTest extends TestCase $visitor2 = $this->getMockBuilder(NodeVisitor::class)->getMock(); $visitor1->expects($this->at(1))->method('enterNode')->with($printNode) - ->will($this->returnValue(NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN)); + ->willReturn(NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN); $visitor1->expects($this->at(2))->method('leaveNode')->with($printNode); $visitor1->expects($this->at(3))->method('enterNode')->with($negNode); $visitor2->expects($this->at(1))->method('enterNode')->with($negNode); $visitor1->expects($this->at(4))->method('enterNode')->with($mulNode) - ->will($this->returnValue(NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN)); + ->willReturn(NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN); $visitor1->expects($this->at(5))->method('leaveNode')->with($mulNode)->willReturn($divNode); $visitor1->expects($this->at(6))->method('leaveNode')->with($negNode); @@ -212,7 +210,7 @@ class NodeTraverserTest extends TestCase // From enterNode() with array parent $visitor = $this->getMockBuilder(NodeVisitor::class)->getMock(); $visitor->expects($this->at(1))->method('enterNode')->with($mulNode) - ->will($this->returnValue(NodeTraverser::STOP_TRAVERSAL)); + ->willReturn(NodeTraverser::STOP_TRAVERSAL); $visitor->expects($this->at(2))->method('afterTraverse'); $traverser = new NodeTraverser; $traverser->addVisitor($visitor); @@ -221,7 +219,7 @@ class NodeTraverserTest extends TestCase // From enterNode with Node parent $visitor = $this->getMockBuilder(NodeVisitor::class)->getMock(); $visitor->expects($this->at(2))->method('enterNode')->with($varNode1) - ->will($this->returnValue(NodeTraverser::STOP_TRAVERSAL)); + ->willReturn(NodeTraverser::STOP_TRAVERSAL); $visitor->expects($this->at(3))->method('afterTraverse'); $traverser = new NodeTraverser; $traverser->addVisitor($visitor); @@ -230,7 +228,7 @@ class NodeTraverserTest extends TestCase // From leaveNode with Node parent $visitor = $this->getMockBuilder(NodeVisitor::class)->getMock(); $visitor->expects($this->at(3))->method('leaveNode')->with($varNode1) - ->will($this->returnValue(NodeTraverser::STOP_TRAVERSAL)); + ->willReturn(NodeTraverser::STOP_TRAVERSAL); $visitor->expects($this->at(4))->method('afterTraverse'); $traverser = new NodeTraverser; $traverser->addVisitor($visitor); @@ -239,7 +237,7 @@ class NodeTraverserTest extends TestCase // From leaveNode with array parent $visitor = $this->getMockBuilder(NodeVisitor::class)->getMock(); $visitor->expects($this->at(6))->method('leaveNode')->with($mulNode) - ->will($this->returnValue(NodeTraverser::STOP_TRAVERSAL)); + ->willReturn(NodeTraverser::STOP_TRAVERSAL); $visitor->expects($this->at(7))->method('afterTraverse'); $traverser = new NodeTraverser; $traverser->addVisitor($visitor); @@ -248,9 +246,9 @@ class NodeTraverserTest extends TestCase // Check that pending array modifications are still carried out $visitor = $this->getMockBuilder(NodeVisitor::class)->getMock(); $visitor->expects($this->at(6))->method('leaveNode')->with($mulNode) - ->will($this->returnValue(NodeTraverser::REMOVE_NODE)); + ->willReturn(NodeTraverser::REMOVE_NODE); $visitor->expects($this->at(7))->method('enterNode')->with($printNode) - ->will($this->returnValue(NodeTraverser::STOP_TRAVERSAL)); + ->willReturn(NodeTraverser::STOP_TRAVERSAL); $visitor->expects($this->at(8))->method('afterTraverse'); $traverser = new NodeTraverser; $traverser->addVisitor($visitor); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FindingVisitorTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FindingVisitorTest.php index 2e87600b..27cb6dd4 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FindingVisitorTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FindingVisitorTest.php @@ -5,9 +5,8 @@ namespace PhpParser\NodeVisitor; use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\NodeTraverser; -use PHPUnit\Framework\TestCase; -class FindingVisitorTest extends TestCase +class FindingVisitorTest extends \PHPUnit\Framework\TestCase { public function testFindVariables() { $traverser = new NodeTraverser(); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php index 78bc1c7a..9ae8932f 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php @@ -5,9 +5,8 @@ namespace PhpParser\NodeVisitor; use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\NodeTraverser; -use PHPUnit\Framework\TestCase; -class FirstFindingVisitorTest extends TestCase +class FirstFindingVisitorTest extends \PHPUnit\Framework\TestCase { public function testFindFirstVariable() { $traverser = new NodeTraverser(); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php index 1ffd15aa..6bfbc550 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -7,16 +7,15 @@ use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Name; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class NameResolverTest extends TestCase +class NameResolverTest extends \PHPUnit\Framework\TestCase { private function canonicalize($string) { return str_replace("\r\n", "\n", $string); } /** - * @covers PhpParser\NodeVisitor\NameResolver + * @covers \PhpParser\NodeVisitor\NameResolver */ public function testResolveNames() { $code = <<<'EOC' @@ -95,6 +94,13 @@ namespace Baz { C; E; K; + + class ClassWithTypeProperties + { + public float $php = 7.4; + public ?Foo $person; + protected static ?bool $probability; + } } EOC; $expectedCode = <<<'EOC' @@ -163,6 +169,12 @@ namespace Baz { \Y\T\B\C; \Y\T\D\E; \Z\T\K; + class ClassWithTypeProperties + { + public float $php = 7.4; + public ?\Baz\Foo $person; + protected static ?bool $probability; + } } EOC; @@ -181,7 +193,7 @@ EOC; } /** - * @covers PhpParser\NodeVisitor\NameResolver + * @covers \PhpParser\NodeVisitor\NameResolver */ public function testResolveLocations() { $code = <<<'EOC' diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Parser/MultipleTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Parser/MultipleTest.php index f7decb76..f89e7bf6 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Parser/MultipleTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Parser/MultipleTest.php @@ -9,8 +9,6 @@ use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Stmt; use PhpParser\ParserTest; -require_once __DIR__ . '/../ParserTest.php'; - class MultipleTest extends ParserTest { // This provider is for the generic parser tests, just pick an arbitrary order here @@ -84,11 +82,11 @@ class MultipleTest extends ParserTest $parserA = $this->getMockBuilder(\PhpParser\Parser::class)->getMock(); $parserA->expects($this->at(0)) - ->method('parse')->will($this->throwException(new Error('FAIL A'))); + ->method('parse')->willThrowException(new Error('FAIL A')); $parserB = $this->getMockBuilder(\PhpParser\Parser::class)->getMock(); $parserB->expects($this->at(0)) - ->method('parse')->will($this->throwException(new Error('FAIL B'))); + ->method('parse')->willThrowException(new Error('FAIL B')); $parser = new Multiple([$parserA, $parserB]); $parser->parse('dummy'); diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Parser/Php5Test.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Parser/Php5Test.php index bb36a251..4386b512 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Parser/Php5Test.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Parser/Php5Test.php @@ -5,8 +5,6 @@ namespace PhpParser\Parser; use PhpParser\Lexer; use PhpParser\ParserTest; -require_once __DIR__ . '/../ParserTest.php'; - class Php5Test extends ParserTest { protected function getParser(Lexer $lexer) { diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Parser/Php7Test.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Parser/Php7Test.php index e2e4b3a2..22a4c519 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Parser/Php7Test.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/Parser/Php7Test.php @@ -5,8 +5,6 @@ namespace PhpParser\Parser; use PhpParser\Lexer; use PhpParser\ParserTest; -require_once __DIR__ . '/../ParserTest.php'; - class Php7Test extends ParserTest { protected function getParser(Lexer $lexer) { diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ParserFactoryTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ParserFactoryTest.php index 2c3ea2b7..d50981f2 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ParserFactoryTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ParserFactoryTest.php @@ -4,9 +4,8 @@ namespace PhpParser; /* This test is very weak, because PHPUnit's assertEquals assertion is way too slow dealing with the * large objects involved here. So we just do some basic instanceof tests instead. */ -use PHPUnit\Framework\TestCase; -class ParserFactoryTest extends TestCase +class ParserFactoryTest extends \PHPUnit\Framework\TestCase { /** @dataProvider provideTestCreate */ public function testCreate($kind, $lexer, $expected) { diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ParserTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ParserTest.php index d31ac6ef..0f7f1b79 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ParserTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/ParserTest.php @@ -6,9 +6,8 @@ use PhpParser\Node\Expr; use PhpParser\Node\Scalar; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -abstract class ParserTest extends TestCase +abstract class ParserTest extends \PHPUnit\Framework\TestCase { /** @returns Parser */ abstract protected function getParser(Lexer $lexer); @@ -167,6 +166,10 @@ EOC; ["namespace Foo;", ['kind' => Stmt\Namespace_::KIND_SEMICOLON]], ["namespace Foo {}", ['kind' => Stmt\Namespace_::KIND_BRACED]], ["namespace {}", ['kind' => Stmt\Namespace_::KIND_BRACED]], + ["(float) 5.0", ['kind' => Expr\Cast\Double::KIND_FLOAT]], + ["(double) 5.0", ['kind' => Expr\Cast\Double::KIND_DOUBLE]], + ["(real) 5.0", ['kind' => Expr\Cast\Double::KIND_REAL]], + [" ( REAL ) 5.0", ['kind' => Expr\Cast\Double::KIND_REAL]], ]; } } diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/PrettyPrinterTest.php b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/PrettyPrinterTest.php index d3c3f08a..e5b8a1ae 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/PrettyPrinterTest.php +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/PhpParser/PrettyPrinterTest.php @@ -12,8 +12,6 @@ use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; use PhpParser\PrettyPrinter\Standard; -require_once __DIR__ . '/CodeTestAbstract.php'; - class PrettyPrinterTest extends CodeTestAbstract { protected function doTestPrettyPrintMethod($method, $name, $code, $expected, $modeLine) { diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/formatPreservation/anonClasses.test b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/formatPreservation/anonClasses.test index 7551059f..b7896f22 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/formatPreservation/anonClasses.test +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/formatPreservation/anonClasses.test @@ -13,4 +13,16 @@ $new->args[] = new Expr\Variable('y'); expr; +$new->class->name = new Node\Identifier('Anon1'); +----- +>= $b; $a **= $b; +$a ??= $b; // chained assign $a = $b *= $c **= $d; @@ -185,6 +186,16 @@ array( ) ) 13: Stmt_Expression( + expr: Expr_AssignOp_Coalesce( + var: Expr_Variable( + name: a + ) + expr: Expr_Variable( + name: b + ) + ) + ) + 14: Stmt_Expression( expr: Expr_Assign( var: Expr_Variable( name: a @@ -213,7 +224,7 @@ array( 0: // chained assign ) ) - 14: Stmt_Expression( + 15: Stmt_Expression( expr: Expr_AssignRef( var: Expr_Variable( name: a @@ -232,7 +243,7 @@ array( 0: // by ref assign ) ) - 15: Stmt_Expression( + 16: Stmt_Expression( expr: Expr_Assign( var: Expr_List( items: array( @@ -259,7 +270,7 @@ array( 0: // list() assign ) ) - 16: Stmt_Expression( + 17: Stmt_Expression( expr: Expr_Assign( var: Expr_List( items: array( @@ -285,7 +296,7 @@ array( ) ) ) - 17: Stmt_Expression( + 18: Stmt_Expression( expr: Expr_Assign( var: Expr_List( items: array( @@ -326,7 +337,7 @@ array( ) ) ) - 18: Stmt_Expression( + 19: Stmt_Expression( expr: Expr_PreInc( var: Expr_Variable( name: a @@ -339,21 +350,21 @@ array( 0: // inc/dec ) ) - 19: Stmt_Expression( + 20: Stmt_Expression( expr: Expr_PostInc( var: Expr_Variable( name: a ) ) ) - 20: Stmt_Expression( + 21: Stmt_Expression( expr: Expr_PreDec( var: Expr_Variable( name: a ) ) ) - 21: Stmt_Expression( + 22: Stmt_Expression( expr: Expr_PostDec( var: Expr_Variable( name: a diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/semiReserved.test b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/semiReserved.test index 7446a875..70cf063d 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/semiReserved.test +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/semiReserved.test @@ -112,6 +112,7 @@ array( ) 4: Stmt_Property( flags: MODIFIER_PUBLIC (1) + type: null props: array( 0: Stmt_PropertyProperty( name: VarLikeIdentifier( @@ -123,6 +124,7 @@ array( ) 5: Stmt_Property( flags: MODIFIER_PUBLIC (1) + type: null props: array( 0: Stmt_PropertyProperty( name: VarLikeIdentifier( diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/anonymous.test b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/anonymous.test index a676db68..9aaaff93 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/anonymous.test +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/anonymous.test @@ -89,6 +89,7 @@ array( stmts: array( 0: Stmt_Property( flags: MODIFIER_PUBLIC (1) + type: null props: array( 0: Stmt_PropertyProperty( name: VarLikeIdentifier( diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/implicitPublic.test b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/implicitPublic.test index bd43dce9..92737af7 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/implicitPublic.test +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/implicitPublic.test @@ -24,6 +24,7 @@ array( stmts: array( 0: Stmt_Property( flags: 0 + type: null props: array( 0: Stmt_PropertyProperty( name: VarLikeIdentifier( @@ -35,6 +36,7 @@ array( ) 1: Stmt_Property( flags: MODIFIER_STATIC (8) + type: null props: array( 0: Stmt_PropertyProperty( name: VarLikeIdentifier( diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/modifier.test b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/modifier.test index cbeb57e1..797ef4e8 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/modifier.test +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/modifier.test @@ -15,6 +15,7 @@ array( stmts: array( 0: Stmt_Property( flags: MODIFIER_PUBLIC (1) + type: null props: array( 0: Stmt_PropertyProperty( name: VarLikeIdentifier( @@ -43,6 +44,7 @@ array( stmts: array( 0: Stmt_Property( flags: MODIFIER_PUBLIC | MODIFIER_PROTECTED (3) + type: null props: array( 0: Stmt_PropertyProperty( name: VarLikeIdentifier( @@ -99,6 +101,7 @@ array( stmts: array( 0: Stmt_Property( flags: MODIFIER_STATIC (8) + type: null props: array( 0: Stmt_PropertyProperty( name: VarLikeIdentifier( @@ -207,6 +210,7 @@ array( stmts: array( 0: Stmt_Property( flags: MODIFIER_ABSTRACT (16) + type: null props: array( 0: Stmt_PropertyProperty( name: VarLikeIdentifier( @@ -235,6 +239,7 @@ array( stmts: array( 0: Stmt_Property( flags: MODIFIER_FINAL (32) + type: null props: array( 0: Stmt_PropertyProperty( name: VarLikeIdentifier( diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/php4Style.test b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/php4Style.test index d6070b88..8906ef13 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/php4Style.test +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/php4Style.test @@ -20,6 +20,7 @@ array( stmts: array( 0: Stmt_Property( flags: 0 + type: null props: array( 0: Stmt_PropertyProperty( name: VarLikeIdentifier( diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/simple.test b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/simple.test index 9247eec9..c0bd53f3 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/simple.test +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/parser/stmt/class/simple.test @@ -63,6 +63,7 @@ array( ) 1: Stmt_Property( flags: MODIFIER_PUBLIC (1) + type: null props: array( 0: Stmt_PropertyProperty( name: VarLikeIdentifier( @@ -84,6 +85,7 @@ array( ) 2: Stmt_Property( flags: MODIFIER_PROTECTED (2) + type: null props: array( 0: Stmt_PropertyProperty( name: VarLikeIdentifier( @@ -95,6 +97,7 @@ array( ) 3: Stmt_Property( flags: MODIFIER_PRIVATE (4) + type: null props: array( 0: Stmt_PropertyProperty( name: VarLikeIdentifier( diff --git a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/prettyPrinter/expr/operators.test b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/prettyPrinter/expr/operators.test index 72b68418..2b5ab01d 100644 --- a/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/prettyPrinter/expr/operators.test +++ b/src/cadolesuser-1.0/vendor/nikic/php-parser/test/code/prettyPrinter/expr/operators.test @@ -19,6 +19,9 @@ $a--; (float) $a; (double) $a; (real) $a; +( float) $a; +(double ) $a; +( REAL ) $a; (string) $a; (binary) $a; (array) $a; @@ -53,9 +56,9 @@ $a || $b; $a ? $b : $c; $a ?: $c; $a ?? $c; - $a = $b; $a **= $b; +$a ??= $c; $a *= $b; $a /= $b; $a %= $b; @@ -87,9 +90,12 @@ $a--; +$a; (int) $a; (int) $a; +(float) $a; (double) $a; +(real) $a; +(float) $a; (double) $a; -(double) $a; +(real) $a; (string) $a; (string) $a; (array) $a; @@ -125,6 +131,7 @@ $a ?: $c; $a ?? $c; $a = $b; $a **= $b; +$a ??= $c; $a *= $b; $a /= $b; $a %= $b; diff --git a/src/cadolesuser-1.0/vendor/ocramius/package-versions/src/PackageVersions/Versions.php b/src/cadolesuser-1.0/vendor/ocramius/package-versions/src/PackageVersions/Versions.php index cf64c9ff..817b6950 100644 --- a/src/cadolesuser-1.0/vendor/ocramius/package-versions/src/PackageVersions/Versions.php +++ b/src/cadolesuser-1.0/vendor/ocramius/package-versions/src/PackageVersions/Versions.php @@ -11,17 +11,17 @@ namespace PackageVersions; final class Versions { const VERSIONS = array ( - 'composer/ca-bundle' => '1.1.3@8afa52cd417f4ec417b4bfe86b68106538a87660', + 'composer/ca-bundle' => '1.1.4@558f321c52faeb4828c03e7dc0cfe39a09e09a2d', 'doctrine/annotations' => 'v1.4.0@54cacc9b81758b14e3ce750f205a393d52339e97', 'doctrine/cache' => 'v1.6.2@eb152c5100571c7a45470ff2a35095ab3f3b900b', 'doctrine/collections' => 'v1.4.0@1a4fb7e902202c33cce8c55989b945612943c2ba', 'doctrine/common' => 'v2.7.3@4acb8f89626baafede6ee5475bc5844096eba8a9', 'doctrine/data-fixtures' => 'v1.2.2@17fa5bfe6ff52e35cb3d9ec37c934a2f4bd1fa2e', 'doctrine/dbal' => 'v2.5.13@729340d8d1eec8f01bff708e12e449a3415af873', - 'doctrine/doctrine-bundle' => '1.9.1@703fad32e4c8cbe609caf45a71a1d4266c830f0f', + 'doctrine/doctrine-bundle' => '1.10.2@1f99e6645030542079c57d4680601a4a8778a1bd', 'doctrine/doctrine-cache-bundle' => '1.3.5@5514c90d9fb595e1095e6d66ebb98ce9ef049927', 'doctrine/doctrine-fixtures-bundle' => 'v2.4.1@74b8cc70a4a25b774628ee59f4cdf3623a146273', - 'doctrine/doctrine-migrations-bundle' => 'v1.3.1@a9e506369f931351a2a6dd2aef588a822802b1b7', + 'doctrine/doctrine-migrations-bundle' => 'v1.3.2@49fa399181db4bf4f9f725126bd1cb65c4398dce', 'doctrine/inflector' => 'v1.2.0@e11d84c6e018beedd929cff5220969a3c6d1d462', 'doctrine/instantiator' => '1.0.5@8e884e78f9f0eb1329e445619e04456e64d8051d', 'doctrine/lexer' => 'v1.0.1@83893c552fd2045dd78aef794c31e694c37c0b8c', @@ -31,26 +31,31 @@ final class Versions 'gregwar/captcha' => 'v1.1.7@cf953dd79748406e0292cea8c565399681e4d345', 'gregwar/captcha-bundle' => 'v2.0.6@c2d5468556890dd25e0b53bd345fc205562c86f7', 'incenteev/composer-parameter-handler' => 'v2.1.3@933c45a34814f27f2345c11c37d46b3ca7303550', + 'jasig/phpcas' => '1.3.6@7972833e84f6ee5fa41f1479eab5d855109627f5', 'jdorn/sql-formatter' => 'v1.2.17@64990d96e0959dff8e059dfcdc1af130728d92bc', 'kriswallsmith/assetic' => 'v1.4.0@e911c437dbdf006a8f62c2f59b15b2d69a5e0aa1', + 'lightsaml/lightsaml' => '1.4.1@377f04d1fb25f2fb2e72dabeff10b336f1cbe4c5', + 'lightsaml/sp-bundle' => '1.2.0@b31182d23d93b696305f57f9a66d6770a53d5f8e', + 'lightsaml/symfony-bridge' => '1.3.0@8d3120825032a7468e894d0ae68630f21cd6035b', 'monolog/monolog' => '1.24.0@bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266', 'ocramius/package-versions' => '1.2.0@ad8a245decad4897cc6b432743913dad0d69753c', 'ocramius/proxy-manager' => '2.0.4@a55d08229f4f614bf335759ed0cf63378feeb2e6', 'oneup/uploader-bundle' => '1.9.2@a32bc98019abfd51531d08cc79be19f849d87b84', - 'paragonie/random_compat' => 'v2.0.17@29af24f25bab834fcbb38ad2a69fa93b867e070d', + 'paragonie/random_compat' => 'v2.0.18@0a58ef6e3146256cc3dc7cc393927bcc7d1b72db', 'psr/cache' => '1.0.1@d11b50ad223250cf17b86e38383413f5a6764bf8', 'psr/container' => '1.0.0@b7ce3b176482dbbc1245ebf52b181af44c2cf55f', 'psr/link' => '1.0.0@eea8e8662d5cd3ae4517c9b864493f59fca95562', 'psr/log' => '1.1.0@6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd', 'psr/simple-cache' => '1.0.1@408d5eafb83c57f6365a3ca330ff23aa4a5fa39b', 'ramsey/uuid' => '3.8.0@d09ea80159c1929d75b3f9c60504d613aeb4a1e3', - 'sensio/distribution-bundle' => 'v5.0.23@088b116a0e27faa0e1a7384dd4f3f6a9d5a8a3b6', - 'sensio/framework-extra-bundle' => 'v5.2.2@9ef408febe2f12e70118ef61c6515035a06c5830', - 'sensiolabs/security-checker' => 'v5.0.1@9ea927417c949039a9cfb0d92af76fd1c538d9e9', + 'robrichards/xmlseclibs' => '3.0.3@406c68ac9124db033d079284b719958b829cb830', + 'sensio/distribution-bundle' => 'v5.0.24@59eac70f15f97ee945924948a6f5e2f6f86b7a4b', + 'sensio/framework-extra-bundle' => 'v5.2.4@1fdf591c4b388e62dbb2579de89c1560b33f865d', + 'sensiolabs/security-checker' => 'v5.0.3@46be3f58adac13084497961e10eed9a7fb4d44d1', 'swiftmailer/swiftmailer' => 'v5.4.12@181b89f18a90f8925ef805f950d47a7190e9b950', 'symfony/assetic-bundle' => 'v2.8.2@2e0a23a4874838e26de6f025e02fc63328921a4c', 'symfony/monolog-bundle' => 'v3.3.1@572e143afc03419a75ab002c80a2fd99299195ff', - 'symfony/orm-pack' => 'v1.0.5@1b58f752cd917a08c9c8df020781d9c46a2275b1', + 'symfony/orm-pack' => 'v1.0.6@36c2a928482dc5f05c5c1c1b947242ae03ff1335', 'symfony/polyfill-apcu' => 'v1.10.0@19e1b73bf255265ad0b568f81766ae2a3266d8d2', 'symfony/polyfill-ctype' => 'v1.10.0@e3d826245268269cd66f8326bd8bc066687b4a19', 'symfony/polyfill-intl-icu' => 'v1.10.0@f22a90256d577c7ef7efad8df1f0201663d57644', @@ -59,15 +64,15 @@ final class Versions 'symfony/polyfill-php70' => 'v1.10.0@6b88000cdd431cd2e940caa2cb569201f3f84224', 'symfony/polyfill-util' => 'v1.10.0@3b58903eae668d348a7126f999b0da0f2f93611c', 'symfony/swiftmailer-bundle' => 'v2.6.7@c4808f5169efc05567be983909d00f00521c53ec', - 'symfony/symfony' => 'v3.4.19@a8ff5a534372763544031ae68c981d396ffeb43f', + 'symfony/symfony' => 'v3.4.23@336cf12e5e82d71874e8522e0879794340351b56', 'tetranz/select2entity-bundle' => 'v2.9.5@c57281f4af06ca0c7e74c27fcc4bf8c95a1beaad', - 'twig/twig' => 'v2.5.0@6a5f676b77a90823c2d4eaf76137b771adf31323', + 'twig/twig' => 'v2.6.2@7d7342c8a4059fefb9b8d07db0cc14007021f9b7', 'zendframework/zend-code' => '3.1.0@2899c17f83a7207f2d7f53ec2f421204d3beea27', 'zendframework/zend-eventmanager' => '3.2.1@a5e2583a211f73604691586b8406ff7296a946dd', - 'nikic/php-parser' => 'v4.1.0@d0230c5c77a7e3cfa69446febf340978540958c0', + 'nikic/php-parser' => 'v4.2.1@5221f49a608808c1e4d436df32884cbc1b821ac0', 'sensio/generator-bundle' => 'v3.1.7@28cbaa244bd0816fd8908b93f90380bcd7b67a65', - 'symfony/maker-bundle' => 'v1.9.0@e873047b6022a0343c9354f65d5d47b9e351dd53', - 'symfony/phpunit-bridge' => 'v3.4.19@2155067dfc73e0e77dbc26f236af17e4df552de5', + 'symfony/maker-bundle' => 'v1.11.4@540996bfdcc14ca38dfe4865c020d965020ae821', + 'symfony/phpunit-bridge' => 'v3.4.23@b539f37134c10edbf85dc0567be4151c56870f5e', 'symfony/framework-standard-edition' => 'No version set (parsed as 1.0.0)@', ); diff --git a/src/cadolesuser-1.0/vendor/paragonie/random_compat/lib/cast_to_int.php b/src/cadolesuser-1.0/vendor/paragonie/random_compat/lib/cast_to_int.php index f97e4349..1b1bbfe8 100644 --- a/src/cadolesuser-1.0/vendor/paragonie/random_compat/lib/cast_to_int.php +++ b/src/cadolesuser-1.0/vendor/paragonie/random_compat/lib/cast_to_int.php @@ -27,19 +27,19 @@ */ if (!is_callable('RandomCompat_intval')) { - + /** * Cast to an integer if we can, safely. - * + * * If you pass it a float in the range (~PHP_INT_MAX, PHP_INT_MAX) * (non-inclusive), it will sanely cast it to an int. If you it's equal to * ~PHP_INT_MAX or PHP_INT_MAX, we let it fail as not an integer. Floats * lose precision, so the <= and => operators might accidentally let a float * through. - * + * * @param int|float $number The number we want to convert to an int * @param bool $fail_open Set to true to not throw an exception - * + * * @return float|int * @psalm-suppress InvalidReturnType * diff --git a/src/cadolesuser-1.0/vendor/paragonie/random_compat/lib/error_polyfill.php b/src/cadolesuser-1.0/vendor/paragonie/random_compat/lib/error_polyfill.php index 6d4a19ac..c02c5c8b 100644 --- a/src/cadolesuser-1.0/vendor/paragonie/random_compat/lib/error_polyfill.php +++ b/src/cadolesuser-1.0/vendor/paragonie/random_compat/lib/error_polyfill.php @@ -1,12 +1,12 @@ $st */ - $st = fstat($fp); - if (($st['mode'] & 0170000) !== 020000) { - fclose($fp); - $fp = false; + if (DIRECTORY_SEPARATOR === '/') { + if (!is_readable('/dev/urandom')) { + throw new Exception( + 'Environment misconfiguration: ' . + '/dev/urandom cannot be read.' + ); + } + /** + * We use /dev/urandom if it is a char device. + * We never fall back to /dev/random + */ + /** @var resource|bool $fp */ + $fp = fopen('/dev/urandom', 'rb'); + if (is_resource($fp)) { + /** @var array $st */ + $st = fstat($fp); + if (($st['mode'] & 0170000) !== 020000) { + fclose($fp); + $fp = false; + } } } @@ -128,29 +147,28 @@ if (!is_callable('random_bytes')) { */ $read = fread($fp, $remaining); if (!is_string($read)) { - if ($read === false) { - /** - * We cannot safely read from the file. Exit the - * do-while loop and trigger the exception condition - * - * @var string|bool - */ - $buf = false; - break; - } + /** + * We cannot safely read from the file. Exit the + * do-while loop and trigger the exception condition + * + * @var string|bool + */ + $buf = false; + break; } /** * Decrease the number of bytes returned from remaining */ $remaining -= RandomCompat_strlen($read); /** - * @var string|bool + * @var string $buf */ - $buf = $buf . $read; + $buf .= $read; } while ($remaining > 0); /** * Is our result valid? + * @var string|bool $buf */ if (is_string($buf)) { if (RandomCompat_strlen($buf) === $bytes) { diff --git a/src/cadolesuser-1.0/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php b/src/cadolesuser-1.0/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php index 7a95e2b4..2e562901 100644 --- a/src/cadolesuser-1.0/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php +++ b/src/cadolesuser-1.0/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php @@ -1,22 +1,22 @@ @@ -177,7 +178,7 @@ class ScriptHandler return; } - static::executeCommand($event, $consoleDir, 'assets:install '.$symlink.escapeshellarg($webDir), $options['process-timeout']); + static::executeCommand($event, $consoleDir, 'assets:install '.$symlink.ProcessExecutor::escape($webDir), $options['process-timeout']); } /** @@ -280,9 +281,9 @@ EOF protected static function executeCommand(Event $event, $consoleDir, $cmd, $timeout = 300) { - $php = escapeshellarg(static::getPhp(false)); - $phpArgs = implode(' ', array_map('escapeshellarg', static::getPhpArguments())); - $console = escapeshellarg($consoleDir.'/console'); + $php = ProcessExecutor::escape(static::getPhp(false)); + $phpArgs = implode(' ', array_map(array('Composer\Util\ProcessExecutor', 'escape'), static::getPhpArguments())); + $console = ProcessExecutor::escape($consoleDir.'/console'); if ($event->getIO()->isDecorated()) { $console .= ' --ansi'; } @@ -290,20 +291,20 @@ EOF $process = new Process($php.($phpArgs ? ' '.$phpArgs : '').' '.$console.' '.$cmd, null, null, null, $timeout); $process->run(function ($type, $buffer) use ($event) { $event->getIO()->write($buffer, false); }); if (!$process->isSuccessful()) { - throw new \RuntimeException(sprintf("An error occurred when executing the \"%s\" command:\n\n%s\n\n%s", escapeshellarg($cmd), self::removeDecoration($process->getOutput()), self::removeDecoration($process->getErrorOutput()))); + throw new \RuntimeException(sprintf("An error occurred when executing the \"%s\" command:\n\n%s\n\n%s", ProcessExecutor::escape($cmd), self::removeDecoration($process->getOutput()), self::removeDecoration($process->getErrorOutput()))); } } protected static function executeBuildBootstrap(Event $event, $bootstrapDir, $autoloadDir, $timeout = 300) { - $php = escapeshellarg(static::getPhp(false)); - $phpArgs = implode(' ', array_map('escapeshellarg', static::getPhpArguments())); - $cmd = escapeshellarg(__DIR__.'/../Resources/bin/build_bootstrap.php'); - $bootstrapDir = escapeshellarg($bootstrapDir); - $autoloadDir = escapeshellarg($autoloadDir); + $php = ProcessExecutor::escape(static::getPhp(false)); + $phpArgs = implode(' ', array_map(array('Composer\Util\ProcessExecutor', 'escape'), static::getPhpArguments())); + $cmd = ProcessExecutor::escape(__DIR__.'/../Resources/bin/build_bootstrap.php'); + $bootstrapDir = ProcessExecutor::escape($bootstrapDir); + $autoloadDir = ProcessExecutor::escape($autoloadDir); $useNewDirectoryStructure = ''; if (static::useNewDirectoryStructure(static::getOptions($event))) { - $useNewDirectoryStructure = escapeshellarg('--use-new-directory-structure'); + $useNewDirectoryStructure = ProcessExecutor::escape('--use-new-directory-structure'); } $process = new Process($php.($phpArgs ? ' '.$phpArgs : '').' '.$cmd.' '.$bootstrapDir.' '.$autoloadDir.' '.$useNewDirectoryStructure, getcwd(), null, null, $timeout); diff --git a/src/cadolesuser-1.0/vendor/sensio/framework-extra-bundle/DependencyInjection/Configuration.php b/src/cadolesuser-1.0/vendor/sensio/framework-extra-bundle/DependencyInjection/Configuration.php index 5338402b..288a692f 100644 --- a/src/cadolesuser-1.0/vendor/sensio/framework-extra-bundle/DependencyInjection/Configuration.php +++ b/src/cadolesuser-1.0/vendor/sensio/framework-extra-bundle/DependencyInjection/Configuration.php @@ -29,8 +29,14 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('sensio_framework_extra', 'array'); + $treeBuilder = new TreeBuilder('sensio_framework_extra'); + + if (method_exists($treeBuilder, 'getRootNode')) { + $rootNode = $treeBuilder->getRootNode(); + } else { + // BC layer for symfony/config 4.1 and older + $rootNode = $treeBuilder->root('sensio_framework_extra'); + } $rootNode ->children() diff --git a/src/cadolesuser-1.0/vendor/sensio/framework-extra-bundle/EventListener/ParamConverterListener.php b/src/cadolesuser-1.0/vendor/sensio/framework-extra-bundle/EventListener/ParamConverterListener.php index f9bd858c..8da1d377 100644 --- a/src/cadolesuser-1.0/vendor/sensio/framework-extra-bundle/EventListener/ParamConverterListener.php +++ b/src/cadolesuser-1.0/vendor/sensio/framework-extra-bundle/EventListener/ParamConverterListener.php @@ -64,7 +64,7 @@ class ParamConverterListener implements EventSubscriberInterface if (\is_array($controller)) { $r = new \ReflectionMethod($controller[0], $controller[1]); - } elseif (\is_object($controller) && \is_callable($controller, '__invoke')) { + } elseif (\is_object($controller) && \is_callable([$controller, '__invoke'])) { $r = new \ReflectionMethod($controller, '__invoke'); } else { $r = new \ReflectionFunction($controller); diff --git a/src/cadolesuser-1.0/vendor/sensio/framework-extra-bundle/composer.json b/src/cadolesuser-1.0/vendor/sensio/framework-extra-bundle/composer.json index dabc57a6..e9d07f4d 100644 --- a/src/cadolesuser-1.0/vendor/sensio/framework-extra-bundle/composer.json +++ b/src/cadolesuser-1.0/vendor/sensio/framework-extra-bundle/composer.json @@ -26,7 +26,7 @@ "symfony/twig-bundle": "^3.3|^4.0", "twig/twig": "~1.12|~2.0", "symfony/browser-kit": "^3.3|^4.0", - "symfony/phpunit-bridge": "^3.3|^4.0", + "symfony/phpunit-bridge": "^3.4.19|^4.1.8", "symfony/dom-crawler": "^3.3|^4.0", "zendframework/zend-diactoros": "^1.3", "doctrine/doctrine-bundle": "^1.6", @@ -49,6 +49,5 @@ "branch-alias": { "dev-master": "5.2.x-dev" } - }, - "minimum-stability": "dev" + } } diff --git a/src/cadolesuser-1.0/vendor/sensiolabs/security-checker/README.md b/src/cadolesuser-1.0/vendor/sensiolabs/security-checker/README.md index 80a586dd..42dbd77b 100644 --- a/src/cadolesuser-1.0/vendor/sensiolabs/security-checker/README.md +++ b/src/cadolesuser-1.0/vendor/sensiolabs/security-checker/README.md @@ -5,10 +5,16 @@ The SensioLabs Security Checker is a command line tool that checks if your application uses dependencies with known security vulnerabilities. It uses the [Security Check Web service][1] and the [Security Advisories Database][2]. +**TIP**: As an alternative, you can use the [Symfony CLI][3] tool that has the +following advantages: it does not depend on PHP, all checks are done locally (no +calls to the security.symfony.com API): + + $ symfony security:check + Usage ----- -Download the [security-checker.phar][3] file: +Download the [security-checker.phar][4] file: $ php security-checker.phar security:check /path/to/composer.lock @@ -36,4 +42,5 @@ the checker into your own project: [1]: https://security.symfony.com/ [2]: https://github.com/FriendsOfPHP/security-advisories -[3]: https://get.sensiolabs.org/security-checker.phar +[3]: https://symfony.com/download +[4]: https://get.sensiolabs.org/security-checker.phar diff --git a/src/cadolesuser-1.0/vendor/sensiolabs/security-checker/SensioLabs/Security/Command/SecurityCheckerCommand.php b/src/cadolesuser-1.0/vendor/sensiolabs/security-checker/SensioLabs/Security/Command/SecurityCheckerCommand.php index 85a80bf7..3aca295a 100644 --- a/src/cadolesuser-1.0/vendor/sensiolabs/security-checker/SensioLabs/Security/Command/SecurityCheckerCommand.php +++ b/src/cadolesuser-1.0/vendor/sensiolabs/security-checker/SensioLabs/Security/Command/SecurityCheckerCommand.php @@ -83,8 +83,13 @@ EOF $this->checker->getCrawler()->setToken($token); } + $format = $input->getOption('format'); + if ($input->getOption("no-ansi") && 'ansi' === $format) { + $format = 'text'; + } + try { - $result = $this->checker->check($input->getArgument('lockfile'), $input->getOption('format')); + $result = $this->checker->check($input->getArgument('lockfile'), $format); } catch (ExceptionInterface $e) { $output->writeln($this->getHelperSet()->get('formatter')->formatBlock($e->getMessage(), 'error', true)); diff --git a/src/cadolesuser-1.0/vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler.php b/src/cadolesuser-1.0/vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler.php index 180f66ec..665f733e 100644 --- a/src/cadolesuser-1.0/vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler.php +++ b/src/cadolesuser-1.0/vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler.php @@ -60,7 +60,7 @@ class Crawler { list($headers, $body) = $this->doCheck($lock, $format, $headers); - if (!(preg_match('/X-Alerts: (\d+)/', $headers, $matches) || 2 == count($matches))) { + if (!(preg_match('/X-Alerts: (\d+)/i', $headers, $matches) || 2 == count($matches))) { throw new RuntimeException('The web service did not return alerts count.'); } @@ -135,7 +135,7 @@ class Crawler $headers = ''; foreach ($http_response_header as $header) { - if (false !== strpos($header, 'X-Alerts: ')) { + if (false !== stripos($header, 'X-Alerts: ')) { $headers = $header; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/.travis.yml b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/.travis.yml index 839659a5..d89b122d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/.travis.yml +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/.travis.yml @@ -10,21 +10,23 @@ php: - 7.0 - 7.1 - 7.2 + - 7.3 cache: directories: - $HOME/.composer/cache/files - .phpunit + - vendor env: global: - SYMFONY_PHPUNIT_DIR=.phpunit before_install: - - phpenv config-rm xdebug.ini + - phpenv config-rm xdebug.ini || echo "xdebug not available" install: - - composer install + - composer update --no-suggest - ./vendor/bin/simple-phpunit install script: diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/CHANGELOG.md b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/CHANGELOG.md index 49f2d0a2..8d8aa00a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/CHANGELOG.md +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/CHANGELOG.md @@ -1,3 +1,28 @@ +1.11 +==== + +* Add `make:registration-form` command - #333 thanks to @weaverryan + +1.10 +==== + +* Add `make:serializer:normalizer` command - #298 thanks + to @lyrixx + +* Add a `--no-template` option to `make:controller` to skip + generating a template - #280 thanks to @welcoMattic + +* Add support for rendering additional date types in make:crud + - #241 thanks to @sadikoff + +* Better errors when trying to use reserved words for classes + - #306 thanks to @SerkanYildiz + +1.9 +=== + +* Allow make:form to work with non-entities - #301 thanks to @ckrack + 1.8 === diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/DependencyInjection/Configuration.php b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/DependencyInjection/Configuration.php index c0652674..d89b1017 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/DependencyInjection/Configuration.php +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/DependencyInjection/Configuration.php @@ -21,8 +21,13 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('maker'); + $treeBuilder = new TreeBuilder('maker'); + if (method_exists($treeBuilder, 'getRootNode')) { + $rootNode = $treeBuilder->getRootNode(); + } else { + // BC layer for symfony/config 4.1 and older + $rootNode = $treeBuilder->root('maker'); + } $rootNode ->children() diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Doctrine/DoctrineHelper.php b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Doctrine/DoctrineHelper.php index 256e6292..bcc2d6c6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Doctrine/DoctrineHelper.php +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Doctrine/DoctrineHelper.php @@ -12,6 +12,7 @@ namespace Symfony\Bundle\MakerBundle\Doctrine; use Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory; +use Doctrine\Common\Persistence\Mapping\Driver\AnnotationDriver; use Doctrine\Common\Persistence\Mapping\Driver\MappingDriver; use Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain; use Doctrine\ORM\EntityManagerInterface; @@ -145,6 +146,19 @@ final class DoctrineHelper foreach ($loaded as $m) { $cmf->setMetadataFor($m->getName(), $m); } + + // Invalidating the cached AnnotationDriver::$classNames to find new Entity classes + $metadataDriver = $em->getConfiguration()->getMetadataDriverImpl(); + if ($metadataDriver instanceof MappingDriverChain) { + foreach ($metadataDriver->getDrivers() as $driver) { + if ($driver instanceof AnnotationDriver) { + $classNames = (new \ReflectionObject($driver))->getProperty('classNames'); + $classNames->setAccessible(true); + $classNames->setValue($driver, null); + $classNames->setAccessible(false); + } + } + } } foreach ($cmf->getAllMetadata() as $m) { diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Doctrine/EntityDetails.php b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Doctrine/EntityDetails.php index 27823536..2ac8ad1d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Doctrine/EntityDetails.php +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Doctrine/EntityDetails.php @@ -68,6 +68,11 @@ final class EntityDetails } } - return $fields; + $fieldsWithTypes = []; + foreach ($fields as $field) { + $fieldsWithTypes[$field] = null; + } + + return $fieldsWithTypes; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Doctrine/EntityRegenerator.php b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Doctrine/EntityRegenerator.php index e6447021..567eaea5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Doctrine/EntityRegenerator.php +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Doctrine/EntityRegenerator.php @@ -76,6 +76,10 @@ final class EntityRegenerator $embeddedClasses = []; foreach ($classMetadata->embeddedClasses as $fieldName => $mapping) { + if (false !== strpos($fieldName, '.')) { + continue; + } + $className = $mapping['class']; $embeddedClasses[$fieldName] = $this->getPathOfClass($className); diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/FileManager.php b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/FileManager.php index 1d3a64d7..c032d93e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/FileManager.php +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/FileManager.php @@ -169,6 +169,11 @@ class FileManager return $this->autoloaderUtil->isNamespaceConfiguredToAutoload($namespace); } + public function getRootDirectory(): string + { + return $this->rootDirectory; + } + /** * Resolve '../' in paths (like real_path), but for non-existent files. * diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Generator.php b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Generator.php index bf2ab0d3..b6e5c000 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Generator.php +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Generator.php @@ -152,6 +152,11 @@ class Generator return new ClassNameDetails($className, $fullNamespacePrefix, $suffix); } + public function getRootDirectory(): string + { + return $this->fileManager->getRootDirectory(); + } + private function addOperation(string $targetPath, string $templateName, array $variables) { if ($this->fileManager->fileExists($targetPath)) { @@ -216,7 +221,7 @@ class Generator $controllerTemplatePath, $parameters + [ - 'parent_class_name' => \method_exists(AbstractController::class, 'getParameter') ? 'AbstractController' : 'Controller', + 'parent_class_name' => method_exists(AbstractController::class, 'getParameter') ? 'AbstractController' : 'Controller', ] ); } diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/GeneratorTwigHelper.php b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/GeneratorTwigHelper.php index d650f6ea..8c36a2a6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/GeneratorTwigHelper.php +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/GeneratorTwigHelper.php @@ -31,15 +31,29 @@ final class GeneratorTwigHelper $printCode = $entity.'.'.str_replace('_', '', $twigField); switch ($field['type']) { + case 'datetimetz_immutable': + case 'datetimetz': + $printCode .= ' ? '.$printCode.'|date(\'Y-m-d H:i:s T\') : \'\''; + break; + case 'datetime_immutable': case 'datetime': $printCode .= ' ? '.$printCode.'|date(\'Y-m-d H:i:s\') : \'\''; break; + case 'dateinterval': + $printCode .= ' ? '.$printCode.'.format(\'%y year(s), %m month(s), %d day(s)\') : \'\''; + break; + case 'date_immutable': case 'date': $printCode .= ' ? '.$printCode.'|date(\'Y-m-d\') : \'\''; break; + case 'time_immutable': case 'time': $printCode .= ' ? '.$printCode.'|date(\'H:i:s\') : \'\''; break; + case 'json': + case 'json_array': + $printCode .= ' ? '.$printCode.'|json_encode : \'\''; + break; case 'array': $printCode .= ' ? '.$printCode.'|join(\', \') : \'\''; break; @@ -70,8 +84,10 @@ TWIG; HTML; } - public function getFileLink($path): string + public function getFileLink($path, $text = null, $line = 0): string { - return sprintf('%1$s', $path); + $text = $text ?: $path; + + return "$text"; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeController.php b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeController.php index 757e9875..4e401dd6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeController.php +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeController.php @@ -21,6 +21,7 @@ use Symfony\Bundle\TwigBundle\TwigBundle; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; /** * @author Javier Eguiluz @@ -38,6 +39,7 @@ final class MakeController extends AbstractMaker $command ->setDescription('Creates a new controller class') ->addArgument('controller-class', InputArgument::OPTIONAL, sprintf('Choose a name for your controller class (e.g. %sController)', Str::asClassName(Str::getRandomTerm()))) + ->addOption('no-template', null, InputOption::VALUE_NONE, 'Use this option to disable template generation') ->setHelp(file_get_contents(__DIR__.'/../Resources/help/MakeController.txt')) ; } @@ -50,6 +52,7 @@ final class MakeController extends AbstractMaker 'Controller' ); + $noTemplate = $input->getOption('no-template'); $templateName = Str::asFilePath($controllerClassNameDetails->getRelativeNameWithoutSuffix()).'/index.html.twig'; $controllerPath = $generator->generateController( $controllerClassNameDetails->getFullName(), @@ -57,17 +60,19 @@ final class MakeController extends AbstractMaker [ 'route_path' => Str::asRoutePath($controllerClassNameDetails->getRelativeNameWithoutSuffix()), 'route_name' => Str::asRouteName($controllerClassNameDetails->getRelativeNameWithoutSuffix()), - 'twig_installed' => $this->isTwigInstalled(), + 'with_template' => $this->isTwigInstalled() && !$noTemplate, 'template_name' => $templateName, ] ); - if ($this->isTwigInstalled()) { + if ($this->isTwigInstalled() && !$noTemplate) { $generator->generateFile( 'templates/'.$templateName, 'controller/twig_template.tpl.php', [ 'controller_path' => $controllerPath, + 'root_directory' => $generator->getRootDirectory(), + 'class_name' => $controllerClassNameDetails->getShortName(), ] ); } diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeCrud.php b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeCrud.php index 6697f54c..050ab1b6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeCrud.php +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeCrud.php @@ -19,6 +19,7 @@ use Symfony\Bundle\MakerBundle\DependencyBuilder; use Symfony\Bundle\MakerBundle\Doctrine\DoctrineHelper; use Symfony\Bundle\MakerBundle\Generator; use Symfony\Bundle\MakerBundle\InputConfiguration; +use Symfony\Bundle\MakerBundle\Renderer\FormTypeRenderer; use Symfony\Bundle\MakerBundle\Str; use Symfony\Bundle\MakerBundle\Validator; use Symfony\Bundle\TwigBundle\TwigBundle; @@ -38,9 +39,12 @@ final class MakeCrud extends AbstractMaker { private $doctrineHelper; - public function __construct(DoctrineHelper $doctrineHelper) + private $formTypeRenderer; + + public function __construct(DoctrineHelper $doctrineHelper, FormTypeRenderer $formTypeRenderer) { $this->doctrineHelper = $doctrineHelper; + $this->formTypeRenderer = $formTypeRenderer; } public static function getCommandName(): string @@ -104,7 +108,7 @@ final class MakeCrud extends AbstractMaker } $controllerClassDetails = $generator->createClassNameDetails( - $entityClassDetails->getRelativeNameWithoutSuffix(), + $entityClassDetails->getRelativeNameWithoutSuffix().'Controller', 'Controller\\', 'Controller' ); @@ -112,7 +116,7 @@ final class MakeCrud extends AbstractMaker $iter = 0; do { $formClassDetails = $generator->createClassNameDetails( - $entityClassDetails->getRelativeNameWithoutSuffix().($iter ?: ''), + $entityClassDetails->getRelativeNameWithoutSuffix().($iter ?: '').'Type', 'Form\\', 'Type' ); @@ -149,14 +153,10 @@ final class MakeCrud extends AbstractMaker ) ); - $generator->generateClass( - $formClassDetails->getFullName(), - 'form/Type.tpl.php', - [ - 'bounded_full_class_name' => $entityClassDetails->getFullName(), - 'bounded_class_name' => $entityClassDetails->getShortName(), - 'form_fields' => $entityDoctrineDetails->getFormFields(), - ] + $this->formTypeRenderer->render( + $formClassDetails, + $entityDoctrineDetails->getFormFields(), + $entityClassDetails ); $templates = [ diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeEntity.php b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeEntity.php index 9b02c10c..89fa27c6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeEntity.php +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeEntity.php @@ -26,6 +26,7 @@ use Symfony\Bundle\MakerBundle\InputConfiguration; use Symfony\Bundle\MakerBundle\Str; use Symfony\Bundle\MakerBundle\Doctrine\EntityRegenerator; use Symfony\Bundle\MakerBundle\FileManager; +use Symfony\Bundle\MakerBundle\Util\ClassDetails; use Symfony\Bundle\MakerBundle\Util\ClassSourceManipulator; use Symfony\Bundle\MakerBundle\Doctrine\EntityRelation; use Symfony\Bundle\MakerBundle\Validator; @@ -35,7 +36,6 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Question\ConfirmationQuestion; use Symfony\Component\Console\Question\Question; -use Symfony\Component\Finder\SplFileInfo; /** * @author Javier Eguiluz @@ -99,20 +99,6 @@ final class MakeEntity extends AbstractMaker implements InputAwareMakerInterface return; } - $entityFinder = $this->fileManager->createFinder('src/Entity/') - // remove if/when we allow entities in subdirectories - ->depth('<1') - ->name('*.php'); - $classes = []; - /** @var SplFileInfo $item */ - foreach ($entityFinder as $item) { - if (!$item->getRelativePathname()) { - continue; - } - - $classes[] = str_replace(['.php', '/'], ['', '\\'], $item->getRelativePathname()); - } - $argument = $command->getDefinition()->getArgument('name'); $question = $this->createEntityClassQuestion($argument->getDescription()); $value = $io->askQuestion($question); @@ -362,7 +348,7 @@ final class MakeEntity extends AbstractMaker implements InputAwareMakerInterface // this is a normal field $data = ['fieldName' => $fieldName, 'type' => $type]; - if ('string' == $type) { + if ('string' === $type) { // default to 255, avoid the question $data['length'] = $io->ask('Field length', 255, [Validator::class, 'validateLength']); } elseif ('decimal' === $type) { @@ -466,23 +452,9 @@ final class MakeEntity extends AbstractMaker implements InputAwareMakerInterface private function createEntityClassQuestion(string $questionText): Question { - $entityFinder = $this->fileManager->createFinder('src/Entity/') - // remove if/when we allow entities in subdirectories - ->depth('<1') - ->name('*.php'); - $classes = []; - /** @var SplFileInfo $item */ - foreach ($entityFinder as $item) { - if (!$item->getRelativePathname()) { - continue; - } - - $classes[] = str_replace('/', '\\', str_replace('.php', '', $item->getRelativePathname())); - } - $question = new Question($questionText); $question->setValidator([Validator::class, 'notBlank']); - $question->setAutocompleterValues($classes); + $question->setAutocompleterValues($this->doctrineHelper->getEntitiesForAutocomplete()); return $question; } @@ -494,17 +466,21 @@ final class MakeEntity extends AbstractMaker implements InputAwareMakerInterface while (null === $targetEntityClass) { $question = $this->createEntityClassQuestion('What class should this entity be related to?'); - $targetEntityClass = $io->askQuestion($question); + $answeredEntityClass = $io->askQuestion($question); - if (!class_exists($targetEntityClass)) { - if (!class_exists($this->getEntityNamespace().'\\'.$targetEntityClass)) { - $io->error(sprintf('Unknown class "%s"', $targetEntityClass)); - $targetEntityClass = null; + // find the correct class name - but give priority over looking + // in the Entity namespace versus just checking the full class + // name to avoid issues with classes like "Directory" that exist + // in PHP's core. + if (class_exists($this->getEntityNamespace().'\\'.$answeredEntityClass)) { + $targetEntityClass = $this->getEntityNamespace().'\\'.$answeredEntityClass; + } elseif (class_exists($answeredEntityClass)) { + $targetEntityClass = $answeredEntityClass; + } else { + $io->error(sprintf('Unknown class "%s"', $targetEntityClass)); + $targetEntityClass = null; - continue; - } - - $targetEntityClass = $this->getEntityNamespace().'\\'.$targetEntityClass; + continue; } } @@ -725,17 +701,17 @@ final class MakeEntity extends AbstractMaker implements InputAwareMakerInterface $rows = []; $rows[] = [ EntityRelation::MANY_TO_ONE, - sprintf("Each %s relates to (has) one %s.\nEach %s can relate/has to (have) many %s objects", $originalEntityShort, $targetEntityShort, $targetEntityShort, $originalEntityShort), + sprintf("Each %s relates to (has) one %s.\nEach %s can relate to (can have) many %s objects", $originalEntityShort, $targetEntityShort, $targetEntityShort, $originalEntityShort), ]; $rows[] = ['', '']; $rows[] = [ EntityRelation::ONE_TO_MANY, - sprintf("Each %s relates can relate to (have) many %s objects.\nEach %s relates to (has) one %s", $originalEntityShort, $targetEntityShort, $targetEntityShort, $originalEntityShort), + sprintf("Each %s can relate to (can have) many %s objects.\nEach %s relates to (has) one %s", $originalEntityShort, $targetEntityShort, $targetEntityShort, $originalEntityShort), ]; $rows[] = ['', '']; $rows[] = [ EntityRelation::MANY_TO_MANY, - sprintf("Each %s relates can relate to (have) many %s objects.\nEach %s can also relate to (have) many %s objects", $originalEntityShort, $targetEntityShort, $targetEntityShort, $originalEntityShort), + sprintf("Each %s can relate to (can have) many %s objects.\nEach %s can also relate to (can also have) many %s objects", $originalEntityShort, $targetEntityShort, $targetEntityShort, $originalEntityShort), ]; $rows[] = ['', '']; $rows[] = [ @@ -774,7 +750,9 @@ final class MakeEntity extends AbstractMaker implements InputAwareMakerInterface private function getPathOfClass(string $class): string { - return (new \ReflectionClass($class))->getFileName(); + $classDetails = new ClassDetails($class); + + return $classDetails->getPath(); } private function isClassInVendor(string $class): bool diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeForm.php b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeForm.php index 616d121f..f223c2ae 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeForm.php +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeForm.php @@ -17,6 +17,7 @@ use Symfony\Bundle\MakerBundle\DependencyBuilder; use Symfony\Bundle\MakerBundle\Doctrine\DoctrineHelper; use Symfony\Bundle\MakerBundle\Generator; use Symfony\Bundle\MakerBundle\InputConfiguration; +use Symfony\Bundle\MakerBundle\Renderer\FormTypeRenderer; use Symfony\Bundle\MakerBundle\Str; use Symfony\Bundle\MakerBundle\Util\ClassDetails; use Symfony\Bundle\MakerBundle\Validator; @@ -34,10 +35,12 @@ use Symfony\Component\Validator\Validation; final class MakeForm extends AbstractMaker { private $entityHelper; + private $formTypeRenderer; - public function __construct(DoctrineHelper $entityHelper) + public function __construct(DoctrineHelper $entityHelper, FormTypeRenderer $formTypeRenderer) { $this->entityHelper = $entityHelper; + $this->formTypeRenderer = $formTypeRenderer; } public static function getCommandName(): string @@ -81,10 +84,10 @@ final class MakeForm extends AbstractMaker 'Type' ); - $formFields = ['field_name']; - $boundClassVars = []; + $formFields = ['field_name' => null]; $boundClass = $input->getArgument('bound-class'); + $boundClassDetails = null; if (null !== $boundClass) { $boundClassDetails = $generator->createClassNameDetails( @@ -100,17 +103,12 @@ final class MakeForm extends AbstractMaker $classDetails = new ClassDetails($boundClassDetails->getFullName()); $formFields = $classDetails->getFormFields(); } - - $boundClassVars = [ - 'bounded_full_class_name' => $boundClassDetails->getFullName(), - 'bounded_class_name' => $boundClassDetails->getShortName(), - ]; } - $generator->generateClass( - $formClassNameDetails->getFullName(), - 'form/Type.tpl.php', - array_merge(['form_fields' => $formFields], $boundClassVars) + $this->formTypeRenderer->render( + $formClassNameDetails, + $formFields, + $boundClassDetails ); $generator->writeChanges(); diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeMigration.php b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeMigration.php index b03a5722..4d7899a0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeMigration.php +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Maker/MakeMigration.php @@ -75,17 +75,18 @@ final class MakeMigration extends AbstractMaker implements ApplicationAwareMaker $generateMigrationCommand = $this->application->find('doctrine:migrations:diff'); $commandOutput = new BufferedOutput($io->getVerbosity()); - $generateMigrationCommand->run(new ArgvInput($options), $commandOutput); - $migrationOutput = $commandOutput->fetch(); + try { + $generateMigrationCommand->run(new ArgvInput($options), $commandOutput); - if (false !== strpos($migrationOutput, 'No changes detected')) { - $io->warning([ - 'No database changes were detected.', - ]); - $io->text([ - 'The database schema and the application mapping information are already in sync.', - '', - ]); + $migrationOutput = $commandOutput->fetch(); + + if (false !== strpos($migrationOutput, 'No changes detected')) { + $this->noChangesMessage($io); + + return; + } + } catch (\Doctrine\Migrations\Generator\Exception\NoChangesDetected $exception) { + $this->noChangesMessage($io); return; } @@ -101,6 +102,17 @@ final class MakeMigration extends AbstractMaker implements ApplicationAwareMaker ]); } + private function noChangesMessage(ConsoleStyle $io) + { + $io->warning([ + 'No database changes were detected.', + ]); + $io->text([ + 'The database schema and the application mapping information are already in sync.', + '', + ]); + } + public function configureDependencies(DependencyBuilder $dependencies) { $dependencies->addClassDependency( diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/config/makers.xml b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/config/makers.xml index 1a972a8b..6094f151 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/config/makers.xml +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/config/makers.xml @@ -26,6 +26,7 @@ + @@ -43,6 +44,7 @@ + @@ -50,10 +52,21 @@ + + + + + + + + + + + diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/config/services.xml b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/config/services.xml index 56e5c4c4..6440feb7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/config/services.xml +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/config/services.xml @@ -50,5 +50,9 @@ + + + + diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/doc/index.rst b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/doc/index.rst index eaf8e22e..82b6b457 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/doc/index.rst +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/doc/index.rst @@ -4,7 +4,9 @@ The Symfony MakerBundle Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code. This bundle is an alternative to `SensioGeneratorBundle`_ for modern Symfony -applications and requires using Symfony 3.4 or newer and `Symfony Flex`_. +applications and requires using Symfony 3.4 or newer. This bundle +assumes you're using a standard Symfony 4 directory structure, but many +commands can generate code into any application. Installation ------------ @@ -49,7 +51,7 @@ the root namespace that is used to "guess" what classes you want to generate: .. code-block:: yaml - # config/packages/maker.yaml + # config/packages/dev/maker.yaml # create this file if you need to configure anything maker: # tell MakerBundle that all of your classes lives in an @@ -83,6 +85,5 @@ adding your *own* maker command is so easy, that we recommend that. However, if is some extension point that you'd like, please open an issue so we can discuss! .. _`SensioGeneratorBundle`: https://github.com/sensiolabs/SensioGeneratorBundle -.. _`Symfony Flex`: https://symfony.com/doc/current/setup/flex.html .. _`AbstractMaker`: https://github.com/symfony/maker-bundle/blob/master/src/Maker/AbstractMaker.php .. _`core maker commands`: https://github.com/symfony/maker-bundle/tree/master/src/Maker diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/help/MakeController.txt b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/help/MakeController.txt index 648ff3a0..526d1e11 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/help/MakeController.txt +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/help/MakeController.txt @@ -3,3 +3,7 @@ The %command.name% command generates a new controller class. php %command.full_name% CoolStuffController If the argument is missing, the command will ask for the controller class name interactively. + +You can also generate the controller alone, without template with this option: + +php %command.full_name% --no-template diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/skeleton/authenticator/LoginFormAuthenticator.tpl.php b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/skeleton/authenticator/LoginFormAuthenticator.tpl.php index 0843b4b1..b6e5566f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/skeleton/authenticator/LoginFormAuthenticator.tpl.php +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/skeleton/authenticator/LoginFormAuthenticator.tpl.php @@ -6,7 +6,7 @@ namespace ; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Routing\RouterInterface; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException; @@ -24,14 +24,14 @@ class extends AbstractFormLoginAuthenticator use TargetPathTrait; - private $router; + private $urlGenerator; private $csrfTokenManager; - public function __construct(RouterInterface $router, CsrfTokenManagerInterface $csrfTokenManager) + public function __construct(UrlGeneratorInterface $urlGenerator, CsrfTokenManagerInterface $csrfTokenManager) { entityManager = \$entityManager;\n" : null ?> - $this->router = $router; + $this->urlGenerator = $urlGenerator; $this->csrfTokenManager = $csrfTokenManager; passwordEncoder = \$passwordEncoder;\n" : null ?> } @@ -91,12 +91,12 @@ class extends AbstractFormLoginAuthenticator return new RedirectResponse($targetPath); } - // For example : return new RedirectResponse($this->router->generate('some_route')); + // For example : return new RedirectResponse($this->urlGenerator->generate('some_route')); throw new \Exception('TODO: provide a valid redirect inside '.__FILE__); } protected function getLoginUrl() { - return $this->router->generate('app_login'); + return $this->urlGenerator->generate('app_login'); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/skeleton/controller/Controller.tpl.php b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/skeleton/controller/Controller.tpl.php index 6f67ea93..f92ce62a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/skeleton/controller/Controller.tpl.php +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/skeleton/controller/Controller.tpl.php @@ -12,7 +12,7 @@ class extends */ public function index() { - + return $this->render('', [ 'controller_name' => '', ]); diff --git a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/skeleton/controller/twig_template.tpl.php b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/skeleton/controller/twig_template.tpl.php index f8045e9a..641318f9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/skeleton/controller/twig_template.tpl.php +++ b/src/cadolesuser-1.0/vendor/symfony/maker-bundle/src/Resources/skeleton/controller/twig_template.tpl.php @@ -1,4 +1,4 @@ -getHeadPrintCode('Hello {{ controller_name }}!'); ?> +getHeadPrintCode("Hello $class_name!"); ?> {% block body %} {% endblock %} @@ -455,9 +461,10 @@ {% macro form_tree_details(name, data, forms_by_hash, show) %} {% import _self as tree %}
    -

    - {{ name|default('(no name)') }} {% if data.type_class is defined %}({{ profiler_dump(data.type_class) }}){% endif %} -

    +

    {{ name|default('(no name)') }}

    + {% if data.type_class is defined %} +

    {{ profiler_dump(data.type_class) }}

    + {% endif %} {% if data.errors is defined and data.errors|length > 0 %}
    diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig index dbf3825e..b473b620 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig @@ -31,7 +31,7 @@ {% endblock %} {% block menu %} - + {{ include('@WebProfiler/Icon/twig.svg') }} Twig diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php index e0f29933..a507d36c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php @@ -32,7 +32,7 @@ class ProfilerControllerTest extends TestCase ->disableOriginalConstructor() ->getMock(); - $controller = new ProfilerController($urlGenerator, $profiler, $twig, array()); + $controller = new ProfilerController($urlGenerator, $profiler, $twig, []); $response = $controller->toolbarAction(Request::create('/_wdt/empty'), $token); $this->assertEquals(200, $response->getStatusCode()); @@ -40,11 +40,11 @@ class ProfilerControllerTest extends TestCase public function getEmptyTokenCases() { - return array( - array(null), + return [ + [null], // "empty" is also a valid empty token case, see https://github.com/symfony/symfony/issues/10806 - array('empty'), - ); + ['empty'], + ]; } /** @@ -59,10 +59,10 @@ class ProfilerControllerTest extends TestCase ->disableOriginalConstructor() ->getMock(); - $controller = new ProfilerController($urlGenerator, $profiler, $twig, array(), 'bottom', null, __DIR__.'/../..'); + $controller = new ProfilerController($urlGenerator, $profiler, $twig, [], 'bottom', null, __DIR__.'/../..'); try { - $response = $controller->openAction(Request::create('/_wdt/open', Request::METHOD_GET, array('file' => $path))); + $response = $controller->openAction(Request::create('/_wdt/open', Request::METHOD_GET, ['file' => $path])); $this->assertEquals(200, $response->getStatusCode()); $this->assertTrue($isAllowed); } catch (NotFoundHttpException $e) { @@ -72,15 +72,15 @@ class ProfilerControllerTest extends TestCase public function getOpenFileCases() { - return array( - array('README.md', true), - array('composer.json', true), - array('Controller/ProfilerController.php', true), - array('.gitignore', false), - array('../TwigBundle/README.md', false), - array('Controller/../README.md', false), - array('Controller/./ProfilerController.php', false), - ); + return [ + ['README.md', true], + ['composer.json', true], + ['Controller/ProfilerController.php', true], + ['.gitignore', false], + ['../TwigBundle/README.md', false], + ['Controller/../README.md', false], + ['Controller/./ProfilerController.php', false], + ]; } /** @@ -126,8 +126,8 @@ class ProfilerControllerTest extends TestCase $controller = $this->createController($profiler, $twig, $withCsp); - $tokens = array( - array( + $tokens = [ + [ 'token' => 'token1', 'ip' => '127.0.0.1', 'method' => 'GET', @@ -135,8 +135,8 @@ class ProfilerControllerTest extends TestCase 'time' => 0, 'parent' => null, 'status_code' => 200, - ), - array( + ], + [ 'token' => 'token2', 'ip' => '127.0.0.1', 'method' => 'GET', @@ -144,23 +144,23 @@ class ProfilerControllerTest extends TestCase 'time' => 0, 'parent' => null, 'status_code' => 404, - ), - ); + ], + ]; $profiler ->expects($this->once()) ->method('find') ->will($this->returnValue($tokens)); - $request = Request::create('/_profiler/empty/search/results', 'GET', array( + $request = Request::create('/_profiler/empty/search/results', 'GET', [ 'limit' => 2, 'ip' => '127.0.0.1', 'method' => 'GET', 'url' => 'http://example.com/', - )); + ]); $twig->expects($this->once()) ->method('render') - ->with($this->stringEndsWith('results.html.twig'), $this->equalTo(array( + ->with($this->stringEndsWith('results.html.twig'), $this->equalTo([ 'token' => 'empty', 'profile' => null, 'tokens' => $tokens, @@ -173,7 +173,7 @@ class ProfilerControllerTest extends TestCase 'limit' => 2, 'panel' => null, 'request' => $request, - ))); + ])); $response = $controller->searchResultsAction($request, 'empty'); $this->assertEquals(200, $response->getStatusCode()); @@ -181,10 +181,10 @@ class ProfilerControllerTest extends TestCase public function provideCspVariants() { - return array( - array(true), - array(false), - ); + return [ + [true], + [false], + ]; } private function createController($profiler, $twig, $withCSP) @@ -194,9 +194,9 @@ class ProfilerControllerTest extends TestCase if ($withCSP) { $nonceGenerator = $this->getMockBuilder('Symfony\Bundle\WebProfilerBundle\Csp\NonceGenerator')->getMock(); - return new ProfilerController($urlGenerator, $profiler, $twig, array(), 'bottom', new ContentSecurityPolicyHandler($nonceGenerator)); + return new ProfilerController($urlGenerator, $profiler, $twig, [], 'bottom', new ContentSecurityPolicyHandler($nonceGenerator)); } - return new ProfilerController($urlGenerator, $profiler, $twig, array()); + return new ProfilerController($urlGenerator, $profiler, $twig, []); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php index 51397783..bbf96c3b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php @@ -55,21 +55,21 @@ class ContentSecurityPolicyHandlerTest extends TestCase $responseScriptNonce = 'response-with-headers-script-nonce'; $responseStyleNonce = 'response-with-headers-style-nonce'; - $requestNonceHeaders = array( + $requestNonceHeaders = [ 'X-SymfonyProfiler-Script-Nonce' => $requestScriptNonce, 'X-SymfonyProfiler-Style-Nonce' => $requestStyleNonce, - ); - $responseNonceHeaders = array( + ]; + $responseNonceHeaders = [ 'X-SymfonyProfiler-Script-Nonce' => $responseScriptNonce, 'X-SymfonyProfiler-Style-Nonce' => $responseStyleNonce, - ); + ]; - return array( - array($nonce, array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), $this->createRequest(), $this->createResponse()), - array($nonce, array('csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce), $this->createRequest($requestNonceHeaders), $this->createResponse($responseNonceHeaders)), - array($nonce, array('csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce), $this->createRequest($requestNonceHeaders), $this->createResponse()), - array($nonce, array('csp_script_nonce' => $responseScriptNonce, 'csp_style_nonce' => $responseStyleNonce), $this->createRequest(), $this->createResponse($responseNonceHeaders)), - ); + return [ + [$nonce, ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], $this->createRequest(), $this->createResponse()], + [$nonce, ['csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce], $this->createRequest($requestNonceHeaders), $this->createResponse($responseNonceHeaders)], + [$nonce, ['csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce], $this->createRequest($requestNonceHeaders), $this->createResponse()], + [$nonce, ['csp_script_nonce' => $responseScriptNonce, 'csp_style_nonce' => $responseStyleNonce], $this->createRequest(), $this->createResponse($responseNonceHeaders)], + ]; } public function provideRequestAndResponsesForOnKernelResponse() @@ -82,103 +82,103 @@ class ContentSecurityPolicyHandlerTest extends TestCase $responseScriptNonce = 'response-with-headers-script-nonce'; $responseStyleNonce = 'response-with-headers-style-nonce'; - $requestNonceHeaders = array( + $requestNonceHeaders = [ 'X-SymfonyProfiler-Script-Nonce' => $requestScriptNonce, 'X-SymfonyProfiler-Style-Nonce' => $requestStyleNonce, - ); - $responseNonceHeaders = array( + ]; + $responseNonceHeaders = [ 'X-SymfonyProfiler-Script-Nonce' => $responseScriptNonce, 'X-SymfonyProfiler-Style-Nonce' => $responseStyleNonce, - ); + ]; - return array( - array( + return [ + [ $nonce, - array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], $this->createRequest(), $this->createResponse(), - array('Content-Security-Policy' => null, 'Content-Security-Policy-Report-Only' => null, 'X-Content-Security-Policy' => null), - ), - array( - $nonce, array('csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce), + ['Content-Security-Policy' => null, 'Content-Security-Policy-Report-Only' => null, 'X-Content-Security-Policy' => null], + ], + [ + $nonce, ['csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce], $this->createRequest($requestNonceHeaders), $this->createResponse($responseNonceHeaders), - array('Content-Security-Policy' => null, 'Content-Security-Policy-Report-Only' => null, 'X-Content-Security-Policy' => null), - ), - array( + ['Content-Security-Policy' => null, 'Content-Security-Policy-Report-Only' => null, 'X-Content-Security-Policy' => null], + ], + [ $nonce, - array('csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce), + ['csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce], $this->createRequest($requestNonceHeaders), $this->createResponse(), - array('Content-Security-Policy' => null, 'Content-Security-Policy-Report-Only' => null, 'X-Content-Security-Policy' => null), - ), - array( + ['Content-Security-Policy' => null, 'Content-Security-Policy-Report-Only' => null, 'X-Content-Security-Policy' => null], + ], + [ $nonce, - array('csp_script_nonce' => $responseScriptNonce, 'csp_style_nonce' => $responseStyleNonce), + ['csp_script_nonce' => $responseScriptNonce, 'csp_style_nonce' => $responseStyleNonce], $this->createRequest(), $this->createResponse($responseNonceHeaders), - array('Content-Security-Policy' => null, 'Content-Security-Policy-Report-Only' => null, 'X-Content-Security-Policy' => null), - ), - array( + ['Content-Security-Policy' => null, 'Content-Security-Policy-Report-Only' => null, 'X-Content-Security-Policy' => null], + ], + [ $nonce, - array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], $this->createRequest(), - $this->createResponse(array('Content-Security-Policy' => 'frame-ancestors https: ; form-action: https:', 'Content-Security-Policy-Report-Only' => 'frame-ancestors http: ; form-action: http:')), - array('Content-Security-Policy' => 'frame-ancestors https: ; form-action: https:', 'Content-Security-Policy-Report-Only' => 'frame-ancestors http: ; form-action: http:', 'X-Content-Security-Policy' => null), - ), - array( + $this->createResponse(['Content-Security-Policy' => 'frame-ancestors https: ; form-action: https:', 'Content-Security-Policy-Report-Only' => 'frame-ancestors http: ; form-action: http:']), + ['Content-Security-Policy' => 'frame-ancestors https: ; form-action: https:', 'Content-Security-Policy-Report-Only' => 'frame-ancestors http: ; form-action: http:', 'X-Content-Security-Policy' => null], + ], + [ $nonce, - array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], $this->createRequest(), - $this->createResponse(array('Content-Security-Policy' => 'default-src \'self\' domain.com; script-src \'self\' \'unsafe-inline\'', 'Content-Security-Policy-Report-Only' => 'default-src \'self\' domain-report-only.com; script-src \'self\' \'unsafe-inline\'')), - array('Content-Security-Policy' => 'default-src \'self\' domain.com; script-src \'self\' \'unsafe-inline\'; style-src \'self\' domain.com \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'Content-Security-Policy-Report-Only' => 'default-src \'self\' domain-report-only.com; script-src \'self\' \'unsafe-inline\'; style-src \'self\' domain-report-only.com \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'X-Content-Security-Policy' => null), - ), - array( + $this->createResponse(['Content-Security-Policy' => 'default-src \'self\' domain.com; script-src \'self\' \'unsafe-inline\'', 'Content-Security-Policy-Report-Only' => 'default-src \'self\' domain-report-only.com; script-src \'self\' \'unsafe-inline\'']), + ['Content-Security-Policy' => 'default-src \'self\' domain.com; script-src \'self\' \'unsafe-inline\'; style-src \'self\' domain.com \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'Content-Security-Policy-Report-Only' => 'default-src \'self\' domain-report-only.com; script-src \'self\' \'unsafe-inline\'; style-src \'self\' domain-report-only.com \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'X-Content-Security-Policy' => null], + ], + [ $nonce, - array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], $this->createRequest(), - $this->createResponse(array('Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'')), - array('Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'', 'X-Content-Security-Policy' => null), - ), - array( + $this->createResponse(['Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'']), + ['Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'', 'X-Content-Security-Policy' => null], + ], + [ $nonce, - array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], $this->createRequest(), - $this->createResponse(array('Content-Security-Policy' => 'script-src \'self\'; style-src \'self\'')), - array('Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'; style-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'X-Content-Security-Policy' => null), - ), - array( + $this->createResponse(['Content-Security-Policy' => 'script-src \'self\'; style-src \'self\'']), + ['Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'; style-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'X-Content-Security-Policy' => null], + ], + [ $nonce, - array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], $this->createRequest(), - $this->createResponse(array('X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'')), - array('X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'', 'Content-Security-Policy' => null), - ), - array( + $this->createResponse(['X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'']), + ['X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'', 'Content-Security-Policy' => null], + ], + [ $nonce, - array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], $this->createRequest(), - $this->createResponse(array('X-Content-Security-Policy' => 'script-src \'self\'')), - array('X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'Content-Security-Policy' => null), - ), - array( + $this->createResponse(['X-Content-Security-Policy' => 'script-src \'self\'']), + ['X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'Content-Security-Policy' => null], + ], + [ $nonce, - array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], $this->createRequest(), - $this->createResponse(array('X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'sha384-LALALALALAAL\'')), - array('X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'sha384-LALALALALAAL\' \'nonce-'.$nonce.'\'', 'Content-Security-Policy' => null), - ), - array( + $this->createResponse(['X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'sha384-LALALALALAAL\'']), + ['X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'sha384-LALALALALAAL\' \'nonce-'.$nonce.'\'', 'Content-Security-Policy' => null], + ], + [ $nonce, - array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], $this->createRequest(), - $this->createResponse(array('Content-Security-Policy' => 'script-src \'self\'; style-src \'self\'', 'X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'; style-src \'self\'')), - array('Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'; style-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'; style-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\''), - ), - ); + $this->createResponse(['Content-Security-Policy' => 'script-src \'self\'; style-src \'self\'', 'X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'; style-src \'self\'']), + ['Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'; style-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'; style-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\''], + ], + ]; } - private function createRequest(array $headers = array()) + private function createRequest(array $headers = []) { $request = new Request(); $request->headers->add($headers); @@ -186,7 +186,7 @@ class ContentSecurityPolicyHandlerTest extends TestCase return $request; } - private function createResponse(array $headers = array()) + private function createResponse(array $headers = []) { $response = new Response(); $response->headers->add($headers); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php index 8028c2cd..232f864c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php @@ -24,7 +24,7 @@ class ConfigurationTest extends TestCase { $processor = new Processor(); $configuration = new Configuration(); - $config = $processor->processConfiguration($configuration, array($options)); + $config = $processor->processConfiguration($configuration, [$options]); $this->assertEquals($results, $config); } @@ -38,27 +38,27 @@ class ConfigurationTest extends TestCase { $processor = new Processor(); $configuration = new Configuration(); - $config = $processor->processConfiguration($configuration, array($options)); + $config = $processor->processConfiguration($configuration, [$options]); $this->assertEquals($results, $config); } public function getDebugModes() { - return array( - array(array(), array('intercept_redirects' => false, 'toolbar' => false, 'position' => 'bottom', 'excluded_ajax_paths' => '^/((index|app(_[\w]+)?)\.php/)?_wdt')), - array(array('intercept_redirects' => true), array('intercept_redirects' => true, 'toolbar' => false, 'position' => 'bottom', 'excluded_ajax_paths' => '^/((index|app(_[\w]+)?)\.php/)?_wdt')), - array(array('intercept_redirects' => false), array('intercept_redirects' => false, 'toolbar' => false, 'position' => 'bottom', 'excluded_ajax_paths' => '^/((index|app(_[\w]+)?)\.php/)?_wdt')), - array(array('toolbar' => true), array('intercept_redirects' => false, 'toolbar' => true, 'position' => 'bottom', 'excluded_ajax_paths' => '^/((index|app(_[\w]+)?)\.php/)?_wdt')), - array(array('excluded_ajax_paths' => 'test'), array('intercept_redirects' => false, 'toolbar' => false, 'position' => 'bottom', 'excluded_ajax_paths' => 'test')), - ); + return [ + [[], ['intercept_redirects' => false, 'toolbar' => false, 'position' => 'bottom', 'excluded_ajax_paths' => '^/((index|app(_[\w]+)?)\.php/)?_wdt']], + [['intercept_redirects' => true], ['intercept_redirects' => true, 'toolbar' => false, 'position' => 'bottom', 'excluded_ajax_paths' => '^/((index|app(_[\w]+)?)\.php/)?_wdt']], + [['intercept_redirects' => false], ['intercept_redirects' => false, 'toolbar' => false, 'position' => 'bottom', 'excluded_ajax_paths' => '^/((index|app(_[\w]+)?)\.php/)?_wdt']], + [['toolbar' => true], ['intercept_redirects' => false, 'toolbar' => true, 'position' => 'bottom', 'excluded_ajax_paths' => '^/((index|app(_[\w]+)?)\.php/)?_wdt']], + [['excluded_ajax_paths' => 'test'], ['intercept_redirects' => false, 'toolbar' => false, 'position' => 'bottom', 'excluded_ajax_paths' => 'test']], + ]; } public function getPositionConfig() { - return array( - array(array('position' => 'top'), array('intercept_redirects' => false, 'toolbar' => false, 'excluded_ajax_paths' => '^/((index|app(_[\w]+)?)\.php/)?_wdt', 'position' => 'top')), - array(array('position' => 'bottom'), array('intercept_redirects' => false, 'toolbar' => false, 'excluded_ajax_paths' => '^/((index|app(_[\w]+)?)\.php/)?_wdt', 'position' => 'bottom')), - ); + return [ + [['position' => 'top'], ['intercept_redirects' => false, 'toolbar' => false, 'excluded_ajax_paths' => '^/((index|app(_[\w]+)?)\.php/)?_wdt', 'position' => 'top']], + [['position' => 'bottom'], ['intercept_redirects' => false, 'toolbar' => false, 'excluded_ajax_paths' => '^/((index|app(_[\w]+)?)\.php/)?_wdt', 'position' => 'bottom']], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php index e00f98b1..7ec5f7dc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php @@ -28,9 +28,9 @@ class WebProfilerExtensionTest extends TestCase */ private $container; - public static function assertSaneContainer(Container $container, $message = '', $knownPrivates = array()) + public static function assertSaneContainer(Container $container, $message = '', $knownPrivates = []) { - $errors = array(); + $errors = []; $knownPrivates[] = 'debug.file_link_formatter.url_format'; foreach ($container->getServiceIds() as $id) { if (\in_array($id, $knownPrivates, true)) { // to be removed in 4.0 @@ -43,7 +43,7 @@ class WebProfilerExtensionTest extends TestCase } } - self::assertEquals(array(), $errors, $message); + self::assertEquals([], $errors, $message); } protected function setUp() @@ -56,19 +56,19 @@ class WebProfilerExtensionTest extends TestCase $this->container->register('event_dispatcher', EventDispatcher::class)->setPublic(true); $this->container->register('router', $this->getMockClass('Symfony\\Component\\Routing\\RouterInterface'))->setPublic(true); $this->container->register('twig', 'Twig\Environment')->setPublic(true); - $this->container->register('twig_loader', 'Twig\Loader\ArrayLoader')->addArgument(array())->setPublic(true); + $this->container->register('twig_loader', 'Twig\Loader\ArrayLoader')->addArgument([])->setPublic(true); $this->container->register('twig', 'Twig\Environment')->addArgument(new Reference('twig_loader'))->setPublic(true); - $this->container->setParameter('kernel.bundles', array()); + $this->container->setParameter('kernel.bundles', []); $this->container->setParameter('kernel.cache_dir', __DIR__); $this->container->setParameter('kernel.debug', false); $this->container->setParameter('kernel.project_dir', __DIR__); $this->container->setParameter('kernel.charset', 'UTF-8'); $this->container->setParameter('debug.file_link_format', null); - $this->container->setParameter('profiler.class', array('Symfony\\Component\\HttpKernel\\Profiler\\Profiler')); + $this->container->setParameter('profiler.class', ['Symfony\\Component\\HttpKernel\\Profiler\\Profiler']); $this->container->register('profiler', $this->getMockClass('Symfony\\Component\\HttpKernel\\Profiler\\Profiler')) ->setPublic(true) ->addArgument(new Definition($this->getMockClass('Symfony\\Component\\HttpKernel\\Profiler\\ProfilerStorageInterface'))); - $this->container->setParameter('data_collector.templates', array()); + $this->container->setParameter('data_collector.templates', []); $this->container->set('kernel', $this->kernel); $this->container->addCompilerPass(new RegisterListenersPass()); } @@ -89,7 +89,7 @@ class WebProfilerExtensionTest extends TestCase $this->container->setParameter('kernel.debug', $debug); $extension = new WebProfilerExtension(); - $extension->load(array(array()), $this->container); + $extension->load([[]], $this->container); $this->assertFalse($this->container->has('web_profiler.debug_toolbar')); @@ -102,11 +102,11 @@ class WebProfilerExtensionTest extends TestCase public function testToolbarConfig($toolbarEnabled, $interceptRedirects, $listenerInjected, $listenerEnabled) { $extension = new WebProfilerExtension(); - $extension->load(array(array('toolbar' => $toolbarEnabled, 'intercept_redirects' => $interceptRedirects)), $this->container); + $extension->load([['toolbar' => $toolbarEnabled, 'intercept_redirects' => $interceptRedirects]], $this->container); $this->assertSame($listenerInjected, $this->container->has('web_profiler.debug_toolbar')); - $this->assertSaneContainer($this->getCompiledContainer(), '', array('web_profiler.csp.handler')); + $this->assertSaneContainer($this->getCompiledContainer(), '', ['web_profiler.csp.handler']); if ($listenerInjected) { $this->assertSame($listenerEnabled, $this->container->get('web_profiler.debug_toolbar')->isEnabled()); @@ -115,12 +115,12 @@ class WebProfilerExtensionTest extends TestCase public function getDebugModes() { - return array( - array(false, false, false, false), - array(true, false, true, true), - array(false, true, true, false), - array(true, true, true, true), - ); + return [ + [false, false, false, false], + [true, false, true, true], + [false, true, true, false], + [true, true, true, true], + ]; } private function getCompiledContainer() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php index ec420107..a6ed9e8d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php @@ -33,15 +33,15 @@ class WebDebugToolbarListenerTest extends TestCase $response = new Response($content); - $m->invoke($listener, $response, Request::create('/'), array('csp_script_nonce' => 'scripto', 'csp_style_nonce' => 'stylo')); + $m->invoke($listener, $response, Request::create('/'), ['csp_script_nonce' => 'scripto', 'csp_style_nonce' => 'stylo']); $this->assertEquals($expected, $response->getContent()); } public function getInjectToolbarTests() { - return array( - array('', "\nWDT\n"), - array(' + return [ + ['', "\nWDT\n"], + [' @@ -51,8 +51,8 @@ class WebDebugToolbarListenerTest extends TestCase \nWDT\n - "), - ); + "], + ]; } /** @@ -134,12 +134,12 @@ class WebDebugToolbarListenerTest extends TestCase public function provideRedirects() { - return array( - array(301, true), - array(302, true), - array(301, false), - array(302, false), - ); + return [ + [301, true], + [302, true], + [301, false], + [302, false], + ]; } /** @@ -230,7 +230,7 @@ class WebDebugToolbarListenerTest extends TestCase $urlGenerator ->expects($this->once()) ->method('generate') - ->with('_profiler', array('token' => 'xxxxxxxx'), UrlGeneratorInterface::ABSOLUTE_URL) + ->with('_profiler', ['token' => 'xxxxxxxx'], UrlGeneratorInterface::ABSOLUTE_URL) ->will($this->returnValue('http://mydomain.com/_profiler/xxxxxxxx')) ; @@ -251,8 +251,8 @@ class WebDebugToolbarListenerTest extends TestCase $urlGenerator ->expects($this->once()) ->method('generate') - ->with('_profiler', array('token' => 'xxxxxxxx')) - ->will($this->throwException(new \Exception('foo'))) + ->with('_profiler', ['token' => 'xxxxxxxx']) + ->willThrowException(new \Exception('foo')) ; $event = new FilterResponseEvent($this->getKernelMock(), $this->getRequestMock(), HttpKernelInterface::MASTER_REQUEST, $response); @@ -272,8 +272,8 @@ class WebDebugToolbarListenerTest extends TestCase $urlGenerator ->expects($this->once()) ->method('generate') - ->with('_profiler', array('token' => 'xxxxxxxx')) - ->will($this->throwException(new \Exception("This\nmultiline\r\ntabbed text should\tcome out\r on\n \ta single plain\r\nline"))) + ->with('_profiler', ['token' => 'xxxxxxxx']) + ->willThrowException(new \Exception("This\nmultiline\r\ntabbed text should\tcome out\r on\n \ta single plain\r\nline")) ; $event = new FilterResponseEvent($this->getKernelMock(), $this->getRequestMock(), HttpKernelInterface::MASTER_REQUEST, $response); @@ -286,7 +286,7 @@ class WebDebugToolbarListenerTest extends TestCase protected function getRequestMock($isXmlHttpRequest = false, $requestFormat = 'html', $hasSession = true) { - $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->setMethods(array('getSession', 'isXmlHttpRequest', 'getRequestFormat'))->disableOriginalConstructor()->getMock(); + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->setMethods(['getSession', 'isXmlHttpRequest', 'getRequestFormat'])->disableOriginalConstructor()->getMock(); $request->expects($this->any()) ->method('isXmlHttpRequest') ->will($this->returnValue($isXmlHttpRequest)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php index a65a3899..18d4cc44 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php @@ -13,6 +13,7 @@ namespace Symfony\Bundle\WebProfilerBundle\Tests\Profiler; use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager; use Symfony\Bundle\WebProfilerBundle\Tests\TestCase; +use Symfony\Component\HttpKernel\Profiler\Profile; use Twig\Environment; /** @@ -43,11 +44,11 @@ class TemplateManagerTest extends TestCase $profiler = $this->mockProfiler(); $twigEnvironment = $this->mockTwigEnvironment(); - $templates = array( - 'data_collector.foo' => array('foo', 'FooBundle:Collector:foo'), - 'data_collector.bar' => array('bar', 'FooBundle:Collector:bar'), - 'data_collector.baz' => array('baz', 'FooBundle:Collector:baz'), - ); + $templates = [ + 'data_collector.foo' => ['foo', 'FooBundle:Collector:foo'], + 'data_collector.bar' => ['bar', 'FooBundle:Collector:bar'], + 'data_collector.baz' => ['baz', 'FooBundle:Collector:baz'], + ]; $this->templateManager = new TemplateManager($profiler, $twigEnvironment, $templates); } @@ -57,8 +58,7 @@ class TemplateManagerTest extends TestCase */ public function testGetNameOfInvalidTemplate() { - $profile = $this->mockProfile(); - $this->templateManager->getName($profile, 'notexistingpanel'); + $this->templateManager->getName(new Profile('token'), 'notexistingpanel'); } /** @@ -69,14 +69,9 @@ class TemplateManagerTest extends TestCase $this->profiler->expects($this->any()) ->method('has') ->withAnyParameters() - ->will($this->returnCallback(array($this, 'profilerHasCallback'))); + ->will($this->returnCallback([$this, 'profilerHasCallback'])); - $profile = $this->mockProfile(); - $profile->expects($this->any()) - ->method('hasCollector') - ->will($this->returnCallback(array($this, 'profileHasCollectorCallback'))); - - $this->assertEquals('FooBundle:Collector:foo.html.twig', $this->templateManager->getName($profile, 'foo')); + $this->assertEquals('FooBundle:Collector:foo.html.twig', $this->templateManager->getName(new ProfileDummy(), 'foo')); } /** @@ -85,17 +80,12 @@ class TemplateManagerTest extends TestCase */ public function testGetTemplates() { - $profile = $this->mockProfile(); - $profile->expects($this->any()) - ->method('hasCollector') - ->will($this->returnCallback(array($this, 'profilerHasCallback'))); - $this->profiler->expects($this->any()) ->method('has') ->withAnyParameters() - ->will($this->returnCallback(array($this, 'profileHasCollectorCallback'))); + ->will($this->returnCallback([$this, 'profileHasCollectorCallback'])); - $result = $this->templateManager->getTemplates($profile); + $result = $this->templateManager->getTemplates(new ProfileDummy()); $this->assertArrayHasKey('foo', $result); $this->assertArrayNotHasKey('bar', $result); $this->assertArrayNotHasKey('baz', $result); @@ -155,3 +145,22 @@ class TemplateManagerTest extends TestCase return $this->profiler; } } + +class ProfileDummy extends Profile +{ + public function __construct() + { + parent::__construct('token'); + } + + public function hasCollector($name) + { + switch ($name) { + case 'foo': + case 'bar': + return true; + default: + return false; + } + } +} diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php index 61d07815..0d0acde3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php @@ -73,18 +73,18 @@ class WebProfilerExtension extends ProfilerExtension return $value instanceof Data ? $this->dumpData($env, $value, $maxDepth) : twig_escape_filter($env, $this->dumpValue($value)); }; - return array( - new TwigFunction('profiler_dump', $profilerDump, array('is_safe' => array('html'), 'needs_environment' => true)), - new TwigFunction('profiler_dump_log', array($this, 'dumpLog'), array('is_safe' => array('html'), 'needs_environment' => true)), - ); + return [ + new TwigFunction('profiler_dump', $profilerDump, ['is_safe' => ['html'], 'needs_environment' => true]), + new TwigFunction('profiler_dump_log', [$this, 'dumpLog'], ['is_safe' => ['html'], 'needs_environment' => true]), + ]; } public function dumpData(Environment $env, Data $data, $maxDepth = 0) { $this->dumper->setCharset($env->getCharset()); - $this->dumper->dump($data, null, array( + $this->dumper->dump($data, null, [ 'maxDepth' => $maxDepth, - )); + ]); $dump = stream_get_contents($this->output, -1, 0); rewind($this->output); @@ -102,7 +102,7 @@ class WebProfilerExtension extends ProfilerExtension return ''.$message.''; } - $replacements = array(); + $replacements = []; foreach ($context as $k => $v) { $k = '{'.twig_escape_filter($env, $k).'}'; $replacements['"'.$k.'"'] = $replacements['"'.$k.'"'] = $replacements[$k] = $this->dumpData($env, $v); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerLogCommand.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerLogCommand.php index a9c62c99..73c51cc8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerLogCommand.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerLogCommand.php @@ -27,7 +27,7 @@ use Symfony\Component\ExpressionLanguage\ExpressionLanguage; */ class ServerLogCommand extends Command { - private static $bgColor = array('black', 'blue', 'cyan', 'green', 'magenta', 'red', 'white', 'yellow'); + private static $bgColor = ['black', 'blue', 'cyan', 'green', 'magenta', 'red', 'white', 'yellow']; private $el; private $handler; @@ -87,12 +87,12 @@ EOF $this->handler = new ConsoleHandler($output); - $this->handler->setFormatter(new ConsoleFormatter(array( + $this->handler->setFormatter(new ConsoleFormatter([ 'format' => str_replace('\n', "\n", $input->getOption('format')), 'date_format' => $input->getOption('date-format'), 'colors' => $output->isDecorated(), 'multiline' => OutputInterface::VERBOSITY_DEBUG <= $output->getVerbosity(), - ))); + ])); if (false === strpos($host = $input->getOption('host'), '://')) { $host = 'tcp://'.$host; @@ -120,8 +120,8 @@ EOF private function getLogs($socket) { - $sockets = array((int) $socket => $socket); - $write = array(); + $sockets = [(int) $socket => $socket]; + $write = []; while (true) { $read = $sockets; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php index 634ef2c2..c5b09733 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php @@ -47,11 +47,11 @@ class ServerRunCommand extends ServerCommand protected function configure() { $this - ->setDefinition(array( + ->setDefinition([ new InputArgument('addressport', InputArgument::OPTIONAL, 'The address to listen to (can be address:port, address, or port)'), new InputOption('docroot', 'd', InputOption::VALUE_REQUIRED, 'Document root, usually where your front controllers are stored'), new InputOption('router', 'r', InputOption::VALUE_REQUIRED, 'Path to custom router script'), - )) + ]) ->setDescription('Runs a local web server') ->setHelp(<<<'EOF' %command.name% runs a local web server: By default, the server diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerStartCommand.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerStartCommand.php index 591a7e8f..22447c66 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerStartCommand.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerStartCommand.php @@ -47,12 +47,12 @@ class ServerStartCommand extends ServerCommand protected function configure() { $this - ->setDefinition(array( + ->setDefinition([ new InputArgument('addressport', InputArgument::OPTIONAL, 'The address to listen to (can be address:port, address, or port)'), new InputOption('docroot', 'd', InputOption::VALUE_REQUIRED, 'Document root'), new InputOption('router', 'r', InputOption::VALUE_REQUIRED, 'Path to custom router script'), new InputOption('pidfile', null, InputOption::VALUE_REQUIRED, 'PID file'), - )) + ]) ->setDescription('Starts a local web server in the background') ->setHelp(<<<'EOF' %command.name% runs a local web server: By default, the server @@ -90,10 +90,10 @@ EOF $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); if (!\extension_loaded('pcntl')) { - $io->error(array( + $io->error([ 'This command needs the pcntl extension to run.', 'You can either install it or use the "server:run" command instead.', - )); + ]); if ($io->confirm('Do you want to execute server:run immediately?', false)) { return $this->getApplication()->find('server:run')->run($input, $output); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerStatusCommand.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerStatusCommand.php index 907f69f1..36d6d290 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerStatusCommand.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerStatusCommand.php @@ -35,10 +35,10 @@ class ServerStatusCommand extends ServerCommand protected function configure() { $this - ->setDefinition(array( + ->setDefinition([ new InputOption('pidfile', null, InputOption::VALUE_REQUIRED, 'PID file'), new InputOption('filter', null, InputOption::VALUE_REQUIRED, 'The value to display (one of port, host, or address)'), - )) + ]) ->setDescription('Outputs the status of the local web server') ->setHelp(<<<'EOF' %command.name% shows the details of the given local web diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerStopCommand.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerStopCommand.php index 5f9189d3..c4edd370 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerStopCommand.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerStopCommand.php @@ -33,9 +33,9 @@ class ServerStopCommand extends ServerCommand protected function configure() { $this - ->setDefinition(array( + ->setDefinition([ new InputOption('pidfile', null, InputOption::VALUE_REQUIRED, 'PID file'), - )) + ]) ->setDescription('Stops the local web server that was started with the server:start command') ->setHelp(<<<'EOF' %command.name% stops the local web server: diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/DependencyInjection/WebServerExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/DependencyInjection/WebServerExtension.php index 3dc492dc..bf08a2ba 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/DependencyInjection/WebServerExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/DependencyInjection/WebServerExtension.php @@ -27,8 +27,31 @@ class WebServerExtension extends Extension $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('webserver.xml'); + $publicDirectory = $this->getPublicDirectory($container); + $container->getDefinition('web_server.command.server_run')->replaceArgument(0, $publicDirectory); + $container->getDefinition('web_server.command.server_start')->replaceArgument(0, $publicDirectory); + if (!class_exists(ConsoleFormatter::class)) { $container->removeDefinition('web_server.command.server_log'); } } + + private function getPublicDirectory(ContainerBuilder $container) + { + $kernelProjectDir = $container->getParameter('kernel.project_dir'); + $publicDir = 'public'; + $composerFilePath = $kernelProjectDir.'/composer.json'; + + if (!file_exists($composerFilePath)) { + return $kernelProjectDir.'/'.$publicDir; + } + + $composerConfig = json_decode(file_get_contents($composerFilePath), true); + + if (isset($composerConfig['extra']['public-dir'])) { + $publicDir = $composerConfig['extra']['public-dir']; + } + + return $kernelProjectDir.'/'.$publicDir; + } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Resources/router.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Resources/router.php index a366b381..30d6b258 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Resources/router.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Resources/router.php @@ -17,8 +17,8 @@ * If you have custom directory layout, then you have to write your own router * and pass it as a value to 'router' option of server:run command. * - * @author: Michał Pipa - * @author: Albert Jessurum + * @author Michał Pipa + * @author Albert Jessurum */ // Workaround https://bugs.php.net/64566 diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Tests/DependencyInjection/WebServerExtensionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Tests/DependencyInjection/WebServerExtensionTest.php index ebc0c942..f52f0d2c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Tests/DependencyInjection/WebServerExtensionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Tests/DependencyInjection/WebServerExtensionTest.php @@ -21,8 +21,17 @@ class WebServerExtensionTest extends TestCase public function testLoad() { $container = new ContainerBuilder(); - (new WebServerExtension())->load(array(), $container); + $container->setParameter('kernel.project_dir', __DIR__); + (new WebServerExtension())->load([], $container); + $this->assertSame( + __DIR__.'/test', + $container->getDefinition('web_server.command.server_run')->getArgument(0) + ); + $this->assertSame( + __DIR__.'/test', + $container->getDefinition('web_server.command.server_start')->getArgument(0) + ); $this->assertTrue($container->hasDefinition('web_server.command.server_run')); $this->assertTrue($container->hasDefinition('web_server.command.server_start')); $this->assertTrue($container->hasDefinition('web_server.command.server_stop')); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/WebServer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/WebServer.php index f727b3ed..3f28c732 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/WebServer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/WebServer.php @@ -150,12 +150,12 @@ class WebServer throw new \RuntimeException('Unable to find the PHP binary.'); } - $process = new Process(array_merge(array($binary), $finder->findArguments(), array('-dvariables_order=EGPCS', '-S', $config->getAddress(), $config->getRouter()))); + $process = new Process(array_merge([$binary], $finder->findArguments(), ['-dvariables_order=EGPCS', '-S', $config->getAddress(), $config->getRouter()])); $process->setWorkingDirectory($config->getDocumentRoot()); $process->setTimeout(null); if (\in_array('APP_ENV', explode(',', getenv('SYMFONY_DOTENV_VARS')))) { - $process->setEnv(array('APP_ENV' => false)); + $process->setEnv(['APP_ENV' => false]); $process->inheritEnvironmentVariables(); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/WebServerConfig.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/WebServerConfig.php index 8b88eaec..059ea3be 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/WebServerConfig.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/WebServerConfig.php @@ -114,7 +114,7 @@ class WebServerConfig private function getFrontControllerFileNames($env) { - return array('app_'.$env.'.php', 'app.php', 'index_'.$env.'.php', 'index.php'); + return ['app_'.$env.'.php', 'app.php', 'index_'.$env.'.php', 'index.php']; } private function findBestPort() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Packages.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Packages.php index 63808d90..3e82dcdc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Packages.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Packages.php @@ -23,13 +23,13 @@ use Symfony\Component\Asset\Exception\LogicException; class Packages { private $defaultPackage; - private $packages = array(); + private $packages = []; /** * @param PackageInterface $defaultPackage The default package * @param PackageInterface[] $packages Additional packages indexed by name */ - public function __construct(PackageInterface $defaultPackage = null, array $packages = array()) + public function __construct(PackageInterface $defaultPackage = null, array $packages = []) { $this->defaultPackage = $defaultPackage; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PackageTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PackageTest.php index a5da219b..8f6626ae 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PackageTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PackageTest.php @@ -29,22 +29,22 @@ class PackageTest extends TestCase public function getConfigs() { - return array( - array('v1', '', 'http://example.com/foo', 'http://example.com/foo'), - array('v1', '', 'https://example.com/foo', 'https://example.com/foo'), - array('v1', '', '//example.com/foo', '//example.com/foo'), + return [ + ['v1', '', 'http://example.com/foo', 'http://example.com/foo'], + ['v1', '', 'https://example.com/foo', 'https://example.com/foo'], + ['v1', '', '//example.com/foo', '//example.com/foo'], - array('v1', '', '/foo', '/foo?v1'), - array('v1', '', 'foo', 'foo?v1'), + ['v1', '', '/foo', '/foo?v1'], + ['v1', '', 'foo', 'foo?v1'], - array(null, '', '/foo', '/foo'), - array(null, '', 'foo', 'foo'), + [null, '', '/foo', '/foo'], + [null, '', 'foo', 'foo'], - array('v1', 'version-%2$s/%1$s', '/foo', '/version-v1/foo'), - array('v1', 'version-%2$s/%1$s', 'foo', 'version-v1/foo'), - array('v1', 'version-%2$s/%1$s', 'foo/', 'version-v1/foo/'), - array('v1', 'version-%2$s/%1$s', '/foo/', '/version-v1/foo/'), - ); + ['v1', 'version-%2$s/%1$s', '/foo', '/version-v1/foo'], + ['v1', 'version-%2$s/%1$s', 'foo', 'version-v1/foo'], + ['v1', 'version-%2$s/%1$s', 'foo/', 'version-v1/foo/'], + ['v1', 'version-%2$s/%1$s', '/foo/', '/version-v1/foo/'], + ]; } public function testGetVersion() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PackagesTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PackagesTest.php index 4b0872f7..b751986d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PackagesTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PackagesTest.php @@ -27,7 +27,7 @@ class PackagesTest extends TestCase $this->assertEquals($default, $packages->getPackage()); $this->assertEquals($a, $packages->getPackage('a')); - $packages = new Packages($default, array('a' => $a)); + $packages = new Packages($default, ['a' => $a]); $this->assertEquals($default, $packages->getPackage()); $this->assertEquals($a, $packages->getPackage('a')); @@ -37,7 +37,7 @@ class PackagesTest extends TestCase { $packages = new Packages( new Package(new StaticVersionStrategy('default')), - array('a' => new Package(new StaticVersionStrategy('a'))) + ['a' => new Package(new StaticVersionStrategy('a'))] ); $this->assertEquals('default', $packages->getVersion('/foo')); @@ -48,7 +48,7 @@ class PackagesTest extends TestCase { $packages = new Packages( new Package(new StaticVersionStrategy('default')), - array('a' => new Package(new StaticVersionStrategy('a'))) + ['a' => new Package(new StaticVersionStrategy('a'))] ); $this->assertEquals('/foo?default', $packages->getUrl('/foo')); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PathPackageTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PathPackageTest.php index 4a9f90df..c6edc8de 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PathPackageTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PathPackageTest.php @@ -28,24 +28,24 @@ class PathPackageTest extends TestCase public function getConfigs() { - return array( - array('/foo', '', 'http://example.com/foo', 'http://example.com/foo'), - array('/foo', '', 'https://example.com/foo', 'https://example.com/foo'), - array('/foo', '', '//example.com/foo', '//example.com/foo'), + return [ + ['/foo', '', 'http://example.com/foo', 'http://example.com/foo'], + ['/foo', '', 'https://example.com/foo', 'https://example.com/foo'], + ['/foo', '', '//example.com/foo', '//example.com/foo'], - array('', '', '/foo', '/foo?v1'), + ['', '', '/foo', '/foo?v1'], - array('/foo', '', '/bar', '/bar?v1'), - array('/foo', '', 'bar', '/foo/bar?v1'), - array('foo', '', 'bar', '/foo/bar?v1'), - array('foo/', '', 'bar', '/foo/bar?v1'), - array('/foo/', '', 'bar', '/foo/bar?v1'), + ['/foo', '', '/bar', '/bar?v1'], + ['/foo', '', 'bar', '/foo/bar?v1'], + ['foo', '', 'bar', '/foo/bar?v1'], + ['foo/', '', 'bar', '/foo/bar?v1'], + ['/foo/', '', 'bar', '/foo/bar?v1'], - array('/foo', 'version-%2$s/%1$s', '/bar', '/version-v1/bar'), - array('/foo', 'version-%2$s/%1$s', 'bar', '/foo/version-v1/bar'), - array('/foo', 'version-%2$s/%1$s', 'bar/', '/foo/version-v1/bar/'), - array('/foo', 'version-%2$s/%1$s', '/bar/', '/version-v1/bar/'), - ); + ['/foo', 'version-%2$s/%1$s', '/bar', '/version-v1/bar'], + ['/foo', 'version-%2$s/%1$s', 'bar', '/foo/version-v1/bar'], + ['/foo', 'version-%2$s/%1$s', 'bar/', '/foo/version-v1/bar/'], + ['/foo', 'version-%2$s/%1$s', '/bar/', '/version-v1/bar/'], + ]; } /** @@ -60,19 +60,19 @@ class PathPackageTest extends TestCase public function getContextConfigs() { - return array( - array('', '/foo', '', '/baz', '/baz?v1'), - array('', '/foo', '', 'baz', '/foo/baz?v1'), - array('', 'foo', '', 'baz', '/foo/baz?v1'), - array('', 'foo/', '', 'baz', '/foo/baz?v1'), - array('', '/foo/', '', 'baz', '/foo/baz?v1'), + return [ + ['', '/foo', '', '/baz', '/baz?v1'], + ['', '/foo', '', 'baz', '/foo/baz?v1'], + ['', 'foo', '', 'baz', '/foo/baz?v1'], + ['', 'foo/', '', 'baz', '/foo/baz?v1'], + ['', '/foo/', '', 'baz', '/foo/baz?v1'], - array('/bar', '/foo', '', '/baz', '/baz?v1'), - array('/bar', '/foo', '', 'baz', '/bar/foo/baz?v1'), - array('/bar', 'foo', '', 'baz', '/bar/foo/baz?v1'), - array('/bar', 'foo/', '', 'baz', '/bar/foo/baz?v1'), - array('/bar', '/foo/', '', 'baz', '/bar/foo/baz?v1'), - ); + ['/bar', '/foo', '', '/baz', '/baz?v1'], + ['/bar', '/foo', '', 'baz', '/bar/foo/baz?v1'], + ['/bar', 'foo', '', 'baz', '/bar/foo/baz?v1'], + ['/bar', 'foo/', '', 'baz', '/bar/foo/baz?v1'], + ['/bar', '/foo/', '', 'baz', '/bar/foo/baz?v1'], + ]; } public function testVersionStrategyGivesAbsoluteURL() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/UrlPackageTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/UrlPackageTest.php index d37ba012..9b71d45b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/UrlPackageTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/UrlPackageTest.php @@ -29,26 +29,26 @@ class UrlPackageTest extends TestCase public function getConfigs() { - return array( - array('http://example.net', '', 'http://example.com/foo', 'http://example.com/foo'), - array('http://example.net', '', 'https://example.com/foo', 'https://example.com/foo'), - array('http://example.net', '', '//example.com/foo', '//example.com/foo'), + return [ + ['http://example.net', '', 'http://example.com/foo', 'http://example.com/foo'], + ['http://example.net', '', 'https://example.com/foo', 'https://example.com/foo'], + ['http://example.net', '', '//example.com/foo', '//example.com/foo'], - array('http://example.com', '', '/foo', 'http://example.com/foo?v1'), - array('http://example.com', '', 'foo', 'http://example.com/foo?v1'), - array('http://example.com/', '', 'foo', 'http://example.com/foo?v1'), - array('http://example.com/foo', '', 'foo', 'http://example.com/foo/foo?v1'), - array('http://example.com/foo/', '', 'foo', 'http://example.com/foo/foo?v1'), + ['http://example.com', '', '/foo', 'http://example.com/foo?v1'], + ['http://example.com', '', 'foo', 'http://example.com/foo?v1'], + ['http://example.com/', '', 'foo', 'http://example.com/foo?v1'], + ['http://example.com/foo', '', 'foo', 'http://example.com/foo/foo?v1'], + ['http://example.com/foo/', '', 'foo', 'http://example.com/foo/foo?v1'], - array(array('http://example.com'), '', '/foo', 'http://example.com/foo?v1'), - array(array('http://example.com', 'http://example.net'), '', '/foo', 'http://example.com/foo?v1'), - array(array('http://example.com', 'http://example.net'), '', '/fooa', 'http://example.net/fooa?v1'), + [['http://example.com'], '', '/foo', 'http://example.com/foo?v1'], + [['http://example.com', 'http://example.net'], '', '/foo', 'http://example.com/foo?v1'], + [['http://example.com', 'http://example.net'], '', '/fooa', 'http://example.net/fooa?v1'], - array('http://example.com', 'version-%2$s/%1$s', '/foo', 'http://example.com/version-v1/foo'), - array('http://example.com', 'version-%2$s/%1$s', 'foo', 'http://example.com/version-v1/foo'), - array('http://example.com', 'version-%2$s/%1$s', 'foo/', 'http://example.com/version-v1/foo/'), - array('http://example.com', 'version-%2$s/%1$s', '/foo/', 'http://example.com/version-v1/foo/'), - ); + ['http://example.com', 'version-%2$s/%1$s', '/foo', 'http://example.com/version-v1/foo'], + ['http://example.com', 'version-%2$s/%1$s', 'foo', 'http://example.com/version-v1/foo'], + ['http://example.com', 'version-%2$s/%1$s', 'foo/', 'http://example.com/version-v1/foo/'], + ['http://example.com', 'version-%2$s/%1$s', '/foo/', 'http://example.com/version-v1/foo/'], + ]; } /** @@ -63,18 +63,18 @@ class UrlPackageTest extends TestCase public function getContextConfigs() { - return array( - array(false, 'http://example.com', '', 'foo', 'http://example.com/foo?v1'), - array(false, array('http://example.com'), '', 'foo', 'http://example.com/foo?v1'), - array(false, array('http://example.com', 'https://example.com'), '', 'foo', 'http://example.com/foo?v1'), - array(false, array('http://example.com', 'https://example.com'), '', 'fooa', 'https://example.com/fooa?v1'), - array(false, array('http://example.com/bar'), '', 'foo', 'http://example.com/bar/foo?v1'), - array(false, array('http://example.com/bar/'), '', 'foo', 'http://example.com/bar/foo?v1'), - array(false, array('//example.com/bar/'), '', 'foo', '//example.com/bar/foo?v1'), + return [ + [false, 'http://example.com', '', 'foo', 'http://example.com/foo?v1'], + [false, ['http://example.com'], '', 'foo', 'http://example.com/foo?v1'], + [false, ['http://example.com', 'https://example.com'], '', 'foo', 'http://example.com/foo?v1'], + [false, ['http://example.com', 'https://example.com'], '', 'fooa', 'https://example.com/fooa?v1'], + [false, ['http://example.com/bar'], '', 'foo', 'http://example.com/bar/foo?v1'], + [false, ['http://example.com/bar/'], '', 'foo', 'http://example.com/bar/foo?v1'], + [false, ['//example.com/bar/'], '', 'foo', '//example.com/bar/foo?v1'], - array(true, array('http://example.com'), '', 'foo', 'http://example.com/foo?v1'), - array(true, array('http://example.com', 'https://example.com'), '', 'foo', 'https://example.com/foo?v1'), - ); + [true, ['http://example.com'], '', 'foo', 'http://example.com/foo?v1'], + [true, ['http://example.com', 'https://example.com'], '', 'foo', 'https://example.com/foo?v1'], + ]; } public function testVersionStrategyGivesAbsoluteURL() @@ -93,7 +93,7 @@ class UrlPackageTest extends TestCase */ public function testNoBaseUrls() { - new UrlPackage(array(), new EmptyVersionStrategy()); + new UrlPackage([], new EmptyVersionStrategy()); } /** @@ -101,7 +101,7 @@ class UrlPackageTest extends TestCase */ public function testWrongBaseUrl() { - new UrlPackage(array('not-a-url'), new EmptyVersionStrategy()); + new UrlPackage(['not-a-url'], new EmptyVersionStrategy()); } private function getContext($secure) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/VersionStrategy/StaticVersionStrategyTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/VersionStrategy/StaticVersionStrategyTest.php index 7b5a3e8d..c56a8726 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/VersionStrategy/StaticVersionStrategyTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/VersionStrategy/StaticVersionStrategyTest.php @@ -36,9 +36,9 @@ class StaticVersionStrategyTest extends TestCase public function getConfigs() { - return array( - array('test-path', 'v1', null), - array('test-path', 'v2', '%s?test%s'), - ); + return [ + ['test-path', 'v1', null], + ['test-path', 'v2', '%s?test%s'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/UrlPackage.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/UrlPackage.php index 77055e43..23809a55 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/UrlPackage.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Asset/UrlPackage.php @@ -35,7 +35,7 @@ use Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface; */ class UrlPackage extends Package { - private $baseUrls = array(); + private $baseUrls = []; private $sslPackage; /** @@ -125,7 +125,7 @@ class UrlPackage extends Package private function getSslUrls($urls) { - $sslUrls = array(); + $sslUrls = []; foreach ($urls as $url) { if ('https://' === substr($url, 0, 8) || '//' === substr($url, 0, 2)) { $sslUrls[] = $url; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Client.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Client.php index 5eef4d0a..98553353 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Client.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Client.php @@ -30,7 +30,7 @@ abstract class Client { protected $history; protected $cookieJar; - protected $server = array(); + protected $server = []; protected $internalRequest; protected $request; protected $internalResponse; @@ -42,7 +42,7 @@ abstract class Client private $maxRedirects = -1; private $redirectCount = 0; - private $redirects = array(); + private $redirects = []; private $isMainRequest = true; /** @@ -50,7 +50,7 @@ abstract class Client * @param History $history A History instance to store the browser history * @param CookieJar $cookieJar A CookieJar instance to store the cookies */ - public function __construct(array $server = array(), History $history = null, CookieJar $cookieJar = null) + public function __construct(array $server = [], History $history = null, CookieJar $cookieJar = null) { $this->setServerParameters($server); $this->history = $history ?: new History(); @@ -121,9 +121,9 @@ abstract class Client */ public function setServerParameters(array $server) { - $this->server = array_merge(array( + $this->server = array_merge([ 'HTTP_USER_AGENT' => 'Symfony BrowserKit', - ), $server); + ], $server); } /** @@ -252,7 +252,7 @@ abstract class Client * * @return Crawler */ - public function submit(Form $form, array $values = array()) + public function submit(Form $form, array $values = []) { $form->setValues($values); @@ -272,7 +272,7 @@ abstract class Client * * @return Crawler */ - public function request($method, $uri, array $parameters = array(), array $files = array(), array $server = array(), $content = null, $changeHistory = true) + public function request($method, $uri, array $parameters = [], array $files = [], array $server = [], $content = null, $changeHistory = true) { if ($this->isMainRequest) { $this->redirectCount = 0; @@ -359,7 +359,7 @@ abstract class Client if (file_exists($deprecationsFile)) { $deprecations = file_get_contents($deprecationsFile); unlink($deprecationsFile); - foreach ($deprecations ? unserialize($deprecations) : array() as $deprecation) { + foreach ($deprecations ? unserialize($deprecations) : [] as $deprecation) { if ($deprecation[0]) { @trigger_error($deprecation[1], E_USER_DEPRECATED); } else { @@ -452,7 +452,7 @@ abstract class Client { do { $request = $this->history->back(); - } while (array_key_exists(serialize($request), $this->redirects)); + } while (\array_key_exists(serialize($request), $this->redirects)); return $this->requestFromRequest($request, false); } @@ -466,7 +466,7 @@ abstract class Client { do { $request = $this->history->forward(); - } while (array_key_exists(serialize($request), $this->redirects)); + } while (\array_key_exists(serialize($request), $this->redirects)); return $this->requestFromRequest($request, false); } @@ -503,9 +503,9 @@ abstract class Client $request = $this->internalRequest; - if (\in_array($this->internalResponse->getStatus(), array(301, 302, 303))) { + if (\in_array($this->internalResponse->getStatus(), [301, 302, 303])) { $method = 'GET'; - $files = array(); + $files = []; $content = null; } else { $method = $request->getMethod(); @@ -515,7 +515,7 @@ abstract class Client if ('GET' === strtoupper($method)) { // Don't forward parameters for GET request as it should reach the redirection URI - $parameters = array(); + $parameters = []; } else { $parameters = $request->getParameters(); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Cookie.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Cookie.php index 8857b623..b0123303 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Cookie.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Cookie.php @@ -22,7 +22,7 @@ class Cookie * Handles dates as defined by RFC 2616 section 3.3.1, and also some other * non-standard, but common formats. */ - private static $dateFormats = array( + private static $dateFormats = [ 'D, d M Y H:i:s T', 'D, d-M-y H:i:s T', 'D, d-M-Y H:i:s T', @@ -30,7 +30,7 @@ class Cookie 'D, d-m-Y H:i:s T', 'D M j G:i:s Y', 'D M d H:i:s Y T', - ); + ]; protected $name; protected $value; @@ -129,7 +129,7 @@ class Cookie list($name, $value) = explode('=', array_shift($parts), 2); - $values = array( + $values = [ 'name' => trim($name), 'value' => trim($value), 'expires' => null, @@ -138,7 +138,7 @@ class Cookie 'secure' => false, 'httponly' => false, 'passedRawValue' => true, - ); + ]; if (null !== $url) { if ((false === $urlParts = parse_url($url)) || !isset($urlParts['host'])) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/CookieJar.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/CookieJar.php index 24eb9abe..bce66197 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/CookieJar.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/CookieJar.php @@ -18,7 +18,7 @@ namespace Symfony\Component\BrowserKit; */ class CookieJar { - protected $cookieJar = array(); + protected $cookieJar = []; public function set(Cookie $cookie) { @@ -84,7 +84,7 @@ class CookieJar // this should never happen but it allows for a better BC $domains = array_keys($this->cookieJar); } else { - $domains = array($domain); + $domains = [$domain]; } foreach ($domains as $domain) { @@ -105,7 +105,7 @@ class CookieJar */ public function clear() { - $this->cookieJar = array(); + $this->cookieJar = []; } /** @@ -116,7 +116,7 @@ class CookieJar */ public function updateFromSetCookie(array $setCookies, $uri = null) { - $cookies = array(); + $cookies = []; foreach ($setCookies as $cookie) { foreach (explode(',', $cookie) as $i => $part) { @@ -157,7 +157,7 @@ class CookieJar { $this->flushExpiredCookies(); - $flattenedCookies = array(); + $flattenedCookies = []; foreach ($this->cookieJar as $path) { foreach ($path as $cookies) { foreach ($cookies as $cookie) { @@ -181,8 +181,8 @@ class CookieJar { $this->flushExpiredCookies(); - $parts = array_replace(array('path' => '/'), parse_url($uri)); - $cookies = array(); + $parts = array_replace(['path' => '/'], parse_url($uri)); + $cookies = []; foreach ($this->cookieJar as $domain => $pathCookies) { if ($domain) { $domain = '.'.ltrim($domain, '.'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/History.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/History.php index beec17c6..8ed3fd17 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/History.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/History.php @@ -18,7 +18,7 @@ namespace Symfony\Component\BrowserKit; */ class History { - protected $stack = array(); + protected $stack = []; protected $position = -1; /** @@ -26,7 +26,7 @@ class History */ public function clear() { - $this->stack = array(); + $this->stack = []; $this->position = -1; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Request.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Request.php index d78868e5..599652bf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Request.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Request.php @@ -33,7 +33,7 @@ class Request * @param array $server An array of server parameters * @param string $content The raw body data */ - public function __construct($uri, $method, array $parameters = array(), array $files = array(), array $cookies = array(), array $server = array(), $content = null) + public function __construct($uri, $method, array $parameters = [], array $files = [], array $cookies = [], array $server = [], $content = null) { $this->uri = $uri; $this->method = $method; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Response.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Response.php index 766a87e4..0ef12e3b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Response.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Response.php @@ -28,7 +28,7 @@ class Response * @param int $status The response status code * @param array $headers An array of headers */ - public function __construct($content = '', $status = 200, array $headers = array()) + public function __construct($content = '', $status = 200, array $headers = []) { $this->content = $content; $this->status = $status; @@ -116,10 +116,10 @@ class Response return \is_array($value) ? (\count($value) ? $value[0] : '') : $value; } - return \is_array($value) ? $value : array($value); + return \is_array($value) ? $value : [$value]; } } - return $first ? null : array(); + return $first ? null : []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/ClientTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/ClientTest.php index a5c72943..ab6d1185 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/ClientTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/ClientTest.php @@ -76,13 +76,13 @@ class ClientTest extends TestCase { public function testGetHistory() { - $client = new TestClient(array(), $history = new History()); + $client = new TestClient([], $history = new History()); $this->assertSame($history, $client->getHistory(), '->getHistory() returns the History'); } public function testGetCookieJar() { - $client = new TestClient(array(), null, $cookieJar = new CookieJar()); + $client = new TestClient([], null, $cookieJar = new CookieJar()); $this->assertSame($cookieJar, $client->getCookieJar(), '->getCookieJar() returns the CookieJar'); } @@ -97,7 +97,7 @@ class ClientTest extends TestCase public function testGetRequestWithIpAsHttpHost() { $client = new TestClient(); - $client->request('GET', 'https://example.com/foo', array(), array(), array('HTTP_HOST' => '127.0.0.1')); + $client->request('GET', 'https://example.com/foo', [], [], ['HTTP_HOST' => '127.0.0.1']); $this->assertEquals('https://example.com/foo', $client->getRequest()->getUri()); $headers = $client->getRequest()->getServer(); @@ -130,7 +130,7 @@ class ClientTest extends TestCase $json = '{"jsonrpc":"2.0","method":"echo","id":7,"params":["Hello World"]}'; $client = new TestClient(); - $client->request('POST', 'http://example.com/jsonrpc', array(), array(), array(), $json); + $client->request('POST', 'http://example.com/jsonrpc', [], [], [], $json); $this->assertEquals($json, $client->getRequest()->getContent()); } @@ -246,18 +246,18 @@ class ClientTest extends TestCase public function testRequestCookies() { $client = new TestClient(); - $client->setNextResponse(new Response('foo', 200, array('Set-Cookie' => 'foo=bar'))); + $client->setNextResponse(new Response('foo', 200, ['Set-Cookie' => 'foo=bar'])); $client->request('GET', 'http://www.example.com/foo/foobar'); - $this->assertEquals(array('foo' => 'bar'), $client->getCookieJar()->allValues('http://www.example.com/foo/foobar'), '->request() updates the CookieJar'); + $this->assertEquals(['foo' => 'bar'], $client->getCookieJar()->allValues('http://www.example.com/foo/foobar'), '->request() updates the CookieJar'); $client->request('GET', 'bar'); - $this->assertEquals(array('foo' => 'bar'), $client->getCookieJar()->allValues('http://www.example.com/foo/foobar'), '->request() updates the CookieJar'); + $this->assertEquals(['foo' => 'bar'], $client->getCookieJar()->allValues('http://www.example.com/foo/foobar'), '->request() updates the CookieJar'); } public function testRequestSecureCookies() { $client = new TestClient(); - $client->setNextResponse(new Response('foo', 200, array('Set-Cookie' => 'foo=bar; path=/; secure'))); + $client->setNextResponse(new Response('foo', 200, ['Set-Cookie' => 'foo=bar; path=/; secure'])); $client->request('GET', 'https://www.example.com/foo/foobar'); $this->assertTrue($client->getCookieJar()->get('foo', '/', 'www.example.com')->isSecure()); @@ -298,7 +298,7 @@ class ClientTest extends TestCase public function testSubmitPreserveAuth() { - $client = new TestClient(array('PHP_AUTH_USER' => 'foo', 'PHP_AUTH_PW' => 'bar')); + $client = new TestClient(['PHP_AUTH_USER' => 'foo', 'PHP_AUTH_PW' => 'bar']); $client->setNextResponse(new Response('
    ')); $crawler = $client->request('GET', 'http://www.example.com/foo/foobar'); @@ -332,26 +332,26 @@ class ClientTest extends TestCase $this->assertInstanceOf('LogicException', $e, '->followRedirect() throws a \LogicException if the request was not redirected'); } - $client->setNextResponse(new Response('', 302, array('Location' => 'http://www.example.com/redirected'))); + $client->setNextResponse(new Response('', 302, ['Location' => 'http://www.example.com/redirected'])); $client->request('GET', 'http://www.example.com/foo/foobar'); $client->followRedirect(); $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect if any'); $client = new TestClient(); - $client->setNextResponse(new Response('', 302, array('Location' => 'http://www.example.com/redirected'))); + $client->setNextResponse(new Response('', 302, ['Location' => 'http://www.example.com/redirected'])); $client->request('GET', 'http://www.example.com/foo/foobar'); $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() automatically follows redirects if followRedirects is true'); $client = new TestClient(); - $client->setNextResponse(new Response('', 201, array('Location' => 'http://www.example.com/redirected'))); + $client->setNextResponse(new Response('', 201, ['Location' => 'http://www.example.com/redirected'])); $client->request('GET', 'http://www.example.com/foo/foobar'); $this->assertEquals('http://www.example.com/foo/foobar', $client->getRequest()->getUri(), '->followRedirect() does not follow redirect if HTTP Code is not 30x'); $client = new TestClient(); - $client->setNextResponse(new Response('', 201, array('Location' => 'http://www.example.com/redirected'))); + $client->setNextResponse(new Response('', 201, ['Location' => 'http://www.example.com/redirected'])); $client->followRedirects(false); $client->request('GET', 'http://www.example.com/foo/foobar'); @@ -366,12 +366,12 @@ class ClientTest extends TestCase public function testFollowRelativeRedirect() { $client = new TestClient(); - $client->setNextResponse(new Response('', 302, array('Location' => '/redirected'))); + $client->setNextResponse(new Response('', 302, ['Location' => '/redirected'])); $client->request('GET', 'http://www.example.com/foo/foobar'); $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect if any'); $client = new TestClient(); - $client->setNextResponse(new Response('', 302, array('Location' => '/redirected:1234'))); + $client->setNextResponse(new Response('', 302, ['Location' => '/redirected:1234'])); $client->request('GET', 'http://www.example.com/foo/foobar'); $this->assertEquals('http://www.example.com/redirected:1234', $client->getRequest()->getUri(), '->followRedirect() follows relative urls'); } @@ -380,11 +380,11 @@ class ClientTest extends TestCase { $client = new TestClient(); $client->setMaxRedirects(1); - $client->setNextResponse(new Response('', 302, array('Location' => 'http://www.example.com/redirected'))); + $client->setNextResponse(new Response('', 302, ['Location' => 'http://www.example.com/redirected'])); $client->request('GET', 'http://www.example.com/foo/foobar'); $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect if any'); - $client->setNextResponse(new Response('', 302, array('Location' => 'http://www.example.com/redirected2'))); + $client->setNextResponse(new Response('', 302, ['Location' => 'http://www.example.com/redirected2'])); try { $client->followRedirect(); $this->fail('->followRedirect() throws a \LogicException if the request was redirected and limit of redirections was reached'); @@ -392,60 +392,60 @@ class ClientTest extends TestCase $this->assertInstanceOf('LogicException', $e, '->followRedirect() throws a \LogicException if the request was redirected and limit of redirections was reached'); } - $client->setNextResponse(new Response('', 302, array('Location' => 'http://www.example.com/redirected'))); + $client->setNextResponse(new Response('', 302, ['Location' => 'http://www.example.com/redirected'])); $client->request('GET', 'http://www.example.com/foo/foobar'); $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect if any'); - $client->setNextResponse(new Response('', 302, array('Location' => '/redirected'))); + $client->setNextResponse(new Response('', 302, ['Location' => '/redirected'])); $client->request('GET', 'http://www.example.com/foo/foobar'); $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows relative URLs'); $client = new TestClient(); - $client->setNextResponse(new Response('', 302, array('Location' => '//www.example.org/'))); + $client->setNextResponse(new Response('', 302, ['Location' => '//www.example.org/'])); $client->request('GET', 'https://www.example.com/'); $this->assertEquals('https://www.example.org/', $client->getRequest()->getUri(), '->followRedirect() follows protocol-relative URLs'); $client = new TestClient(); - $client->setNextResponse(new Response('', 302, array('Location' => 'http://www.example.com/redirected'))); - $client->request('POST', 'http://www.example.com/foo/foobar', array('name' => 'bar')); + $client->setNextResponse(new Response('', 302, ['Location' => 'http://www.example.com/redirected'])); + $client->request('POST', 'http://www.example.com/foo/foobar', ['name' => 'bar']); $this->assertEquals('GET', $client->getRequest()->getMethod(), '->followRedirect() uses a GET for 302'); - $this->assertEquals(array(), $client->getRequest()->getParameters(), '->followRedirect() does not submit parameters when changing the method'); + $this->assertEquals([], $client->getRequest()->getParameters(), '->followRedirect() does not submit parameters when changing the method'); } public function testFollowRedirectWithCookies() { $client = new TestClient(); $client->followRedirects(false); - $client->setNextResponse(new Response('', 302, array( + $client->setNextResponse(new Response('', 302, [ 'Location' => 'http://www.example.com/redirected', 'Set-Cookie' => 'foo=bar', - ))); + ])); $client->request('GET', 'http://www.example.com/'); - $this->assertEquals(array(), $client->getRequest()->getCookies()); + $this->assertEquals([], $client->getRequest()->getCookies()); $client->followRedirect(); - $this->assertEquals(array('foo' => 'bar'), $client->getRequest()->getCookies()); + $this->assertEquals(['foo' => 'bar'], $client->getRequest()->getCookies()); } public function testFollowRedirectWithHeaders() { - $headers = array( + $headers = [ 'HTTP_HOST' => 'www.example.com', 'HTTP_USER_AGENT' => 'Symfony BrowserKit', 'CONTENT_TYPE' => 'application/vnd.custom+xml', 'HTTPS' => false, - ); + ]; $client = new TestClient(); $client->followRedirects(false); - $client->setNextResponse(new Response('', 302, array( + $client->setNextResponse(new Response('', 302, [ 'Location' => 'http://www.example.com/redirected', - ))); - $client->request('GET', 'http://www.example.com/', array(), array(), array( + ])); + $client->request('GET', 'http://www.example.com/', [], [], [ 'CONTENT_TYPE' => 'application/vnd.custom+xml', - )); + ]); $this->assertEquals($headers, $client->getRequest()->getServer()); @@ -458,17 +458,17 @@ class ClientTest extends TestCase public function testFollowRedirectWithPort() { - $headers = array( + $headers = [ 'HTTP_HOST' => 'www.example.com:8080', 'HTTP_USER_AGENT' => 'Symfony BrowserKit', 'HTTPS' => false, 'HTTP_REFERER' => 'http://www.example.com:8080/', - ); + ]; $client = new TestClient(); - $client->setNextResponse(new Response('', 302, array( + $client->setNextResponse(new Response('', 302, [ 'Location' => 'http://www.example.com:8080/redirected', - ))); + ])); $client->request('GET', 'http://www.example.com:8080/'); $this->assertEquals($headers, $client->getRequest()->getServer()); @@ -492,14 +492,14 @@ class ClientTest extends TestCase public function testFollowRedirectWithPostMethod() { - $parameters = array('foo' => 'bar'); - $files = array('myfile.foo' => 'baz'); - $server = array('X_TEST_FOO' => 'bazbar'); + $parameters = ['foo' => 'bar']; + $files = ['myfile.foo' => 'baz']; + $server = ['X_TEST_FOO' => 'bazbar']; $content = 'foobarbaz'; $client = new TestClient(); - $client->setNextResponse(new Response('', 307, array('Location' => 'http://www.example.com/redirected'))); + $client->setNextResponse(new Response('', 307, ['Location' => 'http://www.example.com/redirected'])); $client->request('POST', 'http://www.example.com/foo/foobar', $parameters, $files, $server, $content); $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect with POST method'); @@ -512,15 +512,15 @@ class ClientTest extends TestCase public function testFollowRedirectDropPostMethod() { - $parameters = array('foo' => 'bar'); - $files = array('myfile.foo' => 'baz'); - $server = array('X_TEST_FOO' => 'bazbar'); + $parameters = ['foo' => 'bar']; + $files = ['myfile.foo' => 'baz']; + $server = ['X_TEST_FOO' => 'bazbar']; $content = 'foobarbaz'; $client = new TestClient(); - foreach (array(301, 302, 303) as $code) { - $client->setNextResponse(new Response('', $code, array('Location' => 'http://www.example.com/redirected'))); + foreach ([301, 302, 303] as $code) { + $client->setNextResponse(new Response('', $code, ['Location' => 'http://www.example.com/redirected'])); $client->request('POST', 'http://www.example.com/foo/foobar', $parameters, $files, $server, $content); $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect with POST method on response code: '.$code.'.'); @@ -536,9 +536,9 @@ class ClientTest extends TestCase { $client = new TestClient(); - $parameters = array('foo' => 'bar'); - $files = array('myfile.foo' => 'baz'); - $server = array('X_TEST_FOO' => 'bazbar'); + $parameters = ['foo' => 'bar']; + $files = ['myfile.foo' => 'baz']; + $server = ['X_TEST_FOO' => 'bazbar']; $content = 'foobarbaz'; $client->request('GET', 'http://www.example.com/foo/foobar', $parameters, $files, $server, $content); @@ -556,9 +556,9 @@ class ClientTest extends TestCase { $client = new TestClient(); - $parameters = array('foo' => 'bar'); - $files = array('myfile.foo' => 'baz'); - $server = array('X_TEST_FOO' => 'bazbar'); + $parameters = ['foo' => 'bar']; + $files = ['myfile.foo' => 'baz']; + $server = ['X_TEST_FOO' => 'bazbar']; $content = 'foobarbaz'; $client->request('GET', 'http://www.example.com/foo/foobar'); @@ -578,7 +578,7 @@ class ClientTest extends TestCase $client = new TestClient(); $client->request('GET', 'http://www.example.com/foo'); - $client->setNextResponse(new Response('', 301, array('Location' => 'http://www.example.com/redirected'))); + $client->setNextResponse(new Response('', 301, ['Location' => 'http://www.example.com/redirected'])); $client->request('GET', 'http://www.example.com/bar'); $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), 'client followed redirect'); @@ -596,9 +596,9 @@ class ClientTest extends TestCase { $client = new TestClient(); - $parameters = array('foo' => 'bar'); - $files = array('myfile.foo' => 'baz'); - $server = array('X_TEST_FOO' => 'bazbar'); + $parameters = ['foo' => 'bar']; + $files = ['myfile.foo' => 'baz']; + $server = ['X_TEST_FOO' => 'bazbar']; $content = 'foobarbaz'; $client->request('GET', 'http://www.example.com/foo/foobar', $parameters, $files, $server, $content); @@ -618,7 +618,7 @@ class ClientTest extends TestCase $client->restart(); $this->assertTrue($client->getHistory()->isEmpty(), '->restart() clears the history'); - $this->assertEquals(array(), $client->getCookieJar()->all(), '->restart() clears the cookies'); + $this->assertEquals([], $client->getCookieJar()->all(), '->restart() clears the cookies'); } public function testInsulatedRequests() @@ -669,12 +669,12 @@ class ClientTest extends TestCase $this->assertEquals('', $client->getServerParameter('HTTP_HOST')); $this->assertEquals('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT')); - $client->request('GET', 'https://www.example.com/https/www.example.com', array(), array(), array( + $client->request('GET', 'https://www.example.com/https/www.example.com', [], [], [ 'HTTP_HOST' => 'testhost', 'HTTP_USER_AGENT' => 'testua', 'HTTPS' => false, 'NEW_SERVER_KEY' => 'new-server-key-value', - )); + ]); $this->assertEquals('', $client->getServerParameter('HTTP_HOST')); $this->assertEquals('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT')); @@ -700,16 +700,16 @@ class ClientTest extends TestCase { $client = new TestClient(); - $client->request('GET', '/', array(), array(), array( + $client->request('GET', '/', [], [], [ 'HTTP_HOST' => 'testhost', 'HTTPS' => true, - )); + ]); $this->assertEquals('https://testhost/', $client->getRequest()->getUri()); - $client->request('GET', 'https://www.example.com/', array(), array(), array( + $client->request('GET', 'https://www.example.com/', [], [], [ 'HTTP_HOST' => 'testhost', 'HTTPS' => false, - )); + ]); $this->assertEquals('https://www.example.com/', $client->getRequest()->getUri()); } @@ -717,12 +717,12 @@ class ClientTest extends TestCase { $client = new TestClient(); - $client->request('GET', 'https://www.example.com/https/www.example.com', array(), array(), array( + $client->request('GET', 'https://www.example.com/https/www.example.com', [], [], [ 'HTTP_HOST' => 'testhost', 'HTTP_USER_AGENT' => 'testua', 'HTTPS' => false, 'NEW_SERVER_KEY' => 'new-server-key-value', - )); + ]); $this->assertInstanceOf('Symfony\Component\BrowserKit\Request', $client->getInternalRequest()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php index 3117e5ce..d88f0234 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php @@ -45,7 +45,7 @@ class CookieJarTest extends TestCase $cookieJar->set($cookie1 = new Cookie('foo', 'bar')); $cookieJar->set($cookie2 = new Cookie('bar', 'foo')); - $this->assertEquals(array($cookie1, $cookie2), $cookieJar->all(), '->all() returns all cookies in the jar'); + $this->assertEquals([$cookie1, $cookie2], $cookieJar->all(), '->all() returns all cookies in the jar'); } public function testClear() @@ -56,12 +56,12 @@ class CookieJarTest extends TestCase $cookieJar->clear(); - $this->assertEquals(array(), $cookieJar->all(), '->clear() expires all cookies'); + $this->assertEquals([], $cookieJar->all(), '->clear() expires all cookies'); } public function testUpdateFromResponse() { - $response = new Response('', 200, array('Set-Cookie' => 'foo=foo')); + $response = new Response('', 200, ['Set-Cookie' => 'foo=foo']); $cookieJar = new CookieJar(); $cookieJar->updateFromResponse($response); @@ -71,7 +71,7 @@ class CookieJarTest extends TestCase public function testUpdateFromSetCookie() { - $setCookies = array('foo=foo'); + $setCookies = ['foo=foo']; $cookieJar = new CookieJar(); $cookieJar->set(new Cookie('bar', 'bar')); @@ -86,15 +86,15 @@ class CookieJarTest extends TestCase public function testUpdateFromEmptySetCookie() { $cookieJar = new CookieJar(); - $cookieJar->updateFromSetCookie(array('')); - $this->assertEquals(array(), $cookieJar->all()); + $cookieJar->updateFromSetCookie(['']); + $this->assertEquals([], $cookieJar->all()); } public function testUpdateFromSetCookieWithMultipleCookies() { $timestamp = time() + 3600; $date = gmdate('D, d M Y H:i:s \G\M\T', $timestamp); - $setCookies = array(sprintf('foo=foo; expires=%s; domain=.symfony.com; path=/, bar=bar; domain=.blog.symfony.com, PHPSESSID=id; expires=%1$s', $date)); + $setCookies = [sprintf('foo=foo; expires=%s; domain=.symfony.com; path=/, bar=bar; domain=.blog.symfony.com, PHPSESSID=id; expires=%1$s', $date)]; $cookieJar = new CookieJar(); $cookieJar->updateFromSetCookie($setCookies); @@ -132,15 +132,15 @@ class CookieJarTest extends TestCase public function provideAllValuesValues() { - return array( - array('http://www.example.com', array('foo_nothing', 'foo_domain')), - array('http://www.example.com/', array('foo_nothing', 'foo_domain')), - array('http://foo.example.com/', array('foo_nothing', 'foo_domain')), - array('http://foo.example1.com/', array('foo_nothing')), - array('https://foo.example.com/', array('foo_nothing', 'foo_secure', 'foo_domain')), - array('http://www.example.com/foo/bar', array('foo_nothing', 'foo_path', 'foo_domain')), - array('http://www4.example.com/', array('foo_nothing', 'foo_domain', 'foo_strict_domain')), - ); + return [ + ['http://www.example.com', ['foo_nothing', 'foo_domain']], + ['http://www.example.com/', ['foo_nothing', 'foo_domain']], + ['http://foo.example.com/', ['foo_nothing', 'foo_domain']], + ['http://foo.example1.com/', ['foo_nothing']], + ['https://foo.example.com/', ['foo_nothing', 'foo_secure', 'foo_domain']], + ['http://www.example.com/foo/bar', ['foo_nothing', 'foo_path', 'foo_domain']], + ['http://www4.example.com/', ['foo_nothing', 'foo_domain', 'foo_strict_domain']], + ]; } public function testEncodedValues() @@ -148,8 +148,8 @@ class CookieJarTest extends TestCase $cookieJar = new CookieJar(); $cookieJar->set($cookie = new Cookie('foo', 'bar%3Dbaz', null, '/', '', false, true, true)); - $this->assertEquals(array('foo' => 'bar=baz'), $cookieJar->allValues('/')); - $this->assertEquals(array('foo' => 'bar%3Dbaz'), $cookieJar->allRawValues('/')); + $this->assertEquals(['foo' => 'bar=baz'], $cookieJar->allValues('/')); + $this->assertEquals(['foo' => 'bar%3Dbaz'], $cookieJar->allRawValues('/')); } public function testCookieExpireWithSameNameButDifferentPaths() @@ -160,9 +160,9 @@ class CookieJarTest extends TestCase $cookieJar->expire('foo', '/foo'); $this->assertNull($cookieJar->get('foo'), '->get() returns null if the cookie is expired'); - $this->assertEquals(array(), array_keys($cookieJar->allValues('http://example.com/'))); - $this->assertEquals(array(), $cookieJar->allValues('http://example.com/foo')); - $this->assertEquals(array('foo' => 'bar2'), $cookieJar->allValues('http://example.com/bar')); + $this->assertEquals([], array_keys($cookieJar->allValues('http://example.com/'))); + $this->assertEquals([], $cookieJar->allValues('http://example.com/foo')); + $this->assertEquals(['foo' => 'bar2'], $cookieJar->allValues('http://example.com/bar')); } public function testCookieExpireWithNullPaths() @@ -172,7 +172,7 @@ class CookieJarTest extends TestCase $cookieJar->expire('foo', null); $this->assertNull($cookieJar->get('foo'), '->get() returns null if the cookie is expired'); - $this->assertEquals(array(), array_keys($cookieJar->allValues('http://example.com/'))); + $this->assertEquals([], array_keys($cookieJar->allValues('http://example.com/'))); } public function testCookieExpireWithDomain() @@ -182,7 +182,7 @@ class CookieJarTest extends TestCase $cookieJar->expire('foo', '/foo', 'http://example2.com/'); $this->assertNull($cookieJar->get('foo'), '->get() returns null if the cookie is expired'); - $this->assertEquals(array(), array_keys($cookieJar->allValues('http://example2.com/'))); + $this->assertEquals([], array_keys($cookieJar->allValues('http://example2.com/'))); } public function testCookieWithSameNameButDifferentPaths() @@ -191,9 +191,9 @@ class CookieJarTest extends TestCase $cookieJar->set($cookie1 = new Cookie('foo', 'bar1', null, '/foo')); $cookieJar->set($cookie2 = new Cookie('foo', 'bar2', null, '/bar')); - $this->assertEquals(array(), array_keys($cookieJar->allValues('http://example.com/'))); - $this->assertEquals(array('foo' => 'bar1'), $cookieJar->allValues('http://example.com/foo')); - $this->assertEquals(array('foo' => 'bar2'), $cookieJar->allValues('http://example.com/bar')); + $this->assertEquals([], array_keys($cookieJar->allValues('http://example.com/'))); + $this->assertEquals(['foo' => 'bar1'], $cookieJar->allValues('http://example.com/foo')); + $this->assertEquals(['foo' => 'bar2'], $cookieJar->allValues('http://example.com/bar')); } public function testCookieWithSameNameButDifferentDomains() @@ -202,9 +202,9 @@ class CookieJarTest extends TestCase $cookieJar->set($cookie1 = new Cookie('foo', 'bar1', null, '/', 'foo.example.com')); $cookieJar->set($cookie2 = new Cookie('foo', 'bar2', null, '/', 'bar.example.com')); - $this->assertEquals(array(), array_keys($cookieJar->allValues('http://example.com/'))); - $this->assertEquals(array('foo' => 'bar1'), $cookieJar->allValues('http://foo.example.com/')); - $this->assertEquals(array('foo' => 'bar2'), $cookieJar->allValues('http://bar.example.com/')); + $this->assertEquals([], array_keys($cookieJar->allValues('http://example.com/'))); + $this->assertEquals(['foo' => 'bar1'], $cookieJar->allValues('http://foo.example.com/')); + $this->assertEquals(['foo' => 'bar2'], $cookieJar->allValues('http://bar.example.com/')); } public function testCookieGetWithSubdomain() @@ -246,7 +246,7 @@ class CookieJarTest extends TestCase $cookieJar = new CookieJar(); $cookieJar->set(new Cookie('foo', 'bar', null, '/', '.example.com')); - $this->assertEquals(array('foo' => 'bar'), $cookieJar->allValues('http://www.example.com')); + $this->assertEquals(['foo' => 'bar'], $cookieJar->allValues('http://www.example.com')); $this->assertEmpty($cookieJar->allValues('http://wwwexample.com')); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/CookieTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/CookieTest.php index 2f5a08d1..1ffa1d87 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/CookieTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/CookieTest.php @@ -41,16 +41,16 @@ class CookieTest extends TestCase public function getTestsForToFromString() { - return array( - array('foo=bar; path=/'), - array('foo=bar; path=/foo'), - array('foo=bar; domain=google.com; path=/'), - array('foo=bar; domain=example.com; path=/; secure', 'https://example.com/'), - array('foo=bar; path=/; httponly'), - array('foo=bar; domain=google.com; path=/foo; secure; httponly', 'https://google.com/'), - array('foo=bar=baz; path=/'), - array('foo=bar%3Dbaz; path=/'), - ); + return [ + ['foo=bar; path=/'], + ['foo=bar; path=/foo'], + ['foo=bar; domain=google.com; path=/'], + ['foo=bar; domain=example.com; path=/; secure', 'https://example.com/'], + ['foo=bar; path=/; httponly'], + ['foo=bar; domain=google.com; path=/foo; secure; httponly', 'https://google.com/'], + ['foo=bar=baz; path=/'], + ['foo=bar%3Dbaz; path=/'], + ]; } public function testFromStringIgnoreSecureFlag() @@ -69,16 +69,16 @@ class CookieTest extends TestCase public function getExpireCookieStrings() { - return array( - array('foo=bar; expires=Fri, 31-Jul-2020 08:49:37 GMT'), - array('foo=bar; expires=Fri, 31 Jul 2020 08:49:37 GMT'), - array('foo=bar; expires=Fri, 31-07-2020 08:49:37 GMT'), - array('foo=bar; expires=Fri, 31-07-20 08:49:37 GMT'), - array('foo=bar; expires=Friday, 31-Jul-20 08:49:37 GMT'), - array('foo=bar; expires=Fri Jul 31 08:49:37 2020'), - array('foo=bar; expires=\'Fri Jul 31 08:49:37 2020\''), - array('foo=bar; expires=Friday July 31st 2020, 08:49:37 GMT'), - ); + return [ + ['foo=bar; expires=Fri, 31-Jul-2020 08:49:37 GMT'], + ['foo=bar; expires=Fri, 31 Jul 2020 08:49:37 GMT'], + ['foo=bar; expires=Fri, 31-07-2020 08:49:37 GMT'], + ['foo=bar; expires=Fri, 31-07-20 08:49:37 GMT'], + ['foo=bar; expires=Friday, 31-Jul-20 08:49:37 GMT'], + ['foo=bar; expires=Fri Jul 31 08:49:37 2020'], + ['foo=bar; expires=\'Fri Jul 31 08:49:37 2020\''], + ['foo=bar; expires=Friday July 31st 2020, 08:49:37 GMT'], + ]; } public function testFromStringWithCapitalization() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/RequestTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/RequestTest.php index f163de96..e7718eef 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/RequestTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/RequestTest.php @@ -30,25 +30,25 @@ class RequestTest extends TestCase public function testGetParameters() { - $request = new Request('http://www.example.com/', 'get', array('foo' => 'bar')); - $this->assertEquals(array('foo' => 'bar'), $request->getParameters(), '->getParameters() returns the parameters of the request'); + $request = new Request('http://www.example.com/', 'get', ['foo' => 'bar']); + $this->assertEquals(['foo' => 'bar'], $request->getParameters(), '->getParameters() returns the parameters of the request'); } public function testGetFiles() { - $request = new Request('http://www.example.com/', 'get', array(), array('foo' => 'bar')); - $this->assertEquals(array('foo' => 'bar'), $request->getFiles(), '->getFiles() returns the uploaded files of the request'); + $request = new Request('http://www.example.com/', 'get', [], ['foo' => 'bar']); + $this->assertEquals(['foo' => 'bar'], $request->getFiles(), '->getFiles() returns the uploaded files of the request'); } public function testGetCookies() { - $request = new Request('http://www.example.com/', 'get', array(), array(), array('foo' => 'bar')); - $this->assertEquals(array('foo' => 'bar'), $request->getCookies(), '->getCookies() returns the cookies of the request'); + $request = new Request('http://www.example.com/', 'get', [], [], ['foo' => 'bar']); + $this->assertEquals(['foo' => 'bar'], $request->getCookies(), '->getCookies() returns the cookies of the request'); } public function testGetServer() { - $request = new Request('http://www.example.com/', 'get', array(), array(), array(), array('foo' => 'bar')); - $this->assertEquals(array('foo' => 'bar'), $request->getServer(), '->getServer() returns the server parameters of the request'); + $request = new Request('http://www.example.com/', 'get', [], [], [], ['foo' => 'bar']); + $this->assertEquals(['foo' => 'bar'], $request->getServer(), '->getServer() returns the server parameters of the request'); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/ResponseTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/ResponseTest.php index 0ba4e3b3..56f49aee 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/ResponseTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/ResponseTest.php @@ -30,40 +30,40 @@ class ResponseTest extends TestCase public function testGetHeaders() { - $response = new Response('foo', 200, array('foo' => 'bar')); - $this->assertEquals(array('foo' => 'bar'), $response->getHeaders(), '->getHeaders() returns the headers of the response'); + $response = new Response('foo', 200, ['foo' => 'bar']); + $this->assertEquals(['foo' => 'bar'], $response->getHeaders(), '->getHeaders() returns the headers of the response'); } public function testGetHeader() { - $response = new Response('foo', 200, array( + $response = new Response('foo', 200, [ 'Content-Type' => 'text/html', - 'Set-Cookie' => array('foo=bar', 'bar=foo'), - )); + 'Set-Cookie' => ['foo=bar', 'bar=foo'], + ]); $this->assertEquals('text/html', $response->getHeader('Content-Type'), '->getHeader() returns a header of the response'); $this->assertEquals('text/html', $response->getHeader('content-type'), '->getHeader() returns a header of the response'); $this->assertEquals('text/html', $response->getHeader('content_type'), '->getHeader() returns a header of the response'); $this->assertEquals('foo=bar', $response->getHeader('Set-Cookie'), '->getHeader() returns the first header value'); - $this->assertEquals(array('foo=bar', 'bar=foo'), $response->getHeader('Set-Cookie', false), '->getHeader() returns all header values if first is false'); + $this->assertEquals(['foo=bar', 'bar=foo'], $response->getHeader('Set-Cookie', false), '->getHeader() returns all header values if first is false'); $this->assertNull($response->getHeader('foo'), '->getHeader() returns null if the header is not defined'); - $this->assertEquals(array(), $response->getHeader('foo', false), '->getHeader() returns an empty array if the header is not defined and first is set to false'); + $this->assertEquals([], $response->getHeader('foo', false), '->getHeader() returns an empty array if the header is not defined and first is set to false'); } public function testMagicToString() { - $response = new Response('foo', 304, array('foo' => 'bar')); + $response = new Response('foo', 304, ['foo' => 'bar']); $this->assertEquals("foo: bar\n\nfoo", $response->__toString(), '->__toString() returns the headers and the content as a string'); } public function testMagicToStringWithMultipleSetCookieHeader() { - $headers = array( + $headers = [ 'content-type' => 'text/html; charset=utf-8', - 'set-cookie' => array('foo=bar', 'bar=foo'), - ); + 'set-cookie' => ['foo=bar', 'bar=foo'], + ]; $expected = 'content-type: text/html; charset=utf-8'."\n"; $expected .= 'set-cookie: foo=bar'."\n"; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php index 6ea4ce7a..099c97a4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php @@ -59,9 +59,9 @@ abstract class AbstractAdapter implements AdapterInterface, LoggerAwareInterface $getId = function ($key) { return $this->getId((string) $key); }; $this->mergeByLifetime = \Closure::bind( function ($deferred, $namespace, &$expiredIds) use ($getId) { - $byLifetime = array(); + $byLifetime = []; $now = time(); - $expiredIds = array(); + $expiredIds = []; foreach ($deferred as $key => $item) { if (null === $item->expiry) { @@ -123,10 +123,10 @@ abstract class AbstractAdapter implements AdapterInterface, LoggerAwareInterface $apcu->setLogger($logger); } - return new ChainAdapter(array($apcu, $fs)); + return new ChainAdapter([$apcu, $fs]); } - public static function createConnection($dsn, array $options = array()) + public static function createConnection($dsn, array $options = []) { if (!\is_string($dsn)) { throw new InvalidArgumentException(sprintf('The %s() method expect argument #1 to be string, %s given.', __METHOD__, \gettype($dsn))); @@ -156,11 +156,11 @@ abstract class AbstractAdapter implements AdapterInterface, LoggerAwareInterface $value = null; try { - foreach ($this->doFetch(array($id)) as $value) { + foreach ($this->doFetch([$id]) as $value) { $isHit = true; } } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to fetch key "{key}"', array('key' => $key, 'exception' => $e)); + CacheItem::log($this->logger, 'Failed to fetch key "{key}"', ['key' => $key, 'exception' => $e]); } return $f($key, $value, $isHit); @@ -169,12 +169,12 @@ abstract class AbstractAdapter implements AdapterInterface, LoggerAwareInterface /** * {@inheritdoc} */ - public function getItems(array $keys = array()) + public function getItems(array $keys = []) { if ($this->deferred) { $this->commit(); } - $ids = array(); + $ids = []; foreach ($keys as $key) { $ids[] = $this->getId($key); @@ -182,8 +182,8 @@ abstract class AbstractAdapter implements AdapterInterface, LoggerAwareInterface try { $items = $this->doFetch($ids); } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to fetch requested items', array('keys' => $keys, 'exception' => $e)); - $items = array(); + CacheItem::log($this->logger, 'Failed to fetch requested items', ['keys' => $keys, 'exception' => $e]); + $items = []; } $ids = array_combine($ids, $keys); @@ -224,7 +224,7 @@ abstract class AbstractAdapter implements AdapterInterface, LoggerAwareInterface $ok = true; $byLifetime = $this->mergeByLifetime; $byLifetime = $byLifetime($this->deferred, $this->namespace, $expiredIds); - $retry = $this->deferred = array(); + $retry = $this->deferred = []; if ($expiredIds) { $this->doDelete($expiredIds); @@ -234,7 +234,7 @@ abstract class AbstractAdapter implements AdapterInterface, LoggerAwareInterface $e = $this->doSave($values, $lifetime); } catch (\Exception $e) { } - if (true === $e || array() === $e) { + if (true === $e || [] === $e) { continue; } if (\is_array($e) || 1 === \count($values)) { @@ -242,7 +242,7 @@ abstract class AbstractAdapter implements AdapterInterface, LoggerAwareInterface $ok = false; $v = $values[$id]; $type = \is_object($v) ? \get_class($v) : \gettype($v); - CacheItem::log($this->logger, 'Failed to save key "{key}" ({type})', array('key' => substr($id, \strlen($this->namespace)), 'type' => $type, 'exception' => $e instanceof \Exception ? $e : null)); + CacheItem::log($this->logger, 'Failed to save key "{key}" ({type})', ['key' => substr($id, \strlen($this->namespace)), 'type' => $type, 'exception' => $e instanceof \Exception ? $e : null]); } } else { foreach ($values as $id => $v) { @@ -256,15 +256,15 @@ abstract class AbstractAdapter implements AdapterInterface, LoggerAwareInterface foreach ($ids as $id) { try { $v = $byLifetime[$lifetime][$id]; - $e = $this->doSave(array($id => $v), $lifetime); + $e = $this->doSave([$id => $v], $lifetime); } catch (\Exception $e) { } - if (true === $e || array() === $e) { + if (true === $e || [] === $e) { continue; } $ok = false; $type = \is_object($v) ? \get_class($v) : \gettype($v); - CacheItem::log($this->logger, 'Failed to save key "{key}" ({type})', array('key' => substr($id, \strlen($this->namespace)), 'type' => $type, 'exception' => $e instanceof \Exception ? $e : null)); + CacheItem::log($this->logger, 'Failed to save key "{key}" ({type})', ['key' => substr($id, \strlen($this->namespace)), 'type' => $type, 'exception' => $e instanceof \Exception ? $e : null]); } } @@ -292,7 +292,7 @@ abstract class AbstractAdapter implements AdapterInterface, LoggerAwareInterface yield $key => $f($key, $value, true); } } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to fetch requested items', array('keys' => array_values($keys), 'exception' => $e)); + CacheItem::log($this->logger, 'Failed to fetch requested items', ['keys' => array_values($keys), 'exception' => $e]); } foreach ($keys as $key) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/AdapterInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/AdapterInterface.php index 41222c1a..85fe0768 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/AdapterInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/AdapterInterface.php @@ -33,5 +33,5 @@ interface AdapterInterface extends CacheItemPoolInterface * * @return \Traversable|CacheItem[] */ - public function getItems(array $keys = array()); + public function getItems(array $keys = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php index 9c433205..858a47e9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php @@ -66,7 +66,7 @@ class ArrayAdapter implements AdapterInterface, LoggerAwareInterface, Resettable $isHit = false; } } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to unserialize key "{key}"', array('key' => $key, 'exception' => $e)); + CacheItem::log($this->logger, 'Failed to unserialize key "{key}"', ['key' => $key, 'exception' => $e]); $this->values[$key] = $value = null; $isHit = false; } @@ -78,7 +78,7 @@ class ArrayAdapter implements AdapterInterface, LoggerAwareInterface, Resettable /** * {@inheritdoc} */ - public function getItems(array $keys = array()) + public function getItems(array $keys = []) { foreach ($keys as $key) { CacheItem::validateKey($key); @@ -122,7 +122,7 @@ class ArrayAdapter implements AdapterInterface, LoggerAwareInterface, Resettable $value = serialize($value); } catch (\Exception $e) { $type = \is_object($value) ? \get_class($value) : \gettype($value); - CacheItem::log($this->logger, 'Failed to save key "{key}" ({type})', array('key' => $key, 'type' => $type, 'exception' => $e)); + CacheItem::log($this->logger, 'Failed to save key "{key}" ({type})', ['key' => $key, 'type' => $type, 'exception' => $e]); return false; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ChainAdapter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ChainAdapter.php index 72ff4c19..1f4d319e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ChainAdapter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ChainAdapter.php @@ -28,7 +28,7 @@ use Symfony\Component\Cache\ResettableInterface; */ class ChainAdapter implements AdapterInterface, PruneableInterface, ResettableInterface { - private $adapters = array(); + private $adapters = []; private $adapterCount; private $syncItem; @@ -81,7 +81,7 @@ class ChainAdapter implements AdapterInterface, PruneableInterface, ResettableIn public function getItem($key) { $syncItem = $this->syncItem; - $misses = array(); + $misses = []; foreach ($this->adapters as $i => $adapter) { $item = $adapter->getItem($key); @@ -103,15 +103,15 @@ class ChainAdapter implements AdapterInterface, PruneableInterface, ResettableIn /** * {@inheritdoc} */ - public function getItems(array $keys = array()) + public function getItems(array $keys = []) { return $this->generateItems($this->adapters[0]->getItems($keys), 0); } private function generateItems($items, $adapterIndex) { - $missing = array(); - $misses = array(); + $missing = []; + $misses = []; $nextAdapterIndex = $adapterIndex + 1; $nextAdapter = isset($this->adapters[$nextAdapterIndex]) ? $this->adapters[$nextAdapterIndex] : null; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/NullAdapter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/NullAdapter.php index f58f81e5..c81a1cd6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/NullAdapter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/NullAdapter.php @@ -49,7 +49,7 @@ class NullAdapter implements AdapterInterface /** * {@inheritdoc} */ - public function getItems(array $keys = array()) + public function getItems(array $keys = []) { return $this->generateItems($keys); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/PdoAdapter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/PdoAdapter.php index c3fc45b6..59038679 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/PdoAdapter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/PdoAdapter.php @@ -35,7 +35,7 @@ class PdoAdapter extends AbstractAdapter implements PruneableInterface * * db_time_col: The column where to store the timestamp [default: item_time] * * db_username: The username when lazy-connect [default: ''] * * db_password: The password when lazy-connect [default: ''] - * * db_connection_options: An array of driver-specific connection options [default: array()] + * * db_connection_options: An array of driver-specific connection options [default: []] * * @param \PDO|Connection|string $connOrDsn A \PDO or Connection instance or DSN string or null * @param string $namespace @@ -46,7 +46,7 @@ class PdoAdapter extends AbstractAdapter implements PruneableInterface * @throws InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION * @throws InvalidArgumentException When namespace contains invalid characters */ - public function __construct($connOrDsn, $namespace = '', $defaultLifetime = 0, array $options = array()) + public function __construct($connOrDsn, $namespace = '', $defaultLifetime = 0, array $options = []) { $this->init($connOrDsn, $namespace, $defaultLifetime, $options); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php index 4bd0da8c..42a41420 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php @@ -120,7 +120,7 @@ class PhpArrayAdapter implements AdapterInterface, PruneableInterface, Resettabl /** * {@inheritdoc} */ - public function getItems(array $keys = array()) + public function getItems(array $keys = []) { foreach ($keys as $key) { if (!\is_string($key)) { @@ -170,7 +170,7 @@ class PhpArrayAdapter implements AdapterInterface, PruneableInterface, Resettabl public function deleteItems(array $keys) { $deleted = true; - $fallbackKeys = array(); + $fallbackKeys = []; foreach ($keys as $key) { if (!\is_string($key)) { @@ -232,7 +232,7 @@ class PhpArrayAdapter implements AdapterInterface, PruneableInterface, Resettabl private function generateItems(array $keys) { $f = $this->createCacheItem; - $fallbackKeys = array(); + $fallbackKeys = []; foreach ($keys as $key) { if (isset($this->values[$key])) { @@ -272,10 +272,10 @@ class PhpArrayAdapter implements AdapterInterface, PruneableInterface, Resettabl { $e = new \ReflectionException("Class $class does not exist"); $trace = $e->getTrace(); - $autoloadFrame = array( + $autoloadFrame = [ 'function' => 'spl_autoload_call', - 'args' => array($class), - ); + 'args' => [$class], + ]; $i = 1 + array_search($autoloadFrame, $trace, true); if (isset($trace[$i]['function']) && !isset($trace[$i]['class'])) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php index 7682c724..90605236 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php @@ -73,7 +73,7 @@ class ProxyAdapter implements AdapterInterface, PruneableInterface, ResettableIn /** * {@inheritdoc} */ - public function getItems(array $keys = array()) + public function getItems(array $keys = []) { if ($this->namespaceLen) { foreach ($keys as $i => $key) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php index 62f815e0..d453e271 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php @@ -27,13 +27,13 @@ class TagAwareAdapter implements TagAwareAdapterInterface, PruneableInterface, R use ProxyTrait; - private $deferred = array(); + private $deferred = []; private $createCacheItem; private $setCacheItemTags; private $getTagsByKey; private $invalidateTags; private $tags; - private $knownTagVersions = array(); + private $knownTagVersions = []; private $knownTagVersionsTtl; public function __construct(AdapterInterface $itemsPool, AdapterInterface $tagsPool = null, $knownTagVersionsTtl = 0.15) @@ -78,7 +78,7 @@ class TagAwareAdapter implements TagAwareAdapterInterface, PruneableInterface, R ); $this->getTagsByKey = \Closure::bind( function ($deferred) { - $tagsByKey = array(); + $tagsByKey = []; foreach ($deferred as $key => $item) { $tagsByKey[$key] = $item->tags; } @@ -109,8 +109,8 @@ class TagAwareAdapter implements TagAwareAdapterInterface, PruneableInterface, R public function invalidateTags(array $tags) { $ok = true; - $tagsByKey = array(); - $invalidatedTags = array(); + $tagsByKey = []; + $invalidatedTags = []; foreach ($tags as $tag) { CacheItem::validateKey($tag); $invalidatedTags[$tag] = 0; @@ -127,7 +127,7 @@ class TagAwareAdapter implements TagAwareAdapterInterface, PruneableInterface, R $f = $this->getTagsByKey; $tagsByKey = $f($items); - $this->deferred = array(); + $this->deferred = []; } $tagVersions = $this->getTagVersions($tagsByKey, $invalidatedTags); @@ -161,7 +161,7 @@ class TagAwareAdapter implements TagAwareAdapterInterface, PruneableInterface, R return true; } - foreach ($this->getTagVersions(array($itemTags)) as $tag => $version) { + foreach ($this->getTagVersions([$itemTags]) as $tag => $version) { if ($itemTags[$tag] !== $version && 1 !== $itemTags[$tag] - $version) { return false; } @@ -175,7 +175,7 @@ class TagAwareAdapter implements TagAwareAdapterInterface, PruneableInterface, R */ public function getItem($key) { - foreach ($this->getItems(array($key)) as $item) { + foreach ($this->getItems([$key]) as $item) { return $item; } } @@ -183,12 +183,12 @@ class TagAwareAdapter implements TagAwareAdapterInterface, PruneableInterface, R /** * {@inheritdoc} */ - public function getItems(array $keys = array()) + public function getItems(array $keys = []) { if ($this->deferred) { $this->commit(); } - $tagKeys = array(); + $tagKeys = []; foreach ($keys as $key) { if ('' !== $key && \is_string($key)) { @@ -213,7 +213,7 @@ class TagAwareAdapter implements TagAwareAdapterInterface, PruneableInterface, R */ public function clear() { - $this->deferred = array(); + $this->deferred = []; return $this->pool->clear(); } @@ -223,7 +223,7 @@ class TagAwareAdapter implements TagAwareAdapterInterface, PruneableInterface, R */ public function deleteItem($key) { - return $this->deleteItems(array($key)); + return $this->deleteItems([$key]); } /** @@ -271,7 +271,7 @@ class TagAwareAdapter implements TagAwareAdapterInterface, PruneableInterface, R */ public function commit() { - return $this->invalidateTags(array()); + return $this->invalidateTags([]); } public function __destruct() @@ -281,7 +281,7 @@ class TagAwareAdapter implements TagAwareAdapterInterface, PruneableInterface, R private function generateItems($items, array $tagKeys) { - $bufferedItems = $itemTags = array(); + $bufferedItems = $itemTags = []; $f = $this->setCacheItemTags; foreach ($items as $key => $item) { @@ -295,7 +295,7 @@ class TagAwareAdapter implements TagAwareAdapterInterface, PruneableInterface, R } unset($tagKeys[$key]); - $itemTags[$key] = $item->get() ?: array(); + $itemTags[$key] = $item->get() ?: []; if (!$tagKeys) { $tagVersions = $this->getTagVersions($itemTags); @@ -318,7 +318,7 @@ class TagAwareAdapter implements TagAwareAdapterInterface, PruneableInterface, R } } - private function getTagVersions(array $tagsByKey, array &$invalidatedTags = array()) + private function getTagVersions(array $tagsByKey, array &$invalidatedTags = []) { $tagVersions = $invalidatedTags; @@ -327,7 +327,7 @@ class TagAwareAdapter implements TagAwareAdapterInterface, PruneableInterface, R } if (!$tagVersions) { - return array(); + return []; } if (!$fetchTagVersions = 1 !== \func_num_args()) { @@ -341,7 +341,7 @@ class TagAwareAdapter implements TagAwareAdapterInterface, PruneableInterface, R } $now = microtime(true); - $tags = array(); + $tags = []; foreach ($tagVersions as $tag => $version) { $tags[$tag.static::TAGS_PREFIX] = $tag; if ($fetchTagVersions || !isset($this->knownTagVersions[$tag])) { @@ -366,7 +366,7 @@ class TagAwareAdapter implements TagAwareAdapterInterface, PruneableInterface, R if (isset($invalidatedTags[$tag])) { $invalidatedTags[$tag] = $version->set(++$tagVersions[$tag]); } - $this->knownTagVersions[$tag] = array($now, $tagVersions[$tag]); + $this->knownTagVersions[$tag] = [$now, $tagVersions[$tag]]; } return $tagVersions; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/TraceableAdapter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/TraceableAdapter.php index 98d0e526..4aed2d71 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/TraceableAdapter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/TraceableAdapter.php @@ -25,7 +25,7 @@ use Symfony\Component\Cache\ResettableInterface; class TraceableAdapter implements AdapterInterface, PruneableInterface, ResettableInterface { protected $pool; - private $calls = array(); + private $calls = []; public function __construct(AdapterInterface $pool) { @@ -107,7 +107,7 @@ class TraceableAdapter implements AdapterInterface, PruneableInterface, Resettab /** * {@inheritdoc} */ - public function getItems(array $keys = array()) + public function getItems(array $keys = []) { $event = $this->start(__FUNCTION__); try { @@ -116,7 +116,7 @@ class TraceableAdapter implements AdapterInterface, PruneableInterface, Resettab $event->end = microtime(true); } $f = function () use ($result, $event) { - $event->result = array(); + $event->result = []; foreach ($result as $key => $item) { if ($event->result[$key] = $item->isHit()) { ++$event->hits; @@ -209,7 +209,7 @@ class TraceableAdapter implements AdapterInterface, PruneableInterface, Resettab public function clearCalls() { - $this->calls = array(); + $this->calls = []; } protected function start($name) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/CacheItem.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/CacheItem.php index 58ecad82..4ab5d1a2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/CacheItem.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/CacheItem.php @@ -25,8 +25,8 @@ final class CacheItem implements CacheItemInterface protected $isHit = false; protected $expiry; protected $defaultLifetime; - protected $tags = array(); - protected $prevTags = array(); + protected $tags = []; + protected $prevTags = []; protected $innerItem; protected $poolHash; @@ -110,7 +110,7 @@ final class CacheItem implements CacheItemInterface public function tag($tags) { if (!\is_array($tags)) { - $tags = array($tags); + $tags = [$tags]; } foreach ($tags as $tag) { if (!\is_string($tag)) { @@ -170,12 +170,12 @@ final class CacheItem implements CacheItemInterface * * @internal */ - public static function log(LoggerInterface $logger = null, $message, $context = array()) + public static function log(LoggerInterface $logger = null, $message, $context = []) { if ($logger) { $logger->warning($message, $context); } else { - $replace = array(); + $replace = []; foreach ($context as $k => $v) { if (is_scalar($v)) { $replace['{'.$k.'}'] = $v; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/DataCollector/CacheDataCollector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/DataCollector/CacheDataCollector.php index ac5c36d2..a2f826d7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/DataCollector/CacheDataCollector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/DataCollector/CacheDataCollector.php @@ -27,7 +27,7 @@ class CacheDataCollector extends DataCollector implements LateDataCollectorInter /** * @var TraceableAdapter[] */ - private $instances = array(); + private $instances = []; /** * @param string $name @@ -43,8 +43,8 @@ class CacheDataCollector extends DataCollector implements LateDataCollectorInter */ public function collect(Request $request, Response $response, \Exception $exception = null) { - $empty = array('calls' => array(), 'config' => array(), 'options' => array(), 'statistics' => array()); - $this->data = array('instances' => $empty, 'total' => $empty); + $empty = ['calls' => [], 'config' => [], 'options' => [], 'statistics' => []]; + $this->data = ['instances' => $empty, 'total' => $empty]; foreach ($this->instances as $name => $instance) { $this->data['instances']['calls'][$name] = $instance->getCalls(); } @@ -55,7 +55,7 @@ class CacheDataCollector extends DataCollector implements LateDataCollectorInter public function reset() { - $this->data = array(); + $this->data = []; foreach ($this->instances as $instance) { $instance->clearCalls(); } @@ -109,9 +109,9 @@ class CacheDataCollector extends DataCollector implements LateDataCollectorInter */ private function calculateStatistics() { - $statistics = array(); + $statistics = []; foreach ($this->data['instances']['calls'] as $name => $calls) { - $statistics[$name] = array( + $statistics[$name] = [ 'calls' => 0, 'time' => 0, 'reads' => 0, @@ -119,7 +119,7 @@ class CacheDataCollector extends DataCollector implements LateDataCollectorInter 'deletes' => 0, 'hits' => 0, 'misses' => 0, - ); + ]; /** @var TraceableAdapterEvent $call */ foreach ($calls as $call) { ++$statistics[$name]['calls']; @@ -164,7 +164,7 @@ class CacheDataCollector extends DataCollector implements LateDataCollectorInter private function calculateTotalStatistics() { $statistics = $this->getStatistics(); - $totals = array( + $totals = [ 'calls' => 0, 'time' => 0, 'reads' => 0, @@ -172,7 +172,7 @@ class CacheDataCollector extends DataCollector implements LateDataCollectorInter 'deletes' => 0, 'hits' => 0, 'misses' => 0, - ); + ]; foreach ($statistics as $name => $values) { foreach ($totals as $key => $value) { $totals[$key] += $statistics[$name][$key]; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/LICENSE index fcd3fa76..3c464ca9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016-2018 Fabien Potencier +Copyright (c) 2016-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/AbstractCache.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/AbstractCache.php index f29eb69c..0d715e48 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/AbstractCache.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/AbstractCache.php @@ -52,11 +52,11 @@ abstract class AbstractCache implements CacheInterface, LoggerAwareInterface, Re $id = $this->getId($key); try { - foreach ($this->doFetch(array($id)) as $value) { + foreach ($this->doFetch([$id]) as $value) { return $value; } } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to fetch key "{key}"', array('key' => $key, 'exception' => $e)); + CacheItem::log($this->logger, 'Failed to fetch key "{key}"', ['key' => $key, 'exception' => $e]); } return $default; @@ -69,7 +69,7 @@ abstract class AbstractCache implements CacheInterface, LoggerAwareInterface, Re { CacheItem::validateKey($key); - return $this->setMultiple(array($key => $value), $ttl); + return $this->setMultiple([$key => $value], $ttl); } /** @@ -82,7 +82,7 @@ abstract class AbstractCache implements CacheInterface, LoggerAwareInterface, Re } elseif (!\is_array($keys)) { throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given', \is_object($keys) ? \get_class($keys) : \gettype($keys))); } - $ids = array(); + $ids = []; foreach ($keys as $key) { $ids[] = $this->getId($key); @@ -90,8 +90,8 @@ abstract class AbstractCache implements CacheInterface, LoggerAwareInterface, Re try { $values = $this->doFetch($ids); } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to fetch requested values', array('keys' => $keys, 'exception' => $e)); - $values = array(); + CacheItem::log($this->logger, 'Failed to fetch requested values', ['keys' => $keys, 'exception' => $e]); + $values = []; } $ids = array_combine($ids, $keys); @@ -106,7 +106,7 @@ abstract class AbstractCache implements CacheInterface, LoggerAwareInterface, Re if (!\is_array($values) && !$values instanceof \Traversable) { throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given', \is_object($values) ? \get_class($values) : \gettype($values))); } - $valuesById = array(); + $valuesById = []; foreach ($values as $key => $value) { if (\is_int($key)) { @@ -122,14 +122,14 @@ abstract class AbstractCache implements CacheInterface, LoggerAwareInterface, Re $e = $this->doSave($valuesById, $ttl); } catch (\Exception $e) { } - if (true === $e || array() === $e) { + if (true === $e || [] === $e) { return true; } - $keys = array(); + $keys = []; foreach (\is_array($e) ? $e : array_keys($valuesById) as $id) { $keys[] = substr($id, \strlen($this->namespace)); } - CacheItem::log($this->logger, 'Failed to save values', array('keys' => $keys, 'exception' => $e instanceof \Exception ? $e : null)); + CacheItem::log($this->logger, 'Failed to save values', ['keys' => $keys, 'exception' => $e instanceof \Exception ? $e : null]); return false; } @@ -175,7 +175,7 @@ abstract class AbstractCache implements CacheInterface, LoggerAwareInterface, Re yield $key => $value; } } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to fetch requested values', array('keys' => array_values($keys), 'exception' => $e)); + CacheItem::log($this->logger, 'Failed to fetch requested values', ['keys' => array_values($keys), 'exception' => $e]); } foreach ($keys as $key) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/ArrayCache.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/ArrayCache.php index ca45c93a..9c8f6d8e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/ArrayCache.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/ArrayCache.php @@ -45,7 +45,7 @@ class ArrayCache implements CacheInterface, LoggerAwareInterface, ResettableInte */ public function get($key, $default = null) { - foreach ($this->getMultiple(array($key), $default) as $v) { + foreach ($this->getMultiple([$key], $default) as $v) { return $v; } } @@ -89,7 +89,7 @@ class ArrayCache implements CacheInterface, LoggerAwareInterface, ResettableInte { CacheItem::validateKey($key); - return $this->setMultiple(array($key => $value), $ttl); + return $this->setMultiple([$key => $value], $ttl); } /** @@ -100,7 +100,7 @@ class ArrayCache implements CacheInterface, LoggerAwareInterface, ResettableInte if (!\is_array($values) && !$values instanceof \Traversable) { throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given', \is_object($values) ? \get_class($values) : \gettype($values))); } - $valuesArray = array(); + $valuesArray = []; foreach ($values as $key => $value) { \is_int($key) || CacheItem::validateKey($key); @@ -115,7 +115,7 @@ class ArrayCache implements CacheInterface, LoggerAwareInterface, ResettableInte $valuesArray[$key] = serialize($value); } catch (\Exception $e) { $type = \is_object($value) ? \get_class($value) : \gettype($value); - CacheItem::log($this->logger, 'Failed to save key "{key}" ({type})', array('key' => $key, 'type' => $type, 'exception' => $e)); + CacheItem::log($this->logger, 'Failed to save key "{key}" ({type})', ['key' => $key, 'type' => $type, 'exception' => $e]); return false; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/ChainCache.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/ChainCache.php index 47ac9c62..2e6c7277 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/ChainCache.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/ChainCache.php @@ -27,7 +27,7 @@ use Symfony\Component\Cache\ResettableInterface; class ChainCache implements CacheInterface, PruneableInterface, ResettableInterface { private $miss; - private $caches = array(); + private $caches = []; private $defaultLifetime; private $cacheCount; @@ -87,7 +87,7 @@ class ChainCache implements CacheInterface, PruneableInterface, ResettableInterf private function generateItems($values, $cacheIndex, $miss, $default) { - $missing = array(); + $missing = []; $nextCacheIndex = $cacheIndex + 1; $nextCache = isset($this->caches[$nextCacheIndex]) ? $this->caches[$nextCacheIndex] : null; @@ -201,7 +201,7 @@ class ChainCache implements CacheInterface, PruneableInterface, ResettableInterf if ($values instanceof \Traversable) { $valuesIterator = $values; $values = function () use ($valuesIterator, &$values) { - $generatedValues = array(); + $generatedValues = []; foreach ($valuesIterator as $key => $value) { yield $key => $value; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/PdoCache.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/PdoCache.php index 931a3b1f..c92e049a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/PdoCache.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/PdoCache.php @@ -33,7 +33,7 @@ class PdoCache extends AbstractCache implements PruneableInterface * * db_time_col: The column where to store the timestamp [default: item_time] * * db_username: The username when lazy-connect [default: ''] * * db_password: The password when lazy-connect [default: ''] - * * db_connection_options: An array of driver-specific connection options [default: array()] + * * db_connection_options: An array of driver-specific connection options [default: []] * * @param \PDO|Connection|string $connOrDsn A \PDO or Connection instance or DSN string or null * @param string $namespace @@ -44,7 +44,7 @@ class PdoCache extends AbstractCache implements PruneableInterface * @throws InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION * @throws InvalidArgumentException When namespace contains invalid characters */ - public function __construct($connOrDsn, $namespace = '', $defaultLifetime = 0, array $options = array()) + public function __construct($connOrDsn, $namespace = '', $defaultLifetime = 0, array $options = []) { $this->init($connOrDsn, $namespace, $defaultLifetime, $options); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/PhpArrayCache.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/PhpArrayCache.php index 728d2bd7..607555e9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/PhpArrayCache.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/PhpArrayCache.php @@ -154,7 +154,7 @@ class PhpArrayCache implements CacheInterface, PruneableInterface, ResettableInt } $deleted = true; - $fallbackKeys = array(); + $fallbackKeys = []; foreach ($keys as $key) { if (!\is_string($key)) { @@ -203,7 +203,7 @@ class PhpArrayCache implements CacheInterface, PruneableInterface, ResettableInt } $saved = true; - $fallbackValues = array(); + $fallbackValues = []; foreach ($values as $key => $value) { if (!\is_string($key) && !\is_int($key)) { @@ -226,7 +226,7 @@ class PhpArrayCache implements CacheInterface, PruneableInterface, ResettableInt private function generateItems(array $keys, $default) { - $fallbackKeys = array(); + $fallbackKeys = []; foreach ($keys as $key) { if (isset($this->values[$key])) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/Psr6Cache.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/Psr6Cache.php index 853d46e2..85d75bec 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/Psr6Cache.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/Psr6Cache.php @@ -145,7 +145,7 @@ class Psr6Cache implements CacheInterface, PruneableInterface, ResettableInterfa } catch (Psr6CacheException $e) { throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); } - $values = array(); + $values = []; foreach ($items as $key => $item) { $values[$key] = $item->isHit() ? $item->get() : $default; @@ -163,7 +163,7 @@ class Psr6Cache implements CacheInterface, PruneableInterface, ResettableInterfa if (!$valuesIsArray && !$values instanceof \Traversable) { throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given', \is_object($values) ? \get_class($values) : \gettype($values))); } - $items = array(); + $items = []; try { if (null !== $f = $this->createCacheItem) { @@ -172,7 +172,7 @@ class Psr6Cache implements CacheInterface, PruneableInterface, ResettableInterfa $items[$key] = $f($key, $value, true); } } elseif ($valuesIsArray) { - $items = array(); + $items = []; foreach ($values as $key => $value) { $items[] = (string) $key; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/TraceableCache.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/TraceableCache.php index 181934ef..61b22963 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/TraceableCache.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Simple/TraceableCache.php @@ -24,7 +24,7 @@ class TraceableCache implements CacheInterface, PruneableInterface, ResettableIn { private $pool; private $miss; - private $calls = array(); + private $calls = []; public function __construct(CacheInterface $pool) { @@ -99,7 +99,7 @@ class TraceableCache implements CacheInterface, PruneableInterface, ResettableIn public function setMultiple($values, $ttl = null) { $event = $this->start(__FUNCTION__); - $event->result['keys'] = array(); + $event->result['keys'] = []; if ($values instanceof \Traversable) { $values = function () use ($values, $event) { @@ -133,7 +133,7 @@ class TraceableCache implements CacheInterface, PruneableInterface, ResettableIn $event->end = microtime(true); } $f = function () use ($result, $event, $miss, $default) { - $event->result = array(); + $event->result = []; foreach ($result as $key => $value) { if ($event->result[$key] = $miss !== $value) { ++$event->hits; @@ -216,7 +216,7 @@ class TraceableCache implements CacheInterface, PruneableInterface, ResettableIn try { return $this->calls; } finally { - $this->calls = array(); + $this->calls = []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTest.php index 147dfcd1..5fcec9a2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTest.php @@ -15,11 +15,11 @@ use Symfony\Component\Cache\Adapter\RedisAdapter; abstract class AbstractRedisAdapterTest extends AdapterTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testExpiration' => 'Testing expiration slows down the test suite', 'testHasItemReturnsFalseWhenDeferredItemIsExpired' => 'Testing expiration slows down the test suite', 'testDefaultLifeTime' => 'Testing expiration slows down the test suite', - ); + ]; protected static $redis; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php index d3175adc..5758a286 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php @@ -21,11 +21,11 @@ abstract class AdapterTestCase extends CachePoolTest { parent::setUp(); - if (!array_key_exists('testDeferredSaveWithoutCommit', $this->skippedTests) && \defined('HHVM_VERSION')) { + if (!\array_key_exists('testDeferredSaveWithoutCommit', $this->skippedTests) && \defined('HHVM_VERSION')) { $this->skippedTests['testDeferredSaveWithoutCommit'] = 'Destructors are called late on HHVM.'; } - if (!array_key_exists('testPrune', $this->skippedTests) && !$this->createCachePool() instanceof PruneableInterface) { + if (!\array_key_exists('testPrune', $this->skippedTests) && !$this->createCachePool() instanceof PruneableInterface) { $this->skippedTests['testPrune'] = 'Not a pruneable cache pool.'; } } @@ -85,11 +85,11 @@ abstract class AdapterTestCase extends CachePoolTest $item = $cache->getItem('foo'); $this->assertFalse($item->isHit()); - foreach ($cache->getItems(array('foo')) as $item) { + foreach ($cache->getItems(['foo']) as $item) { } $cache->save($item->set(new NotUnserializable())); - foreach ($cache->getItems(array('foo')) as $item) { + foreach ($cache->getItems(['foo']) as $item) { } $this->assertFalse($item->isHit()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ApcuAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ApcuAdapterTest.php index a17b42bc..5cca73f5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ApcuAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ApcuAdapterTest.php @@ -16,11 +16,11 @@ use Symfony\Component\Cache\Adapter\ApcuAdapter; class ApcuAdapterTest extends AdapterTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testExpiration' => 'Testing expiration slows down the test suite', 'testHasItemReturnsFalseWhenDeferredItemIsExpired' => 'Testing expiration slows down the test suite', 'testDefaultLifeTime' => 'Testing expiration slows down the test suite', - ); + ]; public function createCachePool($defaultLifetime = 0) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ArrayAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ArrayAdapterTest.php index 725d7901..e6adc9d0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ArrayAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ArrayAdapterTest.php @@ -18,10 +18,10 @@ use Symfony\Component\Cache\Adapter\ArrayAdapter; */ class ArrayAdapterTest extends AdapterTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testDeferredSaveWithoutCommit' => 'Assumes a shared cache which ArrayAdapter is not.', 'testSaveWithoutExpire' => 'Assumes a shared cache which ArrayAdapter is not.', - ); + ]; public function createCachePool($defaultLifetime = 0) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ChainAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ChainAdapterTest.php index a47058f5..010f68b9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ChainAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ChainAdapterTest.php @@ -26,7 +26,7 @@ class ChainAdapterTest extends AdapterTestCase { public function createCachePool($defaultLifetime = 0) { - return new ChainAdapter(array(new ArrayAdapter($defaultLifetime), new ExternalAdapter(), new FilesystemAdapter('', $defaultLifetime)), $defaultLifetime); + return new ChainAdapter([new ArrayAdapter($defaultLifetime), new ExternalAdapter(), new FilesystemAdapter('', $defaultLifetime)], $defaultLifetime); } /** @@ -35,7 +35,7 @@ class ChainAdapterTest extends AdapterTestCase */ public function testEmptyAdaptersException() { - new ChainAdapter(array()); + new ChainAdapter([]); } /** @@ -44,7 +44,7 @@ class ChainAdapterTest extends AdapterTestCase */ public function testInvalidAdapterException() { - new ChainAdapter(array(new \stdClass())); + new ChainAdapter([new \stdClass()]); } public function testPrune() @@ -53,18 +53,18 @@ class ChainAdapterTest extends AdapterTestCase $this->markTestSkipped($this->skippedTests[__FUNCTION__]); } - $cache = new ChainAdapter(array( + $cache = new ChainAdapter([ $this->getPruneableMock(), $this->getNonPruneableMock(), $this->getPruneableMock(), - )); + ]); $this->assertTrue($cache->prune()); - $cache = new ChainAdapter(array( + $cache = new ChainAdapter([ $this->getPruneableMock(), $this->getFailingPruneableMock(), $this->getPruneableMock(), - )); + ]); $this->assertFalse($cache->prune()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/DoctrineAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/DoctrineAdapterTest.php index 8d4dfe28..8f520cb5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/DoctrineAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/DoctrineAdapterTest.php @@ -19,11 +19,11 @@ use Symfony\Component\Cache\Tests\Fixtures\ArrayCache; */ class DoctrineAdapterTest extends AdapterTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testDeferredSaveWithoutCommit' => 'Assumes a shared cache which ArrayCache is not.', 'testSaveWithoutExpire' => 'Assumes a shared cache which ArrayCache is not.', 'testNotUnserializable' => 'ArrayCache does not use serialize/unserialize', - ); + ]; public function createCachePool($defaultLifetime = 0) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/MaxIdLengthAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/MaxIdLengthAdapterTest.php index 5e301f25..8bea2681 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/MaxIdLengthAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/MaxIdLengthAdapterTest.php @@ -19,15 +19,15 @@ class MaxIdLengthAdapterTest extends TestCase public function testLongKey() { $cache = $this->getMockBuilder(MaxIdLengthAdapter::class) - ->setConstructorArgs(array(str_repeat('-', 10))) - ->setMethods(array('doHave', 'doFetch', 'doDelete', 'doSave', 'doClear')) + ->setConstructorArgs([str_repeat('-', 10)]) + ->setMethods(['doHave', 'doFetch', 'doDelete', 'doSave', 'doClear']) ->getMock(); $cache->expects($this->exactly(2)) ->method('doHave') ->withConsecutive( - array($this->equalTo('----------:0GTYWa9n4ed8vqNlOT2iEr:')), - array($this->equalTo('----------:---------------------------------------')) + [$this->equalTo('----------:0GTYWa9n4ed8vqNlOT2iEr:')], + [$this->equalTo('----------:---------------------------------------')] ); $cache->hasItem(str_repeat('-', 40)); @@ -37,7 +37,7 @@ class MaxIdLengthAdapterTest extends TestCase public function testLongKeyVersioning() { $cache = $this->getMockBuilder(MaxIdLengthAdapter::class) - ->setConstructorArgs(array(str_repeat('-', 26))) + ->setConstructorArgs([str_repeat('-', 26)]) ->getMock(); $reflectionClass = new \ReflectionClass(AbstractAdapter::class); @@ -46,20 +46,20 @@ class MaxIdLengthAdapterTest extends TestCase $reflectionMethod->setAccessible(true); // No versioning enabled - $this->assertEquals('--------------------------:------------', $reflectionMethod->invokeArgs($cache, array(str_repeat('-', 12)))); - $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, array(str_repeat('-', 12))))); - $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, array(str_repeat('-', 23))))); - $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, array(str_repeat('-', 40))))); + $this->assertEquals('--------------------------:------------', $reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)])); + $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)]))); + $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 23)]))); + $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 40)]))); $reflectionProperty = $reflectionClass->getProperty('versioningIsEnabled'); $reflectionProperty->setAccessible(true); $reflectionProperty->setValue($cache, true); // Versioning enabled - $this->assertEquals('--------------------------:1:------------', $reflectionMethod->invokeArgs($cache, array(str_repeat('-', 12)))); - $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, array(str_repeat('-', 12))))); - $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, array(str_repeat('-', 23))))); - $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, array(str_repeat('-', 40))))); + $this->assertEquals('--------------------------:1:------------', $reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)])); + $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)]))); + $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 23)]))); + $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 40)]))); } /** @@ -69,7 +69,7 @@ class MaxIdLengthAdapterTest extends TestCase public function testTooLongNamespace() { $cache = $this->getMockBuilder(MaxIdLengthAdapter::class) - ->setConstructorArgs(array(str_repeat('-', 40))) + ->setConstructorArgs([str_repeat('-', 40)]) ->getMock(); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php index 59d28a33..2a88fea1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php @@ -16,10 +16,10 @@ use Symfony\Component\Cache\Adapter\MemcachedAdapter; class MemcachedAdapterTest extends AdapterTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testHasItemReturnsFalseWhenDeferredItemIsExpired' => 'Testing expiration slows down the test suite', 'testDefaultLifeTime' => 'Testing expiration slows down the test suite', - ); + ]; protected static $client; @@ -28,7 +28,7 @@ class MemcachedAdapterTest extends AdapterTestCase if (!MemcachedAdapter::isSupported()) { self::markTestSkipped('Extension memcached >=2.2.0 required.'); } - self::$client = AbstractAdapter::createConnection('memcached://'.getenv('MEMCACHED_HOST'), array('binary_protocol' => false)); + self::$client = AbstractAdapter::createConnection('memcached://'.getenv('MEMCACHED_HOST'), ['binary_protocol' => false]); self::$client->get('foo'); $code = self::$client->getResultCode(); @@ -46,13 +46,13 @@ class MemcachedAdapterTest extends AdapterTestCase public function testOptions() { - $client = MemcachedAdapter::createConnection(array(), array( + $client = MemcachedAdapter::createConnection([], [ 'libketama_compatible' => false, 'distribution' => 'modula', 'compression' => true, 'serializer' => 'php', 'hash' => 'md5', - )); + ]); $this->assertSame(\Memcached::SERIALIZER_PHP, $client->getOption(\Memcached::OPT_SERIALIZER)); $this->assertSame(\Memcached::HASH_MD5, $client->getOption(\Memcached::OPT_HASH)); @@ -68,24 +68,24 @@ class MemcachedAdapterTest extends AdapterTestCase */ public function testBadOptions($name, $value) { - MemcachedAdapter::createConnection(array(), array($name => $value)); + MemcachedAdapter::createConnection([], [$name => $value]); } public function provideBadOptions() { - return array( - array('foo', 'bar'), - array('hash', 'zyx'), - array('serializer', 'zyx'), - array('distribution', 'zyx'), - ); + return [ + ['foo', 'bar'], + ['hash', 'zyx'], + ['serializer', 'zyx'], + ['distribution', 'zyx'], + ]; } public function testDefaultOptions() { $this->assertTrue(MemcachedAdapter::isSupported()); - $client = MemcachedAdapter::createConnection(array()); + $client = MemcachedAdapter::createConnection([]); $this->assertTrue($client->getOption(\Memcached::OPT_COMPRESSION)); $this->assertSame(1, $client->getOption(\Memcached::OPT_BINARY_PROTOCOL)); @@ -103,7 +103,7 @@ class MemcachedAdapterTest extends AdapterTestCase $this->markTestSkipped('Memcached::HAVE_JSON required'); } - new MemcachedAdapter(MemcachedAdapter::createConnection(array(), array('serializer' => 'json'))); + new MemcachedAdapter(MemcachedAdapter::createConnection([], ['serializer' => 'json'])); } /** @@ -112,54 +112,54 @@ class MemcachedAdapterTest extends AdapterTestCase public function testServersSetting($dsn, $host, $port) { $client1 = MemcachedAdapter::createConnection($dsn); - $client2 = MemcachedAdapter::createConnection(array($dsn)); - $client3 = MemcachedAdapter::createConnection(array(array($host, $port))); - $expect = array( + $client2 = MemcachedAdapter::createConnection([$dsn]); + $client3 = MemcachedAdapter::createConnection([[$host, $port]]); + $expect = [ 'host' => $host, 'port' => $port, - ); + ]; - $f = function ($s) { return array('host' => $s['host'], 'port' => $s['port']); }; - $this->assertSame(array($expect), array_map($f, $client1->getServerList())); - $this->assertSame(array($expect), array_map($f, $client2->getServerList())); - $this->assertSame(array($expect), array_map($f, $client3->getServerList())); + $f = function ($s) { return ['host' => $s['host'], 'port' => $s['port']]; }; + $this->assertSame([$expect], array_map($f, $client1->getServerList())); + $this->assertSame([$expect], array_map($f, $client2->getServerList())); + $this->assertSame([$expect], array_map($f, $client3->getServerList())); } public function provideServersSetting() { - yield array( + yield [ 'memcached://127.0.0.1/50', '127.0.0.1', 11211, - ); - yield array( + ]; + yield [ 'memcached://localhost:11222?weight=25', 'localhost', 11222, - ); + ]; if (filter_var(ini_get('memcached.use_sasl'), FILTER_VALIDATE_BOOLEAN)) { - yield array( + yield [ 'memcached://user:password@127.0.0.1?weight=50', '127.0.0.1', 11211, - ); + ]; } - yield array( + yield [ 'memcached:///var/run/memcached.sock?weight=25', '/var/run/memcached.sock', 0, - ); - yield array( + ]; + yield [ 'memcached:///var/local/run/memcached.socket?weight=25', '/var/local/run/memcached.socket', 0, - ); + ]; if (filter_var(ini_get('memcached.use_sasl'), FILTER_VALIDATE_BOOLEAN)) { - yield array( + yield [ 'memcached://user:password@/var/local/run/memcached.socket?weight=25', '/var/local/run/memcached.socket', 0, - ); + ]; } } @@ -181,15 +181,20 @@ class MemcachedAdapterTest extends AdapterTestCase self::markTestSkipped('Extension memcached required.'); } - yield array( + yield [ 'memcached://localhost:11222?retry_timeout=10', - array(\Memcached::OPT_RETRY_TIMEOUT => 8), - array(\Memcached::OPT_RETRY_TIMEOUT => 10), - ); - yield array( + [\Memcached::OPT_RETRY_TIMEOUT => 8], + [\Memcached::OPT_RETRY_TIMEOUT => 10], + ]; + yield [ 'memcached://localhost:11222?socket_recv_size=1&socket_send_size=2', - array(\Memcached::OPT_RETRY_TIMEOUT => 8), - array(\Memcached::OPT_SOCKET_RECV_SIZE => 1, \Memcached::OPT_SOCKET_SEND_SIZE => 2, \Memcached::OPT_RETRY_TIMEOUT => 8), - ); + [\Memcached::OPT_RETRY_TIMEOUT => 8], + [\Memcached::OPT_SOCKET_RECV_SIZE => 1, \Memcached::OPT_SOCKET_SEND_SIZE => 2, \Memcached::OPT_RETRY_TIMEOUT => 8], + ]; + } + + public function testClear() + { + $this->assertTrue($this->createCachePool()->clear()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/NullAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/NullAdapterTest.php index 73e5cad5..b771fa0e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/NullAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/NullAdapterTest.php @@ -43,7 +43,7 @@ class NullAdapterTest extends TestCase { $adapter = $this->createCachePool(); - $keys = array('foo', 'bar', 'baz', 'biz'); + $keys = ['foo', 'bar', 'baz', 'biz']; /** @var CacheItemInterface[] $items */ $items = $adapter->getItems($keys); @@ -89,7 +89,7 @@ class NullAdapterTest extends TestCase public function testDeleteItems() { - $this->assertTrue($this->createCachePool()->deleteItems(array('key', 'foo', 'bar'))); + $this->assertTrue($this->createCachePool()->deleteItems(['key', 'foo', 'bar'])); } public function testSave() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php index f89a27ce..d0699f1e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php @@ -32,7 +32,7 @@ class PdoDbalAdapterTest extends AdapterTestCase self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache'); - $pool = new PdoAdapter(DriverManager::getConnection(array('driver' => 'pdo_sqlite', 'path' => self::$dbFile))); + $pool = new PdoAdapter(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile])); $pool->createTable(); } @@ -43,6 +43,6 @@ class PdoDbalAdapterTest extends AdapterTestCase public function createCachePool($defaultLifetime = 0) { - return new PdoAdapter(DriverManager::getConnection(array('driver' => 'pdo_sqlite', 'path' => self::$dbFile)), '', $defaultLifetime); + return new PdoAdapter(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]), '', $defaultLifetime); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterTest.php index 930594fb..a227adff 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterTest.php @@ -20,7 +20,7 @@ use Symfony\Component\Cache\Adapter\PhpArrayAdapter; */ class PhpArrayAdapterTest extends AdapterTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testBasicUsage' => 'PhpArrayAdapter is read-only.', 'testBasicUsageWithLongKey' => 'PhpArrayAdapter is read-only.', 'testClear' => 'PhpArrayAdapter is read-only.', @@ -51,7 +51,7 @@ class PhpArrayAdapterTest extends AdapterTestCase 'testDefaultLifeTime' => 'PhpArrayAdapter does not allow configuring a default lifetime.', 'testPrune' => 'PhpArrayAdapter just proxies', - ); + ]; protected static $file; @@ -74,22 +74,22 @@ class PhpArrayAdapterTest extends AdapterTestCase public function testStore() { - $arrayWithRefs = array(); + $arrayWithRefs = []; $arrayWithRefs[0] = 123; $arrayWithRefs[1] = &$arrayWithRefs[0]; - $object = (object) array( + $object = (object) [ 'foo' => 'bar', 'foo2' => 'bar2', - ); + ]; - $expected = array( + $expected = [ 'null' => null, 'serializedString' => serialize($object), 'arrayWithRefs' => $arrayWithRefs, 'object' => $object, - 'arrayWithObject' => array('bar' => $object), - ); + 'arrayWithObject' => ['bar' => $object], + ]; $adapter = $this->createCachePool(); $adapter->warmUp($expected); @@ -101,13 +101,13 @@ class PhpArrayAdapterTest extends AdapterTestCase public function testStoredFile() { - $expected = array( + $expected = [ 'integer' => 42, 'float' => 42.42, 'boolean' => true, - 'array_simple' => array('foo', 'bar'), - 'array_associative' => array('foo' => 'bar', 'foo2' => 'bar2'), - ); + 'array_simple' => ['foo', 'bar'], + 'array_associative' => ['foo' => 'bar', 'foo2' => 'bar2'], + ]; $adapter = $this->createCachePool(); $adapter->warmUp($expected); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php index 1a23198c..a7feced4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php @@ -19,14 +19,14 @@ use Symfony\Component\Cache\Adapter\PhpArrayAdapter; */ class PhpArrayAdapterWithFallbackTest extends AdapterTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testGetItemInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', 'testGetItemsInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', 'testHasItemInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', 'testDeleteItemInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', 'testDeleteItemsInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', 'testPrune' => 'PhpArrayAdapter just proxies', - ); + ]; protected static $file; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpFilesAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpFilesAdapterTest.php index 8e93c937..247160d5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpFilesAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpFilesAdapterTest.php @@ -19,9 +19,9 @@ use Symfony\Component\Cache\Adapter\PhpFilesAdapter; */ class PhpFilesAdapterTest extends AdapterTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testDefaultLifeTime' => 'PhpFilesAdapter does not allow configuring a default lifetime.', - ); + ]; public function createCachePool() { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PredisAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PredisAdapterTest.php index c005d64a..f311a353 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PredisAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PredisAdapterTest.php @@ -19,20 +19,20 @@ class PredisAdapterTest extends AbstractRedisAdapterTest public static function setupBeforeClass() { parent::setupBeforeClass(); - self::$redis = new \Predis\Client(array('host' => getenv('REDIS_HOST'))); + self::$redis = new \Predis\Client(['host' => getenv('REDIS_HOST')]); } public function testCreateConnection() { $redisHost = getenv('REDIS_HOST'); - $redis = RedisAdapter::createConnection('redis://'.$redisHost.'/1', array('class' => \Predis\Client::class, 'timeout' => 3)); + $redis = RedisAdapter::createConnection('redis://'.$redisHost.'/1', ['class' => \Predis\Client::class, 'timeout' => 3]); $this->assertInstanceOf(\Predis\Client::class, $redis); $connection = $redis->getConnection(); $this->assertInstanceOf(StreamConnection::class, $connection); - $params = array( + $params = [ 'scheme' => 'tcp', 'host' => $redisHost, 'path' => '', @@ -47,7 +47,7 @@ class PredisAdapterTest extends AbstractRedisAdapterTest 'lazy' => false, 'database' => '1', 'password' => null, - ); + ]; $this->assertSame($params, $connection->getParameters()->toArray()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PredisClusterAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PredisClusterAdapterTest.php index 38915397..f723dc44 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PredisClusterAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PredisClusterAdapterTest.php @@ -16,7 +16,7 @@ class PredisClusterAdapterTest extends AbstractRedisAdapterTest public static function setupBeforeClass() { parent::setupBeforeClass(); - self::$redis = new \Predis\Client(array(array('host' => getenv('REDIS_HOST')))); + self::$redis = new \Predis\Client([['host' => getenv('REDIS_HOST')]]); } public static function tearDownAfterClass() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ProxyAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ProxyAdapterTest.php index ff4b9d34..f69ad679 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ProxyAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ProxyAdapterTest.php @@ -21,11 +21,11 @@ use Symfony\Component\Cache\CacheItem; */ class ProxyAdapterTest extends AdapterTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testDeferredSaveWithoutCommit' => 'Assumes a shared cache which ArrayAdapter is not.', 'testSaveWithoutExpire' => 'Assumes a shared cache which ArrayAdapter is not.', 'testPrune' => 'ProxyAdapter just proxies', - ); + ]; public function createCachePool($defaultLifetime = 0) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php index 28c310fb..eb2cbd46 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php @@ -20,7 +20,7 @@ class RedisAdapterTest extends AbstractRedisAdapterTest public static function setupBeforeClass() { parent::setupBeforeClass(); - self::$redis = AbstractAdapter::createConnection('redis://'.getenv('REDIS_HOST'), array('lazy' => true)); + self::$redis = AbstractAdapter::createConnection('redis://'.getenv('REDIS_HOST'), ['lazy' => true]); } public function createCachePool($defaultLifetime = 0) @@ -43,13 +43,13 @@ class RedisAdapterTest extends AbstractRedisAdapterTest $redis = RedisAdapter::createConnection('redis://'.$redisHost.'/2'); $this->assertSame(2, $redis->getDbNum()); - $redis = RedisAdapter::createConnection('redis://'.$redisHost, array('timeout' => 3)); + $redis = RedisAdapter::createConnection('redis://'.$redisHost, ['timeout' => 3]); $this->assertEquals(3, $redis->getTimeout()); $redis = RedisAdapter::createConnection('redis://'.$redisHost.'?timeout=4'); $this->assertEquals(4, $redis->getTimeout()); - $redis = RedisAdapter::createConnection('redis://'.$redisHost, array('read_timeout' => 5)); + $redis = RedisAdapter::createConnection('redis://'.$redisHost, ['read_timeout' => 5]); $this->assertEquals(5, $redis->getReadTimeout()); } @@ -65,11 +65,11 @@ class RedisAdapterTest extends AbstractRedisAdapterTest public function provideFailedCreateConnection() { - return array( - array('redis://localhost:1234'), - array('redis://foo@localhost'), - array('redis://localhost/123'), - ); + return [ + ['redis://localhost:1234'], + ['redis://foo@localhost'], + ['redis://localhost/123'], + ]; } /** @@ -84,9 +84,9 @@ class RedisAdapterTest extends AbstractRedisAdapterTest public function provideInvalidCreateConnection() { - return array( - array('foo://localhost'), - array('redis://'), - ); + return [ + ['foo://localhost'], + ['redis://'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/RedisArrayAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/RedisArrayAdapterTest.php index bef3eb88..749b039a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/RedisArrayAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/RedisArrayAdapterTest.php @@ -19,6 +19,6 @@ class RedisArrayAdapterTest extends AbstractRedisAdapterTest if (!class_exists('RedisArray')) { self::markTestSkipped('The RedisArray class is required.'); } - self::$redis = new \RedisArray(array(getenv('REDIS_HOST')), array('lazy_connect' => true)); + self::$redis = new \RedisArray([getenv('REDIS_HOST')], ['lazy_connect' => true]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/SimpleCacheAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/SimpleCacheAdapterTest.php index 460f3b09..84713416 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/SimpleCacheAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/SimpleCacheAdapterTest.php @@ -19,9 +19,9 @@ use Symfony\Component\Cache\Simple\FilesystemCache; */ class SimpleCacheAdapterTest extends AdapterTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testPrune' => 'SimpleCache just proxies', - ); + ]; public function createCachePool($defaultLifetime = 0) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAdapterTest.php index 7074299e..d0a1e5da 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAdapterTest.php @@ -56,7 +56,7 @@ class TagAwareAdapterTest extends AdapterTestCase $pool->save($i3->tag('foo')->tag('baz')); $pool->save($foo); - $pool->invalidateTags(array('bar')); + $pool->invalidateTags(['bar']); $this->assertFalse($pool->getItem('i0')->isHit()); $this->assertTrue($pool->getItem('i1')->isHit()); @@ -64,7 +64,7 @@ class TagAwareAdapterTest extends AdapterTestCase $this->assertTrue($pool->getItem('i3')->isHit()); $this->assertTrue($pool->getItem('foo')->isHit()); - $pool->invalidateTags(array('foo')); + $pool->invalidateTags(['foo']); $this->assertFalse($pool->getItem('i1')->isHit()); $this->assertFalse($pool->getItem('i3')->isHit()); @@ -85,7 +85,7 @@ class TagAwareAdapterTest extends AdapterTestCase $foo->tag('tag'); $pool1->saveDeferred($foo->set('foo')); - $pool1->invalidateTags(array('tag')); + $pool1->invalidateTags(['tag']); $pool2 = $this->createCachePool(); $foo = $pool2->getItem('foo'); @@ -103,7 +103,7 @@ class TagAwareAdapterTest extends AdapterTestCase $i = $pool->getItem('k'); $pool->save($i->tag('bar')); - $pool->invalidateTags(array('foo')); + $pool->invalidateTags(['foo']); $this->assertTrue($pool->getItem('k')->isHit()); } @@ -116,7 +116,7 @@ class TagAwareAdapterTest extends AdapterTestCase $pool->deleteItem('k'); $pool->save($pool->getItem('k')); - $pool->invalidateTags(array('foo')); + $pool->invalidateTags(['foo']); $this->assertTrue($pool->getItem('k')->isHit()); } @@ -126,11 +126,11 @@ class TagAwareAdapterTest extends AdapterTestCase $pool = $this->createCachePool(10); $item = $pool->getItem('foo'); - $item->tag(array('baz')); + $item->tag(['baz']); $item->expiresAfter(100); $pool->save($item); - $pool->invalidateTags(array('baz')); + $pool->invalidateTags(['baz']); $this->assertFalse($pool->getItem('foo')->isHit()); sleep(20); @@ -146,7 +146,7 @@ class TagAwareAdapterTest extends AdapterTestCase $pool->save($i->tag('foo')); $i = $pool->getItem('k'); - $this->assertSame(array('foo' => 'foo'), $i->getPreviousTags()); + $this->assertSame(['foo' => 'foo'], $i->getPreviousTags()); } public function testPrune() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/TraceableAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/TraceableAdapterTest.php index 3755e88d..35eba7d7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/TraceableAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/TraceableAdapterTest.php @@ -19,9 +19,9 @@ use Symfony\Component\Cache\Adapter\TraceableAdapter; */ class TraceableAdapterTest extends AdapterTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testPrune' => 'TraceableAdapter just proxies', - ); + ]; public function createCachePool($defaultLifetime = 0) { @@ -37,7 +37,7 @@ class TraceableAdapterTest extends AdapterTestCase $call = $calls[0]; $this->assertSame('getItem', $call->name); - $this->assertSame(array('k' => false), $call->result); + $this->assertSame(['k' => false], $call->result); $this->assertSame(0, $call->hits); $this->assertSame(1, $call->misses); $this->assertNotEmpty($call->start); @@ -61,7 +61,7 @@ class TraceableAdapterTest extends AdapterTestCase public function testGetItemsMissTrace() { $pool = $this->createCachePool(); - $arg = array('k0', 'k1'); + $arg = ['k0', 'k1']; $items = $pool->getItems($arg); foreach ($items as $item) { } @@ -70,7 +70,7 @@ class TraceableAdapterTest extends AdapterTestCase $call = $calls[0]; $this->assertSame('getItems', $call->name); - $this->assertSame(array('k0' => false, 'k1' => false), $call->result); + $this->assertSame(['k0' => false, 'k1' => false], $call->result); $this->assertSame(2, $call->misses); $this->assertNotEmpty($call->start); $this->assertNotEmpty($call->end); @@ -85,7 +85,7 @@ class TraceableAdapterTest extends AdapterTestCase $call = $calls[0]; $this->assertSame('hasItem', $call->name); - $this->assertSame(array('k' => false), $call->result); + $this->assertSame(['k' => false], $call->result); $this->assertNotEmpty($call->start); $this->assertNotEmpty($call->end); } @@ -101,7 +101,7 @@ class TraceableAdapterTest extends AdapterTestCase $call = $calls[2]; $this->assertSame('hasItem', $call->name); - $this->assertSame(array('k' => true), $call->result); + $this->assertSame(['k' => true], $call->result); $this->assertNotEmpty($call->start); $this->assertNotEmpty($call->end); } @@ -115,7 +115,7 @@ class TraceableAdapterTest extends AdapterTestCase $call = $calls[0]; $this->assertSame('deleteItem', $call->name); - $this->assertSame(array('k' => true), $call->result); + $this->assertSame(['k' => true], $call->result); $this->assertSame(0, $call->hits); $this->assertSame(0, $call->misses); $this->assertNotEmpty($call->start); @@ -125,14 +125,14 @@ class TraceableAdapterTest extends AdapterTestCase public function testDeleteItemsTrace() { $pool = $this->createCachePool(); - $arg = array('k0', 'k1'); + $arg = ['k0', 'k1']; $pool->deleteItems($arg); $calls = $pool->getCalls(); $this->assertCount(1, $calls); $call = $calls[0]; $this->assertSame('deleteItems', $call->name); - $this->assertSame(array('keys' => $arg, 'result' => true), $call->result); + $this->assertSame(['keys' => $arg, 'result' => true], $call->result); $this->assertSame(0, $call->hits); $this->assertSame(0, $call->misses); $this->assertNotEmpty($call->start); @@ -149,7 +149,7 @@ class TraceableAdapterTest extends AdapterTestCase $call = $calls[1]; $this->assertSame('save', $call->name); - $this->assertSame(array('k' => true), $call->result); + $this->assertSame(['k' => true], $call->result); $this->assertSame(0, $call->hits); $this->assertSame(0, $call->misses); $this->assertNotEmpty($call->start); @@ -166,7 +166,7 @@ class TraceableAdapterTest extends AdapterTestCase $call = $calls[1]; $this->assertSame('saveDeferred', $call->name); - $this->assertSame(array('k' => true), $call->result); + $this->assertSame(['k' => true], $call->result); $this->assertSame(0, $call->hits); $this->assertSame(0, $call->misses); $this->assertNotEmpty($call->start); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/TraceableTagAwareAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/TraceableTagAwareAdapterTest.php index 9b50bfab..5cd4185c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/TraceableTagAwareAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/TraceableTagAwareAdapterTest.php @@ -23,7 +23,7 @@ class TraceableTagAwareAdapterTest extends TraceableAdapterTest public function testInvalidateTags() { $pool = new TraceableTagAwareAdapter(new TagAwareAdapter(new FilesystemAdapter())); - $pool->invalidateTags(array('foo')); + $pool->invalidateTags(['foo']); $calls = $pool->getCalls(); $this->assertCount(1, $calls); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/CacheItemTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/CacheItemTest.php index 4aae16b6..fff5202b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/CacheItemTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/CacheItemTest.php @@ -33,23 +33,23 @@ class CacheItemTest extends TestCase public function provideInvalidKey() { - return array( - array(''), - array('{'), - array('}'), - array('('), - array(')'), - array('/'), - array('\\'), - array('@'), - array(':'), - array(true), - array(null), - array(1), - array(1.1), - array(array(array())), - array(new \Exception('foo')), - ); + return [ + [''], + ['{'], + ['}'], + ['('], + [')'], + ['/'], + ['\\'], + ['@'], + [':'], + [true], + [null], + [1], + [1.1], + [[[]]], + [new \Exception('foo')], + ]; } public function testTag() @@ -57,10 +57,10 @@ class CacheItemTest extends TestCase $item = new CacheItem(); $this->assertSame($item, $item->tag('foo')); - $this->assertSame($item, $item->tag(array('bar', 'baz'))); + $this->assertSame($item, $item->tag(['bar', 'baz'])); \call_user_func(\Closure::bind(function () use ($item) { - $this->assertSame(array('foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz'), $item->tags); + $this->assertSame(['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz'], $item->tags); }, $this, CacheItem::class)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Fixtures/ArrayCache.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Fixtures/ArrayCache.php index 7cdcafd8..13b4f330 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Fixtures/ArrayCache.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Fixtures/ArrayCache.php @@ -6,7 +6,7 @@ use Doctrine\Common\Cache\CacheProvider; class ArrayCache extends CacheProvider { - private $data = array(); + private $data = []; protected function doFetch($id) { @@ -26,7 +26,7 @@ class ArrayCache extends CacheProvider protected function doSave($id, $data, $lifeTime = 0) { - $this->data[$id] = array($data, $lifeTime ? time() + $lifeTime : false); + $this->data[$id] = [$data, $lifeTime ? time() + $lifeTime : false]; return true; } @@ -40,7 +40,7 @@ class ArrayCache extends CacheProvider protected function doFlush() { - $this->data = array(); + $this->data = []; return true; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Fixtures/ExternalAdapter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Fixtures/ExternalAdapter.php index 493906ea..779a374e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Fixtures/ExternalAdapter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Fixtures/ExternalAdapter.php @@ -34,7 +34,7 @@ class ExternalAdapter implements CacheItemPoolInterface return $this->cache->getItem($key); } - public function getItems(array $keys = array()) + public function getItems(array $keys = []) { return $this->cache->getItems($keys); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/AbstractRedisCacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/AbstractRedisCacheTest.php index 3e668fdd..dd5e1509 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/AbstractRedisCacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/AbstractRedisCacheTest.php @@ -15,11 +15,11 @@ use Symfony\Component\Cache\Simple\RedisCache; abstract class AbstractRedisCacheTest extends CacheTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testSetTtl' => 'Testing expiration slows down the test suite', 'testSetMultipleTtl' => 'Testing expiration slows down the test suite', 'testDefaultLifeTime' => 'Testing expiration slows down the test suite', - ); + ]; protected static $redis; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/ApcuCacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/ApcuCacheTest.php index 3df32c1c..f37b95a0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/ApcuCacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/ApcuCacheTest.php @@ -15,11 +15,11 @@ use Symfony\Component\Cache\Simple\ApcuCache; class ApcuCacheTest extends CacheTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testSetTtl' => 'Testing expiration slows down the test suite', 'testSetMultipleTtl' => 'Testing expiration slows down the test suite', 'testDefaultLifeTime' => 'Testing expiration slows down the test suite', - ); + ]; public function createSimpleCache($defaultLifetime = 0) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/CacheTestCase.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/CacheTestCase.php index d0d85735..ff9944a3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/CacheTestCase.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/CacheTestCase.php @@ -21,7 +21,7 @@ abstract class CacheTestCase extends SimpleCacheTest { parent::setUp(); - if (!array_key_exists('testPrune', $this->skippedTests) && !$this->createSimpleCache() instanceof PruneableInterface) { + if (!\array_key_exists('testPrune', $this->skippedTests) && !$this->createSimpleCache() instanceof PruneableInterface) { $this->skippedTests['testPrune'] = 'Not a pruneable cache pool.'; } } @@ -32,7 +32,7 @@ abstract class CacheTestCase extends SimpleCacheTest return parent::validKeys(); } - return array_merge(parent::validKeys(), array(array("a\0b"))); + return array_merge(parent::validKeys(), [["a\0b"]]); } public function testDefaultLifeTime() @@ -68,9 +68,9 @@ abstract class CacheTestCase extends SimpleCacheTest $this->assertNull($cache->get('foo')); - $cache->setMultiple(array('foo' => new NotUnserializable())); + $cache->setMultiple(['foo' => new NotUnserializable()]); - foreach ($cache->getMultiple(array('foo')) as $value) { + foreach ($cache->getMultiple(['foo']) as $value) { } $this->assertNull($value); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/ChainCacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/ChainCacheTest.php index ab28e3bc..e6f7c7cc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/ChainCacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/ChainCacheTest.php @@ -24,7 +24,7 @@ class ChainCacheTest extends CacheTestCase { public function createSimpleCache($defaultLifetime = 0) { - return new ChainCache(array(new ArrayCache($defaultLifetime), new FilesystemCache('', $defaultLifetime)), $defaultLifetime); + return new ChainCache([new ArrayCache($defaultLifetime), new FilesystemCache('', $defaultLifetime)], $defaultLifetime); } /** @@ -33,7 +33,7 @@ class ChainCacheTest extends CacheTestCase */ public function testEmptyCachesException() { - new ChainCache(array()); + new ChainCache([]); } /** @@ -42,7 +42,7 @@ class ChainCacheTest extends CacheTestCase */ public function testInvalidCacheException() { - new ChainCache(array(new \stdClass())); + new ChainCache([new \stdClass()]); } public function testPrune() @@ -51,18 +51,18 @@ class ChainCacheTest extends CacheTestCase $this->markTestSkipped($this->skippedTests[__FUNCTION__]); } - $cache = new ChainCache(array( + $cache = new ChainCache([ $this->getPruneableMock(), $this->getNonPruneableMock(), $this->getPruneableMock(), - )); + ]); $this->assertTrue($cache->prune()); - $cache = new ChainCache(array( + $cache = new ChainCache([ $this->getPruneableMock(), $this->getFailingPruneableMock(), $this->getPruneableMock(), - )); + ]); $this->assertFalse($cache->prune()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/DoctrineCacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/DoctrineCacheTest.php index 127c9685..af4331d6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/DoctrineCacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/DoctrineCacheTest.php @@ -19,10 +19,10 @@ use Symfony\Component\Cache\Tests\Fixtures\ArrayCache; */ class DoctrineCacheTest extends CacheTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testObjectDoesNotChangeInCache' => 'ArrayCache does not use serialize/unserialize', 'testNotUnserializable' => 'ArrayCache does not use serialize/unserialize', - ); + ]; public function createSimpleCache($defaultLifetime = 0) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTest.php index ee9e49d3..f83f0a2e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTest.php @@ -16,11 +16,11 @@ use Symfony\Component\Cache\Simple\MemcachedCache; class MemcachedCacheTest extends CacheTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testSetTtl' => 'Testing expiration slows down the test suite', 'testSetMultipleTtl' => 'Testing expiration slows down the test suite', 'testDefaultLifeTime' => 'Testing expiration slows down the test suite', - ); + ]; protected static $client; @@ -40,29 +40,29 @@ class MemcachedCacheTest extends CacheTestCase public function createSimpleCache($defaultLifetime = 0) { - $client = $defaultLifetime ? AbstractAdapter::createConnection('memcached://'.getenv('MEMCACHED_HOST'), array('binary_protocol' => false)) : self::$client; + $client = $defaultLifetime ? AbstractAdapter::createConnection('memcached://'.getenv('MEMCACHED_HOST'), ['binary_protocol' => false]) : self::$client; return new MemcachedCache($client, str_replace('\\', '.', __CLASS__), $defaultLifetime); } public function testCreatePersistentConnectionShouldNotDupServerList() { - $instance = MemcachedCache::createConnection('memcached://'.getenv('MEMCACHED_HOST'), array('persistent_id' => 'persistent')); + $instance = MemcachedCache::createConnection('memcached://'.getenv('MEMCACHED_HOST'), ['persistent_id' => 'persistent']); $this->assertCount(1, $instance->getServerList()); - $instance = MemcachedCache::createConnection('memcached://'.getenv('MEMCACHED_HOST'), array('persistent_id' => 'persistent')); + $instance = MemcachedCache::createConnection('memcached://'.getenv('MEMCACHED_HOST'), ['persistent_id' => 'persistent']); $this->assertCount(1, $instance->getServerList()); } public function testOptions() { - $client = MemcachedCache::createConnection(array(), array( + $client = MemcachedCache::createConnection([], [ 'libketama_compatible' => false, 'distribution' => 'modula', 'compression' => true, 'serializer' => 'php', 'hash' => 'md5', - )); + ]); $this->assertSame(\Memcached::SERIALIZER_PHP, $client->getOption(\Memcached::OPT_SERIALIZER)); $this->assertSame(\Memcached::HASH_MD5, $client->getOption(\Memcached::OPT_HASH)); @@ -78,24 +78,24 @@ class MemcachedCacheTest extends CacheTestCase */ public function testBadOptions($name, $value) { - MemcachedCache::createConnection(array(), array($name => $value)); + MemcachedCache::createConnection([], [$name => $value]); } public function provideBadOptions() { - return array( - array('foo', 'bar'), - array('hash', 'zyx'), - array('serializer', 'zyx'), - array('distribution', 'zyx'), - ); + return [ + ['foo', 'bar'], + ['hash', 'zyx'], + ['serializer', 'zyx'], + ['distribution', 'zyx'], + ]; } public function testDefaultOptions() { $this->assertTrue(MemcachedCache::isSupported()); - $client = MemcachedCache::createConnection(array()); + $client = MemcachedCache::createConnection([]); $this->assertTrue($client->getOption(\Memcached::OPT_COMPRESSION)); $this->assertSame(1, $client->getOption(\Memcached::OPT_BINARY_PROTOCOL)); @@ -112,7 +112,7 @@ class MemcachedCacheTest extends CacheTestCase $this->markTestSkipped('Memcached::HAVE_JSON required'); } - new MemcachedCache(MemcachedCache::createConnection(array(), array('serializer' => 'json'))); + new MemcachedCache(MemcachedCache::createConnection([], ['serializer' => 'json'])); } /** @@ -121,54 +121,54 @@ class MemcachedCacheTest extends CacheTestCase public function testServersSetting($dsn, $host, $port) { $client1 = MemcachedCache::createConnection($dsn); - $client2 = MemcachedCache::createConnection(array($dsn)); - $client3 = MemcachedCache::createConnection(array(array($host, $port))); - $expect = array( + $client2 = MemcachedCache::createConnection([$dsn]); + $client3 = MemcachedCache::createConnection([[$host, $port]]); + $expect = [ 'host' => $host, 'port' => $port, - ); + ]; - $f = function ($s) { return array('host' => $s['host'], 'port' => $s['port']); }; - $this->assertSame(array($expect), array_map($f, $client1->getServerList())); - $this->assertSame(array($expect), array_map($f, $client2->getServerList())); - $this->assertSame(array($expect), array_map($f, $client3->getServerList())); + $f = function ($s) { return ['host' => $s['host'], 'port' => $s['port']]; }; + $this->assertSame([$expect], array_map($f, $client1->getServerList())); + $this->assertSame([$expect], array_map($f, $client2->getServerList())); + $this->assertSame([$expect], array_map($f, $client3->getServerList())); } public function provideServersSetting() { - yield array( + yield [ 'memcached://127.0.0.1/50', '127.0.0.1', 11211, - ); - yield array( + ]; + yield [ 'memcached://localhost:11222?weight=25', 'localhost', 11222, - ); + ]; if (filter_var(ini_get('memcached.use_sasl'), FILTER_VALIDATE_BOOLEAN)) { - yield array( + yield [ 'memcached://user:password@127.0.0.1?weight=50', '127.0.0.1', 11211, - ); + ]; } - yield array( + yield [ 'memcached:///var/run/memcached.sock?weight=25', '/var/run/memcached.sock', 0, - ); - yield array( + ]; + yield [ 'memcached:///var/local/run/memcached.socket?weight=25', '/var/local/run/memcached.socket', 0, - ); + ]; if (filter_var(ini_get('memcached.use_sasl'), FILTER_VALIDATE_BOOLEAN)) { - yield array( + yield [ 'memcached://user:password@/var/local/run/memcached.socket?weight=25', '/var/local/run/memcached.socket', 0, - ); + ]; } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTextModeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTextModeTest.php index 43cadf90..13865a60 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTextModeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTextModeTest.php @@ -18,7 +18,7 @@ class MemcachedCacheTextModeTest extends MemcachedCacheTest { public function createSimpleCache($defaultLifetime = 0) { - $client = AbstractAdapter::createConnection('memcached://'.getenv('MEMCACHED_HOST'), array('binary_protocol' => false)); + $client = AbstractAdapter::createConnection('memcached://'.getenv('MEMCACHED_HOST'), ['binary_protocol' => false]); return new MemcachedCache($client, str_replace('\\', '.', __CLASS__), $defaultLifetime); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/NullCacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/NullCacheTest.php index 7b760fd3..31f42c32 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/NullCacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/NullCacheTest.php @@ -40,7 +40,7 @@ class NullCacheTest extends TestCase { $cache = $this->createCachePool(); - $keys = array('foo', 'bar', 'baz', 'biz'); + $keys = ['foo', 'bar', 'baz', 'biz']; $default = new \stdClass(); $items = $cache->getMultiple($keys, $default); @@ -75,7 +75,7 @@ class NullCacheTest extends TestCase public function testDeleteMultiple() { - $this->assertTrue($this->createCachePool()->deleteMultiple(array('key', 'foo', 'bar'))); + $this->assertTrue($this->createCachePool()->deleteMultiple(['key', 'foo', 'bar'])); } public function testSet() @@ -90,7 +90,7 @@ class NullCacheTest extends TestCase { $cache = $this->createCachePool(); - $this->assertFalse($cache->setMultiple(array('key' => 'val'))); + $this->assertFalse($cache->setMultiple(['key' => 'val'])); $this->assertNull($cache->get('key')); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/PdoDbalCacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/PdoDbalCacheTest.php index 158e2c89..ce1a9ae4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/PdoDbalCacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/PdoDbalCacheTest.php @@ -32,7 +32,7 @@ class PdoDbalCacheTest extends CacheTestCase self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache'); - $pool = new PdoCache(DriverManager::getConnection(array('driver' => 'pdo_sqlite', 'path' => self::$dbFile))); + $pool = new PdoCache(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile])); $pool->createTable(); } @@ -43,6 +43,6 @@ class PdoDbalCacheTest extends CacheTestCase public function createSimpleCache($defaultLifetime = 0) { - return new PdoCache(DriverManager::getConnection(array('driver' => 'pdo_sqlite', 'path' => self::$dbFile)), '', $defaultLifetime); + return new PdoCache(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]), '', $defaultLifetime); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/PhpArrayCacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/PhpArrayCacheTest.php index b4862c61..a1bab079 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/PhpArrayCacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/PhpArrayCacheTest.php @@ -20,7 +20,7 @@ use Symfony\Component\Cache\Tests\Adapter\FilesystemAdapterTest; */ class PhpArrayCacheTest extends CacheTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testBasicUsageWithLongKey' => 'PhpArrayCache does no writes', 'testDelete' => 'PhpArrayCache does no writes', @@ -45,7 +45,7 @@ class PhpArrayCacheTest extends CacheTestCase 'testDefaultLifeTime' => 'PhpArrayCache does not allow configuring a default lifetime.', 'testPrune' => 'PhpArrayCache just proxies', - ); + ]; protected static $file; @@ -68,22 +68,22 @@ class PhpArrayCacheTest extends CacheTestCase public function testStore() { - $arrayWithRefs = array(); + $arrayWithRefs = []; $arrayWithRefs[0] = 123; $arrayWithRefs[1] = &$arrayWithRefs[0]; - $object = (object) array( + $object = (object) [ 'foo' => 'bar', 'foo2' => 'bar2', - ); + ]; - $expected = array( + $expected = [ 'null' => null, 'serializedString' => serialize($object), 'arrayWithRefs' => $arrayWithRefs, 'object' => $object, - 'arrayWithObject' => array('bar' => $object), - ); + 'arrayWithObject' => ['bar' => $object], + ]; $cache = new PhpArrayCache(self::$file, new NullCache()); $cache->warmUp($expected); @@ -95,13 +95,13 @@ class PhpArrayCacheTest extends CacheTestCase public function testStoredFile() { - $expected = array( + $expected = [ 'integer' => 42, 'float' => 42.42, 'boolean' => true, - 'array_simple' => array('foo', 'bar'), - 'array_associative' => array('foo' => 'bar', 'foo2' => 'bar2'), - ); + 'array_simple' => ['foo', 'bar'], + 'array_associative' => ['foo' => 'bar', 'foo2' => 'bar2'], + ]; $cache = new PhpArrayCache(self::$file, new NullCache()); $cache->warmUp($expected); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/PhpArrayCacheWithFallbackTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/PhpArrayCacheWithFallbackTest.php index 4b6a94f7..abee5e78 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/PhpArrayCacheWithFallbackTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/PhpArrayCacheWithFallbackTest.php @@ -20,7 +20,7 @@ use Symfony\Component\Cache\Tests\Adapter\FilesystemAdapterTest; */ class PhpArrayCacheWithFallbackTest extends CacheTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testGetInvalidKeys' => 'PhpArrayCache does no validation', 'testGetMultipleInvalidKeys' => 'PhpArrayCache does no validation', 'testDeleteInvalidKeys' => 'PhpArrayCache does no validation', @@ -32,7 +32,7 @@ class PhpArrayCacheWithFallbackTest extends CacheTestCase 'testSetMultipleInvalidTtl' => 'PhpArrayCache does no validation', 'testHasInvalidKeys' => 'PhpArrayCache does no validation', 'testPrune' => 'PhpArrayCache just proxies', - ); + ]; protected static $file; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/PhpFilesCacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/PhpFilesCacheTest.php index 7a402682..936f29a4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/PhpFilesCacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/PhpFilesCacheTest.php @@ -19,9 +19,9 @@ use Symfony\Component\Cache\Simple\PhpFilesCache; */ class PhpFilesCacheTest extends CacheTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testDefaultLifeTime' => 'PhpFilesCache does not allow configuring a default lifetime.', - ); + ]; public function createSimpleCache() { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/Psr6CacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/Psr6CacheTest.php index 78582894..1bc75c90 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/Psr6CacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/Psr6CacheTest.php @@ -19,9 +19,9 @@ use Symfony\Component\Cache\Simple\Psr6Cache; */ class Psr6CacheTest extends CacheTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testPrune' => 'Psr6Cache just proxies', - ); + ]; public function createSimpleCache($defaultLifetime = 0) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/RedisArrayCacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/RedisArrayCacheTest.php index 3c903c8a..bda39d99 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/RedisArrayCacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/RedisArrayCacheTest.php @@ -19,6 +19,6 @@ class RedisArrayCacheTest extends AbstractRedisCacheTest if (!class_exists('RedisArray')) { self::markTestSkipped('The RedisArray class is required.'); } - self::$redis = new \RedisArray(array(getenv('REDIS_HOST')), array('lazy_connect' => true)); + self::$redis = new \RedisArray([getenv('REDIS_HOST')], ['lazy_connect' => true]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/RedisCacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/RedisCacheTest.php index d33421f9..407d916c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/RedisCacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/RedisCacheTest.php @@ -33,13 +33,13 @@ class RedisCacheTest extends AbstractRedisCacheTest $redis = RedisCache::createConnection('redis://'.$redisHost.'/2'); $this->assertSame(2, $redis->getDbNum()); - $redis = RedisCache::createConnection('redis://'.$redisHost, array('timeout' => 3)); + $redis = RedisCache::createConnection('redis://'.$redisHost, ['timeout' => 3]); $this->assertEquals(3, $redis->getTimeout()); $redis = RedisCache::createConnection('redis://'.$redisHost.'?timeout=4'); $this->assertEquals(4, $redis->getTimeout()); - $redis = RedisCache::createConnection('redis://'.$redisHost, array('read_timeout' => 5)); + $redis = RedisCache::createConnection('redis://'.$redisHost, ['read_timeout' => 5]); $this->assertEquals(5, $redis->getReadTimeout()); } @@ -55,11 +55,11 @@ class RedisCacheTest extends AbstractRedisCacheTest public function provideFailedCreateConnection() { - return array( - array('redis://localhost:1234'), - array('redis://foo@localhost'), - array('redis://localhost/123'), - ); + return [ + ['redis://localhost:1234'], + ['redis://foo@localhost'], + ['redis://localhost/123'], + ]; } /** @@ -74,9 +74,9 @@ class RedisCacheTest extends AbstractRedisCacheTest public function provideInvalidCreateConnection() { - return array( - array('foo://localhost'), - array('redis://'), - ); + return [ + ['foo://localhost'], + ['redis://'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/TraceableCacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/TraceableCacheTest.php index 535f93da..e684caf3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/TraceableCacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Simple/TraceableCacheTest.php @@ -19,9 +19,9 @@ use Symfony\Component\Cache\Simple\TraceableCache; */ class TraceableCacheTest extends CacheTestCase { - protected $skippedTests = array( + protected $skippedTests = [ 'testPrune' => 'TraceableCache just proxies', - ); + ]; public function createSimpleCache($defaultLifetime = 0) { @@ -37,7 +37,7 @@ class TraceableCacheTest extends CacheTestCase $call = $calls[0]; $this->assertSame('get', $call->name); - $this->assertSame(array('k' => false), $call->result); + $this->assertSame(['k' => false], $call->result); $this->assertSame(0, $call->hits); $this->assertSame(1, $call->misses); $this->assertNotEmpty($call->start); @@ -61,7 +61,7 @@ class TraceableCacheTest extends CacheTestCase { $pool = $this->createSimpleCache(); $pool->set('k1', 123); - $values = $pool->getMultiple(array('k0', 'k1')); + $values = $pool->getMultiple(['k0', 'k1']); foreach ($values as $value) { } $calls = $pool->getCalls(); @@ -69,7 +69,7 @@ class TraceableCacheTest extends CacheTestCase $call = $calls[1]; $this->assertSame('getMultiple', $call->name); - $this->assertSame(array('k1' => true, 'k0' => false), $call->result); + $this->assertSame(['k1' => true, 'k0' => false], $call->result); $this->assertSame(1, $call->misses); $this->assertNotEmpty($call->start); $this->assertNotEmpty($call->end); @@ -84,7 +84,7 @@ class TraceableCacheTest extends CacheTestCase $call = $calls[0]; $this->assertSame('has', $call->name); - $this->assertSame(array('k' => false), $call->result); + $this->assertSame(['k' => false], $call->result); $this->assertNotEmpty($call->start); $this->assertNotEmpty($call->end); } @@ -99,7 +99,7 @@ class TraceableCacheTest extends CacheTestCase $call = $calls[1]; $this->assertSame('has', $call->name); - $this->assertSame(array('k' => true), $call->result); + $this->assertSame(['k' => true], $call->result); $this->assertNotEmpty($call->start); $this->assertNotEmpty($call->end); } @@ -113,7 +113,7 @@ class TraceableCacheTest extends CacheTestCase $call = $calls[0]; $this->assertSame('delete', $call->name); - $this->assertSame(array('k' => true), $call->result); + $this->assertSame(['k' => true], $call->result); $this->assertSame(0, $call->hits); $this->assertSame(0, $call->misses); $this->assertNotEmpty($call->start); @@ -123,14 +123,14 @@ class TraceableCacheTest extends CacheTestCase public function testDeleteMultipleTrace() { $pool = $this->createSimpleCache(); - $arg = array('k0', 'k1'); + $arg = ['k0', 'k1']; $pool->deleteMultiple($arg); $calls = $pool->getCalls(); $this->assertCount(1, $calls); $call = $calls[0]; $this->assertSame('deleteMultiple', $call->name); - $this->assertSame(array('keys' => $arg, 'result' => true), $call->result); + $this->assertSame(['keys' => $arg, 'result' => true], $call->result); $this->assertSame(0, $call->hits); $this->assertSame(0, $call->misses); $this->assertNotEmpty($call->start); @@ -146,7 +146,7 @@ class TraceableCacheTest extends CacheTestCase $call = $calls[0]; $this->assertSame('set', $call->name); - $this->assertSame(array('k' => true), $call->result); + $this->assertSame(['k' => true], $call->result); $this->assertSame(0, $call->hits); $this->assertSame(0, $call->misses); $this->assertNotEmpty($call->start); @@ -156,13 +156,13 @@ class TraceableCacheTest extends CacheTestCase public function testSetMultipleTrace() { $pool = $this->createSimpleCache(); - $pool->setMultiple(array('k' => 'foo')); + $pool->setMultiple(['k' => 'foo']); $calls = $pool->getCalls(); $this->assertCount(1, $calls); $call = $calls[0]; $this->assertSame('setMultiple', $call->name); - $this->assertSame(array('keys' => array('k'), 'result' => true), $call->result); + $this->assertSame(['keys' => ['k'], 'result' => true], $call->result); $this->assertSame(0, $call->hits); $this->assertSame(0, $call->misses); $this->assertNotEmpty($call->start); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/AbstractTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/AbstractTrait.php index 441eddbd..be576098 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/AbstractTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/AbstractTrait.php @@ -26,7 +26,7 @@ trait AbstractTrait private $namespace; private $namespaceVersion = ''; private $versioningIsEnabled = false; - private $deferred = array(); + private $deferred = []; /** * @var int|null The maximum length to enforce for identifiers or null when no limit applies @@ -93,7 +93,7 @@ trait AbstractTrait try { return $this->doHave($id); } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to check if key "{key}" is cached', array('key' => $key, 'exception' => $e)); + CacheItem::log($this->logger, 'Failed to check if key "{key}" is cached', ['key' => $key, 'exception' => $e]); return false; } @@ -104,15 +104,15 @@ trait AbstractTrait */ public function clear() { - $this->deferred = array(); + $this->deferred = []; if ($cleared = $this->versioningIsEnabled) { $namespaceVersion = substr_replace(base64_encode(pack('V', mt_rand())), ':', 5); try { - $cleared = $this->doSave(array('@'.$this->namespace => $namespaceVersion), 0); + $cleared = $this->doSave(['@'.$this->namespace => $namespaceVersion], 0); } catch (\Exception $e) { $cleared = false; } - if ($cleared = true === $cleared || array() === $cleared) { + if ($cleared = true === $cleared || [] === $cleared) { $this->namespaceVersion = $namespaceVersion; } } @@ -120,7 +120,7 @@ trait AbstractTrait try { return $this->doClear($this->namespace) || $cleared; } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to clear the cache', array('exception' => $e)); + CacheItem::log($this->logger, 'Failed to clear the cache', ['exception' => $e]); return false; } @@ -131,7 +131,7 @@ trait AbstractTrait */ public function deleteItem($key) { - return $this->deleteItems(array($key)); + return $this->deleteItems([$key]); } /** @@ -139,7 +139,7 @@ trait AbstractTrait */ public function deleteItems(array $keys) { - $ids = array(); + $ids = []; foreach ($keys as $key) { $ids[$key] = $this->getId($key); @@ -159,12 +159,12 @@ trait AbstractTrait foreach ($ids as $key => $id) { try { $e = null; - if ($this->doDelete(array($id))) { + if ($this->doDelete([$id])) { continue; } } catch (\Exception $e) { } - CacheItem::log($this->logger, 'Failed to delete key "{key}"', array('key' => $key, 'exception' => $e)); + CacheItem::log($this->logger, 'Failed to delete key "{key}"', ['key' => $key, 'exception' => $e]); $ok = false; } @@ -237,12 +237,12 @@ trait AbstractTrait if ($this->versioningIsEnabled && '' === $this->namespaceVersion) { $this->namespaceVersion = '1:'; try { - foreach ($this->doFetch(array('@'.$this->namespace)) as $v) { + foreach ($this->doFetch(['@'.$this->namespace]) as $v) { $this->namespaceVersion = $v; } if ('1:' === $this->namespaceVersion) { $this->namespaceVersion = substr_replace(base64_encode(pack('V', time())), ':', 5); - $this->doSave(array('@'.$this->namespace => $this->namespaceVersion), 0); + $this->doSave(['@'.$this->namespace => $this->namespaceVersion], 0); } } catch (\Exception $e) { } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/ApcuTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/ApcuTrait.php index c40afdc9..88dd22a9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/ApcuTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/ApcuTrait.php @@ -52,7 +52,7 @@ trait ApcuTrait protected function doFetch(array $ids) { try { - foreach (apcu_fetch($ids, $ok) ?: array() as $k => $v) { + foreach (apcu_fetch($ids, $ok) ?: [] as $k => $v) { if (null !== $v || $ok) { yield $k => $v; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/ArrayTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/ArrayTrait.php index 88385ed4..0a60968e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/ArrayTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/ArrayTrait.php @@ -24,8 +24,8 @@ trait ArrayTrait use LoggerAwareTrait; private $storeSerialized; - private $values = array(); - private $expiries = array(); + private $values = []; + private $expiries = []; /** * Returns all cached values, with cache miss as null. @@ -52,7 +52,7 @@ trait ArrayTrait */ public function clear() { - $this->values = $this->expiries = array(); + $this->values = $this->expiries = []; return true; } @@ -92,7 +92,7 @@ trait ArrayTrait $isHit = false; } } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to unserialize key "{key}"', array('key' => $key, 'exception' => $e)); + CacheItem::log($this->logger, 'Failed to unserialize key "{key}"', ['key' => $key, 'exception' => $e]); $this->values[$key] = $value = null; $isHit = false; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/FilesystemTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/FilesystemTrait.php index 23974b3b..3e0dc86b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/FilesystemTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/FilesystemTrait.php @@ -52,7 +52,7 @@ trait FilesystemTrait */ protected function doFetch(array $ids) { - $values = array(); + $values = []; $now = time(); foreach ($ids as $id) { @@ -83,7 +83,7 @@ trait FilesystemTrait { $file = $this->getFile($id); - return file_exists($file) && (@filemtime($file) > time() || $this->doFetch(array($id))); + return file_exists($file) && (@filemtime($file) > time() || $this->doFetch([$id])); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/MemcachedTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/MemcachedTrait.php index cf04f1cf..9b7a84ab 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/MemcachedTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/MemcachedTrait.php @@ -22,12 +22,12 @@ use Symfony\Component\Cache\Exception\InvalidArgumentException; */ trait MemcachedTrait { - private static $defaultClientOptions = array( + private static $defaultClientOptions = [ 'persistent_id' => null, 'username' => null, 'password' => null, 'serializer' => 'php', - ); + ]; private $client; private $lazyClient; @@ -64,7 +64,7 @@ trait MemcachedTrait * * Examples for servers: * - 'memcached://user:pass@localhost?weight=33' - * - array(array('localhost', 11211, 33)) + * - [['localhost', 11211, 33]] * * @param array[]|string|string[] $servers An array of servers, a DSN, or an array of DSNs * @param array $options An array of options @@ -73,10 +73,10 @@ trait MemcachedTrait * * @throws \ErrorException When invalid options or servers are provided */ - public static function createConnection($servers, array $options = array()) + public static function createConnection($servers, array $options = []) { if (\is_string($servers)) { - $servers = array($servers); + $servers = [$servers]; } elseif (!\is_array($servers)) { throw new InvalidArgumentException(sprintf('MemcachedAdapter::createClient() expects array or string as first argument, %s given.', \gettype($servers))); } @@ -100,7 +100,7 @@ trait MemcachedTrait } $params = preg_replace_callback('#^memcached://(?:([^@]*+)@)?#', function ($m) use (&$username, &$password) { if (!empty($m[1])) { - list($username, $password) = explode(':', $m[1], 2) + array(1 => null); + list($username, $password) = explode(':', $m[1], 2) + [1 => null]; } return 'file://'; @@ -115,18 +115,18 @@ trait MemcachedTrait $params['weight'] = $m[1]; $params['path'] = substr($params['path'], 0, -\strlen($m[0])); } - $params += array( + $params += [ 'host' => isset($params['host']) ? $params['host'] : $params['path'], 'port' => isset($params['host']) ? 11211 : null, 'weight' => 0, - ); + ]; if (isset($params['query'])) { parse_str($params['query'], $query); $params += $query; $options = $query + $options; } - $servers[$i] = array($params['host'], $params['port'], $params['weight']); + $servers[$i] = [$params['host'], $params['port'], $params['weight']]; } // set client's options @@ -135,7 +135,7 @@ trait MemcachedTrait $client->setOption(\Memcached::OPT_BINARY_PROTOCOL, true); $client->setOption(\Memcached::OPT_NO_BLOCK, true); $client->setOption(\Memcached::OPT_TCP_NODELAY, true); - if (!array_key_exists('LIBKETAMA_COMPATIBLE', $options) && !array_key_exists(\Memcached::OPT_LIBKETAMA_COMPATIBLE, $options)) { + if (!\array_key_exists('LIBKETAMA_COMPATIBLE', $options) && !\array_key_exists(\Memcached::OPT_LIBKETAMA_COMPATIBLE, $options)) { $client->setOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE, true); } foreach ($options as $name => $value) { @@ -154,12 +154,12 @@ trait MemcachedTrait // set client's servers, taking care of persistent connections if (!$client->isPristine()) { - $oldServers = array(); + $oldServers = []; foreach ($client->getServerList() as $server) { - $oldServers[] = array($server['host'], $server['port']); + $oldServers[] = [$server['host'], $server['port']]; } - $newServers = array(); + $newServers = []; foreach ($servers as $server) { if (1 < \count($server)) { $server = array_values($server); @@ -199,7 +199,7 @@ trait MemcachedTrait $lifetime += time(); } - $encodedValues = array(); + $encodedValues = []; foreach ($values as $key => $value) { $encodedValues[rawurlencode($key)] = $value; } @@ -218,7 +218,7 @@ trait MemcachedTrait $encodedResult = $this->checkResultCode($this->getClient()->getMulti($encodedIds)); - $result = array(); + $result = []; foreach ($encodedResult as $key => $value) { $result[rawurldecode($key)] = $value; } @@ -260,7 +260,7 @@ trait MemcachedTrait */ protected function doClear($namespace) { - return false; + return '' === $namespace && $this->getClient()->flush(); } private function checkResultCode($result) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/PdoTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/PdoTrait.php index a22714c8..b190fef8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/PdoTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/PdoTrait.php @@ -33,7 +33,7 @@ trait PdoTrait private $timeCol = 'item_time'; private $username = ''; private $password = ''; - private $connectionOptions = array(); + private $connectionOptions = []; private $namespace; private function init($connOrDsn, $namespace, $defaultLifetime, array $options) @@ -85,24 +85,24 @@ trait PdoTrait $conn = $this->getConnection(); if ($conn instanceof Connection) { - $types = array( + $types = [ 'mysql' => 'binary', 'sqlite' => 'text', 'pgsql' => 'string', 'oci' => 'string', 'sqlsrv' => 'string', - ); + ]; if (!isset($types[$this->driver])) { throw new \DomainException(sprintf('Creating the cache table is currently not implemented for PDO driver "%s".', $this->driver)); } $schema = new Schema(); $table = $schema->createTable($this->table); - $table->addColumn($this->idCol, $types[$this->driver], array('length' => 255)); - $table->addColumn($this->dataCol, 'blob', array('length' => 16777215)); - $table->addColumn($this->lifetimeCol, 'integer', array('unsigned' => true, 'notnull' => false)); - $table->addColumn($this->timeCol, 'integer', array('unsigned' => true)); - $table->setPrimaryKey(array($this->idCol)); + $table->addColumn($this->idCol, $types[$this->driver], ['length' => 255]); + $table->addColumn($this->dataCol, 'blob', ['length' => 16777215]); + $table->addColumn($this->lifetimeCol, 'integer', ['unsigned' => true, 'notnull' => false]); + $table->addColumn($this->timeCol, 'integer', ['unsigned' => true]); + $table->setPrimaryKey([$this->idCol]); foreach ($schema->toSql($conn->getDatabasePlatform()) as $sql) { $conn->exec($sql); @@ -166,7 +166,7 @@ trait PdoTrait protected function doFetch(array $ids) { $now = time(); - $expired = array(); + $expired = []; $sql = str_pad('', (\count($ids) << 1) - 1, '?,'); $sql = "SELECT $this->idCol, CASE WHEN $this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > ? THEN $this->dataCol ELSE NULL END FROM $this->table WHERE $this->idCol IN ($sql)"; @@ -252,8 +252,8 @@ trait PdoTrait */ protected function doSave(array $values, $lifetime) { - $serialized = array(); - $failed = array(); + $serialized = []; + $failed = []; foreach ($values as $id => $value) { try { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/PhpArrayTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/PhpArrayTrait.php index 65dded87..e96462ab 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/PhpArrayTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/PhpArrayTrait.php @@ -60,7 +60,7 @@ trait PhpArrayTrait // This file has been auto-generated by the Symfony Cache Component. -return array( +return [ EOF; @@ -97,7 +97,7 @@ EOF; $dump .= var_export($key, true).' => '.var_export($value, true).",\n"; } - $dump .= "\n);\n"; + $dump .= "\n];\n"; $dump = str_replace("' . \"\\0\" . '", "\0", $dump); $tmpFile = uniqid($this->file, true); @@ -116,7 +116,7 @@ EOF; */ public function clear() { - $this->values = array(); + $this->values = []; $cleared = @unlink($this->file) || !file_exists($this->file); @@ -132,7 +132,7 @@ EOF; $zmb = ini_set('zend.detect_unicode', 0); } try { - $this->values = file_exists($this->file) ? (include $this->file ?: array()) : array(); + $this->values = file_exists($this->file) ? (include $this->file ?: []) : []; } finally { if ($this->zendDetectUnicode) { ini_set('zend.detect_unicode', $zmb); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/PhpFilesTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/PhpFilesTrait.php index b15ae8fc..36c614fe 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/PhpFilesTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/PhpFilesTrait.php @@ -67,7 +67,7 @@ trait PhpFilesTrait */ protected function doFetch(array $ids) { - $values = array(); + $values = []; $now = time(); if ($this->zendDetectUnicode) { @@ -109,7 +109,7 @@ trait PhpFilesTrait */ protected function doHave($id) { - return (bool) $this->doFetch(array($id)); + return (bool) $this->doFetch([$id]); } /** @@ -118,7 +118,7 @@ trait PhpFilesTrait protected function doSave(array $values, $lifetime) { $ok = true; - $data = array($lifetime ? time() + $lifetime : PHP_INT_MAX, ''); + $data = [$lifetime ? time() + $lifetime : PHP_INT_MAX, '']; $allowCompile = 'cli' !== \PHP_SAPI || filter_var(ini_get('opcache.enable_cli'), FILTER_VALIDATE_BOOLEAN); foreach ($values as $key => $value) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/RedisProxy.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/RedisProxy.php index b328f94c..98ea3aba 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/RedisProxy.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/RedisProxy.php @@ -32,7 +32,7 @@ class RedisProxy { $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis); - return \call_user_func_array(array($this->redis, $method), $args); + return \call_user_func_array([$this->redis, $method], $args); } public function hscan($strKey, &$iIterator, $strPattern = null, $iCount = null) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/RedisTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/RedisTrait.php index 77e3decf..7cbd304a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/RedisTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/RedisTrait.php @@ -27,7 +27,7 @@ use Symfony\Component\Cache\Exception\InvalidArgumentException; */ trait RedisTrait { - private static $defaultConnectionOptions = array( + private static $defaultConnectionOptions = [ 'class' => null, 'persistent' => 0, 'persistent_id' => null, @@ -35,7 +35,7 @@ trait RedisTrait 'read_timeout' => 0, 'retry_interval' => 0, 'lazy' => false, - ); + ]; private $redis; /** @@ -73,7 +73,7 @@ trait RedisTrait * * @return \Redis|\Predis\Client According to the "class" option */ - public static function createConnection($dsn, array $options = array()) + public static function createConnection($dsn, array $options = []) { if (0 !== strpos($dsn, 'redis://')) { throw new InvalidArgumentException(sprintf('Invalid Redis DSN: %s does not start with "redis://"', $dsn)); @@ -100,11 +100,11 @@ trait RedisTrait } else { $scheme = 'unix'; } - $params += array( + $params += [ 'host' => isset($params['host']) ? $params['host'] : $params['path'], 'port' => isset($params['host']) ? 6379 : null, 'dbindex' => 0, - ); + ]; if (isset($params['query'])) { parse_str($params['query'], $query); $params += $query; @@ -169,18 +169,29 @@ trait RedisTrait */ protected function doFetch(array $ids) { - if ($ids) { + if (!$ids) { + return []; + } + + $result = []; + + if ($this->redis instanceof \Predis\Client && $this->redis->getConnection() instanceof ClusterInterface) { $values = $this->pipeline(function () use ($ids) { foreach ($ids as $id) { - yield 'get' => array($id); + yield 'get' => [$id]; } }); - foreach ($values as $id => $v) { - if ($v) { - yield $id => parent::unserialize($v); - } + } else { + $values = array_combine($ids, $this->redis->mget($ids)); + } + + foreach ($values as $id => $v) { + if ($v) { + $result[$id] = parent::unserialize($v); } } + + return $result; } /** @@ -200,15 +211,15 @@ trait RedisTrait // This means old keys are not really removed until they expire and may need garbage collection. $cleared = true; - $hosts = array($this->redis); - $evalArgs = array(array($namespace), 0); + $hosts = [$this->redis]; + $evalArgs = [[$namespace], 0]; if ($this->redis instanceof \Predis\Client) { - $evalArgs = array(0, $namespace); + $evalArgs = [0, $namespace]; $connection = $this->redis->getConnection(); if ($connection instanceof PredisCluster) { - $hosts = array(); + $hosts = []; foreach ($connection as $c) { $hosts[] = new \Predis\Client($c); } @@ -216,7 +227,7 @@ trait RedisTrait return false; } } elseif ($this->redis instanceof \RedisArray) { - $hosts = array(); + $hosts = []; foreach ($this->redis->_hosts() as $host) { $hosts[] = $this->redis->_instance($host); } @@ -273,8 +284,8 @@ trait RedisTrait */ protected function doSave(array $values, $lifetime) { - $serialized = array(); - $failed = array(); + $serialized = []; + $failed = []; foreach ($values as $id => $value) { try { @@ -291,9 +302,9 @@ trait RedisTrait $results = $this->pipeline(function () use ($serialized, $lifetime) { foreach ($serialized as $id => $value) { if (0 >= $lifetime) { - yield 'set' => array($id, $value); + yield 'set' => [$id, $value]; } else { - yield 'setEx' => array($id, $lifetime, $value); + yield 'setEx' => [$id, $lifetime, $value]; } } }); @@ -308,24 +319,24 @@ trait RedisTrait private function pipeline(\Closure $generator) { - $ids = array(); + $ids = []; if ($this->redis instanceof \Predis\Client && !$this->redis->getConnection() instanceof ClusterInterface) { $results = $this->redis->pipeline(function ($redis) use ($generator, &$ids) { foreach ($generator() as $command => $args) { - \call_user_func_array(array($redis, $command), $args); + \call_user_func_array([$redis, $command], $args); $ids[] = $args[0]; } }); } elseif ($this->redis instanceof \RedisArray) { - $connections = $results = $ids = array(); + $connections = $results = $ids = []; foreach ($generator() as $command => $args) { if (!isset($connections[$h = $this->redis->_target($args[0])])) { - $connections[$h] = array($this->redis->_instance($h), -1); + $connections[$h] = [$this->redis->_instance($h), -1]; $connections[$h][0]->multi(\Redis::PIPELINE); } - \call_user_func_array(array($connections[$h][0], $command), $args); - $results[] = array($h, ++$connections[$h][1]); + \call_user_func_array([$connections[$h][0], $command], $args); + $results[] = [$h, ++$connections[$h][1]]; $ids[] = $args[0]; } foreach ($connections as $h => $c) { @@ -338,15 +349,15 @@ trait RedisTrait // phpredis & predis don't support pipelining with RedisCluster // see https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#pipelining // see https://github.com/nrk/predis/issues/267#issuecomment-123781423 - $results = array(); + $results = []; foreach ($generator() as $command => $args) { - $results[] = \call_user_func_array(array($this->redis, $command), $args); + $results[] = \call_user_func_array([$this->redis, $command], $args); $ids[] = $args[0]; } } else { $this->redis->multi(\Redis::PIPELINE); foreach ($generator() as $command => $args) { - \call_user_func_array(array($this->redis, $command), $args); + \call_user_func_array([$this->redis, $command], $args); $ids[] = $args[0]; } $results = $this->redis->exec(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ApcClassLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ApcClassLoader.php index 0129c480..83038d74 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ApcClassLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ApcClassLoader.php @@ -88,7 +88,7 @@ class ApcClassLoader */ public function register($prepend = false) { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); + spl_autoload_register([$this, 'loadClass'], true, $prepend); } /** @@ -96,7 +96,7 @@ class ApcClassLoader */ public function unregister() { - spl_autoload_unregister(array($this, 'loadClass')); + spl_autoload_unregister([$this, 'loadClass']); } /** @@ -138,6 +138,6 @@ class ApcClassLoader */ public function __call($method, $args) { - return \call_user_func_array(array($this->decorated, $method), $args); + return \call_user_func_array([$this->decorated, $method], $args); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php index 3fd75c24..5edab01c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php @@ -108,7 +108,7 @@ class ClassCollectionLoader if ($autoReload) { // save the resources - self::writeCacheFile($metadata, serialize(array(array_values($files), $classes))); + self::writeCacheFile($metadata, serialize([array_values($files), $classes])); } } @@ -125,7 +125,7 @@ class ClassCollectionLoader */ public static function inline($classes, $cache, array $excluded) { - $declared = array(); + $declared = []; foreach (self::getOrderedClasses($excluded) as $class) { $declared[$class->getName()] = true; } @@ -147,7 +147,7 @@ REGEX; $dontInlineRegex = str_replace('.', $spacesRegex, $dontInlineRegex); $cacheDir = explode('/', str_replace(\DIRECTORY_SEPARATOR, '/', $cacheDir)); - $files = array(); + $files = []; $content = ''; foreach (self::getOrderedClasses($classes) as $class) { if (isset($declared[$class->getName()])) { @@ -176,7 +176,7 @@ REGEX; $c = "\nnamespace {require $file;}"; } else { - $c = preg_replace(array('/^\s*<\?php/', '/\?>\s*$/'), '', $c); + $c = preg_replace(['/^\s*<\?php/', '/\?>\s*$/'], '', $c); // fakes namespace declaration for global code if (!$class->inNamespace()) { @@ -220,7 +220,7 @@ REGEX; $token = $tokens[$i]; if (!isset($token[1]) || 'b"' === $token) { $rawChunk .= $token; - } elseif (\in_array($token[0], array(T_COMMENT, T_DOC_COMMENT))) { + } elseif (\in_array($token[0], [T_COMMENT, T_DOC_COMMENT])) { // strip comments continue; } elseif (T_NAMESPACE === $token[0]) { @@ -230,7 +230,7 @@ REGEX; $rawChunk .= $token[1]; // namespace name and whitespaces - while (isset($tokens[++$i][1]) && \in_array($tokens[$i][0], array(T_WHITESPACE, T_NS_SEPARATOR, T_STRING))) { + while (isset($tokens[++$i][1]) && \in_array($tokens[$i][0], [T_WHITESPACE, T_NS_SEPARATOR, T_STRING])) { $rawChunk .= $tokens[$i][1]; } if ('{' === $tokens[$i]) { @@ -289,8 +289,8 @@ REGEX; private static function compressCode($code) { return preg_replace( - array('/^\s+/m', '/\s+$/m', '/([\n\r]+ *[\n\r]+)+/', '/[ \t]+/'), - array('', '', "\n", ' '), + ['/^\s+/m', '/\s+$/m', '/([\n\r]+ *[\n\r]+)+/', '/[ \t]+/'], + ['', '', "\n", ' '], $code ); } @@ -330,8 +330,8 @@ REGEX; */ private static function getOrderedClasses(array $classes) { - $map = array(); - self::$seen = array(); + $map = []; + self::$seen = []; foreach ($classes as $class) { try { $reflectionClass = new \ReflectionClass($class); @@ -348,12 +348,12 @@ REGEX; private static function getClassHierarchy(\ReflectionClass $class) { if (isset(self::$seen[$class->getName()])) { - return array(); + return []; } self::$seen[$class->getName()] = true; - $classes = array($class); + $classes = [$class]; $parent = $class; while (($parent = $parent->getParentClass()) && $parent->isUserDefined() && !isset(self::$seen[$parent->getName()])) { self::$seen[$parent->getName()] = true; @@ -361,7 +361,7 @@ REGEX; array_unshift($classes, $parent); } - $traits = array(); + $traits = []; foreach ($classes as $c) { foreach (self::resolveDependencies(self::computeTraitDeps($c), $c) as $trait) { @@ -376,7 +376,7 @@ REGEX; private static function getInterfaces(\ReflectionClass $class) { - $classes = array(); + $classes = []; foreach ($class->getInterfaces() as $interface) { $classes = array_merge($classes, self::getInterfaces($interface)); @@ -394,7 +394,7 @@ REGEX; private static function computeTraitDeps(\ReflectionClass $class) { $traits = $class->getTraits(); - $deps = array($class->getName() => $traits); + $deps = [$class->getName() => $traits]; while ($trait = array_pop($traits)) { if ($trait->isUserDefined() && !isset(self::$seen[$trait->getName()])) { self::$seen[$trait->getName()] = true; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassLoader.php index 52cff3bb..d727278e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassLoader.php @@ -43,8 +43,8 @@ namespace Symfony\Component\ClassLoader; */ class ClassLoader { - private $prefixes = array(); - private $fallbackDirs = array(); + private $prefixes = []; + private $fallbackDirs = []; private $useIncludePath = false; /** @@ -136,7 +136,7 @@ class ClassLoader */ public function register($prepend = false) { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); + spl_autoload_register([$this, 'loadClass'], true, $prepend); } /** @@ -144,7 +144,7 @@ class ClassLoader */ public function unregister() { - spl_autoload_unregister(array($this, 'loadClass')); + spl_autoload_unregister([$this, 'loadClass']); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassMapGenerator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassMapGenerator.php index 6a96886c..f32ca3ca 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassMapGenerator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassMapGenerator.php @@ -31,7 +31,7 @@ class ClassMapGenerator public static function dump($dirs, $file) { $dirs = (array) $dirs; - $maps = array(); + $maps = []; foreach ($dirs as $dir) { $maps = array_merge($maps, static::createMap($dir)); @@ -53,7 +53,7 @@ class ClassMapGenerator $dir = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir)); } - $map = array(); + $map = []; foreach ($dir as $file) { if (!$file->isFile()) { @@ -93,7 +93,7 @@ class ClassMapGenerator $contents = file_get_contents($path); $tokens = token_get_all($contents); - $classes = array(); + $classes = []; $namespace = ''; for ($i = 0; isset($tokens[$i]); ++$i) { @@ -110,7 +110,7 @@ class ClassMapGenerator $namespace = ''; // If there is a namespace, extract it while (isset($tokens[++$i][1])) { - if (\in_array($tokens[$i][0], array(T_STRING, T_NS_SEPARATOR))) { + if (\in_array($tokens[$i][0], [T_STRING, T_NS_SEPARATOR])) { $namespace .= $tokens[$i][1]; } } @@ -129,7 +129,7 @@ class ClassMapGenerator if (T_DOUBLE_COLON === $tokens[$j][0]) { $isClassConstant = true; break; - } elseif (!\in_array($tokens[$j][0], array(T_WHITESPACE, T_DOC_COMMENT, T_COMMENT))) { + } elseif (!\in_array($tokens[$j][0], [T_WHITESPACE, T_DOC_COMMENT, T_COMMENT])) { break; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/MapClassLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/MapClassLoader.php index 7b0dbba4..a9719d6b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/MapClassLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/MapClassLoader.php @@ -22,7 +22,7 @@ namespace Symfony\Component\ClassLoader; */ class MapClassLoader { - private $map = array(); + private $map = []; /** * @param array $map A map where keys are classes and values the absolute file path @@ -39,7 +39,7 @@ class MapClassLoader */ public function register($prepend = false) { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); + spl_autoload_register([$this, 'loadClass'], true, $prepend); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Psr4ClassLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Psr4ClassLoader.php index d5b8d140..7ea521d8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Psr4ClassLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Psr4ClassLoader.php @@ -24,7 +24,7 @@ namespace Symfony\Component\ClassLoader; */ class Psr4ClassLoader { - private $prefixes = array(); + private $prefixes = []; /** * @param string $prefix @@ -34,7 +34,7 @@ class Psr4ClassLoader { $prefix = trim($prefix, '\\').'\\'; $baseDir = rtrim($baseDir, \DIRECTORY_SEPARATOR).\DIRECTORY_SEPARATOR; - $this->prefixes[] = array($prefix, $baseDir); + $this->prefixes[] = [$prefix, $baseDir]; } /** @@ -81,7 +81,7 @@ class Psr4ClassLoader */ public function register($prepend = false) { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); + spl_autoload_register([$this, 'loadClass'], true, $prepend); } /** @@ -89,6 +89,6 @@ class Psr4ClassLoader */ public function unregister() { - spl_autoload_unregister(array($this, 'loadClass')); + spl_autoload_unregister([$this, 'loadClass']); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ApcClassLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ApcClassLoaderTest.php index 70896f31..6706acbd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ApcClassLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ApcClassLoaderTest.php @@ -62,10 +62,10 @@ class ApcClassLoaderTest extends TestCase public function getLoadClassTests() { - return array( - array('\\Apc\\Namespaced\\Foo', 'Apc\\Namespaced\\Foo', '->loadClass() loads Apc\Namespaced\Foo class'), - array('Apc_Pearlike_Foo', 'Apc_Pearlike_Foo', '->loadClass() loads Apc_Pearlike_Foo class'), - ); + return [ + ['\\Apc\\Namespaced\\Foo', 'Apc\\Namespaced\\Foo', '->loadClass() loads Apc\Namespaced\Foo class'], + ['Apc_Pearlike_Foo', 'Apc_Pearlike_Foo', '->loadClass() loads Apc_Pearlike_Foo class'], + ]; } /** @@ -76,7 +76,7 @@ class ApcClassLoaderTest extends TestCase $loader = new ClassLoader(); $loader->addPrefix('Apc\Namespaced', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); $loader->addPrefix('Apc_Pearlike_', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $loader->addPrefix('', array(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/fallback')); + $loader->addPrefix('', [__DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/fallback']); $loader = new ApcClassLoader('test.prefix.fallback', $loader); $loader->loadClass($testClassName); @@ -86,12 +86,12 @@ class ApcClassLoaderTest extends TestCase public function getLoadClassFromFallbackTests() { - return array( - array('\\Apc\\Namespaced\\Baz', 'Apc\\Namespaced\\Baz', '->loadClass() loads Apc\Namespaced\Baz class'), - array('Apc_Pearlike_Baz', 'Apc_Pearlike_Baz', '->loadClass() loads Apc_Pearlike_Baz class'), - array('\\Apc\\Namespaced\\FooBar', 'Apc\\Namespaced\\FooBar', '->loadClass() loads Apc\Namespaced\Baz class from fallback dir'), - array('Apc_Pearlike_FooBar', 'Apc_Pearlike_FooBar', '->loadClass() loads Apc_Pearlike_Baz class from fallback dir'), - ); + return [ + ['\\Apc\\Namespaced\\Baz', 'Apc\\Namespaced\\Baz', '->loadClass() loads Apc\Namespaced\Baz class'], + ['Apc_Pearlike_Baz', 'Apc_Pearlike_Baz', '->loadClass() loads Apc_Pearlike_Baz class'], + ['\\Apc\\Namespaced\\FooBar', 'Apc\\Namespaced\\FooBar', '->loadClass() loads Apc\Namespaced\Baz class from fallback dir'], + ['Apc_Pearlike_FooBar', 'Apc_Pearlike_FooBar', '->loadClass() loads Apc_Pearlike_Baz class from fallback dir'], + ]; } /** @@ -110,40 +110,40 @@ class ApcClassLoaderTest extends TestCase public function getLoadClassNamespaceCollisionTests() { - return array( - array( - array( + return [ + [ + [ 'Apc\\NamespaceCollision\\A' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha', 'Apc\\NamespaceCollision\\A\\B' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/beta', - ), + ], 'Apc\NamespaceCollision\A\Foo', '->loadClass() loads NamespaceCollision\A\Foo from alpha.', - ), - array( - array( + ], + [ + [ 'Apc\\NamespaceCollision\\A\\B' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/beta', 'Apc\\NamespaceCollision\\A' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha', - ), + ], 'Apc\NamespaceCollision\A\Bar', '->loadClass() loads NamespaceCollision\A\Bar from alpha.', - ), - array( - array( + ], + [ + [ 'Apc\\NamespaceCollision\\A' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha', 'Apc\\NamespaceCollision\\A\\B' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/beta', - ), + ], 'Apc\NamespaceCollision\A\B\Foo', '->loadClass() loads NamespaceCollision\A\B\Foo from beta.', - ), - array( - array( + ], + [ + [ 'Apc\\NamespaceCollision\\A\\B' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/beta', 'Apc\\NamespaceCollision\\A' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha', - ), + ], 'Apc\NamespaceCollision\A\B\Bar', '->loadClass() loads NamespaceCollision\A\B\Bar from beta.', - ), - ); + ], + ]; } /** @@ -162,39 +162,39 @@ class ApcClassLoaderTest extends TestCase public function getLoadClassPrefixCollisionTests() { - return array( - array( - array( + return [ + [ + [ 'ApcPrefixCollision_A_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha/Apc', 'ApcPrefixCollision_A_B_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/beta/Apc', - ), + ], 'ApcPrefixCollision_A_Foo', '->loadClass() loads ApcPrefixCollision_A_Foo from alpha.', - ), - array( - array( + ], + [ + [ 'ApcPrefixCollision_A_B_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/beta/Apc', 'ApcPrefixCollision_A_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha/Apc', - ), + ], 'ApcPrefixCollision_A_Bar', '->loadClass() loads ApcPrefixCollision_A_Bar from alpha.', - ), - array( - array( + ], + [ + [ 'ApcPrefixCollision_A_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha/Apc', 'ApcPrefixCollision_A_B_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/beta/Apc', - ), + ], 'ApcPrefixCollision_A_B_Foo', '->loadClass() loads ApcPrefixCollision_A_B_Foo from beta.', - ), - array( - array( + ], + [ + [ 'ApcPrefixCollision_A_B_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/beta/Apc', 'ApcPrefixCollision_A_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha/Apc', - ), + ], 'ApcPrefixCollision_A_B_Bar', '->loadClass() loads ApcPrefixCollision_A_B_Bar from beta.', - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php index 15a11053..816f3c39 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php @@ -34,17 +34,17 @@ class ClassCollectionLoaderTest extends TestCase $m = $r->getMethod('getOrderedClasses'); $m->setAccessible(true); - $ordered = $m->invoke(null, array('CTFoo')); + $ordered = $m->invoke(null, ['CTFoo']); $this->assertEquals( - array('TD', 'TC', 'TB', 'TA', 'TZ', 'CTFoo'), + ['TD', 'TC', 'TB', 'TA', 'TZ', 'CTFoo'], array_map(function ($class) { return $class->getName(); }, $ordered) ); - $ordered = $m->invoke(null, array('CTBar')); + $ordered = $m->invoke(null, ['CTBar']); $this->assertEquals( - array('TD', 'TZ', 'TC', 'TB', 'TA', 'CTBar'), + ['TD', 'TZ', 'TC', 'TB', 'TA', 'CTBar'], array_map(function ($class) { return $class->getName(); }, $ordered) ); } @@ -54,12 +54,12 @@ class ClassCollectionLoaderTest extends TestCase */ public function testClassReordering(array $classes) { - $expected = array( + $expected = [ 'ClassesWithParents\\GInterface', 'ClassesWithParents\\CInterface', 'ClassesWithParents\\B', 'ClassesWithParents\\A', - ); + ]; $r = new \ReflectionClass('Symfony\Component\ClassLoader\ClassCollectionLoader'); $m = $r->getMethod('getOrderedClasses'); @@ -72,27 +72,27 @@ class ClassCollectionLoaderTest extends TestCase public function getDifferentOrders() { - return array( - array(array( + return [ + [[ 'ClassesWithParents\\A', 'ClassesWithParents\\CInterface', 'ClassesWithParents\\GInterface', 'ClassesWithParents\\B', - )), - array(array( + ]], + [[ 'ClassesWithParents\\B', 'ClassesWithParents\\A', 'ClassesWithParents\\CInterface', - )), - array(array( + ]], + [[ 'ClassesWithParents\\CInterface', 'ClassesWithParents\\B', 'ClassesWithParents\\A', - )), - array(array( + ]], + [[ 'ClassesWithParents\\A', - )), - ); + ]], + ]; } /** @@ -106,7 +106,7 @@ class ClassCollectionLoaderTest extends TestCase require_once __DIR__.'/Fixtures/ClassesWithParents/D.php'; require_once __DIR__.'/Fixtures/ClassesWithParents/E.php'; - $expected = array( + $expected = [ 'ClassesWithParents\\GInterface', 'ClassesWithParents\\CInterface', 'ClassesWithParents\\ATrait', @@ -116,7 +116,7 @@ class ClassCollectionLoaderTest extends TestCase 'ClassesWithParents\\A', 'ClassesWithParents\\D', 'ClassesWithParents\\E', - ); + ]; $r = new \ReflectionClass('Symfony\Component\ClassLoader\ClassCollectionLoader'); $m = $r->getMethod('getOrderedClasses'); @@ -129,15 +129,15 @@ class ClassCollectionLoaderTest extends TestCase public function getDifferentOrdersForTraits() { - return array( - array(array( + return [ + [[ 'ClassesWithParents\\E', 'ClassesWithParents\\ATrait', - )), - array(array( + ]], + [[ 'ClassesWithParents\\E', - )), - ); + ]], + ]; } public function testFixClassWithTraitsOrdering() @@ -146,16 +146,16 @@ class ClassCollectionLoaderTest extends TestCase require_once __DIR__.'/Fixtures/ClassesWithParents/F.php'; require_once __DIR__.'/Fixtures/ClassesWithParents/G.php'; - $classes = array( + $classes = [ 'ClassesWithParents\\F', 'ClassesWithParents\\G', - ); + ]; - $expected = array( + $expected = [ 'ClassesWithParents\\CTrait', 'ClassesWithParents\\F', 'ClassesWithParents\\G', - ); + ]; $r = new \ReflectionClass('Symfony\Component\ClassLoader\ClassCollectionLoader'); $m = $r->getMethod('getOrderedClasses'); @@ -176,14 +176,14 @@ class ClassCollectionLoaderTest extends TestCase public function getFixNamespaceDeclarationsData() { - return array( - array("namespace;\nclass Foo {}\n", "namespace\n{\nclass Foo {}\n}"), - array("namespace Foo;\nclass Foo {}\n", "namespace Foo\n{\nclass Foo {}\n}"), - array("namespace Bar ;\nclass Foo {}\n", "namespace Bar\n{\nclass Foo {}\n}"), - array("namespace Foo\Bar;\nclass Foo {}\n", "namespace Foo\Bar\n{\nclass Foo {}\n}"), - array("namespace Foo\Bar\Bar\n{\nclass Foo {}\n}\n", "namespace Foo\Bar\Bar\n{\nclass Foo {}\n}"), - array("namespace\n{\nclass Foo {}\n}\n", "namespace\n{\nclass Foo {}\n}"), - ); + return [ + ["namespace;\nclass Foo {}\n", "namespace\n{\nclass Foo {}\n}"], + ["namespace Foo;\nclass Foo {}\n", "namespace Foo\n{\nclass Foo {}\n}"], + ["namespace Bar ;\nclass Foo {}\n", "namespace Bar\n{\nclass Foo {}\n}"], + ["namespace Foo\Bar;\nclass Foo {}\n", "namespace Foo\Bar\n{\nclass Foo {}\n}"], + ["namespace Foo\Bar\Bar\n{\nclass Foo {}\n}\n", "namespace Foo\Bar\Bar\n{\nclass Foo {}\n}"], + ["namespace\n{\nclass Foo {}\n}\n", "namespace\n{\nclass Foo {}\n}"], + ]; } /** @@ -198,14 +198,14 @@ class ClassCollectionLoaderTest extends TestCase public function getFixNamespaceDeclarationsDataWithoutTokenizer() { - return array( - array("namespace;\nclass Foo {}\n", "namespace\n{\nclass Foo {}\n}\n"), - array("namespace Foo;\nclass Foo {}\n", "namespace Foo\n{\nclass Foo {}\n}\n"), - array("namespace Bar ;\nclass Foo {}\n", "namespace Bar\n{\nclass Foo {}\n}\n"), - array("namespace Foo\Bar;\nclass Foo {}\n", "namespace Foo\Bar\n{\nclass Foo {}\n}\n"), - array("namespace Foo\Bar\Bar\n{\nclass Foo {}\n}\n", "namespace Foo\Bar\Bar\n{\nclass Foo {}\n}\n"), - array("\nnamespace\n{\nclass Foo {}\n\$namespace=123;}\n", "\nnamespace\n{\nclass Foo {}\n\$namespace=123;}\n"), - ); + return [ + ["namespace;\nclass Foo {}\n", "namespace\n{\nclass Foo {}\n}\n"], + ["namespace Foo;\nclass Foo {}\n", "namespace Foo\n{\nclass Foo {}\n}\n"], + ["namespace Bar ;\nclass Foo {}\n", "namespace Bar\n{\nclass Foo {}\n}\n"], + ["namespace Foo\Bar;\nclass Foo {}\n", "namespace Foo\Bar\n{\nclass Foo {}\n}\n"], + ["namespace Foo\Bar\Bar\n{\nclass Foo {}\n}\n", "namespace Foo\Bar\Bar\n{\nclass Foo {}\n}\n"], + ["\nnamespace\n{\nclass Foo {}\n\$namespace=123;}\n", "\nnamespace\n{\nclass Foo {}\n\$namespace=123;}\n"], + ]; } /** @@ -217,7 +217,7 @@ class ClassCollectionLoaderTest extends TestCase unlink($file); } - ClassCollectionLoader::load(array('SomeNotExistingClass'), sys_get_temp_dir(), 'foo', false); + ClassCollectionLoader::load(['SomeNotExistingClass'], sys_get_temp_dir(), 'foo', false); } public function testCommentStripping() @@ -227,14 +227,14 @@ class ClassCollectionLoaderTest extends TestCase } spl_autoload_register($r = function ($class) { if (0 === strpos($class, 'Namespaced') || 0 === strpos($class, 'Pearlike_')) { - @require_once __DIR__.'/Fixtures/'.str_replace(array('\\', '_'), '/', $class).'.php'; + @require_once __DIR__.'/Fixtures/'.str_replace(['\\', '_'], '/', $class).'.php'; } }); $strictTypes = \defined('HHVM_VERSION') ? '' : "\nnamespace {require __DIR__.'/Fixtures/Namespaced/WithStrictTypes.php';}"; ClassCollectionLoader::load( - array('Namespaced\\WithComments', 'Pearlike_WithComments', 'Namespaced\\WithDirMagic', 'Namespaced\\WithFileMagic', 'Namespaced\\WithHaltCompiler', $strictTypes ? 'Namespaced\\WithStrictTypes' : 'Namespaced\\WithComments'), + ['Namespaced\\WithComments', 'Pearlike_WithComments', 'Namespaced\\WithDirMagic', 'Namespaced\\WithFileMagic', 'Namespaced\\WithHaltCompiler', $strictTypes ? 'Namespaced\\WithStrictTypes' : 'Namespaced\\WithComments'], __DIR__, 'bar', false @@ -279,7 +279,7 @@ namespace {require __DIR__.'/Fixtures/Namespaced/WithFileMagic.php';} namespace {require __DIR__.'/Fixtures/Namespaced/WithHaltCompiler.php';} EOF .$strictTypes, - str_replace(array("loadClass() loads Namespaced2\Foo class'), - array('\\Pearlike2_Foo', 'Pearlike2_Foo', '->loadClass() loads Pearlike2_Foo class'), - ); + return [ + ['\\Namespaced2\\Foo', 'Namespaced2\\Foo', '->loadClass() loads Namespaced2\Foo class'], + ['\\Pearlike2_Foo', 'Pearlike2_Foo', '->loadClass() loads Pearlike2_Foo class'], + ]; } /** @@ -75,9 +75,9 @@ class ClassLoaderTest extends TestCase public function getLoadNonexistentClassTests() { - return array( - array('\\Pearlike3_Bar', '\\Pearlike3_Bar', '->loadClass() loads non existing Pearlike3_Bar class with a leading slash'), - ); + return [ + ['\\Pearlike3_Bar', '\\Pearlike3_Bar', '->loadClass() loads non existing Pearlike3_Bar class with a leading slash'], + ]; } public function testAddPrefixSingle() @@ -93,8 +93,8 @@ class ClassLoaderTest extends TestCase public function testAddPrefixesSingle() { $loader = new ClassLoader(); - $loader->addPrefixes(array('Foo' => array('foo', 'foo'))); - $loader->addPrefixes(array('Foo' => array('foo'))); + $loader->addPrefixes(['Foo' => ['foo', 'foo']]); + $loader->addPrefixes(['Foo' => ['foo']]); $prefixes = $loader->getPrefixes(); $this->assertArrayHasKey('Foo', $prefixes); $this->assertCount(1, $prefixes['Foo'], print_r($prefixes, true)); @@ -139,19 +139,19 @@ class ClassLoaderTest extends TestCase $loader = new ClassLoader(); $loader->addPrefix('Namespaced2\\', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); $loader->addPrefix('Pearlike2_', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $loader->addPrefix('', array(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures/fallback')); + $loader->addPrefix('', [__DIR__.\DIRECTORY_SEPARATOR.'Fixtures/fallback']); $loader->loadClass($testClassName); $this->assertTrue(class_exists($className), $message); } public function getLoadClassFromFallbackTests() { - return array( - array('\\Namespaced2\\Baz', 'Namespaced2\\Baz', '->loadClass() loads Namespaced2\Baz class'), - array('\\Pearlike2_Baz', 'Pearlike2_Baz', '->loadClass() loads Pearlike2_Baz class'), - array('\\Namespaced2\\FooBar', 'Namespaced2\\FooBar', '->loadClass() loads Namespaced2\Baz class from fallback dir'), - array('\\Pearlike2_FooBar', 'Pearlike2_FooBar', '->loadClass() loads Pearlike2_Baz class from fallback dir'), - ); + return [ + ['\\Namespaced2\\Baz', 'Namespaced2\\Baz', '->loadClass() loads Namespaced2\Baz class'], + ['\\Pearlike2_Baz', 'Pearlike2_Baz', '->loadClass() loads Pearlike2_Baz class'], + ['\\Namespaced2\\FooBar', 'Namespaced2\\FooBar', '->loadClass() loads Namespaced2\Baz class from fallback dir'], + ['\\Pearlike2_FooBar', 'Pearlike2_FooBar', '->loadClass() loads Pearlike2_Baz class from fallback dir'], + ]; } /** @@ -168,71 +168,71 @@ class ClassLoaderTest extends TestCase public function getLoadClassNamespaceCollisionTests() { - return array( - array( - array( + return [ + [ + [ 'NamespaceCollision\\C' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/alpha', 'NamespaceCollision\\C\\B' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/beta', - ), + ], 'NamespaceCollision\C\Foo', '->loadClass() loads NamespaceCollision\C\Foo from alpha.', - ), - array( - array( + ], + [ + [ 'NamespaceCollision\\C\\B' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/beta', 'NamespaceCollision\\C' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/alpha', - ), + ], 'NamespaceCollision\C\Bar', '->loadClass() loads NamespaceCollision\C\Bar from alpha.', - ), - array( - array( + ], + [ + [ 'NamespaceCollision\\C' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/alpha', 'NamespaceCollision\\C\\B' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/beta', - ), + ], 'NamespaceCollision\C\B\Foo', '->loadClass() loads NamespaceCollision\C\B\Foo from beta.', - ), - array( - array( + ], + [ + [ 'NamespaceCollision\\C\\B' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/beta', 'NamespaceCollision\\C' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/alpha', - ), + ], 'NamespaceCollision\C\B\Bar', '->loadClass() loads NamespaceCollision\C\B\Bar from beta.', - ), - array( - array( + ], + [ + [ 'PrefixCollision_C_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/alpha', 'PrefixCollision_C_B_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/beta', - ), + ], 'PrefixCollision_C_Foo', '->loadClass() loads PrefixCollision_C_Foo from alpha.', - ), - array( - array( + ], + [ + [ 'PrefixCollision_C_B_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/beta', 'PrefixCollision_C_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/alpha', - ), + ], 'PrefixCollision_C_Bar', '->loadClass() loads PrefixCollision_C_Bar from alpha.', - ), - array( - array( + ], + [ + [ 'PrefixCollision_C_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/alpha', 'PrefixCollision_C_B_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/beta', - ), + ], 'PrefixCollision_C_B_Foo', '->loadClass() loads PrefixCollision_C_B_Foo from beta.', - ), - array( - array( + ], + [ + [ 'PrefixCollision_C_B_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/beta', 'PrefixCollision_C_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/alpha', - ), + ], 'PrefixCollision_C_B_Bar', '->loadClass() loads PrefixCollision_C_B_Bar from beta.', - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php index ad6a1b86..91106601 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php @@ -74,8 +74,8 @@ class ClassMapGeneratorTest extends TestCase public function getTestCreateMapTests() { - $data = array( - array(__DIR__.'/Fixtures/Namespaced', array( + $data = [ + [__DIR__.'/Fixtures/Namespaced', [ 'Namespaced\\Bar' => realpath(__DIR__).'/Fixtures/Namespaced/Bar.php', 'Namespaced\\Foo' => realpath(__DIR__).'/Fixtures/Namespaced/Foo.php', 'Namespaced\\Baz' => realpath(__DIR__).'/Fixtures/Namespaced/Baz.php', @@ -84,20 +84,20 @@ class ClassMapGeneratorTest extends TestCase 'Namespaced\\WithHaltCompiler' => realpath(__DIR__).'/Fixtures/Namespaced/WithHaltCompiler.php', 'Namespaced\\WithDirMagic' => realpath(__DIR__).'/Fixtures/Namespaced/WithDirMagic.php', 'Namespaced\\WithFileMagic' => realpath(__DIR__).'/Fixtures/Namespaced/WithFileMagic.php', - )), - array(__DIR__.'/Fixtures/beta/NamespaceCollision', array( + ]], + [__DIR__.'/Fixtures/beta/NamespaceCollision', [ 'NamespaceCollision\\A\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Bar.php', 'NamespaceCollision\\A\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Foo.php', 'NamespaceCollision\\C\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Bar.php', 'NamespaceCollision\\C\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Foo.php', - )), - array(__DIR__.'/Fixtures/Pearlike', array( + ]], + [__DIR__.'/Fixtures/Pearlike', [ 'Pearlike_Foo' => realpath(__DIR__).'/Fixtures/Pearlike/Foo.php', 'Pearlike_Bar' => realpath(__DIR__).'/Fixtures/Pearlike/Bar.php', 'Pearlike_Baz' => realpath(__DIR__).'/Fixtures/Pearlike/Baz.php', 'Pearlike_WithComments' => realpath(__DIR__).'/Fixtures/Pearlike/WithComments.php', - )), - array(__DIR__.'/Fixtures/classmap', array( + ]], + [__DIR__.'/Fixtures/classmap', [ 'Foo\\Bar\\A' => realpath(__DIR__).'/Fixtures/classmap/sameNsMultipleClasses.php', 'Foo\\Bar\\B' => realpath(__DIR__).'/Fixtures/classmap/sameNsMultipleClasses.php', 'A' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', @@ -108,19 +108,19 @@ class ClassMapGeneratorTest extends TestCase 'ClassMap\\SomeInterface' => realpath(__DIR__).'/Fixtures/classmap/SomeInterface.php', 'ClassMap\\SomeParent' => realpath(__DIR__).'/Fixtures/classmap/SomeParent.php', 'ClassMap\\SomeClass' => realpath(__DIR__).'/Fixtures/classmap/SomeClass.php', - )), - array(__DIR__.'/Fixtures/php5.4', array( + ]], + [__DIR__.'/Fixtures/php5.4', [ 'TFoo' => __DIR__.'/Fixtures/php5.4/traits.php', 'CFoo' => __DIR__.'/Fixtures/php5.4/traits.php', 'Foo\\TBar' => __DIR__.'/Fixtures/php5.4/traits.php', 'Foo\\IBar' => __DIR__.'/Fixtures/php5.4/traits.php', 'Foo\\TFooBar' => __DIR__.'/Fixtures/php5.4/traits.php', 'Foo\\CBar' => __DIR__.'/Fixtures/php5.4/traits.php', - )), - array(__DIR__.'/Fixtures/php5.5', array( + ]], + [__DIR__.'/Fixtures/php5.5', [ 'ClassCons\\Foo' => __DIR__.'/Fixtures/php5.5/class_cons.php', - )), - ); + ]], + ]; return $data; } @@ -130,12 +130,12 @@ class ClassMapGeneratorTest extends TestCase $finder = new \Symfony\Component\Finder\Finder(); $finder->files()->in(__DIR__.'/Fixtures/beta/NamespaceCollision'); - $this->assertEqualsNormalized(array( + $this->assertEqualsNormalized([ 'NamespaceCollision\\A\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Bar.php', 'NamespaceCollision\\A\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Foo.php', 'NamespaceCollision\\C\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Bar.php', 'NamespaceCollision\\C\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Foo.php', - ), ClassMapGenerator::createMap($finder)); + ], ClassMapGenerator::createMap($finder)); } protected function assertEqualsNormalized($expected, $actual, $message = '') diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Psr4ClassLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Psr4ClassLoaderTest.php index c34351b0..122200e9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Psr4ClassLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Psr4ClassLoaderTest.php @@ -39,12 +39,12 @@ class Psr4ClassLoaderTest extends TestCase */ public function getLoadClassTests() { - return array( - array('Acme\\DemoLib\\Foo'), - array('Acme\\DemoLib\\Class_With_Underscores'), - array('Acme\\DemoLib\\Lets\\Go\\Deeper\\Foo'), - array('Acme\\DemoLib\\Lets\\Go\\Deeper\\Class_With_Underscores'), - ); + return [ + ['Acme\\DemoLib\\Foo'], + ['Acme\\DemoLib\\Class_With_Underscores'], + ['Acme\\DemoLib\\Lets\\Go\\Deeper\\Foo'], + ['Acme\\DemoLib\\Lets\\Go\\Deeper\\Class_With_Underscores'], + ]; } /** @@ -67,9 +67,9 @@ class Psr4ClassLoaderTest extends TestCase */ public function getLoadNonexistentClassTests() { - return array( - array('Acme\\DemoLib\\I_Do_Not_Exist'), - array('UnknownVendor\\SomeLib\\I_Do_Not_Exist'), - ); + return [ + ['Acme\\DemoLib\\I_Do_Not_Exist'], + ['UnknownVendor\\SomeLib\\I_Do_Not_Exist'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/WinCacheClassLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/WinCacheClassLoader.php index 75ebb84c..a7149ce9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/WinCacheClassLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/WinCacheClassLoader.php @@ -87,7 +87,7 @@ class WinCacheClassLoader */ public function register($prepend = false) { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); + spl_autoload_register([$this, 'loadClass'], true, $prepend); } /** @@ -95,7 +95,7 @@ class WinCacheClassLoader */ public function unregister() { - spl_autoload_unregister(array($this, 'loadClass')); + spl_autoload_unregister([$this, 'loadClass']); } /** @@ -137,6 +137,6 @@ class WinCacheClassLoader */ public function __call($method, $args) { - return \call_user_func_array(array($this->decorated, $method), $args); + return \call_user_func_array([$this->decorated, $method], $args); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/XcacheClassLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/XcacheClassLoader.php index a6a9ecc1..56965df4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/XcacheClassLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/XcacheClassLoader.php @@ -81,7 +81,7 @@ class XcacheClassLoader */ public function register($prepend = false) { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); + spl_autoload_register([$this, 'loadClass'], true, $prepend); } /** @@ -89,7 +89,7 @@ class XcacheClassLoader */ public function unregister() { - spl_autoload_unregister(array($this, 'loadClass')); + spl_autoload_unregister([$this, 'loadClass']); } /** @@ -132,6 +132,6 @@ class XcacheClassLoader */ public function __call($method, $args) { - return \call_user_func_array(array($this->decorated, $method), $args); + return \call_user_func_array([$this->decorated, $method], $args); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/CHANGELOG.md b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/CHANGELOG.md index 7813ac53..6cb610c4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/CHANGELOG.md +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/CHANGELOG.md @@ -34,7 +34,7 @@ The edge case of defining just one value for nodes of type Enum is now allowed: $rootNode ->children() ->enumNode('variable') - ->values(array('value')) + ->values(['value']) ->end() ->end() ; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/ConfigCache.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/ConfigCache.php index 591c89bc..b2a39076 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/ConfigCache.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/ConfigCache.php @@ -35,9 +35,9 @@ class ConfigCache extends ResourceCheckerConfigCache { $this->debug = (bool) $debug; - $checkers = array(); + $checkers = []; if (true === $this->debug) { - $checkers = array(new SelfCheckingResourceChecker()); + $checkers = [new SelfCheckingResourceChecker()]; } parent::__construct($file, $checkers); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ArrayNode.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ArrayNode.php index 25d9cfc5..ac310819 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ArrayNode.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ArrayNode.php @@ -22,8 +22,8 @@ use Symfony\Component\Config\Definition\Exception\UnsetKeyException; */ class ArrayNode extends BaseNode implements PrototypeNodeInterface { - protected $xmlRemappings = array(); - protected $children = array(); + protected $xmlRemappings = []; + protected $children = []; protected $allowFalse = false; protected $allowNewKeys = true; protected $addIfNotSet = false; @@ -56,10 +56,10 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface return $value; } - $normalized = array(); + $normalized = []; foreach ($value as $k => $v) { - if (false !== strpos($k, '-') && false === strpos($k, '_') && !array_key_exists($normalizedKey = str_replace('-', '_', $k), $value)) { + if (false !== strpos($k, '-') && false === strpos($k, '_') && !\array_key_exists($normalizedKey = str_replace('-', '_', $k), $value)) { $normalized[$normalizedKey] = $v; } else { $normalized[$k] = $v; @@ -82,7 +82,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface /** * Sets the xml remappings that should be performed. * - * @param array $remappings An array of the form array(array(string, string)) + * @param array $remappings An array of the form [[string, string]] */ public function setXmlRemappings(array $remappings) { @@ -92,7 +92,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface /** * Gets the xml remappings that should be performed. * - * @return array an array of the form array(array(string, string)) + * @return array an array of the form [[string, string]] */ public function getXmlRemappings() { @@ -177,7 +177,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface throw new \RuntimeException(sprintf('The node at path "%s" has no default value.', $this->getPath())); } - $defaults = array(); + $defaults = []; foreach ($this->children as $name => $child) { if ($child->hasDefaultValue()) { $defaults[$name] = $child->getDefaultValue(); @@ -223,7 +223,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface } foreach ($this->children as $name => $child) { - if (!array_key_exists($name, $value)) { + if (!\array_key_exists($name, $value)) { if ($child->isRequired()) { $ex = new InvalidConfigurationException(sprintf('The child node "%s" at path "%s" must be configured.', $name, $this->getPath())); $ex->setPath($this->getPath()); @@ -289,7 +289,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface $value = $this->remapXml($value); - $normalized = array(); + $normalized = []; foreach ($value as $name => $val) { if (isset($this->children[$name])) { try { @@ -359,7 +359,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface foreach ($rightSide as $k => $v) { // no conflict - if (!array_key_exists($k, $leftSide)) { + if (!\array_key_exists($k, $leftSide)) { if (!$this->allowNewKeys) { $ex = new InvalidConfigurationException(sprintf('You are not allowed to define new elements for path "%s". Please define all elements for this path in one config file. If you are trying to overwrite an element, make sure you redefine it with the same name.', $this->getPath())); $ex->setPath($this->getPath()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/BaseNode.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/BaseNode.php index d3f0f96e..905406d1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/BaseNode.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/BaseNode.php @@ -25,13 +25,13 @@ abstract class BaseNode implements NodeInterface { protected $name; protected $parent; - protected $normalizationClosures = array(); - protected $finalValidationClosures = array(); + protected $normalizationClosures = []; + protected $finalValidationClosures = []; protected $allowOverwrite = true; protected $required = false; protected $deprecationMessage = null; - protected $equivalentValues = array(); - protected $attributes = array(); + protected $equivalentValues = []; + protected $attributes = []; /** * @param string|null $name The name of the node @@ -127,7 +127,7 @@ abstract class BaseNode implements NodeInterface */ public function addEquivalentValue($originalValue, $equivalentValue) { - $this->equivalentValues[] = array($originalValue, $equivalentValue); + $this->equivalentValues[] = [$originalValue, $equivalentValue]; } /** @@ -211,7 +211,7 @@ abstract class BaseNode implements NodeInterface */ public function getDeprecationMessage($node, $path) { - return strtr($this->deprecationMessage, array('%node%' => $node, '%path%' => $path)); + return strtr($this->deprecationMessage, ['%node%' => $node, '%path%' => $path]); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php index 28a00be0..115054a2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php @@ -25,7 +25,7 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition protected $performDeepMerging = true; protected $ignoreExtraKeys = false; protected $removeExtraKeys = true; - protected $children = array(); + protected $children = []; protected $prototype; protected $atLeastOne = false; protected $allowNewKeys = true; @@ -43,8 +43,8 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition { parent::__construct($name, $parent); - $this->nullEquivalent = array(); - $this->trueEquivalent = array(); + $this->nullEquivalent = []; + $this->trueEquivalent = []; } /** @@ -214,15 +214,15 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition * to be the key of the particular item. For example, if "id" is the * "key", then: * - * array( - * array('id' => 'my_name', 'foo' => 'bar'), - * ); + * [ + * ['id' => 'my_name', 'foo' => 'bar'], + * ]; * * becomes * - * array( - * 'my_name' => array('foo' => 'bar'), - * ); + * [ + * 'my_name' => ['foo' => 'bar'], + * ]; * * If you'd like "'id' => 'my_name'" to still be present in the resulting * array, then you can set the second argument of this method to false. @@ -275,9 +275,9 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition { $this ->addDefaultsIfNotSet() - ->treatFalseLike(array('enabled' => false)) - ->treatTrueLike(array('enabled' => true)) - ->treatNullLike(array('enabled' => true)) + ->treatFalseLike(['enabled' => false]) + ->treatTrueLike(['enabled' => true]) + ->treatNullLike(['enabled' => true]) ->beforeNormalization() ->ifArray() ->then(function ($v) { @@ -305,9 +305,9 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition { $this ->addDefaultsIfNotSet() - ->treatFalseLike(array('enabled' => false)) - ->treatTrueLike(array('enabled' => true)) - ->treatNullLike(array('enabled' => true)) + ->treatFalseLike(['enabled' => false]) + ->treatTrueLike(['enabled' => true]) + ->treatNullLike(['enabled' => true]) ->children() ->booleanNode('enabled') ->defaultTrue() @@ -332,10 +332,10 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition * Allows extra config keys to be specified under an array without * throwing an exception. * - * Those config values are simply ignored and removed from the - * resulting array. This should be used only in special cases where - * you want to send an entire configuration array through a special - * tree that processes only part of the array. + * Those config values are ignored and removed from the resulting + * array. This should be used only in special cases where you want + * to send an entire configuration array through a special tree that + * processes only part of the array. * * @param bool $remove Whether to remove the extra keys * diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php index 7ba19515..05949d2b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php @@ -144,7 +144,7 @@ class ExprBuilder public function castToArray() { $this->ifPart = function ($v) { return !\is_array($v); }; - $this->thenPart = function ($v) { return array($v); }; + $this->thenPart = function ($v) { return [$v]; }; return $this; } @@ -168,7 +168,7 @@ class ExprBuilder */ public function thenEmptyArray() { - $this->thenPart = function ($v) { return array(); }; + $this->thenPart = function ($v) { return []; }; return $this; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php index 95863d68..63c0d696 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php @@ -23,7 +23,7 @@ class NodeBuilder implements NodeParentInterface public function __construct() { - $this->nodeMapping = array( + $this->nodeMapping = [ 'variable' => __NAMESPACE__.'\\VariableNodeDefinition', 'scalar' => __NAMESPACE__.'\\ScalarNodeDefinition', 'boolean' => __NAMESPACE__.'\\BooleanNodeDefinition', @@ -31,7 +31,7 @@ class NodeBuilder implements NodeParentInterface 'float' => __NAMESPACE__.'\\FloatNodeDefinition', 'array' => __NAMESPACE__.'\\ArrayNodeDefinition', 'enum' => __NAMESPACE__.'\\EnumNodeDefinition', - ); + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php index 3a4d2cdf..cc245d74 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php @@ -34,7 +34,7 @@ abstract class NodeDefinition implements NodeParentInterface protected $trueEquivalent = true; protected $falseEquivalent = false; protected $parent; - protected $attributes = array(); + protected $attributes = []; /** * @param string|null $name The name of the node diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php index 35e30487..d3cdca90 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php @@ -19,8 +19,8 @@ namespace Symfony\Component\Config\Definition\Builder; class NormalizationBuilder { protected $node; - public $before = array(); - public $remappings = array(); + public $before = []; + public $remappings = []; public function __construct(NodeDefinition $node) { @@ -37,7 +37,7 @@ class NormalizationBuilder */ public function remap($key, $plural = null) { - $this->remappings[] = array($key, null === $plural ? $key.'s' : $plural); + $this->remappings[] = [$key, null === $plural ? $key.'s' : $plural]; return $this; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ValidationBuilder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ValidationBuilder.php index bb2b9eb3..4efc726c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ValidationBuilder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ValidationBuilder.php @@ -19,7 +19,7 @@ namespace Symfony\Component\Config\Definition\Builder; class ValidationBuilder { protected $node; - public $rules = array(); + public $rules = []; public function __construct(NodeDefinition $node) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php index 881457c9..da05530a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php @@ -65,10 +65,10 @@ class XmlReferenceDumper } $rootName = str_replace('_', '-', $rootName); - $rootAttributes = array(); - $rootAttributeComments = array(); - $rootChildren = array(); - $rootComments = array(); + $rootAttributes = []; + $rootAttributeComments = []; + $rootChildren = []; + $rootComments = []; if ($node instanceof ArrayNode) { $children = $node->getChildren(); @@ -98,7 +98,7 @@ class XmlReferenceDumper if ($prototype instanceof PrototypedArrayNode) { $prototype->setName($key); - $children = array($key => $prototype); + $children = [$key => $prototype]; } elseif ($prototype instanceof ArrayNode) { $children = $prototype->getChildren(); } else { @@ -140,7 +140,7 @@ class XmlReferenceDumper $value = '%%%%not_defined%%%%'; // use a string which isn't used in the normal world // comments - $comments = array(); + $comments = []; if ($info = $child->getInfo()) { $comments[] = $info; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php index fc5d20a2..7aa97909 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php @@ -77,7 +77,7 @@ class YamlReferenceDumper */ private function writeNode(NodeInterface $node, NodeInterface $parentNode = null, $depth = 0, $prototypedArray = false) { - $comments = array(); + $comments = []; $default = ''; $defaultArray = null; $children = null; @@ -251,6 +251,6 @@ class YamlReferenceDumper } $keyNode->setInfo($info); - return array($key => $keyNode); + return [$key => $keyNode]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/EnumNode.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/EnumNode.php index a214a854..15c8db3e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/EnumNode.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/EnumNode.php @@ -22,7 +22,7 @@ class EnumNode extends ScalarNode { private $values; - public function __construct($name, NodeInterface $parent = null, array $values = array()) + public function __construct($name, NodeInterface $parent = null, array $values = []) { $values = array_unique($values); if (empty($values)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Processor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Processor.php index 3e0feab8..0a935eeb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Processor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Processor.php @@ -28,7 +28,7 @@ class Processor */ public function process(NodeInterface $configTree, array $configs) { - $currentConfig = array(); + $currentConfig = []; foreach ($configs as $config) { $config = $configTree->normalize($config); $currentConfig = $configTree->merge($currentConfig, $config); @@ -86,12 +86,12 @@ class Processor if (isset($config[$key])) { if (\is_string($config[$key]) || !\is_int(key($config[$key]))) { // only one - return array($config[$key]); + return [$config[$key]]; } return $config[$key]; } - return array(); + return []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php index eddcb32a..9a14449c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php @@ -27,12 +27,12 @@ class PrototypedArrayNode extends ArrayNode protected $keyAttribute; protected $removeKeyAttribute = false; protected $minNumberOfElements = 0; - protected $defaultValue = array(); + protected $defaultValue = []; protected $defaultChildren; /** * @var NodeInterface[] An array of the prototypes of the simplified value children */ - private $valuePrototypes = array(); + private $valuePrototypes = []; /** * Sets the minimum number of elements that a prototype based node must @@ -53,15 +53,15 @@ class PrototypedArrayNode extends ArrayNode * to be the key of the particular item. For example, if "id" is the * "key", then: * - * array( - * array('id' => 'my_name', 'foo' => 'bar'), - * ); + * [ + * ['id' => 'my_name', 'foo' => 'bar'], + * ]; * * becomes * - * array( - * 'my_name' => array('foo' => 'bar'), - * ); + * [ + * 'my_name' => ['foo' => 'bar'], + * ]; * * If you'd like "'id' => 'my_name'" to still be present in the resulting * array, then you can set the second argument of this method to false. @@ -114,10 +114,10 @@ class PrototypedArrayNode extends ArrayNode * * @param int|string|array|null $children The number of children|The child name|The children names to be added */ - public function setAddChildrenIfNoneSet($children = array('defaults')) + public function setAddChildrenIfNoneSet($children = ['defaults']) { if (null === $children) { - $this->defaultChildren = array('defaults'); + $this->defaultChildren = ['defaults']; } else { $this->defaultChildren = \is_int($children) && $children > 0 ? range(1, $children) : (array) $children; } @@ -132,8 +132,8 @@ class PrototypedArrayNode extends ArrayNode public function getDefaultValue() { if (null !== $this->defaultChildren) { - $default = $this->prototype->hasDefaultValue() ? $this->prototype->getDefaultValue() : array(); - $defaults = array(); + $default = $this->prototype->hasDefaultValue() ? $this->prototype->getDefaultValue() : []; + $defaults = []; foreach (array_values($this->defaultChildren) as $i => $name) { $defaults[null === $this->keyAttribute ? $i : $name] = $default; } @@ -226,7 +226,7 @@ class PrototypedArrayNode extends ArrayNode $value = $this->remapXml($value); $isAssoc = array_keys($value) !== range(0, \count($value) - 1); - $normalized = array(); + $normalized = []; foreach ($value as $k => $v) { if (null !== $this->keyAttribute && \is_array($v)) { if (!isset($v[$this->keyAttribute]) && \is_int($k) && !$isAssoc) { @@ -243,9 +243,9 @@ class PrototypedArrayNode extends ArrayNode } // if only "value" is left - if (array_keys($v) === array('value')) { + if (array_keys($v) === ['value']) { $v = $v['value']; - if ($this->prototype instanceof ArrayNode && ($children = $this->prototype->getChildren()) && array_key_exists('value', $children)) { + if ($this->prototype instanceof ArrayNode && ($children = $this->prototype->getChildren()) && \array_key_exists('value', $children)) { $valuePrototype = current($this->valuePrototypes) ?: clone $children['value']; $valuePrototype->parent = $this; $originalClosures = $this->prototype->normalizationClosures; @@ -258,7 +258,7 @@ class PrototypedArrayNode extends ArrayNode } } - if (array_key_exists($k, $normalized)) { + if (\array_key_exists($k, $normalized)) { $ex = new DuplicateKeyException(sprintf('Duplicate key "%s" for path "%s".', $k, $this->getPath())); $ex->setPath($this->getPath()); @@ -301,14 +301,14 @@ class PrototypedArrayNode extends ArrayNode } foreach ($rightSide as $k => $v) { - // prototype, and key is irrelevant, so simply append the element + // prototype, and key is irrelevant, append the element if (null === $this->keyAttribute) { $leftSide[] = $v; continue; } // no conflict - if (!array_key_exists($k, $leftSide)) { + if (!\array_key_exists($k, $leftSide)) { if (!$this->allowNewKeys) { $ex = new InvalidConfigurationException(sprintf('You are not allowed to define new elements for path "%s". Please define all elements for this path in one config file.', $this->getPath())); $ex->setPath($this->getPath()); @@ -335,30 +335,30 @@ class PrototypedArrayNode extends ArrayNode * * For example, assume $this->keyAttribute is 'name' and the value array is as follows: * - * array( - * array( + * [ + * [ * 'name' => 'name001', * 'value' => 'value001' - * ) - * ) + * ] + * ] * * Now, the key is 0 and the child node is: * - * array( + * [ * 'name' => 'name001', * 'value' => 'value001' - * ) + * ] * * When normalizing the value array, the 'name' element will removed from the child node * and its value becomes the new key of the child node: * - * array( - * 'name001' => array('value' => 'value001') - * ) + * [ + * 'name001' => ['value' => 'value001'] + * ] * * Now only 'value' element is left in the child node which can be further simplified into a string: * - * array('name001' => 'value001') + * ['name001' => 'value001'] * * Now, the key becomes 'name001' and the child node becomes 'value001' and * the prototype of child node 'name001' should be a ScalarNode instead of an ArrayNode instance. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Exception/FileLoaderLoadException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Exception/FileLoaderLoadException.php index e74bd673..82d90eb3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Exception/FileLoaderLoadException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Exception/FileLoaderLoadException.php @@ -80,7 +80,7 @@ class FileLoaderLoadException extends \Exception } if (\is_array($var)) { - $a = array(); + $a = []; foreach ($var as $k => $v) { $a[] = sprintf('%s => %s', $k, $this->varToString($v)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Exception/FileLocatorFileNotFoundException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Exception/FileLocatorFileNotFoundException.php index af764eb4..648cf0e7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Exception/FileLocatorFileNotFoundException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Exception/FileLocatorFileNotFoundException.php @@ -20,7 +20,7 @@ class FileLocatorFileNotFoundException extends \InvalidArgumentException { private $paths; - public function __construct($message = '', $code = 0, $previous = null, array $paths = array()) + public function __construct($message = '', $code = 0, $previous = null, array $paths = []) { parent::__construct($message, $code, $previous); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/FileLocator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/FileLocator.php index 2c9cea04..1314cc34 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/FileLocator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/FileLocator.php @@ -25,7 +25,7 @@ class FileLocator implements FileLocatorInterface /** * @param string|array $paths A path or an array of paths where to look for resources */ - public function __construct($paths = array()) + public function __construct($paths = []) { $this->paths = (array) $paths; } @@ -41,7 +41,7 @@ class FileLocator implements FileLocatorInterface if ($this->isAbsolutePath($name)) { if (!file_exists($name)) { - throw new FileLocatorFileNotFoundException(sprintf('The file "%s" does not exist.', $name), 0, null, array($name)); + throw new FileLocatorFileNotFoundException(sprintf('The file "%s" does not exist.', $name), 0, null, [$name]); } return $name; @@ -54,7 +54,7 @@ class FileLocator implements FileLocatorInterface } $paths = array_unique($paths); - $filepaths = $notfound = array(); + $filepaths = $notfound = []; foreach ($paths as $path) { if (@file_exists($file = $path.\DIRECTORY_SEPARATOR.$name)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/FileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/FileLoader.php index 016ac412..abaf1767 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/FileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/FileLoader.php @@ -25,7 +25,7 @@ use Symfony\Component\Config\Resource\GlobResource; */ abstract class FileLoader extends Loader { - protected static $loading = array(); + protected static $loading = []; protected $locator; @@ -73,7 +73,7 @@ abstract class FileLoader extends Loader public function import($resource, $type = null, $ignoreErrors = false, $sourceResource = null) { if (\is_string($resource) && \strlen($resource) !== $i = strcspn($resource, '*?{[')) { - $ret = array(); + $ret = []; $isSubpath = 0 !== $i && false !== strpos(substr($resource, 0, $i), '/'); foreach ($this->glob($resource, false, $_, $ignoreErrors || !$isSubpath) as $path => $info) { if (null !== $res = $this->doImport($path, $type, $ignoreErrors, $sourceResource)) { @@ -113,7 +113,7 @@ abstract class FileLoader extends Loader throw $e; } - $resource = array(); + $resource = []; foreach ($e->getPaths() as $path) { $resource[] = new FileExistenceResource($path); } @@ -136,7 +136,7 @@ abstract class FileLoader extends Loader $resource = $loader->getLocator()->locate($resource, $this->currentDir, false); } - $resources = \is_array($resource) ? $resource : array($resource); + $resources = \is_array($resource) ? $resource : [$resource]; for ($i = 0; $i < $resourcesCount = \count($resources); ++$i) { if (isset(self::$loading[$resources[$i]])) { if ($i == $resourcesCount - 1) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/LoaderResolver.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/LoaderResolver.php index 9299bc00..c99efda4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/LoaderResolver.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/LoaderResolver.php @@ -24,12 +24,12 @@ class LoaderResolver implements LoaderResolverInterface /** * @var LoaderInterface[] An array of LoaderInterface objects */ - private $loaders = array(); + private $loaders = []; /** * @param LoaderInterface[] $loaders An array of loaders */ - public function __construct(array $loaders = array()) + public function __construct(array $loaders = []) { foreach ($loaders as $loader) { $this->addLoader($loader); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ClassExistenceResource.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ClassExistenceResource.php index 9a1d7ba5..5554f4c6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ClassExistenceResource.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ClassExistenceResource.php @@ -26,7 +26,7 @@ class ClassExistenceResource implements SelfCheckingResourceInterface, \Serializ private static $autoloadLevel = 0; private static $autoloadedClass; - private static $existsCache = array(); + private static $existsCache = []; /** * @param string $resource The fully-qualified class name @@ -97,7 +97,7 @@ class ClassExistenceResource implements SelfCheckingResourceInterface, \Serializ } /** - * {@inheritdoc} + * @internal */ public function serialize() { @@ -105,11 +105,11 @@ class ClassExistenceResource implements SelfCheckingResourceInterface, \Serializ $this->isFresh(0); } - return serialize(array($this->resource, $this->exists)); + return serialize([$this->resource, $this->exists]); } /** - * {@inheritdoc} + * @internal */ public function unserialize($serialized) { @@ -118,18 +118,20 @@ class ClassExistenceResource implements SelfCheckingResourceInterface, \Serializ /** * @throws \ReflectionException When $class is not found and is required + * + * @internal */ - private static function throwOnRequiredClass($class) + public static function throwOnRequiredClass($class) { if (self::$autoloadedClass === $class) { return; } $e = new \ReflectionException("Class $class not found"); $trace = $e->getTrace(); - $autoloadFrame = array( + $autoloadFrame = [ 'function' => 'spl_autoload_call', - 'args' => array($class), - ); + 'args' => [$class], + ]; $i = 1 + array_search($autoloadFrame, $trace, true); if (isset($trace[$i]['function']) && !isset($trace[$i]['class'])) { @@ -151,11 +153,11 @@ class ClassExistenceResource implements SelfCheckingResourceInterface, \Serializ return; } - $props = array( + $props = [ 'file' => $trace[$i]['file'], 'line' => $trace[$i]['line'], 'trace' => \array_slice($trace, 1 + $i), - ); + ]; foreach ($props as $p => $v) { $r = new \ReflectionProperty('Exception', $p); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ComposerResource.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ComposerResource.php index 9c170c07..c826d1bb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ComposerResource.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ComposerResource.php @@ -51,11 +51,17 @@ class ComposerResource implements SelfCheckingResourceInterface, \Serializable return self::$runtimeVendors === $this->vendors; } + /** + * @internal + */ public function serialize() { return serialize($this->vendors); } + /** + * @internal + */ public function unserialize($serialized) { $this->vendors = unserialize($serialized); @@ -63,7 +69,7 @@ class ComposerResource implements SelfCheckingResourceInterface, \Serializable private static function refresh() { - self::$runtimeVendors = array(); + self::$runtimeVendors = []; foreach (get_declared_classes() as $class) { if ('C' === $class[0] && 0 === strpos($class, 'ComposerAutoloaderInit')) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/DirectoryResource.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/DirectoryResource.php index b1786397..e79b19ec 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/DirectoryResource.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/DirectoryResource.php @@ -42,7 +42,7 @@ class DirectoryResource implements SelfCheckingResourceInterface, \Serializable */ public function __toString() { - return md5(serialize(array($this->resource, $this->pattern))); + return md5(serialize([$this->resource, $this->pattern])); } /** @@ -104,11 +104,17 @@ class DirectoryResource implements SelfCheckingResourceInterface, \Serializable return true; } + /** + * @internal + */ public function serialize() { - return serialize(array($this->resource, $this->pattern)); + return serialize([$this->resource, $this->pattern]); } + /** + * @internal + */ public function unserialize($serialized) { list($this->resource, $this->pattern) = unserialize($serialized); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/FileExistenceResource.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/FileExistenceResource.php index 6396ddd5..34047651 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/FileExistenceResource.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/FileExistenceResource.php @@ -59,15 +59,15 @@ class FileExistenceResource implements SelfCheckingResourceInterface, \Serializa } /** - * {@inheritdoc} + * @internal */ public function serialize() { - return serialize(array($this->resource, $this->exists)); + return serialize([$this->resource, $this->exists]); } /** - * {@inheritdoc} + * @internal */ public function unserialize($serialized) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/FileResource.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/FileResource.php index 1d373a62..bee06237 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/FileResource.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/FileResource.php @@ -63,11 +63,17 @@ class FileResource implements SelfCheckingResourceInterface, \Serializable return false !== ($filemtime = @filemtime($this->resource)) && $filemtime <= $timestamp; } + /** + * @internal + */ public function serialize() { return serialize($this->resource); } + /** + * @internal + */ public function unserialize($serialized) { $this->resource = unserialize($serialized); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/GlobResource.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/GlobResource.php index e3c3be12..28ba0a61 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/GlobResource.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/GlobResource.php @@ -73,15 +73,21 @@ class GlobResource implements \IteratorAggregate, SelfCheckingResourceInterface, return $this->hash === $hash; } + /** + * @internal + */ public function serialize() { if (null === $this->hash) { $this->hash = $this->computeHash(); } - return serialize(array($this->prefix, $this->pattern, $this->recursive, $this->hash)); + return serialize([$this->prefix, $this->pattern, $this->recursive, $this->hash]); } + /** + * @internal + */ public function unserialize($serialized) { list($this->prefix, $this->pattern, $this->recursive, $this->hash) = unserialize($serialized); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ReflectionClassResource.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ReflectionClassResource.php index 65156a06..a86a37ed 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ReflectionClassResource.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ReflectionClassResource.php @@ -19,13 +19,13 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; */ class ReflectionClassResource implements SelfCheckingResourceInterface, \Serializable { - private $files = array(); + private $files = []; private $className; private $classReflector; - private $excludedVendors = array(); + private $excludedVendors = []; private $hash; - public function __construct(\ReflectionClass $classReflector, $excludedVendors = array()) + public function __construct(\ReflectionClass $classReflector, $excludedVendors = []) { $this->className = $classReflector->name; $this->classReflector = $classReflector; @@ -57,6 +57,9 @@ class ReflectionClassResource implements SelfCheckingResourceInterface, \Seriali return 'reflection.'.$this->className; } + /** + * @internal + */ public function serialize() { if (null === $this->hash) { @@ -64,9 +67,12 @@ class ReflectionClassResource implements SelfCheckingResourceInterface, \Seriali $this->loadFiles($this->classReflector); } - return serialize(array($this->files, $this->className, $this->hash)); + return serialize([$this->files, $this->className, $this->hash]); } + /** + * @internal + */ public function unserialize($serialized) { list($this->files, $this->className, $this->hash) = unserialize($serialized); @@ -147,7 +153,7 @@ class ReflectionClassResource implements SelfCheckingResourceInterface, \Seriali foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED) as $m) { yield preg_replace('/^ @@.*/m', '', $m); - $defaults = array(); + $defaults = []; foreach ($m->getParameters() as $p) { $defaults[$p->name] = $p->isDefaultValueAvailable() ? $p->getDefaultValue() : null; } @@ -161,12 +167,12 @@ class ReflectionClassResource implements SelfCheckingResourceInterface, \Seriali if (interface_exists(EventSubscriberInterface::class, false) && $class->isSubclassOf(EventSubscriberInterface::class)) { yield EventSubscriberInterface::class; - yield print_r(\call_user_func(array($class->name, 'getSubscribedEvents')), true); + yield print_r(\call_user_func([$class->name, 'getSubscribedEvents']), true); } if (interface_exists(ServiceSubscriberInterface::class, false) && $class->isSubclassOf(ServiceSubscriberInterface::class)) { yield ServiceSubscriberInterface::class; - yield print_r(\call_user_func(array($class->name, 'getSubscribedServices')), true); + yield print_r(\call_user_func([$class->name, 'getSubscribedServices']), true); } } } @@ -178,10 +184,10 @@ class ReflectionMethodHhvmWrapper extends \ReflectionMethod { public function getParameters() { - $params = array(); + $params = []; foreach (parent::getParameters() as $i => $p) { - $params[] = new ReflectionParameterHhvmWrapper(array($this->class, $this->name), $i); + $params[] = new ReflectionParameterHhvmWrapper([$this->class, $this->name], $i); } return $params; @@ -195,6 +201,6 @@ class ReflectionParameterHhvmWrapper extends \ReflectionParameter { public function getDefaultValue() { - return array($this->isVariadic(), $this->isDefaultValueAvailable() ? parent::getDefaultValue() : null); + return [$this->isVariadic(), $this->isDefaultValueAvailable() ? parent::getDefaultValue() : null]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCache.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCache.php index 91feed62..092b95bf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCache.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCache.php @@ -37,7 +37,7 @@ class ResourceCheckerConfigCache implements ConfigCacheInterface * @param string $file The absolute cache path * @param iterable|ResourceCheckerInterface[] $resourceCheckers The ResourceCheckers to use for the freshness check */ - public function __construct($file, $resourceCheckers = array()) + public function __construct($file, $resourceCheckers = []) { $this->file = $file; $this->resourceCheckers = $resourceCheckers; @@ -156,10 +156,11 @@ class ResourceCheckerConfigCache implements ConfigCacheInterface { $e = null; $meta = false; + $content = file_get_contents($file); $signalingException = new \UnexpectedValueException(); $prevUnserializeHandler = ini_set('unserialize_callback_func', ''); - $prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = array()) use (&$prevErrorHandler, $signalingException) { - if (E_WARNING === $type && 'Class __PHP_Incomplete_Class has no unserializer' === $msg) { + $prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler, $signalingException) { + if (__FILE__ === $file) { throw $signalingException; } @@ -167,7 +168,7 @@ class ResourceCheckerConfigCache implements ConfigCacheInterface }); try { - $meta = unserialize(file_get_contents($file)); + $meta = unserialize($content); } catch (\Error $e) { } catch (\Exception $e) { } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCacheFactory.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCacheFactory.php index 2e27eab7..c00fa7db 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCacheFactory.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCacheFactory.php @@ -19,12 +19,12 @@ namespace Symfony\Component\Config; */ class ResourceCheckerConfigCacheFactory implements ConfigCacheFactoryInterface { - private $resourceCheckers = array(); + private $resourceCheckers = []; /** * @param iterable|ResourceCheckerInterface[] $resourceCheckers */ - public function __construct($resourceCheckers = array()) + public function __construct($resourceCheckers = []) { $this->resourceCheckers = $resourceCheckers; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/ConfigCacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/ConfigCacheTest.php index bf8131d5..d0b70899 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/ConfigCacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/ConfigCacheTest.php @@ -26,7 +26,7 @@ class ConfigCacheTest extends TestCase protected function tearDown() { - $files = array($this->cacheFile, $this->cacheFile.'.meta'); + $files = [$this->cacheFile, $this->cacheFile.'.meta']; foreach ($files as $file) { if (file_exists($file)) { @@ -52,7 +52,7 @@ class ConfigCacheTest extends TestCase $staleResource->setFresh(false); $cache = new ConfigCache($this->cacheFile, false); - $cache->write('', array($staleResource)); + $cache->write('', [$staleResource]); $this->assertTrue($cache->isFresh()); } @@ -63,7 +63,7 @@ class ConfigCacheTest extends TestCase public function testIsFreshWhenNoResourceProvided($debug) { $cache = new ConfigCache($this->cacheFile, $debug); - $cache->write('', array()); + $cache->write('', []); $this->assertTrue($cache->isFresh()); } @@ -73,7 +73,7 @@ class ConfigCacheTest extends TestCase $freshResource->setFresh(true); $cache = new ConfigCache($this->cacheFile, true); - $cache->write('', array($freshResource)); + $cache->write('', [$freshResource]); $this->assertTrue($cache->isFresh()); } @@ -84,16 +84,16 @@ class ConfigCacheTest extends TestCase $staleResource->setFresh(false); $cache = new ConfigCache($this->cacheFile, true); - $cache->write('', array($staleResource)); + $cache->write('', [$staleResource]); $this->assertFalse($cache->isFresh()); } public function debugModes() { - return array( - array(true), - array(false), - ); + return [ + [true], + [false], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php index 089cb566..8f84cff3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php @@ -34,19 +34,19 @@ class ArrayNodeTest extends TestCase public function testExceptionThrownOnUnrecognizedChild() { $node = new ArrayNode('root'); - $node->normalize(array('foo' => 'bar')); + $node->normalize(['foo' => 'bar']); } public function ignoreAndRemoveMatrixProvider() { $unrecognizedOptionException = new InvalidConfigurationException('Unrecognized option "foo" under "root"'); - return array( - array(true, true, array(), 'no exception is thrown for an unrecognized child if the ignoreExtraKeys option is set to true'), - array(true, false, array('foo' => 'bar'), 'extra keys are not removed when ignoreExtraKeys second option is set to false'), - array(false, true, $unrecognizedOptionException), - array(false, false, $unrecognizedOptionException), - ); + return [ + [true, true, [], 'no exception is thrown for an unrecognized child if the ignoreExtraKeys option is set to true'], + [true, false, ['foo' => 'bar'], 'extra keys are not removed when ignoreExtraKeys second option is set to false'], + [false, true, $unrecognizedOptionException], + [false, false, $unrecognizedOptionException], + ]; } /** @@ -64,7 +64,7 @@ class ArrayNodeTest extends TestCase } $node = new ArrayNode('root'); $node->setIgnoreExtraKeys($ignore, $remove); - $result = $node->normalize(array('foo' => 'bar')); + $result = $node->normalize(['foo' => 'bar']); $this->assertSame($expected, $result, $message); } @@ -83,24 +83,24 @@ class ArrayNodeTest extends TestCase public function getPreNormalizationTests() { - return array( - array( - array('foo-bar' => 'foo'), - array('foo_bar' => 'foo'), - ), - array( - array('foo-bar_moo' => 'foo'), - array('foo-bar_moo' => 'foo'), - ), - array( - array('anything-with-dash-and-no-underscore' => 'first', 'no_dash' => 'second'), - array('anything_with_dash_and_no_underscore' => 'first', 'no_dash' => 'second'), - ), - array( - array('foo-bar' => null, 'foo_bar' => 'foo'), - array('foo-bar' => null, 'foo_bar' => 'foo'), - ), - ); + return [ + [ + ['foo-bar' => 'foo'], + ['foo_bar' => 'foo'], + ], + [ + ['foo-bar_moo' => 'foo'], + ['foo-bar_moo' => 'foo'], + ], + [ + ['anything-with-dash-and-no-underscore' => 'first', 'no_dash' => 'second'], + ['anything_with_dash_and_no_underscore' => 'first', 'no_dash' => 'second'], + ], + [ + ['foo-bar' => null, 'foo_bar' => 'foo'], + ['foo-bar' => null, 'foo_bar' => 'foo'], + ], + ]; } /** @@ -125,30 +125,30 @@ class ArrayNodeTest extends TestCase public function getZeroNamedNodeExamplesData() { - return array( - array( - array( - 0 => array( + return [ + [ + [ + 0 => [ 'name' => 'something', - ), - 5 => array( + ], + 5 => [ 0 => 'this won\'t work too', 'new_key' => 'some other value', - ), + ], 'string_key' => 'just value', - ), - array( - 0 => array( + ], + [ + 0 => [ 'name' => 'something', - ), - 5 => array( + ], + 5 => [ 0 => 'this won\'t work too', 'new_key' => 'some other value', - ), + ], 'string_key' => 'just value', - ), - ), - ); + ], + ], + ]; } /** @@ -172,12 +172,12 @@ class ArrayNodeTest extends TestCase public function getPreNormalizedNormalizedOrderedData() { - return array( - array( - array('2' => 'two', '1' => 'one', '3' => 'three'), - array('2' => 'two', '1' => 'one', '3' => 'three'), - ), - ); + return [ + [ + ['2' => 'two', '1' => 'one', '3' => 'three'], + ['2' => 'two', '1' => 'one', '3' => 'three'], + ], + ]; } /** @@ -238,13 +238,13 @@ class ArrayNodeTest extends TestCase }; $prevErrorHandler = set_error_handler($deprecationHandler); - $node->finalize(array()); + $node->finalize([]); restore_error_handler(); $this->assertFalse($deprecationTriggered, '->finalize() should not trigger if the deprecated node is not set'); $prevErrorHandler = set_error_handler($deprecationHandler); - $node->finalize(array('foo' => array())); + $node->finalize(['foo' => []]); restore_error_handler(); $this->assertTrue($deprecationTriggered, '->finalize() should trigger if the deprecated node is set'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php index ab1d3164..bfa2fd3e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php @@ -40,10 +40,10 @@ class BooleanNodeTest extends TestCase public function getValidValues() { - return array( - array(false), - array(true), - ); + return [ + [false], + [true], + ]; } /** @@ -58,17 +58,17 @@ class BooleanNodeTest extends TestCase public function getInvalidValues() { - return array( - array(null), - array(''), - array('foo'), - array(0), - array(1), - array(0.0), - array(0.1), - array(array()), - array(array('foo' => 'bar')), - array(new \stdClass()), - ); + return [ + [null], + [''], + ['foo'], + [0], + [1], + [0.0], + [0.1], + [[]], + [['foo' => 'bar']], + [new \stdClass()], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php index ae3fd067..4ad7eabf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php @@ -43,19 +43,19 @@ class ArrayNodeDefinitionTest extends TestCase { $node = new ArrayNodeDefinition('root'); - \call_user_func_array(array($node, $method), $args); + \call_user_func_array([$node, $method], $args); $node->getNode(); } public function providePrototypeNodeSpecificCalls() { - return array( - array('defaultValue', array(array())), - array('addDefaultChildrenIfNoneSet', array()), - array('requiresAtLeastOneElement', array()), - array('useAttributeAsKey', array('foo')), - ); + return [ + ['defaultValue', [[]]], + ['addDefaultChildrenIfNoneSet', []], + ['requiresAtLeastOneElement', []], + ['useAttributeAsKey', ['foo']], + ]; } /** @@ -78,7 +78,7 @@ class ArrayNodeDefinitionTest extends TestCase { $node = new ArrayNodeDefinition('root'); $node - ->defaultValue(array()) + ->defaultValue([]) ->addDefaultChildrenIfNoneSet('foo') ->prototype('array') ; @@ -93,7 +93,7 @@ class ArrayNodeDefinitionTest extends TestCase ->prototype('array') ; $tree = $node->getNode(); - $this->assertEquals(array(array()), $tree->getDefaultValue()); + $this->assertEquals([[]], $tree->getDefaultValue()); } /** @@ -133,14 +133,14 @@ class ArrayNodeDefinitionTest extends TestCase public function providePrototypedArrayNodeDefaults() { - return array( - array(null, true, false, array(array())), - array(2, true, false, array(array(), array())), - array('2', false, true, array('2' => array())), - array('foo', false, true, array('foo' => array())), - array(array('foo'), false, true, array('foo' => array())), - array(array('foo', 'bar'), false, true, array('foo' => array(), 'bar' => array())), - ); + return [ + [null, true, false, [[]]], + [2, true, false, [[], []]], + ['2', false, true, ['2' => []]], + ['foo', false, true, ['foo' => []]], + [['foo'], false, true, ['foo' => []]], + [['foo', 'bar'], false, true, ['foo' => [], 'bar' => []]], + ]; } public function testNestedPrototypedArrayNodes() @@ -166,7 +166,7 @@ class ArrayNodeDefinitionTest extends TestCase ->scalarNode('foo')->defaultValue('bar')->end() ; - $this->assertEquals(array('enabled' => false, 'foo' => 'bar'), $node->getNode()->getDefaultValue()); + $this->assertEquals(['enabled' => false, 'foo' => 'bar'], $node->getNode()->getDefaultValue()); } /** @@ -195,9 +195,9 @@ class ArrayNodeDefinitionTest extends TestCase $node->canBeDisabled(); $this->assertTrue($this->getField($node, 'addDefaults')); - $this->assertEquals(array('enabled' => false), $this->getField($node, 'falseEquivalent')); - $this->assertEquals(array('enabled' => true), $this->getField($node, 'trueEquivalent')); - $this->assertEquals(array('enabled' => true), $this->getField($node, 'nullEquivalent')); + $this->assertEquals(['enabled' => false], $this->getField($node, 'falseEquivalent')); + $this->assertEquals(['enabled' => true], $this->getField($node, 'trueEquivalent')); + $this->assertEquals(['enabled' => true], $this->getField($node, 'nullEquivalent')); $nodeChildren = $this->getField($node, 'children'); $this->assertArrayHasKey('enabled', $nodeChildren); @@ -247,7 +247,7 @@ class ArrayNodeDefinitionTest extends TestCase ->end() ; - $this->assertSame(array(), $node->getNode()->normalize(array('value' => null))); + $this->assertSame([], $node->getNode()->normalize(['value' => null])); } public function testPrototypeVariable() @@ -294,14 +294,14 @@ class ArrayNodeDefinitionTest extends TestCase public function getEnableableNodeFixtures() { - return array( - array(array('enabled' => true, 'foo' => 'bar'), array(true), 'true enables an enableable node'), - array(array('enabled' => true, 'foo' => 'bar'), array(null), 'null enables an enableable node'), - array(array('enabled' => true, 'foo' => 'bar'), array(array('enabled' => true)), 'An enableable node can be enabled'), - array(array('enabled' => true, 'foo' => 'baz'), array(array('foo' => 'baz')), 'any configuration enables an enableable node'), - array(array('enabled' => false, 'foo' => 'baz'), array(array('foo' => 'baz', 'enabled' => false)), 'An enableable node can be disabled'), - array(array('enabled' => false, 'foo' => 'bar'), array(false), 'false disables an enableable node'), - ); + return [ + [['enabled' => true, 'foo' => 'bar'], [true], 'true enables an enableable node'], + [['enabled' => true, 'foo' => 'bar'], [null], 'null enables an enableable node'], + [['enabled' => true, 'foo' => 'bar'], [['enabled' => true]], 'An enableable node can be enabled'], + [['enabled' => true, 'foo' => 'baz'], [['foo' => 'baz']], 'any configuration enables an enableable node'], + [['enabled' => false, 'foo' => 'baz'], [['foo' => 'baz', 'enabled' => false]], 'An enableable node can be disabled'], + [['enabled' => false, 'foo' => 'bar'], [false], 'false disables an enableable node'], + ]; } public function testRequiresAtLeastOneElement() @@ -311,7 +311,7 @@ class ArrayNodeDefinitionTest extends TestCase ->requiresAtLeastOneElement() ->integerPrototype(); - $node->getNode()->finalize(array(1)); + $node->getNode()->finalize([1]); $this->addToAssertionCount(1); } @@ -327,7 +327,7 @@ class ArrayNodeDefinitionTest extends TestCase ->cannotBeEmpty() ->integerPrototype(); - $node->getNode()->finalize(array()); + $node->getNode()->finalize([]); } public function testSetDeprecated() @@ -353,7 +353,7 @@ class ArrayNodeDefinitionTest extends TestCase $node = new ArrayNodeDefinition('root'); $node->cannotBeEmpty(); - $node->getNode()->finalize(array()); + $node->getNode()->finalize([]); } protected function getField($object, $field) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/EnumNodeDefinitionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/EnumNodeDefinitionTest.php index 9c0aa0e1..26f8586d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/EnumNodeDefinitionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/EnumNodeDefinitionTest.php @@ -19,19 +19,19 @@ class EnumNodeDefinitionTest extends TestCase public function testWithOneValue() { $def = new EnumNodeDefinition('foo'); - $def->values(array('foo')); + $def->values(['foo']); $node = $def->getNode(); - $this->assertEquals(array('foo'), $node->getValues()); + $this->assertEquals(['foo'], $node->getValues()); } public function testWithOneDistinctValue() { $def = new EnumNodeDefinition('foo'); - $def->values(array('foo', 'foo')); + $def->values(['foo', 'foo']); $node = $def->getNode(); - $this->assertEquals(array('foo'), $node->getValues()); + $this->assertEquals(['foo'], $node->getValues()); } /** @@ -51,22 +51,22 @@ class EnumNodeDefinitionTest extends TestCase public function testWithNoValues() { $def = new EnumNodeDefinition('foo'); - $def->values(array()); + $def->values([]); } public function testGetNode() { $def = new EnumNodeDefinition('foo'); - $def->values(array('foo', 'bar')); + $def->values(['foo', 'bar']); $node = $def->getNode(); - $this->assertEquals(array('foo', 'bar'), $node->getValues()); + $this->assertEquals(['foo', 'bar'], $node->getValues()); } public function testSetDeprecated() { $def = new EnumNodeDefinition('foo'); - $def->values(array('foo', 'bar')); + $def->values(['foo', 'bar']); $def->setDeprecated('The "%path%" node is deprecated.'); $node = $def->getNode(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php index 99a10413..191bf1c0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php @@ -31,7 +31,7 @@ class ExprBuilderTest extends TestCase ->ifTrue() ->then($this->returnClosure('new_value')) ->end(); - $this->assertFinalizedValueIs('new_value', $test, array('key' => true)); + $this->assertFinalizedValueIs('new_value', $test, ['key' => true]); $test = $this->getTestBuilder() ->ifTrue(function ($v) { return true; }) @@ -58,7 +58,7 @@ class ExprBuilderTest extends TestCase ->ifString() ->then($this->returnClosure('new_value')) ->end(); - $this->assertFinalizedValueIs(45, $test, array('key' => 45)); + $this->assertFinalizedValueIs(45, $test, ['key' => 45]); } public function testIfNullExpression() @@ -67,7 +67,7 @@ class ExprBuilderTest extends TestCase ->ifNull() ->then($this->returnClosure('new_value')) ->end(); - $this->assertFinalizedValueIs('new_value', $test, array('key' => null)); + $this->assertFinalizedValueIs('new_value', $test, ['key' => null]); $test = $this->getTestBuilder() ->ifNull() @@ -82,7 +82,7 @@ class ExprBuilderTest extends TestCase ->ifEmpty() ->then($this->returnClosure('new_value')) ->end(); - $this->assertFinalizedValueIs('new_value', $test, array('key' => array())); + $this->assertFinalizedValueIs('new_value', $test, ['key' => []]); $test = $this->getTestBuilder() ->ifEmpty() @@ -97,7 +97,7 @@ class ExprBuilderTest extends TestCase ->ifArray() ->then($this->returnClosure('new_value')) ->end(); - $this->assertFinalizedValueIs('new_value', $test, array('key' => array())); + $this->assertFinalizedValueIs('new_value', $test, ['key' => []]); $test = $this->getTestBuilder() ->ifArray() @@ -109,13 +109,13 @@ class ExprBuilderTest extends TestCase public function testIfInArrayExpression() { $test = $this->getTestBuilder() - ->ifInArray(array('foo', 'bar', 'value')) + ->ifInArray(['foo', 'bar', 'value']) ->then($this->returnClosure('new_value')) ->end(); $this->assertFinalizedValueIs('new_value', $test); $test = $this->getTestBuilder() - ->ifInArray(array('foo', 'bar')) + ->ifInArray(['foo', 'bar']) ->then($this->returnClosure('new_value')) ->end(); $this->assertFinalizedValueIs('value', $test); @@ -124,13 +124,13 @@ class ExprBuilderTest extends TestCase public function testIfNotInArrayExpression() { $test = $this->getTestBuilder() - ->ifNotInArray(array('foo', 'bar')) + ->ifNotInArray(['foo', 'bar']) ->then($this->returnClosure('new_value')) ->end(); $this->assertFinalizedValueIs('new_value', $test); $test = $this->getTestBuilder() - ->ifNotInArray(array('foo', 'bar', 'value_from_config')) + ->ifNotInArray(['foo', 'bar', 'value_from_config']) ->then($this->returnClosure('new_value')) ->end(); $this->assertFinalizedValueIs('new_value', $test); @@ -142,7 +142,7 @@ class ExprBuilderTest extends TestCase ->ifString() ->thenEmptyArray() ->end(); - $this->assertFinalizedValueIs(array(), $test); + $this->assertFinalizedValueIs([], $test); } /** @@ -153,15 +153,15 @@ class ExprBuilderTest extends TestCase $test = $this->getTestBuilder() ->castToArray() ->end(); - $this->assertFinalizedValueIs($expectedValue, $test, array('key' => $configValue)); + $this->assertFinalizedValueIs($expectedValue, $test, ['key' => $configValue]); } public function castToArrayValues() { - yield array('value', array('value')); - yield array(-3.14, array(-3.14)); - yield array(null, array(null)); - yield array(array('value'), array('value')); + yield ['value', ['value']]; + yield [-3.14, [-3.14]]; + yield [null, [null]]; + yield [['value'], ['value']]; } /** @@ -182,7 +182,7 @@ class ExprBuilderTest extends TestCase ->ifString() ->thenUnset() ->end(); - $this->assertEquals(array(), $this->finalizeTestBuilder($test)); + $this->assertEquals([], $this->finalizeTestBuilder($test)); } /** @@ -227,7 +227,7 @@ class ExprBuilderTest extends TestCase * * @param TreeBuilder $testBuilder The tree builder to finalize * @param array $config The config you want to use for the finalization, if nothing provided - * a simple array('key'=>'value') will be used + * a simple ['key'=>'value'] will be used * * @return array The finalized config values */ @@ -238,7 +238,7 @@ class ExprBuilderTest extends TestCase ->end() ->end() ->buildTree() - ->finalize(null === $config ? array('key' => 'value') : $config) + ->finalize(null === $config ? ['key' => 'value'] : $config) ; } @@ -265,6 +265,6 @@ class ExprBuilderTest extends TestCase */ protected function assertFinalizedValueIs($value, $treeBuilder, $config = null) { - $this->assertEquals(array('key' => $value), $this->finalizeTestBuilder($treeBuilder, $config)); + $this->assertEquals(['key' => $value], $this->finalizeTestBuilder($treeBuilder, $config)); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/TreeBuilderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/TreeBuilderTest.php index c425f0ed..d94912b7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/TreeBuilderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/TreeBuilderTest.php @@ -119,7 +119,7 @@ class TreeBuilderTest extends TestCase $builder = new TreeBuilder(); $builder->root('test') - ->example(array('key' => 'value')) + ->example(['key' => 'value']) ->children() ->node('child', 'variable')->info('child info')->defaultValue('default')->example('example') ->end() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php index bf4db95f..3cb9121b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php @@ -28,12 +28,12 @@ class YamlReferenceDumperTest extends TestCase public function provideDumpAtPath() { - return array( - 'Regular node' => array('scalar_true', << ['scalar_true', << array('array', << ['array', << array('array.child2', << ['array.child2', << array('cms_pages.page', << ['cms_pages.page', << array('cms_pages.page.locale', << ['cms_pages.page.locale', <<assertSame('foo', $node->finalize('foo')); } @@ -28,18 +28,18 @@ class EnumNodeTest extends TestCase */ public function testConstructionWithNoValues() { - new EnumNode('foo', null, array()); + new EnumNode('foo', null, []); } public function testConstructionWithOneValue() { - $node = new EnumNode('foo', null, array('foo')); + $node = new EnumNode('foo', null, ['foo']); $this->assertSame('foo', $node->finalize('foo')); } public function testConstructionWithOneDistinctValue() { - $node = new EnumNode('foo', null, array('foo', 'foo')); + $node = new EnumNode('foo', null, ['foo', 'foo']); $this->assertSame('foo', $node->finalize('foo')); } @@ -49,7 +49,7 @@ class EnumNodeTest extends TestCase */ public function testFinalizeWithInvalidValue() { - $node = new EnumNode('foo', null, array('foo', 'bar')); + $node = new EnumNode('foo', null, ['foo', 'bar']); $node->finalize('foobar'); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/FinalizationTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/FinalizationTest.php index d19fbd69..be68a27c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/FinalizationTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/FinalizationTest.php @@ -42,27 +42,27 @@ class FinalizationTest extends TestCase ->buildTree() ; - $a = array( - 'level1' => array( - 'level2' => array( + $a = [ + 'level1' => [ + 'level2' => [ 'somevalue' => 'foo', 'anothervalue' => 'bar', - ), + ], 'level1_scalar' => 'foo', - ), - ); + ], + ]; - $b = array( - 'level1' => array( + $b = [ + 'level1' => [ 'level2' => false, - ), - ); + ], + ]; - $this->assertEquals(array( - 'level1' => array( + $this->assertEquals([ + 'level1' => [ 'level1_scalar' => 'foo', - ), - ), $this->process($tree, array($a, $b))); + ], + ], $this->process($tree, [$a, $b])); } protected function process(NodeInterface $tree, array $configs) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/FloatNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/FloatNodeTest.php index b7ec12fa..8268fe83 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/FloatNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/FloatNodeTest.php @@ -40,16 +40,16 @@ class FloatNodeTest extends TestCase public function getValidValues() { - return array( - array(1798.0), - array(-678.987), - array(12.56E45), - array(0.0), + return [ + [1798.0], + [-678.987], + [12.56E45], + [0.0], // Integer are accepted too, they will be cast - array(17), - array(-10), - array(0), - ); + [17], + [-10], + [0], + ]; } /** @@ -64,15 +64,15 @@ class FloatNodeTest extends TestCase public function getInvalidValues() { - return array( - array(null), - array(''), - array('foo'), - array(true), - array(false), - array(array()), - array(array('foo' => 'bar')), - array(new \stdClass()), - ); + return [ + [null], + [''], + ['foo'], + [true], + [false], + [[]], + [['foo' => 'bar']], + [new \stdClass()], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php index 55e8a137..b4c17e1c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php @@ -40,11 +40,11 @@ class IntegerNodeTest extends TestCase public function getValidValues() { - return array( - array(1798), - array(-678), - array(0), - ); + return [ + [1798], + [-678], + [0], + ]; } /** @@ -59,17 +59,17 @@ class IntegerNodeTest extends TestCase public function getInvalidValues() { - return array( - array(null), - array(''), - array('foo'), - array(true), - array(false), - array(0.0), - array(0.1), - array(array()), - array(array('foo' => 'bar')), - array(new \stdClass()), - ); + return [ + [null], + [''], + ['foo'], + [true], + [false], + [0.0], + [0.1], + [[]], + [['foo' => 'bar']], + [new \stdClass()], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/MergeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/MergeTest.php index e539e25f..5d37e137 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/MergeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/MergeTest.php @@ -33,13 +33,13 @@ class MergeTest extends TestCase ->buildTree() ; - $a = array( + $a = [ 'foo' => 'bar', - ); + ]; - $b = array( + $b = [ 'foo' => 'moo', - ); + ]; $tree->merge($a, $b); } @@ -68,28 +68,28 @@ class MergeTest extends TestCase ->buildTree() ; - $a = array( + $a = [ 'foo' => 'bar', - 'unsettable' => array( + 'unsettable' => [ 'foo' => 'a', 'bar' => 'b', - ), + ], 'unsetted' => false, - ); + ]; - $b = array( + $b = [ 'foo' => 'moo', 'bar' => 'b', 'unsettable' => false, - 'unsetted' => array('a', 'b'), - ); + 'unsetted' => ['a', 'b'], + ]; - $this->assertEquals(array( + $this->assertEquals([ 'foo' => 'moo', 'bar' => 'b', 'unsettable' => false, - 'unsetted' => array('a', 'b'), - ), $tree->merge($a, $b)); + 'unsetted' => ['a', 'b'], + ], $tree->merge($a, $b)); } /** @@ -114,17 +114,17 @@ class MergeTest extends TestCase ->end() ->buildTree(); - $a = array( - 'test' => array( - 'a' => array('value' => 'foo'), - ), - ); + $a = [ + 'test' => [ + 'a' => ['value' => 'foo'], + ], + ]; - $b = array( - 'test' => array( - 'b' => array('value' => 'foo'), - ), - ); + $b = [ + 'test' => [ + 'b' => ['value' => 'foo'], + ], + ]; $tree->merge($a, $b); } @@ -148,24 +148,24 @@ class MergeTest extends TestCase ->buildTree() ; - $a = array( - 'no_deep_merging' => array( + $a = [ + 'no_deep_merging' => [ 'foo' => 'a', 'bar' => 'b', - ), - ); + ], + ]; - $b = array( - 'no_deep_merging' => array( + $b = [ + 'no_deep_merging' => [ 'c' => 'd', - ), - ); + ], + ]; - $this->assertEquals(array( - 'no_deep_merging' => array( + $this->assertEquals([ + 'no_deep_merging' => [ 'c' => 'd', - ), - ), $tree->merge($a, $b)); + ], + ], $tree->merge($a, $b)); } public function testPrototypeWithoutAKeyAttribute() @@ -183,14 +183,14 @@ class MergeTest extends TestCase ->buildTree() ; - $a = array( - 'append_elements' => array('a', 'b'), - ); + $a = [ + 'append_elements' => ['a', 'b'], + ]; - $b = array( - 'append_elements' => array('c', 'd'), - ); + $b = [ + 'append_elements' => ['c', 'd'], + ]; - $this->assertEquals(array('append_elements' => array('a', 'b', 'c', 'd')), $tree->merge($a, $b)); + $this->assertEquals(['append_elements' => ['a', 'b', 'c', 'd']], $tree->merge($a, $b)); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php index 3273c786..d6544ccc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php @@ -30,7 +30,7 @@ class NormalizationTest extends TestCase ->node('encoders', 'array') ->useAttributeAsKey('class') ->prototype('array') - ->beforeNormalization()->ifString()->then(function ($v) { return array('algorithm' => $v); })->end() + ->beforeNormalization()->ifString()->then(function ($v) { return ['algorithm' => $v]; })->end() ->children() ->node('algorithm', 'scalar')->end() ->end() @@ -41,54 +41,54 @@ class NormalizationTest extends TestCase ->buildTree() ; - $normalized = array( - 'encoders' => array( - 'foo' => array('algorithm' => 'plaintext'), - ), - ); + $normalized = [ + 'encoders' => [ + 'foo' => ['algorithm' => 'plaintext'], + ], + ]; $this->assertNormalized($tree, $denormalized, $normalized); } public function getEncoderTests() { - $configs = array(); + $configs = []; // XML - $configs[] = array( - 'encoder' => array( - array('class' => 'foo', 'algorithm' => 'plaintext'), - ), - ); + $configs[] = [ + 'encoder' => [ + ['class' => 'foo', 'algorithm' => 'plaintext'], + ], + ]; // XML when only one element of this type - $configs[] = array( - 'encoder' => array('class' => 'foo', 'algorithm' => 'plaintext'), - ); + $configs[] = [ + 'encoder' => ['class' => 'foo', 'algorithm' => 'plaintext'], + ]; // YAML/PHP - $configs[] = array( - 'encoders' => array( - array('class' => 'foo', 'algorithm' => 'plaintext'), - ), - ); + $configs[] = [ + 'encoders' => [ + ['class' => 'foo', 'algorithm' => 'plaintext'], + ], + ]; // YAML/PHP - $configs[] = array( - 'encoders' => array( + $configs[] = [ + 'encoders' => [ 'foo' => 'plaintext', - ), - ); + ], + ]; // YAML/PHP - $configs[] = array( - 'encoders' => array( - 'foo' => array('algorithm' => 'plaintext'), - ), - ); + $configs[] = [ + 'encoders' => [ + 'foo' => ['algorithm' => 'plaintext'], + ], + ]; return array_map(function ($v) { - return array($v); + return [$v]; }, $configs); } @@ -114,28 +114,28 @@ class NormalizationTest extends TestCase ->buildTree() ; - $normalized = array('logout' => array('handlers' => array('a', 'b', 'c'))); + $normalized = ['logout' => ['handlers' => ['a', 'b', 'c']]]; $this->assertNormalized($tree, $denormalized, $normalized); } public function getAnonymousKeysTests() { - $configs = array(); + $configs = []; - $configs[] = array( - 'logout' => array( - 'handlers' => array('a', 'b', 'c'), - ), - ); + $configs[] = [ + 'logout' => [ + 'handlers' => ['a', 'b', 'c'], + ], + ]; - $configs[] = array( - 'logout' => array( - 'handler' => array('a', 'b', 'c'), - ), - ); + $configs[] = [ + 'logout' => [ + 'handler' => ['a', 'b', 'c'], + ], + ]; - return array_map(function ($v) { return array($v); }, $configs); + return array_map(function ($v) { return [$v]; }, $configs); } /** @@ -143,30 +143,30 @@ class NormalizationTest extends TestCase */ public function testNumericKeysAsAttributes($denormalized) { - $normalized = array( - 'thing' => array(42 => array('foo', 'bar'), 1337 => array('baz', 'qux')), - ); + $normalized = [ + 'thing' => [42 => ['foo', 'bar'], 1337 => ['baz', 'qux']], + ]; $this->assertNormalized($this->getNumericKeysTestTree(), $denormalized, $normalized); } public function getNumericKeysTests() { - $configs = array(); + $configs = []; - $configs[] = array( - 'thing' => array( - 42 => array('foo', 'bar'), 1337 => array('baz', 'qux'), - ), - ); + $configs[] = [ + 'thing' => [ + 42 => ['foo', 'bar'], 1337 => ['baz', 'qux'], + ], + ]; - $configs[] = array( - 'thing' => array( - array('foo', 'bar', 'id' => 42), array('baz', 'qux', 'id' => 1337), - ), - ); + $configs[] = [ + 'thing' => [ + ['foo', 'bar', 'id' => 42], ['baz', 'qux', 'id' => 1337], + ], + ]; - return array_map(function ($v) { return array($v); }, $configs); + return array_map(function ($v) { return [$v]; }, $configs); } /** @@ -175,13 +175,13 @@ class NormalizationTest extends TestCase */ public function testNonAssociativeArrayThrowsExceptionIfAttributeNotSet() { - $denormalized = array( - 'thing' => array( - array('foo', 'bar'), array('baz', 'qux'), - ), - ); + $denormalized = [ + 'thing' => [ + ['foo', 'bar'], ['baz', 'qux'], + ], + ]; - $this->assertNormalized($this->getNumericKeysTestTree(), $denormalized, array()); + $this->assertNormalized($this->getNumericKeysTestTree(), $denormalized, []); } public function testAssociativeArrayPreserveKeys() @@ -198,7 +198,7 @@ class NormalizationTest extends TestCase ->buildTree() ; - $data = array('first' => array('foo' => 'bar')); + $data = ['first' => ['foo' => 'bar']]; $this->assertNormalized($tree, $data, $data); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php index 731d7af2..6478bd12 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php @@ -32,8 +32,8 @@ class PrototypedArrayNodeTest extends TestCase $node = new PrototypedArrayNode('root'); $prototype = new ArrayNode(null, $node); $node->setPrototype($prototype); - $node->setDefaultValue(array('test')); - $this->assertEquals(array('test'), $node->getDefaultValue()); + $node->setDefaultValue(['test']); + $this->assertEquals(['test'], $node->getDefaultValue()); } // a remapped key (e.g. "mapping" -> "mappings") should be unset after being used @@ -47,12 +47,12 @@ class PrototypedArrayNodeTest extends TestCase $prototype = new ScalarNode(null, $mappingsNode); $mappingsNode->setPrototype($prototype); - $remappings = array(); - $remappings[] = array('mapping', 'mappings'); + $remappings = []; + $remappings[] = ['mapping', 'mappings']; $node->setXmlRemappings($remappings); - $normalized = $node->normalize(array('mapping' => array('foo', 'bar'))); - $this->assertEquals(array('mappings' => array('foo', 'bar')), $normalized); + $normalized = $node->normalize(['mapping' => ['foo', 'bar']]); + $this->assertEquals(['mappings' => ['foo', 'bar']], $normalized); } /** @@ -66,12 +66,12 @@ class PrototypedArrayNodeTest extends TestCase * The above should finally be mapped to an array that looks like this * (because "id" is the key attribute). * - * array( - * 'things' => array( + * [ + * 'things' => [ * 'option1' => 'foo', * 'option2' => 'bar', - * ) - * ) + * ] + * ] */ public function testMappedAttributeKeyIsRemoved() { @@ -83,12 +83,12 @@ class PrototypedArrayNodeTest extends TestCase $prototype->addChild(new ScalarNode('foo')); $node->setPrototype($prototype); - $children = array(); - $children[] = array('id' => 'item_name', 'foo' => 'bar'); + $children = []; + $children[] = ['id' => 'item_name', 'foo' => 'bar']; $normalized = $node->normalize($children); - $expected = array(); - $expected['item_name'] = array('foo' => 'bar'); + $expected = []; + $expected['item_name'] = ['foo' => 'bar']; $this->assertEquals($expected, $normalized); } @@ -107,12 +107,12 @@ class PrototypedArrayNodeTest extends TestCase $prototype->addChild(new ScalarNode('id')); // the key attribute will remain $node->setPrototype($prototype); - $children = array(); - $children[] = array('id' => 'item_name', 'foo' => 'bar'); + $children = []; + $children[] = ['id' => 'item_name', 'foo' => 'bar']; $normalized = $node->normalize($children); - $expected = array(); - $expected['item_name'] = array('id' => 'item_name', 'foo' => 'bar'); + $expected = []; + $expected['item_name'] = ['id' => 'item_name', 'foo' => 'bar']; $this->assertEquals($expected, $normalized); } @@ -121,50 +121,50 @@ class PrototypedArrayNodeTest extends TestCase $node = $this->getPrototypeNodeWithDefaultChildren(); $node->setAddChildrenIfNoneSet(); $this->assertTrue($node->hasDefaultValue()); - $this->assertEquals(array(array('foo' => 'bar')), $node->getDefaultValue()); + $this->assertEquals([['foo' => 'bar']], $node->getDefaultValue()); $node = $this->getPrototypeNodeWithDefaultChildren(); $node->setKeyAttribute('foobar'); $node->setAddChildrenIfNoneSet(); $this->assertTrue($node->hasDefaultValue()); - $this->assertEquals(array('defaults' => array('foo' => 'bar')), $node->getDefaultValue()); + $this->assertEquals(['defaults' => ['foo' => 'bar']], $node->getDefaultValue()); $node = $this->getPrototypeNodeWithDefaultChildren(); $node->setKeyAttribute('foobar'); $node->setAddChildrenIfNoneSet('defaultkey'); $this->assertTrue($node->hasDefaultValue()); - $this->assertEquals(array('defaultkey' => array('foo' => 'bar')), $node->getDefaultValue()); + $this->assertEquals(['defaultkey' => ['foo' => 'bar']], $node->getDefaultValue()); $node = $this->getPrototypeNodeWithDefaultChildren(); $node->setKeyAttribute('foobar'); - $node->setAddChildrenIfNoneSet(array('defaultkey')); + $node->setAddChildrenIfNoneSet(['defaultkey']); $this->assertTrue($node->hasDefaultValue()); - $this->assertEquals(array('defaultkey' => array('foo' => 'bar')), $node->getDefaultValue()); + $this->assertEquals(['defaultkey' => ['foo' => 'bar']], $node->getDefaultValue()); $node = $this->getPrototypeNodeWithDefaultChildren(); $node->setKeyAttribute('foobar'); - $node->setAddChildrenIfNoneSet(array('dk1', 'dk2')); + $node->setAddChildrenIfNoneSet(['dk1', 'dk2']); $this->assertTrue($node->hasDefaultValue()); - $this->assertEquals(array('dk1' => array('foo' => 'bar'), 'dk2' => array('foo' => 'bar')), $node->getDefaultValue()); + $this->assertEquals(['dk1' => ['foo' => 'bar'], 'dk2' => ['foo' => 'bar']], $node->getDefaultValue()); $node = $this->getPrototypeNodeWithDefaultChildren(); - $node->setAddChildrenIfNoneSet(array(5, 6)); + $node->setAddChildrenIfNoneSet([5, 6]); $this->assertTrue($node->hasDefaultValue()); - $this->assertEquals(array(0 => array('foo' => 'bar'), 1 => array('foo' => 'bar')), $node->getDefaultValue()); + $this->assertEquals([0 => ['foo' => 'bar'], 1 => ['foo' => 'bar']], $node->getDefaultValue()); $node = $this->getPrototypeNodeWithDefaultChildren(); $node->setAddChildrenIfNoneSet(2); $this->assertTrue($node->hasDefaultValue()); - $this->assertEquals(array(array('foo' => 'bar'), array('foo' => 'bar')), $node->getDefaultValue()); + $this->assertEquals([['foo' => 'bar'], ['foo' => 'bar']], $node->getDefaultValue()); } public function testDefaultChildrenWinsOverDefaultValue() { $node = $this->getPrototypeNodeWithDefaultChildren(); $node->setAddChildrenIfNoneSet(); - $node->setDefaultValue(array('bar' => 'foo')); + $node->setDefaultValue(['bar' => 'foo']); $this->assertTrue($node->hasDefaultValue()); - $this->assertEquals(array(array('foo' => 'bar')), $node->getDefaultValue()); + $this->assertEquals([['foo' => 'bar']], $node->getDefaultValue()); } protected function getPrototypeNodeWithDefaultChildren() @@ -191,11 +191,11 @@ class PrototypedArrayNodeTest extends TestCase * The above should finally be mapped to an array that looks like this * (because "id" is the key attribute). * - * array( - * 'things' => array( + * [ + * 'things' => [ * 'option1' => 'value1' - * ) - * ) + * ] + * ] * * It's also possible to mix 'value-only' and 'non-value-only' elements in the array. * @@ -206,15 +206,15 @@ class PrototypedArrayNodeTest extends TestCase * * The above should finally be mapped to an array as follows * - * array( - * 'things' => array( + * [ + * 'things' => [ * 'option1' => 'value1', - * 'option2' => array( + * 'option2' => [ * 'value' => 'value2', * 'foo' => 'foo2' - * ) - * ) - * ) + * ] + * ] + * ] * * The 'value' element can also be ArrayNode: * @@ -229,14 +229,14 @@ class PrototypedArrayNodeTest extends TestCase * * The above should be finally be mapped to an array as follows * - * array( - * 'things' => array( - * 'option1' => array( + * [ + * 'things' => [ + * 'option1' => [ * 'foo' => 'foo1', * 'bar' => 'bar1' - * ) - * ) - * ) + * ] + * ] + * ] * * If using VariableNode for value node, it's also possible to mix different types of value nodes: * @@ -252,15 +252,15 @@ class PrototypedArrayNodeTest extends TestCase * * The above should be finally mapped to an array as follows * - * array( - * 'things' => array( - * 'option1' => array( + * [ + * 'things' => [ + * 'option1' => [ * 'foo' => 'foo1', * 'bar' => 'bar1' - * ), + * ], * 'option2' => 'value2' - * ) - * ) + * ] + * ] * * * @dataProvider getDataForKeyRemovedLeftValueOnly @@ -291,52 +291,52 @@ class PrototypedArrayNodeTest extends TestCase $variableValue = new VariableNode('value'); - return array( - array( + return [ + [ $scalarValue, - array( - array('id' => 'option1', 'value' => 'value1'), - ), - array('option1' => 'value1'), - ), + [ + ['id' => 'option1', 'value' => 'value1'], + ], + ['option1' => 'value1'], + ], - array( + [ $scalarValue, - array( - array('id' => 'option1', 'value' => 'value1'), - array('id' => 'option2', 'value' => 'value2', 'foo' => 'foo2'), - ), - array( + [ + ['id' => 'option1', 'value' => 'value1'], + ['id' => 'option2', 'value' => 'value2', 'foo' => 'foo2'], + ], + [ 'option1' => 'value1', - 'option2' => array('value' => 'value2', 'foo' => 'foo2'), - ), - ), + 'option2' => ['value' => 'value2', 'foo' => 'foo2'], + ], + ], - array( + [ $arrayValue, - array( - array( + [ + [ 'id' => 'option1', - 'value' => array('foo' => 'foo1', 'bar' => 'bar1'), - ), - ), - array( - 'option1' => array('foo' => 'foo1', 'bar' => 'bar1'), - ), - ), + 'value' => ['foo' => 'foo1', 'bar' => 'bar1'], + ], + ], + [ + 'option1' => ['foo' => 'foo1', 'bar' => 'bar1'], + ], + ], - array($variableValue, - array( - array( - 'id' => 'option1', 'value' => array('foo' => 'foo1', 'bar' => 'bar1'), - ), - array('id' => 'option2', 'value' => 'value2'), - ), - array( - 'option1' => array('foo' => 'foo1', 'bar' => 'bar1'), + [$variableValue, + [ + [ + 'id' => 'option1', 'value' => ['foo' => 'foo1', 'bar' => 'bar1'], + ], + ['id' => 'option2', 'value' => 'value2'], + ], + [ + 'option1' => ['foo' => 'foo1', 'bar' => 'bar1'], 'option2' => 'value2', - ), - ), - ); + ], + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php index 481ef3f4..ada5b04b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php @@ -28,17 +28,17 @@ class ScalarNodeTest extends TestCase public function getValidValues() { - return array( - array(false), - array(true), - array(null), - array(''), - array('foo'), - array(0), - array(1), - array(0.0), - array(0.1), - ); + return [ + [false], + [true], + [null], + [''], + ['foo'], + [0], + [1], + [0.0], + [0.1], + ]; } public function testSetDeprecated() @@ -62,12 +62,12 @@ class ScalarNodeTest extends TestCase }; $prevErrorHandler = set_error_handler($deprecationHandler); - $node->finalize(array()); + $node->finalize([]); restore_error_handler(); $this->assertSame(0, $deprecationTriggered, '->finalize() should not trigger if the deprecated node is not set'); $prevErrorHandler = set_error_handler($deprecationHandler); - $node->finalize(array('foo' => '')); + $node->finalize(['foo' => '']); restore_error_handler(); $this->assertSame(1, $deprecationTriggered, '->finalize() should trigger if the deprecated node is set'); } @@ -84,11 +84,11 @@ class ScalarNodeTest extends TestCase public function getInvalidValues() { - return array( - array(array()), - array(array('foo' => 'bar')), - array(new \stdClass()), - ); + return [ + [[]], + [['foo' => 'bar']], + [new \stdClass()], + ]; } public function testNormalizeThrowsExceptionWithoutHint() @@ -102,7 +102,7 @@ class ScalarNodeTest extends TestCase $this->setExpectedException('Symfony\Component\Config\Definition\Exception\InvalidTypeException', 'Invalid type for path "test". Expected scalar, but got array.'); } - $node->normalize(array()); + $node->normalize([]); } public function testNormalizeThrowsExceptionWithErrorMessage() @@ -117,7 +117,7 @@ class ScalarNodeTest extends TestCase $this->setExpectedException('Symfony\Component\Config\Definition\Exception\InvalidTypeException', "Invalid type for path \"test\". Expected scalar, but got array.\nHint: \"the test value\""); } - $node->normalize(array()); + $node->normalize([]); } /** @@ -135,15 +135,15 @@ class ScalarNodeTest extends TestCase public function getValidNonEmptyValues() { - return array( - array(false), - array(true), - array('foo'), - array(0), - array(1), - array(0.0), - array(0.1), - ); + return [ + [false], + [true], + ['foo'], + [0], + [1], + [0.0], + [0.1], + ]; } /** @@ -161,9 +161,9 @@ class ScalarNodeTest extends TestCase public function getEmptyValues() { - return array( - array(null), - array(''), - ); + return [ + [null], + [''], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/DependencyInjection/ConfigCachePassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/DependencyInjection/ConfigCachePassTest.php index 58aeda68..c2b95195 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/DependencyInjection/ConfigCachePassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/DependencyInjection/ConfigCachePassTest.php @@ -27,18 +27,18 @@ class ConfigCachePassTest extends TestCase $container = new ContainerBuilder(); $definition = $container->register('config_cache_factory')->addArgument(null); - $container->register('checker_2')->addTag('config_cache.resource_checker', array('priority' => 100)); - $container->register('checker_1')->addTag('config_cache.resource_checker', array('priority' => 200)); + $container->register('checker_2')->addTag('config_cache.resource_checker', ['priority' => 100]); + $container->register('checker_1')->addTag('config_cache.resource_checker', ['priority' => 200]); $container->register('checker_3')->addTag('config_cache.resource_checker'); $pass = new ConfigCachePass(); $pass->process($container); - $expected = new IteratorArgument(array( + $expected = new IteratorArgument([ new Reference('checker_1'), new Reference('checker_2'), new Reference('checker_3'), - )); + ]); $this->assertEquals($expected, $definition->getArgument(0)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/FileLocatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/FileLocatorTest.php index 71205041..0bd97f7d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/FileLocatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/FileLocatorTest.php @@ -21,7 +21,7 @@ class FileLocatorTest extends TestCase */ public function testIsAbsolutePath($path) { - $loader = new FileLocator(array()); + $loader = new FileLocator([]); $r = new \ReflectionObject($loader); $m = $r->getMethod('isAbsolutePath'); $m->setAccessible(true); @@ -31,14 +31,14 @@ class FileLocatorTest extends TestCase public function getIsAbsolutePathTests() { - return array( - array('/foo.xml'), - array('c:\\\\foo.xml'), - array('c:/foo.xml'), - array('\\server\\foo.xml'), - array('https://server/foo.xml'), - array('phar://server/foo.xml'), - ); + return [ + ['/foo.xml'], + ['c:\\\\foo.xml'], + ['c:/foo.xml'], + ['\\server\\foo.xml'], + ['https://server/foo.xml'], + ['phar://server/foo.xml'], + ]; } public function testLocate() @@ -63,16 +63,16 @@ class FileLocatorTest extends TestCase '->locate() returns the absolute filename if the file exists in one of the paths given in the constructor' ); - $loader = new FileLocator(array(__DIR__.'/Fixtures', __DIR__.'/Fixtures/Again')); + $loader = new FileLocator([__DIR__.'/Fixtures', __DIR__.'/Fixtures/Again']); $this->assertEquals( - array(__DIR__.'/Fixtures'.\DIRECTORY_SEPARATOR.'foo.xml', __DIR__.'/Fixtures/Again'.\DIRECTORY_SEPARATOR.'foo.xml'), + [__DIR__.'/Fixtures'.\DIRECTORY_SEPARATOR.'foo.xml', __DIR__.'/Fixtures/Again'.\DIRECTORY_SEPARATOR.'foo.xml'], $loader->locate('foo.xml', __DIR__, false), '->locate() returns an array of absolute filenames' ); $this->assertEquals( - array(__DIR__.'/Fixtures'.\DIRECTORY_SEPARATOR.'foo.xml', __DIR__.'/Fixtures/Again'.\DIRECTORY_SEPARATOR.'foo.xml'), + [__DIR__.'/Fixtures'.\DIRECTORY_SEPARATOR.'foo.xml', __DIR__.'/Fixtures/Again'.\DIRECTORY_SEPARATOR.'foo.xml'], $loader->locate('foo.xml', __DIR__.'/Fixtures', false), '->locate() returns an array of absolute filenames' ); @@ -80,7 +80,7 @@ class FileLocatorTest extends TestCase $loader = new FileLocator(__DIR__.'/Fixtures/Again'); $this->assertEquals( - array(__DIR__.'/Fixtures'.\DIRECTORY_SEPARATOR.'foo.xml', __DIR__.'/Fixtures/Again'.\DIRECTORY_SEPARATOR.'foo.xml'), + [__DIR__.'/Fixtures'.\DIRECTORY_SEPARATOR.'foo.xml', __DIR__.'/Fixtures/Again'.\DIRECTORY_SEPARATOR.'foo.xml'], $loader->locate('foo.xml', __DIR__.'/Fixtures', false), '->locate() returns an array of absolute filenames' ); @@ -92,7 +92,7 @@ class FileLocatorTest extends TestCase */ public function testLocateThrowsAnExceptionIfTheFileDoesNotExists() { - $loader = new FileLocator(array(__DIR__.'/Fixtures')); + $loader = new FileLocator([__DIR__.'/Fixtures']); $loader->locate('foobar.xml', __DIR__); } @@ -102,7 +102,7 @@ class FileLocatorTest extends TestCase */ public function testLocateThrowsAnExceptionIfTheFileDoesNotExistsInAbsolutePath() { - $loader = new FileLocator(array(__DIR__.'/Fixtures')); + $loader = new FileLocator([__DIR__.'/Fixtures']); $loader->locate(__DIR__.'/Fixtures/foobar.xml', __DIR__); } @@ -113,7 +113,7 @@ class FileLocatorTest extends TestCase */ public function testLocateEmpty() { - $loader = new FileLocator(array(__DIR__.'/Fixtures')); + $loader = new FileLocator([__DIR__.'/Fixtures']); $loader->locate(null, __DIR__); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Configuration/ExampleConfiguration.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Configuration/ExampleConfiguration.php index d44b67cc..3f02700a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Configuration/ExampleConfiguration.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Configuration/ExampleConfiguration.php @@ -32,14 +32,14 @@ class ExampleConfiguration implements ConfigurationInterface ->scalarNode('scalar_true')->defaultTrue()->end() ->scalarNode('scalar_false')->defaultFalse()->end() ->scalarNode('scalar_default')->defaultValue('default')->end() - ->scalarNode('scalar_array_empty')->defaultValue(array())->end() - ->scalarNode('scalar_array_defaults')->defaultValue(array('elem1', 'elem2'))->end() + ->scalarNode('scalar_array_empty')->defaultValue([])->end() + ->scalarNode('scalar_array_defaults')->defaultValue(['elem1', 'elem2'])->end() ->scalarNode('scalar_required')->isRequired()->end() ->scalarNode('scalar_deprecated')->setDeprecated()->end() ->scalarNode('scalar_deprecated_with_message')->setDeprecated('Deprecation custom message for "%node%" at "%path%"')->end() ->scalarNode('node_with_a_looong_name')->end() - ->enumNode('enum_with_default')->values(array('this', 'that'))->defaultValue('this')->end() - ->enumNode('enum')->values(array('this', 'that'))->end() + ->enumNode('enum_with_default')->values(['this', 'that'])->defaultValue('this')->end() + ->enumNode('enum')->values(['this', 'that'])->end() ->arrayNode('array') ->info('some info') ->canBeUnset() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/DelegatingLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/DelegatingLoaderTest.php index 3f4b21f3..6e2a6ba2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/DelegatingLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/DelegatingLoaderTest.php @@ -36,12 +36,12 @@ class DelegatingLoaderTest extends TestCase { $loader1 = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); $loader1->expects($this->once())->method('supports')->will($this->returnValue(true)); - $loader = new DelegatingLoader(new LoaderResolver(array($loader1))); + $loader = new DelegatingLoader(new LoaderResolver([$loader1])); $this->assertTrue($loader->supports('foo.xml'), '->supports() returns true if the resource is loadable'); $loader1 = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); $loader1->expects($this->once())->method('supports')->will($this->returnValue(false)); - $loader = new DelegatingLoader(new LoaderResolver(array($loader1))); + $loader = new DelegatingLoader(new LoaderResolver([$loader1])); $this->assertFalse($loader->supports('foo.foo'), '->supports() returns false if the resource is not loadable'); } @@ -50,7 +50,7 @@ class DelegatingLoaderTest extends TestCase $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); $loader->expects($this->once())->method('supports')->will($this->returnValue(true)); $loader->expects($this->once())->method('load'); - $resolver = new LoaderResolver(array($loader)); + $resolver = new LoaderResolver([$loader]); $loader = new DelegatingLoader($resolver); $loader->load('foo'); @@ -63,7 +63,7 @@ class DelegatingLoaderTest extends TestCase { $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); $loader->expects($this->once())->method('supports')->will($this->returnValue(false)); - $resolver = new LoaderResolver(array($loader)); + $resolver = new LoaderResolver([$loader]); $loader = new DelegatingLoader($resolver); $loader->load('foo'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php index f8409df9..b59ace46 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php @@ -24,11 +24,11 @@ class FileLoaderTest extends TestCase $locatorMockForAdditionalLoader = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock(); $locatorMockForAdditionalLoader->expects($this->any())->method('locate')->will($this->onConsecutiveCalls( - array('path/to/file1'), // Default - array('path/to/file1', 'path/to/file2'), // First is imported - array('path/to/file1', 'path/to/file2'), // Second is imported - array('path/to/file1'), // Exception - array('path/to/file1', 'path/to/file2') // Exception + ['path/to/file1'], // Default + ['path/to/file1', 'path/to/file2'], // First is imported + ['path/to/file1', 'path/to/file2'], // Second is imported + ['path/to/file1'], // Exception + ['path/to/file1', 'path/to/file2'] // Exception )); $fileLoader = new TestFileLoader($locatorMock); @@ -38,7 +38,7 @@ class FileLoaderTest extends TestCase $additionalLoader = new TestFileLoader($locatorMockForAdditionalLoader); $additionalLoader->setCurrentDir('.'); - $fileLoader->setResolver($loaderResolver = new LoaderResolver(array($fileLoader, $additionalLoader))); + $fileLoader->setResolver($loaderResolver = new LoaderResolver([$fileLoader, $additionalLoader])); // Default case $this->assertSame('path/to/file1', $fileLoader->import('my_resource')); @@ -118,7 +118,7 @@ class TestFileLoader extends FileLoader public function clearLoading() { - self::$loading = array(); + self::$loading = []; } public function setSupports($supports) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/LoaderResolverTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/LoaderResolverTest.php index 0bf56b61..487dc43a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/LoaderResolverTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/LoaderResolverTest.php @@ -18,22 +18,22 @@ class LoaderResolverTest extends TestCase { public function testConstructor() { - $resolver = new LoaderResolver(array( + $resolver = new LoaderResolver([ $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(), - )); + ]); - $this->assertEquals(array($loader), $resolver->getLoaders(), '__construct() takes an array of loaders as its first argument'); + $this->assertEquals([$loader], $resolver->getLoaders(), '__construct() takes an array of loaders as its first argument'); } public function testResolve() { $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); - $resolver = new LoaderResolver(array($loader)); + $resolver = new LoaderResolver([$loader]); $this->assertFalse($resolver->resolve('foo.foo'), '->resolve() returns false if no loader is able to load the resource'); $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); $loader->expects($this->once())->method('supports')->will($this->returnValue(true)); - $resolver = new LoaderResolver(array($loader)); + $resolver = new LoaderResolver([$loader]); $this->assertEquals($loader, $resolver->resolve(function () {}), '->resolve() returns the loader for the given resource'); } @@ -42,6 +42,6 @@ class LoaderResolverTest extends TestCase $resolver = new LoaderResolver(); $resolver->addLoader($loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock()); - $this->assertEquals(array($loader), $resolver->getLoaders(), 'addLoader() adds a loader'); + $this->assertEquals([$loader], $resolver->getLoaders(), 'addLoader() adds a loader'); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php index cf20e43b..85f6c02e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php @@ -178,6 +178,6 @@ class DirectoryResourceTest extends TestCase $resourceA = new DirectoryResource($this->directory, '/.xml$/'); $resourceB = new DirectoryResource($this->directory, '/.yaml$/'); - $this->assertCount(2, array_unique(array($resourceA, $resourceB))); + $this->assertCount(2, array_unique([$resourceA, $resourceB])); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/GlobResourceTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/GlobResourceTest.php index c66770c3..cfbfd2b4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/GlobResourceTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/GlobResourceTest.php @@ -33,7 +33,7 @@ class GlobResourceTest extends TestCase $paths = iterator_to_array($resource); $file = $dir.'/Resource'.\DIRECTORY_SEPARATOR.'ConditionalClass.php'; - $this->assertEquals(array($file => new \SplFileInfo($file)), $paths); + $this->assertEquals([$file => new \SplFileInfo($file)], $paths); $this->assertInstanceOf('SplFileInfo', current($paths)); $this->assertSame($dir, $resource->getPrefix()); @@ -42,7 +42,7 @@ class GlobResourceTest extends TestCase $paths = iterator_to_array($resource); $file = $dir.\DIRECTORY_SEPARATOR.'Resource'.\DIRECTORY_SEPARATOR.'ConditionalClass.php'; - $this->assertEquals(array($file => $file), $paths); + $this->assertEquals([$file => $file], $paths); $this->assertInstanceOf('SplFileInfo', current($paths)); $this->assertSame($dir, $resource->getPrefix()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php index 61b0fdf7..23f2cc56 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php @@ -71,7 +71,7 @@ class ReflectionClassResourceTest extends TestCase /* 2*/ { /* 3*/ const FOO = 123; /* 4*/ -/* 5*/ public $pub = array(); +/* 5*/ public $pub = []; /* 6*/ /* 7*/ protected $prot; /* 8*/ @@ -79,7 +79,7 @@ class ReflectionClassResourceTest extends TestCase /*10*/ /*11*/ public function pub($arg = null) {} /*12*/ -/*13*/ protected function prot($a = array()) {} +/*13*/ protected function prot($a = []) {} /*14*/ /*15*/ private function priv() {} /*16*/ } @@ -110,33 +110,33 @@ EOPHP; public function provideHashedSignature() { - yield array(0, 0, "// line change\n\n"); - yield array(1, 0, '/** class docblock */'); - yield array(1, 1, 'abstract class %s'); - yield array(1, 1, 'final class %s'); - yield array(1, 1, 'class %s extends Exception'); - yield array(1, 1, 'class %s implements '.DummyInterface::class); - yield array(1, 3, 'const FOO = 456;'); - yield array(1, 3, 'const BAR = 123;'); - yield array(1, 4, '/** pub docblock */'); - yield array(1, 5, 'protected $pub = array();'); - yield array(1, 5, 'public $pub = array(123);'); - yield array(1, 6, '/** prot docblock */'); - yield array(1, 7, 'private $prot;'); - yield array(0, 8, '/** priv docblock */'); - yield array(0, 9, 'private $priv = 123;'); - yield array(1, 10, '/** pub docblock */'); + yield [0, 0, "// line change\n\n"]; + yield [1, 0, '/** class docblock */']; + yield [1, 1, 'abstract class %s']; + yield [1, 1, 'final class %s']; + yield [1, 1, 'class %s extends Exception']; + yield [1, 1, 'class %s implements '.DummyInterface::class]; + yield [1, 3, 'const FOO = 456;']; + yield [1, 3, 'const BAR = 123;']; + yield [1, 4, '/** pub docblock */']; + yield [1, 5, 'protected $pub = [];']; + yield [1, 5, 'public $pub = [123];']; + yield [1, 6, '/** prot docblock */']; + yield [1, 7, 'private $prot;']; + yield [0, 8, '/** priv docblock */']; + yield [0, 9, 'private $priv = 123;']; + yield [1, 10, '/** pub docblock */']; if (\PHP_VERSION_ID >= 50600) { - yield array(1, 11, 'public function pub(...$arg) {}'); + yield [1, 11, 'public function pub(...$arg) {}']; } if (\PHP_VERSION_ID >= 70000) { - yield array(1, 11, 'public function pub($arg = null): Foo {}'); + yield [1, 11, 'public function pub($arg = null): Foo {}']; } - yield array(0, 11, "public function pub(\$arg = null) {\nreturn 123;\n}"); - yield array(1, 12, '/** prot docblock */'); - yield array(1, 13, 'protected function prot($a = array(123)) {}'); - yield array(0, 14, '/** priv docblock */'); - yield array(0, 15, ''); + yield [0, 11, "public function pub(\$arg = null) {\nreturn 123;\n}"]; + yield [1, 12, '/** prot docblock */']; + yield [1, 13, 'protected function prot($a = [123]) {}']; + yield [0, 14, '/** priv docblock */']; + yield [0, 15, '']; } public function testEventSubscriber() @@ -144,7 +144,7 @@ EOPHP; $res = new ReflectionClassResource(new \ReflectionClass(TestEventSubscriber::class)); $this->assertTrue($res->isFresh(0)); - TestEventSubscriber::$subscribedEvents = array(123); + TestEventSubscriber::$subscribedEvents = [123]; $this->assertFalse($res->isFresh(0)); $res = new ReflectionClassResource(new \ReflectionClass(TestEventSubscriber::class)); @@ -156,7 +156,7 @@ EOPHP; $res = new ReflectionClassResource(new \ReflectionClass(TestServiceSubscriber::class)); $this->assertTrue($res->isFresh(0)); - TestServiceSubscriber::$subscribedServices = array(123); + TestServiceSubscriber::$subscribedServices = [123]; $this->assertFalse($res->isFresh(0)); $res = new ReflectionClassResource(new \ReflectionClass(TestServiceSubscriber::class)); @@ -170,7 +170,7 @@ interface DummyInterface class TestEventSubscriber implements EventSubscriberInterface { - public static $subscribedEvents = array(); + public static $subscribedEvents = []; public static function getSubscribedEvents() { @@ -180,7 +180,7 @@ class TestEventSubscriber implements EventSubscriberInterface class TestServiceSubscriber implements ServiceSubscriberInterface { - public static $subscribedServices = array(); + public static $subscribedServices = []; public static function getSubscribedServices() { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php index bb29ac02..a2c2eeb8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php @@ -27,7 +27,7 @@ class ResourceCheckerConfigCacheTest extends TestCase protected function tearDown() { - $files = array($this->cacheFile, "{$this->cacheFile}.meta"); + $files = [$this->cacheFile, "{$this->cacheFile}.meta"]; foreach ($files as $file) { if (file_exists($file)) { @@ -52,7 +52,7 @@ class ResourceCheckerConfigCacheTest extends TestCase It does not matter if you provide checkers or not. */ unlink($this->cacheFile); // remove tempnam() side effect - $cache = new ResourceCheckerConfigCache($this->cacheFile, array($checker)); + $cache = new ResourceCheckerConfigCache($this->cacheFile, [$checker]); $this->assertFalse($cache->isFresh()); } @@ -67,7 +67,7 @@ class ResourceCheckerConfigCacheTest extends TestCase public function testCacheIsFreshIfEmptyCheckerIteratorProvided() { - $cache = new ResourceCheckerConfigCache($this->cacheFile, new \ArrayIterator(array())); + $cache = new ResourceCheckerConfigCache($this->cacheFile, new \ArrayIterator([])); $this->assertTrue($cache->isFresh()); } @@ -75,7 +75,7 @@ class ResourceCheckerConfigCacheTest extends TestCase { /* As in the previous test, but this time we have a resource. */ $cache = new ResourceCheckerConfigCache($this->cacheFile); - $cache->write('', array(new ResourceStub())); + $cache->write('', [new ResourceStub()]); $this->assertTrue($cache->isFresh()); // no (matching) ResourceChecker passed } @@ -92,8 +92,8 @@ class ResourceCheckerConfigCacheTest extends TestCase ->method('isFresh') ->willReturn(true); - $cache = new ResourceCheckerConfigCache($this->cacheFile, array($checker)); - $cache->write('', array(new ResourceStub())); + $cache = new ResourceCheckerConfigCache($this->cacheFile, [$checker]); + $cache->write('', [new ResourceStub()]); $this->assertTrue($cache->isFresh()); } @@ -110,8 +110,8 @@ class ResourceCheckerConfigCacheTest extends TestCase ->method('isFresh') ->willReturn(false); - $cache = new ResourceCheckerConfigCache($this->cacheFile, array($checker)); - $cache->write('', array(new ResourceStub())); + $cache = new ResourceCheckerConfigCache($this->cacheFile, [$checker]); + $cache->write('', [new ResourceStub()]); $this->assertFalse($cache->isFresh()); } @@ -119,8 +119,8 @@ class ResourceCheckerConfigCacheTest extends TestCase public function testCacheIsNotFreshWhenUnserializeFails() { $checker = $this->getMockBuilder('\Symfony\Component\Config\ResourceCheckerInterface')->getMock(); - $cache = new ResourceCheckerConfigCache($this->cacheFile, array($checker)); - $cache->write('foo', array(new FileResource(__FILE__))); + $cache = new ResourceCheckerConfigCache($this->cacheFile, [$checker]); + $cache->write('foo', [new FileResource(__FILE__)]); $metaFile = "{$this->cacheFile}.meta"; file_put_contents($metaFile, str_replace('FileResource', 'ClassNotHere', file_get_contents($metaFile))); @@ -139,8 +139,8 @@ class ResourceCheckerConfigCacheTest extends TestCase public function testCacheIsNotFreshIfNotExistsMetaFile() { $checker = $this->getMockBuilder('\Symfony\Component\Config\ResourceCheckerInterface')->getMock(); - $cache = new ResourceCheckerConfigCache($this->cacheFile, array($checker)); - $cache->write('foo', array(new FileResource(__FILE__))); + $cache = new ResourceCheckerConfigCache($this->cacheFile, [$checker]); + $cache->write('foo', [new FileResource(__FILE__)]); $metaFile = "{$this->cacheFile}.meta"; unlink($metaFile); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php index 10b4a7a9..0a6637f7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php @@ -52,14 +52,14 @@ class XmlUtilsTest extends TestCase $mock->expects($this->exactly(2))->method('validate')->will($this->onConsecutiveCalls(false, true)); try { - XmlUtils::loadFile($fixtures.'valid.xml', array($mock, 'validate')); + XmlUtils::loadFile($fixtures.'valid.xml', [$mock, 'validate']); $this->fail(); } catch (\InvalidArgumentException $e) { $this->assertRegExp('/The XML file ".+" is not valid\./', $e->getMessage()); } - $this->assertInstanceOf('DOMDocument', XmlUtils::loadFile($fixtures.'valid.xml', array($mock, 'validate'))); - $this->assertSame(array(), libxml_get_errors()); + $this->assertInstanceOf('DOMDocument', XmlUtils::loadFile($fixtures.'valid.xml', [$mock, 'validate'])); + $this->assertSame([], libxml_get_errors()); } /** @@ -73,16 +73,16 @@ class XmlUtilsTest extends TestCase $mock = $this->getMockBuilder(__NAMESPACE__.'\Validator')->getMock(); $mock->expects($this->once())->method('validate')->willReturn(false); - XmlUtils::parse(file_get_contents($fixtures.'valid.xml'), array($mock, 'validate')); + XmlUtils::parse(file_get_contents($fixtures.'valid.xml'), [$mock, 'validate']); } public function testLoadFileWithInternalErrorsEnabled() { $internalErrors = libxml_use_internal_errors(true); - $this->assertSame(array(), libxml_get_errors()); + $this->assertSame([], libxml_get_errors()); $this->assertInstanceOf('DOMDocument', XmlUtils::loadFile(__DIR__.'/../Fixtures/Util/invalid_schema.xml')); - $this->assertSame(array(), libxml_get_errors()); + $this->assertSame([], libxml_get_errors()); libxml_clear_errors(); libxml_use_internal_errors($internalErrors); @@ -101,25 +101,25 @@ class XmlUtilsTest extends TestCase public function getDataForConvertDomToArray() { - return array( - array(null, ''), - array('bar', 'bar'), - array(array('bar' => 'foobar'), '', true), - array(array('foo' => null), ''), - array(array('foo' => 'bar'), 'bar'), - array(array('foo' => array('foo' => 'bar')), ''), - array(array('foo' => array('foo' => 0)), '0'), - array(array('foo' => array('foo' => 'bar')), 'bar'), - array(array('foo' => array('foo' => 'bar', 'value' => 'text')), 'text'), - array(array('foo' => array('attr' => 'bar', 'foo' => 'text')), 'text'), - array(array('foo' => array('bar', 'text')), 'bartext'), - array(array('foo' => array(array('foo' => 'bar'), array('foo' => 'text'))), ''), - array(array('foo' => array('foo' => array('bar', 'text'))), 'text'), - array(array('foo' => 'bar'), 'bar'), - array(array('foo' => 'text'), 'text'), - array(array('foo' => array('bar' => 'bar', 'value' => 'text')), 'text', false, false), - array(array('attr' => 1, 'b' => 'hello'), 'hello2', true), - ); + return [ + [null, ''], + ['bar', 'bar'], + [['bar' => 'foobar'], '', true], + [['foo' => null], ''], + [['foo' => 'bar'], 'bar'], + [['foo' => ['foo' => 'bar']], ''], + [['foo' => ['foo' => 0]], '0'], + [['foo' => ['foo' => 'bar']], 'bar'], + [['foo' => ['foo' => 'bar', 'value' => 'text']], 'text'], + [['foo' => ['attr' => 'bar', 'foo' => 'text']], 'text'], + [['foo' => ['bar', 'text']], 'bartext'], + [['foo' => [['foo' => 'bar'], ['foo' => 'text']]], ''], + [['foo' => ['foo' => ['bar', 'text']]], 'text'], + [['foo' => 'bar'], 'bar'], + [['foo' => 'text'], 'text'], + [['foo' => ['bar' => 'bar', 'value' => 'text']], 'text', false, false], + [['attr' => 1, 'b' => 'hello'], 'hello2', true], + ]; } /** @@ -132,34 +132,34 @@ class XmlUtilsTest extends TestCase public function getDataForPhpize() { - return array( - array('', ''), - array(null, 'null'), - array(true, 'true'), - array(false, 'false'), - array(null, 'Null'), - array(true, 'True'), - array(false, 'False'), - array(0, '0'), - array(1, '1'), - array(-1, '-1'), - array(0777, '0777'), - array(255, '0xFF'), - array(100.0, '1e2'), - array(-120.0, '-1.2E2'), - array(-10100.1, '-10100.1'), - array('-10,100.1', '-10,100.1'), - array('1234 5678 9101 1121 3141', '1234 5678 9101 1121 3141'), - array('1,2,3,4', '1,2,3,4'), - array('11,22,33,44', '11,22,33,44'), - array('11,222,333,4', '11,222,333,4'), - array('1,222,333,444', '1,222,333,444'), - array('11,222,333,444', '11,222,333,444'), - array('111,222,333,444', '111,222,333,444'), - array('1111,2222,3333,4444,5555', '1111,2222,3333,4444,5555'), - array('foo', 'foo'), - array(6, '0b0110'), - ); + return [ + ['', ''], + [null, 'null'], + [true, 'true'], + [false, 'false'], + [null, 'Null'], + [true, 'True'], + [false, 'False'], + [0, '0'], + [1, '1'], + [-1, '-1'], + [0777, '0777'], + [255, '0xFF'], + [100.0, '1e2'], + [-120.0, '-1.2E2'], + [-10100.1, '-10100.1'], + ['-10,100.1', '-10,100.1'], + ['1234 5678 9101 1121 3141', '1234 5678 9101 1121 3141'], + ['1,2,3,4', '1,2,3,4'], + ['11,22,33,44', '11,22,33,44'], + ['11,222,333,4', '11,222,333,4'], + ['1,222,333,444', '1,222,333,444'], + ['11,222,333,444', '11,222,333,444'], + ['111,222,333,444', '111,222,333,444'], + ['1111,2222,3333,4444,5555', '1111,2222,3333,4444,5555'], + ['foo', 'foo'], + [6, '0b0110'], + ]; } public function testLoadEmptyXmlFile() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php index 8ad58d61..df1edd68 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php @@ -158,9 +158,9 @@ class XmlUtils { $prefix = (string) $element->prefix; $empty = true; - $config = array(); + $config = []; foreach ($element->attributes as $name => $node) { - if ($checkPrefix && !\in_array((string) $node->prefix, array('', $prefix), true)) { + if ($checkPrefix && !\in_array((string) $node->prefix, ['', $prefix], true)) { continue; } $config[$name] = static::phpize($node->value); @@ -182,7 +182,7 @@ class XmlUtils $key = $node->localName; if (isset($config[$key])) { if (!\is_array($config[$key]) || !\is_int(key($config[$key]))) { - $config[$key] = array($config[$key]); + $config[$key] = [$config[$key]]; } $config[$key][] = $value; } else { @@ -249,7 +249,7 @@ class XmlUtils protected static function getXmlErrors($internalErrors) { - $errors = array(); + $errors = []; foreach (libxml_get_errors() as $error) { $errors[] = sprintf('[%s %s] %s (in %s - line %d, column %d)', LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR', diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php index 68003604..6cc5f5c5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php @@ -61,7 +61,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; */ class Application { - private $commands = array(); + private $commands = []; private $wantHelps = false; private $runningCommand; private $name; @@ -74,7 +74,7 @@ class Application private $dispatcher; private $terminal; private $defaultCommand; - private $singleCommand; + private $singleCommand = false; private $initialized; /** @@ -196,17 +196,24 @@ class Application */ public function doRun(InputInterface $input, OutputInterface $output) { - if (true === $input->hasParameterOption(array('--version', '-V'), true)) { + if (true === $input->hasParameterOption(['--version', '-V'], true)) { $output->writeln($this->getLongVersion()); return 0; } + try { + // Makes ArgvInput::getFirstArgument() able to distinguish an option from an argument. + $input->bind($this->getDefinition()); + } catch (ExceptionInterface $e) { + // Errors must be ignored, full binding/validation happens later when the command is known. + } + $name = $this->getCommandName($input); - if (true === $input->hasParameterOption(array('--help', '-h'), true)) { + if (true === $input->hasParameterOption(['--help', '-h'], true)) { if (!$name) { $name = 'help'; - $input = new ArrayInput(array('command_name' => $this->defaultCommand)); + $input = new ArrayInput(['command_name' => $this->defaultCommand]); } else { $this->wantHelps = true; } @@ -217,9 +224,9 @@ class Application $definition = $this->getDefinition(); $definition->setArguments(array_merge( $definition->getArguments(), - array( + [ 'command' => new InputArgument('command', InputArgument::OPTIONAL, $definition->getArgument('command')->getDescription(), $name), - ) + ] )); } @@ -521,7 +528,7 @@ class Application */ public function getNamespaces() { - $namespaces = array(); + $namespaces = []; foreach ($this->all() as $command) { $namespaces = array_merge($namespaces, $this->extractAllNamespaces($command->getName())); @@ -588,7 +595,7 @@ class Application { $this->init(); - $aliases = array(); + $aliases = []; $allCommands = $this->commandLoader ? array_merge($this->commandLoader->getNames(), array_keys($this->commands)) : array_keys($this->commands); $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $name); $commands = preg_grep('{^'.$expr.'}', $allCommands); @@ -681,7 +688,7 @@ class Application return $commands; } - $commands = array(); + $commands = []; foreach ($this->commands as $name => $command) { if ($namespace === $this->extractNamespace($name, substr_count($namespace, ':') + 1)) { $commands[$name] = $command; @@ -708,7 +715,7 @@ class Application */ public static function getAbbreviations($names) { - $abbrevs = array(); + $abbrevs = []; foreach ($names as $name) { for ($len = \strlen($name); $len > 0; --$len) { $abbrev = substr($name, 0, $len); @@ -750,18 +757,18 @@ class Application if (\defined('HHVM_VERSION') && $width > 1 << 31) { $width = 1 << 31; } - $lines = array(); - foreach ('' !== $message ? preg_split('/\r?\n/', $message) : array() as $line) { + $lines = []; + foreach ('' !== $message ? preg_split('/\r?\n/', $message) : [] as $line) { foreach ($this->splitStringByWidth($line, $width - 4) as $line) { // pre-format lines to get the right string length $lineLength = Helper::strlen($line) + 4; - $lines[] = array($line, $lineLength); + $lines[] = [$line, $lineLength]; $len = max($lineLength, $len); } } - $messages = array(); + $messages = []; if (!$e instanceof ExceptionInterface || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { $messages[] = sprintf('%s', OutputFormatter::escape(sprintf('In %s line %s:', basename($e->getFile()) ?: 'n/a', $e->getLine() ?: 'n/a'))); } @@ -783,12 +790,12 @@ class Application // exception related properties $trace = $e->getTrace(); - array_unshift($trace, array( + array_unshift($trace, [ 'function' => '', 'file' => $e->getFile() ?: 'n/a', 'line' => $e->getLine() ?: 'n/a', - 'args' => array(), - )); + 'args' => [], + ]); for ($i = 0, $count = \count($trace); $i < $count; ++$i) { $class = isset($trace[$i]['class']) ? $trace[$i]['class'] : ''; @@ -844,7 +851,7 @@ class Application { @trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED); - return array($this->terminal->getWidth(), $this->terminal->getHeight()); + return [$this->terminal->getWidth(), $this->terminal->getHeight()]; } /** @@ -874,13 +881,13 @@ class Application */ protected function configureIO(InputInterface $input, OutputInterface $output) { - if (true === $input->hasParameterOption(array('--ansi'), true)) { + if (true === $input->hasParameterOption(['--ansi'], true)) { $output->setDecorated(true); - } elseif (true === $input->hasParameterOption(array('--no-ansi'), true)) { + } elseif (true === $input->hasParameterOption(['--no-ansi'], true)) { $output->setDecorated(false); } - if (true === $input->hasParameterOption(array('--no-interaction', '-n'), true)) { + if (true === $input->hasParameterOption(['--no-interaction', '-n'], true)) { $input->setInteractive(false); } elseif (\function_exists('posix_isatty')) { $inputStream = null; @@ -908,7 +915,7 @@ class Application default: $shellVerbosity = 0; break; } - if (true === $input->hasParameterOption(array('--quiet', '-q'), true)) { + if (true === $input->hasParameterOption(['--quiet', '-q'], true)) { $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); $shellVerbosity = -1; } else { @@ -1021,7 +1028,7 @@ class Application */ protected function getDefaultInputDefinition() { - return new InputDefinition(array( + return new InputDefinition([ new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'), new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'), @@ -1031,7 +1038,7 @@ class Application new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'), new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'), new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'), - )); + ]); } /** @@ -1041,7 +1048,7 @@ class Application */ protected function getDefaultCommands() { - return array(new HelpCommand(), new ListCommand()); + return [new HelpCommand(), new ListCommand()]; } /** @@ -1051,12 +1058,12 @@ class Application */ protected function getDefaultHelperSet() { - return new HelperSet(array( + return new HelperSet([ new FormatterHelper(), new DebugFormatterHelper(), new ProcessHelper(), new QuestionHelper(), - )); + ]); } /** @@ -1101,9 +1108,9 @@ class Application private function findAlternatives($name, $collection) { $threshold = 1e3; - $alternatives = array(); + $alternatives = []; - $collectionParts = array(); + $collectionParts = []; foreach ($collection as $item) { $collectionParts[$item] = explode(':', $item); } @@ -1162,6 +1169,14 @@ class Application return $this; } + /** + * @internal + */ + public function isSingleCommand() + { + return $this->singleCommand; + } + private function splitStringByWidth($string, $width) { // str_split is not suitable for multi-byte characters, we should use preg_split to get char array properly. @@ -1172,7 +1187,7 @@ class Application } $utf8String = mb_convert_encoding($string, 'utf8', $encoding); - $lines = array(); + $lines = []; $line = ''; foreach (preg_split('//u', $utf8String) as $char) { // test if $char could be appended to current line @@ -1203,7 +1218,7 @@ class Application { // -1 as third argument is needed to skip the command short name when exploding $parts = explode(':', $name, -1); - $namespaces = array(); + $namespaces = []; foreach ($parts as $part) { if (\count($namespaces)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php index c8dcf3be..5f30da7a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php @@ -37,7 +37,7 @@ class Command private $application; private $name; private $processTitle; - private $aliases = array(); + private $aliases = []; private $definition; private $hidden = false; private $help; @@ -46,8 +46,8 @@ class Command private $applicationDefinitionMerged = false; private $applicationDefinitionMergedWithArgs = false; private $code; - private $synopsis = array(); - private $usages = array(); + private $synopsis = []; + private $usages = []; private $helperSet; /** @@ -369,9 +369,9 @@ class Command * Adds an argument. * * @param string $name The argument name - * @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL + * @param int|null $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL * @param string $description A description text - * @param string|string[]|null $default The default value (for self::OPTIONAL mode only) + * @param string|string[]|null $default The default value (for InputArgument::OPTIONAL mode only) * * @throws InvalidArgumentException When argument mode is not valid * @@ -388,10 +388,10 @@ class Command * Adds an option. * * @param string $name The option name - * @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts - * @param int|null $mode The option mode: One of the VALUE_* constants + * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts + * @param int|null $mode The option mode: One of the InputOption::VALUE_* constants * @param string $description A description text - * @param string|string[]|int|bool|null $default The default value (must be null for self::VALUE_NONE) + * @param string|string[]|int|bool|null $default The default value (must be null for InputOption::VALUE_NONE) * * @throws InvalidArgumentException If option mode is invalid or incompatible * @@ -533,15 +533,16 @@ class Command public function getProcessedHelp() { $name = $this->name; + $isSingleCommand = $this->application && $this->application->isSingleCommand(); - $placeholders = array( + $placeholders = [ '%command.name%', '%command.full_name%', - ); - $replacements = array( + ]; + $replacements = [ $name, - $_SERVER['PHP_SELF'].' '.$name, - ); + $isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'].' '.$name, + ]; return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Command/HelpCommand.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Command/HelpCommand.php index 1e20b008..23847766 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Command/HelpCommand.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Command/HelpCommand.php @@ -35,11 +35,11 @@ class HelpCommand extends Command $this ->setName('help') - ->setDefinition(array( + ->setDefinition([ new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'), new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'), - )) + ]) ->setDescription('Displays help for a command') ->setHelp(<<<'EOF' The %command.name% command displays help for a given command: @@ -71,10 +71,10 @@ EOF } $helper = new DescriptorHelper(); - $helper->describe($output, $this->command, array( + $helper->describe($output, $this->command, [ 'format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw'), - )); + ]); $this->command = null; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Command/ListCommand.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Command/ListCommand.php index 5d932338..7259b126 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Command/ListCommand.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Command/ListCommand.php @@ -69,11 +69,11 @@ EOF protected function execute(InputInterface $input, OutputInterface $output) { $helper = new DescriptorHelper(); - $helper->describe($output, $this->getApplication(), array( + $helper->describe($output, $this->getApplication(), [ 'format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw'), 'namespace' => $input->getArgument('namespace'), - )); + ]); } /** @@ -81,10 +81,10 @@ EOF */ private function createDefinition() { - return new InputDefinition(array( + return new InputDefinition([ new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'), new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'), new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), - )); + ]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/DependencyInjection/AddConsoleCommandPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/DependencyInjection/AddConsoleCommandPass.php index 39d53ef8..f656d6a8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/DependencyInjection/AddConsoleCommandPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/DependencyInjection/AddConsoleCommandPass.php @@ -38,10 +38,10 @@ class AddConsoleCommandPass implements CompilerPassInterface public function process(ContainerBuilder $container) { $commandServices = $container->findTaggedServiceIds($this->commandTag, true); - $lazyCommandMap = array(); - $lazyCommandRefs = array(); - $serviceIds = array(); - $lazyServiceIds = array(); + $lazyCommandMap = []; + $lazyCommandRefs = []; + $serviceIds = []; + $lazyServiceIds = []; foreach ($commandServices as $id => $tags) { $definition = $container->getDefinition($id); @@ -79,7 +79,7 @@ class AddConsoleCommandPass implements CompilerPassInterface unset($tags[0]); $lazyCommandMap[$commandName] = $id; $lazyCommandRefs[$id] = new TypedReference($id, $class); - $aliases = array(); + $aliases = []; foreach ($tags as $tag) { if (isset($tag['command'])) { @@ -88,17 +88,17 @@ class AddConsoleCommandPass implements CompilerPassInterface } } - $definition->addMethodCall('setName', array($commandName)); + $definition->addMethodCall('setName', [$commandName]); if ($aliases) { - $definition->addMethodCall('setAliases', array($aliases)); + $definition->addMethodCall('setAliases', [$aliases]); } } $container ->register($this->commandLoaderServiceId, ContainerCommandLoader::class) ->setPublic(true) - ->setArguments(array(ServiceLocatorTagPass::register($container, $lazyCommandRefs), $lazyCommandMap)); + ->setArguments([ServiceLocatorTagPass::register($container, $lazyCommandRefs), $lazyCommandMap]); $container->setParameter('console.command.ids', $serviceIds); $container->setParameter('console.lazy_command.ids', $lazyServiceIds); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php index ef4c673b..79a358fb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php @@ -97,12 +97,12 @@ class ApplicationDescription private function inspectApplication() { - $this->commands = array(); - $this->namespaces = array(); + $this->commands = []; + $this->namespaces = []; $all = $this->application->all($this->namespace ? $this->application->findNamespace($this->namespace) : null); foreach ($this->sortCommands($all) as $namespace => $commands) { - $names = array(); + $names = []; /** @var Command $command */ foreach ($commands as $name => $command) { @@ -119,7 +119,7 @@ class ApplicationDescription $names[] = $name; } - $this->namespaces[$namespace] = array('id' => $namespace, 'commands' => $names); + $this->namespaces[$namespace] = ['id' => $namespace, 'commands' => $names]; } } @@ -128,8 +128,8 @@ class ApplicationDescription */ private function sortCommands(array $commands) { - $namespacedCommands = array(); - $globalCommands = array(); + $namespacedCommands = []; + $globalCommands = []; foreach ($commands as $name => $command) { $key = $this->application->extractNamespace($name, 1); if (!$key) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/Descriptor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/Descriptor.php index 151d84f7..d25a708e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/Descriptor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/Descriptor.php @@ -34,7 +34,7 @@ abstract class Descriptor implements DescriptorInterface /** * {@inheritdoc} */ - public function describe(OutputInterface $output, $object, array $options = array()) + public function describe(OutputInterface $output, $object, array $options = []) { $this->output = $output; @@ -75,33 +75,33 @@ abstract class Descriptor implements DescriptorInterface * * @return string|mixed */ - abstract protected function describeInputArgument(InputArgument $argument, array $options = array()); + abstract protected function describeInputArgument(InputArgument $argument, array $options = []); /** * Describes an InputOption instance. * * @return string|mixed */ - abstract protected function describeInputOption(InputOption $option, array $options = array()); + abstract protected function describeInputOption(InputOption $option, array $options = []); /** * Describes an InputDefinition instance. * * @return string|mixed */ - abstract protected function describeInputDefinition(InputDefinition $definition, array $options = array()); + abstract protected function describeInputDefinition(InputDefinition $definition, array $options = []); /** * Describes a Command instance. * * @return string|mixed */ - abstract protected function describeCommand(Command $command, array $options = array()); + abstract protected function describeCommand(Command $command, array $options = []); /** * Describes an Application instance. * * @return string|mixed */ - abstract protected function describeApplication(Application $application, array $options = array()); + abstract protected function describeApplication(Application $application, array $options = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php index 5d3339a9..fbc07df8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php @@ -27,5 +27,5 @@ interface DescriptorInterface * @param object $object * @param array $options */ - public function describe(OutputInterface $output, $object, array $options = array()); + public function describe(OutputInterface $output, $object, array $options = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php index f60323be..197b843d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php @@ -29,7 +29,7 @@ class JsonDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputArgument(InputArgument $argument, array $options = array()) + protected function describeInputArgument(InputArgument $argument, array $options = []) { $this->writeData($this->getInputArgumentData($argument), $options); } @@ -37,7 +37,7 @@ class JsonDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputOption(InputOption $option, array $options = array()) + protected function describeInputOption(InputOption $option, array $options = []) { $this->writeData($this->getInputOptionData($option), $options); } @@ -45,7 +45,7 @@ class JsonDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputDefinition(InputDefinition $definition, array $options = array()) + protected function describeInputDefinition(InputDefinition $definition, array $options = []) { $this->writeData($this->getInputDefinitionData($definition), $options); } @@ -53,7 +53,7 @@ class JsonDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeCommand(Command $command, array $options = array()) + protected function describeCommand(Command $command, array $options = []) { $this->writeData($this->getCommandData($command), $options); } @@ -61,17 +61,17 @@ class JsonDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeApplication(Application $application, array $options = array()) + protected function describeApplication(Application $application, array $options = []) { $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null; $description = new ApplicationDescription($application, $describedNamespace, true); - $commands = array(); + $commands = []; foreach ($description->getCommands() as $command) { $commands[] = $this->getCommandData($command); } - $data = array(); + $data = []; if ('UNKNOWN' !== $application->getName()) { $data['application']['name'] = $application->getName(); if ('UNKNOWN' !== $application->getVersion()) { @@ -105,13 +105,13 @@ class JsonDescriptor extends Descriptor */ private function getInputArgumentData(InputArgument $argument) { - return array( + return [ 'name' => $argument->getName(), 'is_required' => $argument->isRequired(), 'is_array' => $argument->isArray(), 'description' => preg_replace('/\s*[\r\n]\s*/', ' ', $argument->getDescription()), 'default' => INF === $argument->getDefault() ? 'INF' : $argument->getDefault(), - ); + ]; } /** @@ -119,7 +119,7 @@ class JsonDescriptor extends Descriptor */ private function getInputOptionData(InputOption $option) { - return array( + return [ 'name' => '--'.$option->getName(), 'shortcut' => $option->getShortcut() ? '-'.str_replace('|', '|-', $option->getShortcut()) : '', 'accept_value' => $option->acceptValue(), @@ -127,7 +127,7 @@ class JsonDescriptor extends Descriptor 'is_multiple' => $option->isArray(), 'description' => preg_replace('/\s*[\r\n]\s*/', ' ', $option->getDescription()), 'default' => INF === $option->getDefault() ? 'INF' : $option->getDefault(), - ); + ]; } /** @@ -135,17 +135,17 @@ class JsonDescriptor extends Descriptor */ private function getInputDefinitionData(InputDefinition $definition) { - $inputArguments = array(); + $inputArguments = []; foreach ($definition->getArguments() as $name => $argument) { $inputArguments[$name] = $this->getInputArgumentData($argument); } - $inputOptions = array(); + $inputOptions = []; foreach ($definition->getOptions() as $name => $option) { $inputOptions[$name] = $this->getInputOptionData($option); } - return array('arguments' => $inputArguments, 'options' => $inputOptions); + return ['arguments' => $inputArguments, 'options' => $inputOptions]; } /** @@ -156,13 +156,13 @@ class JsonDescriptor extends Descriptor $command->getSynopsis(); $command->mergeApplicationDefinition(false); - return array( + return [ 'name' => $command->getName(), - 'usage' => array_merge(array($command->getSynopsis()), $command->getUsages(), $command->getAliases()), + 'usage' => array_merge([$command->getSynopsis()], $command->getUsages(), $command->getAliases()), 'description' => $command->getDescription(), 'help' => $command->getProcessedHelp(), 'definition' => $this->getInputDefinitionData($command->getNativeDefinition()), 'hidden' => $command->isHidden(), - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php index 6d8399f9..e6245778 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php @@ -31,7 +31,7 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - public function describe(OutputInterface $output, $object, array $options = array()) + public function describe(OutputInterface $output, $object, array $options = []) { $decorated = $output->isDecorated(); $output->setDecorated(false); @@ -52,7 +52,7 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputArgument(InputArgument $argument, array $options = array()) + protected function describeInputArgument(InputArgument $argument, array $options = []) { $this->write( '#### `'.($argument->getName() ?: '')."`\n\n" @@ -66,7 +66,7 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputOption(InputOption $option, array $options = array()) + protected function describeInputOption(InputOption $option, array $options = []) { $name = '--'.$option->getName(); if ($option->getShortcut()) { @@ -86,7 +86,7 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputDefinition(InputDefinition $definition, array $options = array()) + protected function describeInputDefinition(InputDefinition $definition, array $options = []) { if ($showArguments = \count($definition->getArguments()) > 0) { $this->write('### Arguments'); @@ -112,7 +112,7 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeCommand(Command $command, array $options = array()) + protected function describeCommand(Command $command, array $options = []) { $command->getSynopsis(); $command->mergeApplicationDefinition(false); @@ -122,7 +122,7 @@ class MarkdownDescriptor extends Descriptor .str_repeat('-', Helper::strlen($command->getName()) + 2)."\n\n" .($command->getDescription() ? $command->getDescription()."\n\n" : '') .'### Usage'."\n\n" - .array_reduce(array_merge(array($command->getSynopsis()), $command->getAliases(), $command->getUsages()), function ($carry, $usage) { + .array_reduce(array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()), function ($carry, $usage) { return $carry.'* `'.$usage.'`'."\n"; }) ); @@ -141,7 +141,7 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeApplication(Application $application, array $options = array()) + protected function describeApplication(Application $application, array $options = []) { $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null; $description = new ApplicationDescription($application, $describedNamespace); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/TextDescriptor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/TextDescriptor.php index 04dd2259..af9088c7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/TextDescriptor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/TextDescriptor.php @@ -31,7 +31,7 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputArgument(InputArgument $argument, array $options = array()) + protected function describeInputArgument(InputArgument $argument, array $options = []) { if (null !== $argument->getDefault() && (!\is_array($argument->getDefault()) || \count($argument->getDefault()))) { $default = sprintf(' [default: %s]', $this->formatDefaultValue($argument->getDefault())); @@ -54,7 +54,7 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputOption(InputOption $option, array $options = array()) + protected function describeInputOption(InputOption $option, array $options = []) { if ($option->acceptValue() && null !== $option->getDefault() && (!\is_array($option->getDefault()) || \count($option->getDefault()))) { $default = sprintf(' [default: %s]', $this->formatDefaultValue($option->getDefault())); @@ -71,7 +71,7 @@ class TextDescriptor extends Descriptor } } - $totalWidth = isset($options['total_width']) ? $options['total_width'] : $this->calculateTotalWidthForOptions(array($option)); + $totalWidth = isset($options['total_width']) ? $options['total_width'] : $this->calculateTotalWidthForOptions([$option]); $synopsis = sprintf('%s%s', $option->getShortcut() ? sprintf('-%s, ', $option->getShortcut()) : ' ', sprintf('--%s%s', $option->getName(), $value) @@ -92,7 +92,7 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputDefinition(InputDefinition $definition, array $options = array()) + protected function describeInputDefinition(InputDefinition $definition, array $options = []) { $totalWidth = $this->calculateTotalWidthForOptions($definition->getOptions()); foreach ($definition->getArguments() as $argument) { @@ -103,7 +103,7 @@ class TextDescriptor extends Descriptor $this->writeText('Arguments:', $options); $this->writeText("\n"); foreach ($definition->getArguments() as $argument) { - $this->describeInputArgument($argument, array_merge($options, array('total_width' => $totalWidth))); + $this->describeInputArgument($argument, array_merge($options, ['total_width' => $totalWidth])); $this->writeText("\n"); } } @@ -113,7 +113,7 @@ class TextDescriptor extends Descriptor } if ($definition->getOptions()) { - $laterOptions = array(); + $laterOptions = []; $this->writeText('Options:', $options); foreach ($definition->getOptions() as $option) { @@ -122,11 +122,11 @@ class TextDescriptor extends Descriptor continue; } $this->writeText("\n"); - $this->describeInputOption($option, array_merge($options, array('total_width' => $totalWidth))); + $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth])); } foreach ($laterOptions as $option) { $this->writeText("\n"); - $this->describeInputOption($option, array_merge($options, array('total_width' => $totalWidth))); + $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth])); } } } @@ -134,14 +134,14 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeCommand(Command $command, array $options = array()) + protected function describeCommand(Command $command, array $options = []) { $command->getSynopsis(true); $command->getSynopsis(false); $command->mergeApplicationDefinition(false); $this->writeText('Usage:', $options); - foreach (array_merge(array($command->getSynopsis(true)), $command->getAliases(), $command->getUsages()) as $usage) { + foreach (array_merge([$command->getSynopsis(true)], $command->getAliases(), $command->getUsages()) as $usage) { $this->writeText("\n"); $this->writeText(' '.OutputFormatter::escape($usage), $options); } @@ -166,7 +166,7 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeApplication(Application $application, array $options = array()) + protected function describeApplication(Application $application, array $options = []) { $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null; $description = new ApplicationDescription($application, $describedNamespace); @@ -242,7 +242,7 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - private function writeText($content, array $options = array()) + private function writeText($content, array $options = []) { $this->write( isset($options['raw_text']) && $options['raw_text'] ? strip_tags($content) : $content, @@ -300,7 +300,7 @@ class TextDescriptor extends Descriptor */ private function getColumnWidth(array $commands) { - $widths = array(); + $widths = []; foreach ($commands as $command) { if ($command instanceof Command) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php index 1a12a1dd..0cc0c990 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php @@ -64,7 +64,7 @@ class XmlDescriptor extends Descriptor $commandXML->appendChild($usagesXML = $dom->createElement('usages')); - foreach (array_merge(array($command->getSynopsis()), $command->getAliases(), $command->getUsages()) as $usage) { + foreach (array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()) as $usage) { $usagesXML->appendChild($dom->createElement('usage', $usage)); } @@ -130,7 +130,7 @@ class XmlDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputArgument(InputArgument $argument, array $options = array()) + protected function describeInputArgument(InputArgument $argument, array $options = []) { $this->writeDocument($this->getInputArgumentDocument($argument)); } @@ -138,7 +138,7 @@ class XmlDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputOption(InputOption $option, array $options = array()) + protected function describeInputOption(InputOption $option, array $options = []) { $this->writeDocument($this->getInputOptionDocument($option)); } @@ -146,7 +146,7 @@ class XmlDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputDefinition(InputDefinition $definition, array $options = array()) + protected function describeInputDefinition(InputDefinition $definition, array $options = []) { $this->writeDocument($this->getInputDefinitionDocument($definition)); } @@ -154,7 +154,7 @@ class XmlDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeCommand(Command $command, array $options = array()) + protected function describeCommand(Command $command, array $options = []) { $this->writeDocument($this->getCommandDocument($command)); } @@ -162,7 +162,7 @@ class XmlDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeApplication(Application $application, array $options = array()) + protected function describeApplication(Application $application, array $options = []) { $this->writeDocument($this->getApplicationDocument($application, isset($options['namespace']) ? $options['namespace'] : null)); } @@ -203,7 +203,7 @@ class XmlDescriptor extends Descriptor $descriptionXML->appendChild($dom->createTextNode($argument->getDescription())); $objectXML->appendChild($defaultsXML = $dom->createElement('defaults')); - $defaults = \is_array($argument->getDefault()) ? $argument->getDefault() : (\is_bool($argument->getDefault()) ? array(var_export($argument->getDefault(), true)) : ($argument->getDefault() ? array($argument->getDefault()) : array())); + $defaults = \is_array($argument->getDefault()) ? $argument->getDefault() : (\is_bool($argument->getDefault()) ? [var_export($argument->getDefault(), true)] : ($argument->getDefault() ? [$argument->getDefault()] : [])); foreach ($defaults as $default) { $defaultsXML->appendChild($defaultXML = $dom->createElement('default')); $defaultXML->appendChild($dom->createTextNode($default)); @@ -235,7 +235,7 @@ class XmlDescriptor extends Descriptor $descriptionXML->appendChild($dom->createTextNode($option->getDescription())); if ($option->acceptValue()) { - $defaults = \is_array($option->getDefault()) ? $option->getDefault() : (\is_bool($option->getDefault()) ? array(var_export($option->getDefault(), true)) : ($option->getDefault() ? array($option->getDefault()) : array())); + $defaults = \is_array($option->getDefault()) ? $option->getDefault() : (\is_bool($option->getDefault()) ? [var_export($option->getDefault(), true)] : ($option->getDefault() ? [$option->getDefault()] : [])); $objectXML->appendChild($defaultsXML = $dom->createElement('defaults')); if (!empty($defaults)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/EventListener/ErrorListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/EventListener/ErrorListener.php index 909d6ea3..212ad1d9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/EventListener/ErrorListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/EventListener/ErrorListener.php @@ -40,10 +40,10 @@ class ErrorListener implements EventSubscriberInterface $error = $event->getError(); if (!$inputString = $this->getInputString($event)) { - return $this->logger->error('An error occurred while using the console. Message: "{message}"', array('exception' => $error, 'message' => $error->getMessage())); + return $this->logger->error('An error occurred while using the console. Message: "{message}"', ['exception' => $error, 'message' => $error->getMessage()]); } - $this->logger->error('Error thrown while running command "{command}". Message: "{message}"', array('exception' => $error, 'command' => $inputString, 'message' => $error->getMessage())); + $this->logger->error('Error thrown while running command "{command}". Message: "{message}"', ['exception' => $error, 'command' => $inputString, 'message' => $error->getMessage()]); } public function onConsoleTerminate(ConsoleTerminateEvent $event) @@ -59,18 +59,18 @@ class ErrorListener implements EventSubscriberInterface } if (!$inputString = $this->getInputString($event)) { - return $this->logger->debug('The console exited with code "{code}"', array('code' => $exitCode)); + return $this->logger->debug('The console exited with code "{code}"', ['code' => $exitCode]); } - $this->logger->debug('Command "{command}" exited with code "{code}"', array('command' => $inputString, 'code' => $exitCode)); + $this->logger->debug('Command "{command}" exited with code "{code}"', ['command' => $inputString, 'code' => $exitCode]); } public static function getSubscribedEvents() { - return array( - ConsoleEvents::ERROR => array('onConsoleError', -128), - ConsoleEvents::TERMINATE => array('onConsoleTerminate', -128), - ); + return [ + ConsoleEvents::ERROR => ['onConsoleError', -128], + ConsoleEvents::TERMINATE => ['onConsoleTerminate', -128], + ]; } private static function getInputString(ConsoleEvent $event) @@ -80,7 +80,7 @@ class ErrorListener implements EventSubscriberInterface if (method_exists($input, '__toString')) { if ($commandName) { - return str_replace(array("'$commandName'", "\"$commandName\""), $commandName, (string) $input); + return str_replace(["'$commandName'", "\"$commandName\""], $commandName, (string) $input); } return (string) $input; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/CommandNotFoundException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/CommandNotFoundException.php index cb7d1131..d28fceb1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/CommandNotFoundException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/CommandNotFoundException.php @@ -26,7 +26,7 @@ class CommandNotFoundException extends \InvalidArgumentException implements Exce * @param int $code Exception code * @param \Exception $previous Previous exception used for the exception chaining */ - public function __construct($message, array $alternatives = array(), $code = 0, \Exception $previous = null) + public function __construct($message, array $alternatives = [], $code = 0, \Exception $previous = null) { parent::__construct($message, $code, $previous); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatter.php index 57b95eb1..adfcdc87 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatter.php @@ -21,7 +21,7 @@ use Symfony\Component\Console\Exception\InvalidArgumentException; class OutputFormatter implements OutputFormatterInterface { private $decorated; - private $styles = array(); + private $styles = []; private $styleStack; /** @@ -65,7 +65,7 @@ class OutputFormatter implements OutputFormatterInterface * @param bool $decorated Whether this formatter should actually decorate strings * @param OutputFormatterStyleInterface[] $styles Array of "name => FormatterStyle" instances */ - public function __construct($decorated = false, array $styles = array()) + public function __construct($decorated = false, array $styles = []) { $this->decorated = (bool) $decorated; @@ -157,7 +157,7 @@ class OutputFormatter implements OutputFormatterInterface if (!$open && !$tag) { // $this->styleStack->pop(); - } elseif (false === $style = $this->createStyleFromString(strtolower($tag))) { + } elseif (false === $style = $this->createStyleFromString($tag)) { $output .= $this->applyCurrentStyle($text); } elseif ($open) { $this->styleStack->push($style); @@ -169,7 +169,7 @@ class OutputFormatter implements OutputFormatterInterface $output .= $this->applyCurrentStyle(substr($message, $offset)); if (false !== strpos($output, "\0")) { - return strtr($output, array("\0" => '\\', '\\<' => '<')); + return strtr($output, ["\0" => '\\', '\\<' => '<']); } return str_replace('\\<', '<', $output); @@ -203,13 +203,14 @@ class OutputFormatter implements OutputFormatterInterface $style = new OutputFormatterStyle(); foreach ($matches as $match) { array_shift($match); + $match[0] = strtolower($match[0]); if ('fg' == $match[0]) { - $style->setForeground($match[1]); + $style->setForeground(strtolower($match[1])); } elseif ('bg' == $match[0]) { - $style->setBackground($match[1]); + $style->setBackground(strtolower($match[1])); } elseif ('options' === $match[0]) { - preg_match_all('([^,;]+)', $match[1], $options); + preg_match_all('([^,;]+)', strtolower($match[1]), $options); $options = array_shift($options); foreach ($options as $option) { try { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php index b884d713..b27439a7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php @@ -20,39 +20,39 @@ use Symfony\Component\Console\Exception\InvalidArgumentException; */ class OutputFormatterStyle implements OutputFormatterStyleInterface { - private static $availableForegroundColors = array( - 'black' => array('set' => 30, 'unset' => 39), - 'red' => array('set' => 31, 'unset' => 39), - 'green' => array('set' => 32, 'unset' => 39), - 'yellow' => array('set' => 33, 'unset' => 39), - 'blue' => array('set' => 34, 'unset' => 39), - 'magenta' => array('set' => 35, 'unset' => 39), - 'cyan' => array('set' => 36, 'unset' => 39), - 'white' => array('set' => 37, 'unset' => 39), - 'default' => array('set' => 39, 'unset' => 39), - ); - private static $availableBackgroundColors = array( - 'black' => array('set' => 40, 'unset' => 49), - 'red' => array('set' => 41, 'unset' => 49), - 'green' => array('set' => 42, 'unset' => 49), - 'yellow' => array('set' => 43, 'unset' => 49), - 'blue' => array('set' => 44, 'unset' => 49), - 'magenta' => array('set' => 45, 'unset' => 49), - 'cyan' => array('set' => 46, 'unset' => 49), - 'white' => array('set' => 47, 'unset' => 49), - 'default' => array('set' => 49, 'unset' => 49), - ); - private static $availableOptions = array( - 'bold' => array('set' => 1, 'unset' => 22), - 'underscore' => array('set' => 4, 'unset' => 24), - 'blink' => array('set' => 5, 'unset' => 25), - 'reverse' => array('set' => 7, 'unset' => 27), - 'conceal' => array('set' => 8, 'unset' => 28), - ); + private static $availableForegroundColors = [ + 'black' => ['set' => 30, 'unset' => 39], + 'red' => ['set' => 31, 'unset' => 39], + 'green' => ['set' => 32, 'unset' => 39], + 'yellow' => ['set' => 33, 'unset' => 39], + 'blue' => ['set' => 34, 'unset' => 39], + 'magenta' => ['set' => 35, 'unset' => 39], + 'cyan' => ['set' => 36, 'unset' => 39], + 'white' => ['set' => 37, 'unset' => 39], + 'default' => ['set' => 39, 'unset' => 39], + ]; + private static $availableBackgroundColors = [ + 'black' => ['set' => 40, 'unset' => 49], + 'red' => ['set' => 41, 'unset' => 49], + 'green' => ['set' => 42, 'unset' => 49], + 'yellow' => ['set' => 43, 'unset' => 49], + 'blue' => ['set' => 44, 'unset' => 49], + 'magenta' => ['set' => 45, 'unset' => 49], + 'cyan' => ['set' => 46, 'unset' => 49], + 'white' => ['set' => 47, 'unset' => 49], + 'default' => ['set' => 49, 'unset' => 49], + ]; + private static $availableOptions = [ + 'bold' => ['set' => 1, 'unset' => 22], + 'underscore' => ['set' => 4, 'unset' => 24], + 'blink' => ['set' => 5, 'unset' => 25], + 'reverse' => ['set' => 7, 'unset' => 27], + 'conceal' => ['set' => 8, 'unset' => 28], + ]; private $foreground; private $background; - private $options = array(); + private $options = []; /** * Initializes output formatter style. @@ -61,7 +61,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface * @param string|null $background The style background color name * @param array $options The style options */ - public function __construct($foreground = null, $background = null, array $options = array()) + public function __construct($foreground = null, $background = null, array $options = []) { if (null !== $foreground) { $this->setForeground($foreground); @@ -160,7 +160,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface */ public function setOptions(array $options) { - $this->options = array(); + $this->options = []; foreach ($options as $option) { $this->setOption($option); @@ -176,8 +176,8 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface */ public function apply($text) { - $setCodes = array(); - $unsetCodes = array(); + $setCodes = []; + $unsetCodes = []; if (null !== $this->foreground) { $setCodes[] = $this->foreground['set']; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php index 9e7283c2..50666499 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php @@ -36,7 +36,7 @@ class OutputFormatterStyleStack */ public function reset() { - $this->styles = array(); + $this->styles = []; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DebugFormatterHelper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DebugFormatterHelper.php index f5393ede..16d11755 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DebugFormatterHelper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DebugFormatterHelper.php @@ -20,8 +20,8 @@ namespace Symfony\Component\Console\Helper; */ class DebugFormatterHelper extends Helper { - private $colors = array('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default'); - private $started = array(); + private $colors = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default']; + private $started = []; private $count = -1; /** @@ -35,7 +35,7 @@ class DebugFormatterHelper extends Helper */ public function start($id, $message, $prefix = 'RUN') { - $this->started[$id] = array('border' => ++$this->count % \count($this->colors)); + $this->started[$id] = ['border' => ++$this->count % \count($this->colors)]; return sprintf("%s %s %s\n", $this->getBorder($id), $prefix, $message); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DescriptorHelper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DescriptorHelper.php index 54d3b1af..f8a3847b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DescriptorHelper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DescriptorHelper.php @@ -29,7 +29,7 @@ class DescriptorHelper extends Helper /** * @var DescriptorInterface[] */ - private $descriptors = array(); + private $descriptors = []; public function __construct() { @@ -54,12 +54,12 @@ class DescriptorHelper extends Helper * * @throws InvalidArgumentException when the given format is not supported */ - public function describe(OutputInterface $output, $object, array $options = array()) + public function describe(OutputInterface $output, $object, array $options = []) { - $options = array_merge(array( + $options = array_merge([ 'raw_text' => false, 'format' => 'txt', - ), $options); + ], $options); if (!isset($this->descriptors[$options['format']])) { throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $options['format'])); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/FormatterHelper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/FormatterHelper.php index 79ab2849..4ad63856 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/FormatterHelper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/FormatterHelper.php @@ -46,18 +46,18 @@ class FormatterHelper extends Helper public function formatBlock($messages, $style, $large = false) { if (!\is_array($messages)) { - $messages = array($messages); + $messages = [$messages]; } $len = 0; - $lines = array(); + $lines = []; foreach ($messages as $message) { $message = OutputFormatter::escape($message); $lines[] = sprintf($large ? ' %s ' : ' %s ', $message); $len = max($this->strlen($message) + ($large ? 4 : 2), $len); } - $messages = $large ? array(str_repeat(' ', $len)) : array(); + $messages = $large ? [str_repeat(' ', $len)] : []; for ($i = 0; isset($lines[$i]); ++$i) { $messages[] = $lines[$i].str_repeat(' ', $len - $this->strlen($lines[$i])); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/Helper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/Helper.php index 50901855..0ddddf6b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/Helper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/Helper.php @@ -74,17 +74,17 @@ abstract class Helper implements HelperInterface public static function formatTime($secs) { - static $timeFormats = array( - array(0, '< 1 sec'), - array(1, '1 sec'), - array(2, 'secs', 1), - array(60, '1 min'), - array(120, 'mins', 60), - array(3600, '1 hr'), - array(7200, 'hrs', 3600), - array(86400, '1 day'), - array(172800, 'days', 86400), - ); + static $timeFormats = [ + [0, '< 1 sec'], + [1, '1 sec'], + [2, 'secs', 1], + [60, '1 min'], + [120, 'mins', 60], + [3600, '1 hr'], + [7200, 'hrs', 3600], + [86400, '1 day'], + [172800, 'days', 86400], + ]; foreach ($timeFormats as $index => $format) { if ($secs >= $format[0]) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/HelperSet.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/HelperSet.php index 4c44b05f..c73fecd4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/HelperSet.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/HelperSet.php @@ -24,13 +24,13 @@ class HelperSet implements \IteratorAggregate /** * @var Helper[] */ - private $helpers = array(); + private $helpers = []; private $command; /** * @param Helper[] $helpers An array of helper */ - public function __construct(array $helpers = array()) + public function __construct(array $helpers = []) { foreach ($helpers as $alias => $helper) { $this->set($helper, \is_int($alias) ? null : $alias); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/ProgressBar.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/ProgressBar.php index bea03e31..17256551 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/ProgressBar.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/ProgressBar.php @@ -38,7 +38,7 @@ final class ProgressBar private $stepWidth; private $percent = 0.0; private $formatLineCount; - private $messages = array(); + private $messages = []; private $overwrite = true; private $terminal; private $firstRun = true; @@ -466,19 +466,16 @@ final class ProgressBar { if ($this->overwrite) { if (!$this->firstRun) { - // Move the cursor to the beginning of the line - $this->output->write("\x0D"); - - // Erase the line - $this->output->write("\x1B[2K"); - // Erase previous lines if ($this->formatLineCount > 0) { - $this->output->write(str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount)); + $message = str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount).$message; } + + // Move the cursor to the beginning of the line and erase the line + $message = "\x0D\x1B[2K$message"; } } elseif ($this->step > 0) { - $this->output->writeln(''); + $message = PHP_EOL.$message; } $this->firstRun = false; @@ -503,8 +500,8 @@ final class ProgressBar private static function initPlaceholderFormatters() { - return array( - 'bar' => function (ProgressBar $bar, OutputInterface $output) { + return [ + 'bar' => function (self $bar, OutputInterface $output) { $completeBars = floor($bar->getMaxSteps() > 0 ? $bar->getProgressPercent() * $bar->getBarWidth() : $bar->getProgress() % $bar->getBarWidth()); $display = str_repeat($bar->getBarCharacter(), $completeBars); if ($completeBars < $bar->getBarWidth()) { @@ -514,10 +511,10 @@ final class ProgressBar return $display; }, - 'elapsed' => function (ProgressBar $bar) { + 'elapsed' => function (self $bar) { return Helper::formatTime(time() - $bar->getStartTime()); }, - 'remaining' => function (ProgressBar $bar) { + 'remaining' => function (self $bar) { if (!$bar->getMaxSteps()) { throw new LogicException('Unable to display the remaining time if the maximum number of steps is not set.'); } @@ -530,7 +527,7 @@ final class ProgressBar return Helper::formatTime($remaining); }, - 'estimated' => function (ProgressBar $bar) { + 'estimated' => function (self $bar) { if (!$bar->getMaxSteps()) { throw new LogicException('Unable to display the estimated time if the maximum number of steps is not set.'); } @@ -543,24 +540,24 @@ final class ProgressBar return Helper::formatTime($estimated); }, - 'memory' => function (ProgressBar $bar) { + 'memory' => function (self $bar) { return Helper::formatMemory(memory_get_usage(true)); }, - 'current' => function (ProgressBar $bar) { + 'current' => function (self $bar) { return str_pad($bar->getProgress(), $bar->getStepWidth(), ' ', STR_PAD_LEFT); }, - 'max' => function (ProgressBar $bar) { + 'max' => function (self $bar) { return $bar->getMaxSteps(); }, - 'percent' => function (ProgressBar $bar) { + 'percent' => function (self $bar) { return floor($bar->getProgressPercent() * 100); }, - ); + ]; } private static function initFormats() { - return array( + return [ 'normal' => ' %current%/%max% [%bar%] %percent:3s%%', 'normal_nomax' => ' %current% [%bar%]', @@ -572,7 +569,7 @@ final class ProgressBar 'debug' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%', 'debug_nomax' => ' %current% [%bar%] %elapsed:6s% %memory:6s%', - ); + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/ProgressIndicator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/ProgressIndicator.php index 9de766a2..3f5751fa 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/ProgressIndicator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/ProgressIndicator.php @@ -48,7 +48,7 @@ class ProgressIndicator } if (null === $indicatorValues) { - $indicatorValues = array('-', '\\', '|', '/'); + $indicatorValues = ['-', '\\', '|', '/']; } $indicatorValues = array_values($indicatorValues); @@ -239,25 +239,25 @@ class ProgressIndicator private static function initPlaceholderFormatters() { - return array( - 'indicator' => function (ProgressIndicator $indicator) { + return [ + 'indicator' => function (self $indicator) { return $indicator->indicatorValues[$indicator->indicatorCurrent % \count($indicator->indicatorValues)]; }, - 'message' => function (ProgressIndicator $indicator) { + 'message' => function (self $indicator) { return $indicator->message; }, - 'elapsed' => function (ProgressIndicator $indicator) { + 'elapsed' => function (self $indicator) { return Helper::formatTime(time() - $indicator->startTime); }, 'memory' => function () { return Helper::formatMemory(memory_get_usage(true)); }, - ); + ]; } private static function initFormats() { - return array( + return [ 'normal' => ' %indicator% %message%', 'normal_no_ansi' => ' %message%', @@ -266,6 +266,6 @@ class ProgressIndicator 'very_verbose' => ' %indicator% %message% (%elapsed:6s%, %memory:6s%)', 'very_verbose_no_ansi' => ' %message% (%elapsed:6s%, %memory:6s%)', - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/QuestionHelper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/QuestionHelper.php index bdf10f0c..9c200fe8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/QuestionHelper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/QuestionHelper.php @@ -166,7 +166,7 @@ class QuestionHelper extends Helper if (false === $ret) { $ret = fgets($inputStream, 4096); if (false === $ret) { - throw new RuntimeException('Aborted'); + throw new RuntimeException('Aborted.'); } $ret = trim($ret); } @@ -191,7 +191,7 @@ class QuestionHelper extends Helper $message = $question->getQuestion(); if ($question instanceof ChoiceQuestion) { - $maxWidth = max(array_map(array($this, 'strlen'), array_keys($question->getChoices()))); + $maxWidth = max(array_map([$this, 'strlen'], array_keys($question->getChoices()))); $messages = (array) $question->getQuestion(); foreach ($question->getChoices() as $key => $value) { @@ -252,8 +252,10 @@ class QuestionHelper extends Helper while (!feof($inputStream)) { $c = fread($inputStream, 1); - // Backspace Character - if ("\177" === $c) { + // as opposed to fgets(), fread() returns an empty string when the stream content is empty, not false. + if (false === $c || ('' === $ret && '' === $c && null === $question->getDefault())) { + throw new RuntimeException('Aborted.'); + } elseif ("\177" === $c) { // Backspace Character if (0 === $numMatches && 0 !== $i) { --$i; // Move cursor backwards @@ -306,6 +308,10 @@ class QuestionHelper extends Helper continue; } else { + if ("\x80" <= $c) { + $c .= fread($inputStream, ["\xC0" => 1, "\xD0" => 1, "\xE0" => 2, "\xF0" => 3][$c & "\xF0"]); + } + $output->write($c); $ret .= $c; ++$i; @@ -380,7 +386,7 @@ class QuestionHelper extends Helper shell_exec(sprintf('stty %s', $sttyMode)); if (false === $value) { - throw new RuntimeException('Aborted'); + throw new RuntimeException('Aborted.'); } $value = trim($value); @@ -448,7 +454,7 @@ class QuestionHelper extends Helper if (file_exists('/usr/bin/env')) { // handle other OSs with bash/zsh/ksh/csh if available to hide the answer $test = "/usr/bin/env %s -c 'echo OK' 2> /dev/null"; - foreach (array('bash', 'zsh', 'ksh', 'csh') as $sh) { + foreach (['bash', 'zsh', 'ksh', 'csh'] as $sh) { if ('OK' === rtrim(shell_exec(sprintf($test, $sh)))) { self::$shell = $sh; break; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/Table.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/Table.php index c15e5ab2..1c439dc1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/Table.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/Table.php @@ -27,17 +27,17 @@ class Table /** * Table headers. */ - private $headers = array(); + private $headers = []; /** * Table rows. */ - private $rows = array(); + private $rows = []; /** * Column widths cache. */ - private $effectiveColumnWidths = array(); + private $effectiveColumnWidths = []; /** * Number of columns cache. @@ -59,14 +59,14 @@ class Table /** * @var array */ - private $columnStyles = array(); + private $columnStyles = []; /** * User set column widths. * * @var array */ - private $columnWidths = array(); + private $columnWidths = []; private static $styles; @@ -199,7 +199,7 @@ class Table */ public function setColumnWidths(array $widths) { - $this->columnWidths = array(); + $this->columnWidths = []; foreach ($widths as $index => $width) { $this->setColumnWidth($index, $width); } @@ -211,7 +211,7 @@ class Table { $headers = array_values($headers); if (!empty($headers) && !\is_array($headers[0])) { - $headers = array($headers); + $headers = [$headers]; } $this->headers = $headers; @@ -221,7 +221,7 @@ class Table public function setRows(array $rows) { - $this->rows = array(); + $this->rows = []; return $this->addRows($rows); } @@ -402,7 +402,7 @@ class Table return; } - $columns = array(0); + $columns = [0]; foreach (array_merge($this->headers, $this->rows) as $row) { if ($row instanceof TableSeparator) { continue; @@ -416,7 +416,7 @@ class Table private function buildTableRows($rows) { - $unmergedRows = array(); + $unmergedRows = []; for ($rowKey = 0; $rowKey < \count($rows); ++$rowKey) { $rows = $this->fillNextRows($rows, $rowKey); @@ -428,7 +428,7 @@ class Table $lines = explode("\n", str_replace("\n", "\n", $cell)); foreach ($lines as $lineKey => $line) { if ($cell instanceof TableCell) { - $line = new TableCell($line, array('colspan' => $cell->getColspan())); + $line = new TableCell($line, ['colspan' => $cell->getColspan()]); } if (0 === $lineKey) { $rows[$rowKey][$column] = $line; @@ -439,7 +439,7 @@ class Table } } - $tableRows = array(); + $tableRows = []; foreach ($rows as $rowKey => $row) { $tableRows[] = $this->fillCells($row); if (isset($unmergedRows[$rowKey])) { @@ -462,27 +462,27 @@ class Table */ private function fillNextRows(array $rows, $line) { - $unmergedRows = array(); + $unmergedRows = []; foreach ($rows[$line] as $column => $cell) { if (null !== $cell && !$cell instanceof TableCell && !is_scalar($cell) && !(\is_object($cell) && method_exists($cell, '__toString'))) { throw new InvalidArgumentException(sprintf('A cell must be a TableCell, a scalar or an object implementing __toString, %s given.', \gettype($cell))); } if ($cell instanceof TableCell && $cell->getRowspan() > 1) { $nbLines = $cell->getRowspan() - 1; - $lines = array($cell); + $lines = [$cell]; if (strstr($cell, "\n")) { $lines = explode("\n", str_replace("\n", "\n", $cell)); $nbLines = \count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines; - $rows[$line][$column] = new TableCell($lines[0], array('colspan' => $cell->getColspan())); + $rows[$line][$column] = new TableCell($lines[0], ['colspan' => $cell->getColspan()]); unset($lines[0]); } // create a two dimensional array (rowspan x colspan) - $unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, array()), $unmergedRows); + $unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, []), $unmergedRows); foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) { $value = isset($lines[$unmergedRowKey - $line]) ? $lines[$unmergedRowKey - $line] : ''; - $unmergedRows[$unmergedRowKey][$column] = new TableCell($value, array('colspan' => $cell->getColspan())); + $unmergedRows[$unmergedRowKey][$column] = new TableCell($value, ['colspan' => $cell->getColspan()]); if ($nbLines === $unmergedRowKey - $line) { break; } @@ -495,7 +495,7 @@ class Table if (isset($rows[$unmergedRowKey]) && \is_array($rows[$unmergedRowKey]) && ($this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRows[$unmergedRowKey]) <= $this->numberOfColumns)) { foreach ($unmergedRow as $cellKey => $cell) { // insert cell into row at cellKey position - array_splice($rows[$unmergedRowKey], $cellKey, 0, array($cell)); + array_splice($rows[$unmergedRowKey], $cellKey, 0, [$cell]); } } else { $row = $this->copyRow($rows, $unmergedRowKey - 1); @@ -504,7 +504,7 @@ class Table $row[$column] = $unmergedRow[$column]; } } - array_splice($rows, $unmergedRowKey, 0, array($row)); + array_splice($rows, $unmergedRowKey, 0, [$row]); } } @@ -518,7 +518,7 @@ class Table */ private function fillCells($row) { - $newRow = array(); + $newRow = []; foreach ($row as $column => $cell) { $newRow[] = $cell; if ($cell instanceof TableCell && $cell->getColspan() > 1) { @@ -544,7 +544,7 @@ class Table foreach ($row as $cellKey => $cellValue) { $row[$cellKey] = ''; if ($cellValue instanceof TableCell) { - $row[$cellKey] = new TableCell('', array('colspan' => $cellValue->getColspan())); + $row[$cellKey] = new TableCell('', ['colspan' => $cellValue->getColspan()]); } } @@ -590,7 +590,7 @@ class Table private function calculateColumnsWidth(array $rows) { for ($column = 0; $column < $this->numberOfColumns; ++$column) { - $lengths = array(); + $lengths = []; foreach ($rows as $row) { if ($row instanceof TableSeparator) { continue; @@ -653,7 +653,7 @@ class Table */ private function cleanup() { - $this->effectiveColumnWidths = array(); + $this->effectiveColumnWidths = []; $this->numberOfColumns = null; } @@ -682,12 +682,12 @@ class Table ->setCellHeaderFormat('%s') ; - return array( + return [ 'default' => new TableStyle(), 'borderless' => $borderless, 'compact' => $compact, 'symfony-style-guide' => $styleGuide, - ); + ]; } private function resolveStyle($name) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableCell.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableCell.php index fb6c9fd3..cc514532 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableCell.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableCell.php @@ -19,16 +19,16 @@ use Symfony\Component\Console\Exception\InvalidArgumentException; class TableCell { private $value; - private $options = array( + private $options = [ 'rowspan' => 1, 'colspan' => 1, - ); + ]; /** * @param string $value * @param array $options */ - public function __construct($value = '', array $options = array()) + public function __construct($value = '', array $options = []) { if (is_numeric($value) && !\is_string($value)) { $value = (string) $value; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableSeparator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableSeparator.php index c7b8dc9c..e541c531 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableSeparator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableSeparator.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Console\Helper; */ class TableSeparator extends TableCell { - public function __construct(array $options = array()) + public function __construct(array $options = []) { parent::__construct('', $options); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableStyle.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableStyle.php index 0ee9dd16..bc9c7e94 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableStyle.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableStyle.php @@ -237,7 +237,7 @@ class TableStyle */ public function setPadType($padType) { - if (!\in_array($padType, array(STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH), true)) { + if (!\in_array($padType, [STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH], true)) { throw new InvalidArgumentException('Invalid padding type. Expected one of (STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH).'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArgvInput.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArgvInput.php index 516fd87f..f604057e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArgvInput.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArgvInput.php @@ -174,7 +174,7 @@ class ArgvInput extends Input // if input is expecting another argument, add it if ($this->definition->hasArgument($c)) { $arg = $this->definition->getArgument($c); - $this->arguments[$arg->getName()] = $arg->isArray() ? array($token) : $token; + $this->arguments[$arg->getName()] = $arg->isArray() ? [$token] : $token; // if last argument isArray(), append token to last argument } elseif ($this->definition->hasArgument($c - 1) && $this->definition->getArgument($c - 1)->isArray()) { @@ -229,11 +229,11 @@ class ArgvInput extends Input throw new RuntimeException(sprintf('The "--%s" option does not accept a value.', $name)); } - if (\in_array($value, array('', null), true) && $option->acceptValue() && \count($this->parsed)) { + if (\in_array($value, ['', null], true) && $option->acceptValue() && \count($this->parsed)) { // if option accepts an optional or mandatory argument // let's see if there is one provided $next = array_shift($this->parsed); - if ((isset($next[0]) && '-' !== $next[0]) || \in_array($next, array('', null), true)) { + if ((isset($next[0]) && '-' !== $next[0]) || \in_array($next, ['', null], true)) { $value = $next; } else { array_unshift($this->parsed, $next); @@ -262,8 +262,27 @@ class ArgvInput extends Input */ public function getFirstArgument() { - foreach ($this->tokens as $token) { + $isOption = false; + foreach ($this->tokens as $i => $token) { if ($token && '-' === $token[0]) { + if (false !== strpos($token, '=') || !isset($this->tokens[$i + 1])) { + continue; + } + + // If it's a long option, consider that everything after "--" is the option name. + // Otherwise, use the last char (if it's a short option set, only the last one can take a value with space separator) + $name = '-' === $token[1] ? substr($token, 2) : substr($token, -1); + if (!isset($this->options[$name]) && !$this->definition->hasShortcut($name)) { + // noop + } elseif ((isset($this->options[$name]) || isset($this->options[$name = $this->definition->shortcutToName($name)])) && $this->tokens[$i + 1] === $this->options[$name]) { + $isOption = true; + } + + continue; + } + + if ($isOption) { + $isOption = false; continue; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArrayInput.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArrayInput.php index 8b6917fc..44c2f0d5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArrayInput.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArrayInput.php @@ -19,7 +19,7 @@ use Symfony\Component\Console\Exception\InvalidOptionException; * * Usage: * - * $input = new ArrayInput(array('name' => 'foo', '--bar' => 'foobar')); + * $input = new ArrayInput(['command' => 'foo:bar', 'foo' => 'bar', '--bar' => 'foobar']); * * @author Fabien Potencier */ @@ -103,7 +103,7 @@ class ArrayInput extends Input */ public function __toString() { - $params = array(); + $params = []; foreach ($this->parameters as $param => $val) { if ($param && '-' === $param[0]) { if (\is_array($val)) { @@ -114,7 +114,7 @@ class ArrayInput extends Input $params[] = $param.('' != $val ? '='.$this->escapeToken($val) : ''); } } else { - $params[] = \is_array($val) ? implode(' ', array_map(array($this, 'escapeToken'), $val)) : $this->escapeToken($val); + $params[] = \is_array($val) ? implode(' ', array_map([$this, 'escapeToken'], $val)) : $this->escapeToken($val); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/Input.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/Input.php index fa5644d1..c1220316 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/Input.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/Input.php @@ -29,8 +29,8 @@ abstract class Input implements InputInterface, StreamableInputInterface { protected $definition; protected $stream; - protected $options = array(); - protected $arguments = array(); + protected $options = []; + protected $arguments = []; protected $interactive = true; public function __construct(InputDefinition $definition = null) @@ -48,8 +48,8 @@ abstract class Input implements InputInterface, StreamableInputInterface */ public function bind(InputDefinition $definition) { - $this->arguments = array(); - $this->options = array(); + $this->arguments = []; + $this->options = []; $this->definition = $definition; $this->parse(); @@ -69,7 +69,7 @@ abstract class Input implements InputInterface, StreamableInputInterface $givenArguments = $this->arguments; $missingArguments = array_filter(array_keys($definition->getArguments()), function ($argument) use ($definition, $givenArguments) { - return !array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired(); + return !\array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired(); }); if (\count($missingArguments) > 0) { @@ -150,7 +150,7 @@ abstract class Input implements InputInterface, StreamableInputInterface throw new InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); } - return array_key_exists($name, $this->options) ? $this->options[$name] : $this->definition->getOption($name)->getDefault(); + return \array_key_exists($name, $this->options) ? $this->options[$name] : $this->definition->getOption($name)->getDefault(); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputArgument.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputArgument.php index 5b3b98ba..4c2b6a66 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputArgument.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputArgument.php @@ -98,7 +98,7 @@ class InputArgument if ($this->isArray()) { if (null === $default) { - $default = array(); + $default = []; } elseif (!\is_array($default)) { throw new LogicException('A default value for an array argument must be an array.'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputDefinition.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputDefinition.php index 19f8db33..53f41d73 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputDefinition.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputDefinition.php @@ -19,10 +19,10 @@ use Symfony\Component\Console\Exception\LogicException; * * Usage: * - * $definition = new InputDefinition(array( + * $definition = new InputDefinition([ * new InputArgument('name', InputArgument::REQUIRED), * new InputOption('foo', 'f', InputOption::VALUE_REQUIRED), - * )); + * ]); * * @author Fabien Potencier */ @@ -38,7 +38,7 @@ class InputDefinition /** * @param array $definition An array of InputArgument and InputOption instance */ - public function __construct(array $definition = array()) + public function __construct(array $definition = []) { $this->setDefinition($definition); } @@ -48,8 +48,8 @@ class InputDefinition */ public function setDefinition(array $definition) { - $arguments = array(); - $options = array(); + $arguments = []; + $options = []; foreach ($definition as $item) { if ($item instanceof InputOption) { $options[] = $item; @@ -67,9 +67,9 @@ class InputDefinition * * @param InputArgument[] $arguments An array of InputArgument objects */ - public function setArguments($arguments = array()) + public function setArguments($arguments = []) { - $this->arguments = array(); + $this->arguments = []; $this->requiredCount = 0; $this->hasOptional = false; $this->hasAnArrayArgument = false; @@ -81,7 +81,7 @@ class InputDefinition * * @param InputArgument[] $arguments An array of InputArgument objects */ - public function addArguments($arguments = array()) + public function addArguments($arguments = []) { if (null !== $arguments) { foreach ($arguments as $argument) { @@ -191,7 +191,7 @@ class InputDefinition */ public function getArgumentDefaults() { - $values = array(); + $values = []; foreach ($this->arguments as $argument) { $values[$argument->getName()] = $argument->getDefault(); } @@ -204,10 +204,10 @@ class InputDefinition * * @param InputOption[] $options An array of InputOption objects */ - public function setOptions($options = array()) + public function setOptions($options = []) { - $this->options = array(); - $this->shortcuts = array(); + $this->options = []; + $this->shortcuts = []; $this->addOptions($options); } @@ -216,7 +216,7 @@ class InputDefinition * * @param InputOption[] $options An array of InputOption objects */ - public function addOptions($options = array()) + public function addOptions($options = []) { foreach ($options as $option) { $this->addOption($option); @@ -322,7 +322,7 @@ class InputDefinition */ public function getOptionDefaults() { - $values = array(); + $values = []; foreach ($this->options as $option) { $values[$option->getName()] = $option->getDefault(); } @@ -338,8 +338,10 @@ class InputDefinition * @return string The InputOption name * * @throws InvalidArgumentException When option given does not exist + * + * @internal */ - private function shortcutToName($shortcut) + public function shortcutToName($shortcut) { if (!isset($this->shortcuts[$shortcut])) { throw new InvalidArgumentException(sprintf('The "-%s" option does not exist.', $shortcut)); @@ -357,7 +359,7 @@ class InputDefinition */ public function getSynopsis($short = false) { - $elements = array(); + $elements = []; if ($short && $this->getOptions()) { $elements[] = '[options]'; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputOption.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputOption.php index 20c9d2ea..b0bd28f5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputOption.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputOption.php @@ -34,7 +34,7 @@ class InputOption /** * @param string $name The option name - * @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts + * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts * @param int|null $mode The option mode: One of the VALUE_* constants * @param string $description A description text * @param string|string[]|int|bool|null $default The default value (must be null for self::VALUE_NONE) @@ -89,7 +89,7 @@ class InputOption /** * Returns the option shortcut. * - * @return string The shortcut + * @return string|null The shortcut */ public function getShortcut() { @@ -161,7 +161,7 @@ class InputOption if ($this->isArray()) { if (null === $default) { - $default = array(); + $default = []; } elseif (!\is_array($default)) { throw new LogicException('A default value for an array option must be an array.'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/StringInput.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/StringInput.php index eb39ad69..32d270fa 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/StringInput.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Input/StringInput.php @@ -32,7 +32,7 @@ class StringInput extends ArgvInput */ public function __construct($input) { - parent::__construct(array()); + parent::__construct([]); $this->setTokens($this->tokenize($input)); } @@ -48,13 +48,13 @@ class StringInput extends ArgvInput */ private function tokenize($input) { - $tokens = array(); + $tokens = []; $length = \strlen($input); $cursor = 0; while ($cursor < $length) { if (preg_match('/\s+/A', $input, $match, null, $cursor)) { } elseif (preg_match('/([^="\'\s]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, null, $cursor)) { - $tokens[] = $match[1].$match[2].stripcslashes(str_replace(array('"\'', '\'"', '\'\'', '""'), '', substr($match[3], 1, \strlen($match[3]) - 2))); + $tokens[] = $match[1].$match[2].stripcslashes(str_replace(['"\'', '\'"', '\'\'', '""'], '', substr($match[3], 1, \strlen($match[3]) - 2))); } elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, null, $cursor)) { $tokens[] = stripcslashes(substr($match[0], 1, \strlen($match[0]) - 2)); } elseif (preg_match('/'.self::REGEX_STRING.'/A', $input, $match, null, $cursor)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Logger/ConsoleLogger.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Logger/ConsoleLogger.php index ea7f9bf2..e531bb1c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Logger/ConsoleLogger.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Logger/ConsoleLogger.php @@ -30,7 +30,7 @@ class ConsoleLogger extends AbstractLogger const ERROR = 'error'; private $output; - private $verbosityLevelMap = array( + private $verbosityLevelMap = [ LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL, @@ -39,8 +39,8 @@ class ConsoleLogger extends AbstractLogger LogLevel::NOTICE => OutputInterface::VERBOSITY_VERBOSE, LogLevel::INFO => OutputInterface::VERBOSITY_VERY_VERBOSE, LogLevel::DEBUG => OutputInterface::VERBOSITY_DEBUG, - ); - private $formatLevelMap = array( + ]; + private $formatLevelMap = [ LogLevel::EMERGENCY => self::ERROR, LogLevel::ALERT => self::ERROR, LogLevel::CRITICAL => self::ERROR, @@ -49,10 +49,10 @@ class ConsoleLogger extends AbstractLogger LogLevel::NOTICE => self::INFO, LogLevel::INFO => self::INFO, LogLevel::DEBUG => self::INFO, - ); + ]; private $errored = false; - public function __construct(OutputInterface $output, array $verbosityLevelMap = array(), array $formatLevelMap = array()) + public function __construct(OutputInterface $output, array $verbosityLevelMap = [], array $formatLevelMap = []) { $this->output = $output; $this->verbosityLevelMap = $verbosityLevelMap + $this->verbosityLevelMap; @@ -62,7 +62,7 @@ class ConsoleLogger extends AbstractLogger /** * {@inheritdoc} */ - public function log($level, $message, array $context = array()) + public function log($level, $message, array $context = []) { if (!isset($this->verbosityLevelMap[$level])) { throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level)); @@ -111,7 +111,7 @@ class ConsoleLogger extends AbstractLogger return $message; } - $replacements = array(); + $replacements = []; foreach ($context as $key => $val) { if (null === $val || is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) { $replacements["{{$key}}"] = $val; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Output/ConsoleOutput.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Output/ConsoleOutput.php index 3cb0fb1a..61dc7cbd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Output/ConsoleOutput.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Output/ConsoleOutput.php @@ -121,11 +121,11 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface */ private function isRunningOS400() { - $checks = array( + $checks = [ \function_exists('php_uname') ? php_uname('s') : '', getenv('OSTYPE'), PHP_OS, - ); + ]; return false !== stripos(implode(';', $checks), 'OS400'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Question/ChoiceQuestion.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Question/ChoiceQuestion.php index 0a45d749..5cb50569 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Question/ChoiceQuestion.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Question/ChoiceQuestion.php @@ -144,12 +144,12 @@ class ChoiceQuestion extends Question } $selectedChoices = explode(',', $selectedChoices); } else { - $selectedChoices = array($selected); + $selectedChoices = [$selected]; } - $multiselectChoices = array(); + $multiselectChoices = []; foreach ($selectedChoices as $value) { - $results = array(); + $results = []; foreach ($choices as $key => $choice) { if ($choice === $value) { $results[] = $key; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Question/ConfirmationQuestion.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Question/ConfirmationQuestion.php index 150ab27f..d871fb8a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Question/ConfirmationQuestion.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Question/ConfirmationQuestion.php @@ -53,7 +53,7 @@ class ConfirmationQuestion extends Question return $answer && $answerIsTrue; } - return !$answer || $answerIsTrue; + return '' === $answer || $answerIsTrue; }; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Style/SymfonyStyle.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Style/SymfonyStyle.php index e74ab662..e0ced01b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Style/SymfonyStyle.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Style/SymfonyStyle.php @@ -63,7 +63,7 @@ class SymfonyStyle extends OutputStyle */ public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = true) { - $messages = \is_array($messages) ? array_values($messages) : array($messages); + $messages = \is_array($messages) ? array_values($messages) : [$messages]; $this->autoPrependBlock(); $this->writeln($this->createBlock($messages, $type, $style, $prefix, $padding, $escape)); @@ -76,10 +76,10 @@ class SymfonyStyle extends OutputStyle public function title($message) { $this->autoPrependBlock(); - $this->writeln(array( + $this->writeln([ sprintf('%s', OutputFormatter::escapeTrailingBackslash($message)), sprintf('%s', str_repeat('=', Helper::strlenWithoutDecoration($this->getFormatter(), $message))), - )); + ]); $this->newLine(); } @@ -89,10 +89,10 @@ class SymfonyStyle extends OutputStyle public function section($message) { $this->autoPrependBlock(); - $this->writeln(array( + $this->writeln([ sprintf('%s', OutputFormatter::escapeTrailingBackslash($message)), sprintf('%s', str_repeat('-', Helper::strlenWithoutDecoration($this->getFormatter(), $message))), - )); + ]); $this->newLine(); } @@ -117,7 +117,7 @@ class SymfonyStyle extends OutputStyle { $this->autoPrependText(); - $messages = \is_array($message) ? array_values($message) : array($message); + $messages = \is_array($message) ? array_values($message) : [$message]; foreach ($messages as $message) { $this->writeln(sprintf(' %s', $message)); } @@ -376,14 +376,14 @@ class SymfonyStyle extends OutputStyle // Preserve the last 4 chars inserted (PHP_EOL on windows is two chars) in the history buffer return array_map(function ($value) { return substr($value, -4); - }, array_merge(array($this->bufferedOutput->fetch()), (array) $messages)); + }, array_merge([$this->bufferedOutput->fetch()], (array) $messages)); } private function createBlock($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = false) { $indentLength = 0; $prefixLength = Helper::strlenWithoutDecoration($this->getFormatter(), $prefix); - $lines = array(); + $lines = []; if (null !== $type) { $type = sprintf('[%s] ', $type); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Terminal.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Terminal.php index 3930ca0c..456cca11 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Terminal.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Terminal.php @@ -91,11 +91,11 @@ class Terminal return; } - $descriptorspec = array( - 1 => array('pipe', 'w'), - 2 => array('pipe', 'w'), - ); - $process = proc_open('mode CON', $descriptorspec, $pipes, null, null, array('suppress_errors' => true)); + $descriptorspec = [ + 1 => ['pipe', 'w'], + 2 => ['pipe', 'w'], + ]; + $process = proc_open('mode CON', $descriptorspec, $pipes, null, null, ['suppress_errors' => true]); if (\is_resource($process)) { $info = stream_get_contents($pipes[1]); fclose($pipes[1]); @@ -103,7 +103,7 @@ class Terminal proc_close($process); if (preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', $info, $matches)) { - return array((int) $matches[2], (int) $matches[1]); + return [(int) $matches[2], (int) $matches[1]]; } } } @@ -119,12 +119,12 @@ class Terminal return; } - $descriptorspec = array( - 1 => array('pipe', 'w'), - 2 => array('pipe', 'w'), - ); + $descriptorspec = [ + 1 => ['pipe', 'w'], + 2 => ['pipe', 'w'], + ]; - $process = proc_open('stty -a | grep columns', $descriptorspec, $pipes, null, null, array('suppress_errors' => true)); + $process = proc_open('stty -a | grep columns', $descriptorspec, $pipes, null, null, ['suppress_errors' => true]); if (\is_resource($process)) { $info = stream_get_contents($pipes[1]); fclose($pipes[1]); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tester/ApplicationTester.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tester/ApplicationTester.php index c0f8c720..dc970182 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tester/ApplicationTester.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tester/ApplicationTester.php @@ -59,14 +59,14 @@ class ApplicationTester * * @return int The command exit code */ - public function run(array $input, $options = array()) + public function run(array $input, $options = []) { $this->input = new ArrayInput($input); if (isset($options['interactive'])) { $this->input->setInteractive($options['interactive']); } - $this->captureStreamsIndependently = array_key_exists('capture_stderr_separately', $options) && $options['capture_stderr_separately']; + $this->captureStreamsIndependently = \array_key_exists('capture_stderr_separately', $options) && $options['capture_stderr_separately']; if (!$this->captureStreamsIndependently) { $this->output = new StreamOutput(fopen('php://memory', 'w', false)); if (isset($options['decorated'])) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tester/CommandTester.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tester/CommandTester.php index 131ca9b1..f869995e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tester/CommandTester.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tester/CommandTester.php @@ -28,7 +28,7 @@ class CommandTester private $command; private $input; private $output; - private $inputs = array(); + private $inputs = []; private $statusCode; public function __construct(Command $command) @@ -50,7 +50,7 @@ class CommandTester * * @return int The command exit code */ - public function execute(array $input, array $options = array()) + public function execute(array $input, array $options = []) { // set the command name automatically if the application requires // this argument and no command name was passed @@ -58,13 +58,12 @@ class CommandTester && (null !== $application = $this->command->getApplication()) && $application->getDefinition()->hasArgument('command') ) { - $input = array_merge(array('command' => $this->command->getName()), $input); + $input = array_merge(['command' => $this->command->getName()], $input); } $this->input = new ArrayInput($input); - if ($this->inputs) { - $this->input->setStream(self::createStream($this->inputs)); - } + // Use an in-memory input stream even if no inputs are set so that QuestionHelper::ask() does not rely on the blocking STDIN. + $this->input->setStream(self::createStream($this->inputs)); if (isset($options['interactive'])) { $this->input->setInteractive($options['interactive']); @@ -148,7 +147,10 @@ class CommandTester { $stream = fopen('php://memory', 'r+', false); - fwrite($stream, implode(PHP_EOL, $inputs)); + foreach ($inputs as $input) { + fwrite($stream, $input.PHP_EOL); + } + rewind($stream); return $stream; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php index 7922ce27..ae9d130f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php @@ -83,7 +83,7 @@ class ApplicationTest extends TestCase $application = new Application('foo', 'bar'); $this->assertEquals('foo', $application->getName(), '__construct() takes the application name as its first argument'); $this->assertEquals('bar', $application->getVersion(), '__construct() takes the application version as its second argument'); - $this->assertEquals(array('help', 'list'), array_keys($application->all()), '__construct() registered the help and list commands by default'); + $this->assertEquals(['help', 'list'], array_keys($application->all()), '__construct() registered the help and list commands by default'); } public function testSetGetName() @@ -133,9 +133,9 @@ class ApplicationTest extends TestCase $commands = $application->all('foo'); $this->assertCount(1, $commands, '->all() takes a namespace as its first argument'); - $application->setCommandLoader(new FactoryCommandLoader(array( + $application->setCommandLoader(new FactoryCommandLoader([ 'foo:bar1' => function () { return new \Foo1Command(); }, - ))); + ])); $commands = $application->all('foo'); $this->assertCount(2, $commands, '->all() takes a namespace as its first argument'); $this->assertInstanceOf(\FooCommand::class, $commands['foo:bar'], '->all() returns the registered commands'); @@ -157,9 +157,9 @@ class ApplicationTest extends TestCase $this->assertEquals($foo, $commands['foo:bar'], '->add() registers a command'); $application = new Application(); - $application->addCommands(array($foo = new \FooCommand(), $foo1 = new \Foo1Command())); + $application->addCommands([$foo = new \FooCommand(), $foo1 = new \Foo1Command()]); $commands = $application->all(); - $this->assertEquals(array($foo, $foo1), array($commands['foo:bar'], $commands['foo:bar1']), '->addCommands() registers an array of commands'); + $this->assertEquals([$foo, $foo1], [$commands['foo:bar'], $commands['foo:bar1']], '->addCommands() registers an array of commands'); } /** @@ -205,9 +205,9 @@ class ApplicationTest extends TestCase $this->assertEquals($foo, $application->get('foo:bar'), '->get() returns a command by name'); $this->assertEquals($foo, $application->get('afoobar'), '->get() returns a command by alias'); - $application->setCommandLoader(new FactoryCommandLoader(array( + $application->setCommandLoader(new FactoryCommandLoader([ 'foo:bar1' => function () { return new \Foo1Command(); }, - ))); + ])); $this->assertTrue($application->has('afoobar'), '->has() returns true if an instance is registered for an alias even with command loader'); $this->assertEquals($foo, $application->get('foo:bar'), '->get() returns an instance by name even with command loader'); @@ -225,7 +225,7 @@ class ApplicationTest extends TestCase $application->setCatchExceptions(false); $tester = new ApplicationTester($application); - $tester->run(array('-h' => true, '-q' => true), array('decorated' => false)); + $tester->run(['-h' => true, '-q' => true], ['decorated' => false]); $this->assertEmpty($tester->getDisplay(true)); } @@ -245,7 +245,7 @@ class ApplicationTest extends TestCase $application = new Application(); $application->add(new \FooCommand()); $application->add(new \Foo1Command()); - $this->assertEquals(array('foo'), $application->getNamespaces(), '->getNamespaces() returns an array of unique used namespaces'); + $this->assertEquals(['foo'], $application->getNamespaces(), '->getNamespaces() returns an array of unique used namespaces'); } public function testFindNamespace() @@ -367,9 +367,9 @@ class ApplicationTest extends TestCase public function testFindWithCommandLoader() { $application = new Application(); - $application->setCommandLoader(new FactoryCommandLoader(array( + $application->setCommandLoader(new FactoryCommandLoader([ 'foo:bar' => $f = function () { return new \FooCommand(); }, - ))); + ])); $this->assertInstanceOf('FooCommand', $application->find('foo:bar'), '->find() returns a command if its name exists'); $this->assertInstanceOf('Symfony\Component\Console\Command\HelpCommand', $application->find('h'), '->find() returns a command if its name exists'); @@ -400,23 +400,23 @@ class ApplicationTest extends TestCase public function provideAmbiguousAbbreviations() { - return array( - array('f', 'Command "f" is not defined.'), - array( + return [ + ['f', 'Command "f" is not defined.'], + [ 'a', "Command \"a\" is ambiguous.\nDid you mean one of these?\n". " afoobar The foo:bar command\n". " afoobar1 The foo:bar1 command\n". ' afoobar2 The foo1:bar command', - ), - array( + ], + [ 'foo:b', "Command \"foo:b\" is ambiguous.\nDid you mean one of these?\n". " foo:bar The foo:bar command\n". " foo:bar1 The foo:bar1 command\n". ' foo1:bar The foo1:bar command', - ), - ); + ], + ]; } public function testFindCommandEqualNamespace() @@ -460,10 +460,10 @@ class ApplicationTest extends TestCase public function provideInvalidCommandNamesSingle() { - return array( - array('foo3:barr'), - array('fooo3:bar'), - ); + return [ + ['foo3:barr'], + ['fooo3:bar'], + ]; } public function testFindAlternativeExceptionMessageMultiple() @@ -521,7 +521,7 @@ class ApplicationTest extends TestCase $this->fail('->find() throws a CommandNotFoundException if command does not exist'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command does not exist'); - $this->assertSame(array(), $e->getAlternatives()); + $this->assertSame([], $e->getAlternatives()); $this->assertEquals(sprintf('Command "%s" is not defined.', $commandName), $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, without alternatives'); } @@ -532,7 +532,7 @@ class ApplicationTest extends TestCase $this->fail('->find() throws a CommandNotFoundException if command does not exist'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command does not exist'); - $this->assertSame(array('afoobar1', 'foo:bar1'), $e->getAlternatives()); + $this->assertSame(['afoobar1', 'foo:bar1'], $e->getAlternatives()); $this->assertRegExp(sprintf('/Command "%s" is not defined./', $commandName), $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); $this->assertRegExp('/afoobar1/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternative : "afoobar1"'); $this->assertRegExp('/foo:bar1/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternative : "foo:bar1"'); @@ -543,7 +543,7 @@ class ApplicationTest extends TestCase public function testFindAlternativeCommandsWithAnAlias() { $fooCommand = new \FooCommand(); - $fooCommand->setAliases(array('foo2')); + $fooCommand->setAliases(['foo2']); $application = new Application(); $application->add($fooCommand); @@ -567,7 +567,7 @@ class ApplicationTest extends TestCase $this->fail('->find() throws a CommandNotFoundException if namespace does not exist'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if namespace does not exist'); - $this->assertSame(array(), $e->getAlternatives()); + $this->assertSame([], $e->getAlternatives()); $this->assertEquals('There are no commands defined in the "Unknown-namespace" namespace.', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, without alternatives'); } @@ -596,7 +596,7 @@ class ApplicationTest extends TestCase $application->add(new \Foo2Command()); $application->add(new \Foo3Command()); - $expectedAlternatives = array( + $expectedAlternatives = [ 'afoobar', 'afoobar1', 'afoobar2', @@ -604,7 +604,7 @@ class ApplicationTest extends TestCase 'foo3:bar', 'foo:bar', 'foo:bar1', - ); + ]; try { $application->find('foo'); @@ -619,10 +619,10 @@ class ApplicationTest extends TestCase public function testFindNamespaceDoesNotFailOnDeepSimilarNamespaces() { - $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('getNamespaces'))->getMock(); + $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(['getNamespaces'])->getMock(); $application->expects($this->once()) ->method('getNamespaces') - ->will($this->returnValue(array('foo:sublong', 'bar:sub'))); + ->will($this->returnValue(['foo:sublong', 'bar:sub'])); $this->assertEquals('foo:sublong', $application->findNamespace('f:sub')); } @@ -649,16 +649,16 @@ class ApplicationTest extends TestCase $application->setCatchExceptions(true); $this->assertTrue($application->areExceptionsCaught()); - $tester->run(array('command' => 'foo'), array('decorated' => false)); + $tester->run(['command' => 'foo'], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getDisplay(true), '->setCatchExceptions() sets the catch exception flag'); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getErrorOutput(true), '->setCatchExceptions() sets the catch exception flag'); $this->assertSame('', $tester->getDisplay(true)); $application->setCatchExceptions(false); try { - $tester->run(array('command' => 'foo'), array('decorated' => false)); + $tester->run(['command' => 'foo'], ['decorated' => false]); $this->fail('->setCatchExceptions() sets the catch exception flag'); } catch (\Exception $e) { $this->assertInstanceOf('\Exception', $e, '->setCatchExceptions() sets the catch exception flag'); @@ -682,29 +682,29 @@ class ApplicationTest extends TestCase putenv('COLUMNS=120'); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exception'); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo'], ['decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE, 'capture_stderr_separately' => true]); $this->assertContains('Exception trace', $tester->getErrorOutput(), '->renderException() renders a pretty exception with a stack trace when verbosity is verbose'); - $tester->run(array('command' => 'list', '--foo' => true), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'list', '--foo' => true], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception2.txt', $tester->getErrorOutput(true), '->renderException() renders the command synopsis when an exception occurs in the context of a command'); $application->add(new \Foo3Command()); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo3:bar'), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo3:bar'], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); - $tester->run(array('command' => 'foo3:bar'), array('decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); + $tester->run(['command' => 'foo3:bar'], ['decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE]); $this->assertRegExp('/\[Exception\]\s*First exception/', $tester->getDisplay(), '->renderException() renders a pretty exception without code exception when code exception is default and verbosity is verbose'); $this->assertRegExp('/\[Exception\]\s*Second exception/', $tester->getDisplay(), '->renderException() renders a pretty exception without code exception when code exception is 0 and verbosity is verbose'); $this->assertRegExp('/\[Exception \(404\)\]\s*Third exception/', $tester->getDisplay(), '->renderException() renders a pretty exception with code exception when code exception is 404 and verbosity is verbose'); - $tester->run(array('command' => 'foo3:bar'), array('decorated' => true)); + $tester->run(['command' => 'foo3:bar'], ['decorated' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3decorated.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions'); - $tester->run(array('command' => 'foo3:bar'), array('decorated' => true, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo3:bar'], ['decorated' => true, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); $application = new Application(); @@ -712,7 +712,7 @@ class ApplicationTest extends TestCase putenv('COLUMNS=32'); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception4.txt', $tester->getErrorOutput(true), '->renderException() wraps messages when they are bigger than the terminal'); putenv('COLUMNS=120'); } @@ -727,10 +727,10 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); - $tester->run(array('command' => 'foo'), array('decorated' => true, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo'], ['decorated' => true, 'capture_stderr_separately' => true]); $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth1decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); $application = new Application(); @@ -740,7 +740,7 @@ class ApplicationTest extends TestCase throw new \Exception('コマンドの実行中にエラーが発生しました。'); }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth2.txt', $tester->getErrorOutput(true), '->renderException() wraps messages when they are bigger than the terminal'); putenv('COLUMNS=120'); } @@ -755,14 +755,14 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false)); + $tester->run(['command' => 'foo'], ['decorated' => false]); $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_escapeslines.txt', $tester->getDisplay(true), '->renderException() escapes lines containing formatting'); putenv('COLUMNS=120'); } public function testRenderExceptionLineBreaks() { - $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('getTerminalWidth'))->getMock(); + $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(['getTerminalWidth'])->getMock(); $application->setAutoExit(false); $application->expects($this->any()) ->method('getTerminalWidth') @@ -772,7 +772,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false)); + $tester->run(['command' => 'foo'], ['decorated' => false]); $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_linebreaks.txt', $tester->getDisplay(true), '->renderException() keep multiple line breaks'); } @@ -785,7 +785,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); + $tester->run(['command' => 'foo'], ['decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE]); $this->assertContains(sprintf('() at %s:', __FILE__), $tester->getDisplay()); } @@ -796,7 +796,7 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $application->setCatchExceptions(false); $application->add($command = new \Foo1Command()); - $_SERVER['argv'] = array('cli.php', 'foo:bar1'); + $_SERVER['argv'] = ['cli.php', 'foo:bar1']; ob_start(); $application->run(); @@ -812,63 +812,63 @@ class ApplicationTest extends TestCase $this->ensureStaticCommandHelp($application); $tester = new ApplicationTester($application); - $tester->run(array(), array('decorated' => false)); + $tester->run([], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run1.txt', $tester->getDisplay(true), '->run() runs the list command if no argument is passed'); - $tester->run(array('--help' => true), array('decorated' => false)); + $tester->run(['--help' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if --help is passed'); - $tester->run(array('-h' => true), array('decorated' => false)); + $tester->run(['-h' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if -h is passed'); - $tester->run(array('command' => 'list', '--help' => true), array('decorated' => false)); + $tester->run(['command' => 'list', '--help' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if --help is passed'); - $tester->run(array('command' => 'list', '-h' => true), array('decorated' => false)); + $tester->run(['command' => 'list', '-h' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if -h is passed'); - $tester->run(array('--ansi' => true)); + $tester->run(['--ansi' => true]); $this->assertTrue($tester->getOutput()->isDecorated(), '->run() forces color output if --ansi is passed'); - $tester->run(array('--no-ansi' => true)); + $tester->run(['--no-ansi' => true]); $this->assertFalse($tester->getOutput()->isDecorated(), '->run() forces color output to be disabled if --no-ansi is passed'); - $tester->run(array('--version' => true), array('decorated' => false)); + $tester->run(['--version' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if --version is passed'); - $tester->run(array('-V' => true), array('decorated' => false)); + $tester->run(['-V' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if -v is passed'); - $tester->run(array('command' => 'list', '--quiet' => true)); + $tester->run(['command' => 'list', '--quiet' => true]); $this->assertSame('', $tester->getDisplay(), '->run() removes all output if --quiet is passed'); $this->assertFalse($tester->getInput()->isInteractive(), '->run() sets off the interactive mode if --quiet is passed'); - $tester->run(array('command' => 'list', '-q' => true)); + $tester->run(['command' => 'list', '-q' => true]); $this->assertSame('', $tester->getDisplay(), '->run() removes all output if -q is passed'); $this->assertFalse($tester->getInput()->isInteractive(), '->run() sets off the interactive mode if -q is passed'); - $tester->run(array('command' => 'list', '--verbose' => true)); + $tester->run(['command' => 'list', '--verbose' => true]); $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if --verbose is passed'); - $tester->run(array('command' => 'list', '--verbose' => 1)); + $tester->run(['command' => 'list', '--verbose' => 1]); $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if --verbose=1 is passed'); - $tester->run(array('command' => 'list', '--verbose' => 2)); + $tester->run(['command' => 'list', '--verbose' => 2]); $this->assertSame(Output::VERBOSITY_VERY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to very verbose if --verbose=2 is passed'); - $tester->run(array('command' => 'list', '--verbose' => 3)); + $tester->run(['command' => 'list', '--verbose' => 3]); $this->assertSame(Output::VERBOSITY_DEBUG, $tester->getOutput()->getVerbosity(), '->run() sets the output to debug if --verbose=3 is passed'); - $tester->run(array('command' => 'list', '--verbose' => 4)); + $tester->run(['command' => 'list', '--verbose' => 4]); $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if unknown --verbose level is passed'); - $tester->run(array('command' => 'list', '-v' => true)); + $tester->run(['command' => 'list', '-v' => true]); $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); - $tester->run(array('command' => 'list', '-vv' => true)); + $tester->run(['command' => 'list', '-vv' => true]); $this->assertSame(Output::VERBOSITY_VERY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); - $tester->run(array('command' => 'list', '-vvv' => true)); + $tester->run(['command' => 'list', '-vvv' => true]); $this->assertSame(Output::VERBOSITY_DEBUG, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); $application = new Application(); @@ -877,13 +877,26 @@ class ApplicationTest extends TestCase $application->add(new \FooCommand()); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo:bar', '--no-interaction' => true), array('decorated' => false)); + $tester->run(['command' => 'foo:bar', '--no-interaction' => true], ['decorated' => false]); $this->assertSame('called'.PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if --no-interaction is passed'); - $tester->run(array('command' => 'foo:bar', '-n' => true), array('decorated' => false)); + $tester->run(['command' => 'foo:bar', '-n' => true], ['decorated' => false]); $this->assertSame('called'.PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if -n is passed'); } + public function testRunWithGlobalOptionAndNoCommand() + { + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + $application->getDefinition()->addOption(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)); + + $output = new StreamOutput(fopen('php://memory', 'w', false)); + $input = new ArgvInput(['cli.php', '--foo', 'bar']); + + $this->assertSame(0, $application->run($input, $output)); + } + /** * Issue #9285. * @@ -900,12 +913,12 @@ class ApplicationTest extends TestCase $output = new StreamOutput(fopen('php://memory', 'w', false)); - $input = new ArgvInput(array('cli.php', '-v', 'foo:bar')); + $input = new ArgvInput(['cli.php', '-v', 'foo:bar']); $application->run($input, $output); $this->addToAssertionCount(1); - $input = new ArgvInput(array('cli.php', '--verbose', 'foo:bar')); + $input = new ArgvInput(['cli.php', '--verbose', 'foo:bar']); $application->run($input, $output); $this->addToAssertionCount(1); @@ -915,13 +928,13 @@ class ApplicationTest extends TestCase { $exception = new \Exception('', 4); - $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('doRun'))->getMock(); + $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(['doRun'])->getMock(); $application->setAutoExit(false); $application->expects($this->once()) ->method('doRun') - ->will($this->throwException($exception)); + ->willThrowException($exception); - $exitCode = $application->run(new ArrayInput(array()), new NullOutput()); + $exitCode = $application->run(new ArrayInput([]), new NullOutput()); $this->assertSame(4, $exitCode, '->run() returns integer exit code extracted from raised exception'); } @@ -945,7 +958,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'test')); + $tester->run(['command' => 'test']); $this->assertTrue($passedRightValue, '-> exit code 4 was passed in the console.terminate event'); } @@ -954,13 +967,13 @@ class ApplicationTest extends TestCase { $exception = new \Exception('', 0); - $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('doRun'))->getMock(); + $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(['doRun'])->getMock(); $application->setAutoExit(false); $application->expects($this->once()) ->method('doRun') - ->will($this->throwException($exception)); + ->willThrowException($exception); - $exitCode = $application->run(new ArrayInput(array()), new NullOutput()); + $exitCode = $application->run(new ArrayInput([]), new NullOutput()); $this->assertSame(1, $exitCode, '->run() returns exit code 1 when exception code is 0'); } @@ -984,7 +997,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'test')); + $tester->run(['command' => 'test']); $this->assertTrue($passedRightValue, '-> exit code 1 was passed in the console.terminate event'); } @@ -1005,12 +1018,12 @@ class ApplicationTest extends TestCase $application ->register('foo') - ->setAliases(array('f')) - ->setDefinition(array(new InputOption('survey', 'e', InputOption::VALUE_REQUIRED, 'My option with a shortcut.'))) + ->setAliases(['f']) + ->setDefinition([new InputOption('survey', 'e', InputOption::VALUE_REQUIRED, 'My option with a shortcut.')]) ->setCode(function (InputInterface $input, OutputInterface $output) {}) ; - $input = new ArrayInput(array('command' => 'foo')); + $input = new ArrayInput(['command' => 'foo']); $output = new NullOutput(); $application->run($input, $output); @@ -1027,22 +1040,22 @@ class ApplicationTest extends TestCase $application->setCatchExceptions(false); $application ->register('foo') - ->setDefinition(array($def)) + ->setDefinition([$def]) ->setCode(function (InputInterface $input, OutputInterface $output) {}) ; - $input = new ArrayInput(array('command' => 'foo')); + $input = new ArrayInput(['command' => 'foo']); $output = new NullOutput(); $application->run($input, $output); } public function getAddingAlreadySetDefinitionElementData() { - return array( - array(new InputArgument('command', InputArgument::REQUIRED)), - array(new InputOption('quiet', '', InputOption::VALUE_NONE)), - array(new InputOption('query', 'q', InputOption::VALUE_NONE)), - ); + return [ + [new InputArgument('command', InputArgument::REQUIRED)], + [new InputOption('quiet', '', InputOption::VALUE_NONE)], + [new InputOption('query', 'q', InputOption::VALUE_NONE)], + ]; } public function testGetDefaultHelperSetReturnsDefaultValues() @@ -1062,7 +1075,7 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $application->setCatchExceptions(false); - $application->setHelperSet(new HelperSet(array(new FormatterHelper()))); + $application->setHelperSet(new HelperSet([new FormatterHelper()])); $helperSet = $application->getHelperSet(); @@ -1079,7 +1092,7 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $application->setCatchExceptions(false); - $application->setHelperSet(new HelperSet(array(new FormatterHelper()))); + $application->setHelperSet(new HelperSet([new FormatterHelper()])); $helperSet = $application->getHelperSet(); @@ -1137,7 +1150,7 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $application->setCatchExceptions(false); - $application->setDefinition(new InputDefinition(array(new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.')))); + $application->setDefinition(new InputDefinition([new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.')])); $inputDefinition = $application->getDefinition(); @@ -1166,7 +1179,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); + $tester->run(['command' => 'foo']); $this->assertEquals('before.foo.after.'.PHP_EOL, $tester->getDisplay()); } @@ -1186,7 +1199,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); + $tester->run(['command' => 'foo']); } public function testRunDispatchesAllEventsWithException() @@ -1202,7 +1215,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); + $tester->run(['command' => 'foo']); $this->assertContains('before.foo.error.after.', $tester->getDisplay()); } @@ -1222,7 +1235,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); + $tester->run(['command' => 'foo']); $this->assertContains('before.error.after.', $tester->getDisplay()); } @@ -1244,7 +1257,7 @@ class ApplicationTest extends TestCase $tester = new ApplicationTester($application); try { - $tester->run(array('command' => 'dym')); + $tester->run(['command' => 'dym']); $this->fail('Error expected.'); } catch (\Error $e) { $this->assertSame('dymerr', $e->getMessage()); @@ -1273,7 +1286,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); + $tester->run(['command' => 'foo']); $this->assertContains('before.error.silenced.after.', $tester->getDisplay()); $this->assertEquals(ConsoleCommandEvent::RETURN_CODE_DISABLED, $tester->getStatusCode()); } @@ -1292,7 +1305,7 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'unknown')); + $tester->run(['command' => 'unknown']); $this->assertContains('silenced command not found', $tester->getDisplay()); $this->assertEquals(1, $tester->getStatusCode()); } @@ -1319,7 +1332,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); + $tester->run(['command' => 'foo']); $this->assertContains('before.caught.error.after.', $tester->getDisplay()); $this->assertContains('replaced in caught.', $tester->getDisplay()); } @@ -1341,7 +1354,7 @@ class ApplicationTest extends TestCase $tester = new ApplicationTester($application); try { - $tester->run(array('command' => 'dym')); + $tester->run(['command' => 'dym']); $this->fail('->run() should rethrow PHP errors if not handled via ConsoleErrorEvent.'); } catch (\Error $e) { $this->assertSame($e->getMessage(), 'Class \'UnknownClass\' not found'); @@ -1367,7 +1380,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'dym')); + $tester->run(['command' => 'dym']); $this->assertContains('before.dym.error.after.', $tester->getDisplay(), 'The PHP Error did not dispached events'); } @@ -1387,7 +1400,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'dym')); + $tester->run(['command' => 'dym']); $this->assertContains('before.dym.error.after.', $tester->getDisplay(), 'The PHP Error did not dispached events'); } @@ -1407,7 +1420,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'dus')); + $tester->run(['command' => 'dus']); $this->assertSame(1, $tester->getStatusCode(), 'Status code should be 1'); } @@ -1422,7 +1435,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $exitCode = $tester->run(array('command' => 'foo')); + $exitCode = $tester->run(['command' => 'foo']); $this->assertContains('before.after.', $tester->getDisplay()); $this->assertEquals(ConsoleCommandEvent::RETURN_CODE_DISABLED, $exitCode); } @@ -1449,7 +1462,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo', '--no-interaction' => true)); + $tester->run(['command' => 'foo', '--no-interaction' => true]); $this->assertTrue($noInteractionValue); $this->assertFalse($quietValue); @@ -1479,7 +1492,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo', '--extra' => 'some test value')); + $tester->run(['command' => 'foo', '--extra' => 'some test value']); $this->assertEquals('some test value', $extraValue); } @@ -1499,7 +1512,7 @@ class ApplicationTest extends TestCase } $application->setTerminalDimensions($width, 80); - $this->assertSame(array($width, 80), $application->getTerminalDimensions()); + $this->assertSame([$width, 80], $application->getTerminalDimensions()); } public function testSetRunCustomDefaultCommand() @@ -1512,14 +1525,14 @@ class ApplicationTest extends TestCase $application->setDefaultCommand($command->getName()); $tester = new ApplicationTester($application); - $tester->run(array(), array('interactive' => false)); + $tester->run([], ['interactive' => false]); $this->assertEquals('called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); $application = new CustomDefaultCommandApplication(); $application->setAutoExit(false); $tester = new ApplicationTester($application); - $tester->run(array(), array('interactive' => false)); + $tester->run([], ['interactive' => false]); $this->assertEquals('called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); } @@ -1534,7 +1547,7 @@ class ApplicationTest extends TestCase $application->setDefaultCommand($command->getName()); $tester = new ApplicationTester($application); - $tester->run(array('--fooopt' => 'opt'), array('interactive' => false)); + $tester->run(['--fooopt' => 'opt'], ['interactive' => false]); $this->assertEquals('called'.PHP_EOL.'opt'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); } @@ -1550,10 +1563,10 @@ class ApplicationTest extends TestCase $tester = new ApplicationTester($application); - $tester->run(array()); + $tester->run([]); $this->assertContains('called', $tester->getDisplay()); - $tester->run(array('--help' => true)); + $tester->run(['--help' => true]); $this->assertContains('The foo:bar command', $tester->getDisplay()); } @@ -1566,9 +1579,9 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'help')); + $tester->run(['command' => 'help']); - $this->assertFalse($tester->getInput()->hasParameterOption(array('--no-interaction', '-n'))); + $this->assertFalse($tester->getInput()->hasParameterOption(['--no-interaction', '-n'])); $inputStream = $tester->getInput()->getStream(); $this->assertEquals($tester->getInput()->isInteractive(), @posix_isatty($inputStream)); @@ -1580,9 +1593,9 @@ class ApplicationTest extends TestCase $container->addCompilerPass(new AddConsoleCommandPass()); $container ->register('lazy-command', LazyCommand::class) - ->addTag('console.command', array('command' => 'lazy:command')) - ->addTag('console.command', array('command' => 'lazy:alias')) - ->addTag('console.command', array('command' => 'lazy:alias2')); + ->addTag('console.command', ['command' => 'lazy:command']) + ->addTag('console.command', ['command' => 'lazy:alias']) + ->addTag('console.command', ['command' => 'lazy:alias2']); $container->compile(); $application = new Application(); @@ -1591,17 +1604,17 @@ class ApplicationTest extends TestCase $tester = new ApplicationTester($application); - $tester->run(array('command' => 'lazy:command')); + $tester->run(['command' => 'lazy:command']); $this->assertSame("lazy-command called\n", $tester->getDisplay(true)); - $tester->run(array('command' => 'lazy:alias')); + $tester->run(['command' => 'lazy:alias']); $this->assertSame("lazy-command called\n", $tester->getDisplay(true)); - $tester->run(array('command' => 'lazy:alias2')); + $tester->run(['command' => 'lazy:alias2']); $this->assertSame("lazy-command called\n", $tester->getDisplay(true)); $command = $application->get('lazy:command'); - $this->assertSame(array('lazy:alias', 'lazy:alias2'), $command->getAliases()); + $this->assertSame(['lazy:alias', 'lazy:alias2'], $command->getAliases()); } /** @@ -1610,21 +1623,21 @@ class ApplicationTest extends TestCase public function testGetDisabledLazyCommand() { $application = new Application(); - $application->setCommandLoader(new FactoryCommandLoader(array('disabled' => function () { return new DisabledCommand(); }))); + $application->setCommandLoader(new FactoryCommandLoader(['disabled' => function () { return new DisabledCommand(); }])); $application->get('disabled'); } public function testHasReturnsFalseForDisabledLazyCommand() { $application = new Application(); - $application->setCommandLoader(new FactoryCommandLoader(array('disabled' => function () { return new DisabledCommand(); }))); + $application->setCommandLoader(new FactoryCommandLoader(['disabled' => function () { return new DisabledCommand(); }])); $this->assertFalse($application->has('disabled')); } public function testAllExcludesDisabledLazyCommand() { $application = new Application(); - $application->setCommandLoader(new FactoryCommandLoader(array('disabled' => function () { return new DisabledCommand(); }))); + $application->setCommandLoader(new FactoryCommandLoader(['disabled' => function () { return new DisabledCommand(); }])); $this->assertArrayNotHasKey('disabled', $application->all()); } @@ -1670,7 +1683,7 @@ class ApplicationTest extends TestCase $tester = new ApplicationTester($application); try { - $tester->run(array('command' => 'dym')); + $tester->run(['command' => 'dym']); $this->fail('->run() should rethrow PHP errors if not handled via ConsoleErrorEvent.'); } catch (\Error $e) { $this->assertSame($e->getMessage(), 'Class \'UnknownClass\' not found'); @@ -1694,7 +1707,7 @@ class CustomApplication extends Application */ protected function getDefaultInputDefinition() { - return new InputDefinition(array(new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.'))); + return new InputDefinition([new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.')]); } /** @@ -1704,7 +1717,7 @@ class CustomApplication extends Application */ protected function getDefaultHelperSet() { - return new HelperSet(array(new FormatterHelper())); + return new HelperSet([new FormatterHelper()]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/CommandTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/CommandTest.php index 6bc3f75b..b3ce4022 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/CommandTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/CommandTest.php @@ -71,7 +71,7 @@ class CommandTest extends TestCase $ret = $command->setDefinition($definition = new InputDefinition()); $this->assertEquals($command, $ret, '->setDefinition() implements a fluent interface'); $this->assertEquals($definition, $command->getDefinition(), '->setDefinition() sets the current InputDefinition instance'); - $command->setDefinition(array(new InputArgument('foo'), new InputOption('bar'))); + $command->setDefinition([new InputArgument('foo'), new InputOption('bar')]); $this->assertTrue($command->getDefinition()->hasArgument('foo'), '->setDefinition() also takes an array of InputArguments and InputOptions as an argument'); $this->assertTrue($command->getDefinition()->hasOption('bar'), '->setDefinition() also takes an array of InputArguments and InputOptions as an argument'); $command->setDefinition(new InputDefinition()); @@ -130,10 +130,10 @@ class CommandTest extends TestCase public function provideInvalidCommandNames() { - return array( - array(''), - array('foo:'), - ); + return [ + [''], + ['foo:'], + ]; } public function testGetSetDescription() @@ -166,15 +166,23 @@ class CommandTest extends TestCase $command = new \TestCommand(); $command->setHelp(''); $this->assertContains('description', $command->getProcessedHelp(), '->getProcessedHelp() falls back to the description'); + + $command = new \TestCommand(); + $command->setHelp('The %command.name% command does... Example: php %command.full_name%.'); + $application = new Application(); + $application->add($command); + $application->setDefaultCommand('namespace:name', true); + $this->assertContains('The namespace:name command does...', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.name% correctly in single command applications'); + $this->assertNotContains('%command.full_name%', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.full_name% in single command applications'); } public function testGetSetAliases() { $command = new \TestCommand(); - $this->assertEquals(array('name'), $command->getAliases(), '->getAliases() returns the aliases'); - $ret = $command->setAliases(array('name1')); + $this->assertEquals(['name'], $command->getAliases(), '->getAliases() returns the aliases'); + $ret = $command->setAliases(['name1']); $this->assertEquals($command, $ret, '->setAliases() implements a fluent interface'); - $this->assertEquals(array('name1'), $command->getAliases(), '->setAliases() sets the aliases'); + $this->assertEquals(['name1'], $command->getAliases(), '->setAliases() sets the aliases'); } public function testSetAliasesNull() @@ -223,11 +231,11 @@ class CommandTest extends TestCase public function testMergeApplicationDefinition() { $application1 = new Application(); - $application1->getDefinition()->addArguments(array(new InputArgument('foo'))); - $application1->getDefinition()->addOptions(array(new InputOption('bar'))); + $application1->getDefinition()->addArguments([new InputArgument('foo')]); + $application1->getDefinition()->addOptions([new InputOption('bar')]); $command = new \TestCommand(); $command->setApplication($application1); - $command->setDefinition($definition = new InputDefinition(array(new InputArgument('bar'), new InputOption('foo')))); + $command->setDefinition($definition = new InputDefinition([new InputArgument('bar'), new InputOption('foo')])); $r = new \ReflectionObject($command); $m = $r->getMethod('mergeApplicationDefinition'); @@ -245,11 +253,11 @@ class CommandTest extends TestCase public function testMergeApplicationDefinitionWithoutArgsThenWithArgsAddsArgs() { $application1 = new Application(); - $application1->getDefinition()->addArguments(array(new InputArgument('foo'))); - $application1->getDefinition()->addOptions(array(new InputOption('bar'))); + $application1->getDefinition()->addArguments([new InputArgument('foo')]); + $application1->getDefinition()->addOptions([new InputOption('bar')]); $command = new \TestCommand(); $command->setApplication($application1); - $command->setDefinition($definition = new InputDefinition(array())); + $command->setDefinition($definition = new InputDefinition([])); $r = new \ReflectionObject($command); $m = $r->getMethod('mergeApplicationDefinition'); @@ -269,7 +277,7 @@ class CommandTest extends TestCase { $tester = new CommandTester(new \TestCommand()); - $tester->execute(array(), array('interactive' => true)); + $tester->execute([], ['interactive' => true]); $this->assertEquals('interact called'.PHP_EOL.'execute called'.PHP_EOL, $tester->getDisplay(), '->run() calls the interact() method if the input is interactive'); } @@ -278,7 +286,7 @@ class CommandTest extends TestCase { $tester = new CommandTester(new \TestCommand()); - $tester->execute(array(), array('interactive' => false)); + $tester->execute([], ['interactive' => false]); $this->assertEquals('execute called'.PHP_EOL, $tester->getDisplay(), '->run() does not call the interact() method if the input is not interactive'); } @@ -301,7 +309,7 @@ class CommandTest extends TestCase { $command = new \TestCommand(); $tester = new CommandTester($command); - $tester->execute(array('--bar' => true)); + $tester->execute(['--bar' => true]); } public function testRunReturnsIntegerExitCode() @@ -310,7 +318,7 @@ class CommandTest extends TestCase $exitCode = $command->run(new StringInput(''), new NullOutput()); $this->assertSame(0, $exitCode, '->run() returns integer exit code (treats null as 0)'); - $command = $this->getMockBuilder('TestCommand')->setMethods(array('execute'))->getMock(); + $command = $this->getMockBuilder('TestCommand')->setMethods(['execute'])->getMock(); $command->expects($this->once()) ->method('execute') ->will($this->returnValue('2.3')); @@ -356,16 +364,16 @@ class CommandTest extends TestCase }); $this->assertEquals($command, $ret, '->setCode() implements a fluent interface'); $tester = new CommandTester($command); - $tester->execute(array()); + $tester->execute([]); $this->assertEquals('interact called'.PHP_EOL.'from the code...'.PHP_EOL, $tester->getDisplay()); } public function getSetCodeBindToClosureTests() { - return array( - array(true, 'not bound to the command'), - array(false, 'bound to the command'), - ); + return [ + [true, 'not bound to the command'], + [false, 'bound to the command'], + ]; } /** @@ -381,7 +389,7 @@ class CommandTest extends TestCase $command = new \TestCommand(); $command->setCode($code); $tester = new CommandTester($command); - $tester->execute(array()); + $tester->execute([]); $this->assertEquals('interact called'.PHP_EOL.$expected.PHP_EOL, $tester->getDisplay()); } @@ -390,7 +398,7 @@ class CommandTest extends TestCase $command = new \TestCommand(); $command->setCode(self::createClosure()); $tester = new CommandTester($command); - $tester->execute(array()); + $tester->execute([]); if (\PHP_VERSION_ID < 70000) { // Cannot bind static closures in PHP 5 @@ -411,10 +419,10 @@ class CommandTest extends TestCase public function testSetCodeWithNonClosureCallable() { $command = new \TestCommand(); - $ret = $command->setCode(array($this, 'callableMethodCommand')); + $ret = $command->setCode([$this, 'callableMethodCommand']); $this->assertEquals($command, $ret, '->setCode() implements a fluent interface'); $tester = new CommandTester($command); - $tester->execute(array()); + $tester->execute([]); $this->assertEquals('interact called'.PHP_EOL.'from the code...'.PHP_EOL, $tester->getDisplay()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/HelpCommandTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/HelpCommandTest.php index 30fe2b6e..ce9d8d4f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/HelpCommandTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/HelpCommandTest.php @@ -24,7 +24,7 @@ class HelpCommandTest extends TestCase $command = new HelpCommand(); $command->setApplication(new Application()); $commandTester = new CommandTester($command); - $commandTester->execute(array('command_name' => 'li'), array('decorated' => false)); + $commandTester->execute(['command_name' => 'li'], ['decorated' => false]); $this->assertContains('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); $this->assertContains('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); $this->assertContains('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); @@ -35,7 +35,7 @@ class HelpCommandTest extends TestCase $command = new HelpCommand(); $commandTester = new CommandTester($command); $command->setCommand(new ListCommand()); - $commandTester->execute(array(), array('decorated' => false)); + $commandTester->execute([], ['decorated' => false]); $this->assertContains('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); $this->assertContains('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); $this->assertContains('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); @@ -46,7 +46,7 @@ class HelpCommandTest extends TestCase $command = new HelpCommand(); $commandTester = new CommandTester($command); $command->setCommand(new ListCommand()); - $commandTester->execute(array('--format' => 'xml')); + $commandTester->execute(['--format' => 'xml']); $this->assertContains('getDisplay(), '->execute() returns an XML help text if --xml is passed'); } @@ -54,7 +54,7 @@ class HelpCommandTest extends TestCase { $application = new Application(); $commandTester = new CommandTester($application->get('help')); - $commandTester->execute(array('command_name' => 'list')); + $commandTester->execute(['command_name' => 'list']); $this->assertContains('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); $this->assertContains('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); $this->assertContains('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); @@ -64,7 +64,7 @@ class HelpCommandTest extends TestCase { $application = new Application(); $commandTester = new CommandTester($application->get('help')); - $commandTester->execute(array('command_name' => 'list', '--format' => 'xml')); + $commandTester->execute(['command_name' => 'list', '--format' => 'xml']); $this->assertContains('list [--raw] [--format FORMAT] [--] [<namespace>]', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); $this->assertContains('getDisplay(), '->execute() returns an XML help text if --format=xml is passed'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php index b39f7ec5..57687d4c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php @@ -21,7 +21,7 @@ class ListCommandTest extends TestCase { $application = new Application(); $commandTester = new CommandTester($command = $application->get('list')); - $commandTester->execute(array('command' => $command->getName()), array('decorated' => false)); + $commandTester->execute(['command' => $command->getName()], ['decorated' => false]); $this->assertRegExp('/help\s{2,}Displays help for a command/', $commandTester->getDisplay(), '->execute() returns a list of available commands'); } @@ -30,7 +30,7 @@ class ListCommandTest extends TestCase { $application = new Application(); $commandTester = new CommandTester($command = $application->get('list')); - $commandTester->execute(array('command' => $command->getName(), '--format' => 'xml')); + $commandTester->execute(['command' => $command->getName(), '--format' => 'xml']); $this->assertRegExp('/
    Action
    array( - array(), - array( - array( - new TableCell('Dont break'."\n".'here', array('colspan' => 2)), - ), + ], + 'Row with formatted cells containing a newline' => [ + [], + [ + [ + new TableCell('Dont break'."\n".'here', ['colspan' => 2]), + ], new TableSeparator(), - array( + [ 'foo', - new TableCell('Dont break'."\n".'here', array('rowspan' => 2)), - ), - array( + new TableCell('Dont break'."\n".'here', ['rowspan' => 2]), + ], + [ 'bar', - ), - ), + ], + ], 'default', <<<'TABLE' +-------+------------+ @@ -543,16 +543,16 @@ TABLE TABLE , true, - ), - ); + ], + ]; } public function testRenderMultiByte() { $table = new Table($output = $this->getOutputStream()); $table - ->setHeaders(array('■■')) - ->setRows(array(array(1234))) + ->setHeaders(['■■']) + ->setRows([[1234]]) ->setStyle('default') ; $table->render(); @@ -574,7 +574,7 @@ TABLE; { $table = new Table($output = $this->getOutputStream()); - $table->setRows(array(array(new TableCell(12345)))); + $table->setRows([[new TableCell(12345)]]); $table->render(); $expected = @@ -592,7 +592,7 @@ TABLE; { $table = new Table($output = $this->getOutputStream()); - $table->setRows(array(array(new TableCell(12345.01)))); + $table->setRows([[new TableCell(12345.01)]]); $table->render(); $expected = @@ -618,8 +618,8 @@ TABLE; Table::setStyleDefinition('dotfull', $style); $table = new Table($output = $this->getOutputStream()); $table - ->setHeaders(array('Foo')) - ->setRows(array(array('Bar'))) + ->setHeaders(['Foo']) + ->setRows([['Bar']]) ->setStyle('dotfull'); $table->render(); @@ -640,14 +640,14 @@ TABLE; { $table = new Table($output = $this->getOutputStream()); $table - ->setHeaders(array('Foo')) - ->setRows(array( - array('Bar1'), + ->setHeaders(['Foo']) + ->setRows([ + ['Bar1'], new TableSeparator(), - array('Bar2'), + ['Bar2'], new TableSeparator(), - array('Bar3'), - )); + ['Bar3'], + ]); $table->render(); $expected = @@ -672,9 +672,9 @@ TABLE; public function testRenderMultiCalls() { $table = new Table($output = $this->getOutputStream()); - $table->setRows(array( - array(new TableCell('foo', array('colspan' => 2))), - )); + $table->setRows([ + [new TableCell('foo', ['colspan' => 2])], + ]); $table->render(); $table->render(); $table->render(); @@ -700,11 +700,11 @@ TABLE; { $table = new Table($output = $this->getOutputStream()); $table - ->setHeaders(array('ISBN', 'Title', 'Author', 'Price')) - ->setRows(array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'), - array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25'), - )); + ->setHeaders(['ISBN', 'Title', 'Author', 'Price']) + ->setRows([ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'], + ['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25'], + ]); $style = new TableStyle(); $style->setPadType(STR_PAD_LEFT); @@ -734,10 +734,10 @@ TABLE; { $table = new Table($output = $this->getOutputStream()); $table - ->setHeaders(array('ISBN', 'Title', 'Author', 'Price')) - ->setRows(array( - array('99921-58-10-7', array(), 'Dante Alighieri', '9.95'), - )); + ->setHeaders(['ISBN', 'Title', 'Author', 'Price']) + ->setRows([ + ['99921-58-10-7', [], 'Dante Alighieri', '9.95'], + ]); $table->render(); } @@ -746,11 +746,11 @@ TABLE; { $table = new Table($output = $this->getOutputStream()); $table - ->setHeaders(array('ISBN', 'Title', 'Author', 'Price')) - ->setRows(array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'), - array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25'), - )) + ->setHeaders(['ISBN', 'Title', 'Author', 'Price']) + ->setRows([ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'], + ['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25'], + ]) ->setColumnWidth(0, 15) ->setColumnWidth(3, 10); @@ -778,12 +778,12 @@ TABLE; { $table = new Table($output = $this->getOutputStream()); $table - ->setHeaders(array('ISBN', 'Title', 'Author', 'Price')) - ->setRows(array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'), - array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25'), - )) - ->setColumnWidths(array(15, 0, -1, 10)); + ->setHeaders(['ISBN', 'Title', 'Author', 'Price']) + ->setRows([ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'], + ['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25'], + ]) + ->setColumnWidths([15, 0, -1, 10]); $style = new TableStyle(); $style->setPadType(STR_PAD_LEFT); @@ -836,12 +836,12 @@ TABLE; $table = new Table($output = $this->getOutputStream()); $table->setStyle($boxed); $table - ->setHeaders(array('ISBN', 'Title', 'Author')) - ->setRows(array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), + ->setHeaders(['ISBN', 'Title', 'Author']) + ->setRows([ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'], new TableSeparator(), - array(new TableCell('This value spans 3 columns.', array('colspan' => 3))), - )) + [new TableCell('This value spans 3 columns.', ['colspan' => 3])], + ]) ; $table->render(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php index b91b6d71..e20bcdd2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php @@ -21,23 +21,23 @@ class ArgvInputTest extends TestCase { public function testConstructor() { - $_SERVER['argv'] = array('cli.php', 'foo'); + $_SERVER['argv'] = ['cli.php', 'foo']; $input = new ArgvInput(); $r = new \ReflectionObject($input); $p = $r->getProperty('tokens'); $p->setAccessible(true); - $this->assertEquals(array('foo'), $p->getValue($input), '__construct() automatically get its input from the argv server variable'); + $this->assertEquals(['foo'], $p->getValue($input), '__construct() automatically get its input from the argv server variable'); } public function testParseArguments() { - $input = new ArgvInput(array('cli.php', 'foo')); - $input->bind(new InputDefinition(array(new InputArgument('name')))); - $this->assertEquals(array('name' => 'foo'), $input->getArguments(), '->parse() parses required arguments'); + $input = new ArgvInput(['cli.php', 'foo']); + $input->bind(new InputDefinition([new InputArgument('name')])); + $this->assertEquals(['name' => 'foo'], $input->getArguments(), '->parse() parses required arguments'); - $input->bind(new InputDefinition(array(new InputArgument('name')))); - $this->assertEquals(array('name' => 'foo'), $input->getArguments(), '->parse() is stateless'); + $input->bind(new InputDefinition([new InputArgument('name')])); + $this->assertEquals(['name' => 'foo'], $input->getArguments(), '->parse() is stateless'); } /** @@ -53,128 +53,128 @@ class ArgvInputTest extends TestCase public function provideOptions() { - return array( - array( - array('cli.php', '--foo'), - array(new InputOption('foo')), - array('foo' => true), + return [ + [ + ['cli.php', '--foo'], + [new InputOption('foo')], + ['foo' => true], '->parse() parses long options without a value', - ), - array( - array('cli.php', '--foo=bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)), - array('foo' => 'bar'), + ], + [ + ['cli.php', '--foo=bar'], + [new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)], + ['foo' => 'bar'], '->parse() parses long options with a required value (with a = separator)', - ), - array( - array('cli.php', '--foo', 'bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)), - array('foo' => 'bar'), + ], + [ + ['cli.php', '--foo', 'bar'], + [new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)], + ['foo' => 'bar'], '->parse() parses long options with a required value (with a space separator)', - ), - array( - array('cli.php', '--foo='), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)), - array('foo' => ''), + ], + [ + ['cli.php', '--foo='], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)], + ['foo' => ''], '->parse() parses long options with optional value which is empty (with a = separator) as empty string', - ), - array( - array('cli.php', '--foo=', 'bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)), - array('foo' => ''), + ], + [ + ['cli.php', '--foo=', 'bar'], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)], + ['foo' => ''], '->parse() parses long options with optional value without value specified or an empty string (with a = separator) followed by an argument as empty string', - ), - array( - array('cli.php', 'bar', '--foo'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)), - array('foo' => null), + ], + [ + ['cli.php', 'bar', '--foo'], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)], + ['foo' => null], '->parse() parses long options with optional value which is empty (with a = separator) preceded by an argument', - ), - array( - array('cli.php', '--foo', '', 'bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)), - array('foo' => ''), + ], + [ + ['cli.php', '--foo', '', 'bar'], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)], + ['foo' => ''], '->parse() parses long options with optional value which is empty as empty string even followed by an argument', - ), - array( - array('cli.php', '--foo'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)), - array('foo' => null), + ], + [ + ['cli.php', '--foo'], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)], + ['foo' => null], '->parse() parses long options with optional value specified with no separator and no value as null', - ), - array( - array('cli.php', '-f'), - array(new InputOption('foo', 'f')), - array('foo' => true), + ], + [ + ['cli.php', '-f'], + [new InputOption('foo', 'f')], + ['foo' => true], '->parse() parses short options without a value', - ), - array( - array('cli.php', '-fbar'), - array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)), - array('foo' => 'bar'), + ], + [ + ['cli.php', '-fbar'], + [new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)], + ['foo' => 'bar'], '->parse() parses short options with a required value (with no separator)', - ), - array( - array('cli.php', '-f', 'bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)), - array('foo' => 'bar'), + ], + [ + ['cli.php', '-f', 'bar'], + [new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)], + ['foo' => 'bar'], '->parse() parses short options with a required value (with a space separator)', - ), - array( - array('cli.php', '-f', ''), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)), - array('foo' => ''), + ], + [ + ['cli.php', '-f', ''], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)], + ['foo' => ''], '->parse() parses short options with an optional empty value', - ), - array( - array('cli.php', '-f', '', 'foo'), - array(new InputArgument('name'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)), - array('foo' => ''), + ], + [ + ['cli.php', '-f', '', 'foo'], + [new InputArgument('name'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)], + ['foo' => ''], '->parse() parses short options with an optional empty value followed by an argument', - ), - array( - array('cli.php', '-f', '', '-b'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b')), - array('foo' => '', 'bar' => true), + ], + [ + ['cli.php', '-f', '', '-b'], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b')], + ['foo' => '', 'bar' => true], '->parse() parses short options with an optional empty value followed by an option', - ), - array( - array('cli.php', '-f', '-b', 'foo'), - array(new InputArgument('name'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b')), - array('foo' => null, 'bar' => true), + ], + [ + ['cli.php', '-f', '-b', 'foo'], + [new InputArgument('name'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b')], + ['foo' => null, 'bar' => true], '->parse() parses short options with an optional value which is not present', - ), - array( - array('cli.php', '-fb'), - array(new InputOption('foo', 'f'), new InputOption('bar', 'b')), - array('foo' => true, 'bar' => true), + ], + [ + ['cli.php', '-fb'], + [new InputOption('foo', 'f'), new InputOption('bar', 'b')], + ['foo' => true, 'bar' => true], '->parse() parses short options when they are aggregated as a single one', - ), - array( - array('cli.php', '-fb', 'bar'), - array(new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_REQUIRED)), - array('foo' => true, 'bar' => 'bar'), + ], + [ + ['cli.php', '-fb', 'bar'], + [new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_REQUIRED)], + ['foo' => true, 'bar' => 'bar'], '->parse() parses short options when they are aggregated as a single one and the last one has a required value', - ), - array( - array('cli.php', '-fb', 'bar'), - array(new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)), - array('foo' => true, 'bar' => 'bar'), + ], + [ + ['cli.php', '-fb', 'bar'], + [new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)], + ['foo' => true, 'bar' => 'bar'], '->parse() parses short options when they are aggregated as a single one and the last one has an optional value', - ), - array( - array('cli.php', '-fbbar'), - array(new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)), - array('foo' => true, 'bar' => 'bar'), + ], + [ + ['cli.php', '-fbbar'], + [new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)], + ['foo' => true, 'bar' => 'bar'], '->parse() parses short options when they are aggregated as a single one and the last one has an optional value with no separator', - ), - array( - array('cli.php', '-fbbar'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)), - array('foo' => 'bbar', 'bar' => null), + ], + [ + ['cli.php', '-fbbar'], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)], + ['foo' => 'bbar', 'bar' => null], '->parse() parses short options when they are aggregated as a single one and one of them takes a value', - ), - ); + ], + ]; } /** @@ -195,162 +195,170 @@ class ArgvInputTest extends TestCase public function provideInvalidInput() { - return array( - array( - array('cli.php', '--foo'), - new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED))), + return [ + [ + ['cli.php', '--foo'], + new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)]), 'The "--foo" option requires a value.', - ), - array( - array('cli.php', '-f'), - new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED))), + ], + [ + ['cli.php', '-f'], + new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)]), 'The "--foo" option requires a value.', - ), - array( - array('cli.php', '-ffoo'), - new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_NONE))), + ], + [ + ['cli.php', '-ffoo'], + new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_NONE)]), 'The "-o" option does not exist.', - ), - array( - array('cli.php', '--foo=bar'), - new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_NONE))), + ], + [ + ['cli.php', '--foo=bar'], + new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_NONE)]), 'The "--foo" option does not accept a value.', - ), - array( - array('cli.php', 'foo', 'bar'), + ], + [ + ['cli.php', 'foo', 'bar'], new InputDefinition(), 'No arguments expected, got "foo".', - ), - array( - array('cli.php', 'foo', 'bar'), - new InputDefinition(array(new InputArgument('number'))), + ], + [ + ['cli.php', 'foo', 'bar'], + new InputDefinition([new InputArgument('number')]), 'Too many arguments, expected arguments "number".', - ), - array( - array('cli.php', 'foo', 'bar', 'zzz'), - new InputDefinition(array(new InputArgument('number'), new InputArgument('county'))), + ], + [ + ['cli.php', 'foo', 'bar', 'zzz'], + new InputDefinition([new InputArgument('number'), new InputArgument('county')]), 'Too many arguments, expected arguments "number" "county".', - ), - array( - array('cli.php', '--foo'), + ], + [ + ['cli.php', '--foo'], new InputDefinition(), 'The "--foo" option does not exist.', - ), - array( - array('cli.php', '-f'), + ], + [ + ['cli.php', '-f'], new InputDefinition(), 'The "-f" option does not exist.', - ), - array( - array('cli.php', '-1'), - new InputDefinition(array(new InputArgument('number'))), + ], + [ + ['cli.php', '-1'], + new InputDefinition([new InputArgument('number')]), 'The "-1" option does not exist.', - ), - array( - array('cli.php', '-fЩ'), - new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_NONE))), + ], + [ + ['cli.php', '-fЩ'], + new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_NONE)]), 'The "-Щ" option does not exist.', - ), - ); + ], + ]; } public function testParseArrayArgument() { - $input = new ArgvInput(array('cli.php', 'foo', 'bar', 'baz', 'bat')); - $input->bind(new InputDefinition(array(new InputArgument('name', InputArgument::IS_ARRAY)))); + $input = new ArgvInput(['cli.php', 'foo', 'bar', 'baz', 'bat']); + $input->bind(new InputDefinition([new InputArgument('name', InputArgument::IS_ARRAY)])); - $this->assertEquals(array('name' => array('foo', 'bar', 'baz', 'bat')), $input->getArguments(), '->parse() parses array arguments'); + $this->assertEquals(['name' => ['foo', 'bar', 'baz', 'bat']], $input->getArguments(), '->parse() parses array arguments'); } public function testParseArrayOption() { - $input = new ArgvInput(array('cli.php', '--name=foo', '--name=bar', '--name=baz')); - $input->bind(new InputDefinition(array(new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)))); + $input = new ArgvInput(['cli.php', '--name=foo', '--name=bar', '--name=baz']); + $input->bind(new InputDefinition([new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)])); - $this->assertEquals(array('name' => array('foo', 'bar', 'baz')), $input->getOptions(), '->parse() parses array options ("--option=value" syntax)'); + $this->assertEquals(['name' => ['foo', 'bar', 'baz']], $input->getOptions(), '->parse() parses array options ("--option=value" syntax)'); - $input = new ArgvInput(array('cli.php', '--name', 'foo', '--name', 'bar', '--name', 'baz')); - $input->bind(new InputDefinition(array(new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)))); - $this->assertEquals(array('name' => array('foo', 'bar', 'baz')), $input->getOptions(), '->parse() parses array options ("--option value" syntax)'); + $input = new ArgvInput(['cli.php', '--name', 'foo', '--name', 'bar', '--name', 'baz']); + $input->bind(new InputDefinition([new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)])); + $this->assertEquals(['name' => ['foo', 'bar', 'baz']], $input->getOptions(), '->parse() parses array options ("--option value" syntax)'); - $input = new ArgvInput(array('cli.php', '--name=foo', '--name=bar', '--name=')); - $input->bind(new InputDefinition(array(new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)))); - $this->assertSame(array('name' => array('foo', 'bar', '')), $input->getOptions(), '->parse() parses empty array options as null ("--option=value" syntax)'); + $input = new ArgvInput(['cli.php', '--name=foo', '--name=bar', '--name=']); + $input->bind(new InputDefinition([new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)])); + $this->assertSame(['name' => ['foo', 'bar', '']], $input->getOptions(), '->parse() parses empty array options as null ("--option=value" syntax)'); - $input = new ArgvInput(array('cli.php', '--name', 'foo', '--name', 'bar', '--name', '--anotherOption')); - $input->bind(new InputDefinition(array( + $input = new ArgvInput(['cli.php', '--name', 'foo', '--name', 'bar', '--name', '--anotherOption']); + $input->bind(new InputDefinition([ new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY), new InputOption('anotherOption', null, InputOption::VALUE_NONE), - ))); - $this->assertSame(array('name' => array('foo', 'bar', null), 'anotherOption' => true), $input->getOptions(), '->parse() parses empty array options ("--option value" syntax)'); + ])); + $this->assertSame(['name' => ['foo', 'bar', null], 'anotherOption' => true], $input->getOptions(), '->parse() parses empty array options ("--option value" syntax)'); } public function testParseNegativeNumberAfterDoubleDash() { - $input = new ArgvInput(array('cli.php', '--', '-1')); - $input->bind(new InputDefinition(array(new InputArgument('number')))); - $this->assertEquals(array('number' => '-1'), $input->getArguments(), '->parse() parses arguments with leading dashes as arguments after having encountered a double-dash sequence'); + $input = new ArgvInput(['cli.php', '--', '-1']); + $input->bind(new InputDefinition([new InputArgument('number')])); + $this->assertEquals(['number' => '-1'], $input->getArguments(), '->parse() parses arguments with leading dashes as arguments after having encountered a double-dash sequence'); - $input = new ArgvInput(array('cli.php', '-f', 'bar', '--', '-1')); - $input->bind(new InputDefinition(array(new InputArgument('number'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)))); - $this->assertEquals(array('foo' => 'bar'), $input->getOptions(), '->parse() parses arguments with leading dashes as options before having encountered a double-dash sequence'); - $this->assertEquals(array('number' => '-1'), $input->getArguments(), '->parse() parses arguments with leading dashes as arguments after having encountered a double-dash sequence'); + $input = new ArgvInput(['cli.php', '-f', 'bar', '--', '-1']); + $input->bind(new InputDefinition([new InputArgument('number'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)])); + $this->assertEquals(['foo' => 'bar'], $input->getOptions(), '->parse() parses arguments with leading dashes as options before having encountered a double-dash sequence'); + $this->assertEquals(['number' => '-1'], $input->getArguments(), '->parse() parses arguments with leading dashes as arguments after having encountered a double-dash sequence'); } public function testParseEmptyStringArgument() { - $input = new ArgvInput(array('cli.php', '-f', 'bar', '')); - $input->bind(new InputDefinition(array(new InputArgument('empty'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)))); + $input = new ArgvInput(['cli.php', '-f', 'bar', '']); + $input->bind(new InputDefinition([new InputArgument('empty'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)])); - $this->assertEquals(array('empty' => ''), $input->getArguments(), '->parse() parses empty string arguments'); + $this->assertEquals(['empty' => ''], $input->getArguments(), '->parse() parses empty string arguments'); } public function testGetFirstArgument() { - $input = new ArgvInput(array('cli.php', '-fbbar')); + $input = new ArgvInput(['cli.php', '-fbbar']); $this->assertNull($input->getFirstArgument(), '->getFirstArgument() returns null when there is no arguments'); - $input = new ArgvInput(array('cli.php', '-fbbar', 'foo')); + $input = new ArgvInput(['cli.php', '-fbbar', 'foo']); $this->assertEquals('foo', $input->getFirstArgument(), '->getFirstArgument() returns the first argument from the raw input'); + + $input = new ArgvInput(['cli.php', '--foo', 'fooval', 'bar']); + $input->bind(new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('arg')])); + $this->assertSame('bar', $input->getFirstArgument()); + + $input = new ArgvInput(['cli.php', '-bf', 'fooval', 'argval']); + $input->bind(new InputDefinition([new InputOption('bar', 'b', InputOption::VALUE_NONE), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('arg')])); + $this->assertSame('argval', $input->getFirstArgument()); } public function testHasParameterOption() { - $input = new ArgvInput(array('cli.php', '-f', 'foo')); + $input = new ArgvInput(['cli.php', '-f', 'foo']); $this->assertTrue($input->hasParameterOption('-f'), '->hasParameterOption() returns true if the given short option is in the raw input'); - $input = new ArgvInput(array('cli.php', '-etest')); + $input = new ArgvInput(['cli.php', '-etest']); $this->assertTrue($input->hasParameterOption('-e'), '->hasParameterOption() returns true if the given short option is in the raw input'); $this->assertFalse($input->hasParameterOption('-s'), '->hasParameterOption() returns true if the given short option is in the raw input'); - $input = new ArgvInput(array('cli.php', '--foo', 'foo')); + $input = new ArgvInput(['cli.php', '--foo', 'foo']); $this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given short option is in the raw input'); - $input = new ArgvInput(array('cli.php', 'foo')); + $input = new ArgvInput(['cli.php', 'foo']); $this->assertFalse($input->hasParameterOption('--foo'), '->hasParameterOption() returns false if the given short option is not in the raw input'); - $input = new ArgvInput(array('cli.php', '--foo=bar')); + $input = new ArgvInput(['cli.php', '--foo=bar']); $this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given option with provided value is in the raw input'); } public function testHasParameterOptionOnlyOptions() { - $input = new ArgvInput(array('cli.php', '-f', 'foo')); + $input = new ArgvInput(['cli.php', '-f', 'foo']); $this->assertTrue($input->hasParameterOption('-f', true), '->hasParameterOption() returns true if the given short option is in the raw input'); - $input = new ArgvInput(array('cli.php', '--foo', '--', 'foo')); + $input = new ArgvInput(['cli.php', '--foo', '--', 'foo']); $this->assertTrue($input->hasParameterOption('--foo', true), '->hasParameterOption() returns true if the given long option is in the raw input'); - $input = new ArgvInput(array('cli.php', '--foo=bar', 'foo')); + $input = new ArgvInput(['cli.php', '--foo=bar', 'foo']); $this->assertTrue($input->hasParameterOption('--foo', true), '->hasParameterOption() returns true if the given long option with provided value is in the raw input'); - $input = new ArgvInput(array('cli.php', '--', '--foo')); + $input = new ArgvInput(['cli.php', '--', '--foo']); $this->assertFalse($input->hasParameterOption('--foo', true), '->hasParameterOption() returns false if the given option is in the raw input but after an end of options signal'); } public function testHasParameterOptionEdgeCasesAndLimitations() { - $input = new ArgvInput(array('cli.php', '-fh')); + $input = new ArgvInput(['cli.php', '-fh']); // hasParameterOption does not know if the previous short option, -f, // takes a value or not. If -f takes a value, then -fh does NOT include // -h; Otherwise it does. Since we do not know which short options take @@ -368,7 +376,7 @@ class ArgvInputTest extends TestCase // However, this is not supported. $this->assertFalse($input->hasParameterOption('-hf'), '->hasParameterOption() returns true if the given short option is in the raw input'); - $input = new ArgvInput(array('cli.php', '-f', '-h')); + $input = new ArgvInput(['cli.php', '-f', '-h']); // If hasParameterOption('-fh') is supported for 'cli.php -fh', then // one might also expect that it should also be supported for // 'cli.php -f -h'. However, this is not supported. @@ -377,23 +385,23 @@ class ArgvInputTest extends TestCase public function testNoWarningOnInvalidParameterOption() { - $input = new ArgvInput(array('cli.php', '-edev')); + $input = new ArgvInput(['cli.php', '-edev']); - $this->assertTrue($input->hasParameterOption(array('-e', ''))); + $this->assertTrue($input->hasParameterOption(['-e', ''])); // No warning thrown - $this->assertFalse($input->hasParameterOption(array('-m', ''))); + $this->assertFalse($input->hasParameterOption(['-m', ''])); - $this->assertEquals('dev', $input->getParameterOption(array('-e', ''))); + $this->assertEquals('dev', $input->getParameterOption(['-e', ''])); // No warning thrown - $this->assertFalse($input->getParameterOption(array('-m', ''))); + $this->assertFalse($input->getParameterOption(['-m', ''])); } public function testToString() { - $input = new ArgvInput(array('cli.php', '-f', 'foo')); + $input = new ArgvInput(['cli.php', '-f', 'foo']); $this->assertEquals('-f foo', (string) $input); - $input = new ArgvInput(array('cli.php', '-f', '--bar=foo', 'a b c d', "A\nB'C")); + $input = new ArgvInput(['cli.php', '-f', '--bar=foo', 'a b c d', "A\nB'C"]); $this->assertEquals('-f --bar=foo '.escapeshellarg('a b c d').' '.escapeshellarg("A\nB'C"), (string) $input); } @@ -408,51 +416,51 @@ class ArgvInputTest extends TestCase public function provideGetParameterOptionValues() { - return array( - array(array('app/console', 'foo:bar'), '-e', 'default', false, 'default'), - array(array('app/console', 'foo:bar', '-e', 'dev'), '-e', 'default', false, 'dev'), - array(array('app/console', 'foo:bar', '--env=dev'), '--env', 'default', false, 'dev'), - array(array('app/console', 'foo:bar', '-e', 'dev'), array('-e', '--env'), 'default', false, 'dev'), - array(array('app/console', 'foo:bar', '--env=dev'), array('-e', '--env'), 'default', false, 'dev'), - array(array('app/console', 'foo:bar', '--env=dev', '--en=1'), array('--en'), 'default', false, '1'), - array(array('app/console', 'foo:bar', '--env=dev', '', '--en=1'), array('--en'), 'default', false, '1'), - array(array('app/console', 'foo:bar', '--env', 'val'), '--env', 'default', false, 'val'), - array(array('app/console', 'foo:bar', '--env', 'val', '--dummy'), '--env', 'default', false, 'val'), - array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', 'default', false, 'dev'), - array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', 'default', true, 'default'), - ); + return [ + [['app/console', 'foo:bar'], '-e', 'default', false, 'default'], + [['app/console', 'foo:bar', '-e', 'dev'], '-e', 'default', false, 'dev'], + [['app/console', 'foo:bar', '--env=dev'], '--env', 'default', false, 'dev'], + [['app/console', 'foo:bar', '-e', 'dev'], ['-e', '--env'], 'default', false, 'dev'], + [['app/console', 'foo:bar', '--env=dev'], ['-e', '--env'], 'default', false, 'dev'], + [['app/console', 'foo:bar', '--env=dev', '--en=1'], ['--en'], 'default', false, '1'], + [['app/console', 'foo:bar', '--env=dev', '', '--en=1'], ['--en'], 'default', false, '1'], + [['app/console', 'foo:bar', '--env', 'val'], '--env', 'default', false, 'val'], + [['app/console', 'foo:bar', '--env', 'val', '--dummy'], '--env', 'default', false, 'val'], + [['app/console', 'foo:bar', '--', '--env=dev'], '--env', 'default', false, 'dev'], + [['app/console', 'foo:bar', '--', '--env=dev'], '--env', 'default', true, 'default'], + ]; } public function testParseSingleDashAsArgument() { - $input = new ArgvInput(array('cli.php', '-')); - $input->bind(new InputDefinition(array(new InputArgument('file')))); - $this->assertEquals(array('file' => '-'), $input->getArguments(), '->parse() parses single dash as an argument'); + $input = new ArgvInput(['cli.php', '-']); + $input->bind(new InputDefinition([new InputArgument('file')])); + $this->assertEquals(['file' => '-'], $input->getArguments(), '->parse() parses single dash as an argument'); } public function testParseOptionWithValueOptionalGivenEmptyAndRequiredArgument() { - $input = new ArgvInput(array('cli.php', '--foo=', 'bar')); - $input->bind(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)))); - $this->assertEquals(array('foo' => null), $input->getOptions(), '->parse() parses optional options with empty value as null'); - $this->assertEquals(array('name' => 'bar'), $input->getArguments(), '->parse() parses required arguments'); + $input = new ArgvInput(['cli.php', '--foo=', 'bar']); + $input->bind(new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)])); + $this->assertEquals(['foo' => null], $input->getOptions(), '->parse() parses optional options with empty value as null'); + $this->assertEquals(['name' => 'bar'], $input->getArguments(), '->parse() parses required arguments'); - $input = new ArgvInput(array('cli.php', '--foo=0', 'bar')); - $input->bind(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)))); - $this->assertEquals(array('foo' => '0'), $input->getOptions(), '->parse() parses optional options with empty value as null'); - $this->assertEquals(array('name' => 'bar'), $input->getArguments(), '->parse() parses required arguments'); + $input = new ArgvInput(['cli.php', '--foo=0', 'bar']); + $input->bind(new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)])); + $this->assertEquals(['foo' => '0'], $input->getOptions(), '->parse() parses optional options with empty value as null'); + $this->assertEquals(['name' => 'bar'], $input->getArguments(), '->parse() parses required arguments'); } public function testParseOptionWithValueOptionalGivenEmptyAndOptionalArgument() { - $input = new ArgvInput(array('cli.php', '--foo=', 'bar')); - $input->bind(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::OPTIONAL)))); - $this->assertEquals(array('foo' => null), $input->getOptions(), '->parse() parses optional options with empty value as null'); - $this->assertEquals(array('name' => 'bar'), $input->getArguments(), '->parse() parses optional arguments'); + $input = new ArgvInput(['cli.php', '--foo=', 'bar']); + $input->bind(new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::OPTIONAL)])); + $this->assertEquals(['foo' => null], $input->getOptions(), '->parse() parses optional options with empty value as null'); + $this->assertEquals(['name' => 'bar'], $input->getArguments(), '->parse() parses optional arguments'); - $input = new ArgvInput(array('cli.php', '--foo=0', 'bar')); - $input->bind(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::OPTIONAL)))); - $this->assertEquals(array('foo' => '0'), $input->getOptions(), '->parse() parses optional options with empty value as null'); - $this->assertEquals(array('name' => 'bar'), $input->getArguments(), '->parse() parses optional arguments'); + $input = new ArgvInput(['cli.php', '--foo=0', 'bar']); + $input->bind(new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::OPTIONAL)])); + $this->assertEquals(['foo' => '0'], $input->getOptions(), '->parse() parses optional options with empty value as null'); + $this->assertEquals(['name' => 'bar'], $input->getArguments(), '->parse() parses optional arguments'); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/ArrayInputTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/ArrayInputTest.php index 4bc83b3c..afe74831 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/ArrayInputTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/ArrayInputTest.php @@ -21,47 +21,47 @@ class ArrayInputTest extends TestCase { public function testGetFirstArgument() { - $input = new ArrayInput(array()); + $input = new ArrayInput([]); $this->assertNull($input->getFirstArgument(), '->getFirstArgument() returns null if no argument were passed'); - $input = new ArrayInput(array('name' => 'Fabien')); + $input = new ArrayInput(['name' => 'Fabien']); $this->assertEquals('Fabien', $input->getFirstArgument(), '->getFirstArgument() returns the first passed argument'); - $input = new ArrayInput(array('--foo' => 'bar', 'name' => 'Fabien')); + $input = new ArrayInput(['--foo' => 'bar', 'name' => 'Fabien']); $this->assertEquals('Fabien', $input->getFirstArgument(), '->getFirstArgument() returns the first passed argument'); } public function testHasParameterOption() { - $input = new ArrayInput(array('name' => 'Fabien', '--foo' => 'bar')); + $input = new ArrayInput(['name' => 'Fabien', '--foo' => 'bar']); $this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if an option is present in the passed parameters'); $this->assertFalse($input->hasParameterOption('--bar'), '->hasParameterOption() returns false if an option is not present in the passed parameters'); - $input = new ArrayInput(array('--foo')); + $input = new ArrayInput(['--foo']); $this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if an option is present in the passed parameters'); - $input = new ArrayInput(array('--foo', '--', '--bar')); + $input = new ArrayInput(['--foo', '--', '--bar']); $this->assertTrue($input->hasParameterOption('--bar'), '->hasParameterOption() returns true if an option is present in the passed parameters'); $this->assertFalse($input->hasParameterOption('--bar', true), '->hasParameterOption() returns false if an option is present in the passed parameters after an end of options signal'); } public function testGetParameterOption() { - $input = new ArrayInput(array('name' => 'Fabien', '--foo' => 'bar')); + $input = new ArrayInput(['name' => 'Fabien', '--foo' => 'bar']); $this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name'); $this->assertEquals('default', $input->getParameterOption('--bar', 'default'), '->getParameterOption() returns the default value if an option is not present in the passed parameters'); - $input = new ArrayInput(array('Fabien', '--foo' => 'bar')); + $input = new ArrayInput(['Fabien', '--foo' => 'bar']); $this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name'); - $input = new ArrayInput(array('--foo', '--', '--bar' => 'woop')); + $input = new ArrayInput(['--foo', '--', '--bar' => 'woop']); $this->assertEquals('woop', $input->getParameterOption('--bar'), '->getParameterOption() returns the correct value if an option is present in the passed parameters'); $this->assertEquals('default', $input->getParameterOption('--bar', 'default', true), '->getParameterOption() returns the default value if an option is present in the passed parameters after an end of options signal'); } public function testParseArguments() { - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name')))); + $input = new ArrayInput(['name' => 'foo'], new InputDefinition([new InputArgument('name')])); - $this->assertEquals(array('name' => 'foo'), $input->getArguments(), '->parse() parses required arguments'); + $this->assertEquals(['name' => 'foo'], $input->getArguments(), '->parse() parses required arguments'); } /** @@ -76,50 +76,50 @@ class ArrayInputTest extends TestCase public function provideOptions() { - return array( - array( - array('--foo' => 'bar'), - array(new InputOption('foo')), - array('foo' => 'bar'), + return [ + [ + ['--foo' => 'bar'], + [new InputOption('foo')], + ['foo' => 'bar'], '->parse() parses long options', - ), - array( - array('--foo' => 'bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')), - array('foo' => 'bar'), + ], + [ + ['--foo' => 'bar'], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')], + ['foo' => 'bar'], '->parse() parses long options with a default value', - ), - array( - array(), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')), - array('foo' => 'default'), + ], + [ + [], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')], + ['foo' => 'default'], '->parse() uses the default value for long options with value optional which are not passed', - ), - array( - array('--foo' => null), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')), - array('foo' => null), + ], + [ + ['--foo' => null], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')], + ['foo' => null], '->parse() parses long options with a default value', - ), - array( - array('-f' => 'bar'), - array(new InputOption('foo', 'f')), - array('foo' => 'bar'), + ], + [ + ['-f' => 'bar'], + [new InputOption('foo', 'f')], + ['foo' => 'bar'], '->parse() parses short options', - ), - array( - array('--' => null, '-f' => 'bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')), - array('foo' => 'default'), + ], + [ + ['--' => null, '-f' => 'bar'], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')], + ['foo' => 'default'], '->parse() does not parse opts after an end of options signal', - ), - array( - array('--' => null), - array(), - array(), + ], + [ + ['--' => null], + [], + [], '->parse() does not choke on end of options signal', - ), - ); + ], + ]; } /** @@ -139,39 +139,39 @@ class ArrayInputTest extends TestCase public function provideInvalidInput() { - return array( - array( - array('foo' => 'foo'), - new InputDefinition(array(new InputArgument('name'))), + return [ + [ + ['foo' => 'foo'], + new InputDefinition([new InputArgument('name')]), 'The "foo" argument does not exist.', - ), - array( - array('--foo' => null), - new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED))), + ], + [ + ['--foo' => null], + new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)]), 'The "--foo" option requires a value.', - ), - array( - array('--foo' => 'foo'), + ], + [ + ['--foo' => 'foo'], new InputDefinition(), 'The "--foo" option does not exist.', - ), - array( - array('-o' => 'foo'), + ], + [ + ['-o' => 'foo'], new InputDefinition(), 'The "-o" option does not exist.', - ), - ); + ], + ]; } public function testToString() { - $input = new ArrayInput(array('-f' => null, '-b' => 'bar', '--foo' => 'b a z', '--lala' => null, 'test' => 'Foo', 'test2' => "A\nB'C")); + $input = new ArrayInput(['-f' => null, '-b' => 'bar', '--foo' => 'b a z', '--lala' => null, 'test' => 'Foo', 'test2' => "A\nB'C"]); $this->assertEquals('-f -b=bar --foo='.escapeshellarg('b a z').' --lala Foo '.escapeshellarg("A\nB'C"), (string) $input); - $input = new ArrayInput(array('-b' => array('bval_1', 'bval_2'), '--f' => array('fval_1', 'fval_2'))); + $input = new ArrayInput(['-b' => ['bval_1', 'bval_2'], '--f' => ['fval_1', 'fval_2']]); $this->assertSame('-b=bval_1 -b=bval_2 --f=fval_1 --f=fval_2', (string) $input); - $input = new ArrayInput(array('array_arg' => array('val_1', 'val_2'))); + $input = new ArrayInput(['array_arg' => ['val_1', 'val_2']]); $this->assertSame('val_1 val_2', (string) $input); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputArgumentTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputArgumentTest.php index 66af98b3..7561e10a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputArgumentTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputArgumentTest.php @@ -54,10 +54,10 @@ class InputArgumentTest extends TestCase public function provideInvalidModes() { - return array( - array('ANOTHER_ONE'), - array(-1), - ); + return [ + ['ANOTHER_ONE'], + [-1], + ]; } public function testIsArray() @@ -91,8 +91,8 @@ class InputArgumentTest extends TestCase $this->assertEquals('another', $argument->getDefault(), '->setDefault() changes the default value'); $argument = new InputArgument('foo', InputArgument::OPTIONAL | InputArgument::IS_ARRAY); - $argument->setDefault(array(1, 2)); - $this->assertEquals(array(1, 2), $argument->getDefault(), '->setDefault() changes the default value'); + $argument->setDefault([1, 2]); + $this->assertEquals([1, 2], $argument->getDefault(), '->setDefault() changes the default value'); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php index d9ff5435..5fdcb981 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php @@ -35,10 +35,10 @@ class InputDefinitionTest extends TestCase $this->initializeArguments(); $definition = new InputDefinition(); - $this->assertEquals(array(), $definition->getArguments(), '__construct() creates a new InputDefinition object'); + $this->assertEquals([], $definition->getArguments(), '__construct() creates a new InputDefinition object'); - $definition = new InputDefinition(array($this->foo, $this->bar)); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getArguments(), '__construct() takes an array of InputArgument objects as its first argument'); + $definition = new InputDefinition([$this->foo, $this->bar]); + $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getArguments(), '__construct() takes an array of InputArgument objects as its first argument'); } public function testConstructorOptions() @@ -46,10 +46,10 @@ class InputDefinitionTest extends TestCase $this->initializeOptions(); $definition = new InputDefinition(); - $this->assertEquals(array(), $definition->getOptions(), '__construct() creates a new InputDefinition object'); + $this->assertEquals([], $definition->getOptions(), '__construct() creates a new InputDefinition object'); - $definition = new InputDefinition(array($this->foo, $this->bar)); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getOptions(), '__construct() takes an array of InputOption objects as its first argument'); + $definition = new InputDefinition([$this->foo, $this->bar]); + $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getOptions(), '__construct() takes an array of InputOption objects as its first argument'); } public function testSetArguments() @@ -57,11 +57,11 @@ class InputDefinitionTest extends TestCase $this->initializeArguments(); $definition = new InputDefinition(); - $definition->setArguments(array($this->foo)); - $this->assertEquals(array('foo' => $this->foo), $definition->getArguments(), '->setArguments() sets the array of InputArgument objects'); - $definition->setArguments(array($this->bar)); + $definition->setArguments([$this->foo]); + $this->assertEquals(['foo' => $this->foo], $definition->getArguments(), '->setArguments() sets the array of InputArgument objects'); + $definition->setArguments([$this->bar]); - $this->assertEquals(array('bar' => $this->bar), $definition->getArguments(), '->setArguments() clears all InputArgument objects'); + $this->assertEquals(['bar' => $this->bar], $definition->getArguments(), '->setArguments() clears all InputArgument objects'); } public function testAddArguments() @@ -69,10 +69,10 @@ class InputDefinitionTest extends TestCase $this->initializeArguments(); $definition = new InputDefinition(); - $definition->addArguments(array($this->foo)); - $this->assertEquals(array('foo' => $this->foo), $definition->getArguments(), '->addArguments() adds an array of InputArgument objects'); - $definition->addArguments(array($this->bar)); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getArguments(), '->addArguments() does not clear existing InputArgument objects'); + $definition->addArguments([$this->foo]); + $this->assertEquals(['foo' => $this->foo], $definition->getArguments(), '->addArguments() adds an array of InputArgument objects'); + $definition->addArguments([$this->bar]); + $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getArguments(), '->addArguments() does not clear existing InputArgument objects'); } public function testAddArgument() @@ -81,9 +81,9 @@ class InputDefinitionTest extends TestCase $definition = new InputDefinition(); $definition->addArgument($this->foo); - $this->assertEquals(array('foo' => $this->foo), $definition->getArguments(), '->addArgument() adds a InputArgument object'); + $this->assertEquals(['foo' => $this->foo], $definition->getArguments(), '->addArgument() adds a InputArgument object'); $definition->addArgument($this->bar); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getArguments(), '->addArgument() adds a InputArgument object'); + $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getArguments(), '->addArgument() adds a InputArgument object'); } /** @@ -130,7 +130,7 @@ class InputDefinitionTest extends TestCase $this->initializeArguments(); $definition = new InputDefinition(); - $definition->addArguments(array($this->foo)); + $definition->addArguments([$this->foo]); $this->assertEquals($this->foo, $definition->getArgument('foo'), '->getArgument() returns a InputArgument by its name'); } @@ -143,7 +143,7 @@ class InputDefinitionTest extends TestCase $this->initializeArguments(); $definition = new InputDefinition(); - $definition->addArguments(array($this->foo)); + $definition->addArguments([$this->foo]); $definition->getArgument('bar'); } @@ -152,7 +152,7 @@ class InputDefinitionTest extends TestCase $this->initializeArguments(); $definition = new InputDefinition(); - $definition->addArguments(array($this->foo)); + $definition->addArguments([$this->foo]); $this->assertTrue($definition->hasArgument('foo'), '->hasArgument() returns true if a InputArgument exists for the given name'); $this->assertFalse($definition->hasArgument('bar'), '->hasArgument() returns false if a InputArgument exists for the given name'); @@ -182,28 +182,28 @@ class InputDefinitionTest extends TestCase public function testGetArgumentDefaults() { - $definition = new InputDefinition(array( + $definition = new InputDefinition([ new InputArgument('foo1', InputArgument::OPTIONAL), new InputArgument('foo2', InputArgument::OPTIONAL, '', 'default'), new InputArgument('foo3', InputArgument::OPTIONAL | InputArgument::IS_ARRAY), - // new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', array(1, 2)), - )); - $this->assertEquals(array('foo1' => null, 'foo2' => 'default', 'foo3' => array()), $definition->getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument'); + // new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', [1, 2]), + ]); + $this->assertEquals(['foo1' => null, 'foo2' => 'default', 'foo3' => []], $definition->getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument'); - $definition = new InputDefinition(array( - new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', array(1, 2)), - )); - $this->assertEquals(array('foo4' => array(1, 2)), $definition->getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument'); + $definition = new InputDefinition([ + new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', [1, 2]), + ]); + $this->assertEquals(['foo4' => [1, 2]], $definition->getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument'); } public function testSetOptions() { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); - $this->assertEquals(array('foo' => $this->foo), $definition->getOptions(), '->setOptions() sets the array of InputOption objects'); - $definition->setOptions(array($this->bar)); - $this->assertEquals(array('bar' => $this->bar), $definition->getOptions(), '->setOptions() clears all InputOption objects'); + $definition = new InputDefinition([$this->foo]); + $this->assertEquals(['foo' => $this->foo], $definition->getOptions(), '->setOptions() sets the array of InputOption objects'); + $definition->setOptions([$this->bar]); + $this->assertEquals(['bar' => $this->bar], $definition->getOptions(), '->setOptions() clears all InputOption objects'); } /** @@ -214,8 +214,8 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); - $definition->setOptions(array($this->bar)); + $definition = new InputDefinition([$this->foo]); + $definition->setOptions([$this->bar]); $definition->getOptionForShortcut('f'); } @@ -223,10 +223,10 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); - $this->assertEquals(array('foo' => $this->foo), $definition->getOptions(), '->addOptions() adds an array of InputOption objects'); - $definition->addOptions(array($this->bar)); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getOptions(), '->addOptions() does not clear existing InputOption objects'); + $definition = new InputDefinition([$this->foo]); + $this->assertEquals(['foo' => $this->foo], $definition->getOptions(), '->addOptions() adds an array of InputOption objects'); + $definition->addOptions([$this->bar]); + $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getOptions(), '->addOptions() does not clear existing InputOption objects'); } public function testAddOption() @@ -235,9 +235,9 @@ class InputDefinitionTest extends TestCase $definition = new InputDefinition(); $definition->addOption($this->foo); - $this->assertEquals(array('foo' => $this->foo), $definition->getOptions(), '->addOption() adds a InputOption object'); + $this->assertEquals(['foo' => $this->foo], $definition->getOptions(), '->addOption() adds a InputOption object'); $definition->addOption($this->bar); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getOptions(), '->addOption() adds a InputOption object'); + $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getOptions(), '->addOption() adds a InputOption object'); } /** @@ -270,7 +270,7 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); + $definition = new InputDefinition([$this->foo]); $this->assertEquals($this->foo, $definition->getOption('foo'), '->getOption() returns a InputOption by its name'); } @@ -282,7 +282,7 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); + $definition = new InputDefinition([$this->foo]); $definition->getOption('bar'); } @@ -290,7 +290,7 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); + $definition = new InputDefinition([$this->foo]); $this->assertTrue($definition->hasOption('foo'), '->hasOption() returns true if a InputOption exists for the given name'); $this->assertFalse($definition->hasOption('bar'), '->hasOption() returns false if a InputOption exists for the given name'); } @@ -299,7 +299,7 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); + $definition = new InputDefinition([$this->foo]); $this->assertTrue($definition->hasShortcut('f'), '->hasShortcut() returns true if a InputOption exists for the given shortcut'); $this->assertFalse($definition->hasShortcut('b'), '->hasShortcut() returns false if a InputOption exists for the given shortcut'); } @@ -308,7 +308,7 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); + $definition = new InputDefinition([$this->foo]); $this->assertEquals($this->foo, $definition->getOptionForShortcut('f'), '->getOptionForShortcut() returns a InputOption by its shortcut'); } @@ -316,7 +316,7 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->multi)); + $definition = new InputDefinition([$this->multi]); $this->assertEquals($this->multi, $definition->getOptionForShortcut('m'), '->getOptionForShortcut() returns a InputOption by its shortcut'); $this->assertEquals($this->multi, $definition->getOptionForShortcut('mmm'), '->getOptionForShortcut() returns a InputOption by its shortcut'); } @@ -329,30 +329,30 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); + $definition = new InputDefinition([$this->foo]); $definition->getOptionForShortcut('l'); } public function testGetOptionDefaults() { - $definition = new InputDefinition(array( + $definition = new InputDefinition([ new InputOption('foo1', null, InputOption::VALUE_NONE), new InputOption('foo2', null, InputOption::VALUE_REQUIRED), new InputOption('foo3', null, InputOption::VALUE_REQUIRED, '', 'default'), new InputOption('foo4', null, InputOption::VALUE_OPTIONAL), new InputOption('foo5', null, InputOption::VALUE_OPTIONAL, '', 'default'), new InputOption('foo6', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY), - new InputOption('foo7', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, '', array(1, 2)), - )); - $defaults = array( + new InputOption('foo7', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, '', [1, 2]), + ]); + $defaults = [ 'foo1' => false, 'foo2' => null, 'foo3' => 'default', 'foo4' => null, 'foo5' => 'default', - 'foo6' => array(), - 'foo7' => array(1, 2), - ); + 'foo6' => [], + 'foo7' => [1, 2], + ]; $this->assertSame($defaults, $definition->getOptionDefaults(), '->getOptionDefaults() returns the default values for all options'); } @@ -366,24 +366,24 @@ class InputDefinitionTest extends TestCase public function getGetSynopsisData() { - return array( - array(new InputDefinition(array(new InputOption('foo'))), '[--foo]', 'puts optional options in square brackets'), - array(new InputDefinition(array(new InputOption('foo', 'f'))), '[-f|--foo]', 'separates shortcut with a pipe'), - array(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED))), '[-f|--foo FOO]', 'uses shortcut as value placeholder'), - array(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL))), '[-f|--foo [FOO]]', 'puts optional values in square brackets'), + return [ + [new InputDefinition([new InputOption('foo')]), '[--foo]', 'puts optional options in square brackets'], + [new InputDefinition([new InputOption('foo', 'f')]), '[-f|--foo]', 'separates shortcut with a pipe'], + [new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)]), '[-f|--foo FOO]', 'uses shortcut as value placeholder'], + [new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)]), '[-f|--foo [FOO]]', 'puts optional values in square brackets'], - array(new InputDefinition(array(new InputArgument('foo', InputArgument::REQUIRED))), '', 'puts arguments in angle brackets'), - array(new InputDefinition(array(new InputArgument('foo'))), '[]', 'puts optional arguments in square brackets'), - array(new InputDefinition(array(new InputArgument('foo', InputArgument::IS_ARRAY))), '[]...', 'uses an ellipsis for array arguments'), - array(new InputDefinition(array(new InputArgument('foo', InputArgument::REQUIRED | InputArgument::IS_ARRAY))), ' ()...', 'uses parenthesis and ellipsis for required array arguments'), + [new InputDefinition([new InputArgument('foo', InputArgument::REQUIRED)]), '', 'puts arguments in angle brackets'], + [new InputDefinition([new InputArgument('foo')]), '[]', 'puts optional arguments in square brackets'], + [new InputDefinition([new InputArgument('foo', InputArgument::IS_ARRAY)]), '[]...', 'uses an ellipsis for array arguments'], + [new InputDefinition([new InputArgument('foo', InputArgument::REQUIRED | InputArgument::IS_ARRAY)]), ' ()...', 'uses parenthesis and ellipsis for required array arguments'], - array(new InputDefinition(array(new InputOption('foo'), new InputArgument('foo', InputArgument::REQUIRED))), '[--foo] [--] ', 'puts [--] between options and arguments'), - ); + [new InputDefinition([new InputOption('foo'), new InputArgument('foo', InputArgument::REQUIRED)]), '[--foo] [--] ', 'puts [--] between options and arguments'], + ]; } public function testGetShortSynopsis() { - $definition = new InputDefinition(array(new InputOption('foo'), new InputOption('bar'), new InputArgument('cat'))); + $definition = new InputDefinition([new InputOption('foo'), new InputOption('bar'), new InputArgument('cat')]); $this->assertEquals('[options] [--] []', $definition->getSynopsis(true), '->getSynopsis(true) groups options in [options]'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputOptionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputOptionTest.php index 943bf607..413cb527 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputOptionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputOptionTest.php @@ -39,7 +39,7 @@ class InputOptionTest extends TestCase $this->assertEquals('f', $option->getShortcut(), '__construct() can take a shortcut as its second argument'); $option = new InputOption('foo', '-f|-ff|fff'); $this->assertEquals('f|ff|fff', $option->getShortcut(), '__construct() removes the leading - of the shortcuts'); - $option = new InputOption('foo', array('f', 'ff', '-fff')); + $option = new InputOption('foo', ['f', 'ff', '-fff']); $this->assertEquals('f|ff|fff', $option->getShortcut(), '__construct() removes the leading - of the shortcuts'); $option = new InputOption('foo'); $this->assertNull($option->getShortcut(), '__construct() makes the shortcut null by default'); @@ -90,10 +90,10 @@ class InputOptionTest extends TestCase public function provideInvalidModes() { - return array( - array('ANOTHER_ONE'), - array(-1), - ); + return [ + ['ANOTHER_ONE'], + [-1], + ]; } /** @@ -146,7 +146,7 @@ class InputOptionTest extends TestCase $this->assertNull($option->getDefault(), '->getDefault() returns null if no default value is configured'); $option = new InputOption('foo', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY); - $this->assertEquals(array(), $option->getDefault(), '->getDefault() returns an empty array if option is an array'); + $this->assertEquals([], $option->getDefault(), '->getDefault() returns an empty array if option is an array'); $option = new InputOption('foo', null, InputOption::VALUE_NONE); $this->assertFalse($option->getDefault(), '->getDefault() returns false if the option does not take a value'); @@ -161,8 +161,8 @@ class InputOptionTest extends TestCase $this->assertEquals('another', $option->getDefault(), '->setDefault() changes the default value'); $option = new InputOption('foo', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY); - $option->setDefault(array(1, 2)); - $this->assertEquals(array(1, 2), $option->getDefault(), '->setDefault() changes the default value'); + $option->setDefault([1, 2]); + $this->assertEquals([1, 2], $option->getDefault(), '->setDefault() changes the default value'); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputTest.php index 7cf1d244..61608bf2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputTest.php @@ -21,30 +21,30 @@ class InputTest extends TestCase { public function testConstructor() { - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name')))); + $input = new ArrayInput(['name' => 'foo'], new InputDefinition([new InputArgument('name')])); $this->assertEquals('foo', $input->getArgument('name'), '->__construct() takes a InputDefinition as an argument'); } public function testOptions() { - $input = new ArrayInput(array('--name' => 'foo'), new InputDefinition(array(new InputOption('name')))); + $input = new ArrayInput(['--name' => 'foo'], new InputDefinition([new InputOption('name')])); $this->assertEquals('foo', $input->getOption('name'), '->getOption() returns the value for the given option'); $input->setOption('name', 'bar'); $this->assertEquals('bar', $input->getOption('name'), '->setOption() sets the value for a given option'); - $this->assertEquals(array('name' => 'bar'), $input->getOptions(), '->getOptions() returns all option values'); + $this->assertEquals(['name' => 'bar'], $input->getOptions(), '->getOptions() returns all option values'); - $input = new ArrayInput(array('--name' => 'foo'), new InputDefinition(array(new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')))); + $input = new ArrayInput(['--name' => 'foo'], new InputDefinition([new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')])); $this->assertEquals('default', $input->getOption('bar'), '->getOption() returns the default value for optional options'); - $this->assertEquals(array('name' => 'foo', 'bar' => 'default'), $input->getOptions(), '->getOptions() returns all option values, even optional ones'); + $this->assertEquals(['name' => 'foo', 'bar' => 'default'], $input->getOptions(), '->getOptions() returns all option values, even optional ones'); - $input = new ArrayInput(array('--name' => 'foo', '--bar' => ''), new InputDefinition(array(new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')))); + $input = new ArrayInput(['--name' => 'foo', '--bar' => ''], new InputDefinition([new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')])); $this->assertEquals('', $input->getOption('bar'), '->getOption() returns null for options explicitly passed without value (or an empty value)'); - $this->assertEquals(array('name' => 'foo', 'bar' => ''), $input->getOptions(), '->getOptions() returns all option values.'); + $this->assertEquals(['name' => 'foo', 'bar' => ''], $input->getOptions(), '->getOptions() returns all option values.'); - $input = new ArrayInput(array('--name' => 'foo', '--bar' => null), new InputDefinition(array(new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')))); + $input = new ArrayInput(['--name' => 'foo', '--bar' => null], new InputDefinition([new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')])); $this->assertNull($input->getOption('bar'), '->getOption() returns null for options explicitly passed without value (or an empty value)'); - $this->assertEquals(array('name' => 'foo', 'bar' => null), $input->getOptions(), '->getOptions() returns all option values'); + $this->assertEquals(['name' => 'foo', 'bar' => null], $input->getOptions(), '->getOptions() returns all option values'); } /** @@ -53,7 +53,7 @@ class InputTest extends TestCase */ public function testSetInvalidOption() { - $input = new ArrayInput(array('--name' => 'foo'), new InputDefinition(array(new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')))); + $input = new ArrayInput(['--name' => 'foo'], new InputDefinition([new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')])); $input->setOption('foo', 'bar'); } @@ -63,22 +63,22 @@ class InputTest extends TestCase */ public function testGetInvalidOption() { - $input = new ArrayInput(array('--name' => 'foo'), new InputDefinition(array(new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')))); + $input = new ArrayInput(['--name' => 'foo'], new InputDefinition([new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')])); $input->getOption('foo'); } public function testArguments() { - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name')))); + $input = new ArrayInput(['name' => 'foo'], new InputDefinition([new InputArgument('name')])); $this->assertEquals('foo', $input->getArgument('name'), '->getArgument() returns the value for the given argument'); $input->setArgument('name', 'bar'); $this->assertEquals('bar', $input->getArgument('name'), '->setArgument() sets the value for a given argument'); - $this->assertEquals(array('name' => 'bar'), $input->getArguments(), '->getArguments() returns all argument values'); + $this->assertEquals(['name' => 'bar'], $input->getArguments(), '->getArguments() returns all argument values'); - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')))); + $input = new ArrayInput(['name' => 'foo'], new InputDefinition([new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')])); $this->assertEquals('default', $input->getArgument('bar'), '->getArgument() returns the default value for optional arguments'); - $this->assertEquals(array('name' => 'foo', 'bar' => 'default'), $input->getArguments(), '->getArguments() returns all argument values, even optional ones'); + $this->assertEquals(['name' => 'foo', 'bar' => 'default'], $input->getArguments(), '->getArguments() returns all argument values, even optional ones'); } /** @@ -87,7 +87,7 @@ class InputTest extends TestCase */ public function testSetInvalidArgument() { - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')))); + $input = new ArrayInput(['name' => 'foo'], new InputDefinition([new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')])); $input->setArgument('foo', 'bar'); } @@ -97,7 +97,7 @@ class InputTest extends TestCase */ public function testGetInvalidArgument() { - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')))); + $input = new ArrayInput(['name' => 'foo'], new InputDefinition([new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')])); $input->getArgument('foo'); } @@ -107,8 +107,8 @@ class InputTest extends TestCase */ public function testValidateWithMissingArguments() { - $input = new ArrayInput(array()); - $input->bind(new InputDefinition(array(new InputArgument('name', InputArgument::REQUIRED)))); + $input = new ArrayInput([]); + $input->bind(new InputDefinition([new InputArgument('name', InputArgument::REQUIRED)])); $input->validate(); } @@ -118,22 +118,22 @@ class InputTest extends TestCase */ public function testValidateWithMissingRequiredArguments() { - $input = new ArrayInput(array('bar' => 'baz')); - $input->bind(new InputDefinition(array(new InputArgument('name', InputArgument::REQUIRED), new InputArgument('bar', InputArgument::OPTIONAL)))); + $input = new ArrayInput(['bar' => 'baz']); + $input->bind(new InputDefinition([new InputArgument('name', InputArgument::REQUIRED), new InputArgument('bar', InputArgument::OPTIONAL)])); $input->validate(); } public function testValidate() { - $input = new ArrayInput(array('name' => 'foo')); - $input->bind(new InputDefinition(array(new InputArgument('name', InputArgument::REQUIRED)))); + $input = new ArrayInput(['name' => 'foo']); + $input->bind(new InputDefinition([new InputArgument('name', InputArgument::REQUIRED)])); $this->assertNull($input->validate()); } public function testSetGetInteractive() { - $input = new ArrayInput(array()); + $input = new ArrayInput([]); $this->assertTrue($input->isInteractive(), '->isInteractive() returns whether the input should be interactive or not'); $input->setInteractive(false); $this->assertFalse($input->isInteractive(), '->setInteractive() changes the interactive flag'); @@ -141,7 +141,7 @@ class InputTest extends TestCase public function testSetGetStream() { - $input = new ArrayInput(array()); + $input = new ArrayInput([]); $stream = fopen('php://memory', 'r+', false); $input->setStream($stream); $this->assertSame($stream, $input->getStream()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/StringInputTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/StringInputTest.php index f2e3467e..7f218945 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/StringInputTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/StringInputTest.php @@ -33,7 +33,7 @@ class StringInputTest extends TestCase public function testInputOptionWithGivenString() { $definition = new InputDefinition( - array(new InputOption('foo', null, InputOption::VALUE_REQUIRED)) + [new InputOption('foo', null, InputOption::VALUE_REQUIRED)] ); // call to bind @@ -44,33 +44,33 @@ class StringInputTest extends TestCase public function getTokenizeData() { - return array( - array('', array(), '->tokenize() parses an empty string'), - array('foo', array('foo'), '->tokenize() parses arguments'), - array(' foo bar ', array('foo', 'bar'), '->tokenize() ignores whitespaces between arguments'), - array('"quoted"', array('quoted'), '->tokenize() parses quoted arguments'), - array("'quoted'", array('quoted'), '->tokenize() parses quoted arguments'), - array("'a\rb\nc\td'", array("a\rb\nc\td"), '->tokenize() parses whitespace chars in strings'), - array("'a'\r'b'\n'c'\t'd'", array('a', 'b', 'c', 'd'), '->tokenize() parses whitespace chars between args as spaces'), - array('\"quoted\"', array('"quoted"'), '->tokenize() parses escaped-quoted arguments'), - array("\'quoted\'", array('\'quoted\''), '->tokenize() parses escaped-quoted arguments'), - array('-a', array('-a'), '->tokenize() parses short options'), - array('-azc', array('-azc'), '->tokenize() parses aggregated short options'), - array('-awithavalue', array('-awithavalue'), '->tokenize() parses short options with a value'), - array('-a"foo bar"', array('-afoo bar'), '->tokenize() parses short options with a value'), - array('-a"foo bar""foo bar"', array('-afoo barfoo bar'), '->tokenize() parses short options with a value'), - array('-a\'foo bar\'', array('-afoo bar'), '->tokenize() parses short options with a value'), - array('-a\'foo bar\'\'foo bar\'', array('-afoo barfoo bar'), '->tokenize() parses short options with a value'), - array('-a\'foo bar\'"foo bar"', array('-afoo barfoo bar'), '->tokenize() parses short options with a value'), - array('--long-option', array('--long-option'), '->tokenize() parses long options'), - array('--long-option=foo', array('--long-option=foo'), '->tokenize() parses long options with a value'), - array('--long-option="foo bar"', array('--long-option=foo bar'), '->tokenize() parses long options with a value'), - array('--long-option="foo bar""another"', array('--long-option=foo baranother'), '->tokenize() parses long options with a value'), - array('--long-option=\'foo bar\'', array('--long-option=foo bar'), '->tokenize() parses long options with a value'), - array("--long-option='foo bar''another'", array('--long-option=foo baranother'), '->tokenize() parses long options with a value'), - array("--long-option='foo bar'\"another\"", array('--long-option=foo baranother'), '->tokenize() parses long options with a value'), - array('foo -a -ffoo --long bar', array('foo', '-a', '-ffoo', '--long', 'bar'), '->tokenize() parses when several arguments and options'), - ); + return [ + ['', [], '->tokenize() parses an empty string'], + ['foo', ['foo'], '->tokenize() parses arguments'], + [' foo bar ', ['foo', 'bar'], '->tokenize() ignores whitespaces between arguments'], + ['"quoted"', ['quoted'], '->tokenize() parses quoted arguments'], + ["'quoted'", ['quoted'], '->tokenize() parses quoted arguments'], + ["'a\rb\nc\td'", ["a\rb\nc\td"], '->tokenize() parses whitespace chars in strings'], + ["'a'\r'b'\n'c'\t'd'", ['a', 'b', 'c', 'd'], '->tokenize() parses whitespace chars between args as spaces'], + ['\"quoted\"', ['"quoted"'], '->tokenize() parses escaped-quoted arguments'], + ["\'quoted\'", ['\'quoted\''], '->tokenize() parses escaped-quoted arguments'], + ['-a', ['-a'], '->tokenize() parses short options'], + ['-azc', ['-azc'], '->tokenize() parses aggregated short options'], + ['-awithavalue', ['-awithavalue'], '->tokenize() parses short options with a value'], + ['-a"foo bar"', ['-afoo bar'], '->tokenize() parses short options with a value'], + ['-a"foo bar""foo bar"', ['-afoo barfoo bar'], '->tokenize() parses short options with a value'], + ['-a\'foo bar\'', ['-afoo bar'], '->tokenize() parses short options with a value'], + ['-a\'foo bar\'\'foo bar\'', ['-afoo barfoo bar'], '->tokenize() parses short options with a value'], + ['-a\'foo bar\'"foo bar"', ['-afoo barfoo bar'], '->tokenize() parses short options with a value'], + ['--long-option', ['--long-option'], '->tokenize() parses long options'], + ['--long-option=foo', ['--long-option=foo'], '->tokenize() parses long options with a value'], + ['--long-option="foo bar"', ['--long-option=foo bar'], '->tokenize() parses long options with a value'], + ['--long-option="foo bar""another"', ['--long-option=foo baranother'], '->tokenize() parses long options with a value'], + ['--long-option=\'foo bar\'', ['--long-option=foo bar'], '->tokenize() parses long options with a value'], + ["--long-option='foo bar''another'", ['--long-option=foo baranother'], '->tokenize() parses long options with a value'], + ["--long-option='foo bar'\"another\"", ['--long-option=foo baranother'], '->tokenize() parses long options with a value'], + ['foo -a -ffoo --long bar', ['foo', '-a', '-ffoo', '--long', 'bar'], '->tokenize() parses when several arguments and options'], + ]; } public function testToString() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php index 95e78fc2..efeec423 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php @@ -39,7 +39,7 @@ class ConsoleLoggerTest extends TestCase { $this->output = new DummyOutput(OutputInterface::VERBOSITY_VERBOSE); - return new ConsoleLogger($this->output, array( + return new ConsoleLogger($this->output, [ LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL, @@ -48,7 +48,7 @@ class ConsoleLoggerTest extends TestCase LogLevel::NOTICE => OutputInterface::VERBOSITY_NORMAL, LogLevel::INFO => OutputInterface::VERBOSITY_NORMAL, LogLevel::DEBUG => OutputInterface::VERBOSITY_NORMAL, - )); + ]); } /** @@ -64,7 +64,7 @@ class ConsoleLoggerTest extends TestCase /** * @dataProvider provideOutputMappingParams */ - public function testOutputMapping($logLevel, $outputVerbosity, $isOutput, $addVerbosityLevelMap = array()) + public function testOutputMapping($logLevel, $outputVerbosity, $isOutput, $addVerbosityLevelMap = []) { $out = new BufferedOutput($outputVerbosity); $logger = new ConsoleLogger($out, $addVerbosityLevelMap); @@ -75,22 +75,22 @@ class ConsoleLoggerTest extends TestCase public function provideOutputMappingParams() { - $quietMap = array(LogLevel::EMERGENCY => OutputInterface::VERBOSITY_QUIET); + $quietMap = [LogLevel::EMERGENCY => OutputInterface::VERBOSITY_QUIET]; - return array( - array(LogLevel::EMERGENCY, OutputInterface::VERBOSITY_NORMAL, true), - array(LogLevel::WARNING, OutputInterface::VERBOSITY_NORMAL, true), - array(LogLevel::INFO, OutputInterface::VERBOSITY_NORMAL, false), - array(LogLevel::DEBUG, OutputInterface::VERBOSITY_NORMAL, false), - array(LogLevel::INFO, OutputInterface::VERBOSITY_VERBOSE, false), - array(LogLevel::INFO, OutputInterface::VERBOSITY_VERY_VERBOSE, true), - array(LogLevel::DEBUG, OutputInterface::VERBOSITY_VERY_VERBOSE, false), - array(LogLevel::DEBUG, OutputInterface::VERBOSITY_DEBUG, true), - array(LogLevel::ALERT, OutputInterface::VERBOSITY_QUIET, false), - array(LogLevel::EMERGENCY, OutputInterface::VERBOSITY_QUIET, false), - array(LogLevel::ALERT, OutputInterface::VERBOSITY_QUIET, false, $quietMap), - array(LogLevel::EMERGENCY, OutputInterface::VERBOSITY_QUIET, true, $quietMap), - ); + return [ + [LogLevel::EMERGENCY, OutputInterface::VERBOSITY_NORMAL, true], + [LogLevel::WARNING, OutputInterface::VERBOSITY_NORMAL, true], + [LogLevel::INFO, OutputInterface::VERBOSITY_NORMAL, false], + [LogLevel::DEBUG, OutputInterface::VERBOSITY_NORMAL, false], + [LogLevel::INFO, OutputInterface::VERBOSITY_VERBOSE, false], + [LogLevel::INFO, OutputInterface::VERBOSITY_VERY_VERBOSE, true], + [LogLevel::DEBUG, OutputInterface::VERBOSITY_VERY_VERBOSE, false], + [LogLevel::DEBUG, OutputInterface::VERBOSITY_DEBUG, true], + [LogLevel::ALERT, OutputInterface::VERBOSITY_QUIET, false], + [LogLevel::EMERGENCY, OutputInterface::VERBOSITY_QUIET, false], + [LogLevel::ALERT, OutputInterface::VERBOSITY_QUIET, false, $quietMap], + [LogLevel::EMERGENCY, OutputInterface::VERBOSITY_QUIET, true, $quietMap], + ]; } public function testHasErrored() @@ -117,28 +117,28 @@ class ConsoleLoggerTest extends TestCase public function testLogsAtAllLevels($level, $message) { $logger = $this->getLogger(); - $logger->{$level}($message, array('user' => 'Bob')); - $logger->log($level, $message, array('user' => 'Bob')); + $logger->{$level}($message, ['user' => 'Bob']); + $logger->log($level, $message, ['user' => 'Bob']); - $expected = array( + $expected = [ $level.' message of level '.$level.' with context: Bob', $level.' message of level '.$level.' with context: Bob', - ); + ]; $this->assertEquals($expected, $this->getLogs()); } public function provideLevelsAndMessages() { - return array( - LogLevel::EMERGENCY => array(LogLevel::EMERGENCY, 'message of level emergency with context: {user}'), - LogLevel::ALERT => array(LogLevel::ALERT, 'message of level alert with context: {user}'), - LogLevel::CRITICAL => array(LogLevel::CRITICAL, 'message of level critical with context: {user}'), - LogLevel::ERROR => array(LogLevel::ERROR, 'message of level error with context: {user}'), - LogLevel::WARNING => array(LogLevel::WARNING, 'message of level warning with context: {user}'), - LogLevel::NOTICE => array(LogLevel::NOTICE, 'message of level notice with context: {user}'), - LogLevel::INFO => array(LogLevel::INFO, 'message of level info with context: {user}'), - LogLevel::DEBUG => array(LogLevel::DEBUG, 'message of level debug with context: {user}'), - ); + return [ + LogLevel::EMERGENCY => [LogLevel::EMERGENCY, 'message of level emergency with context: {user}'], + LogLevel::ALERT => [LogLevel::ALERT, 'message of level alert with context: {user}'], + LogLevel::CRITICAL => [LogLevel::CRITICAL, 'message of level critical with context: {user}'], + LogLevel::ERROR => [LogLevel::ERROR, 'message of level error with context: {user}'], + LogLevel::WARNING => [LogLevel::WARNING, 'message of level warning with context: {user}'], + LogLevel::NOTICE => [LogLevel::NOTICE, 'message of level notice with context: {user}'], + LogLevel::INFO => [LogLevel::INFO, 'message of level info with context: {user}'], + LogLevel::DEBUG => [LogLevel::DEBUG, 'message of level debug with context: {user}'], + ]; } /** @@ -153,56 +153,56 @@ class ConsoleLoggerTest extends TestCase public function testContextReplacement() { $logger = $this->getLogger(); - $logger->info('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar')); + $logger->info('{Message {nothing} {user} {foo.bar} a}', ['user' => 'Bob', 'foo.bar' => 'Bar']); - $expected = array('info {Message {nothing} Bob Bar a}'); + $expected = ['info {Message {nothing} Bob Bar a}']; $this->assertEquals($expected, $this->getLogs()); } public function testObjectCastToString() { if (method_exists($this, 'createPartialMock')) { - $dummy = $this->createPartialMock('Symfony\Component\Console\Tests\Logger\DummyTest', array('__toString')); + $dummy = $this->createPartialMock('Symfony\Component\Console\Tests\Logger\DummyTest', ['__toString']); } else { - $dummy = $this->getMock('Symfony\Component\Console\Tests\Logger\DummyTest', array('__toString')); + $dummy = $this->getMock('Symfony\Component\Console\Tests\Logger\DummyTest', ['__toString']); } $dummy->method('__toString')->will($this->returnValue('DUMMY')); $this->getLogger()->warning($dummy); - $expected = array('warning DUMMY'); + $expected = ['warning DUMMY']; $this->assertEquals($expected, $this->getLogs()); } public function testContextCanContainAnything() { - $context = array( + $context = [ 'bool' => true, 'null' => null, 'string' => 'Foo', 'int' => 0, 'float' => 0.5, - 'nested' => array('with object' => new DummyTest()), + 'nested' => ['with object' => new DummyTest()], 'object' => new \DateTime(), 'resource' => fopen('php://memory', 'r'), - ); + ]; $this->getLogger()->warning('Crazy context data', $context); - $expected = array('warning Crazy context data'); + $expected = ['warning Crazy context data']; $this->assertEquals($expected, $this->getLogs()); } public function testContextExceptionKeyCanBeExceptionOrOtherValues() { $logger = $this->getLogger(); - $logger->warning('Random message', array('exception' => 'oops')); - $logger->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail'))); + $logger->warning('Random message', ['exception' => 'oops']); + $logger->critical('Uncaught Exception!', ['exception' => new \LogicException('Fail')]); - $expected = array( + $expected = [ 'warning Random message', 'critical Uncaught Exception!', - ); + ]; $this->assertEquals($expected, $this->getLogs()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Output/OutputTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Output/OutputTest.php index fbd4e849..58659f28 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Output/OutputTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Output/OutputTest.php @@ -77,7 +77,7 @@ class OutputTest extends TestCase public function testWriteAnArrayOfMessages() { $output = new TestOutput(); - $output->writeln(array('foo', 'bar')); + $output->writeln(['foo', 'bar']); $this->assertEquals("foo\nbar\n", $output->output, '->writeln() can take an array of messages to output'); } @@ -93,10 +93,10 @@ class OutputTest extends TestCase public function provideWriteArguments() { - return array( - array('foo', Output::OUTPUT_RAW, "foo\n"), - array('foo', Output::OUTPUT_PLAIN, "foo\n"), - ); + return [ + ['foo', Output::OUTPUT_RAW, "foo\n"], + ['foo', Output::OUTPUT_PLAIN, "foo\n"], + ]; } public function testWriteWithDecorationTurnedOff() @@ -109,7 +109,7 @@ class OutputTest extends TestCase public function testWriteDecoratedMessage() { - $fooStyle = new OutputFormatterStyle('yellow', 'red', array('blink')); + $fooStyle = new OutputFormatterStyle('yellow', 'red', ['blink']); $output = new TestOutput(); $output->getFormatter()->setStyle('FOO', $fooStyle); $output->setDecorated(true); @@ -150,13 +150,13 @@ class OutputTest extends TestCase public function verbosityProvider() { - return array( - array(Output::VERBOSITY_QUIET, '2', '->write() in QUIET mode only outputs when an explicit QUIET verbosity is passed'), - array(Output::VERBOSITY_NORMAL, '123', '->write() in NORMAL mode outputs anything below an explicit VERBOSE verbosity'), - array(Output::VERBOSITY_VERBOSE, '1234', '->write() in VERBOSE mode outputs anything below an explicit VERY_VERBOSE verbosity'), - array(Output::VERBOSITY_VERY_VERBOSE, '12345', '->write() in VERY_VERBOSE mode outputs anything below an explicit DEBUG verbosity'), - array(Output::VERBOSITY_DEBUG, '123456', '->write() in DEBUG mode outputs everything'), - ); + return [ + [Output::VERBOSITY_QUIET, '2', '->write() in QUIET mode only outputs when an explicit QUIET verbosity is passed'], + [Output::VERBOSITY_NORMAL, '123', '->write() in NORMAL mode outputs anything below an explicit VERBOSE verbosity'], + [Output::VERBOSITY_VERBOSE, '1234', '->write() in VERBOSE mode outputs anything below an explicit VERY_VERBOSE verbosity'], + [Output::VERBOSITY_VERY_VERBOSE, '12345', '->write() in VERY_VERBOSE mode outputs anything below an explicit DEBUG verbosity'], + [Output::VERBOSITY_DEBUG, '123456', '->write() in DEBUG mode outputs everything'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php index 308030bb..e6e061f4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php @@ -48,7 +48,7 @@ class SymfonyStyleTest extends TestCase { $code = require $inputCommandFilepath; $this->command->setCode($code); - $this->tester->execute(array(), array('interactive' => false, 'decorated' => false)); + $this->tester->execute([], ['interactive' => false, 'decorated' => false]); $this->assertStringEqualsFile($outputFilepath, $this->tester->getDisplay(true)); } @@ -59,7 +59,7 @@ class SymfonyStyleTest extends TestCase { $code = require $inputCommandFilepath; $this->command->setCode($code); - $this->tester->execute(array(), array('interactive' => true, 'decorated' => false)); + $this->tester->execute([], ['interactive' => true, 'decorated' => false]); $this->assertStringEqualsFile($outputFilepath, $this->tester->getDisplay(true)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php index 57e7136d..74c35620 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php @@ -31,7 +31,7 @@ class ApplicationTesterTest extends TestCase ; $this->tester = new ApplicationTester($this->application); - $this->tester->run(array('command' => 'foo', 'foo' => 'bar'), array('interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); + $this->tester->run(['command' => 'foo', 'foo' => 'bar'], ['interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE]); } protected function tearDown() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php index 58eb8103..f916b182 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php @@ -17,6 +17,7 @@ use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\HelperSet; use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Output\Output; +use Symfony\Component\Console\Question\ChoiceQuestion; use Symfony\Component\Console\Question\Question; use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Tester\CommandTester; @@ -34,7 +35,7 @@ class CommandTesterTest extends TestCase $this->command->setCode(function ($input, $output) { $output->writeln('foo'); }); $this->tester = new CommandTester($this->command); - $this->tester->execute(array('foo' => 'bar'), array('interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); + $this->tester->execute(['foo' => 'bar'], ['interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE]); } protected function tearDown() @@ -84,19 +85,19 @@ class CommandTesterTest extends TestCase $tester = new CommandTester($application->find('foo')); // check that there is no need to pass the command name here - $this->assertEquals(0, $tester->execute(array())); + $this->assertEquals(0, $tester->execute([])); } public function testCommandWithInputs() { - $questions = array( + $questions = [ 'What\'s your name?', 'How are you?', 'Where do you come from?', - ); + ]; $command = new Command('foo'); - $command->setHelperSet(new HelperSet(array(new QuestionHelper()))); + $command->setHelperSet(new HelperSet([new QuestionHelper()])); $command->setCode(function ($input, $output) use ($questions, $command) { $helper = $command->getHelper('question'); $helper->ask($input, $output, new Question($questions[0])); @@ -105,8 +106,33 @@ class CommandTesterTest extends TestCase }); $tester = new CommandTester($command); - $tester->setInputs(array('Bobby', 'Fine', 'France')); - $tester->execute(array()); + $tester->setInputs(['Bobby', 'Fine', 'France']); + $tester->execute([]); + + $this->assertEquals(0, $tester->getStatusCode()); + $this->assertEquals(implode('', $questions), $tester->getDisplay(true)); + } + + public function testCommandWithDefaultInputs() + { + $questions = [ + 'What\'s your name?', + 'How are you?', + 'Where do you come from?', + ]; + + $command = new Command('foo'); + $command->setHelperSet(new HelperSet([new QuestionHelper()])); + $command->setCode(function ($input, $output) use ($questions, $command) { + $helper = $command->getHelper('question'); + $helper->ask($input, $output, new Question($questions[0], 'Bobby')); + $helper->ask($input, $output, new Question($questions[1], 'Fine')); + $helper->ask($input, $output, new Question($questions[2], 'France')); + }); + + $tester = new CommandTester($command); + $tester->setInputs(['', '', '']); + $tester->execute([]); $this->assertEquals(0, $tester->getStatusCode()); $this->assertEquals(implode('', $questions), $tester->getDisplay(true)); @@ -114,37 +140,64 @@ class CommandTesterTest extends TestCase /** * @expectedException \RuntimeException - * @expectedMessage Aborted + * @expectedExceptionMessage Aborted. */ public function testCommandWithWrongInputsNumber() { - $questions = array( + $questions = [ 'What\'s your name?', 'How are you?', 'Where do you come from?', - ); + ]; $command = new Command('foo'); - $command->setHelperSet(new HelperSet(array(new QuestionHelper()))); + $command->setHelperSet(new HelperSet([new QuestionHelper()])); $command->setCode(function ($input, $output) use ($questions, $command) { $helper = $command->getHelper('question'); + $helper->ask($input, $output, new ChoiceQuestion('choice', ['a', 'b'])); $helper->ask($input, $output, new Question($questions[0])); $helper->ask($input, $output, new Question($questions[1])); $helper->ask($input, $output, new Question($questions[2])); }); $tester = new CommandTester($command); - $tester->setInputs(array('Bobby', 'Fine')); - $tester->execute(array()); + $tester->setInputs(['a', 'Bobby', 'Fine']); + $tester->execute([]); + } + + /** + * @expectedException \RuntimeException + * @expectedExceptionMessage Aborted. + */ + public function testCommandWithQuestionsButNoInputs() + { + $questions = [ + 'What\'s your name?', + 'How are you?', + 'Where do you come from?', + ]; + + $command = new Command('foo'); + $command->setHelperSet(new HelperSet([new QuestionHelper()])); + $command->setCode(function ($input, $output) use ($questions, $command) { + $helper = $command->getHelper('question'); + $helper->ask($input, $output, new ChoiceQuestion('choice', ['a', 'b'])); + $helper->ask($input, $output, new Question($questions[0])); + $helper->ask($input, $output, new Question($questions[1])); + $helper->ask($input, $output, new Question($questions[2])); + }); + + $tester = new CommandTester($command); + $tester->execute([]); } public function testSymfonyStyleCommandWithInputs() { - $questions = array( + $questions = [ 'What\'s your name?', 'How are you?', 'Where do you come from?', - ); + ]; $command = new Command('foo'); $command->setCode(function ($input, $output) use ($questions, $command) { @@ -155,8 +208,8 @@ class CommandTesterTest extends TestCase }); $tester = new CommandTester($command); - $tester->setInputs(array('Bobby', 'Fine', 'France')); - $tester->execute(array()); + $tester->setInputs(['Bobby', 'Fine', 'France']); + $tester->execute([]); $this->assertEquals(0, $tester->getStatusCode()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/composer.json b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/composer.json index ab348abd..d994a460 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/composer.json +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Console/composer.json @@ -28,11 +28,14 @@ "symfony/process": "~3.3|~4.0", "psr/log": "~1.0" }, + "provide": { + "psr/log-implementation": "1.0" + }, "suggest": { "symfony/event-dispatcher": "", "symfony/lock": "", "symfony/process": "", - "psr/log-implementation": "For using the console logger" + "psr/log": "For using the console logger" }, "conflict": { "symfony/dependency-injection": "<3.4", diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/FunctionNode.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/FunctionNode.php index 50268255..677affaa 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/FunctionNode.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/FunctionNode.php @@ -34,7 +34,7 @@ class FunctionNode extends AbstractNode * @param string $name * @param Token[] $arguments */ - public function __construct(NodeInterface $selector, $name, array $arguments = array()) + public function __construct(NodeInterface $selector, $name, array $arguments = []) { $this->selector = $selector; $this->name = strtolower($name); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php index 00155b04..9869176b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php @@ -47,7 +47,7 @@ class StringHandler implements HandlerInterface { $quote = $reader->getSubstring(1); - if (!\in_array($quote, array("'", '"'))) { + if (!\in_array($quote, ["'", '"'])) { return false; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Parser.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Parser.php index 87c05a74..f07985ac 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Parser.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Parser.php @@ -76,22 +76,22 @@ class Parser implements ParserInterface switch (true) { case 'odd' === $joined: - return array(2, 1); + return [2, 1]; case 'even' === $joined: - return array(2, 0); + return [2, 0]; case 'n' === $joined: - return array(1, 0); + return [1, 0]; case false === strpos($joined, 'n'): - return array(0, $int($joined)); + return [0, $int($joined)]; } $split = explode('n', $joined); $first = isset($split[0]) ? $split[0] : null; - return array( + return [ $first ? ('-' === $first || '+' === $first ? $int($first.'1') : $int($first)) : 1, isset($split[1]) && $split[1] ? $int($split[1]) : 0, - ); + ]; } /** @@ -102,12 +102,12 @@ class Parser implements ParserInterface private function parseSelectorList(TokenStream $stream) { $stream->skipWhitespace(); - $selectors = array(); + $selectors = []; while (true) { $selectors[] = $this->parserSelectorNode($stream); - if ($stream->getPeek()->isDelimiter(array(','))) { + if ($stream->getPeek()->isDelimiter([','])) { $stream->getNext(); $stream->skipWhitespace(); } else { @@ -133,7 +133,7 @@ class Parser implements ParserInterface $stream->skipWhitespace(); $peek = $stream->getPeek(); - if ($peek->isFileEnd() || $peek->isDelimiter(array(','))) { + if ($peek->isFileEnd() || $peek->isDelimiter([','])) { break; } @@ -141,7 +141,7 @@ class Parser implements ParserInterface throw SyntaxErrorException::pseudoElementFound($pseudoElement, 'not at the end of a selector'); } - if ($peek->isDelimiter(array('+', '>', '~'))) { + if ($peek->isDelimiter(['+', '>', '~'])) { $combinator = $stream->getNext()->getValue(); $stream->skipWhitespace(); } else { @@ -177,8 +177,8 @@ class Parser implements ParserInterface $peek = $stream->getPeek(); if ($peek->isWhitespace() || $peek->isFileEnd() - || $peek->isDelimiter(array(',', '+', '>', '~')) - || ($insideNegation && $peek->isDelimiter(array(')'))) + || $peek->isDelimiter([',', '+', '>', '~']) + || ($insideNegation && $peek->isDelimiter([')'])) ) { break; } @@ -189,16 +189,16 @@ class Parser implements ParserInterface if ($peek->isHash()) { $result = new Node\HashNode($result, $stream->getNext()->getValue()); - } elseif ($peek->isDelimiter(array('.'))) { + } elseif ($peek->isDelimiter(['.'])) { $stream->getNext(); $result = new Node\ClassNode($result, $stream->getNextIdentifier()); - } elseif ($peek->isDelimiter(array('['))) { + } elseif ($peek->isDelimiter(['['])) { $stream->getNext(); $result = $this->parseAttributeNode($result, $stream); - } elseif ($peek->isDelimiter(array(':'))) { + } elseif ($peek->isDelimiter([':'])) { $stream->getNext(); - if ($stream->getPeek()->isDelimiter(array(':'))) { + if ($stream->getPeek()->isDelimiter([':'])) { $stream->getNext(); $pseudoElement = $stream->getNextIdentifier(); @@ -206,7 +206,7 @@ class Parser implements ParserInterface } $identifier = $stream->getNextIdentifier(); - if (\in_array(strtolower($identifier), array('first-line', 'first-letter', 'before', 'after'))) { + if (\in_array(strtolower($identifier), ['first-line', 'first-letter', 'before', 'after'])) { // Special case: CSS 2.1 pseudo-elements can have a single ':'. // Any new pseudo-element must have two. $pseudoElement = $identifier; @@ -214,7 +214,7 @@ class Parser implements ParserInterface continue; } - if (!$stream->getPeek()->isDelimiter(array('('))) { + if (!$stream->getPeek()->isDelimiter(['('])) { $result = new Node\PseudoNode($result, $identifier); continue; @@ -235,13 +235,13 @@ class Parser implements ParserInterface throw SyntaxErrorException::pseudoElementFound($argumentPseudoElement, 'inside ::not()'); } - if (!$next->isDelimiter(array(')'))) { + if (!$next->isDelimiter([')'])) { throw SyntaxErrorException::unexpectedToken('")"', $next); } $result = new Node\NegationNode($result, $argument); } else { - $arguments = array(); + $arguments = []; $next = null; while (true) { @@ -251,10 +251,10 @@ class Parser implements ParserInterface if ($next->isIdentifier() || $next->isString() || $next->isNumber() - || $next->isDelimiter(array('+', '-')) + || $next->isDelimiter(['+', '-']) ) { $arguments[] = $next; - } elseif ($next->isDelimiter(array(')'))) { + } elseif ($next->isDelimiter([')'])) { break; } else { throw SyntaxErrorException::unexpectedToken('an argument', $next); @@ -276,7 +276,7 @@ class Parser implements ParserInterface throw SyntaxErrorException::unexpectedToken('selector', $stream->getPeek()); } - return array($result, $pseudoElement); + return [$result, $pseudoElement]; } /** @@ -288,7 +288,7 @@ class Parser implements ParserInterface { $peek = $stream->getPeek(); - if ($peek->isIdentifier() || $peek->isDelimiter(array('*'))) { + if ($peek->isIdentifier() || $peek->isDelimiter(['*'])) { if ($peek->isIdentifier()) { $namespace = $stream->getNext()->getValue(); } else { @@ -296,7 +296,7 @@ class Parser implements ParserInterface $namespace = null; } - if ($stream->getPeek()->isDelimiter(array('|'))) { + if ($stream->getPeek()->isDelimiter(['|'])) { $stream->getNext(); $element = $stream->getNextIdentifierOrStar(); } else { @@ -322,14 +322,14 @@ class Parser implements ParserInterface $stream->skipWhitespace(); $attribute = $stream->getNextIdentifierOrStar(); - if (null === $attribute && !$stream->getPeek()->isDelimiter(array('|'))) { + if (null === $attribute && !$stream->getPeek()->isDelimiter(['|'])) { throw SyntaxErrorException::unexpectedToken('"|"', $stream->getPeek()); } - if ($stream->getPeek()->isDelimiter(array('|'))) { + if ($stream->getPeek()->isDelimiter(['|'])) { $stream->getNext(); - if ($stream->getPeek()->isDelimiter(array('='))) { + if ($stream->getPeek()->isDelimiter(['='])) { $namespace = null; $stream->getNext(); $operator = '|='; @@ -346,12 +346,12 @@ class Parser implements ParserInterface $stream->skipWhitespace(); $next = $stream->getNext(); - if ($next->isDelimiter(array(']'))) { + if ($next->isDelimiter([']'])) { return new Node\AttributeNode($selector, $namespace, $attribute, 'exists', null); - } elseif ($next->isDelimiter(array('='))) { + } elseif ($next->isDelimiter(['='])) { $operator = '='; - } elseif ($next->isDelimiter(array('^', '$', '*', '~', '|', '!')) - && $stream->getPeek()->isDelimiter(array('=')) + } elseif ($next->isDelimiter(['^', '$', '*', '~', '|', '!']) + && $stream->getPeek()->isDelimiter(['=']) ) { $operator = $next->getValue().'='; $stream->getNext(); @@ -375,7 +375,7 @@ class Parser implements ParserInterface $stream->skipWhitespace(); $next = $stream->getNext(); - if (!$next->isDelimiter(array(']'))) { + if (!$next->isDelimiter([']'])) { throw SyntaxErrorException::unexpectedToken('"]"', $next); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/ClassParser.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/ClassParser.php index c513de5f..3b920062 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/ClassParser.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/ClassParser.php @@ -41,11 +41,11 @@ class ClassParser implements ParserInterface // 2 => string 'input' (length=5) // 3 => string 'ab6bd_field' (length=11) if (preg_match('/^(?:([a-z]++)\|)?+([\w-]++|\*)?+\.([\w-]++)$/i', trim($source), $matches)) { - return array( + return [ new SelectorNode(new ClassNode(new ElementNode($matches[1] ?: null, $matches[2] ?: null), $matches[3])), - ); + ]; } - return array(); + return []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/ElementParser.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/ElementParser.php index c29f5e44..392c6aab 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/ElementParser.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/ElementParser.php @@ -39,9 +39,9 @@ class ElementParser implements ParserInterface // 1 => string 'testns' (length=6) // 2 => string 'testel' (length=6) if (preg_match('/^(?:([a-z]++)\|)?([\w-]++|\*)$/i', trim($source), $matches)) { - return array(new SelectorNode(new ElementNode($matches[1] ?: null, $matches[2]))); + return [new SelectorNode(new ElementNode($matches[1] ?: null, $matches[2]))]; } - return array(); + return []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/EmptyStringParser.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/EmptyStringParser.php index 16d374af..276b5740 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/EmptyStringParser.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/EmptyStringParser.php @@ -38,9 +38,9 @@ class EmptyStringParser implements ParserInterface { // Matches an empty string if ('' == $source) { - return array(new SelectorNode(new ElementNode(null, '*'))); + return [new SelectorNode(new ElementNode(null, '*'))]; } - return array(); + return []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/HashParser.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/HashParser.php index 3f3883bb..0ffcb6de 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/HashParser.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/HashParser.php @@ -41,11 +41,11 @@ class HashParser implements ParserInterface // 2 => string 'input' (length=5) // 3 => string 'ab6bd_field' (length=11) if (preg_match('/^(?:([a-z]++)\|)?+([\w-]++|\*)?+#([\w-]++)$/i', trim($source), $matches)) { - return array( + return [ new SelectorNode(new HashNode(new ElementNode($matches[1] ?: null, $matches[2] ?: null), $matches[3])), - ); + ]; } - return array(); + return []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Token.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Token.php index 72baae77..d641da86 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Token.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Token.php @@ -82,7 +82,7 @@ class Token /** * @return bool */ - public function isDelimiter(array $values = array()) + public function isDelimiter(array $values = []) { if (self::TYPE_DELIMITER !== $this->type) { return false; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/TokenStream.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/TokenStream.php index d2aee541..843e330b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/TokenStream.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/TokenStream.php @@ -29,12 +29,12 @@ class TokenStream /** * @var Token[] */ - private $tokens = array(); + private $tokens = []; /** * @var Token[] */ - private $used = array(); + private $used = []; /** * @var int @@ -154,7 +154,7 @@ class TokenStream return $next->getValue(); } - if ($next->isDelimiter(array('*'))) { + if ($next->isDelimiter(['*'])) { return; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Tokenizer/Tokenizer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Tokenizer/Tokenizer.php index e32b4d20..fc65bc68 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Tokenizer/Tokenizer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Tokenizer/Tokenizer.php @@ -38,14 +38,14 @@ class Tokenizer $patterns = new TokenizerPatterns(); $escaping = new TokenizerEscaping($patterns); - $this->handlers = array( + $this->handlers = [ new Handler\WhitespaceHandler(), new Handler\IdentifierHandler($patterns, $escaping), new Handler\HashHandler($patterns, $escaping), new Handler\StringHandler($patterns, $escaping), new Handler\NumberHandler($patterns), new Handler\CommentHandler(), - ); + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/CssSelectorConverterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/CssSelectorConverterTest.php index a3eea7ad..cd0fd785 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/CssSelectorConverterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/CssSelectorConverterTest.php @@ -55,22 +55,22 @@ class CssSelectorConverterTest extends TestCase public function getCssToXPathWithoutPrefixTestData() { - return array( - array('h1', 'h1'), - array('foo|h1', 'foo:h1'), - array('h1, h2, h3', 'h1 | h2 | h3'), - array('h1:nth-child(3n+1)', "*/*[(name() = 'h1') and (position() - 1 >= 0 and (position() - 1) mod 3 = 0)]"), - array('h1 > p', 'h1/p'), - array('h1#foo', "h1[@id = 'foo']"), - array('h1.foo', "h1[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"), - array('h1[class*="foo bar"]', "h1[@class and contains(@class, 'foo bar')]"), - array('h1[foo|class*="foo bar"]', "h1[@foo:class and contains(@foo:class, 'foo bar')]"), - array('h1[class]', 'h1[@class]'), - array('h1 .foo', "h1/descendant-or-self::*/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"), - array('h1 #foo', "h1/descendant-or-self::*/*[@id = 'foo']"), - array('h1 [class*=foo]', "h1/descendant-or-self::*/*[@class and contains(@class, 'foo')]"), - array('div>.foo', "div/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"), - array('div > .foo', "div/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"), - ); + return [ + ['h1', 'h1'], + ['foo|h1', 'foo:h1'], + ['h1, h2, h3', 'h1 | h2 | h3'], + ['h1:nth-child(3n+1)', "*/*[(name() = 'h1') and (position() - 1 >= 0 and (position() - 1) mod 3 = 0)]"], + ['h1 > p', 'h1/p'], + ['h1#foo', "h1[@id = 'foo']"], + ['h1.foo', "h1[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"], + ['h1[class*="foo bar"]', "h1[@class and contains(@class, 'foo bar')]"], + ['h1[foo|class*="foo bar"]', "h1[@foo:class and contains(@foo:class, 'foo bar')]"], + ['h1[class]', 'h1[@class]'], + ['h1 .foo', "h1/descendant-or-self::*/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"], + ['h1 #foo', "h1/descendant-or-self::*/*[@id = 'foo']"], + ['h1 [class*=foo]', "h1/descendant-or-self::*/*[@class and contains(@class, 'foo')]"], + ['div>.foo', "div/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"], + ['div > .foo', "div/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/AttributeNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/AttributeNodeTest.php index 1fd090f5..4d600740 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/AttributeNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/AttributeNodeTest.php @@ -18,20 +18,20 @@ class AttributeNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 'Attribute[Element[*][attribute]]'), - array(new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), "Attribute[Element[*][attribute $= 'value']]"), - array(new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), "Attribute[Element[*][namespace|attribute $= 'value']]"), - ); + return [ + [new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 'Attribute[Element[*][attribute]]'], + [new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), "Attribute[Element[*][attribute $= 'value']]"], + [new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), "Attribute[Element[*][namespace|attribute $= 'value']]"], + ]; } public function getSpecificityValueTestData() { - return array( - array(new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 10), - array(new AttributeNode(new ElementNode(null, 'element'), null, 'attribute', 'exists', null), 11), - array(new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), 10), - array(new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), 10), - ); + return [ + [new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 10], + [new AttributeNode(new ElementNode(null, 'element'), null, 'attribute', 'exists', null), 11], + [new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), 10], + [new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), 10], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/ClassNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/ClassNodeTest.php index e0ab45ac..aa80c927 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/ClassNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/ClassNodeTest.php @@ -18,16 +18,16 @@ class ClassNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new ClassNode(new ElementNode(), 'class'), 'Class[Element[*].class]'), - ); + return [ + [new ClassNode(new ElementNode(), 'class'), 'Class[Element[*].class]'], + ]; } public function getSpecificityValueTestData() { - return array( - array(new ClassNode(new ElementNode(), 'class'), 10), - array(new ClassNode(new ElementNode(null, 'element'), 'class'), 11), - ); + return [ + [new ClassNode(new ElementNode(), 'class'), 10], + [new ClassNode(new ElementNode(null, 'element'), 'class'), 11], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/CombinedSelectorNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/CombinedSelectorNodeTest.php index 9547298a..435eaa6a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/CombinedSelectorNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/CombinedSelectorNodeTest.php @@ -18,18 +18,18 @@ class CombinedSelectorNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 'CombinedSelector[Element[*] > Element[*]]'), - array(new CombinedSelectorNode(new ElementNode(), ' ', new ElementNode()), 'CombinedSelector[Element[*] Element[*]]'), - ); + return [ + [new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 'CombinedSelector[Element[*] > Element[*]]'], + [new CombinedSelectorNode(new ElementNode(), ' ', new ElementNode()), 'CombinedSelector[Element[*] Element[*]]'], + ]; } public function getSpecificityValueTestData() { - return array( - array(new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 0), - array(new CombinedSelectorNode(new ElementNode(null, 'element'), '>', new ElementNode()), 1), - array(new CombinedSelectorNode(new ElementNode(null, 'element'), '>', new ElementNode(null, 'element')), 2), - ); + return [ + [new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 0], + [new CombinedSelectorNode(new ElementNode(null, 'element'), '>', new ElementNode()), 1], + [new CombinedSelectorNode(new ElementNode(null, 'element'), '>', new ElementNode(null, 'element')), 2], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/ElementNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/ElementNodeTest.php index 6d247893..e0797ff0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/ElementNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/ElementNodeTest.php @@ -17,19 +17,19 @@ class ElementNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new ElementNode(), 'Element[*]'), - array(new ElementNode(null, 'element'), 'Element[element]'), - array(new ElementNode('namespace', 'element'), 'Element[namespace|element]'), - ); + return [ + [new ElementNode(), 'Element[*]'], + [new ElementNode(null, 'element'), 'Element[element]'], + [new ElementNode('namespace', 'element'), 'Element[namespace|element]'], + ]; } public function getSpecificityValueTestData() { - return array( - array(new ElementNode(), 0), - array(new ElementNode(null, 'element'), 1), - array(new ElementNode('namespace', 'element'), 1), - ); + return [ + [new ElementNode(), 0], + [new ElementNode(null, 'element'), 1], + [new ElementNode('namespace', 'element'), 1], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/FunctionNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/FunctionNodeTest.php index ee3ce51b..0932393e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/FunctionNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/FunctionNodeTest.php @@ -19,29 +19,29 @@ class FunctionNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new FunctionNode(new ElementNode(), 'function'), 'Function[Element[*]:function()]'), - array(new FunctionNode(new ElementNode(), 'function', array( + return [ + [new FunctionNode(new ElementNode(), 'function'), 'Function[Element[*]:function()]'], + [new FunctionNode(new ElementNode(), 'function', [ new Token(Token::TYPE_IDENTIFIER, 'value', 0), - )), "Function[Element[*]:function(['value'])]"), - array(new FunctionNode(new ElementNode(), 'function', array( + ]), "Function[Element[*]:function(['value'])]"], + [new FunctionNode(new ElementNode(), 'function', [ new Token(Token::TYPE_STRING, 'value1', 0), new Token(Token::TYPE_NUMBER, 'value2', 0), - )), "Function[Element[*]:function(['value1', 'value2'])]"), - ); + ]), "Function[Element[*]:function(['value1', 'value2'])]"], + ]; } public function getSpecificityValueTestData() { - return array( - array(new FunctionNode(new ElementNode(), 'function'), 10), - array(new FunctionNode(new ElementNode(), 'function', array( + return [ + [new FunctionNode(new ElementNode(), 'function'), 10], + [new FunctionNode(new ElementNode(), 'function', [ new Token(Token::TYPE_IDENTIFIER, 'value', 0), - )), 10), - array(new FunctionNode(new ElementNode(), 'function', array( + ]), 10], + [new FunctionNode(new ElementNode(), 'function', [ new Token(Token::TYPE_STRING, 'value1', 0), new Token(Token::TYPE_NUMBER, 'value2', 0), - )), 10), - ); + ]), 10], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/HashNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/HashNodeTest.php index 3bc74da9..ad6765b8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/HashNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/HashNodeTest.php @@ -18,16 +18,16 @@ class HashNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new HashNode(new ElementNode(), 'id'), 'Hash[Element[*]#id]'), - ); + return [ + [new HashNode(new ElementNode(), 'id'), 'Hash[Element[*]#id]'], + ]; } public function getSpecificityValueTestData() { - return array( - array(new HashNode(new ElementNode(), 'id'), 100), - array(new HashNode(new ElementNode(null, 'id'), 'class'), 101), - ); + return [ + [new HashNode(new ElementNode(), 'id'), 100], + [new HashNode(new ElementNode(null, 'id'), 'class'), 101], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/NegationNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/NegationNodeTest.php index ed4d2482..90b684ce 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/NegationNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/NegationNodeTest.php @@ -19,15 +19,15 @@ class NegationNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 'Negation[Element[*]:not(Class[Element[*].class])]'), - ); + return [ + [new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 'Negation[Element[*]:not(Class[Element[*].class])]'], + ]; } public function getSpecificityValueTestData() { - return array( - array(new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 10), - ); + return [ + [new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 10], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/PseudoNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/PseudoNodeTest.php index bc57813c..4e78776c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/PseudoNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/PseudoNodeTest.php @@ -18,15 +18,15 @@ class PseudoNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new PseudoNode(new ElementNode(), 'pseudo'), 'Pseudo[Element[*]:pseudo]'), - ); + return [ + [new PseudoNode(new ElementNode(), 'pseudo'), 'Pseudo[Element[*]:pseudo]'], + ]; } public function getSpecificityValueTestData() { - return array( - array(new PseudoNode(new ElementNode(), 'pseudo'), 10), - ); + return [ + [new PseudoNode(new ElementNode(), 'pseudo'), 10], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/SelectorNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/SelectorNodeTest.php index 5badf71d..85e3bdac 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/SelectorNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/SelectorNodeTest.php @@ -18,17 +18,17 @@ class SelectorNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new SelectorNode(new ElementNode()), 'Selector[Element[*]]'), - array(new SelectorNode(new ElementNode(), 'pseudo'), 'Selector[Element[*]::pseudo]'), - ); + return [ + [new SelectorNode(new ElementNode()), 'Selector[Element[*]]'], + [new SelectorNode(new ElementNode(), 'pseudo'), 'Selector[Element[*]::pseudo]'], + ]; } public function getSpecificityValueTestData() { - return array( - array(new SelectorNode(new ElementNode()), 0), - array(new SelectorNode(new ElementNode(), 'pseudo'), 1), - ); + return [ + [new SelectorNode(new ElementNode()), 0], + [new SelectorNode(new ElementNode(), 'pseudo'), 1], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.php index b58eb892..bf48d49f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.php @@ -30,13 +30,13 @@ class SpecificityTest extends TestCase public function getValueTestData() { - return array( - array(new Specificity(0, 0, 0), 0), - array(new Specificity(0, 0, 2), 2), - array(new Specificity(0, 3, 0), 30), - array(new Specificity(4, 0, 0), 400), - array(new Specificity(4, 3, 2), 432), - ); + return [ + [new Specificity(0, 0, 0), 0], + [new Specificity(0, 0, 2), 2], + [new Specificity(0, 3, 0), 30], + [new Specificity(4, 0, 0), 400], + [new Specificity(4, 3, 2), 432], + ]; } /** @dataProvider getCompareTestData */ @@ -47,17 +47,17 @@ class SpecificityTest extends TestCase public function getCompareTestData() { - return array( - array(new Specificity(0, 0, 0), new Specificity(0, 0, 0), 0), - array(new Specificity(0, 0, 1), new Specificity(0, 0, 1), 0), - array(new Specificity(0, 0, 2), new Specificity(0, 0, 1), 1), - array(new Specificity(0, 0, 2), new Specificity(0, 0, 3), -1), - array(new Specificity(0, 4, 0), new Specificity(0, 4, 0), 0), - array(new Specificity(0, 6, 0), new Specificity(0, 5, 11), 1), - array(new Specificity(0, 7, 0), new Specificity(0, 8, 0), -1), - array(new Specificity(9, 0, 0), new Specificity(9, 0, 0), 0), - array(new Specificity(11, 0, 0), new Specificity(10, 11, 0), 1), - array(new Specificity(12, 11, 0), new Specificity(13, 0, 0), -1), - ); + return [ + [new Specificity(0, 0, 0), new Specificity(0, 0, 0), 0], + [new Specificity(0, 0, 1), new Specificity(0, 0, 1), 0], + [new Specificity(0, 0, 2), new Specificity(0, 0, 1), 1], + [new Specificity(0, 0, 2), new Specificity(0, 0, 3), -1], + [new Specificity(0, 4, 0), new Specificity(0, 4, 0), 0], + [new Specificity(0, 6, 0), new Specificity(0, 5, 11), 1], + [new Specificity(0, 7, 0), new Specificity(0, 8, 0), -1], + [new Specificity(9, 0, 0), new Specificity(9, 0, 0), 0], + [new Specificity(11, 0, 0), new Specificity(10, 11, 0), 1], + [new Specificity(12, 11, 0), new Specificity(13, 0, 0), -1], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTest.php index f5c9dc8b..aaed55c2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTest.php @@ -54,7 +54,7 @@ abstract class AbstractHandlerTest extends TestCase $property = new \ReflectionProperty($stream, 'tokens'); $property->setAccessible(true); - $this->assertEquals(array(), $property->getValue($stream)); + $this->assertEquals([], $property->getValue($stream)); } protected function assertRemainingContent(Reader $reader, $remainingContent) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php index 3961bf7d..de400478 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php @@ -32,20 +32,20 @@ class CommentHandlerTest extends AbstractHandlerTest public function getHandleValueTestData() { - return array( + return [ // 2nd argument only exists for inherited method compatibility - array('/* comment */', new Token(null, null, null), ''), - array('/* comment */foo', new Token(null, null, null), 'foo'), - ); + ['/* comment */', new Token(null, null, null), ''], + ['/* comment */foo', new Token(null, null, null), 'foo'], + ]; } public function getDontHandleValueTestData() { - return array( - array('>'), - array('+'), - array(' '), - ); + return [ + ['>'], + ['+'], + [' '], + ]; } protected function generateHandler() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/HashHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/HashHandlerTest.php index 5730120b..9444f510 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/HashHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/HashHandlerTest.php @@ -20,24 +20,24 @@ class HashHandlerTest extends AbstractHandlerTest { public function getHandleValueTestData() { - return array( - array('#id', new Token(Token::TYPE_HASH, 'id', 0), ''), - array('#123', new Token(Token::TYPE_HASH, '123', 0), ''), + return [ + ['#id', new Token(Token::TYPE_HASH, 'id', 0), ''], + ['#123', new Token(Token::TYPE_HASH, '123', 0), ''], - array('#id.class', new Token(Token::TYPE_HASH, 'id', 0), '.class'), - array('#id element', new Token(Token::TYPE_HASH, 'id', 0), ' element'), - ); + ['#id.class', new Token(Token::TYPE_HASH, 'id', 0), '.class'], + ['#id element', new Token(Token::TYPE_HASH, 'id', 0), ' element'], + ]; } public function getDontHandleValueTestData() { - return array( - array('id'), - array('123'), - array('<'), - array('<'), - array('#'), - ); + return [ + ['id'], + ['123'], + ['<'], + ['<'], + ['#'], + ]; } protected function generateHandler() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/IdentifierHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/IdentifierHandlerTest.php index f56430c7..c54ba537 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/IdentifierHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/IdentifierHandlerTest.php @@ -20,24 +20,24 @@ class IdentifierHandlerTest extends AbstractHandlerTest { public function getHandleValueTestData() { - return array( - array('foo', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), ''), - array('foo|bar', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '|bar'), - array('foo.class', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '.class'), - array('foo[attr]', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '[attr]'), - array('foo bar', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), ' bar'), - ); + return [ + ['foo', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), ''], + ['foo|bar', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '|bar'], + ['foo.class', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '.class'], + ['foo[attr]', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '[attr]'], + ['foo bar', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), ' bar'], + ]; } public function getDontHandleValueTestData() { - return array( - array('>'), - array('+'), - array(' '), - array('*|foo'), - array('/* comment */'), - ); + return [ + ['>'], + ['+'], + [' '], + ['*|foo'], + ['/* comment */'], + ]; } protected function generateHandler() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/NumberHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/NumberHandlerTest.php index 675fd05b..b43d3694 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/NumberHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/NumberHandlerTest.php @@ -19,26 +19,26 @@ class NumberHandlerTest extends AbstractHandlerTest { public function getHandleValueTestData() { - return array( - array('12', new Token(Token::TYPE_NUMBER, '12', 0), ''), - array('12.34', new Token(Token::TYPE_NUMBER, '12.34', 0), ''), - array('+12.34', new Token(Token::TYPE_NUMBER, '+12.34', 0), ''), - array('-12.34', new Token(Token::TYPE_NUMBER, '-12.34', 0), ''), + return [ + ['12', new Token(Token::TYPE_NUMBER, '12', 0), ''], + ['12.34', new Token(Token::TYPE_NUMBER, '12.34', 0), ''], + ['+12.34', new Token(Token::TYPE_NUMBER, '+12.34', 0), ''], + ['-12.34', new Token(Token::TYPE_NUMBER, '-12.34', 0), ''], - array('12 arg', new Token(Token::TYPE_NUMBER, '12', 0), ' arg'), - array('12]', new Token(Token::TYPE_NUMBER, '12', 0), ']'), - ); + ['12 arg', new Token(Token::TYPE_NUMBER, '12', 0), ' arg'], + ['12]', new Token(Token::TYPE_NUMBER, '12', 0), ']'], + ]; } public function getDontHandleValueTestData() { - return array( - array('hello'), - array('>'), - array('+'), - array(' '), - array('/* comment */'), - ); + return [ + ['hello'], + ['>'], + ['+'], + [' '], + ['/* comment */'], + ]; } protected function generateHandler() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/StringHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/StringHandlerTest.php index 8ea5d4d5..baa72735 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/StringHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/StringHandlerTest.php @@ -20,25 +20,25 @@ class StringHandlerTest extends AbstractHandlerTest { public function getHandleValueTestData() { - return array( - array('"hello"', new Token(Token::TYPE_STRING, 'hello', 1), ''), - array('"1"', new Token(Token::TYPE_STRING, '1', 1), ''), - array('" "', new Token(Token::TYPE_STRING, ' ', 1), ''), - array('""', new Token(Token::TYPE_STRING, '', 1), ''), - array("'hello'", new Token(Token::TYPE_STRING, 'hello', 1), ''), + return [ + ['"hello"', new Token(Token::TYPE_STRING, 'hello', 1), ''], + ['"1"', new Token(Token::TYPE_STRING, '1', 1), ''], + ['" "', new Token(Token::TYPE_STRING, ' ', 1), ''], + ['""', new Token(Token::TYPE_STRING, '', 1), ''], + ["'hello'", new Token(Token::TYPE_STRING, 'hello', 1), ''], - array("'foo'bar", new Token(Token::TYPE_STRING, 'foo', 1), 'bar'), - ); + ["'foo'bar", new Token(Token::TYPE_STRING, 'foo', 1), 'bar'], + ]; } public function getDontHandleValueTestData() { - return array( - array('hello'), - array('>'), - array('1'), - array(' '), - ); + return [ + ['hello'], + ['>'], + ['1'], + [' '], + ]; } protected function generateHandler() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/WhitespaceHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/WhitespaceHandlerTest.php index f5f9e71d..67509ef1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/WhitespaceHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/WhitespaceHandlerTest.php @@ -18,23 +18,23 @@ class WhitespaceHandlerTest extends AbstractHandlerTest { public function getHandleValueTestData() { - return array( - array(' ', new Token(Token::TYPE_WHITESPACE, ' ', 0), ''), - array("\n", new Token(Token::TYPE_WHITESPACE, "\n", 0), ''), - array("\t", new Token(Token::TYPE_WHITESPACE, "\t", 0), ''), + return [ + [' ', new Token(Token::TYPE_WHITESPACE, ' ', 0), ''], + ["\n", new Token(Token::TYPE_WHITESPACE, "\n", 0), ''], + ["\t", new Token(Token::TYPE_WHITESPACE, "\t", 0), ''], - array(' foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), 'foo'), - array(' .foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), '.foo'), - ); + [' foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), 'foo'], + [' .foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), '.foo'], + ]; } public function getDontHandleValueTestData() { - return array( - array('>'), - array('1'), - array('a'), - ); + return [ + ['>'], + ['1'], + ['a'], + ]; } protected function generateHandler() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php index 53b35a95..de350934 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php @@ -77,7 +77,7 @@ class ParserTest extends TestCase /** @var FunctionNode $function */ $function = $selectors[0]->getTree(); - $this->assertEquals(array($a, $b), Parser::parseSeries($function->getArguments())); + $this->assertEquals([$a, $b], Parser::parseSeries($function->getArguments())); } /** @dataProvider getParseSeriesExceptionTestData */ @@ -95,156 +95,159 @@ class ParserTest extends TestCase public function getParserTestData() { - return array( - array('*', array('Element[*]')), - array('*|*', array('Element[*]')), - array('*|foo', array('Element[foo]')), - array('foo|*', array('Element[foo|*]')), - array('foo|bar', array('Element[foo|bar]')), - array('#foo#bar', array('Hash[Hash[Element[*]#foo]#bar]')), - array('div>.foo', array('CombinedSelector[Element[div] > Class[Element[*].foo]]')), - array('div> .foo', array('CombinedSelector[Element[div] > Class[Element[*].foo]]')), - array('div >.foo', array('CombinedSelector[Element[div] > Class[Element[*].foo]]')), - array('div > .foo', array('CombinedSelector[Element[div] > Class[Element[*].foo]]')), - array("div \n> \t \t .foo", array('CombinedSelector[Element[div] > Class[Element[*].foo]]')), - array('td.foo,.bar', array('Class[Element[td].foo]', 'Class[Element[*].bar]')), - array('td.foo, .bar', array('Class[Element[td].foo]', 'Class[Element[*].bar]')), - array("td.foo\t\r\n\f ,\t\r\n\f .bar", array('Class[Element[td].foo]', 'Class[Element[*].bar]')), - array('td.foo,.bar', array('Class[Element[td].foo]', 'Class[Element[*].bar]')), - array('td.foo, .bar', array('Class[Element[td].foo]', 'Class[Element[*].bar]')), - array("td.foo\t\r\n\f ,\t\r\n\f .bar", array('Class[Element[td].foo]', 'Class[Element[*].bar]')), - array('div, td.foo, div.bar span', array('Element[div]', 'Class[Element[td].foo]', 'CombinedSelector[Class[Element[div].bar] Element[span]]')), - array('div > p', array('CombinedSelector[Element[div] > Element[p]]')), - array('td:first', array('Pseudo[Element[td]:first]')), - array('td :first', array('CombinedSelector[Element[td] Pseudo[Element[*]:first]]')), - array('a[name]', array('Attribute[Element[a][name]]')), - array("a[ name\t]", array('Attribute[Element[a][name]]')), - array('a [name]', array('CombinedSelector[Element[a] Attribute[Element[*][name]]]')), - array('a[rel="include"]', array("Attribute[Element[a][rel = 'include']]")), - array('a[rel = include]', array("Attribute[Element[a][rel = 'include']]")), - array("a[hreflang |= 'en']", array("Attribute[Element[a][hreflang |= 'en']]")), - array('a[hreflang|=en]', array("Attribute[Element[a][hreflang |= 'en']]")), - array('div:nth-child(10)', array("Function[Element[div]:nth-child(['10'])]")), - array(':nth-child(2n+2)', array("Function[Element[*]:nth-child(['2', 'n', '+2'])]")), - array('div:nth-of-type(10)', array("Function[Element[div]:nth-of-type(['10'])]")), - array('div div:nth-of-type(10) .aclass', array("CombinedSelector[CombinedSelector[Element[div] Function[Element[div]:nth-of-type(['10'])]] Class[Element[*].aclass]]")), - array('label:only', array('Pseudo[Element[label]:only]')), - array('a:lang(fr)', array("Function[Element[a]:lang(['fr'])]")), - array('div:contains("foo")', array("Function[Element[div]:contains(['foo'])]")), - array('div#foobar', array('Hash[Element[div]#foobar]')), - array('div:not(div.foo)', array('Negation[Element[div]:not(Class[Element[div].foo])]')), - array('td ~ th', array('CombinedSelector[Element[td] ~ Element[th]]')), - array('.foo[data-bar][data-baz=0]', array("Attribute[Attribute[Class[Element[*].foo][data-bar]][data-baz = '0']]")), - ); + return [ + ['*', ['Element[*]']], + ['*|*', ['Element[*]']], + ['*|foo', ['Element[foo]']], + ['foo|*', ['Element[foo|*]']], + ['foo|bar', ['Element[foo|bar]']], + ['#foo#bar', ['Hash[Hash[Element[*]#foo]#bar]']], + ['div>.foo', ['CombinedSelector[Element[div] > Class[Element[*].foo]]']], + ['div> .foo', ['CombinedSelector[Element[div] > Class[Element[*].foo]]']], + ['div >.foo', ['CombinedSelector[Element[div] > Class[Element[*].foo]]']], + ['div > .foo', ['CombinedSelector[Element[div] > Class[Element[*].foo]]']], + ["div \n> \t \t .foo", ['CombinedSelector[Element[div] > Class[Element[*].foo]]']], + ['td.foo,.bar', ['Class[Element[td].foo]', 'Class[Element[*].bar]']], + ['td.foo, .bar', ['Class[Element[td].foo]', 'Class[Element[*].bar]']], + ["td.foo\t\r\n\f ,\t\r\n\f .bar", ['Class[Element[td].foo]', 'Class[Element[*].bar]']], + ['td.foo,.bar', ['Class[Element[td].foo]', 'Class[Element[*].bar]']], + ['td.foo, .bar', ['Class[Element[td].foo]', 'Class[Element[*].bar]']], + ["td.foo\t\r\n\f ,\t\r\n\f .bar", ['Class[Element[td].foo]', 'Class[Element[*].bar]']], + ['div, td.foo, div.bar span', ['Element[div]', 'Class[Element[td].foo]', 'CombinedSelector[Class[Element[div].bar] Element[span]]']], + ['div > p', ['CombinedSelector[Element[div] > Element[p]]']], + ['td:first', ['Pseudo[Element[td]:first]']], + ['td :first', ['CombinedSelector[Element[td] Pseudo[Element[*]:first]]']], + ['a[name]', ['Attribute[Element[a][name]]']], + ["a[ name\t]", ['Attribute[Element[a][name]]']], + ['a [name]', ['CombinedSelector[Element[a] Attribute[Element[*][name]]]']], + ['[name="foo"]', ["Attribute[Element[*][name = 'foo']]"]], + ["[name='foo[1]']", ["Attribute[Element[*][name = 'foo[1]']]"]], + ["[name='foo[0][bar]']", ["Attribute[Element[*][name = 'foo[0][bar]']]"]], + ['a[rel="include"]', ["Attribute[Element[a][rel = 'include']]"]], + ['a[rel = include]', ["Attribute[Element[a][rel = 'include']]"]], + ["a[hreflang |= 'en']", ["Attribute[Element[a][hreflang |= 'en']]"]], + ['a[hreflang|=en]', ["Attribute[Element[a][hreflang |= 'en']]"]], + ['div:nth-child(10)', ["Function[Element[div]:nth-child(['10'])]"]], + [':nth-child(2n+2)', ["Function[Element[*]:nth-child(['2', 'n', '+2'])]"]], + ['div:nth-of-type(10)', ["Function[Element[div]:nth-of-type(['10'])]"]], + ['div div:nth-of-type(10) .aclass', ["CombinedSelector[CombinedSelector[Element[div] Function[Element[div]:nth-of-type(['10'])]] Class[Element[*].aclass]]"]], + ['label:only', ['Pseudo[Element[label]:only]']], + ['a:lang(fr)', ["Function[Element[a]:lang(['fr'])]"]], + ['div:contains("foo")', ["Function[Element[div]:contains(['foo'])]"]], + ['div#foobar', ['Hash[Element[div]#foobar]']], + ['div:not(div.foo)', ['Negation[Element[div]:not(Class[Element[div].foo])]']], + ['td ~ th', ['CombinedSelector[Element[td] ~ Element[th]]']], + ['.foo[data-bar][data-baz=0]', ["Attribute[Attribute[Class[Element[*].foo][data-bar]][data-baz = '0']]"]], + ]; } public function getParserExceptionTestData() { - return array( - array('attributes(href)/html/body/a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '(', 10))->getMessage()), - array('attributes(href)', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '(', 10))->getMessage()), - array('html/body/a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '/', 4))->getMessage()), - array(' ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 1))->getMessage()), - array('div, ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 5))->getMessage()), - array(' , div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, ',', 1))->getMessage()), - array('p, , div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, ',', 3))->getMessage()), - array('div > ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 6))->getMessage()), - array(' > div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '>', 2))->getMessage()), - array('foo|#bar', SyntaxErrorException::unexpectedToken('identifier or "*"', new Token(Token::TYPE_HASH, 'bar', 4))->getMessage()), - array('#.foo', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '#', 0))->getMessage()), - array('.#foo', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_HASH, 'foo', 1))->getMessage()), - array(':#foo', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_HASH, 'foo', 1))->getMessage()), - array('[*]', SyntaxErrorException::unexpectedToken('"|"', new Token(Token::TYPE_DELIMITER, ']', 2))->getMessage()), - array('[foo|]', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_DELIMITER, ']', 5))->getMessage()), - array('[#]', SyntaxErrorException::unexpectedToken('identifier or "*"', new Token(Token::TYPE_DELIMITER, '#', 1))->getMessage()), - array('[foo=#]', SyntaxErrorException::unexpectedToken('string or identifier', new Token(Token::TYPE_DELIMITER, '#', 5))->getMessage()), - array(':nth-child()', SyntaxErrorException::unexpectedToken('at least one argument', new Token(Token::TYPE_DELIMITER, ')', 11))->getMessage()), - array('[href]a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_IDENTIFIER, 'a', 6))->getMessage()), - array('[rel:stylesheet]', SyntaxErrorException::unexpectedToken('operator', new Token(Token::TYPE_DELIMITER, ':', 4))->getMessage()), - array('[rel=stylesheet', SyntaxErrorException::unexpectedToken('"]"', new Token(Token::TYPE_FILE_END, '', 15))->getMessage()), - array(':lang(fr', SyntaxErrorException::unexpectedToken('an argument', new Token(Token::TYPE_FILE_END, '', 8))->getMessage()), - array(':contains("foo', SyntaxErrorException::unclosedString(10)->getMessage()), - array('foo!', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '!', 3))->getMessage()), - ); + return [ + ['attributes(href)/html/body/a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '(', 10))->getMessage()], + ['attributes(href)', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '(', 10))->getMessage()], + ['html/body/a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '/', 4))->getMessage()], + [' ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 1))->getMessage()], + ['div, ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 5))->getMessage()], + [' , div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, ',', 1))->getMessage()], + ['p, , div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, ',', 3))->getMessage()], + ['div > ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 6))->getMessage()], + [' > div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '>', 2))->getMessage()], + ['foo|#bar', SyntaxErrorException::unexpectedToken('identifier or "*"', new Token(Token::TYPE_HASH, 'bar', 4))->getMessage()], + ['#.foo', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '#', 0))->getMessage()], + ['.#foo', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_HASH, 'foo', 1))->getMessage()], + [':#foo', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_HASH, 'foo', 1))->getMessage()], + ['[*]', SyntaxErrorException::unexpectedToken('"|"', new Token(Token::TYPE_DELIMITER, ']', 2))->getMessage()], + ['[foo|]', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_DELIMITER, ']', 5))->getMessage()], + ['[#]', SyntaxErrorException::unexpectedToken('identifier or "*"', new Token(Token::TYPE_DELIMITER, '#', 1))->getMessage()], + ['[foo=#]', SyntaxErrorException::unexpectedToken('string or identifier', new Token(Token::TYPE_DELIMITER, '#', 5))->getMessage()], + [':nth-child()', SyntaxErrorException::unexpectedToken('at least one argument', new Token(Token::TYPE_DELIMITER, ')', 11))->getMessage()], + ['[href]a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_IDENTIFIER, 'a', 6))->getMessage()], + ['[rel:stylesheet]', SyntaxErrorException::unexpectedToken('operator', new Token(Token::TYPE_DELIMITER, ':', 4))->getMessage()], + ['[rel=stylesheet', SyntaxErrorException::unexpectedToken('"]"', new Token(Token::TYPE_FILE_END, '', 15))->getMessage()], + [':lang(fr', SyntaxErrorException::unexpectedToken('an argument', new Token(Token::TYPE_FILE_END, '', 8))->getMessage()], + [':contains("foo', SyntaxErrorException::unclosedString(10)->getMessage()], + ['foo!', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '!', 3))->getMessage()], + ]; } public function getPseudoElementsTestData() { - return array( - array('foo', 'Element[foo]', ''), - array('*', 'Element[*]', ''), - array(':empty', 'Pseudo[Element[*]:empty]', ''), - array(':BEfore', 'Element[*]', 'before'), - array(':aftER', 'Element[*]', 'after'), - array(':First-Line', 'Element[*]', 'first-line'), - array(':First-Letter', 'Element[*]', 'first-letter'), - array('::befoRE', 'Element[*]', 'before'), - array('::AFter', 'Element[*]', 'after'), - array('::firsT-linE', 'Element[*]', 'first-line'), - array('::firsT-letteR', 'Element[*]', 'first-letter'), - array('::Selection', 'Element[*]', 'selection'), - array('foo:after', 'Element[foo]', 'after'), - array('foo::selection', 'Element[foo]', 'selection'), - array('lorem#ipsum ~ a#b.c[href]:empty::selection', 'CombinedSelector[Hash[Element[lorem]#ipsum] ~ Pseudo[Attribute[Class[Hash[Element[a]#b].c][href]]:empty]]', 'selection'), - array('video::-webkit-media-controls', 'Element[video]', '-webkit-media-controls'), - ); + return [ + ['foo', 'Element[foo]', ''], + ['*', 'Element[*]', ''], + [':empty', 'Pseudo[Element[*]:empty]', ''], + [':BEfore', 'Element[*]', 'before'], + [':aftER', 'Element[*]', 'after'], + [':First-Line', 'Element[*]', 'first-line'], + [':First-Letter', 'Element[*]', 'first-letter'], + ['::befoRE', 'Element[*]', 'before'], + ['::AFter', 'Element[*]', 'after'], + ['::firsT-linE', 'Element[*]', 'first-line'], + ['::firsT-letteR', 'Element[*]', 'first-letter'], + ['::Selection', 'Element[*]', 'selection'], + ['foo:after', 'Element[foo]', 'after'], + ['foo::selection', 'Element[foo]', 'selection'], + ['lorem#ipsum ~ a#b.c[href]:empty::selection', 'CombinedSelector[Hash[Element[lorem]#ipsum] ~ Pseudo[Attribute[Class[Hash[Element[a]#b].c][href]]:empty]]', 'selection'], + ['video::-webkit-media-controls', 'Element[video]', '-webkit-media-controls'], + ]; } public function getSpecificityTestData() { - return array( - array('*', 0), - array(' foo', 1), - array(':empty ', 10), - array(':before', 1), - array('*:before', 1), - array(':nth-child(2)', 10), - array('.bar', 10), - array('[baz]', 10), - array('[baz="4"]', 10), - array('[baz^="4"]', 10), - array('#lipsum', 100), - array(':not(*)', 0), - array(':not(foo)', 1), - array(':not(.foo)', 10), - array(':not([foo])', 10), - array(':not(:empty)', 10), - array(':not(#foo)', 100), - array('foo:empty', 11), - array('foo:before', 2), - array('foo::before', 2), - array('foo:empty::before', 12), - array('#lorem + foo#ipsum:first-child > bar:first-line', 213), - ); + return [ + ['*', 0], + [' foo', 1], + [':empty ', 10], + [':before', 1], + ['*:before', 1], + [':nth-child(2)', 10], + ['.bar', 10], + ['[baz]', 10], + ['[baz="4"]', 10], + ['[baz^="4"]', 10], + ['#lipsum', 100], + [':not(*)', 0], + [':not(foo)', 1], + [':not(.foo)', 10], + [':not([foo])', 10], + [':not(:empty)', 10], + [':not(#foo)', 100], + ['foo:empty', 11], + ['foo:before', 2], + ['foo::before', 2], + ['foo:empty::before', 12], + ['#lorem + foo#ipsum:first-child > bar:first-line', 213], + ]; } public function getParseSeriesTestData() { - return array( - array('1n+3', 1, 3), - array('1n +3', 1, 3), - array('1n + 3', 1, 3), - array('1n+ 3', 1, 3), - array('1n-3', 1, -3), - array('1n -3', 1, -3), - array('1n - 3', 1, -3), - array('1n- 3', 1, -3), - array('n-5', 1, -5), - array('odd', 2, 1), - array('even', 2, 0), - array('3n', 3, 0), - array('n', 1, 0), - array('+n', 1, 0), - array('-n', -1, 0), - array('5', 0, 5), - ); + return [ + ['1n+3', 1, 3], + ['1n +3', 1, 3], + ['1n + 3', 1, 3], + ['1n+ 3', 1, 3], + ['1n-3', 1, -3], + ['1n -3', 1, -3], + ['1n - 3', 1, -3], + ['1n- 3', 1, -3], + ['n-5', 1, -5], + ['odd', 2, 1], + ['even', 2, 0], + ['3n', 3, 0], + ['n', 1, 0], + ['+n', 1, 0], + ['-n', -1, 0], + ['5', 0, 5], + ]; } public function getParseSeriesExceptionTestData() { - return array( - array('foo'), - array('n+'), - ); + return [ + ['foo'], + ['n+'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/ReaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/ReaderTest.php index 21eb6084..ff9ea909 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/ReaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/ReaderTest.php @@ -70,11 +70,11 @@ class ReaderTest extends TestCase $reader = new Reader('hello'); $this->assertFalse($reader->findPattern('/world/')); - $this->assertEquals(array('hello', 'h'), $reader->findPattern('/^([a-z]).*/')); + $this->assertEquals(['hello', 'h'], $reader->findPattern('/^([a-z]).*/')); $this->assignPosition($reader, 2); $this->assertFalse($reader->findPattern('/^h.*/')); - $this->assertEquals(array('llo'), $reader->findPattern('/^llo$/')); + $this->assertEquals(['llo'], $reader->findPattern('/^llo$/')); } public function testMoveForward() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.php index 7e92f5ba..29d9d5f1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.php @@ -34,12 +34,12 @@ class ClassParserTest extends TestCase public function getParseTestData() { - return array( - array('.testclass', 'Class[Element[*].testclass]'), - array('testel.testclass', 'Class[Element[testel].testclass]'), - array('testns|.testclass', 'Class[Element[testns|*].testclass]'), - array('testns|*.testclass', 'Class[Element[testns|*].testclass]'), - array('testns|testel.testclass', 'Class[Element[testns|testel].testclass]'), - ); + return [ + ['.testclass', 'Class[Element[*].testclass]'], + ['testel.testclass', 'Class[Element[testel].testclass]'], + ['testns|.testclass', 'Class[Element[testns|*].testclass]'], + ['testns|*.testclass', 'Class[Element[testns|*].testclass]'], + ['testns|testel.testclass', 'Class[Element[testns|testel].testclass]'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php index 05a730fd..79cc2270 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php @@ -34,11 +34,11 @@ class ElementParserTest extends TestCase public function getParseTestData() { - return array( - array('*', 'Element[*]'), - array('testel', 'Element[testel]'), - array('testns|*', 'Element[testns|*]'), - array('testns|testel', 'Element[testns|testel]'), - ); + return [ + ['*', 'Element[*]'], + ['testel', 'Element[testel]'], + ['testns|*', 'Element[testns|*]'], + ['testns|testel', 'Element[testns|testel]'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.php index 82f555d9..a7c79d69 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.php @@ -34,12 +34,12 @@ class HashParserTest extends TestCase public function getParseTestData() { - return array( - array('#testid', 'Hash[Element[*]#testid]'), - array('testel#testid', 'Hash[Element[testel]#testid]'), - array('testns|#testid', 'Hash[Element[testns|*]#testid]'), - array('testns|*#testid', 'Hash[Element[testns|*]#testid]'), - array('testns|testel#testid', 'Hash[Element[testns|testel]#testid]'), - ); + return [ + ['#testid', 'Hash[Element[*]#testid]'], + ['testel#testid', 'Hash[Element[testel]#testid]'], + ['testns|#testid', 'Hash[Element[testns|*]#testid]'], + ['testns|*#testid', 'Hash[Element[testns|*]#testid]'], + ['testns|testel#testid', 'Hash[Element[testns|testel]#testid]'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php index 61045829..a9ab29e2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php @@ -12,8 +12,12 @@ namespace Symfony\Component\CssSelector\Tests\XPath; use PHPUnit\Framework\TestCase; +use Symfony\Component\CssSelector\Node\ElementNode; +use Symfony\Component\CssSelector\Node\FunctionNode; +use Symfony\Component\CssSelector\Parser\Parser; use Symfony\Component\CssSelector\XPath\Extension\HtmlExtension; use Symfony\Component\CssSelector\XPath\Translator; +use Symfony\Component\CssSelector\XPath\XPathExpr; class TranslatorTest extends TestCase { @@ -31,6 +35,73 @@ class TranslatorTest extends TestCase $this->assertEquals($xpath, $translator->cssToXPath($css, '')); } + /** + * @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErrorException + */ + public function testCssToXPathPseudoElement() + { + $translator = new Translator(); + $translator->registerExtension(new HtmlExtension($translator)); + $translator->cssToXPath('e::first-line'); + } + + /** + * @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErrorException + */ + public function testGetExtensionNotExistsExtension() + { + $translator = new Translator(); + $translator->registerExtension(new HtmlExtension($translator)); + $translator->getExtension('fake'); + } + + /** + * @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErrorException + */ + public function testAddCombinationNotExistsExtension() + { + $translator = new Translator(); + $translator->registerExtension(new HtmlExtension($translator)); + $parser = new Parser(); + $xpath = $parser->parse('*')[0]; + $combinedXpath = $parser->parse('*')[0]; + $translator->addCombination('fake', $xpath, $combinedXpath); + } + + /** + * @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErrorException + */ + public function testAddFunctionNotExistsFunction() + { + $translator = new Translator(); + $translator->registerExtension(new HtmlExtension($translator)); + $xpath = new XPathExpr(); + $function = new FunctionNode(new ElementNode(), 'fake'); + $translator->addFunction($xpath, $function); + } + + /** + * @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErrorException + */ + public function testAddPseudoClassNotExistsClass() + { + $translator = new Translator(); + $translator->registerExtension(new HtmlExtension($translator)); + $xpath = new XPathExpr(); + $translator->addPseudoClass($xpath, 'fake'); + } + + /** + * @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErrorException + */ + public function testAddAttributeMatchingClassNotExistsClass() + { + $translator = new Translator(); + $translator->registerExtension(new HtmlExtension($translator)); + $xpath = new XPathExpr(); + $translator->addAttributeMatching($xpath, '', '', ''); + } + /** @dataProvider getXmlLangTestData */ public function testXmlLang($css, array $elementsId) { @@ -80,248 +151,248 @@ class TranslatorTest extends TestCase public function getXpathLiteralTestData() { - return array( - array('foo', "'foo'"), - array("foo's bar", '"foo\'s bar"'), - array("foo's \"middle\" bar", 'concat(\'foo\', "\'", \'s "middle" bar\')'), - array("foo's 'middle' \"bar\"", 'concat(\'foo\', "\'", \'s \', "\'", \'middle\', "\'", \' "bar"\')'), - ); + return [ + ['foo', "'foo'"], + ["foo's bar", '"foo\'s bar"'], + ["foo's \"middle\" bar", 'concat(\'foo\', "\'", \'s "middle" bar\')'], + ["foo's 'middle' \"bar\"", 'concat(\'foo\', "\'", \'s \', "\'", \'middle\', "\'", \' "bar"\')'], + ]; } public function getCssToXPathTestData() { - return array( - array('*', '*'), - array('e', 'e'), - array('*|e', 'e'), - array('e|f', 'e:f'), - array('e[foo]', 'e[@foo]'), - array('e[foo|bar]', 'e[@foo:bar]'), - array('e[foo="bar"]', "e[@foo = 'bar']"), - array('e[foo~="bar"]', "e[@foo and contains(concat(' ', normalize-space(@foo), ' '), ' bar ')]"), - array('e[foo^="bar"]', "e[@foo and starts-with(@foo, 'bar')]"), - array('e[foo$="bar"]', "e[@foo and substring(@foo, string-length(@foo)-2) = 'bar']"), - array('e[foo*="bar"]', "e[@foo and contains(@foo, 'bar')]"), - array('e[foo!="bar"]', "e[not(@foo) or @foo != 'bar']"), - array('e[foo!="bar"][foo!="baz"]', "e[(not(@foo) or @foo != 'bar') and (not(@foo) or @foo != 'baz')]"), - array('e[hreflang|="en"]', "e[@hreflang and (@hreflang = 'en' or starts-with(@hreflang, 'en-'))]"), - array('e:nth-child(1)', "*/*[(name() = 'e') and (position() = 1)]"), - array('e:nth-last-child(1)', "*/*[(name() = 'e') and (position() = last() - 0)]"), - array('e:nth-last-child(2n+2)', "*/*[(name() = 'e') and (last() - position() - 1 >= 0 and (last() - position() - 1) mod 2 = 0)]"), - array('e:nth-of-type(1)', '*/e[position() = 1]'), - array('e:nth-last-of-type(1)', '*/e[position() = last() - 0]'), - array('div e:nth-last-of-type(1) .aclass', "div/descendant-or-self::*/e[position() = last() - 0]/descendant-or-self::*/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' aclass ')]"), - array('e:first-child', "*/*[(name() = 'e') and (position() = 1)]"), - array('e:last-child', "*/*[(name() = 'e') and (position() = last())]"), - array('e:first-of-type', '*/e[position() = 1]'), - array('e:last-of-type', '*/e[position() = last()]'), - array('e:only-child', "*/*[(name() = 'e') and (last() = 1)]"), - array('e:only-of-type', 'e[last() = 1]'), - array('e:empty', 'e[not(*) and not(string-length())]'), - array('e:EmPTY', 'e[not(*) and not(string-length())]'), - array('e:root', 'e[not(parent::*)]'), - array('e:hover', 'e[0]'), - array('e:contains("foo")', "e[contains(string(.), 'foo')]"), - array('e:ConTains(foo)', "e[contains(string(.), 'foo')]"), - array('e.warning', "e[@class and contains(concat(' ', normalize-space(@class), ' '), ' warning ')]"), - array('e#myid', "e[@id = 'myid']"), - array('e:not(:nth-child(odd))', 'e[not(position() - 1 >= 0 and (position() - 1) mod 2 = 0)]'), - array('e:nOT(*)', 'e[0]'), - array('e f', 'e/descendant-or-self::*/f'), - array('e > f', 'e/f'), - array('e + f', "e/following-sibling::*[(name() = 'f') and (position() = 1)]"), - array('e ~ f', 'e/following-sibling::f'), - array('div#container p', "div[@id = 'container']/descendant-or-self::*/p"), - ); + return [ + ['*', '*'], + ['e', 'e'], + ['*|e', 'e'], + ['e|f', 'e:f'], + ['e[foo]', 'e[@foo]'], + ['e[foo|bar]', 'e[@foo:bar]'], + ['e[foo="bar"]', "e[@foo = 'bar']"], + ['e[foo~="bar"]', "e[@foo and contains(concat(' ', normalize-space(@foo), ' '), ' bar ')]"], + ['e[foo^="bar"]', "e[@foo and starts-with(@foo, 'bar')]"], + ['e[foo$="bar"]', "e[@foo and substring(@foo, string-length(@foo)-2) = 'bar']"], + ['e[foo*="bar"]', "e[@foo and contains(@foo, 'bar')]"], + ['e[foo!="bar"]', "e[not(@foo) or @foo != 'bar']"], + ['e[foo!="bar"][foo!="baz"]', "e[(not(@foo) or @foo != 'bar') and (not(@foo) or @foo != 'baz')]"], + ['e[hreflang|="en"]', "e[@hreflang and (@hreflang = 'en' or starts-with(@hreflang, 'en-'))]"], + ['e:nth-child(1)', "*/*[(name() = 'e') and (position() = 1)]"], + ['e:nth-last-child(1)', "*/*[(name() = 'e') and (position() = last() - 0)]"], + ['e:nth-last-child(2n+2)', "*/*[(name() = 'e') and (last() - position() - 1 >= 0 and (last() - position() - 1) mod 2 = 0)]"], + ['e:nth-of-type(1)', '*/e[position() = 1]'], + ['e:nth-last-of-type(1)', '*/e[position() = last() - 0]'], + ['div e:nth-last-of-type(1) .aclass', "div/descendant-or-self::*/e[position() = last() - 0]/descendant-or-self::*/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' aclass ')]"], + ['e:first-child', "*/*[(name() = 'e') and (position() = 1)]"], + ['e:last-child', "*/*[(name() = 'e') and (position() = last())]"], + ['e:first-of-type', '*/e[position() = 1]'], + ['e:last-of-type', '*/e[position() = last()]'], + ['e:only-child', "*/*[(name() = 'e') and (last() = 1)]"], + ['e:only-of-type', 'e[last() = 1]'], + ['e:empty', 'e[not(*) and not(string-length())]'], + ['e:EmPTY', 'e[not(*) and not(string-length())]'], + ['e:root', 'e[not(parent::*)]'], + ['e:hover', 'e[0]'], + ['e:contains("foo")', "e[contains(string(.), 'foo')]"], + ['e:ConTains(foo)', "e[contains(string(.), 'foo')]"], + ['e.warning', "e[@class and contains(concat(' ', normalize-space(@class), ' '), ' warning ')]"], + ['e#myid', "e[@id = 'myid']"], + ['e:not(:nth-child(odd))', 'e[not(position() - 1 >= 0 and (position() - 1) mod 2 = 0)]'], + ['e:nOT(*)', 'e[0]'], + ['e f', 'e/descendant-or-self::*/f'], + ['e > f', 'e/f'], + ['e + f', "e/following-sibling::*[(name() = 'f') and (position() = 1)]"], + ['e ~ f', 'e/following-sibling::f'], + ['div#container p', "div[@id = 'container']/descendant-or-self::*/p"], + ]; } public function getXmlLangTestData() { - return array( - array(':lang("EN")', array('first', 'second', 'third', 'fourth')), - array(':lang("en-us")', array('second', 'fourth')), - array(':lang(en-nz)', array('third')), - array(':lang(fr)', array('fifth')), - array(':lang(ru)', array('sixth')), - array(":lang('ZH')", array('eighth')), - array(':lang(de) :lang(zh)', array('eighth')), - array(':lang(en), :lang(zh)', array('first', 'second', 'third', 'fourth', 'eighth')), - array(':lang(es)', array()), - ); + return [ + [':lang("EN")', ['first', 'second', 'third', 'fourth']], + [':lang("en-us")', ['second', 'fourth']], + [':lang(en-nz)', ['third']], + [':lang(fr)', ['fifth']], + [':lang(ru)', ['sixth']], + [":lang('ZH')", ['eighth']], + [':lang(de) :lang(zh)', ['eighth']], + [':lang(en), :lang(zh)', ['first', 'second', 'third', 'fourth', 'eighth']], + [':lang(es)', []], + ]; } public function getHtmlIdsTestData() { - return array( - array('div', array('outer-div', 'li-div', 'foobar-div')), - array('DIV', array('outer-div', 'li-div', 'foobar-div')), // case-insensitive in HTML - array('div div', array('li-div')), - array('div, div div', array('outer-div', 'li-div', 'foobar-div')), - array('a[name]', array('name-anchor')), - array('a[NAme]', array('name-anchor')), // case-insensitive in HTML: - array('a[rel]', array('tag-anchor', 'nofollow-anchor')), - array('a[rel="tag"]', array('tag-anchor')), - array('a[href*="localhost"]', array('tag-anchor')), - array('a[href*=""]', array()), - array('a[href^="http"]', array('tag-anchor', 'nofollow-anchor')), - array('a[href^="http:"]', array('tag-anchor')), - array('a[href^=""]', array()), - array('a[href$="org"]', array('nofollow-anchor')), - array('a[href$=""]', array()), - array('div[foobar~="bc"]', array('foobar-div')), - array('div[foobar~="cde"]', array('foobar-div')), - array('[foobar~="ab bc"]', array('foobar-div')), - array('[foobar~=""]', array()), - array('[foobar~=" \t"]', array()), - array('div[foobar~="cd"]', array()), - array('*[lang|="En"]', array('second-li')), - array('[lang|="En-us"]', array('second-li')), + return [ + ['div', ['outer-div', 'li-div', 'foobar-div']], + ['DIV', ['outer-div', 'li-div', 'foobar-div']], // case-insensitive in HTML + ['div div', ['li-div']], + ['div, div div', ['outer-div', 'li-div', 'foobar-div']], + ['a[name]', ['name-anchor']], + ['a[NAme]', ['name-anchor']], // case-insensitive in HTML: + ['a[rel]', ['tag-anchor', 'nofollow-anchor']], + ['a[rel="tag"]', ['tag-anchor']], + ['a[href*="localhost"]', ['tag-anchor']], + ['a[href*=""]', []], + ['a[href^="http"]', ['tag-anchor', 'nofollow-anchor']], + ['a[href^="http:"]', ['tag-anchor']], + ['a[href^=""]', []], + ['a[href$="org"]', ['nofollow-anchor']], + ['a[href$=""]', []], + ['div[foobar~="bc"]', ['foobar-div']], + ['div[foobar~="cde"]', ['foobar-div']], + ['[foobar~="ab bc"]', ['foobar-div']], + ['[foobar~=""]', []], + ['[foobar~=" \t"]', []], + ['div[foobar~="cd"]', []], + ['*[lang|="En"]', ['second-li']], + ['[lang|="En-us"]', ['second-li']], // Attribute values are case sensitive - array('*[lang|="en"]', array()), - array('[lang|="en-US"]', array()), - array('*[lang|="e"]', array()), + ['*[lang|="en"]', []], + ['[lang|="en-US"]', []], + ['*[lang|="e"]', []], // ... :lang() is not. - array(':lang("EN")', array('second-li', 'li-div')), - array('*:lang(en-US)', array('second-li', 'li-div')), - array(':lang("e")', array()), - array('li:nth-child(3)', array('third-li')), - array('li:nth-child(10)', array()), - array('li:nth-child(2n)', array('second-li', 'fourth-li', 'sixth-li')), - array('li:nth-child(even)', array('second-li', 'fourth-li', 'sixth-li')), - array('li:nth-child(2n+0)', array('second-li', 'fourth-li', 'sixth-li')), - array('li:nth-child(+2n+1)', array('first-li', 'third-li', 'fifth-li', 'seventh-li')), - array('li:nth-child(odd)', array('first-li', 'third-li', 'fifth-li', 'seventh-li')), - array('li:nth-child(2n+4)', array('fourth-li', 'sixth-li')), - array('li:nth-child(3n+1)', array('first-li', 'fourth-li', 'seventh-li')), - array('li:nth-child(n)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), - array('li:nth-child(n-1)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), - array('li:nth-child(n+1)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), - array('li:nth-child(n+3)', array('third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), - array('li:nth-child(-n)', array()), - array('li:nth-child(-n-1)', array()), - array('li:nth-child(-n+1)', array('first-li')), - array('li:nth-child(-n+3)', array('first-li', 'second-li', 'third-li')), - array('li:nth-last-child(0)', array()), - array('li:nth-last-child(2n)', array('second-li', 'fourth-li', 'sixth-li')), - array('li:nth-last-child(even)', array('second-li', 'fourth-li', 'sixth-li')), - array('li:nth-last-child(2n+2)', array('second-li', 'fourth-li', 'sixth-li')), - array('li:nth-last-child(n)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), - array('li:nth-last-child(n-1)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), - array('li:nth-last-child(n-3)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), - array('li:nth-last-child(n+1)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), - array('li:nth-last-child(n+3)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li')), - array('li:nth-last-child(-n)', array()), - array('li:nth-last-child(-n-1)', array()), - array('li:nth-last-child(-n+1)', array('seventh-li')), - array('li:nth-last-child(-n+3)', array('fifth-li', 'sixth-li', 'seventh-li')), - array('ol:first-of-type', array('first-ol')), - array('ol:nth-child(1)', array('first-ol')), - array('ol:nth-of-type(2)', array('second-ol')), - array('ol:nth-last-of-type(1)', array('second-ol')), - array('span:only-child', array('foobar-span')), - array('li div:only-child', array('li-div')), - array('div *:only-child', array('li-div', 'foobar-span')), - array('p:only-of-type', array('paragraph')), - array('a:empty', array('name-anchor')), - array('a:EMpty', array('name-anchor')), - array('li:empty', array('third-li', 'fourth-li', 'fifth-li', 'sixth-li')), - array(':root', array('html')), - array('html:root', array('html')), - array('li:root', array()), - array('* :root', array()), - array('*:contains("link")', array('html', 'outer-div', 'tag-anchor', 'nofollow-anchor')), - array(':CONtains("link")', array('html', 'outer-div', 'tag-anchor', 'nofollow-anchor')), - array('*:contains("LInk")', array()), // case sensitive - array('*:contains("e")', array('html', 'nil', 'outer-div', 'first-ol', 'first-li', 'paragraph', 'p-em')), - array('*:contains("E")', array()), // case-sensitive - array('.a', array('first-ol')), - array('.b', array('first-ol')), - array('*.a', array('first-ol')), - array('ol.a', array('first-ol')), - array('.c', array('first-ol', 'third-li', 'fourth-li')), - array('*.c', array('first-ol', 'third-li', 'fourth-li')), - array('ol *.c', array('third-li', 'fourth-li')), - array('ol li.c', array('third-li', 'fourth-li')), - array('li ~ li.c', array('third-li', 'fourth-li')), - array('ol > li.c', array('third-li', 'fourth-li')), - array('#first-li', array('first-li')), - array('li#first-li', array('first-li')), - array('*#first-li', array('first-li')), - array('li div', array('li-div')), - array('li > div', array('li-div')), - array('div div', array('li-div')), - array('div > div', array()), - array('div>.c', array('first-ol')), - array('div > .c', array('first-ol')), - array('div + div', array('foobar-div')), - array('a ~ a', array('tag-anchor', 'nofollow-anchor')), - array('a[rel="tag"] ~ a', array('nofollow-anchor')), - array('ol#first-ol li:last-child', array('seventh-li')), - array('ol#first-ol *:last-child', array('li-div', 'seventh-li')), - array('#outer-div:first-child', array('outer-div')), - array('#outer-div :first-child', array('name-anchor', 'first-li', 'li-div', 'p-b', 'checkbox-fieldset-disabled', 'area-href')), - array('a[href]', array('tag-anchor', 'nofollow-anchor')), - array(':not(*)', array()), - array('a:not([href])', array('name-anchor')), - array('ol :Not(li[class])', array('first-li', 'second-li', 'li-div', 'fifth-li', 'sixth-li', 'seventh-li')), + [':lang("EN")', ['second-li', 'li-div']], + ['*:lang(en-US)', ['second-li', 'li-div']], + [':lang("e")', []], + ['li:nth-child(3)', ['third-li']], + ['li:nth-child(10)', []], + ['li:nth-child(2n)', ['second-li', 'fourth-li', 'sixth-li']], + ['li:nth-child(even)', ['second-li', 'fourth-li', 'sixth-li']], + ['li:nth-child(2n+0)', ['second-li', 'fourth-li', 'sixth-li']], + ['li:nth-child(+2n+1)', ['first-li', 'third-li', 'fifth-li', 'seventh-li']], + ['li:nth-child(odd)', ['first-li', 'third-li', 'fifth-li', 'seventh-li']], + ['li:nth-child(2n+4)', ['fourth-li', 'sixth-li']], + ['li:nth-child(3n+1)', ['first-li', 'fourth-li', 'seventh-li']], + ['li:nth-child(n)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']], + ['li:nth-child(n-1)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']], + ['li:nth-child(n+1)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']], + ['li:nth-child(n+3)', ['third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']], + ['li:nth-child(-n)', []], + ['li:nth-child(-n-1)', []], + ['li:nth-child(-n+1)', ['first-li']], + ['li:nth-child(-n+3)', ['first-li', 'second-li', 'third-li']], + ['li:nth-last-child(0)', []], + ['li:nth-last-child(2n)', ['second-li', 'fourth-li', 'sixth-li']], + ['li:nth-last-child(even)', ['second-li', 'fourth-li', 'sixth-li']], + ['li:nth-last-child(2n+2)', ['second-li', 'fourth-li', 'sixth-li']], + ['li:nth-last-child(n)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']], + ['li:nth-last-child(n-1)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']], + ['li:nth-last-child(n-3)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']], + ['li:nth-last-child(n+1)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']], + ['li:nth-last-child(n+3)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li']], + ['li:nth-last-child(-n)', []], + ['li:nth-last-child(-n-1)', []], + ['li:nth-last-child(-n+1)', ['seventh-li']], + ['li:nth-last-child(-n+3)', ['fifth-li', 'sixth-li', 'seventh-li']], + ['ol:first-of-type', ['first-ol']], + ['ol:nth-child(1)', ['first-ol']], + ['ol:nth-of-type(2)', ['second-ol']], + ['ol:nth-last-of-type(1)', ['second-ol']], + ['span:only-child', ['foobar-span']], + ['li div:only-child', ['li-div']], + ['div *:only-child', ['li-div', 'foobar-span']], + ['p:only-of-type', ['paragraph']], + ['a:empty', ['name-anchor']], + ['a:EMpty', ['name-anchor']], + ['li:empty', ['third-li', 'fourth-li', 'fifth-li', 'sixth-li']], + [':root', ['html']], + ['html:root', ['html']], + ['li:root', []], + ['* :root', []], + ['*:contains("link")', ['html', 'outer-div', 'tag-anchor', 'nofollow-anchor']], + [':CONtains("link")', ['html', 'outer-div', 'tag-anchor', 'nofollow-anchor']], + ['*:contains("LInk")', []], // case sensitive + ['*:contains("e")', ['html', 'nil', 'outer-div', 'first-ol', 'first-li', 'paragraph', 'p-em']], + ['*:contains("E")', []], // case-sensitive + ['.a', ['first-ol']], + ['.b', ['first-ol']], + ['*.a', ['first-ol']], + ['ol.a', ['first-ol']], + ['.c', ['first-ol', 'third-li', 'fourth-li']], + ['*.c', ['first-ol', 'third-li', 'fourth-li']], + ['ol *.c', ['third-li', 'fourth-li']], + ['ol li.c', ['third-li', 'fourth-li']], + ['li ~ li.c', ['third-li', 'fourth-li']], + ['ol > li.c', ['third-li', 'fourth-li']], + ['#first-li', ['first-li']], + ['li#first-li', ['first-li']], + ['*#first-li', ['first-li']], + ['li div', ['li-div']], + ['li > div', ['li-div']], + ['div div', ['li-div']], + ['div > div', []], + ['div>.c', ['first-ol']], + ['div > .c', ['first-ol']], + ['div + div', ['foobar-div']], + ['a ~ a', ['tag-anchor', 'nofollow-anchor']], + ['a[rel="tag"] ~ a', ['nofollow-anchor']], + ['ol#first-ol li:last-child', ['seventh-li']], + ['ol#first-ol *:last-child', ['li-div', 'seventh-li']], + ['#outer-div:first-child', ['outer-div']], + ['#outer-div :first-child', ['name-anchor', 'first-li', 'li-div', 'p-b', 'checkbox-fieldset-disabled', 'area-href']], + ['a[href]', ['tag-anchor', 'nofollow-anchor']], + [':not(*)', []], + ['a:not([href])', ['name-anchor']], + ['ol :Not(li[class])', ['first-li', 'second-li', 'li-div', 'fifth-li', 'sixth-li', 'seventh-li']], // HTML-specific - array(':link', array('link-href', 'tag-anchor', 'nofollow-anchor', 'area-href')), - array(':visited', array()), - array(':enabled', array('link-href', 'tag-anchor', 'nofollow-anchor', 'checkbox-unchecked', 'text-checked', 'checkbox-checked', 'area-href')), - array(':disabled', array('checkbox-disabled', 'checkbox-disabled-checked', 'fieldset', 'checkbox-fieldset-disabled')), - array(':checked', array('checkbox-checked', 'checkbox-disabled-checked')), - ); + [':link', ['link-href', 'tag-anchor', 'nofollow-anchor', 'area-href']], + [':visited', []], + [':enabled', ['link-href', 'tag-anchor', 'nofollow-anchor', 'checkbox-unchecked', 'text-checked', 'checkbox-checked', 'area-href']], + [':disabled', ['checkbox-disabled', 'checkbox-disabled-checked', 'fieldset', 'checkbox-fieldset-disabled']], + [':checked', ['checkbox-checked', 'checkbox-disabled-checked']], + ]; } public function getHtmlShakespearTestData() { - return array( - array('*', 246), - array('div:contains(CELIA)', 26), - array('div:only-child', 22), // ? - array('div:nth-child(even)', 106), - array('div:nth-child(2n)', 106), - array('div:nth-child(odd)', 137), - array('div:nth-child(2n+1)', 137), - array('div:nth-child(n)', 243), - array('div:last-child', 53), - array('div:first-child', 51), - array('div > div', 242), - array('div + div', 190), - array('div ~ div', 190), - array('body', 1), - array('body div', 243), - array('div', 243), - array('div div', 242), - array('div div div', 241), - array('div, div, div', 243), - array('div, a, span', 243), - array('.dialog', 51), - array('div.dialog', 51), - array('div .dialog', 51), - array('div.character, div.dialog', 99), - array('div.direction.dialog', 0), - array('div.dialog.direction', 0), - array('div.dialog.scene', 1), - array('div.scene.scene', 1), - array('div.scene .scene', 0), - array('div.direction .dialog ', 0), - array('div .dialog .direction', 4), - array('div.dialog .dialog .direction', 4), - array('#speech5', 1), - array('div#speech5', 1), - array('div #speech5', 1), - array('div.scene div.dialog', 49), - array('div#scene1 div.dialog div', 142), - array('#scene1 #speech1', 1), - array('div[class]', 103), - array('div[class=dialog]', 50), - array('div[class^=dia]', 51), - array('div[class$=log]', 50), - array('div[class*=sce]', 1), - array('div[class|=dialog]', 50), // ? Seems right - array('div[class!=madeup]', 243), // ? Seems right - array('div[class~=dialog]', 51), // ? Seems right - ); + return [ + ['*', 246], + ['div:contains(CELIA)', 26], + ['div:only-child', 22], // ? + ['div:nth-child(even)', 106], + ['div:nth-child(2n)', 106], + ['div:nth-child(odd)', 137], + ['div:nth-child(2n+1)', 137], + ['div:nth-child(n)', 243], + ['div:last-child', 53], + ['div:first-child', 51], + ['div > div', 242], + ['div + div', 190], + ['div ~ div', 190], + ['body', 1], + ['body div', 243], + ['div', 243], + ['div div', 242], + ['div div div', 241], + ['div, div, div', 243], + ['div, a, span', 243], + ['.dialog', 51], + ['div.dialog', 51], + ['div .dialog', 51], + ['div.character, div.dialog', 99], + ['div.direction.dialog', 0], + ['div.dialog.direction', 0], + ['div.dialog.scene', 1], + ['div.scene.scene', 1], + ['div.scene .scene', 0], + ['div.direction .dialog ', 0], + ['div .dialog .direction', 4], + ['div.dialog .dialog .direction', 4], + ['#speech5', 1], + ['div#speech5', 1], + ['div #speech5', 1], + ['div.scene div.dialog', 49], + ['div#scene1 div.dialog div', 142], + ['#scene1 #speech1', 1], + ['div[class]', 103], + ['div[class=dialog]', 50], + ['div[class^=dia]', 51], + ['div[class$=log]', 50], + ['div[class*=sce]', 1], + ['div[class|=dialog]', 50], // ? Seems right + ['div[class!=madeup]', 243], // ? Seems right + ['div[class~=dialog]', 51], // ? Seems right + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/AbstractExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/AbstractExtension.php index 026ac06c..1dce1edd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/AbstractExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/AbstractExtension.php @@ -28,7 +28,7 @@ abstract class AbstractExtension implements ExtensionInterface */ public function getNodeTranslators() { - return array(); + return []; } /** @@ -36,7 +36,7 @@ abstract class AbstractExtension implements ExtensionInterface */ public function getCombinationTranslators() { - return array(); + return []; } /** @@ -44,7 +44,7 @@ abstract class AbstractExtension implements ExtensionInterface */ public function getFunctionTranslators() { - return array(); + return []; } /** @@ -52,7 +52,7 @@ abstract class AbstractExtension implements ExtensionInterface */ public function getPseudoClassTranslators() { - return array(); + return []; } /** @@ -60,6 +60,6 @@ abstract class AbstractExtension implements ExtensionInterface */ public function getAttributeMatchingTranslators() { - return array(); + return []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php index 2078dca6..0571b3b7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php @@ -31,16 +31,16 @@ class AttributeMatchingExtension extends AbstractExtension */ public function getAttributeMatchingTranslators() { - return array( - 'exists' => array($this, 'translateExists'), - '=' => array($this, 'translateEquals'), - '~=' => array($this, 'translateIncludes'), - '|=' => array($this, 'translateDashMatch'), - '^=' => array($this, 'translatePrefixMatch'), - '$=' => array($this, 'translateSuffixMatch'), - '*=' => array($this, 'translateSubstringMatch'), - '!=' => array($this, 'translateDifferent'), - ); + return [ + 'exists' => [$this, 'translateExists'], + '=' => [$this, 'translateEquals'], + '~=' => [$this, 'translateIncludes'], + '|=' => [$this, 'translateDashMatch'], + '^=' => [$this, 'translatePrefixMatch'], + '$=' => [$this, 'translateSuffixMatch'], + '*=' => [$this, 'translateSubstringMatch'], + '!=' => [$this, 'translateDifferent'], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php index 0c9cc032..d962dc5a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php @@ -30,12 +30,12 @@ class CombinationExtension extends AbstractExtension */ public function getCombinationTranslators() { - return array( - ' ' => array($this, 'translateDescendant'), - '>' => array($this, 'translateChild'), - '+' => array($this, 'translateDirectAdjacent'), - '~' => array($this, 'translateIndirectAdjacent'), - ); + return [ + ' ' => [$this, 'translateDescendant'], + '>' => [$this, 'translateChild'], + '+' => [$this, 'translateDirectAdjacent'], + '~' => [$this, 'translateIndirectAdjacent'], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php index 4d34d0ef..a8e0b69f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php @@ -35,14 +35,14 @@ class FunctionExtension extends AbstractExtension */ public function getFunctionTranslators() { - return array( - 'nth-child' => array($this, 'translateNthChild'), - 'nth-last-child' => array($this, 'translateNthLastChild'), - 'nth-of-type' => array($this, 'translateNthOfType'), - 'nth-last-of-type' => array($this, 'translateNthLastOfType'), - 'contains' => array($this, 'translateContains'), - 'lang' => array($this, 'translateLang'), - ); + return [ + 'nth-child' => [$this, 'translateNthChild'], + 'nth-last-child' => [$this, 'translateNthLastChild'], + 'nth-of-type' => [$this, 'translateNthOfType'], + 'nth-last-of-type' => [$this, 'translateNthLastOfType'], + 'contains' => [$this, 'translateContains'], + 'lang' => [$this, 'translateLang'], + ]; } /** @@ -93,7 +93,7 @@ class FunctionExtension extends AbstractExtension $expr .= ' - '.$b; } - $conditions = array(sprintf('%s %s 0', $expr, $sign)); + $conditions = [sprintf('%s %s 0', $expr, $sign)]; if (1 !== $a && -1 !== $a) { $conditions[] = sprintf('(%s) mod %d = 0', $expr, $a); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php index cd8e0d5f..99c1166c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php @@ -41,16 +41,16 @@ class HtmlExtension extends AbstractExtension */ public function getPseudoClassTranslators() { - return array( - 'checked' => array($this, 'translateChecked'), - 'link' => array($this, 'translateLink'), - 'disabled' => array($this, 'translateDisabled'), - 'enabled' => array($this, 'translateEnabled'), - 'selected' => array($this, 'translateSelected'), - 'invalid' => array($this, 'translateInvalid'), - 'hover' => array($this, 'translateHover'), - 'visited' => array($this, 'translateVisited'), - ); + return [ + 'checked' => [$this, 'translateChecked'], + 'link' => [$this, 'translateLink'], + 'disabled' => [$this, 'translateDisabled'], + 'enabled' => [$this, 'translateEnabled'], + 'selected' => [$this, 'translateSelected'], + 'invalid' => [$this, 'translateInvalid'], + 'hover' => [$this, 'translateHover'], + 'visited' => [$this, 'translateVisited'], + ]; } /** @@ -58,9 +58,9 @@ class HtmlExtension extends AbstractExtension */ public function getFunctionTranslators() { - return array( - 'lang' => array($this, 'translateLang'), - ); + return [ + 'lang' => [$this, 'translateLang'], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php index 715d9611..de222af3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php @@ -75,17 +75,17 @@ class NodeExtension extends AbstractExtension */ public function getNodeTranslators() { - return array( - 'Selector' => array($this, 'translateSelector'), - 'CombinedSelector' => array($this, 'translateCombinedSelector'), - 'Negation' => array($this, 'translateNegation'), - 'Function' => array($this, 'translateFunction'), - 'Pseudo' => array($this, 'translatePseudo'), - 'Attribute' => array($this, 'translateAttribute'), - 'Class' => array($this, 'translateClass'), - 'Hash' => array($this, 'translateHash'), - 'Element' => array($this, 'translateElement'), - ); + return [ + 'Selector' => [$this, 'translateSelector'], + 'CombinedSelector' => [$this, 'translateCombinedSelector'], + 'Negation' => [$this, 'translateNegation'], + 'Function' => [$this, 'translateFunction'], + 'Pseudo' => [$this, 'translatePseudo'], + 'Attribute' => [$this, 'translateAttribute'], + 'Class' => [$this, 'translateClass'], + 'Hash' => [$this, 'translateHash'], + 'Element' => [$this, 'translateElement'], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php index 378dfb7d..27fe47f9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php @@ -31,16 +31,16 @@ class PseudoClassExtension extends AbstractExtension */ public function getPseudoClassTranslators() { - return array( - 'root' => array($this, 'translateRoot'), - 'first-child' => array($this, 'translateFirstChild'), - 'last-child' => array($this, 'translateLastChild'), - 'first-of-type' => array($this, 'translateFirstOfType'), - 'last-of-type' => array($this, 'translateLastOfType'), - 'only-child' => array($this, 'translateOnlyChild'), - 'only-of-type' => array($this, 'translateOnlyOfType'), - 'empty' => array($this, 'translateEmpty'), - ); + return [ + 'root' => [$this, 'translateRoot'], + 'first-child' => [$this, 'translateFirstChild'], + 'last-child' => [$this, 'translateLastChild'], + 'first-of-type' => [$this, 'translateFirstOfType'], + 'last-of-type' => [$this, 'translateLastOfType'], + 'only-child' => [$this, 'translateOnlyChild'], + 'only-of-type' => [$this, 'translateOnlyOfType'], + 'empty' => [$this, 'translateEmpty'], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Translator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Translator.php index f8585a05..d0781267 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Translator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Translator.php @@ -35,18 +35,18 @@ class Translator implements TranslatorInterface /** * @var ParserInterface[] */ - private $shortcutParsers = array(); + private $shortcutParsers = []; /** * @var Extension\ExtensionInterface[] */ - private $extensions = array(); + private $extensions = []; - private $nodeTranslators = array(); - private $combinationTranslators = array(); - private $functionTranslators = array(); - private $pseudoClassTranslators = array(); - private $attributeMatchingTranslators = array(); + private $nodeTranslators = []; + private $combinationTranslators = []; + private $functionTranslators = []; + private $pseudoClassTranslators = []; + private $attributeMatchingTranslators = []; public function __construct(ParserInterface $parser = null) { @@ -77,7 +77,7 @@ class Translator implements TranslatorInterface } $string = $element; - $parts = array(); + $parts = []; while (true) { if (false !== $pos = strpos($string, "'")) { $parts[] = sprintf("'%s'", substr($string, 0, $pos)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/BufferingLogger.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/BufferingLogger.php index a2ed75b9..e7db3a4c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/BufferingLogger.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/BufferingLogger.php @@ -20,17 +20,17 @@ use Psr\Log\AbstractLogger; */ class BufferingLogger extends AbstractLogger { - private $logs = array(); + private $logs = []; - public function log($level, $message, array $context = array()) + public function log($level, $message, array $context = []) { - $this->logs[] = array($level, $message, $context); + $this->logs[] = [$level, $message, $context]; } public function cleanLogs() { $logs = $this->logs; - $this->logs = array(); + $this->logs = []; return $logs; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Debug.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Debug.php index 2a3d7f31..498d3093 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Debug.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Debug.php @@ -42,7 +42,7 @@ class Debug error_reporting(E_ALL); } - if (!\in_array(\PHP_SAPI, array('cli', 'phpdbg'), true)) { + if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { ini_set('display_errors', 0); ExceptionHandler::register(); } elseif ($displayErrors && (!filter_var(ini_get('log_errors'), FILTER_VALIDATE_BOOLEAN) || ini_get('error_log'))) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php index c9fa76cf..310f7d4e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php @@ -26,16 +26,16 @@ class DebugClassLoader { private $classLoader; private $isFinder; - private $loaded = array(); + private $loaded = []; private static $caseCheck; - private static $checkedClasses = array(); - private static $final = array(); - private static $finalMethods = array(); - private static $deprecated = array(); - private static $internal = array(); - private static $internalMethods = array(); - private static $php7Reserved = array('int' => 1, 'float' => 1, 'bool' => 1, 'string' => 1, 'true' => 1, 'false' => 1, 'null' => 1); - private static $darwinCache = array('/' => array('/', array())); + private static $checkedClasses = []; + private static $final = []; + private static $finalMethods = []; + private static $deprecated = []; + private static $internal = []; + private static $internalMethods = []; + private static $php7Reserved = ['int' => 1, 'float' => 1, 'bool' => 1, 'string' => 1, 'true' => 1, 'false' => 1, 'null' => 1]; + private static $darwinCache = ['/' => ['/', []]]; public function __construct(callable $classLoader) { @@ -95,7 +95,7 @@ class DebugClassLoader foreach ($functions as $function) { if (!\is_array($function) || !$function[0] instanceof self) { - $function = array(new static($function), 'loadClass'); + $function = [new static($function), 'loadClass']; } spl_autoload_register($function); @@ -124,6 +124,14 @@ class DebugClassLoader } } + /** + * @return string|null + */ + public function findFile($class) + { + return $this->isFinder ? $this->classLoader[0]->findFile($class) ?: null : null; + } + /** * Loads the given class or interface. * @@ -138,14 +146,14 @@ class DebugClassLoader try { if ($this->isFinder && !isset($this->loaded[$class])) { $this->loaded[$class] = true; - if ($file = $this->classLoader[0]->findFile($class) ?: false) { - $wasCached = \function_exists('opcache_is_script_cached') && @opcache_is_script_cached($file); - + if (!$file = $this->classLoader[0]->findFile($class) ?: false) { + // no-op + } elseif (\function_exists('opcache_is_script_cached') && @opcache_is_script_cached($file)) { require $file; - if ($wasCached) { - return; - } + return; + } else { + require $file; } } else { \call_user_func($this->classLoader, $class); @@ -212,21 +220,21 @@ class DebugClassLoader public function checkAnnotations(\ReflectionClass $refl, $class) { - $deprecations = array(); + $deprecations = []; // Don't trigger deprecations for classes in the same vendor if (2 > $len = 1 + (\strpos($class, '\\') ?: \strpos($class, '_'))) { $len = 0; $ns = ''; } else { - $ns = \substr($class, 0, $len); + $ns = \str_replace('_', '\\', \substr($class, 0, $len)); } // Detect annotations on the class if (false !== $doc = $refl->getDocComment()) { - foreach (array('final', 'deprecated', 'internal') as $annotation) { - if (false !== \strpos($doc, $annotation) && preg_match('#\n \* @'.$annotation.'(?:( .+?)\.?)?\r?\n \*(?: @|/$)#s', $doc, $notice)) { - self::${$annotation}[$class] = isset($notice[1]) ? preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]) : ''; + foreach (['final', 'deprecated', 'internal'] as $annotation) { + if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$)#s', $doc, $notice)) { + self::${$annotation}[$class] = isset($notice[1]) ? preg_replace('#\.?\r?\n( \*)? *(?= |\r?\n|$)#', '', $notice[1]) : ''; } } } @@ -250,13 +258,13 @@ class DebugClassLoader if (!isset(self::$checkedClasses[$use])) { $this->checkClass($use); } - if (isset(self::$deprecated[$use]) && \strncmp($ns, $use, $len)) { + if (isset(self::$deprecated[$use]) && \strncmp($ns, \str_replace('_', '\\', $use), $len)) { $type = class_exists($class, false) ? 'class' : (interface_exists($class, false) ? 'interface' : 'trait'); $verb = class_exists($use, false) || interface_exists($class, false) ? 'extends' : (interface_exists($use, false) ? 'implements' : 'uses'); $deprecations[] = sprintf('The "%s" %s %s "%s" that is deprecated%s.', $class, $type, $verb, $use, self::$deprecated[$use]); } - if (isset(self::$internal[$use]) && \strncmp($ns, $use, $len)) { + if (isset(self::$internal[$use]) && \strncmp($ns, \str_replace('_', '\\', $use), $len)) { $deprecations[] = sprintf('The "%s" %s is considered internal%s. It may change without further notice. You should not use it from "%s".', $use, class_exists($use, false) ? 'class' : (interface_exists($use, false) ? 'interface' : 'trait'), self::$internal[$use], $class); } } @@ -266,10 +274,10 @@ class DebugClassLoader } // Inherit @final and @internal annotations for methods - self::$finalMethods[$class] = array(); - self::$internalMethods[$class] = array(); + self::$finalMethods[$class] = []; + self::$internalMethods[$class] = []; foreach ($parentAndOwnInterfaces as $use) { - foreach (array('finalMethods', 'internalMethods') as $property) { + foreach (['finalMethods', 'internalMethods'] as $property) { if (isset(self::${$property}[$use])) { self::${$property}[$class] = self::${$property}[$class] ? self::${$property}[$use] + self::${$property}[$class] : self::${$property}[$use]; } @@ -298,10 +306,10 @@ class DebugClassLoader continue; } - foreach (array('final', 'internal') as $annotation) { + foreach (['final', 'internal'] as $annotation) { if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$)#s', $doc, $notice)) { - $message = isset($notice[1]) ? preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]) : ''; - self::${$annotation.'Methods'}[$class][$method->name] = array($class, $message); + $message = isset($notice[1]) ? preg_replace('#\.?\r?\n( \*)? *(?= |\r?\n|$)#', '', $notice[1]) : ''; + self::${$annotation.'Methods'}[$class][$method->name] = [$class, $message]; } } } @@ -339,7 +347,7 @@ class DebugClassLoader if (0 === substr_compare($real, $tail, -$tailLen, $tailLen, true) && 0 !== substr_compare($real, $tail, -$tailLen, $tailLen, false) ) { - return array(substr($tail, -$tailLen + 1), substr($real, -$tailLen + 1), substr($real, 0, -$tailLen + 1)); + return [substr($tail, -$tailLen + 1), substr($real, -$tailLen + 1), substr($real, 0, -$tailLen + 1)]; } } @@ -369,7 +377,7 @@ class DebugClassLoader $k = $kDir; $i = \strlen($dir) - 1; while (!isset(self::$darwinCache[$k])) { - self::$darwinCache[$k] = array($dir, array()); + self::$darwinCache[$k] = [$dir, []]; self::$darwinCache[$dir] = &self::$darwinCache[$k]; while ('/' !== $dir[--$i]) { @@ -382,6 +390,11 @@ class DebugClassLoader $dirFiles = self::$darwinCache[$kDir][1]; + if (!isset($dirFiles[$file]) && ') : eval()\'d code' === substr($file, -17)) { + // Get the file name from "file_name.php(123) : eval()'d code" + $file = substr($file, 0, strrpos($file, '(', -17)); + } + if (isset($dirFiles[$file])) { return $real .= $dirFiles[$file]; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php index 69a72804..d871b915 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php @@ -48,7 +48,7 @@ use Symfony\Component\Debug\FatalErrorHandler\UndefinedMethodFatalErrorHandler; */ class ErrorHandler { - private $levels = array( + private $levels = [ E_DEPRECATED => 'Deprecated', E_USER_DEPRECATED => 'User Deprecated', E_NOTICE => 'Notice', @@ -64,25 +64,25 @@ class ErrorHandler E_PARSE => 'Parse Error', E_ERROR => 'Error', E_CORE_ERROR => 'Core Error', - ); + ]; - private $loggers = array( - E_DEPRECATED => array(null, LogLevel::INFO), - E_USER_DEPRECATED => array(null, LogLevel::INFO), - E_NOTICE => array(null, LogLevel::WARNING), - E_USER_NOTICE => array(null, LogLevel::WARNING), - E_STRICT => array(null, LogLevel::WARNING), - E_WARNING => array(null, LogLevel::WARNING), - E_USER_WARNING => array(null, LogLevel::WARNING), - E_COMPILE_WARNING => array(null, LogLevel::WARNING), - E_CORE_WARNING => array(null, LogLevel::WARNING), - E_USER_ERROR => array(null, LogLevel::CRITICAL), - E_RECOVERABLE_ERROR => array(null, LogLevel::CRITICAL), - E_COMPILE_ERROR => array(null, LogLevel::CRITICAL), - E_PARSE => array(null, LogLevel::CRITICAL), - E_ERROR => array(null, LogLevel::CRITICAL), - E_CORE_ERROR => array(null, LogLevel::CRITICAL), - ); + private $loggers = [ + E_DEPRECATED => [null, LogLevel::INFO], + E_USER_DEPRECATED => [null, LogLevel::INFO], + E_NOTICE => [null, LogLevel::WARNING], + E_USER_NOTICE => [null, LogLevel::WARNING], + E_STRICT => [null, LogLevel::WARNING], + E_WARNING => [null, LogLevel::WARNING], + E_USER_WARNING => [null, LogLevel::WARNING], + E_COMPILE_WARNING => [null, LogLevel::WARNING], + E_CORE_WARNING => [null, LogLevel::WARNING], + E_USER_ERROR => [null, LogLevel::CRITICAL], + E_RECOVERABLE_ERROR => [null, LogLevel::CRITICAL], + E_COMPILE_ERROR => [null, LogLevel::CRITICAL], + E_PARSE => [null, LogLevel::CRITICAL], + E_ERROR => [null, LogLevel::CRITICAL], + E_CORE_ERROR => [null, LogLevel::CRITICAL], + ]; private $thrownErrors = 0x1FFF; // E_ALL - E_DEPRECATED - E_USER_DEPRECATED private $scopedErrors = 0x1FFF; // E_ALL - E_DEPRECATED - E_USER_DEPRECATED @@ -97,10 +97,10 @@ class ErrorHandler private $bootstrappingLogger; private static $reservedMemory; - private static $stackedErrors = array(); - private static $stackedErrorLevels = array(); + private static $stackedErrors = []; + private static $stackedErrorLevels = []; private static $toStringException = null; - private static $silencedErrorCache = array(); + private static $silencedErrorCache = []; private static $silencedErrorCount = 0; private static $exitCode = 0; @@ -123,10 +123,10 @@ class ErrorHandler $handler = new static(); } - if (null === $prev = set_error_handler(array($handler, 'handleError'))) { + if (null === $prev = set_error_handler([$handler, 'handleError'])) { restore_error_handler(); // Specifying the error types earlier would expose us to https://bugs.php.net/63206 - set_error_handler(array($handler, 'handleError'), $handler->thrownErrors | $handler->loggedErrors); + set_error_handler([$handler, 'handleError'], $handler->thrownErrors | $handler->loggedErrors); $handler->isRoot = true; } @@ -140,12 +140,12 @@ class ErrorHandler } else { $handlerIsRegistered = true; } - if (\is_array($prev = set_exception_handler(array($handler, 'handleException'))) && $prev[0] instanceof self) { + if (\is_array($prev = set_exception_handler([$handler, 'handleException'])) && $prev[0] instanceof self) { restore_exception_handler(); if (!$handlerIsRegistered) { $handler = $prev[0]; } elseif ($handler !== $prev[0] && $replace) { - set_exception_handler(array($handler, 'handleException')); + set_exception_handler([$handler, 'handleException']); $p = $prev[0]->setExceptionHandler(null); $handler->setExceptionHandler($p); $prev[0]->setExceptionHandler($p); @@ -178,12 +178,12 @@ class ErrorHandler */ public function setDefaultLogger(LoggerInterface $logger, $levels = E_ALL, $replace = false) { - $loggers = array(); + $loggers = []; if (\is_array($levels)) { foreach ($levels as $type => $logLevel) { if (empty($this->loggers[$type][0]) || $replace || $this->loggers[$type][0] === $this->bootstrappingLogger) { - $loggers[$type] = array($logger, $logLevel); + $loggers[$type] = [$logger, $logLevel]; } } } else { @@ -214,15 +214,15 @@ class ErrorHandler { $prevLogged = $this->loggedErrors; $prev = $this->loggers; - $flush = array(); + $flush = []; foreach ($loggers as $type => $log) { if (!isset($prev[$type])) { throw new \InvalidArgumentException('Unknown error type: '.$type); } if (!\is_array($log)) { - $log = array($log); - } elseif (!array_key_exists(0, $log)) { + $log = [$log]; + } elseif (!\array_key_exists(0, $log)) { throw new \InvalidArgumentException('No logger provided'); } if (null === $log[0]) { @@ -358,9 +358,9 @@ class ErrorHandler if ($handler === $this) { restore_error_handler(); if ($this->isRoot) { - set_error_handler(array($this, 'handleError'), $this->thrownErrors | $this->loggedErrors); + set_error_handler([$this, 'handleError'], $this->thrownErrors | $this->loggedErrors); } else { - set_error_handler(array($this, 'handleError')); + set_error_handler([$this, 'handleError']); } } } @@ -397,10 +397,10 @@ class ErrorHandler $scope = $this->scopedErrors & $type; if (4 < $numArgs = \func_num_args()) { - $context = $scope ? (func_get_arg(4) ?: array()) : array(); + $context = $scope ? (func_get_arg(4) ?: []) : []; $backtrace = 5 < $numArgs ? func_get_arg(5) : null; // defined on HHVM } else { - $context = array(); + $context = []; $backtrace = null; } @@ -426,19 +426,19 @@ class ErrorHandler self::$toStringException = null; } elseif (!$throw && !($type & $level)) { if (!isset(self::$silencedErrorCache[$id = $file.':'.$line])) { - $lightTrace = $this->tracedErrors & $type ? $this->cleanTrace(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3), $type, $file, $line, false) : array(); + $lightTrace = $this->tracedErrors & $type ? $this->cleanTrace(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3), $type, $file, $line, false) : []; $errorAsException = new SilencedErrorContext($type, $file, $line, $lightTrace); } elseif (isset(self::$silencedErrorCache[$id][$message])) { $lightTrace = null; $errorAsException = self::$silencedErrorCache[$id][$message]; ++$errorAsException->count; } else { - $lightTrace = array(); + $lightTrace = []; $errorAsException = null; } if (100 < ++self::$silencedErrorCount) { - self::$silencedErrorCache = $lightTrace = array(); + self::$silencedErrorCache = $lightTrace = []; self::$silencedErrorCount = 1; } if ($errorAsException) { @@ -460,7 +460,7 @@ class ErrorHandler $lightTrace = $this->cleanTrace($backtrace, $type, $file, $line, $throw); $this->traceReflector->setValue($errorAsException, $lightTrace); } else { - $this->traceReflector->setValue($errorAsException, array()); + $this->traceReflector->setValue($errorAsException, []); } } @@ -510,19 +510,28 @@ class ErrorHandler if ($this->isRecursive) { $log = 0; } elseif (self::$stackedErrorLevels) { - self::$stackedErrors[] = array( + self::$stackedErrors[] = [ $this->loggers[$type][0], ($type & $level) ? $this->loggers[$type][1] : LogLevel::DEBUG, $logMessage, - $errorAsException ? array('exception' => $errorAsException) : array(), - ); + $errorAsException ? ['exception' => $errorAsException] : [], + ]; } else { + if (!\defined('HHVM_VERSION')) { + $currentErrorHandler = set_error_handler('var_dump'); + restore_error_handler(); + } + try { $this->isRecursive = true; $level = ($type & $level) ? $this->loggers[$type][1] : LogLevel::DEBUG; - $this->loggers[$type][0]->log($level, $logMessage, $errorAsException ? array('exception' => $errorAsException) : array()); + $this->loggers[$type][0]->log($level, $logMessage, $errorAsException ? ['exception' => $errorAsException] : []); } finally { $this->isRecursive = false; + + if (!\defined('HHVM_VERSION')) { + set_error_handler($currentErrorHandler); + } } } @@ -551,12 +560,12 @@ class ErrorHandler if (($this->loggedErrors & $type) || $exception instanceof FatalThrowableError) { if ($exception instanceof FatalErrorException) { if ($exception instanceof FatalThrowableError) { - $error = array( + $error = [ 'type' => $type, 'message' => $message = $exception->getMessage(), 'file' => $exception->getFile(), 'line' => $exception->getLine(), - ); + ]; } else { $message = 'Fatal '.$exception->getMessage(); } @@ -568,7 +577,7 @@ class ErrorHandler } if ($this->loggedErrors & $type) { try { - $this->loggers[$type][0]->log($this->loggers[$type][1], $message, array('exception' => $exception)); + $this->loggers[$type][0]->log($this->loggers[$type][1], $message, ['exception' => $exception]); } catch (\Exception $handlerException) { } catch (\Throwable $handlerException) { } @@ -612,7 +621,7 @@ class ErrorHandler } $handler = self::$reservedMemory = null; - $handlers = array(); + $handlers = []; $previousHandler = null; $sameHandlerLimit = 10; @@ -643,7 +652,7 @@ class ErrorHandler $handler[0]->setExceptionHandler($h); } $handler = $handler[0]; - $handlers = array(); + $handlers = []; if ($exit = null === $error) { $error = error_get_last(); @@ -727,7 +736,7 @@ class ErrorHandler if (empty(self::$stackedErrorLevels)) { $errors = self::$stackedErrors; - self::$stackedErrors = array(); + self::$stackedErrors = []; foreach ($errors as $error) { $error[0]->log($error[1], $error[2], $error[3]); @@ -744,11 +753,11 @@ class ErrorHandler */ protected function getFatalErrorHandlers() { - return array( + return [ new UndefinedFunctionFatalErrorHandler(), new UndefinedMethodFatalErrorHandler(), new ClassNotFoundFatalErrorHandler(), - ); + ]; } private function cleanTrace($backtrace, $type, $file, $line, $throw) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/ContextErrorException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/ContextErrorException.php index 554139da..930f3777 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/ContextErrorException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/ContextErrorException.php @@ -20,9 +20,9 @@ namespace Symfony\Component\Debug\Exception; */ class ContextErrorException extends \ErrorException { - private $context = array(); + private $context = []; - public function __construct($message, $code, $severity, $filename, $lineno, $context = array()) + public function __construct($message, $code, $severity, $filename, $lineno, $context = []) { parent::__construct($message, $code, $severity, $filename, $lineno); $this->context = $context; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FatalErrorException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FatalErrorException.php index 8d996a42..0f70ef92 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FatalErrorException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FatalErrorException.php @@ -66,7 +66,7 @@ class FatalErrorException extends \ErrorException array_splice($trace, 0, $traceOffset); } } else { - $trace = array(); + $trace = []; } $this->setTrace($trace); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FlattenException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FlattenException.php index f76cf23f..9514bdc5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FlattenException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FlattenException.php @@ -33,7 +33,7 @@ class FlattenException private $file; private $line; - public static function create(\Exception $exception, $statusCode = null, array $headers = array()) + public static function create(\Exception $exception, $statusCode = null, array $headers = []) { $e = new static(); $e->setMessage($exception->getMessage()); @@ -70,13 +70,13 @@ class FlattenException public function toArray() { - $exceptions = array(); - foreach (array_merge(array($this), $this->getAllPrevious()) as $exception) { - $exceptions[] = array( + $exceptions = []; + foreach (array_merge([$this], $this->getAllPrevious()) as $exception) { + $exceptions[] = [ 'message' => $exception->getMessage(), 'class' => $exception->getClass(), 'trace' => $exception->getTrace(), - ); + ]; } return $exceptions; @@ -164,7 +164,7 @@ class FlattenException public function getAllPrevious() { - $exceptions = array(); + $exceptions = []; $e = $this; while ($e = $e->getPrevious()) { $exceptions[] = $e; @@ -185,8 +185,8 @@ class FlattenException public function setTrace($trace, $file, $line) { - $this->trace = array(); - $this->trace[] = array( + $this->trace = []; + $this->trace[] = [ 'namespace' => '', 'short_class' => '', 'class' => '', @@ -194,8 +194,8 @@ class FlattenException 'function' => '', 'file' => $file, 'line' => $line, - 'args' => array(), - ); + 'args' => [], + ]; foreach ($trace as $entry) { $class = ''; $namespace = ''; @@ -205,7 +205,7 @@ class FlattenException $namespace = implode('\\', $parts); } - $this->trace[] = array( + $this->trace[] = [ 'namespace' => $namespace, 'short_class' => $class, 'class' => isset($entry['class']) ? $entry['class'] : '', @@ -213,41 +213,41 @@ class FlattenException 'function' => isset($entry['function']) ? $entry['function'] : null, 'file' => isset($entry['file']) ? $entry['file'] : null, 'line' => isset($entry['line']) ? $entry['line'] : null, - 'args' => isset($entry['args']) ? $this->flattenArgs($entry['args']) : array(), - ); + 'args' => isset($entry['args']) ? $this->flattenArgs($entry['args']) : [], + ]; } } private function flattenArgs($args, $level = 0, &$count = 0) { - $result = array(); + $result = []; foreach ($args as $key => $value) { if (++$count > 1e4) { - return array('array', '*SKIPPED over 10000 entries*'); + return ['array', '*SKIPPED over 10000 entries*']; } if ($value instanceof \__PHP_Incomplete_Class) { // is_object() returns false on PHP<=7.1 - $result[$key] = array('incomplete-object', $this->getClassNameFromIncomplete($value)); + $result[$key] = ['incomplete-object', $this->getClassNameFromIncomplete($value)]; } elseif (\is_object($value)) { - $result[$key] = array('object', \get_class($value)); + $result[$key] = ['object', \get_class($value)]; } elseif (\is_array($value)) { if ($level > 10) { - $result[$key] = array('array', '*DEEP NESTED ARRAY*'); + $result[$key] = ['array', '*DEEP NESTED ARRAY*']; } else { - $result[$key] = array('array', $this->flattenArgs($value, $level + 1, $count)); + $result[$key] = ['array', $this->flattenArgs($value, $level + 1, $count)]; } } elseif (null === $value) { - $result[$key] = array('null', null); + $result[$key] = ['null', null]; } elseif (\is_bool($value)) { - $result[$key] = array('boolean', $value); + $result[$key] = ['boolean', $value]; } elseif (\is_int($value)) { - $result[$key] = array('integer', $value); + $result[$key] = ['integer', $value]; } elseif (\is_float($value)) { - $result[$key] = array('float', $value); + $result[$key] = ['float', $value]; } elseif (\is_resource($value)) { - $result[$key] = array('resource', get_resource_type($value)); + $result[$key] = ['resource', get_resource_type($value)]; } else { - $result[$key] = array('string', (string) $value); + $result[$key] = ['string', (string) $value]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/SilencedErrorContext.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/SilencedErrorContext.php index 4be83491..f862b74f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/SilencedErrorContext.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/SilencedErrorContext.php @@ -25,7 +25,7 @@ class SilencedErrorContext implements \JsonSerializable private $line; private $trace; - public function __construct($severity, $file, $line, array $trace = array(), $count = 1) + public function __construct($severity, $file, $line, array $trace = [], $count = 1) { $this->severity = $severity; $this->file = $file; @@ -56,12 +56,12 @@ class SilencedErrorContext implements \JsonSerializable public function JsonSerialize() { - return array( + return [ 'severity' => $this->severity, 'file' => $this->file, 'line' => $this->line, 'trace' => $this->trace, 'count' => $this->count, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/ExceptionHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/ExceptionHandler.php index f18ee2a9..2f3d5660 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/ExceptionHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/ExceptionHandler.php @@ -56,10 +56,10 @@ class ExceptionHandler { $handler = new static($debug, $charset, $fileLinkFormat); - $prev = set_exception_handler(array($handler, 'handle')); + $prev = set_exception_handler([$handler, 'handle']); if (\is_array($prev) && $prev[0] instanceof ErrorHandler) { restore_exception_handler(); - $prev[0]->setExceptionHandler(array($handler, 'handle')); + $prev[0]->setExceptionHandler([$handler, 'handle']); } return $handler; @@ -377,7 +377,7 @@ EOF; if (\is_string($fmt)) { $i = strpos($f = $fmt, '&', max(strrpos($f, '%f'), strrpos($f, '%l'))) ?: \strlen($f); - $fmt = array(substr($f, 0, $i)) + preg_split('/&([^>]++)>/', substr($f, $i), -1, PREG_SPLIT_DELIM_CAPTURE); + $fmt = [substr($f, 0, $i)] + preg_split('/&([^>]++)>/', substr($f, $i), -1, PREG_SPLIT_DELIM_CAPTURE); for ($i = 1; isset($fmt[$i]); ++$i) { if (0 === strpos($path, $k = $fmt[$i++])) { @@ -386,7 +386,7 @@ EOF; } } - $link = strtr($fmt[0], array('%f' => $path, '%l' => $line)); + $link = strtr($fmt[0], ['%f' => $path, '%l' => $line]); } else { $link = $fmt->format($path, $line); } @@ -403,7 +403,7 @@ EOF; */ private function formatArgs(array $args) { - $result = array(); + $result = []; foreach ($args as $key => $item) { if ('object' === $item[0]) { $formattedValue = sprintf('object(%s)', $this->formatClass($item[1])); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php index 2b59c146..1ac18ac8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php @@ -40,7 +40,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface return; } - foreach (array('class', 'interface', 'trait') as $typeName) { + foreach (['class', 'interface', 'trait'] as $typeName) { $prefix = ucfirst($typeName).' \''; $prefixLen = \strlen($prefix); if (0 !== strpos($error['message'], $prefix)) { @@ -86,11 +86,11 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface private function getClassCandidates($class) { if (!\is_array($functions = spl_autoload_functions())) { - return array(); + return []; } // find Symfony and Composer autoloaders - $classes = array(); + $classes = []; foreach ($functions as $function) { if (!\is_array($function)) { @@ -134,10 +134,10 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface private function findClassInPath($path, $class, $prefix) { if (!$path = realpath($path.'/'.strtr($prefix, '\\_', '//')) ?: realpath($path.'/'.\dirname(strtr($prefix, '\\_', '//'))) ?: realpath($path)) { - return array(); + return []; } - $classes = array(); + $classes = []; $filename = $class.'.php'; foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) { if ($filename == $file->getFileName() && $class = $this->convertFileToClass($path, $file->getPathName(), $prefix)) { @@ -157,9 +157,9 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface */ private function convertFileToClass($path, $file, $prefix) { - $candidates = array( + $candidates = [ // namespaced class - $namespacedClass = str_replace(array($path.\DIRECTORY_SEPARATOR, '.php', '/'), array('', '', '\\'), $file), + $namespacedClass = str_replace([$path.\DIRECTORY_SEPARATOR, '.php', '/'], ['', '', '\\'], $file), // namespaced class (with target dir) $prefix.$namespacedClass, // namespaced class (with target dir and separator) @@ -170,7 +170,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface str_replace('\\', '_', $prefix.$namespacedClass), // PEAR class (with target dir and separator) str_replace('\\', '_', $prefix.'\\'.$namespacedClass), - ); + ]; if ($prefix) { $candidates = array_filter($candidates, function ($candidate) use ($prefix) { return 0 === strpos($candidate, $prefix); }); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php index db241803..9eddeba5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php @@ -53,7 +53,7 @@ class UndefinedFunctionFatalErrorHandler implements FatalErrorHandlerInterface $message = sprintf('Attempted to call function "%s" from the global namespace.', $functionName); } - $candidates = array(); + $candidates = []; foreach (get_defined_functions() as $type => $definedFunctionNames) { foreach ($definedFunctionNames as $definedFunctionName) { if (false !== $namespaceSeparatorIndex = strrpos($definedFunctionName, '\\')) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php index 618a2c20..1318cb13 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php @@ -41,7 +41,7 @@ class UndefinedMethodFatalErrorHandler implements FatalErrorHandlerInterface return new UndefinedMethodException($message, $exception); } - $candidates = array(); + $candidates = []; foreach ($methods as $definedMethodName) { $lev = levenshtein($methodName, $definedMethodName); if ($lev <= \strlen($methodName) / 3 || false !== strpos($definedMethodName, $methodName)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/README.md b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/README.md index 25dccf07..2df00ecd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/README.md +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/README.md @@ -25,41 +25,41 @@ function symfony_zval_info($key, $array, $options = 0) return null; } - $info = array( + $info = [ 'type' => gettype($array[$key]), 'zval_hash' => /* hashed memory address of $array[$key] */, 'zval_refcount' => /* internal zval refcount of $array[$key] */, 'zval_isref' => /* is_ref status of $array[$key] */, - ); + ]; switch ($info['type']) { case 'object': - $info += array( + $info += [ 'object_class' => get_class($array[$key]), 'object_refcount' => /* internal object refcount of $array[$key] */, 'object_hash' => spl_object_hash($array[$key]), 'object_handle' => /* internal object handle $array[$key] */, - ); + ]; break; case 'resource': - $info += array( + $info += [ 'resource_handle' => (int) $array[$key], 'resource_type' => get_resource_type($array[$key]), 'resource_refcount' => /* internal resource refcount of $array[$key] */, - ); + ]; break; case 'array': - $info += array( + $info += [ 'array_count' => count($array[$key]), - ); + ]; break; case 'string': - $info += array( + $info += [ 'strlen' => strlen($array[$key]), - ); + ]; break; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/tests/001.phpt b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/tests/001.phpt index 4a87cd31..86a9427c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/tests/001.phpt +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/tests/001.phpt @@ -11,7 +11,7 @@ $int = 42; $float = 42.42; $str = 'foobar'; $object = new StdClass(); -$array = array('foo', 'bar'); +$array = ['foo', 'bar']; $resource = tmpfile(); $null = null; $bool = true; @@ -19,7 +19,7 @@ $bool = true; $anotherint = 42; $refcount2 = &$anotherint; -$var = array( +$var = [ 'int' => $int, 'float' => $float, 'str' => $str, @@ -29,7 +29,7 @@ $var = array( 'null' => $null, 'bool' => $bool, 'refcount' => &$refcount2, -); +]; var_dump(symfony_zval_info('int', $var)); var_dump(symfony_zval_info('float', $var)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php index e9ce535e..c6bc3f7d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php @@ -28,14 +28,14 @@ class DebugClassLoaderTest extends TestCase { $this->errorReporting = error_reporting(E_ALL); $this->loader = new ClassLoader(); - spl_autoload_register(array($this->loader, 'loadClass'), true, true); + spl_autoload_register([$this->loader, 'loadClass'], true, true); DebugClassLoader::enable(); } protected function tearDown() { DebugClassLoader::disable(); - spl_autoload_unregister(array($this->loader, 'loadClass')); + spl_autoload_unregister([$this->loader, 'loadClass']); error_reporting($this->errorReporting); } @@ -45,7 +45,7 @@ class DebugClassLoaderTest extends TestCase $functions = spl_autoload_functions(); foreach ($functions as $function) { - if (is_array($function) && $function[0] instanceof DebugClassLoader) { + if (\is_array($function) && $function[0] instanceof DebugClassLoader) { $reflClass = new \ReflectionClass($function[0]); $reflProp = $reflClass->getProperty('classLoader'); $reflProp->setAccessible(true); @@ -81,7 +81,7 @@ class DebugClassLoaderTest extends TestCase if (\PHP_VERSION_ID >= 70000) { $this->markTestSkipped('PHP7 throws exceptions, unsilencing is not required anymore.'); } - if (defined('HHVM_VERSION')) { + if (\defined('HHVM_VERSION')) { $this->markTestSkipped('HHVM is not handled in this test case.'); } @@ -106,7 +106,7 @@ class DebugClassLoaderTest extends TestCase if (class_exists('Symfony\Component\Debug\Exception\ContextErrorException', false)) { $this->markTestSkipped('The ContextErrorException class is already loaded.'); } - if (defined('HHVM_VERSION')) { + if (\defined('HHVM_VERSION')) { $this->markTestSkipped('HHVM is not handled in this test case.'); } @@ -192,7 +192,7 @@ class DebugClassLoaderTest extends TestCase { set_error_handler(function () { return false; }); $e = error_reporting(0); - trigger_error('', E_USER_DEPRECATED); + @trigger_error('', E_USER_DEPRECATED); class_exists('Test\\'.__NAMESPACE__.'\\'.$class, true); @@ -202,20 +202,20 @@ class DebugClassLoaderTest extends TestCase $lastError = error_get_last(); unset($lastError['file'], $lastError['line']); - $xError = array( + $xError = [ 'type' => E_USER_DEPRECATED, 'message' => 'The "Test\Symfony\Component\Debug\Tests\\'.$class.'" class '.$type.' "Symfony\Component\Debug\Tests\Fixtures\\'.$super.'" that is deprecated but this is a test deprecation notice.', - ); + ]; $this->assertSame($xError, $lastError); } public function provideDeprecatedSuper() { - return array( - array('DeprecatedInterfaceClass', 'DeprecatedInterface', 'implements'), - array('DeprecatedParentClass', 'DeprecatedClass', 'extends'), - ); + return [ + ['DeprecatedInterfaceClass', 'DeprecatedInterface', 'implements'], + ['DeprecatedParentClass', 'DeprecatedClass', 'extends'], + ]; } public function testInterfaceExtendsDeprecatedInterface() @@ -232,10 +232,10 @@ class DebugClassLoaderTest extends TestCase $lastError = error_get_last(); unset($lastError['file'], $lastError['line']); - $xError = array( + $xError = [ 'type' => E_USER_NOTICE, 'message' => '', - ); + ]; $this->assertSame($xError, $lastError); } @@ -254,10 +254,10 @@ class DebugClassLoaderTest extends TestCase $lastError = error_get_last(); unset($lastError['file'], $lastError['line']); - $xError = array( + $xError = [ 'type' => E_USER_NOTICE, 'message' => '', - ); + ]; $this->assertSame($xError, $lastError); } @@ -280,39 +280,46 @@ class DebugClassLoaderTest extends TestCase $lastError = error_get_last(); unset($lastError['file'], $lastError['line']); - $xError = array( + $xError = [ 'type' => E_USER_DEPRECATED, 'message' => 'The "Test\Symfony\Component\Debug\Tests\Float" class uses the reserved name "Float", it will break on PHP 7 and higher', - ); + ]; $this->assertSame($xError, $lastError); } public function testExtendedFinalClass() { - set_error_handler(function () { return false; }); - $e = error_reporting(0); - trigger_error('', E_USER_NOTICE); + $deprecations = []; + set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; }); + $e = error_reporting(E_USER_DEPRECATED); - class_exists('Test\\'.__NAMESPACE__.'\\ExtendsFinalClass', true); + require __DIR__.'/Fixtures/FinalClasses.php'; + + $i = 1; + while (class_exists($finalClass = __NAMESPACE__.'\\Fixtures\\FinalClass'.$i++, false)) { + spl_autoload_call($finalClass); + class_exists('Test\\'.__NAMESPACE__.'\\Extends'.substr($finalClass, strrpos($finalClass, '\\') + 1), true); + } error_reporting($e); restore_error_handler(); - $lastError = error_get_last(); - unset($lastError['file'], $lastError['line']); - - $xError = array( - 'type' => E_USER_DEPRECATED, - 'message' => 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass" class is considered final since version 3.3. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass".', - ); - - $this->assertSame($xError, $lastError); + $this->assertSame([ + 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass1" class is considered final since version 3.3. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass1".', + 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass2" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass2".', + 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass3" class is considered final comment with @@@ and ***. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass3".', + 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass4" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass4".', + 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass5" class is considered final multiline comment. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass5".', + 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass6" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass6".', + 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass7" class is considered final another multiline comment... It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass7".', + 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass8" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass8".', + ], $deprecations); } public function testExtendedFinalMethod() { - $deprecations = array(); + $deprecations = []; set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; }); $e = error_reporting(E_USER_DEPRECATED); @@ -321,10 +328,10 @@ class DebugClassLoaderTest extends TestCase error_reporting($e); restore_error_handler(); - $xError = array( + $xError = [ 'The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod()" method is considered final since version 3.3. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod".', 'The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod2()" method is considered final. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod".', - ); + ]; $this->assertSame($xError, $deprecations); } @@ -343,12 +350,12 @@ class DebugClassLoaderTest extends TestCase $lastError = error_get_last(); unset($lastError['file'], $lastError['line']); - $this->assertSame(array('type' => E_USER_NOTICE, 'message' => ''), $lastError); + $this->assertSame(['type' => E_USER_NOTICE, 'message' => ''], $lastError); } public function testInternalsUse() { - $deprecations = array(); + $deprecations = []; set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; }); $e = error_reporting(E_USER_DEPRECATED); @@ -357,17 +364,17 @@ class DebugClassLoaderTest extends TestCase error_reporting($e); restore_error_handler(); - $this->assertSame($deprecations, array( + $this->assertSame($deprecations, [ 'The "Symfony\Component\Debug\Tests\Fixtures\InternalInterface" interface is considered internal. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternalsParent".', 'The "Symfony\Component\Debug\Tests\Fixtures\InternalClass" class is considered internal since version 3.4. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternalsParent".', 'The "Symfony\Component\Debug\Tests\Fixtures\InternalTrait" trait is considered internal. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternals".', 'The "Symfony\Component\Debug\Tests\Fixtures\InternalClass::internalMethod()" method is considered internal since version 3.4. It may change without further notice. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsInternals".', - )); + ]); } public function testUseTraitWithInternalMethod() { - $deprecations = array(); + $deprecations = []; set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; }); $e = error_reporting(E_USER_DEPRECATED); @@ -376,7 +383,12 @@ class DebugClassLoaderTest extends TestCase error_reporting($e); restore_error_handler(); - $this->assertSame(array(), $deprecations); + $this->assertSame([], $deprecations); + } + + public function testEvaluatedCode() + { + $this->assertTrue(class_exists(__NAMESPACE__.'\Fixtures\DefinitionInEvaluatedCode', true)); } } @@ -388,12 +400,12 @@ class ClassLoader public function getClassMap() { - return array(__NAMESPACE__.'\Fixtures\NotPSR0bis' => __DIR__.'/Fixtures/notPsr0Bis.php'); + return [__NAMESPACE__.'\Fixtures\NotPSR0bis' => __DIR__.'/Fixtures/notPsr0Bis.php']; } public function findFile($class) { - $fixtureDir = __DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR; + $fixtureDir = __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR; if (__NAMESPACE__.'\TestingUnsilencing' === $class) { eval('-- parse error --'); @@ -402,7 +414,7 @@ class ClassLoader } elseif (__NAMESPACE__.'\TestingCaseMismatch' === $class) { eval('namespace '.__NAMESPACE__.'; class TestingCaseMisMatch {}'); } elseif (__NAMESPACE__.'\Fixtures\Psr4CaseMismatch' === $class) { - return $fixtureDir.'psr4'.DIRECTORY_SEPARATOR.'Psr4CaseMismatch.php'; + return $fixtureDir.'psr4'.\DIRECTORY_SEPARATOR.'Psr4CaseMismatch.php'; } elseif (__NAMESPACE__.'\Fixtures\NotPSR0' === $class) { return $fixtureDir.'reallyNotPsr0.php'; } elseif (__NAMESPACE__.'\Fixtures\NotPSR0bis' === $class) { @@ -417,8 +429,9 @@ class ClassLoader eval('namespace Test\\'.__NAMESPACE__.'; class NonDeprecatedInterfaceClass implements \\'.__NAMESPACE__.'\Fixtures\NonDeprecatedInterface {}'); } elseif ('Test\\'.__NAMESPACE__.'\Float' === $class) { eval('namespace Test\\'.__NAMESPACE__.'; class Float {}'); - } elseif ('Test\\'.__NAMESPACE__.'\ExtendsFinalClass' === $class) { - eval('namespace Test\\'.__NAMESPACE__.'; class ExtendsFinalClass extends \\'.__NAMESPACE__.'\Fixtures\FinalClass {}'); + } elseif (0 === strpos($class, 'Test\\'.__NAMESPACE__.'\ExtendsFinalClass')) { + $classShortName = substr($class, strrpos($class, '\\') + 1); + eval('namespace Test\\'.__NAMESPACE__.'; class '.$classShortName.' extends \\'.__NAMESPACE__.'\Fixtures\\'.substr($classShortName, 7).' {}'); } elseif ('Test\\'.__NAMESPACE__.'\ExtendsAnnotatedClass' === $class) { eval('namespace Test\\'.__NAMESPACE__.'; class ExtendsAnnotatedClass extends \\'.__NAMESPACE__.'\Fixtures\AnnotatedClass { public function deprecatedMethod() { } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php index a8d40e84..c1dea75b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php @@ -13,9 +13,12 @@ namespace Symfony\Component\Debug\Tests; use PHPUnit\Framework\TestCase; use Psr\Log\LogLevel; +use Psr\Log\NullLogger; use Symfony\Component\Debug\BufferingLogger; use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\Debug\Exception\SilencedErrorContext; +use Symfony\Component\Debug\Tests\Fixtures\ErrorHandlerThatUsesThePreviousOne; +use Symfony\Component\Debug\Tests\Fixtures\LoggerThatSetAnErrorHandler; /** * ErrorHandlerTest. @@ -38,13 +41,13 @@ class ErrorHandlerTest extends TestCase $this->assertSame($handler, ErrorHandler::register($newHandler, false)); $h = set_error_handler('var_dump'); restore_error_handler(); - $this->assertSame(array($handler, 'handleError'), $h); + $this->assertSame([$handler, 'handleError'], $h); try { $this->assertSame($newHandler, ErrorHandler::register($newHandler, true)); $h = set_error_handler('var_dump'); restore_error_handler(); - $this->assertSame(array($newHandler, 'handleError'), $h); + $this->assertSame([$newHandler, 'handleError'], $h); } catch (\Exception $e) { } @@ -74,12 +77,12 @@ class ErrorHandlerTest extends TestCase try { @trigger_error('Hello', E_USER_WARNING); - $expected = array( + $expected = [ 'type' => E_USER_WARNING, 'message' => 'Hello', 'file' => __FILE__, 'line' => __LINE__ - 5, - ); + ]; $this->assertSame($expected, error_get_last()); } catch (\Exception $e) { restore_error_handler(); @@ -145,26 +148,26 @@ class ErrorHandlerTest extends TestCase $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); $handler->setDefaultLogger($logger, E_NOTICE); - $handler->setDefaultLogger($logger, array(E_USER_NOTICE => LogLevel::CRITICAL)); + $handler->setDefaultLogger($logger, [E_USER_NOTICE => LogLevel::CRITICAL]); - $loggers = array( - E_DEPRECATED => array(null, LogLevel::INFO), - E_USER_DEPRECATED => array(null, LogLevel::INFO), - E_NOTICE => array($logger, LogLevel::WARNING), - E_USER_NOTICE => array($logger, LogLevel::CRITICAL), - E_STRICT => array(null, LogLevel::WARNING), - E_WARNING => array(null, LogLevel::WARNING), - E_USER_WARNING => array(null, LogLevel::WARNING), - E_COMPILE_WARNING => array(null, LogLevel::WARNING), - E_CORE_WARNING => array(null, LogLevel::WARNING), - E_USER_ERROR => array(null, LogLevel::CRITICAL), - E_RECOVERABLE_ERROR => array(null, LogLevel::CRITICAL), - E_COMPILE_ERROR => array(null, LogLevel::CRITICAL), - E_PARSE => array(null, LogLevel::CRITICAL), - E_ERROR => array(null, LogLevel::CRITICAL), - E_CORE_ERROR => array(null, LogLevel::CRITICAL), - ); - $this->assertSame($loggers, $handler->setLoggers(array())); + $loggers = [ + E_DEPRECATED => [null, LogLevel::INFO], + E_USER_DEPRECATED => [null, LogLevel::INFO], + E_NOTICE => [$logger, LogLevel::WARNING], + E_USER_NOTICE => [$logger, LogLevel::CRITICAL], + E_STRICT => [null, LogLevel::WARNING], + E_WARNING => [null, LogLevel::WARNING], + E_USER_WARNING => [null, LogLevel::WARNING], + E_COMPILE_WARNING => [null, LogLevel::WARNING], + E_CORE_WARNING => [null, LogLevel::WARNING], + E_USER_ERROR => [null, LogLevel::CRITICAL], + E_RECOVERABLE_ERROR => [null, LogLevel::CRITICAL], + E_COMPILE_ERROR => [null, LogLevel::CRITICAL], + E_PARSE => [null, LogLevel::CRITICAL], + E_ERROR => [null, LogLevel::CRITICAL], + E_CORE_ERROR => [null, LogLevel::CRITICAL], + ]; + $this->assertSame($loggers, $handler->setLoggers([])); } finally { restore_error_handler(); restore_exception_handler(); @@ -176,14 +179,14 @@ class ErrorHandlerTest extends TestCase try { $handler = ErrorHandler::register(); $handler->throwAt(0, true); - $this->assertFalse($handler->handleError(0, 'foo', 'foo.php', 12, array())); + $this->assertFalse($handler->handleError(0, 'foo', 'foo.php', 12, [])); restore_error_handler(); restore_exception_handler(); $handler = ErrorHandler::register(); $handler->throwAt(3, true); - $this->assertFalse($handler->handleError(4, 'foo', 'foo.php', 12, array())); + $this->assertFalse($handler->handleError(4, 'foo', 'foo.php', 12, [])); restore_error_handler(); restore_exception_handler(); @@ -191,7 +194,7 @@ class ErrorHandlerTest extends TestCase $handler = ErrorHandler::register(); $handler->throwAt(3, true); try { - $handler->handleError(4, 'foo', 'foo.php', 12, array()); + $handler->handleError(4, 'foo', 'foo.php', 12, []); } catch (\ErrorException $e) { $this->assertSame('Parse Error: foo', $e->getMessage()); $this->assertSame(4, $e->getSeverity()); @@ -204,14 +207,14 @@ class ErrorHandlerTest extends TestCase $handler = ErrorHandler::register(); $handler->throwAt(E_USER_DEPRECATED, true); - $this->assertFalse($handler->handleError(E_USER_DEPRECATED, 'foo', 'foo.php', 12, array())); + $this->assertFalse($handler->handleError(E_USER_DEPRECATED, 'foo', 'foo.php', 12, [])); restore_error_handler(); restore_exception_handler(); $handler = ErrorHandler::register(); $handler->throwAt(E_DEPRECATED, true); - $this->assertFalse($handler->handleError(E_DEPRECATED, 'foo', 'foo.php', 12, array())); + $this->assertFalse($handler->handleError(E_DEPRECATED, 'foo', 'foo.php', 12, [])); restore_error_handler(); restore_exception_handler(); @@ -236,7 +239,7 @@ class ErrorHandlerTest extends TestCase $handler = ErrorHandler::register(); $handler->setDefaultLogger($logger, E_USER_DEPRECATED); - $this->assertTrue($handler->handleError(E_USER_DEPRECATED, 'foo', 'foo.php', 12, array())); + $this->assertTrue($handler->handleError(E_USER_DEPRECATED, 'foo', 'foo.php', 12, [])); restore_error_handler(); restore_exception_handler(); @@ -320,7 +323,9 @@ class ErrorHandlerTest extends TestCase $handler = new ErrorHandler(); $handler->setDefaultLogger($logger); - @$handler->handleError(E_USER_DEPRECATED, 'Foo deprecation', __FILE__, __LINE__, array()); + @$handler->handleError(E_USER_DEPRECATED, 'Foo deprecation', __FILE__, __LINE__, []); + + restore_error_handler(); } /** @@ -382,12 +387,12 @@ class ErrorHandlerTest extends TestCase ->expects($this->exactly(2)) ->method('log') ->withConsecutive( - array($this->equalTo(LogLevel::WARNING), $this->equalTo('Dummy log')), - array($this->equalTo(LogLevel::DEBUG), $this->equalTo('User Warning: Silenced warning')) + [$this->equalTo(LogLevel::WARNING), $this->equalTo('Dummy log')], + [$this->equalTo(LogLevel::DEBUG), $this->equalTo('User Warning: Silenced warning')] ) ; - $handler->setDefaultLogger($logger, array(E_USER_WARNING => LogLevel::WARNING)); + $handler->setDefaultLogger($logger, [E_USER_WARNING => LogLevel::WARNING]); ErrorHandler::stackErrors(); @trigger_error('Silenced warning', E_USER_WARNING); @@ -404,27 +409,27 @@ class ErrorHandlerTest extends TestCase $bootLogger = new BufferingLogger(); $handler = new ErrorHandler($bootLogger); - $loggers = array( - E_DEPRECATED => array($bootLogger, LogLevel::INFO), - E_USER_DEPRECATED => array($bootLogger, LogLevel::INFO), - E_NOTICE => array($bootLogger, LogLevel::WARNING), - E_USER_NOTICE => array($bootLogger, LogLevel::WARNING), - E_STRICT => array($bootLogger, LogLevel::WARNING), - E_WARNING => array($bootLogger, LogLevel::WARNING), - E_USER_WARNING => array($bootLogger, LogLevel::WARNING), - E_COMPILE_WARNING => array($bootLogger, LogLevel::WARNING), - E_CORE_WARNING => array($bootLogger, LogLevel::WARNING), - E_USER_ERROR => array($bootLogger, LogLevel::CRITICAL), - E_RECOVERABLE_ERROR => array($bootLogger, LogLevel::CRITICAL), - E_COMPILE_ERROR => array($bootLogger, LogLevel::CRITICAL), - E_PARSE => array($bootLogger, LogLevel::CRITICAL), - E_ERROR => array($bootLogger, LogLevel::CRITICAL), - E_CORE_ERROR => array($bootLogger, LogLevel::CRITICAL), - ); + $loggers = [ + E_DEPRECATED => [$bootLogger, LogLevel::INFO], + E_USER_DEPRECATED => [$bootLogger, LogLevel::INFO], + E_NOTICE => [$bootLogger, LogLevel::WARNING], + E_USER_NOTICE => [$bootLogger, LogLevel::WARNING], + E_STRICT => [$bootLogger, LogLevel::WARNING], + E_WARNING => [$bootLogger, LogLevel::WARNING], + E_USER_WARNING => [$bootLogger, LogLevel::WARNING], + E_COMPILE_WARNING => [$bootLogger, LogLevel::WARNING], + E_CORE_WARNING => [$bootLogger, LogLevel::WARNING], + E_USER_ERROR => [$bootLogger, LogLevel::CRITICAL], + E_RECOVERABLE_ERROR => [$bootLogger, LogLevel::CRITICAL], + E_COMPILE_ERROR => [$bootLogger, LogLevel::CRITICAL], + E_PARSE => [$bootLogger, LogLevel::CRITICAL], + E_ERROR => [$bootLogger, LogLevel::CRITICAL], + E_CORE_ERROR => [$bootLogger, LogLevel::CRITICAL], + ]; - $this->assertSame($loggers, $handler->setLoggers(array())); + $this->assertSame($loggers, $handler->setLoggers([])); - $handler->handleError(E_DEPRECATED, 'Foo message', __FILE__, 123, array()); + $handler->handleError(E_DEPRECATED, 'Foo message', __FILE__, 123, []); $logs = $bootLogger->cleanLogs(); @@ -440,14 +445,14 @@ class ErrorHandlerTest extends TestCase $this->assertSame(123, $exception->getLine()); $this->assertSame(E_DEPRECATED, $exception->getSeverity()); - $bootLogger->log(LogLevel::WARNING, 'Foo message', array('exception' => $exception)); + $bootLogger->log(LogLevel::WARNING, 'Foo message', ['exception' => $exception]); $mockLogger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); $mockLogger->expects($this->once()) ->method('log') - ->with(LogLevel::WARNING, 'Foo message', array('exception' => $exception)); + ->with(LogLevel::WARNING, 'Foo message', ['exception' => $exception]); - $handler->setLoggers(array(E_DEPRECATED => array($mockLogger, LogLevel::WARNING))); + $handler->setLoggers([E_DEPRECATED => [$mockLogger, LogLevel::WARNING]]); } /** @@ -463,7 +468,7 @@ class ErrorHandlerTest extends TestCase $mockLogger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); $mockLogger->expects($this->once()) ->method('log') - ->with(LogLevel::CRITICAL, 'Uncaught Exception: Foo message', array('exception' => $exception)); + ->with(LogLevel::CRITICAL, 'Uncaught Exception: Foo message', ['exception' => $exception]); $handler->setExceptionHandler(function () use ($handler, $mockLogger) { $handler->setDefaultLogger($mockLogger); @@ -480,12 +485,12 @@ class ErrorHandlerTest extends TestCase try { $handler = ErrorHandler::register(); - $error = array( + $error = [ 'type' => E_PARSE, 'message' => 'foo', 'file' => 'bar', 'line' => 123, - ); + ]; $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); @@ -553,16 +558,16 @@ class ErrorHandlerTest extends TestCase $handler->setDefaultLogger($logger, E_ERROR); - $error = array( + $error = [ 'type' => E_ERROR + 0x1000000, // This error level is used by HHVM for fatal errors 'message' => 'foo', 'file' => 'bar', 'line' => 123, - 'context' => array(123), - 'backtrace' => array(456), - ); + 'context' => [123], + 'backtrace' => [456], + ]; - \call_user_func_array(array($handler, 'handleError'), $error); + \call_user_func_array([$handler, 'handleError'], $error); $handler->handleFatalError($error); } finally { restore_error_handler(); @@ -583,4 +588,58 @@ class ErrorHandlerTest extends TestCase $handler->handleException(new \Exception()); } + + /** + * @dataProvider errorHandlerWhenLoggingProvider + */ + public function testErrorHandlerWhenLogging($previousHandlerWasDefined, $loggerSetsAnotherHandler, $nextHandlerIsDefined) + { + try { + if ($previousHandlerWasDefined) { + set_error_handler('count'); + } + + $logger = $loggerSetsAnotherHandler ? new LoggerThatSetAnErrorHandler() : new NullLogger(); + + $handler = ErrorHandler::register(); + $handler->setDefaultLogger($logger); + + if ($nextHandlerIsDefined) { + $handler = ErrorHandlerThatUsesThePreviousOne::register(); + } + + @trigger_error('foo', E_USER_DEPRECATED); + @trigger_error('bar', E_USER_DEPRECATED); + + $this->assertSame([$handler, 'handleError'], set_error_handler('var_dump')); + + if ($logger instanceof LoggerThatSetAnErrorHandler) { + $this->assertCount(2, $logger->cleanLogs()); + } + + restore_error_handler(); + + if ($previousHandlerWasDefined) { + restore_error_handler(); + } + + if ($nextHandlerIsDefined) { + restore_error_handler(); + } + } finally { + restore_error_handler(); + restore_exception_handler(); + } + } + + public function errorHandlerWhenLoggingProvider() + { + foreach ([false, true] as $previousHandlerWasDefined) { + foreach ([false, true] as $loggerSetsAnotherHandler) { + foreach ([false, true] as $nextHandlerIsDefined) { + yield [$previousHandlerWasDefined, $loggerSetsAnotherHandler, $nextHandlerIsDefined]; + } + } + } + } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php index ce9f3555..f755a78c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php @@ -54,7 +54,7 @@ class FlattenExceptionTest extends TestCase $flattened = FlattenException::create(new ConflictHttpException()); $this->assertEquals('409', $flattened->getStatusCode()); - $flattened = FlattenException::create(new MethodNotAllowedHttpException(array('POST'))); + $flattened = FlattenException::create(new MethodNotAllowedHttpException(['POST'])); $this->assertEquals('405', $flattened->getStatusCode()); $flattened = FlattenException::create(new AccessDeniedHttpException()); @@ -89,23 +89,23 @@ class FlattenExceptionTest extends TestCase public function testHeadersForHttpException() { - $flattened = FlattenException::create(new MethodNotAllowedHttpException(array('POST'))); - $this->assertEquals(array('Allow' => 'POST'), $flattened->getHeaders()); + $flattened = FlattenException::create(new MethodNotAllowedHttpException(['POST'])); + $this->assertEquals(['Allow' => 'POST'], $flattened->getHeaders()); $flattened = FlattenException::create(new UnauthorizedHttpException('Basic realm="My Realm"')); - $this->assertEquals(array('WWW-Authenticate' => 'Basic realm="My Realm"'), $flattened->getHeaders()); + $this->assertEquals(['WWW-Authenticate' => 'Basic realm="My Realm"'], $flattened->getHeaders()); $flattened = FlattenException::create(new ServiceUnavailableHttpException('Fri, 31 Dec 1999 23:59:59 GMT')); - $this->assertEquals(array('Retry-After' => 'Fri, 31 Dec 1999 23:59:59 GMT'), $flattened->getHeaders()); + $this->assertEquals(['Retry-After' => 'Fri, 31 Dec 1999 23:59:59 GMT'], $flattened->getHeaders()); $flattened = FlattenException::create(new ServiceUnavailableHttpException(120)); - $this->assertEquals(array('Retry-After' => 120), $flattened->getHeaders()); + $this->assertEquals(['Retry-After' => 120], $flattened->getHeaders()); $flattened = FlattenException::create(new TooManyRequestsHttpException('Fri, 31 Dec 1999 23:59:59 GMT')); - $this->assertEquals(array('Retry-After' => 'Fri, 31 Dec 1999 23:59:59 GMT'), $flattened->getHeaders()); + $this->assertEquals(['Retry-After' => 'Fri, 31 Dec 1999 23:59:59 GMT'], $flattened->getHeaders()); $flattened = FlattenException::create(new TooManyRequestsHttpException(120)); - $this->assertEquals(array('Retry-After' => 120), $flattened->getHeaders()); + $this->assertEquals(['Retry-After' => 120], $flattened->getHeaders()); } /** @@ -135,7 +135,7 @@ class FlattenExceptionTest extends TestCase $this->assertSame($flattened2, $flattened->getPrevious()); - $this->assertSame(array($flattened2), $flattened->getAllPrevious()); + $this->assertSame([$flattened2], $flattened->getAllPrevious()); } /** @@ -176,25 +176,25 @@ class FlattenExceptionTest extends TestCase public function testToArray(\Exception $exception) { $flattened = FlattenException::create($exception); - $flattened->setTrace(array(), 'foo.php', 123); + $flattened->setTrace([], 'foo.php', 123); - $this->assertEquals(array( - array( + $this->assertEquals([ + [ 'message' => 'test', 'class' => 'Exception', - 'trace' => array(array( + 'trace' => [[ 'namespace' => '', 'short_class' => '', 'class' => '', 'type' => '', 'function' => '', 'file' => 'foo.php', 'line' => 123, - 'args' => array(), - )), - ), - ), $flattened->toArray()); + 'args' => [], + ]], + ], + ], $flattened->toArray()); } public function flattenDataProvider() { - return array( - array(new \Exception('test', 123)), - ); + return [ + [new \Exception('test', 123)], + ]; } public function testArguments() @@ -204,15 +204,15 @@ class FlattenExceptionTest extends TestCase $incomplete = unserialize('O:14:"BogusTestClass":0:{}'); - $exception = $this->createException(array( - (object) array('foo' => 1), + $exception = $this->createException([ + (object) ['foo' => 1], new NotFoundHttpException(), $incomplete, $dh, $fh, function () {}, - array(1, 2), - array('foo' => 123), + [1, 2], + ['foo' => 123], null, true, false, @@ -222,7 +222,7 @@ class FlattenExceptionTest extends TestCase '', INF, NAN, - )); + ]); $flattened = FlattenException::create($exception); $trace = $flattened->getTrace(); @@ -233,26 +233,26 @@ class FlattenExceptionTest extends TestCase fclose($fh); $i = 0; - $this->assertSame(array('object', 'stdClass'), $array[$i++]); - $this->assertSame(array('object', 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException'), $array[$i++]); - $this->assertSame(array('incomplete-object', 'BogusTestClass'), $array[$i++]); - $this->assertSame(array('resource', \defined('HHVM_VERSION') ? 'Directory' : 'stream'), $array[$i++]); - $this->assertSame(array('resource', 'stream'), $array[$i++]); + $this->assertSame(['object', 'stdClass'], $array[$i++]); + $this->assertSame(['object', 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException'], $array[$i++]); + $this->assertSame(['incomplete-object', 'BogusTestClass'], $array[$i++]); + $this->assertSame(['resource', \defined('HHVM_VERSION') ? 'Directory' : 'stream'], $array[$i++]); + $this->assertSame(['resource', 'stream'], $array[$i++]); $args = $array[$i++]; $this->assertSame($args[0], 'object'); $this->assertTrue('Closure' === $args[1] || is_subclass_of($args[1], '\Closure'), 'Expect object class name to be Closure or a subclass of Closure.'); - $this->assertSame(array('array', array(array('integer', 1), array('integer', 2))), $array[$i++]); - $this->assertSame(array('array', array('foo' => array('integer', 123))), $array[$i++]); - $this->assertSame(array('null', null), $array[$i++]); - $this->assertSame(array('boolean', true), $array[$i++]); - $this->assertSame(array('boolean', false), $array[$i++]); - $this->assertSame(array('integer', 0), $array[$i++]); - $this->assertSame(array('float', 0.0), $array[$i++]); - $this->assertSame(array('string', '0'), $array[$i++]); - $this->assertSame(array('string', ''), $array[$i++]); - $this->assertSame(array('float', INF), $array[$i++]); + $this->assertSame(['array', [['integer', 1], ['integer', 2]]], $array[$i++]); + $this->assertSame(['array', ['foo' => ['integer', 123]]], $array[$i++]); + $this->assertSame(['null', null], $array[$i++]); + $this->assertSame(['boolean', true], $array[$i++]); + $this->assertSame(['boolean', false], $array[$i++]); + $this->assertSame(['integer', 0], $array[$i++]); + $this->assertSame(['float', 0.0], $array[$i++]); + $this->assertSame(['string', '0'], $array[$i++]); + $this->assertSame(['string', ''], $array[$i++]); + $this->assertSame(['float', INF], $array[$i++]); // assertEquals() does not like NAN values. $this->assertEquals($array[$i][0], 'float'); @@ -262,7 +262,7 @@ class FlattenExceptionTest extends TestCase public function testRecursionInArguments() { $a = null; - $a = array('foo', array(2, &$a)); + $a = ['foo', [2, &$a]]; $exception = $this->createException($a); $flattened = FlattenException::create($exception); @@ -272,7 +272,7 @@ class FlattenExceptionTest extends TestCase public function testTooBigArray() { - $a = array(); + $a = []; for ($i = 0; $i < 20; ++$i) { for ($j = 0; $j < 50; ++$j) { for ($k = 0; $k < 10; ++$k) { @@ -287,7 +287,7 @@ class FlattenExceptionTest extends TestCase $flattened = FlattenException::create($exception); $trace = $flattened->getTrace(); - $this->assertSame($trace[1]['args'][0], array('array', array('array', '*SKIPPED over 10000 entries*'))); + $this->assertSame($trace[1]['args'][0], ['array', ['array', '*SKIPPED over 10000 entries*']]); $serializeTrace = serialize($trace); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php index 6ff6a74f..e166136c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php @@ -62,10 +62,10 @@ class ExceptionHandlerTest extends TestCase $this->assertContains('Sorry, the page you are looking for could not be found.', $response); - $expectedHeaders = array( - array('HTTP/1.0 404', true, null), - array('Content-Type: text/html; charset=iso8859-1', true, null), - ); + $expectedHeaders = [ + ['HTTP/1.0 404', true, null], + ['Content-Type: text/html; charset=iso8859-1', true, null], + ]; $this->assertSame($expectedHeaders, testHeader()); } @@ -75,14 +75,14 @@ class ExceptionHandlerTest extends TestCase $handler = new ExceptionHandler(false, 'iso8859-1'); ob_start(); - $handler->sendPhpResponse(new MethodNotAllowedHttpException(array('POST'))); + $handler->sendPhpResponse(new MethodNotAllowedHttpException(['POST'])); $response = ob_get_clean(); - $expectedHeaders = array( - array('HTTP/1.0 405', true, null), - array('Allow: POST', false, null), - array('Content-Type: text/html; charset=iso8859-1', true, null), - ); + $expectedHeaders = [ + ['HTTP/1.0 405', true, null], + ['Allow: POST', false, null], + ['Content-Type: text/html; charset=iso8859-1', true, null], + ]; $this->assertSame($expectedHeaders, testHeader()); } @@ -101,7 +101,7 @@ class ExceptionHandlerTest extends TestCase { $exception = new \Exception('foo'); - $handler = $this->getMockBuilder('Symfony\Component\Debug\ExceptionHandler')->setMethods(array('sendPhpResponse'))->getMock(); + $handler = $this->getMockBuilder('Symfony\Component\Debug\ExceptionHandler')->setMethods(['sendPhpResponse'])->getMock(); $handler ->expects($this->exactly(2)) ->method('sendPhpResponse'); @@ -119,7 +119,7 @@ class ExceptionHandlerTest extends TestCase { $exception = new OutOfMemoryException('foo', 0, E_ERROR, __FILE__, __LINE__); - $handler = $this->getMockBuilder('Symfony\Component\Debug\ExceptionHandler')->setMethods(array('sendPhpResponse'))->getMock(); + $handler = $this->getMockBuilder('Symfony\Component\Debug\ExceptionHandler')->setMethods(['sendPhpResponse'])->getMock(); $handler ->expects($this->once()) ->method('sendPhpResponse'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php index 5cdac2f1..8e615ac6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php @@ -72,85 +72,85 @@ class ClassNotFoundFatalErrorHandlerTest extends TestCase $autoloader = new ComposerClassLoader(); $autoloader->add('Symfony\Component\Debug\Exception\\', realpath(__DIR__.'/../../Exception')); - $debugClassLoader = new DebugClassLoader(array($autoloader, 'loadClass')); + $debugClassLoader = new DebugClassLoader([$autoloader, 'loadClass']); - return array( - array( - array( + return [ + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'WhizBangFactory\' not found', - ), + ], "Attempted to load class \"WhizBangFactory\" from the global namespace.\nDid you forget a \"use\" statement?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\WhizBangFactory\' not found', - ), + ], "Attempted to load class \"WhizBangFactory\" from namespace \"Foo\\Bar\".\nDid you forget a \"use\" statement for another namespace?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'UndefinedFunctionException\' not found', - ), + ], "Attempted to load class \"UndefinedFunctionException\" from the global namespace.\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'PEARClass\' not found', - ), + ], "Attempted to load class \"PEARClass\" from the global namespace.\nDid you forget a \"use\" statement for \"Symfony_Component_Debug_Tests_Fixtures_PEARClass\"?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', - ), + ], "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\Bar\".\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', - ), + ], "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\Bar\".\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", - array($autoloader, 'loadClass'), - ), - array( - array( + [$autoloader, 'loadClass'], + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', - ), + ], "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\Bar\".\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", - array($debugClassLoader, 'loadClass'), - ), - array( - array( + [$debugClassLoader, 'loadClass'], + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', - ), + ], "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\\Bar\".\nDid you forget a \"use\" statement for another namespace?", function ($className) { /* do nothing here */ }, - ), - ); + ], + ]; } public function testCannotRedeclareClass() @@ -161,12 +161,12 @@ class ClassNotFoundFatalErrorHandlerTest extends TestCase require_once __DIR__.'/../FIXTURES2/REQUIREDTWICE.PHP'; - $error = array( + $error = [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\RequiredTwice\' not found', - ); + ]; $handler = new ClassNotFoundFatalErrorHandler(); $exception = $handler->handleError($error, new FatalErrorException('', 0, $error['type'], $error['file'], $error['line'])); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php index 1dc21200..2de44a25 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php @@ -35,44 +35,44 @@ class UndefinedFunctionFatalErrorHandlerTest extends TestCase public function provideUndefinedFunctionData() { - return array( - array( - array( + return [ + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Call to undefined function test_namespaced_function()', - ), + ], "Attempted to call function \"test_namespaced_function\" from the global namespace.\nDid you mean to call \"\\symfony\\component\\debug\\tests\\fatalerrorhandler\\test_namespaced_function\"?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Call to undefined function Foo\\Bar\\Baz\\test_namespaced_function()', - ), + ], "Attempted to call function \"test_namespaced_function\" from namespace \"Foo\\Bar\\Baz\".\nDid you mean to call \"\\symfony\\component\\debug\\tests\\fatalerrorhandler\\test_namespaced_function\"?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Call to undefined function foo()', - ), + ], 'Attempted to call function "foo" from the global namespace.', - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Call to undefined function Foo\\Bar\\Baz\\foo()', - ), + ], 'Attempted to call function "foo" from namespace "Foo\Bar\Baz".', - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php index a2647f57..268a8413 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php @@ -34,43 +34,43 @@ class UndefinedMethodFatalErrorHandlerTest extends TestCase public function provideUndefinedMethodData() { - return array( - array( - array( + return [ + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Call to undefined method SplObjectStorage::what()', - ), + ], 'Attempted to call an undefined method named "what" of class "SplObjectStorage".', - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Call to undefined method SplObjectStorage::walid()', - ), + ], "Attempted to call an undefined method named \"walid\" of class \"SplObjectStorage\".\nDid you mean to call \"valid\"?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Call to undefined method SplObjectStorage::offsetFet()', - ), + ], "Attempted to call an undefined method named \"offsetFet\" of class \"SplObjectStorage\".\nDid you mean to call e.g. \"offsetGet\", \"offsetSet\" or \"offsetUnset\"?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'message' => 'Call to undefined method class@anonymous::test()', 'file' => '/home/possum/work/symfony/test.php', 'line' => 11, - ), + ], 'Attempted to call an undefined method named "test" of class "class@anonymous".', - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Fixtures/ToStringThrower.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Fixtures/ToStringThrower.php index 40a5fb7f..24ac8926 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Fixtures/ToStringThrower.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Fixtures/ToStringThrower.php @@ -18,7 +18,7 @@ class ToStringThrower } catch (\Exception $e) { // Using user_error() here is on purpose so we do not forget // that this alias also should work alongside with trigger_error(). - return user_error($e, E_USER_ERROR); + return trigger_error($e, E_USER_ERROR); } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/HeaderMock.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/HeaderMock.php index 3d8d84c5..d7564db4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/HeaderMock.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/HeaderMock.php @@ -25,11 +25,11 @@ namespace Symfony\Component\Debug\Tests; function testHeader() { - static $headers = array(); + static $headers = []; if (!$h = \func_get_args()) { $h = $headers; - $headers = array(); + $headers = []; return $h; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/phpt/exception_rethrown.phpt b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/phpt/exception_rethrown.phpt index 3f455954..b743d93a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/phpt/exception_rethrown.phpt +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/phpt/exception_rethrown.phpt @@ -14,7 +14,7 @@ require $vendor.'/vendor/autoload.php'; if (true) { class TestLogger extends \Psr\Log\AbstractLogger { - public function log($level, $message, array $context = array()) + public function log($level, $message, array $context = []) { echo $message, "\n"; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/phpt/fatal_with_nested_handlers.phpt b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/phpt/fatal_with_nested_handlers.phpt index 2b74e5c6..b3f0e0eb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/phpt/fatal_with_nested_handlers.phpt +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/phpt/fatal_with_nested_handlers.phpt @@ -17,9 +17,9 @@ ini_set('display_errors', 0); $eHandler = set_error_handler('var_dump'); $xHandler = set_exception_handler('var_dump'); -var_dump(array( +var_dump([ $eHandler[0] === $xHandler[0] ? 'Error and exception handlers do match' : 'Error and exception handlers are different', -)); +]); $eHandler[0]->setExceptionHandler('print_r'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Argument/BoundArgument.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Argument/BoundArgument.php index f72f2110..a2069844 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Argument/BoundArgument.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Argument/BoundArgument.php @@ -33,7 +33,7 @@ final class BoundArgument implements ArgumentInterface */ public function getValues() { - return array($this->value, $this->identifier, $this->used); + return [$this->value, $this->identifier, $this->used]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Argument/ServiceClosureArgument.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Argument/ServiceClosureArgument.php index 2fec5d26..6331affa 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Argument/ServiceClosureArgument.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Argument/ServiceClosureArgument.php @@ -25,7 +25,7 @@ class ServiceClosureArgument implements ArgumentInterface public function __construct(Reference $reference) { - $this->values = array($reference); + $this->values = [$reference]; } /** @@ -41,7 +41,7 @@ class ServiceClosureArgument implements ArgumentInterface */ public function setValues(array $values) { - if (array(0) !== array_keys($values) || !($values[0] instanceof Reference || null === $values[0])) { + if ([0] !== array_keys($values) || !($values[0] instanceof Reference || null === $values[0])) { throw new InvalidArgumentException('A ServiceClosureArgument must hold one and only one Reference.'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Argument/TaggedIteratorArgument.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Argument/TaggedIteratorArgument.php index 19e0d2b9..f00e5339 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Argument/TaggedIteratorArgument.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Argument/TaggedIteratorArgument.php @@ -25,7 +25,7 @@ class TaggedIteratorArgument extends IteratorArgument */ public function __construct($tag) { - parent::__construct(array()); + parent::__construct([]); $this->tag = (string) $tag; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ChildDefinition.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ChildDefinition.php index 85cc8603..29fbd48f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ChildDefinition.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ChildDefinition.php @@ -71,7 +71,7 @@ class ChildDefinition extends Definition */ public function getArgument($index) { - if (array_key_exists('index_'.$index, $this->arguments)) { + if (\array_key_exists('index_'.$index, $this->arguments)) { return $this->arguments['index_'.$index]; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php index 7c22d3c0..fc4047f9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php @@ -87,7 +87,7 @@ class AnalyzeServiceReferencesPass extends AbstractRecursivePass implements Repe return $value; } if ($value instanceof Expression) { - $this->getExpressionLanguage()->compile((string) $value, array('this' => 'container')); + $this->getExpressionLanguage()->compile((string) $value, ['this' => 'container']); return $value; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php index 4aabb0b2..252b304f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php @@ -28,13 +28,13 @@ use Symfony\Component\DependencyInjection\TypedReference; */ class AutowirePass extends AbstractRecursivePass { - private $definedTypes = array(); + private $definedTypes = []; private $types; private $ambiguousServiceTypes; - private $autowired = array(); + private $autowired = []; private $lastFailure; private $throwOnAutowiringException; - private $autowiringExceptions = array(); + private $autowiringExceptions = []; private $strictMode; /** @@ -63,16 +63,16 @@ class AutowirePass extends AbstractRecursivePass public function process(ContainerBuilder $container) { // clear out any possibly stored exceptions from before - $this->autowiringExceptions = array(); + $this->autowiringExceptions = []; $this->strictMode = $container->hasParameter('container.autowiring.strict_mode') && $container->getParameter('container.autowiring.strict_mode'); try { parent::process($container); } finally { - $this->definedTypes = array(); + $this->definedTypes = []; $this->types = null; $this->ambiguousServiceTypes = null; - $this->autowired = array(); + $this->autowired = []; } } @@ -89,7 +89,7 @@ class AutowirePass extends AbstractRecursivePass { @trigger_error('The '.__METHOD__.'() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.', E_USER_DEPRECATED); - $metadata = array(); + $metadata = []; foreach ($reflectionClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflectionMethod) { if (!$reflectionMethod->isStatic()) { @@ -147,7 +147,7 @@ class AutowirePass extends AbstractRecursivePass } if ($constructor) { - array_unshift($methodCalls, array($constructor, $value->getArguments())); + array_unshift($methodCalls, [$constructor, $value->getArguments()]); } $methodCalls = $this->autowireCalls($reflectionClass, $methodCalls); @@ -214,7 +214,7 @@ class AutowirePass extends AbstractRecursivePass } foreach ($parameters as $index => $parameter) { - if (array_key_exists($index, $arguments) && '' !== $arguments[$index]) { + if (\array_key_exists($index, $arguments) && '' !== $arguments[$index]) { continue; } @@ -327,9 +327,9 @@ class AutowirePass extends AbstractRecursivePass */ private function populateAvailableTypes($onlyAutowiringTypes = false) { - $this->types = array(); + $this->types = []; if (!$onlyAutowiringTypes) { - $this->ambiguousServiceTypes = array(); + $this->ambiguousServiceTypes = []; } foreach ($this->container->getDefinitions() as $id => $definition) { @@ -401,7 +401,7 @@ class AutowirePass extends AbstractRecursivePass // keep an array of all services matching this type if (!isset($this->ambiguousServiceTypes[$type])) { - $this->ambiguousServiceTypes[$type] = array($this->types[$type]); + $this->ambiguousServiceTypes[$type] = [$this->types[$type]]; unset($this->types[$type]); } $this->ambiguousServiceTypes[$type][] = $id; @@ -521,7 +521,7 @@ class AutowirePass extends AbstractRecursivePass */ private static function getResourceMetadataForMethod(\ReflectionMethod $method) { - $methodArgumentsMetadata = array(); + $methodArgumentsMetadata = []; foreach ($method->getParameters() as $parameter) { try { $class = $parameter->getClass(); @@ -531,11 +531,11 @@ class AutowirePass extends AbstractRecursivePass } $isVariadic = method_exists($parameter, 'isVariadic') && $parameter->isVariadic(); - $methodArgumentsMetadata[] = array( + $methodArgumentsMetadata[] = [ 'class' => $class, 'isOptional' => $parameter->isOptional(), 'defaultValue' => ($parameter->isOptional() && !$isVariadic) ? $parameter->getDefaultValue() : null, - ); + ]; } return $methodArgumentsMetadata; @@ -543,7 +543,7 @@ class AutowirePass extends AbstractRecursivePass private function getAliasesSuggestionForType($type, $extraContext = null) { - $aliases = array(); + $aliases = []; foreach (class_parents($type) + class_implements($type) as $parent) { if ($this->container->has($parent) && !$this->container->findDefinition($parent)->isAbstract()) { $aliases[] = $parent; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php index 6c744f88..efb9df7b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php @@ -34,7 +34,7 @@ class AutowireRequiredMethodsPass extends AbstractRecursivePass return $value; } - $alreadyCalledMethods = array(); + $alreadyCalledMethods = []; foreach ($value->getMethodCalls() as list($method)) { $alreadyCalledMethods[strtolower($method)] = true; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php index ac7866b2..55d911c4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php @@ -36,9 +36,9 @@ class CheckCircularReferencesPass implements CompilerPassInterface { $graph = $container->getCompiler()->getServiceReferenceGraph(); - $this->checkedNodes = array(); + $this->checkedNodes = []; foreach ($graph->getNodes() as $id => $node) { - $this->currentPath = array($id); + $this->currentPath = [$id]; $this->checkOutEdges($node->getOutEdges()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php index a1967802..0e900541 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php @@ -83,7 +83,7 @@ class CheckDefinitionValidityPass implements CompilerPassInterface if ($definition->isPublic() && !$definition->isPrivate()) { $resolvedId = $container->resolveEnvPlaceholders($id, null, $usedEnvs); if (null !== $usedEnvs) { - throw new EnvParameterException(array($resolvedId), null, 'A service name ("%s") cannot contain dynamic values.'); + throw new EnvParameterException([$resolvedId], null, 'A service name ("%s") cannot contain dynamic values.'); } } } @@ -92,7 +92,7 @@ class CheckDefinitionValidityPass implements CompilerPassInterface if ($alias->isPublic() && !$alias->isPrivate()) { $resolvedId = $container->resolveEnvPlaceholders($id, null, $usedEnvs); if (null !== $usedEnvs) { - throw new EnvParameterException(array($resolvedId), null, 'An alias name ("%s") cannot contain dynamic values.'); + throw new EnvParameterException([$resolvedId], null, 'An alias name ("%s") cannot contain dynamic values.'); } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php index d5c01a64..a6ae94d8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php @@ -22,7 +22,7 @@ use Symfony\Component\DependencyInjection\Exception\EnvParameterException; class Compiler { private $passConfig; - private $log = array(); + private $log = []; private $loggingFormatter; private $serviceReferenceGraph; @@ -141,7 +141,7 @@ class Compiler $pass->process($container); } } catch (\Exception $e) { - $usedEnvs = array(); + $usedEnvs = []; $prev = $e; do { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php index 263bd4cf..bbd857e1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php @@ -32,9 +32,9 @@ class DecoratorServicePass implements CompilerPassInterface if (!$decorated = $definition->getDecoratedService()) { continue; } - $definitions->insert(array($id, $definition), array($decorated[2], --$order)); + $definitions->insert([$id, $definition], [$decorated[2], --$order]); } - $decoratingDefinitions = array(); + $decoratingDefinitions = []; foreach ($definitions as list($id, $definition)) { list($inner, $renamedId) = $definition->getDecoratedService(); @@ -68,9 +68,9 @@ class DecoratorServicePass implements CompilerPassInterface if ($types = array_merge($autowiringTypes, $definition->getAutowiringTypes(false))) { $definition->setAutowiringTypes($types); } - $decoratingDefinition->setTags(array()); + $decoratingDefinition->setTags([]); if ($autowiringTypes) { - $decoratingDefinition->setAutowiringTypes(array()); + $decoratingDefinition->setAutowiringTypes([]); } $decoratingDefinitions[$inner] = $definition; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/FactoryReturnTypePass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/FactoryReturnTypePass.php index 1279fcaa..d688fb59 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/FactoryReturnTypePass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/FactoryReturnTypePass.php @@ -41,14 +41,14 @@ class FactoryReturnTypePass implements CompilerPassInterface if (!method_exists(\ReflectionMethod::class, 'getReturnType')) { return; } - $resolveClassPassChanges = null !== $this->resolveClassPass ? $this->resolveClassPass->getChanges() : array(); + $resolveClassPassChanges = null !== $this->resolveClassPass ? $this->resolveClassPass->getChanges() : []; foreach ($container->getDefinitions() as $id => $definition) { $this->updateDefinition($container, $id, $definition, $resolveClassPassChanges); } } - private function updateDefinition(ContainerBuilder $container, $id, Definition $definition, array $resolveClassPassChanges, array $previous = array()) + private function updateDefinition(ContainerBuilder $container, $id, Definition $definition, array $resolveClassPassChanges, array $previous = []) { // circular reference if (isset($previous[$id])) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php index 05eb72d9..326ee193 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php @@ -23,8 +23,8 @@ use Symfony\Component\DependencyInjection\Reference; */ class InlineServiceDefinitionsPass extends AbstractRecursivePass implements RepeatablePassInterface { - private $cloningIds = array(); - private $inlinedServiceIds = array(); + private $cloningIds = []; + private $inlinedServiceIds = []; /** * {@inheritdoc} @@ -126,14 +126,20 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass implements Repe return false; } - $ids = array(); + $ids = []; + $isReferencedByConstructor = false; foreach ($graph->getNode($id)->getInEdges() as $edge) { - if ($edge->isWeak()) { + $isReferencedByConstructor = $isReferencedByConstructor || $edge->isReferencedByConstructor(); + if ($edge->isWeak() || $edge->isLazy()) { return false; } $ids[] = $edge->getSourceNode()->getId(); } + if (!$ids) { + return true; + } + if (\count(array_unique($ids)) > 1) { return false; } @@ -142,6 +148,6 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass implements Repe return false; } - return !$ids || $this->container->getDefinition($ids[0])->isShared(); + return $this->container->getDefinition($ids[0])->isShared(); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php index 71cfa2d5..63f8013c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php @@ -110,7 +110,7 @@ class MergeExtensionConfigurationParameterBag extends EnvPlaceholderParameterBag // Extension::processConfiguration() wasn't called, we cannot know how configs were merged return; } - $this->processedEnvPlaceholders = array(); + $this->processedEnvPlaceholders = []; // serialize config and container to catch env vars nested in object graphs $config = serialize($config).serialize($container->getDefinitions()).serialize($container->getAliases()).serialize($container->getParameterBag()->all()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php index 31104fb1..77f4e953 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php @@ -29,9 +29,9 @@ class PassConfig const TYPE_REMOVE = 'removing'; private $mergePass; - private $afterRemovingPasses = array(); - private $beforeOptimizationPasses = array(); - private $beforeRemovingPasses = array(); + private $afterRemovingPasses = []; + private $beforeOptimizationPasses = []; + private $beforeRemovingPasses = []; private $optimizationPasses; private $removingPasses; @@ -39,24 +39,24 @@ class PassConfig { $this->mergePass = new MergeExtensionConfigurationPass(); - $this->beforeOptimizationPasses = array( - 100 => array( + $this->beforeOptimizationPasses = [ + 100 => [ $resolveClassPass = new ResolveClassPass(), new ResolveInstanceofConditionalsPass(), new RegisterEnvVarProcessorsPass(), - ), - -1000 => array(new ExtensionCompilerPass()), - ); + ], + -1000 => [new ExtensionCompilerPass()], + ]; - $this->optimizationPasses = array(array( + $this->optimizationPasses = [[ new ResolveChildDefinitionsPass(), new ServiceLocatorTagPass(), + new RegisterServiceSubscribersPass(), new DecoratorServicePass(), new ResolveParameterPlaceHoldersPass(false), new ResolveFactoryClassPass(), new FactoryReturnTypePass($resolveClassPass), new CheckDefinitionValidityPass(), - new RegisterServiceSubscribersPass(), new ResolveNamedArgumentsPass(), new AutowireRequiredMethodsPass(), new ResolveBindingsPass(), @@ -69,28 +69,28 @@ class PassConfig new CheckCircularReferencesPass(), new CheckReferenceValidityPass(), new CheckArgumentsValidityPass(false), - )); + ]]; - $this->beforeRemovingPasses = array( - -100 => array( + $this->beforeRemovingPasses = [ + -100 => [ new ResolvePrivatesPass(), - ), - ); + ], + ]; - $this->removingPasses = array(array( + $this->removingPasses = [[ new RemovePrivateAliasesPass(), new ReplaceAliasByActualDefinitionPass(), new RemoveAbstractDefinitionsPass(), - new RepeatedPass(array( + new RepeatedPass([ new AnalyzeServiceReferencesPass(), new InlineServiceDefinitionsPass(), new AnalyzeServiceReferencesPass(), new RemoveUnusedDefinitionsPass(), - )), + ]), new DefinitionErrorExceptionPass(), new CheckExceptionOnInvalidReferenceBehaviorPass(), new ResolveHotPathPass(), - )); + ]]; } /** @@ -101,7 +101,7 @@ class PassConfig public function getPasses() { return array_merge( - array($this->mergePass), + [$this->mergePass], $this->getBeforeOptimizationPasses(), $this->getOptimizationPasses(), $this->getBeforeRemovingPasses(), @@ -142,7 +142,7 @@ class PassConfig $passes = &$this->$property; if (!isset($passes[$priority])) { - $passes[$priority] = array(); + $passes[$priority] = []; } $passes[$priority][] = $pass; } @@ -219,7 +219,7 @@ class PassConfig */ public function setAfterRemovingPasses(array $passes) { - $this->afterRemovingPasses = array($passes); + $this->afterRemovingPasses = [$passes]; } /** @@ -229,7 +229,7 @@ class PassConfig */ public function setBeforeOptimizationPasses(array $passes) { - $this->beforeOptimizationPasses = array($passes); + $this->beforeOptimizationPasses = [$passes]; } /** @@ -239,7 +239,7 @@ class PassConfig */ public function setBeforeRemovingPasses(array $passes) { - $this->beforeRemovingPasses = array($passes); + $this->beforeRemovingPasses = [$passes]; } /** @@ -249,7 +249,7 @@ class PassConfig */ public function setOptimizationPasses(array $passes) { - $this->optimizationPasses = array($passes); + $this->optimizationPasses = [$passes]; } /** @@ -259,7 +259,7 @@ class PassConfig */ public function setRemovingPasses(array $passes) { - $this->removingPasses = array($passes); + $this->removingPasses = [$passes]; } /** @@ -272,7 +272,7 @@ class PassConfig private function sortPasses(array $passes) { if (0 === \count($passes)) { - return array(); + return []; } krsort($passes); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php index ed9b0b7f..daff3495 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php @@ -38,7 +38,7 @@ trait PriorityTaggedServiceTrait */ private function findAndSortTaggedServices($tagName, ContainerBuilder $container) { - $services = array(); + $services = []; foreach ($container->findTaggedServiceIds($tagName, true) as $serviceId => $attributes) { $priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RegisterEnvVarProcessorsPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RegisterEnvVarProcessorsPass.php index e206b0ce..b4d0d055 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RegisterEnvVarProcessorsPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RegisterEnvVarProcessorsPass.php @@ -27,13 +27,13 @@ use Symfony\Component\DependencyInjection\ServiceLocator; */ class RegisterEnvVarProcessorsPass implements CompilerPassInterface { - private static $allowedTypes = array('array', 'bool', 'float', 'int', 'string'); + private static $allowedTypes = ['array', 'bool', 'float', 'int', 'string']; public function process(ContainerBuilder $container) { $bag = $container->getParameterBag(); - $types = array(); - $processors = array(); + $types = []; + $processors = []; foreach ($container->findTaggedServiceIds('container.env_var_processor') as $id => $tags) { if (!$r = $container->getReflectionClass($class = $container->getDefinition($id)->getClass())) { throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); @@ -58,7 +58,7 @@ class RegisterEnvVarProcessorsPass implements CompilerPassInterface if ($processors) { $container->register('container.env_var_processors_locator', ServiceLocator::class) ->setPublic(true) - ->setArguments(array($processors)) + ->setArguments([$processors]) ; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php index 0a7dcd7e..bf1387c0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php @@ -31,7 +31,7 @@ class RegisterServiceSubscribersPass extends AbstractRecursivePass return parent::processValue($value, $isRoot); } - $serviceMap = array(); + $serviceMap = []; $autowire = $value->isAutowired(); foreach ($value->getTag('container.service_subscriber') as $attributes) { @@ -40,13 +40,13 @@ class RegisterServiceSubscribersPass extends AbstractRecursivePass continue; } ksort($attributes); - if (array() !== array_diff(array_keys($attributes), array('id', 'key'))) { + if ([] !== array_diff(array_keys($attributes), ['id', 'key'])) { throw new InvalidArgumentException(sprintf('The "container.service_subscriber" tag accepts only the "key" and "id" attributes, "%s" given for service "%s".', implode('", "', array_keys($attributes)), $this->currentId)); } - if (!array_key_exists('id', $attributes)) { + if (!\array_key_exists('id', $attributes)) { throw new InvalidArgumentException(sprintf('Missing "id" attribute on "container.service_subscriber" tag with key="%s" for service "%s".', $attributes['key'], $this->currentId)); } - if (!array_key_exists('key', $attributes)) { + if (!\array_key_exists('key', $attributes)) { $attributes['key'] = $attributes['id']; } if (isset($serviceMap[$attributes['key']])) { @@ -64,7 +64,7 @@ class RegisterServiceSubscribersPass extends AbstractRecursivePass } $class = $r->name; - $subscriberMap = array(); + $subscriberMap = []; $declaringClass = (new \ReflectionMethod($class, 'getSubscribedServices'))->class; foreach ($class::getSubscribedServices() as $key => $type) { @@ -94,7 +94,7 @@ class RegisterServiceSubscribersPass extends AbstractRecursivePass throw new InvalidArgumentException(sprintf('Service %s not exist in the map returned by "%s::getSubscribedServices()" for service "%s".', $message, $class, $this->currentId)); } - $value->addTag('container.service_subscriber.locator', array('id' => (string) ServiceLocatorTagPass::register($this->container, $subscriberMap, $this->currentId))); + $value->addTag('container.service_subscriber.locator', ['id' => (string) ServiceLocatorTagPass::register($this->container, $subscriberMap, $this->currentId)]); return parent::processValue($value); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php index 5a8548a1..a1013f66 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php @@ -45,8 +45,8 @@ class RemoveUnusedDefinitionsPass implements RepeatablePassInterface if ($graph->hasNode($id)) { $edges = $graph->getNode($id)->getInEdges(); - $referencingAliases = array(); - $sourceIds = array(); + $referencingAliases = []; + $sourceIds = []; foreach ($edges as $edge) { if ($edge->isWeak()) { continue; @@ -60,7 +60,7 @@ class RemoveUnusedDefinitionsPass implements RepeatablePassInterface } $isReferenced = (\count(array_unique($sourceIds)) - \count($referencingAliases)) > 0; } else { - $referencingAliases = array(); + $referencingAliases = []; $isReferenced = false; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php index 8e206765..472bf941 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php @@ -33,8 +33,8 @@ class ReplaceAliasByActualDefinitionPass extends AbstractRecursivePass public function process(ContainerBuilder $container) { // First collect all alias targets that need to be replaced - $seenAliasTargets = array(); - $replacements = array(); + $seenAliasTargets = []; + $replacements = []; foreach ($container->getAliases() as $definitionId => $target) { $targetId = $container->normalizeId($target); // Special case: leave this target alone @@ -69,7 +69,7 @@ class ReplaceAliasByActualDefinitionPass extends AbstractRecursivePass $this->replacements = $replacements; parent::process($container); - $this->replacements = array(); + $this->replacements = []; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php index bcf265ab..20b262b6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php @@ -25,9 +25,9 @@ use Symfony\Component\DependencyInjection\TypedReference; */ class ResolveBindingsPass extends AbstractRecursivePass { - private $usedBindings = array(); - private $unusedBindings = array(); - private $errorMessages = array(); + private $usedBindings = []; + private $unusedBindings = []; + private $errorMessages = []; /** * {@inheritdoc} @@ -48,9 +48,9 @@ class ResolveBindingsPass extends AbstractRecursivePass throw new InvalidArgumentException($message); } } finally { - $this->usedBindings = array(); - $this->unusedBindings = array(); - $this->errorMessages = array(); + $this->usedBindings = []; + $this->unusedBindings = []; + $this->errorMessages = []; } } @@ -80,7 +80,7 @@ class ResolveBindingsPass extends AbstractRecursivePass $this->usedBindings[$bindingId] = true; unset($this->unusedBindings[$bindingId]); } elseif (!isset($this->usedBindings[$bindingId])) { - $this->unusedBindings[$bindingId] = array($key, $this->currentId); + $this->unusedBindings[$bindingId] = [$key, $this->currentId]; } if (isset($key[0]) && '$' === $key[0]) { @@ -100,7 +100,7 @@ class ResolveBindingsPass extends AbstractRecursivePass try { if ($constructor = $this->getConstructor($value, false)) { - $calls[] = array($constructor, $value->getArguments()); + $calls[] = [$constructor, $value->getArguments()]; } } catch (RuntimeException $e) { $this->errorMessages[] = $e->getMessage(); @@ -119,11 +119,11 @@ class ResolveBindingsPass extends AbstractRecursivePass } foreach ($reflectionMethod->getParameters() as $key => $parameter) { - if (array_key_exists($key, $arguments) && '' !== $arguments[$key]) { + if (\array_key_exists($key, $arguments) && '' !== $arguments[$key]) { continue; } - if (array_key_exists('$'.$parameter->name, $bindings)) { + if (\array_key_exists('$'.$parameter->name, $bindings)) { $arguments[$key] = $this->getBindingValue($bindings['$'.$parameter->name]); continue; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveChildDefinitionsPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveChildDefinitionsPass.php index d647eda2..539395a4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveChildDefinitionsPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveChildDefinitionsPass.php @@ -39,7 +39,7 @@ class ResolveChildDefinitionsPass extends AbstractRecursivePass $value = $this->container->getDefinition($this->currentId); } if ($value instanceof ChildDefinition) { - $this->currentPath = array(); + $this->currentPath = []; $value = $this->resolveDefinition($value); if ($isRoot) { $this->container->setDefinition($this->currentId, $value); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveClassPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveClassPass.php index 910cb9de..b1c1b4f8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveClassPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveClassPass.php @@ -20,7 +20,7 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; */ class ResolveClassPass implements CompilerPassInterface { - private $changes = array(); + private $changes = []; /** * {@inheritdoc} @@ -49,7 +49,7 @@ class ResolveClassPass implements CompilerPassInterface public function getChanges() { $changes = $this->changes; - $this->changes = array(); + $this->changes = []; return $changes; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php index 2888cf4d..4e025113 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php @@ -24,7 +24,7 @@ use Symfony\Component\DependencyInjection\Reference; class ResolveHotPathPass extends AbstractRecursivePass { private $tagName; - private $resolvedIds = array(); + private $resolvedIds = []; public function __construct($tagName = 'container.hot_path') { @@ -40,7 +40,7 @@ class ResolveHotPathPass extends AbstractRecursivePass parent::process($container); $container->getDefinition('service_container')->clearTag($this->tagName); } finally { - $this->resolvedIds = array(); + $this->resolvedIds = []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php index 20507cfb..69e3796d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php @@ -50,7 +50,7 @@ class ResolveInstanceofConditionalsPass implements CompilerPassInterface private function processDefinition(ContainerBuilder $container, $id, Definition $definition) { $instanceofConditionals = $definition->getInstanceofConditionals(); - $autoconfiguredInstanceof = $definition->isAutoconfigured() ? $container->getAutoconfiguredInstanceof() : array(); + $autoconfiguredInstanceof = $definition->isAutoconfigured() ? $container->getAutoconfiguredInstanceof() : []; if (!$instanceofConditionals && !$autoconfiguredInstanceof) { return $definition; } @@ -61,9 +61,9 @@ class ResolveInstanceofConditionalsPass implements CompilerPassInterface $conditionals = $this->mergeConditionals($autoconfiguredInstanceof, $instanceofConditionals, $container); - $definition->setInstanceofConditionals(array()); + $definition->setInstanceofConditionals([]); $parent = $shared = null; - $instanceofTags = array(); + $instanceofTags = []; foreach ($conditionals as $interface => $instanceofDefs) { if ($interface !== $class && (!$container->getReflectionClass($class, false))) { @@ -81,7 +81,7 @@ class ResolveInstanceofConditionalsPass implements CompilerPassInterface $parent = 'instanceof.'.$interface.'.'.$key.'.'.$id; $container->setDefinition($parent, $instanceofDef); $instanceofTags[] = $instanceofDef->getTags(); - $instanceofDef->setTags(array()); + $instanceofDef->setTags([]); if (isset($instanceofDef->getChanges()['shared'])) { $shared = $instanceofDef->isShared(); @@ -94,7 +94,7 @@ class ResolveInstanceofConditionalsPass implements CompilerPassInterface $abstract = $container->setDefinition('abstract.instanceof.'.$id, $definition); // cast Definition to ChildDefinition - $definition->setBindings(array()); + $definition->setBindings([]); $definition = serialize($definition); $definition = substr_replace($definition, '53', 2, 2); $definition = substr_replace($definition, 'Child', 44, 0); @@ -121,11 +121,11 @@ class ResolveInstanceofConditionalsPass implements CompilerPassInterface // reset fields with "merge" behavior $abstract - ->setBindings(array()) - ->setArguments(array()) - ->setMethodCalls(array()) + ->setBindings([]) + ->setArguments([]) + ->setMethodCalls([]) ->setDecoratedService(null) - ->setTags(array()) + ->setTags([]) ->setAbstract(true); } @@ -135,7 +135,7 @@ class ResolveInstanceofConditionalsPass implements CompilerPassInterface private function mergeConditionals(array $autoconfiguredInstanceof, array $instanceofConditionals, ContainerBuilder $container) { // make each value an array of ChildDefinition - $conditionals = array_map(function ($childDef) { return array($childDef); }, $autoconfiguredInstanceof); + $conditionals = array_map(function ($childDef) { return [$childDef]; }, $autoconfiguredInstanceof); foreach ($instanceofConditionals as $interface => $instanceofDef) { // make sure the interface/class exists (but don't validate automaticInstanceofConditionals) @@ -144,7 +144,7 @@ class ResolveInstanceofConditionalsPass implements CompilerPassInterface } if (!isset($autoconfiguredInstanceof[$interface])) { - $conditionals[$interface] = array(); + $conditionals[$interface] = []; } $conditionals[$interface][] = $instanceofDef; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php index 90cf64ad..0b792801 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php @@ -33,12 +33,12 @@ class ResolveNamedArgumentsPass extends AbstractRecursivePass } $calls = $value->getMethodCalls(); - $calls[] = array('__construct', $value->getArguments()); + $calls[] = ['__construct', $value->getArguments()]; foreach ($calls as $i => $call) { list($method, $arguments) = $call; $parameters = null; - $resolvedArguments = array(); + $resolvedArguments = []; foreach ($arguments as $key => $argument) { if (\is_int($key)) { @@ -49,6 +49,7 @@ class ResolveNamedArgumentsPass extends AbstractRecursivePass if (null === $parameters) { $r = $this->getReflectionMethod($value, $method); $class = $r instanceof \ReflectionMethod ? $r->class : $this->currentId; + $method = $r->getName(); $parameters = $r->getParameters(); } @@ -70,7 +71,7 @@ class ResolveNamedArgumentsPass extends AbstractRecursivePass $typeFound = false; foreach ($parameters as $j => $p) { - if (!array_key_exists($j, $resolvedArguments) && ProxyHelper::getTypeHint($r, $p, true) === $key) { + if (!\array_key_exists($j, $resolvedArguments) && ProxyHelper::getTypeHint($r, $p, true) === $key) { $resolvedArguments[$j] = $argument; $typeFound = true; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php index 9a59a73e..8c942b52 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php @@ -42,7 +42,7 @@ class ResolveParameterPlaceHoldersPass extends AbstractRecursivePass try { parent::process($container); - $aliases = array(); + $aliases = []; foreach ($container->getAliases() as $name => $target) { $this->currentId = $name; $aliases[$this->bag->resolveValue($name)] = $target; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php index 839af1ae..b80e4525 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php @@ -63,10 +63,10 @@ class ResolveReferencesToAliasesPass extends AbstractRecursivePass */ private function getDefinitionId($id, ContainerBuilder $container) { - $seen = array(); + $seen = []; while ($container->hasAlias($id)) { if (isset($seen[$id])) { - throw new ServiceCircularReferenceException($id, array_merge(array_keys($seen), array($id))); + throw new ServiceCircularReferenceException($id, array_merge(array_keys($seen), [$id])); } $seen[$id] = true; $id = $container->normalizeId($container->getAlias($id)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceLocatorTagPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceLocatorTagPass.php index 5a0703e8..93e489c8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceLocatorTagPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceLocatorTagPass.php @@ -102,7 +102,7 @@ final class ServiceLocatorTagPass extends AbstractRecursivePass // to derivate customized instances from the prototype one. $container->register($id .= '.'.$callerId, ServiceLocator::class) ->setPublic(false) - ->setFactory(array(new Reference($locatorId), 'withContext')) + ->setFactory([new Reference($locatorId), 'withContext']) ->addArgument($callerId) ->addArgument(new Reference('service_container')); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php index 83486f05..23d4745e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php @@ -28,7 +28,7 @@ class ServiceReferenceGraph /** * @var ServiceReferenceGraphNode[] */ - private $nodes = array(); + private $nodes = []; /** * Checks if the graph has a specific node. @@ -78,7 +78,7 @@ class ServiceReferenceGraph foreach ($this->nodes as $node) { $node->clear(); } - $this->nodes = array(); + $this->nodes = []; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php index 36b99f1a..6abd6c86 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php @@ -24,8 +24,8 @@ use Symfony\Component\DependencyInjection\Definition; class ServiceReferenceGraphNode { private $id; - private $inEdges = array(); - private $outEdges = array(); + private $inEdges = []; + private $outEdges = []; private $value; /** @@ -113,6 +113,6 @@ class ServiceReferenceGraphNode */ public function clear() { - $this->inEdges = $this->outEdges = array(); + $this->inEdges = $this->outEdges = []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Config/AutowireServiceResource.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Config/AutowireServiceResource.php index 0eac9396..0c3d8f57 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Config/AutowireServiceResource.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Config/AutowireServiceResource.php @@ -23,7 +23,7 @@ class AutowireServiceResource implements SelfCheckingResourceInterface, \Seriali { private $class; private $filePath; - private $autowiringMetadata = array(); + private $autowiringMetadata = []; public function __construct($class, $path, array $autowiringMetadata) { @@ -58,15 +58,21 @@ class AutowireServiceResource implements SelfCheckingResourceInterface, \Seriali return 'service.autowire.'.$this->class; } + /** + * @internal + */ public function serialize() { - return serialize(array($this->class, $this->filePath, $this->autowiringMetadata)); + return serialize([$this->class, $this->filePath, $this->autowiringMetadata]); } + /** + * @internal + */ public function unserialize($serialized) { if (\PHP_VERSION_ID >= 70000) { - list($this->class, $this->filePath, $this->autowiringMetadata) = unserialize($serialized, array('allowed_classes' => false)); + list($this->class, $this->filePath, $this->autowiringMetadata) = unserialize($serialized, ['allowed_classes' => false]); } else { list($this->class, $this->filePath, $this->autowiringMetadata) = unserialize($serialized); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Config/ContainerParametersResource.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Config/ContainerParametersResource.php index 072f0580..7560c335 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Config/ContainerParametersResource.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Config/ContainerParametersResource.php @@ -39,7 +39,7 @@ class ContainerParametersResource implements ResourceInterface, \Serializable } /** - * {@inheritdoc} + * @internal */ public function serialize() { @@ -47,7 +47,7 @@ class ContainerParametersResource implements ResourceInterface, \Serializable } /** - * {@inheritdoc} + * @internal */ public function unserialize($serialized) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php index 4d3e3883..e8226434 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php @@ -40,26 +40,26 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; class Container implements ResettableContainerInterface { protected $parameterBag; - protected $services = array(); - protected $fileMap = array(); - protected $methodMap = array(); - protected $aliases = array(); - protected $loading = array(); - protected $resolving = array(); - protected $syntheticIds = array(); + protected $services = []; + protected $fileMap = []; + protected $methodMap = []; + protected $aliases = []; + protected $loading = []; + protected $resolving = []; + protected $syntheticIds = []; /** * @internal */ - protected $privates = array(); + protected $privates = []; /** * @internal */ - protected $normalizedIds = array(); + protected $normalizedIds = []; - private $underscoreMap = array('_' => '', '.' => '_', '\\' => '_'); - private $envCache = array(); + private $underscoreMap = ['_' => '', '.' => '_', '\\' => '_']; + private $envCache = []; private $compiled = false; private $getEnv; @@ -294,7 +294,7 @@ class Container implements ResettableContainerInterface } if (isset($this->loading[$id])) { - throw new ServiceCircularReferenceException($id, array_merge(array_keys($this->loading), array($id))); + throw new ServiceCircularReferenceException($id, array_merge(array_keys($this->loading), [$id])); } $this->loading[$id] = true; @@ -331,13 +331,13 @@ class Container implements ResettableContainerInterface throw new ServiceNotFoundException($id); } if (isset($this->syntheticIds[$id])) { - throw new ServiceNotFoundException($id, null, null, array(), sprintf('The "%s" service is synthetic, it needs to be set at boot time before it can be used.', $id)); + throw new ServiceNotFoundException($id, null, null, [], sprintf('The "%s" service is synthetic, it needs to be set at boot time before it can be used.', $id)); } if (isset($this->getRemovedIds()[$id])) { - throw new ServiceNotFoundException($id, null, null, array(), sprintf('The "%s" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.', $id)); + throw new ServiceNotFoundException($id, null, null, [], sprintf('The "%s" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.', $id)); } - $alternatives = array(); + $alternatives = []; foreach ($this->getServiceIds() as $knownId) { $lev = levenshtein($id, $knownId); if ($lev <= \strlen($id) / 3 || false !== strpos($knownId, $id)) { @@ -380,7 +380,7 @@ class Container implements ResettableContainerInterface */ public function reset() { - $this->services = array(); + $this->services = []; } /** @@ -390,7 +390,7 @@ class Container implements ResettableContainerInterface */ public function getServiceIds() { - $ids = array(); + $ids = []; if (!$this->methodMap && !$this instanceof ContainerBuilder && __CLASS__ !== static::class) { // We only check the convention-based factory in a compiled container (i.e. a child class other than a ContainerBuilder, @@ -415,7 +415,7 @@ class Container implements ResettableContainerInterface */ public function getRemovedIds() { - return array(); + return []; } /** @@ -427,7 +427,7 @@ class Container implements ResettableContainerInterface */ public static function camelize($id) { - return strtr(ucwords(strtr($id, array('_' => ' ', '.' => '_ ', '\\' => '_ '))), array(' ' => '')); + return strtr(ucwords(strtr($id, ['_' => ' ', '.' => '_ ', '\\' => '_ '])), [' ' => '']); } /** @@ -439,7 +439,7 @@ class Container implements ResettableContainerInterface */ public static function underscore($id) { - return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), str_replace('_', '.', $id))); + return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], str_replace('_', '.', $id))); } /** @@ -466,11 +466,11 @@ class Container implements ResettableContainerInterface if (isset($this->resolving[$envName = "env($name)"])) { throw new ParameterCircularReferenceException(array_keys($this->resolving)); } - if (isset($this->envCache[$name]) || array_key_exists($name, $this->envCache)) { + if (isset($this->envCache[$name]) || \array_key_exists($name, $this->envCache)) { return $this->envCache[$name]; } if (!$this->has($id = 'container.env_var_processors_locator')) { - $this->set($id, new ServiceLocator(array())); + $this->set($id, new ServiceLocator([])); } if (!$this->getEnv) { $this->getEnv = new \ReflectionMethod($this, __FUNCTION__); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index 5fe6f2ae..0c1966a4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -53,29 +53,29 @@ class ContainerBuilder extends Container implements TaggedContainerInterface /** * @var ExtensionInterface[] */ - private $extensions = array(); + private $extensions = []; /** * @var ExtensionInterface[] */ - private $extensionsByNs = array(); + private $extensionsByNs = []; /** * @var Definition[] */ - private $definitions = array(); + private $definitions = []; /** * @var Alias[] */ - private $aliasDefinitions = array(); + private $aliasDefinitions = []; /** * @var ResourceInterface[] */ - private $resources = array(); + private $resources = []; - private $extensionConfigs = array(); + private $extensionConfigs = []; /** * @var Compiler @@ -97,33 +97,33 @@ class ContainerBuilder extends Container implements TaggedContainerInterface /** * @var ExpressionFunctionProviderInterface[] */ - private $expressionLanguageProviders = array(); + private $expressionLanguageProviders = []; /** * @var string[] with tag names used by findTaggedServiceIds */ - private $usedTags = array(); + private $usedTags = []; /** * @var string[][] a map of env var names to their placeholders */ - private $envPlaceholders = array(); + private $envPlaceholders = []; /** * @var int[] a map of env vars to their resolution counter */ - private $envCounters = array(); + private $envCounters = []; /** * @var string[] the list of vendor directories */ private $vendors; - private $autoconfiguredInstanceof = array(); + private $autoconfiguredInstanceof = []; - private $removedIds = array(); + private $removedIds = []; - private static $internalTypes = array( + private static $internalTypes = [ 'int' => true, 'float' => true, 'string' => true, @@ -135,7 +135,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface 'callable' => true, 'iterable' => true, 'mixed' => true, - ); + ]; public function __construct(ParameterBagInterface $parameterBag = null) { @@ -449,7 +449,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface } if (\func_num_args() < 2) { - $values = array(); + $values = []; } $namespace = $this->getExtension($extension)->getAlias(); @@ -596,7 +596,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface } if (null === $inlineServices) { $isConstructorArgument = true; - $inlineServices = array(); + $inlineServices = []; } try { if (ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $invalidBehavior) { @@ -647,7 +647,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * the parameters passed to the container constructor to have precedence * over the loaded ones. * - * $container = new ContainerBuilder(new ParameterBag(array('foo' => 'bar'))); + * $container = new ContainerBuilder(new ParameterBag(['foo' => 'bar'])); * $loader = new LoaderXXX($container); * $loader->load('resource_name'); * $container->register('foo', 'stdClass'); @@ -676,7 +676,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface foreach ($this->extensions as $name => $extension) { if (!isset($this->extensionConfigs[$name])) { - $this->extensionConfigs[$name] = array(); + $this->extensionConfigs[$name] = []; } $this->extensionConfigs[$name] = array_merge($this->extensionConfigs[$name], $container->getExtensionConfig($name)); @@ -686,7 +686,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface $envPlaceholders = $container->getParameterBag()->getEnvPlaceholders(); $this->getParameterBag()->mergeEnvPlaceholders($container->getParameterBag()); } else { - $envPlaceholders = array(); + $envPlaceholders = []; } foreach ($container->envCounters as $env => $count) { @@ -719,7 +719,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface public function getExtensionConfig($name) { if (!isset($this->extensionConfigs[$name])) { - $this->extensionConfigs[$name] = array(); + $this->extensionConfigs[$name] = []; } return $this->extensionConfigs[$name]; @@ -734,7 +734,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface public function prependExtensionConfig($name, array $config) { if (!isset($this->extensionConfigs[$name])) { - $this->extensionConfigs[$name] = array(); + $this->extensionConfigs[$name] = []; } array_unshift($this->extensionConfigs[$name], $config); @@ -793,7 +793,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface } } - $this->extensionConfigs = array(); + $this->extensionConfigs = []; if ($bag instanceof EnvPlaceholderParameterBag) { if ($resolveEnvPlaceholders) { @@ -847,7 +847,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface */ public function setAliases(array $aliases) { - $this->aliasDefinitions = array(); + $this->aliasDefinitions = []; $this->addAliases($aliases); } @@ -987,7 +987,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface */ public function setDefinitions(array $definitions) { - $this->definitions = array(); + $this->definitions = []; $this->addDefinitions($definitions); } @@ -1071,7 +1071,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface { $id = $this->normalizeId($id); - $seen = array(); + $seen = []; while (isset($this->aliasDefinitions[$id])) { $id = (string) $this->aliasDefinitions[$id]; @@ -1143,7 +1143,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface if (null !== $factory = $definition->getFactory()) { if (\is_array($factory)) { - $factory = array($this->doResolveServices($parameterBag->resolveValue($factory[0]), $inlineServices, $isConstructorArgument), $factory[1]); + $factory = [$this->doResolveServices($parameterBag->resolveValue($factory[0]), $inlineServices, $isConstructorArgument), $factory[1]]; } elseif (!\is_string($factory)) { throw new RuntimeException(sprintf('Cannot create service "%s" because of invalid factory', $id)); } @@ -1169,7 +1169,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface $service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs($arguments); // don't trigger deprecations for internal uses // @deprecated since version 3.3, to be removed in 4.0 along with the deprecated class - $deprecationWhitelist = array('event_dispatcher' => ContainerAwareEventDispatcher::class); + $deprecationWhitelist = ['event_dispatcher' => ContainerAwareEventDispatcher::class]; if (!$definition->isDeprecated() && 0 < strpos($r->getDocComment(), "\n * @deprecated ") && (!isset($deprecationWhitelist[$id]) || $deprecationWhitelist[$id] !== $class)) { @trigger_error(sprintf('The "%s" service relies on the deprecated "%s" class. It should either be deprecated or its implementation upgraded.', $id, $r->name), E_USER_DEPRECATED); @@ -1224,7 +1224,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface return $this->doResolveServices($value); } - private function doResolveServices($value, array &$inlineServices = array(), $isConstructorArgument = false) + private function doResolveServices($value, array &$inlineServices = [], $isConstructorArgument = false) { if (\is_array($value)) { foreach ($value as $k => $v) { @@ -1277,7 +1277,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface } elseif ($value instanceof Parameter) { $value = $this->getParameter((string) $value); } elseif ($value instanceof Expression) { - $value = $this->getExpressionLanguage()->evaluate($value, array('container' => $this)); + $value = $this->getExpressionLanguage()->evaluate($value, ['container' => $this]); } return $value; @@ -1288,7 +1288,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * * Example: * - * $container->register('foo')->addTag('my.tag', array('hello' => 'world')); + * $container->register('foo')->addTag('my.tag', ['hello' => 'world']); * * $serviceIds = $container->findTaggedServiceIds('my.tag'); * foreach ($serviceIds as $serviceId => $tags) { @@ -1305,7 +1305,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface public function findTaggedServiceIds($name, $throwOnAbstract = false) { $this->usedTags[] = $name; - $tags = array(); + $tags = []; foreach ($this->getDefinitions() as $id => $definition) { if ($definition->hasTag($name)) { if ($throwOnAbstract && $definition->isAbstract()) { @@ -1325,7 +1325,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface */ public function findTags() { - $tags = array(); + $tags = []; foreach ($this->getDefinitions() as $id => $definition) { $tags = array_merge(array_keys($definition->getTags()), $tags); } @@ -1405,7 +1405,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface } if (\is_array($value)) { - $result = array(); + $result = []; foreach ($value as $k => $v) { $result[\is_string($k) ? $this->resolveEnvPlaceholders($k, $format, $usedEnvs) : $k] = $this->resolveEnvPlaceholders($v, $format, $usedEnvs); } @@ -1473,7 +1473,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface */ public function getNormalizedIds() { - $normalizedIds = array(); + $normalizedIds = []; foreach ($this->normalizedIds as $k => $v) { if ($v !== (string) $k) { @@ -1515,7 +1515,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface */ public static function getServiceConditionals($value) { - $services = array(); + $services = []; if (\is_array($value)) { foreach ($value as $v) { @@ -1539,7 +1539,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface */ public static function getInitializedConditionals($value) { - $services = array(); + $services = []; if (\is_array($value)) { foreach ($value as $v) { @@ -1563,7 +1563,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface { $hash = substr(base64_encode(hash('sha256', serialize($value), true)), 0, 7); - return str_replace(array('/', '+'), array('.', '_'), strtolower($hash)); + return str_replace(['/', '+'], ['.', '_'], strtolower($hash)); } /** @@ -1607,7 +1607,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface } } - \call_user_func_array(array($service, $call[0]), $this->doResolveServices($this->getParameterBag()->unescapeValue($this->getParameterBag()->resolveValue($call[1])), $inlineServices)); + \call_user_func_array([$service, $call[0]], $this->doResolveServices($this->getParameterBag()->unescapeValue($this->getParameterBag()->resolveValue($call[1])), $inlineServices)); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Definition.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Definition.php index 849d617a..ee580347 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Definition.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Definition.php @@ -28,12 +28,12 @@ class Definition private $shared = true; private $deprecated = false; private $deprecationTemplate; - private $properties = array(); - private $calls = array(); - private $instanceof = array(); + private $properties = []; + private $calls = []; + private $instanceof = []; private $autoconfigured = false; private $configurator; - private $tags = array(); + private $tags = []; private $public = true; private $private = true; private $synthetic = false; @@ -41,12 +41,12 @@ class Definition private $lazy = false; private $decoratedService; private $autowired = false; - private $autowiringTypes = array(); - private $changes = array(); - private $bindings = array(); - private $errors = array(); + private $autowiringTypes = []; + private $changes = []; + private $bindings = []; + private $errors = []; - protected $arguments = array(); + protected $arguments = []; private static $defaultDeprecationTemplate = 'The "%service_id%" service is deprecated. You should stop using it, as it will soon be removed.'; @@ -54,7 +54,7 @@ class Definition * @param string|null $class The service class * @param array $arguments An array of arguments to pass to the service constructor */ - public function __construct($class = null, array $arguments = array()) + public function __construct($class = null, array $arguments = []) { if (null !== $class) { $this->setClass($class); @@ -138,7 +138,7 @@ class Definition if (null === $id) { $this->decoratedService = null; } else { - $this->decoratedService = array($id, $renamedId, (int) $priority); + $this->decoratedService = [$id, $renamedId, (int) $priority]; } return $this; @@ -263,7 +263,7 @@ class Definition throw new OutOfBoundsException(sprintf('The index "%d" is not in the range [0, %d].', $index, \count($this->arguments) - 1)); } - if (!array_key_exists($index, $this->arguments)) { + if (!\array_key_exists($index, $this->arguments)) { throw new OutOfBoundsException(sprintf('The argument "%s" doesn\'t exist.', $index)); } @@ -308,7 +308,7 @@ class Definition */ public function getArgument($index) { - if (!array_key_exists($index, $this->arguments)) { + if (!\array_key_exists($index, $this->arguments)) { throw new OutOfBoundsException(sprintf('The argument "%s" doesn\'t exist.', $index)); } @@ -320,9 +320,9 @@ class Definition * * @return $this */ - public function setMethodCalls(array $calls = array()) + public function setMethodCalls(array $calls = []) { - $this->calls = array(); + $this->calls = []; foreach ($calls as $call) { $this->addMethodCall($call[0], $call[1]); } @@ -340,12 +340,12 @@ class Definition * * @throws InvalidArgumentException on empty $method param */ - public function addMethodCall($method, array $arguments = array()) + public function addMethodCall($method, array $arguments = []) { if (empty($method)) { throw new InvalidArgumentException('Method name cannot be empty.'); } - $this->calls[] = array($method, $arguments); + $this->calls[] = [$method, $arguments]; return $this; } @@ -476,7 +476,7 @@ class Definition */ public function getTag($name) { - return isset($this->tags[$name]) ? $this->tags[$name] : array(); + return isset($this->tags[$name]) ? $this->tags[$name] : []; } /** @@ -487,7 +487,7 @@ class Definition * * @return $this */ - public function addTag($name, array $attributes = array()) + public function addTag($name, array $attributes = []) { $this->tags[$name][] = $attributes; @@ -527,7 +527,7 @@ class Definition */ public function clearTags() { - $this->tags = array(); + $this->tags = []; return $this; } @@ -816,7 +816,7 @@ class Definition { @trigger_error('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead.', E_USER_DEPRECATED); - $this->autowiringTypes = array(); + $this->autowiringTypes = []; foreach ($types as $type) { $this->autowiringTypes[$type] = true; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php index dd001e4e..1ea775dd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php @@ -25,5 +25,5 @@ interface DumperInterface * * @return string The representation of the service container */ - public function dump(array $options = array()); + public function dump(array $options = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php index 2105d1d4..f06e6e80 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php @@ -32,14 +32,14 @@ class GraphvizDumper extends Dumper { private $nodes; private $edges; - private $options = array( - 'graph' => array('ratio' => 'compress'), - 'node' => array('fontsize' => 11, 'fontname' => 'Arial', 'shape' => 'record'), - 'edge' => array('fontsize' => 9, 'fontname' => 'Arial', 'color' => 'grey', 'arrowhead' => 'open', 'arrowsize' => 0.5), - 'node.instance' => array('fillcolor' => '#9999ff', 'style' => 'filled'), - 'node.definition' => array('fillcolor' => '#eeeeee'), - 'node.missing' => array('fillcolor' => '#ff9999', 'style' => 'filled'), - ); + private $options = [ + 'graph' => ['ratio' => 'compress'], + 'node' => ['fontsize' => 11, 'fontname' => 'Arial', 'shape' => 'record'], + 'edge' => ['fontsize' => 9, 'fontname' => 'Arial', 'color' => 'grey', 'arrowhead' => 'open', 'arrowsize' => 0.5], + 'node.instance' => ['fillcolor' => '#9999ff', 'style' => 'filled'], + 'node.definition' => ['fillcolor' => '#eeeeee'], + 'node.missing' => ['fillcolor' => '#ff9999', 'style' => 'filled'], + ]; /** * Dumps the service container as a graphviz graph. @@ -55,9 +55,9 @@ class GraphvizDumper extends Dumper * * @return string The dot representation of the service container */ - public function dump(array $options = array()) + public function dump(array $options = []) { - foreach (array('graph', 'node', 'edge', 'node.instance', 'node.definition', 'node.missing') as $key) { + foreach (['graph', 'node', 'edge', 'node.instance', 'node.definition', 'node.missing'] as $key) { if (isset($options[$key])) { $this->options[$key] = array_merge($this->options[$key], $options[$key]); } @@ -65,7 +65,7 @@ class GraphvizDumper extends Dumper $this->nodes = $this->findNodes(); - $this->edges = array(); + $this->edges = []; foreach ($this->container->getDefinitions() as $id => $definition) { $this->edges[$id] = array_merge( $this->findEdges($id, $definition->getArguments(), true, ''), @@ -129,7 +129,7 @@ class GraphvizDumper extends Dumper */ private function findEdges($id, array $arguments, $required, $name, $lazy = false) { - $edges = array(); + $edges = []; foreach ($arguments as $argument) { if ($argument instanceof Parameter) { $argument = $this->container->hasParameter($argument) ? $this->container->getParameter($argument) : null; @@ -141,12 +141,12 @@ class GraphvizDumper extends Dumper $lazyEdge = $lazy; if (!$this->container->has((string) $argument)) { - $this->nodes[(string) $argument] = array('name' => $name, 'required' => $required, 'class' => '', 'attributes' => $this->options['node.missing']); + $this->nodes[(string) $argument] = ['name' => $name, 'required' => $required, 'class' => '', 'attributes' => $this->options['node.missing']]; } elseif ('service_container' !== (string) $argument) { $lazyEdge = $lazy || $this->container->getDefinition((string) $argument)->isLazy(); } - $edges[] = array('name' => $name, 'required' => $required, 'to' => $argument, 'lazy' => $lazyEdge); + $edges[] = ['name' => $name, 'required' => $required, 'to' => $argument, 'lazy' => $lazyEdge]; } elseif ($argument instanceof ArgumentInterface) { $edges = array_merge($edges, $this->findEdges($id, $argument->getValues(), $required, $name, true)); } elseif ($argument instanceof Definition) { @@ -172,7 +172,7 @@ class GraphvizDumper extends Dumper */ private function findNodes() { - $nodes = array(); + $nodes = []; $container = $this->cloneContainer(); @@ -188,17 +188,17 @@ class GraphvizDumper extends Dumper } catch (ParameterNotFoundException $e) { } - $nodes[$id] = array('class' => str_replace('\\', '\\\\', $class), 'attributes' => array_merge($this->options['node.definition'], array('style' => $definition->isShared() ? 'filled' : 'dotted'))); + $nodes[$id] = ['class' => str_replace('\\', '\\\\', $class), 'attributes' => array_merge($this->options['node.definition'], ['style' => $definition->isShared() ? 'filled' : 'dotted'])]; $container->setDefinition($id, new Definition('stdClass')); } foreach ($container->getServiceIds() as $id) { - if (array_key_exists($id, $container->getAliases())) { + if (\array_key_exists($id, $container->getAliases())) { continue; } if (!$container->hasDefinition($id)) { - $nodes[$id] = array('class' => str_replace('\\', '\\\\', \get_class($container->get($id))), 'attributes' => $this->options['node.instance']); + $nodes[$id] = ['class' => str_replace('\\', '\\\\', \get_class($container->get($id))), 'attributes' => $this->options['node.instance']]; } } @@ -253,7 +253,7 @@ class GraphvizDumper extends Dumper */ private function addAttributes(array $attributes) { - $code = array(); + $code = []; foreach ($attributes as $k => $v) { $code[] = sprintf('%s="%s"', $k, $v); } @@ -270,7 +270,7 @@ class GraphvizDumper extends Dumper */ private function addOptions(array $options) { - $code = array(); + $code = []; foreach ($options as $k => $v) { $code[] = sprintf('%s="%s"', $k, $v); } @@ -299,7 +299,7 @@ class GraphvizDumper extends Dumper */ private function getAliases($id) { - $aliases = array(); + $aliases = []; foreach ($this->container->getAliases() as $alias => $origin) { if ($id == $origin) { $aliases[] = $alias; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index fd7eec05..0a1385ec 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -57,7 +57,7 @@ class PhpDumper extends Dumper private $variableCount; private $inlinedDefinitions; private $serviceCalls; - private $reservedVariables = array('instance', 'class', 'this'); + private $reservedVariables = ['instance', 'class', 'this']; private $expressionLanguage; private $targetDirRegex; private $targetDirMaxMatches; @@ -68,8 +68,8 @@ class PhpDumper extends Dumper private $asFiles; private $hotPathTag; private $inlineRequires; - private $inlinedRequires = array(); - private $circularReferences = array(); + private $inlinedRequires = []; + private $circularReferences = []; /** * @var ProxyDumper @@ -110,11 +110,11 @@ class PhpDumper extends Dumper * * @throws EnvParameterException When an env var exists but has not been dumped */ - public function dump(array $options = array()) + public function dump(array $options = []) { $this->targetDirRegex = null; - $this->inlinedRequires = array(); - $options = array_merge(array( + $this->inlinedRequires = []; + $options = array_merge([ 'class' => 'ProjectServiceContainer', 'base_class' => 'Container', 'namespace' => '', @@ -123,7 +123,7 @@ class PhpDumper extends Dumper 'hot_path_tag' => 'container.hot_path', 'inline_class_loader_parameter' => 'container.dumper.inline_class_loader', 'build_time' => time(), - ), $options); + ], $options); $this->namespace = $options['namespace']; $this->asFiles = $options['as_files']; @@ -155,17 +155,18 @@ class PhpDumper extends Dumper } (new AnalyzeServiceReferencesPass(false, !$this->getProxyDumper() instanceof NullDumper))->process($this->container); - $this->circularReferences = array(); - foreach (array(true, false) as $byConstructor) { - foreach ($this->container->getCompiler()->getServiceReferenceGraph()->getNodes() as $id => $node) { - if (!$node->getValue() instanceof Definition) { - continue; - } - $currentPath = array($id => true); - $this->analyzeCircularReferences($node->getOutEdges(), $currentPath, $id, $byConstructor); + $checkedNodes = []; + $this->circularReferences = []; + foreach ($this->container->getCompiler()->getServiceReferenceGraph()->getNodes() as $id => $node) { + if (!$node->getValue() instanceof Definition) { + continue; + } + if (!isset($checkedNodes[$id])) { + $this->analyzeCircularReferences($id, $node->getOutEdges(), $checkedNodes); } } $this->container->getCompiler()->getServiceReferenceGraph()->clear(); + $checkedNodes = []; $this->docStar = $options['debug'] ? '*' : ''; @@ -210,15 +211,15 @@ use Symfony\Component\DependencyInjection\Argument\RewindableGenerator; // This file has been auto-generated by the Symfony Dependency Injection Component for internal use. EOF; - $files = array(); + $files = []; if ($ids = array_keys($this->container->getRemovedIds())) { sort($ids); - $c = "doExport($id)." => true,\n"; } - $files['removed-ids.php'] = $c .= ");\n"; + $files['removed-ids.php'] = $c .= "];\n"; } foreach ($this->generateServiceFiles() as $file => $c) { @@ -229,7 +230,7 @@ EOF; } $files[$options['class'].'.php'] = $code; $hash = ucfirst(strtr(ContainerBuilder::hash($files), '._', 'xx')); - $code = array(); + $code = []; foreach ($files as $file => $c) { $code["Container{$hash}/{$file}"] = $c; @@ -257,11 +258,11 @@ if (!\\class_exists({$options['class']}::class, false)) { \\class_alias(\\Container{$hash}\\{$options['class']}::class, {$options['class']}::class, false); } -return new \\Container{$hash}\\{$options['class']}(array( +return new \\Container{$hash}\\{$options['class']}([ 'container.build_hash' => '$hash', 'container.build_id' => '$id', 'container.build_time' => $time, -), __DIR__.\\DIRECTORY_SEPARATOR.'Container{$hash}'); +], __DIR__.\\DIRECTORY_SEPARATOR.'Container{$hash}'); EOF; } else { @@ -271,10 +272,10 @@ EOF; } $this->targetDirRegex = null; - $this->inlinedRequires = array(); - $this->circularReferences = array(); + $this->inlinedRequires = []; + $this->circularReferences = []; - $unusedEnvs = array(); + $unusedEnvs = []; foreach ($this->container->getEnvCounters() as $env => $use) { if (!$use) { $unusedEnvs[] = $env; @@ -301,12 +302,12 @@ EOF; return $this->proxyDumper; } - private function analyzeCircularReferences(array $edges, &$currentPath, $sourceId, $byConstructor) + private function analyzeCircularReferences($sourceId, array $edges, &$checkedNodes, &$currentPath = []) { + $checkedNodes[$sourceId] = true; + $currentPath[$sourceId] = $sourceId; + foreach ($edges as $edge) { - if ($byConstructor && !$edge->isReferencedByConstructor()) { - continue; - } $node = $edge->getDestNode(); $id = $node->getId(); @@ -315,20 +316,42 @@ EOF; } elseif (isset($currentPath[$id])) { $currentId = $id; foreach (array_reverse($currentPath) as $parentId) { - if (!isset($this->circularReferences[$parentId][$currentId])) { - $this->circularReferences[$parentId][$currentId] = $byConstructor; - } + $this->circularReferences[$parentId][$currentId] = $currentId; if ($parentId === $id) { break; } $currentId = $parentId; } - } else { - $currentPath[$id] = $id; - $this->analyzeCircularReferences($node->getOutEdges(), $currentPath, $id, $byConstructor); - unset($currentPath[$id]); + } elseif (!isset($checkedNodes[$id])) { + $this->analyzeCircularReferences($id, $node->getOutEdges(), $checkedNodes, $currentPath); + } elseif (isset($this->circularReferences[$id])) { + $this->connectCircularReferences($id, $currentPath); } } + unset($currentPath[$sourceId]); + } + + private function connectCircularReferences($sourceId, &$currentPath, &$subPath = []) + { + $subPath[$sourceId] = $sourceId; + $currentPath[$sourceId] = $sourceId; + + foreach ($this->circularReferences[$sourceId] as $id) { + if (isset($currentPath[$id])) { + $currentId = $id; + foreach (array_reverse($currentPath) as $parentId) { + $this->circularReferences[$parentId][$currentId] = $currentId; + if ($parentId === $id) { + break; + } + $currentId = $parentId; + } + } elseif (!isset($subPath[$id]) && isset($this->circularReferences[$id])) { + $this->connectCircularReferences($id, $currentPath, $subPath); + } + } + unset($currentPath[$sourceId]); + unset($subPath[$sourceId]); } private function collectLineage($class, array &$lineage) @@ -364,7 +387,7 @@ EOF; private function generateProxyClasses() { - $alreadyGenerated = array(); + $alreadyGenerated = []; $definitions = $this->container->getDefinitions(); $strip = '' === $this->docStar && method_exists('Symfony\Component\HttpKernel\Kernel', 'stripComments'); $proxyDumper = $this->getProxyDumper(); @@ -400,7 +423,7 @@ EOF; $code = ''; if ($this->inlineRequires && !$this->isHotPath($definition)) { - $lineage = array(); + $lineage = []; foreach ($this->inlinedDefinitions as $def) { if (!$def->isDeprecated() && \is_string($class = \is_array($factory = $def->getFactory()) && \is_string($factory[0]) ? $factory[0] : $def->getClass())) { $this->collectLineage($class, $lineage); @@ -532,7 +555,7 @@ EOF; { $calls = ''; foreach ($definition->getMethodCalls() as $call) { - $arguments = array(); + $arguments = []; foreach ($call[1] as $value) { $arguments[] = $this->dumpValue($value); } @@ -569,7 +592,8 @@ EOF; if (\is_array($callable)) { if ($callable[0] instanceof Reference - || ($callable[0] instanceof Definition && $this->definitionVariables->contains($callable[0]))) { + || ($callable[0] instanceof Definition && $this->definitionVariables->contains($callable[0])) + ) { return sprintf(" %s->%s(\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName); } @@ -583,7 +607,7 @@ EOF; return sprintf(" (%s)->%s(\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName); } - return sprintf(" \\call_user_func(array(%s, '%s'), \$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName); + return sprintf(" \\call_user_func([%s, '%s'], \$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName); } return sprintf(" %s(\$%s);\n", $callable, $variableName); @@ -601,11 +625,11 @@ EOF; private function addService($id, Definition $definition, &$file = null) { $this->definitionVariables = new \SplObjectStorage(); - $this->referenceVariables = array(); + $this->referenceVariables = []; $this->variableCount = 0; $this->referenceVariables[$id] = new Variable('instance'); - $return = array(); + $return = []; if ($class = $definition->getClass()) { $class = $class instanceof Parameter ? '%'.$class.'%' : $this->container->resolveEnvPlaceholders($class); @@ -637,6 +661,7 @@ EOF; $autowired = $definition->isAutowired() ? ' autowired' : ''; if ($definition->isLazy()) { + unset($this->circularReferences[$id]); $lazyInitialization = '$lazyLoad = true'; } else { $lazyInitialization = ''; @@ -661,8 +686,8 @@ EOF; EOF; } - $this->serviceCalls = array(); - $this->inlinedDefinitions = $this->getDefinitionsFromArguments(array($definition), null, $this->serviceCalls); + $this->serviceCalls = []; + $this->inlinedDefinitions = $this->getDefinitionsFromArguments([$definition], null, $this->serviceCalls); $code .= $this->addServiceInclude($id, $definition); @@ -724,7 +749,7 @@ EOF; $hasSelfRef = isset($this->circularReferences[$id][$targetId]); $forConstructor = $forConstructor && !isset($this->definitionVariables[$definition]); - $code = $hasSelfRef && $this->circularReferences[$id][$targetId] && !$forConstructor ? $this->addInlineService($id, $definition, $definition) : ''; + $code = $hasSelfRef && !$forConstructor ? $this->addInlineService($id, $definition, $definition) : ''; if (isset($this->referenceVariables[$targetId]) || (2 > $callCount && (!$hasSelfRef || !$forConstructor))) { return $code; @@ -763,11 +788,11 @@ EOTXT return ''; } - $arguments = array($inlineDef->getArguments(), $inlineDef->getFactory()); + $arguments = [$inlineDef->getArguments(), $inlineDef->getFactory()]; $code = $this->addInlineVariables($id, $definition, $arguments, $forConstructor); - if ($arguments = array_filter(array($inlineDef->getProperties(), $inlineDef->getMethodCalls(), $inlineDef->getConfigurator()))) { + if ($arguments = array_filter([$inlineDef->getProperties(), $inlineDef->getMethodCalls(), $inlineDef->getConfigurator()])) { $isSimpleInstance = false; } elseif ($definition !== $inlineDef && 2 > $this->inlinedDefinitions[$inlineDef]) { return $code; @@ -845,7 +870,7 @@ EOTXT $class = $this->dumpValue($definition->getClass()); $return = ' '.$return.$instantiation; - $arguments = array(); + $arguments = []; foreach ($definition->getArguments() as $value) { $arguments[] = $this->dumpValue($value); } @@ -876,7 +901,7 @@ EOTXT return $return.sprintf("(%s)->%s(%s);\n", $class, $callable[1], $arguments ? implode(', ', $arguments) : ''); } - return $return.sprintf("\\call_user_func(array(%s, '%s')%s);\n", $class, $callable[1], $arguments ? ', '.implode(', ', $arguments) : ''); + return $return.sprintf("\\call_user_func([%s, '%s']%s);\n", $class, $callable[1], $arguments ? ', '.implode(', ', $arguments) : ''); } return $return.sprintf("%s(%s);\n", $this->dumpLiteralClass($this->dumpValue($callable)), $arguments ? implode(', ', $arguments) : ''); @@ -923,7 +948,7 @@ $bagClass class $class extends $baseClass { private \$parameters; - private \$targetDirs = array(); + private \$targetDirs = []; public function __construct() { @@ -941,7 +966,7 @@ EOF; } if ($this->asFiles) { $code = str_replace('$parameters', "\$buildParameters;\n private \$containerDir;\n private \$parameters", $code); - $code = str_replace('__construct()', '__construct(array $buildParameters = array(), $containerDir = __DIR__)', $code); + $code = str_replace('__construct()', '__construct(array $buildParameters = [], $containerDir = __DIR__)', $code); $code .= " \$this->buildParameters = \$buildParameters;\n"; $code .= " \$this->containerDir = \$containerDir;\n"; } @@ -963,7 +988,7 @@ EOF; $code .= " \$this->parameters = \$this->getDefaultParameters();\n\n"; } - $code .= " \$this->services = array();\n"; + $code .= " \$this->services = [];\n"; } else { $arguments = $this->container->getParameterBag()->all() ? 'new ParameterBag($this->getDefaultParameters())' : null; $code .= " parent::__construct($arguments);\n"; @@ -1061,7 +1086,7 @@ EOF; } } - return $code ? " \$this->normalizedIds = array(\n".$code." );\n" : ''; + return $code ? " \$this->normalizedIds = [\n".$code." ];\n" : ''; } /** @@ -1080,7 +1105,7 @@ EOF; } } - return $code ? " \$this->syntheticIds = array(\n{$code} );\n" : ''; + return $code ? " \$this->syntheticIds = [\n{$code} ];\n" : ''; } /** @@ -1106,7 +1131,7 @@ EOF; $code .= ' '.$this->doExport($id)." => true,\n"; } - $code = "array(\n{$code} )"; + $code = "[\n{$code} ]"; } return <<methodMap = array(\n{$code} );\n" : ''; + return $code ? " \$this->methodMap = [\n{$code} ];\n" : ''; } /** @@ -1154,7 +1179,7 @@ EOF; } } - return $code ? " \$this->fileMap = array(\n{$code} );\n" : ''; + return $code ? " \$this->fileMap = [\n{$code} ];\n" : ''; } /** @@ -1186,9 +1211,9 @@ EOF; return ''; } - $out = " \$this->privates = array(\n"; + $out = " \$this->privates = [\n"; $out .= $code; - $out .= " );\n"; + $out .= " ];\n"; return $out; } @@ -1201,10 +1226,10 @@ EOF; private function addAliases() { if (!$aliases = $this->container->getAliases()) { - return $this->container->isCompiled() ? "\n \$this->aliases = array();\n" : ''; + return $this->container->isCompiled() ? "\n \$this->aliases = [];\n" : ''; } - $code = " \$this->aliases = array(\n"; + $code = " \$this->aliases = [\n"; ksort($aliases); foreach ($aliases as $alias => $id) { $id = $this->container->normalizeId($id); @@ -1214,7 +1239,7 @@ EOF; $code .= ' '.$this->doExport($alias).' => '.$this->doExport($id).",\n"; } - return $code." );\n"; + return $code." ];\n"; } private function addInlineRequires() @@ -1223,11 +1248,11 @@ EOF; return ''; } - $lineage = array(); + $lineage = []; foreach ($this->container->findTaggedServiceIds($this->hotPathTag) as $id => $tags) { $definition = $this->container->getDefinition($id); - $inlinedDefinitions = $this->getDefinitionsFromArguments(array($definition)); + $inlinedDefinitions = $this->getDefinitionsFromArguments([$definition]); foreach ($inlinedDefinitions as $def) { if (\is_string($class = \is_array($factory = $def->getFactory()) && \is_string($factory[0]) ? $factory[0] : $def->getClass())) { @@ -1259,9 +1284,9 @@ EOF; return ''; } - $php = array(); - $dynamicPhp = array(); - $normalizedParams = array(); + $php = []; + $dynamicPhp = []; + $normalizedParams = []; foreach ($this->container->getParameterBag()->all() as $key => $value) { if ($key !== $resolvedKey = $this->container->resolveEnvPlaceholders($key)) { @@ -1270,8 +1295,8 @@ EOF; if ($key !== $lcKey = strtolower($key)) { $normalizedParams[] = sprintf(' %s => %s,', $this->export($lcKey), $this->export($key)); } - $export = $this->exportParameters(array($value)); - $export = explode('0 => ', substr(rtrim($export, " )\n"), 7, -1), 2); + $export = $this->exportParameters([$value]); + $export = explode('0 => ', substr(rtrim($export, " ]\n"), 2, -1), 2); if (preg_match("/\\\$this->(?:getEnv\('(?:\w++:)*+\w++'\)|targetDirs\[\d++\])/", $export[1])) { $dynamicPhp[$key] = sprintf('%scase %s: $value = %s; break;', $export[0], $this->export($key), $export[1]); @@ -1279,7 +1304,8 @@ EOF; $php[] = sprintf('%s%s => %s,', $export[0], $this->export($key), $export[1]); } } - $parameters = sprintf("array(\n%s\n%s)", implode("\n", $php), str_repeat(' ', 8)); + + $parameters = sprintf("[\n%s\n%s]", implode("\n", $php), str_repeat(' ', 8)); $code = ''; if ($this->container->isCompiled()) { @@ -1355,14 +1381,14 @@ EOF; EOF; $getDynamicParameter = sprintf($getDynamicParameter, implode("\n", $dynamicPhp)); } else { - $loadedDynamicParameters = 'array()'; + $loadedDynamicParameters = '[]'; $getDynamicParameter = str_repeat(' ', 8).'throw new InvalidArgumentException(sprintf(\'The dynamic parameter "%s" must be defined.\', $name));'; } $code .= <<docStar} * Computes a dynamic parameter. @@ -1381,7 +1407,7 @@ EOF; EOF; - $code .= ' private $normalizedParameterNames = '.($normalizedParams ? sprintf("array(\n%s\n );", implode("\n", $normalizedParams)) : 'array();')."\n"; + $code .= ' private $normalizedParameterNames = '.($normalizedParams ? sprintf("[\n%s\n ];", implode("\n", $normalizedParams)) : '[];')."\n"; $code .= <<<'EOF' private function normalizeParameterName($name) @@ -1433,7 +1459,7 @@ EOF; */ private function exportParameters(array $parameters, $path = '', $indent = 12) { - $php = array(); + $php = []; foreach ($parameters as $key => $value) { if (\is_array($value)) { $value = $this->exportParameters($value, $path.'/'.$key, $indent + 4); @@ -1454,7 +1480,7 @@ EOF; $php[] = sprintf('%s%s => %s,', str_repeat(' ', $indent), $this->export($key), $value); } - return sprintf("array(\n%s\n%s)", implode("\n", $php), str_repeat(' ', $indent - 4)); + return sprintf("[\n%s\n%s]", implode("\n", $php), str_repeat(' ', $indent - 4)); } /** @@ -1499,7 +1525,7 @@ EOF; */ private function getServiceConditionals($value) { - $conditions = array(); + $conditions = []; foreach (ContainerBuilder::getInitializedConditionals($value) as $service) { if (!$this->container->hasDefinition($service)) { return 'false'; @@ -1521,7 +1547,7 @@ EOF; return implode(' && ', $conditions); } - private function getDefinitionsFromArguments(array $arguments, \SplObjectStorage $definitions = null, array &$calls = array()) + private function getDefinitionsFromArguments(array $arguments, \SplObjectStorage $definitions = null, array &$calls = []) { if (null === $definitions) { $definitions = new \SplObjectStorage(); @@ -1534,7 +1560,7 @@ EOF; $id = $this->container->normalizeId($argument); if (!isset($calls[$id])) { - $calls[$id] = array(0, $argument->getInvalidBehavior()); + $calls[$id] = [0, $argument->getInvalidBehavior()]; } else { $calls[$id][1] = min($calls[$id][1], $argument->getInvalidBehavior()); } @@ -1546,7 +1572,7 @@ EOF; $definitions[$argument] = 1 + $definitions[$argument]; } else { $definitions[$argument] = 1; - $arguments = array($argument->getArguments(), $argument->getFactory(), $argument->getProperties(), $argument->getMethodCalls(), $argument->getConfigurator()); + $arguments = [$argument->getArguments(), $argument->getFactory(), $argument->getProperties(), $argument->getMethodCalls(), $argument->getConfigurator()]; $this->getDefinitionsFromArguments($arguments, $definitions, $calls); } } @@ -1570,14 +1596,14 @@ EOF; if ($value && $interpolate && false !== $param = array_search($value, $this->container->getParameterBag()->all(), true)) { return $this->dumpValue("%$param%"); } - $code = array(); + $code = []; foreach ($value as $k => $v) { $code[] = sprintf('%s => %s', $this->dumpValue($k, $interpolate), $this->dumpValue($v, $interpolate)); } - return sprintf('array(%s)', implode(', ', $code)); + return sprintf('[%s]', implode(', ', $code)); } elseif ($value instanceof ArgumentInterface) { - $scope = array($this->definitionVariables, $this->referenceVariables); + $scope = [$this->definitionVariables, $this->referenceVariables]; $this->definitionVariables = $this->referenceVariables = null; try { @@ -1595,14 +1621,14 @@ EOF; } if ($value instanceof IteratorArgument) { - $operands = array(0); - $code = array(); + $operands = [0]; + $code = []; $code[] = 'new RewindableGenerator(function () {'; if (!$values = $value->getValues()) { $code[] = ' return new \EmptyIterator();'; } else { - $countCode = array(); + $countCode = []; $countCode[] = 'function () {'; foreach ($values as $k => $v) { @@ -1640,7 +1666,7 @@ EOF; throw new RuntimeException('Cannot dump definitions which have a configurator.'); } - $arguments = array(); + $arguments = []; foreach ($value->getArguments() as $argument) { $arguments[] = $this->dumpValue($argument); } @@ -1667,7 +1693,7 @@ EOF; return sprintf('(%s)->%s(%s)', $class, $factory[1], implode(', ', $arguments)); } - return sprintf("\\call_user_func(array(%s, '%s')%s)", $class, $factory[1], \count($arguments) > 0 ? ', '.implode(', ', $arguments) : ''); + return sprintf("\\call_user_func([%s, '%s']%s)", $class, $factory[1], \count($arguments) > 0 ? ', '.implode(', ', $arguments) : ''); } if ($factory[0] instanceof Reference) { @@ -1694,7 +1720,7 @@ EOF; return $this->getServiceCall($id, $value); } elseif ($value instanceof Expression) { - return $this->getExpressionLanguage()->compile((string) $value, array('this' => 'container')); + return $this->getExpressionLanguage()->compile((string) $value, ['this' => 'container']); } elseif ($value instanceof Parameter) { return $this->dumpParameter($value); } elseif (true === $interpolate && \is_string($value)) { @@ -1798,6 +1824,7 @@ EOF; if ($definition->isShared()) { $code = sprintf('$this->services[\'%s\'] = %s', $id, $code); } + $code = "($code)"; } elseif ($this->asFiles && $definition->isShared() && !$this->isHotPath($definition)) { $code = sprintf("\$this->load('%s.php')", $this->generateMethodName($id)); } else { @@ -1823,8 +1850,8 @@ EOF; */ private function initializeMethodNamesMap($class) { - $this->serviceIdToMethodNameMap = array(); - $this->usedMethodNames = array(); + $this->serviceIdToMethodNameMap = []; + $this->usedMethodNames = []; if ($reflectionClass = $this->container->getReflectionClass($class)) { foreach ($reflectionClass->getMethods() as $method) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php index 1dcef12d..36e3e121 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php @@ -40,7 +40,7 @@ class XmlDumper extends Dumper * * @return string An xml string representing of the service container */ - public function dump(array $options = array()) + public function dump(array $options = []) { $this->document = new \DOMDocument('1.0', 'utf-8'); $this->document->formatOutput = true; @@ -306,7 +306,7 @@ class XmlDumper extends Dumper $text = $this->document->createTextNode(self::phpToXml((string) $value)); $element->appendChild($text); } else { - if (\in_array($value, array('null', 'true', 'false'), true)) { + if (\in_array($value, ['null', 'true', 'false'], true)) { $element->setAttribute('type', 'string'); } $text = $this->document->createTextNode(self::phpToXml($value)); @@ -323,7 +323,7 @@ class XmlDumper extends Dumper */ private function escape(array $arguments) { - $args = array(); + $args = []; foreach ($arguments as $k => $v) { if (\is_array($v)) { $args[$k] = $this->escape($v); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php index 35441023..8f3fcddf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php @@ -41,7 +41,7 @@ class YamlDumper extends Dumper * * @return string A YAML string representing of the service container */ - public function dump(array $options = array()) + public function dump(array $options = []) { if (!class_exists('Symfony\Component\Yaml\Dumper')) { throw new RuntimeException('Unable to dump the container as the Symfony Yaml Component is not installed.'); @@ -80,7 +80,7 @@ class YamlDumper extends Dumper $tagsCode = ''; foreach ($definition->getTags() as $name => $tags) { foreach ($tags as $attributes) { - $att = array(); + $att = []; foreach ($attributes as $key => $value) { $att[] = sprintf('%s: %s', $this->dumper->dump($key), $this->dumper->dump($value)); } @@ -224,7 +224,7 @@ class YamlDumper extends Dumper $parameters = $this->prepareParameters($this->container->getParameterBag()->all(), $this->container->isCompiled()); - return $this->dumper->dump(array('parameters' => $parameters), 2); + return $this->dumper->dump(['parameters' => $parameters], 2); } /** @@ -238,9 +238,9 @@ class YamlDumper extends Dumper { if (\is_array($callable)) { if ($callable[0] instanceof Reference) { - $callable = array($this->getServiceCall((string) $callable[0], $callable[0]), $callable[1]); + $callable = [$this->getServiceCall((string) $callable[0], $callable[0]), $callable[1]]; } else { - $callable = array($callable[0], $callable[1]); + $callable = [$callable[0], $callable[1]]; } } @@ -275,7 +275,7 @@ class YamlDumper extends Dumper } if (\is_array($value)) { - $code = array(); + $code = []; foreach ($value as $k => $v) { $code[$k] = $this->dumpValue($v); } @@ -344,7 +344,7 @@ class YamlDumper extends Dumper */ private function prepareParameters(array $parameters, $escape = true) { - $filtered = array(); + $filtered = []; foreach ($parameters as $key => $value) { if (\is_array($value)) { $value = $this->prepareParameters($value, $escape); @@ -365,7 +365,7 @@ class YamlDumper extends Dumper */ private function escape(array $arguments) { - $args = array(); + $args = []; foreach ($arguments as $k => $v) { if (\is_array($v)) { $args[$k] = $this->escape($v); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php index 13568079..a23b8343 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php @@ -32,7 +32,7 @@ class EnvVarProcessor implements EnvVarProcessorInterface */ public static function getProvidedTypes() { - return array( + return [ 'base64' => 'string', 'bool' => 'bool', 'const' => 'bool|int|float|string|array', @@ -42,7 +42,7 @@ class EnvVarProcessor implements EnvVarProcessorInterface 'json' => 'array', 'resolve' => 'string', 'string' => 'string', - ); + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ParameterNotFoundException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ParameterNotFoundException.php index 7a30f629..b08f2e85 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ParameterNotFoundException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ParameterNotFoundException.php @@ -32,7 +32,7 @@ class ParameterNotFoundException extends InvalidArgumentException * @param string[] $alternatives Some parameter name alternatives * @param string|null $nonNestedAlternative The alternative parameter name when the user expected dot notation for nested parameters */ - public function __construct($key, $sourceId = null, $sourceKey = null, \Exception $previous = null, array $alternatives = array(), $nonNestedAlternative = null) + public function __construct($key, $sourceId = null, $sourceKey = null, \Exception $previous = null, array $alternatives = [], $nonNestedAlternative = null) { $this->key = $key; $this->sourceId = $sourceId; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ServiceNotFoundException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ServiceNotFoundException.php index 9a0128c8..280dabf3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ServiceNotFoundException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ServiceNotFoundException.php @@ -24,7 +24,7 @@ class ServiceNotFoundException extends InvalidArgumentException implements NotFo private $sourceId; private $alternatives; - public function __construct($id, $sourceId = null, \Exception $previous = null, array $alternatives = array(), $msg = null) + public function __construct($id, $sourceId = null, \Exception $previous = null, array $alternatives = [], $msg = null) { if (null !== $msg) { // no-op diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ExpressionLanguage.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ExpressionLanguage.php index 051d41b8..0c1780b8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ExpressionLanguage.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ExpressionLanguage.php @@ -25,7 +25,7 @@ class ExpressionLanguage extends BaseExpressionLanguage /** * {@inheritdoc} */ - public function __construct($cache = null, array $providers = array(), callable $serviceCompiler = null) + public function __construct($cache = null, array $providers = [], callable $serviceCompiler = null) { // prepend the default provider to let users override it easily array_unshift($providers, new ExpressionLanguageProvider($serviceCompiler)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ExpressionLanguageProvider.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ExpressionLanguageProvider.php index e2084aa8..9198ca0a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ExpressionLanguageProvider.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ExpressionLanguageProvider.php @@ -33,7 +33,7 @@ class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface public function getFunctions() { - return array( + return [ new ExpressionFunction('service', $this->serviceCompiler ?: function ($arg) { return sprintf('$this->get(%s)', $arg); }, function (array $variables, $value) { @@ -45,6 +45,6 @@ class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface }, function (array $variables, $value) { return $variables['container']->getParameter($value); }), - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Extension/Extension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Extension/Extension.php index 1bafdbeb..a9389862 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Extension/Extension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Extension/Extension.php @@ -25,7 +25,7 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; */ abstract class Extension implements ExtensionInterface, ConfigurationExtensionInterface { - private $processedConfigs = array(); + private $processedConfigs = []; /** * {@inheritdoc} @@ -104,7 +104,7 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn try { return $this->processedConfigs; } finally { - $this->processedConfigs = array(); + $this->processedConfigs = []; } } @@ -115,7 +115,7 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn */ protected function isConfigEnabled(ContainerBuilder $container, array $config) { - if (!array_key_exists('enabled', $config)) { + if (!\array_key_exists('enabled', $config)) { throw new InvalidArgumentException("The config array has no 'enabled' key."); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/RealServiceInstantiator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/RealServiceInstantiator.php index 3b0b57ef..532e7686 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/RealServiceInstantiator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/RealServiceInstantiator.php @@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\Definition; /** * {@inheritdoc} * - * Noop proxy instantiator - simply produces the real service instead of a proxy instance. + * Noop proxy instantiator - produces the real service instead of a proxy instance. * * @author Marco Pivetta */ diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/AbstractConfigurator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/AbstractConfigurator.php index d11347ae..f7222d0e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/AbstractConfigurator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/AbstractConfigurator.php @@ -28,7 +28,7 @@ abstract class AbstractConfigurator public function __call($method, $args) { if (method_exists($this, 'set'.$method)) { - return \call_user_func_array(array($this, 'set'.$method), $args); + return \call_user_func_array([$this, 'set'.$method], $args); } throw new \BadMethodCallException(sprintf('Call to undefined method %s::%s()', \get_class($this), $method)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/AbstractServiceConfigurator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/AbstractServiceConfigurator.php index 40b6c2f3..0a565787 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/AbstractServiceConfigurator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/AbstractServiceConfigurator.php @@ -18,9 +18,9 @@ abstract class AbstractServiceConfigurator extends AbstractConfigurator { protected $parent; protected $id; - private $defaultTags = array(); + private $defaultTags = []; - public function __construct(ServicesConfigurator $parent, Definition $definition, $id = null, array $defaultTags = array()) + public function __construct(ServicesConfigurator $parent, Definition $definition, $id = null, array $defaultTags = []) { $this->parent = $parent; $this->definition = $definition; @@ -36,7 +36,7 @@ abstract class AbstractServiceConfigurator extends AbstractConfigurator $this->definition->addTag($name, $attributes); } } - $this->defaultTags = array(); + $this->defaultTags = []; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php index 631c92a6..662ba95d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php @@ -37,7 +37,7 @@ class DefaultsConfigurator extends AbstractServiceConfigurator * * @throws InvalidArgumentException when an invalid tag name or attribute is provided */ - final public function tag($name, array $attributes = array()) + final public function tag($name, array $attributes = []) { if (!\is_string($name) || '' === $name) { throw new InvalidArgumentException('The tag name in "_defaults" must be a non-empty string.'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/PrototypeConfigurator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/PrototypeConfigurator.php index 76e7829e..d80c8b13 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/PrototypeConfigurator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/PrototypeConfigurator.php @@ -49,7 +49,7 @@ class PrototypeConfigurator extends AbstractServiceConfigurator $definition->setAutowired($defaults->isAutowired()); $definition->setAutoconfigured($defaults->isAutoconfigured()); $definition->setBindings($defaults->getBindings()); - $definition->setChanges(array()); + $definition->setChanges([]); $this->loader = $loader; $this->resource = $resource; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/ServicesConfigurator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/ServicesConfigurator.php index c9673b6c..e7677eb5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/ServicesConfigurator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/ServicesConfigurator.php @@ -38,7 +38,7 @@ class ServicesConfigurator extends AbstractConfigurator $this->container = $container; $this->loader = $loader; $this->instanceof = &$instanceof; - $instanceof = array(); + $instanceof = []; } /** @@ -83,7 +83,7 @@ class ServicesConfigurator extends AbstractConfigurator $definition->setAutowired($defaults->isAutowired()); $definition->setAutoconfigured($defaults->isAutoconfigured()); $definition->setBindings($defaults->getBindings()); - $definition->setChanges(array()); + $definition->setChanges([]); $configurator = new ServiceConfigurator($this->container, $this->instanceof, $allowParent, $this, $definition, $id, $defaults->getTags()); @@ -136,7 +136,7 @@ class ServicesConfigurator extends AbstractConfigurator $allowParent = !$this->defaults->getChanges() && empty($this->instanceof); $definition = $this->container->getDefinition($id); - return new ServiceConfigurator($this->container, $definition->getInstanceofConditionals(), $allowParent, $this, $definition, $id, array()); + return new ServiceConfigurator($this->container, $definition->getInstanceofConditionals(), $allowParent, $this, $definition, $id, []); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/CallTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/CallTrait.php index abc14e21..8e6b17a1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/CallTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/CallTrait.php @@ -25,7 +25,7 @@ trait CallTrait * * @throws InvalidArgumentException on empty $method param */ - final public function call($method, array $arguments = array()) + final public function call($method, array $arguments = []) { $this->definition->addMethodCall($method, static::processValue($arguments, true)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/TagTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/TagTrait.php index c165b650..d17339f8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/TagTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/TagTrait.php @@ -23,7 +23,7 @@ trait TagTrait * * @return $this */ - final public function tag($name, array $attributes = array()) + final public function tag($name, array $attributes = []) { if (!\is_string($name) || '' === $name) { throw new InvalidArgumentException(sprintf('The tag name for service "%s" must be a non-empty string.', $this->id)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php index d5e2327e..a428c6e3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php @@ -28,7 +28,7 @@ abstract class FileLoader extends BaseFileLoader { protected $container; protected $isLoadingInstanceof = false; - protected $instanceof = array(); + protected $instanceof = []; public function __construct(ContainerBuilder $container, FileLocatorInterface $locator) { @@ -57,8 +57,8 @@ abstract class FileLoader extends BaseFileLoader $classes = $this->findClasses($namespace, $resource, $exclude); // prepare for deep cloning $serializedPrototype = serialize($prototype); - $interfaces = array(); - $singlyImplemented = array(); + $interfaces = []; + $singlyImplemented = []; foreach ($classes as $class => $errorMessage) { if (interface_exists($class, false)) { @@ -105,7 +105,7 @@ abstract class FileLoader extends BaseFileLoader { $parameterBag = $this->container->getParameterBag(); - $excludePaths = array(); + $excludePaths = []; $excludePrefix = null; if ($excludePattern) { $excludePattern = $parameterBag->unescapeValue($parameterBag->resolveValue($excludePattern)); @@ -120,7 +120,7 @@ abstract class FileLoader extends BaseFileLoader } $pattern = $parameterBag->unescapeValue($parameterBag->resolveValue($pattern)); - $classes = array(); + $classes = []; $extRegexp = \defined('HHVM_VERSION') ? '/\\.(?:php|hh)$/' : '/\\.php$/'; $prefixLen = null; foreach ($this->glob($pattern, true, $resource) as $path => $info) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php index 2ee9ea8f..307a3eef 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php @@ -32,7 +32,7 @@ class IniFileLoader extends FileLoader // first pass to catch parsing errors $result = parse_ini_file($path, true); - if (false === $result || array() === $result) { + if (false === $result || [] === $result) { throw new InvalidArgumentException(sprintf('The "%s" file is not valid.', $resource)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php index 4236b72f..fd2a20a8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -63,7 +63,7 @@ class XmlFileLoader extends FileLoader try { $this->parseDefinitions($xml, $path, $defaults); } finally { - $this->instanceof = array(); + $this->instanceof = []; } } @@ -134,11 +134,11 @@ class XmlFileLoader extends FileLoader } $this->setCurrentDir(\dirname($file)); - $this->instanceof = array(); + $this->instanceof = []; $this->isLoadingInstanceof = true; $instanceof = $xpath->query('//container:services/container:instanceof'); foreach ($instanceof as $service) { - $this->setDefinition((string) $service->getAttribute('id'), $this->parseDefinition($service, $file, array())); + $this->setDefinition((string) $service->getAttribute('id'), $this->parseDefinition($service, $file, [])); } $this->isLoadingInstanceof = false; @@ -164,12 +164,12 @@ class XmlFileLoader extends FileLoader $xpath->registerNamespace('container', self::NS); if (null === $defaultsNode = $xpath->query('//container:services/container:defaults')->item(0)) { - return array(); + return []; } - $defaults = array( + $defaults = [ 'tags' => $this->getChildren($defaultsNode, 'tag'), 'bind' => array_map(function ($v) { return new BoundArgument($v); }, $this->getArgumentsAsPhp($defaultsNode, 'bind', $file)), - ); + ]; foreach ($defaults['tags'] as $tag) { if ('' === $tag->getAttribute('name')) { @@ -253,10 +253,10 @@ class XmlFileLoader extends FileLoader $definition->setAutoconfigured($defaults['autoconfigure']); } - $definition->setChanges(array()); + $definition->setChanges([]); } - foreach (array('class', 'public', 'shared', 'synthetic', 'lazy', 'abstract') as $key) { + foreach (['class', 'public', 'shared', 'synthetic', 'lazy', 'abstract'] as $key) { if ($value = $service->getAttribute($key)) { $method = 'set'.$key; $definition->$method(XmlUtils::phpize($value)); @@ -297,7 +297,7 @@ class XmlFileLoader extends FileLoader $class = $factory->hasAttribute('class') ? $factory->getAttribute('class') : null; } - $definition->setFactory(array($class, $factory->getAttribute('method'))); + $definition->setFactory([$class, $factory->getAttribute('method')]); } } @@ -312,7 +312,7 @@ class XmlFileLoader extends FileLoader $class = $configurator->getAttribute('class'); } - $definition->setConfigurator(array($class, $configurator->getAttribute('method'))); + $definition->setConfigurator([$class, $configurator->getAttribute('method')]); } } @@ -327,13 +327,13 @@ class XmlFileLoader extends FileLoader } foreach ($tags as $tag) { - $parameters = array(); + $parameters = []; foreach ($tag->attributes as $name => $node) { if ('name' === $name) { continue; } - if (false !== strpos($name, '-') && false === strpos($name, '_') && !array_key_exists($normalizedName = str_replace('-', '_', $name), $parameters)) { + if (false !== strpos($name, '-') && false === strpos($name, '_') && !\array_key_exists($normalizedName = str_replace('-', '_', $name), $parameters)) { $parameters[$normalizedName] = XmlUtils::phpize($node->nodeValue); } // keep not normalized key @@ -381,9 +381,9 @@ class XmlFileLoader extends FileLoader private function parseFileToDOM($file) { try { - $dom = XmlUtils::loadFile($file, array($this, 'validateSchema')); + $dom = XmlUtils::loadFile($file, [$this, 'validateSchema']); } catch (\InvalidArgumentException $e) { - throw new InvalidArgumentException(sprintf('Unable to parse file "%s".', $file), $e->getCode(), $e); + throw new InvalidArgumentException(sprintf('Unable to parse file "%s": %s', $file, $e->getMessage()), $e->getCode(), $e); } $this->validateExtensions($dom, $file); @@ -400,7 +400,7 @@ class XmlFileLoader extends FileLoader */ private function processAnonymousServices(\DOMDocument $xml, $file, $defaults) { - $definitions = array(); + $definitions = []; $count = 0; $suffix = '~'.ContainerBuilder::hash($file); @@ -416,7 +416,7 @@ class XmlFileLoader extends FileLoader $node->setAttribute('id', $id); $node->setAttribute('service', $id); - $definitions[$id] = array($services[0], $file, false); + $definitions[$id] = [$services[0], $file, false]; $services[0]->setAttribute('id', $id); // anonymous services are always private @@ -434,14 +434,14 @@ class XmlFileLoader extends FileLoader // give it a unique name $id = sprintf('%d_%s', ++$count, preg_replace('/^.*\\\\/', '', $node->getAttribute('class')).$suffix); $node->setAttribute('id', $id); - $definitions[$id] = array($node, $file, true); + $definitions[$id] = [$node, $file, true]; } } // resolve definitions uksort($definitions, 'strnatcmp'); foreach (array_reverse($definitions) as $id => list($domElement, $file, $wild)) { - if (null !== $definition = $this->parseDefinition($domElement, $file, $wild ? $defaults : array())) { + if (null !== $definition = $this->parseDefinition($domElement, $file, $wild ? $defaults : [])) { $this->setDefinition($id, $definition); } @@ -465,7 +465,7 @@ class XmlFileLoader extends FileLoader */ private function getArgumentsAsPhp(\DOMElement $node, $name, $file, $lowercase = true, $isChildDefinition = false) { - $arguments = array(); + $arguments = []; foreach ($this->getChildren($node, $name) as $arg) { if ($arg->hasAttribute('name')) { $arg->setAttribute('key', $arg->getAttribute('name')); @@ -496,7 +496,7 @@ class XmlFileLoader extends FileLoader switch ($arg->getAttribute('type')) { case 'service': - if (!$arg->getAttribute('id')) { + if ('' === $arg->getAttribute('id')) { throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="service" has no or empty "id" attribute in "%s".', $name, $file)); } if ($arg->hasAttribute('strict')) { @@ -549,11 +549,11 @@ class XmlFileLoader extends FileLoader * @param \DOMNode $node * @param mixed $name * - * @return array + * @return \DOMElement[] */ private function getChildren(\DOMNode $node, $name) { - $children = array(); + $children = []; foreach ($node->childNodes as $child) { if ($child instanceof \DOMElement && $child->localName === $name && self::NS === $child->namespaceURI) { $children[] = $child; @@ -574,7 +574,7 @@ class XmlFileLoader extends FileLoader */ public function validateSchema(\DOMDocument $dom) { - $schemaLocations = array('http://symfony.com/schema/dic/services' => str_replace('\\', '/', __DIR__.'/schema/dic/services/services-1.0.xsd')); + $schemaLocations = ['http://symfony.com/schema/dic/services' => str_replace('\\', '/', __DIR__.'/schema/dic/services/services-1.0.xsd')]; if ($element = $dom->documentElement->getAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'schemaLocation')) { $items = preg_split('/\s+/', $element); @@ -595,7 +595,7 @@ class XmlFileLoader extends FileLoader } } - $tmpfiles = array(); + $tmpfiles = []; $imports = ''; foreach ($schemaLocations as $namespace => $location) { $parts = explode('/', $location); @@ -650,7 +650,7 @@ EOF private function validateAlias(\DOMElement $alias, $file) { foreach ($alias->attributes as $name => $node) { - if (!\in_array($name, array('alias', 'id', 'public'))) { + if (!\in_array($name, ['alias', 'id', 'public'])) { @trigger_error(sprintf('Using the attribute "%s" is deprecated for the service "%s" which is defined as an alias in "%s". Allowed attributes for service aliases are "alias", "id" and "public". The XmlFileLoader will raise an exception in Symfony 4.0, instead of silently ignoring unsupported attributes.', $name, $alias->getAttribute('id'), $file), E_USER_DEPRECATED); } } @@ -699,7 +699,7 @@ EOF $values = static::convertDomElementToArray($node); if (!\is_array($values)) { - $values = array(); + $values = []; } $this->container->loadFromExtension($node->namespaceURI, $values); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php index 48cfde60..a3a79902 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php @@ -36,7 +36,7 @@ use Symfony\Component\Yaml\Yaml; */ class YamlFileLoader extends FileLoader { - private static $serviceKeywords = array( + private static $serviceKeywords = [ 'alias' => 'alias', 'parent' => 'parent', 'class' => 'class', @@ -60,9 +60,9 @@ class YamlFileLoader extends FileLoader 'autowiring_types' => 'autowiring_types', 'autoconfigure' => 'autoconfigure', 'bind' => 'bind', - ); + ]; - private static $prototypeKeywords = array( + private static $prototypeKeywords = [ 'resource' => 'resource', 'namespace' => 'namespace', 'exclude' => 'exclude', @@ -81,9 +81,9 @@ class YamlFileLoader extends FileLoader 'autowire' => 'autowire', 'autoconfigure' => 'autoconfigure', 'bind' => 'bind', - ); + ]; - private static $instanceofKeywords = array( + private static $instanceofKeywords = [ 'shared' => 'shared', 'lazy' => 'lazy', 'public' => 'public', @@ -92,15 +92,15 @@ class YamlFileLoader extends FileLoader 'calls' => 'calls', 'tags' => 'tags', 'autowire' => 'autowire', - ); + ]; - private static $defaultsKeywords = array( + private static $defaultsKeywords = [ 'public' => 'public', 'tags' => 'tags', 'autowire' => 'autowire', 'autoconfigure' => 'autoconfigure', 'bind' => 'bind', - ); + ]; private $yamlParser; @@ -147,7 +147,7 @@ class YamlFileLoader extends FileLoader try { $this->parseDefinitions($content, $path); } finally { - $this->instanceof = array(); + $this->instanceof = []; } } @@ -160,11 +160,11 @@ class YamlFileLoader extends FileLoader return false; } - if (null === $type && \in_array(pathinfo($resource, PATHINFO_EXTENSION), array('yaml', 'yml'), true)) { + if (null === $type && \in_array(pathinfo($resource, PATHINFO_EXTENSION), ['yaml', 'yml'], true)) { return true; } - return \in_array($type, array('yaml', 'yml'), true); + return \in_array($type, ['yaml', 'yml'], true); } /** @@ -186,7 +186,7 @@ class YamlFileLoader extends FileLoader $defaultDirectory = \dirname($file); foreach ($content['imports'] as $import) { if (!\is_array($import)) { - $import = array('resource' => $import); + $import = ['resource' => $import]; } if (!isset($import['resource'])) { throw new InvalidArgumentException(sprintf('An import should provide a resource in %s. Check your YAML syntax.', $file)); @@ -213,14 +213,14 @@ class YamlFileLoader extends FileLoader throw new InvalidArgumentException(sprintf('The "services" key should contain an array in %s. Check your YAML syntax.', $file)); } - if (array_key_exists('_instanceof', $content['services'])) { + if (\array_key_exists('_instanceof', $content['services'])) { $instanceof = $content['services']['_instanceof']; unset($content['services']['_instanceof']); if (!\is_array($instanceof)) { throw new InvalidArgumentException(sprintf('Service "_instanceof" key must be an array, "%s" given in "%s".', \gettype($instanceof), $file)); } - $this->instanceof = array(); + $this->instanceof = []; $this->isLoadingInstanceof = true; foreach ($instanceof as $id => $service) { if (!$service || !\is_array($service)) { @@ -229,7 +229,7 @@ class YamlFileLoader extends FileLoader if (\is_string($service) && 0 === strpos($service, '@')) { throw new InvalidArgumentException(sprintf('Type definition "%s" cannot be an alias within "_instanceof" in %s. Check your YAML syntax.', $id, $file)); } - $this->parseDefinition($id, $service, $file, array()); + $this->parseDefinition($id, $service, $file, []); } } @@ -250,8 +250,8 @@ class YamlFileLoader extends FileLoader */ private function parseDefaults(array &$content, $file) { - if (!array_key_exists('_defaults', $content['services'])) { - return array(); + if (!\array_key_exists('_defaults', $content['services'])) { + return []; } $defaults = $content['services']['_defaults']; unset($content['services']['_defaults']); @@ -273,7 +273,7 @@ class YamlFileLoader extends FileLoader foreach ($tags as $tag) { if (!\is_array($tag)) { - $tag = array('name' => $tag); + $tag = ['name' => $tag]; } if (!isset($tag['name'])) { @@ -346,11 +346,11 @@ class YamlFileLoader extends FileLoader } if (\is_array($service) && $this->isUsingShortSyntax($service)) { - $service = array('arguments' => $service); + $service = ['arguments' => $service]; } if (null === $service) { - $service = array(); + $service = []; } if (!\is_array($service)) { @@ -361,14 +361,14 @@ class YamlFileLoader extends FileLoader if (isset($service['alias'])) { $this->container->setAlias($id, $alias = new Alias($service['alias'])); - if (array_key_exists('public', $service)) { + if (\array_key_exists('public', $service)) { $alias->setPublic($service['public']); } elseif (isset($defaults['public'])) { $alias->setPublic($defaults['public']); } foreach ($service as $key => $value) { - if (!\in_array($key, array('alias', 'public'))) { + if (!\in_array($key, ['alias', 'public'])) { @trigger_error(sprintf('The configuration key "%s" is unsupported for the service "%s" which is defined as an alias in "%s". Allowed configuration keys for service aliases are "alias" and "public". The YamlFileLoader will raise an exception in Symfony 4.0, instead of silently ignoring unsupported attributes.', $key, $id, $file), E_USER_DEPRECATED); } } @@ -411,7 +411,7 @@ class YamlFileLoader extends FileLoader $definition->setAutoconfigured($defaults['autoconfigure']); } - $definition->setChanges(array()); + $definition->setChanges([]); } if (isset($service['class'])) { @@ -438,7 +438,7 @@ class YamlFileLoader extends FileLoader $definition->setAbstract($service['abstract']); } - if (array_key_exists('deprecated', $service)) { + if (\array_key_exists('deprecated', $service)) { $definition->setDeprecated(true, $service['deprecated']); } @@ -470,10 +470,10 @@ class YamlFileLoader extends FileLoader foreach ($service['calls'] as $call) { if (isset($call['method'])) { $method = $call['method']; - $args = isset($call['arguments']) ? $this->resolveServices($call['arguments'], $file) : array(); + $args = isset($call['arguments']) ? $this->resolveServices($call['arguments'], $file) : []; } else { $method = $call[0]; - $args = isset($call[1]) ? $this->resolveServices($call[1], $file) : array(); + $args = isset($call[1]) ? $this->resolveServices($call[1], $file) : []; } if (!\is_array($args)) { @@ -483,7 +483,7 @@ class YamlFileLoader extends FileLoader } } - $tags = isset($service['tags']) ? $service['tags'] : array(); + $tags = isset($service['tags']) ? $service['tags'] : []; if (!\is_array($tags)) { throw new InvalidArgumentException(sprintf('Parameter "tags" must be an array for service "%s" in %s. Check your YAML syntax.', $id, $file)); } @@ -494,7 +494,7 @@ class YamlFileLoader extends FileLoader foreach ($tags as $tag) { if (!\is_array($tag)) { - $tag = array('name' => $tag); + $tag = ['name' => $tag]; } if (!isset($tag['name'])) { @@ -550,7 +550,7 @@ class YamlFileLoader extends FileLoader if (isset($defaults['bind']) || isset($service['bind'])) { // deep clone, to avoid multiple process of the same instance in the passes - $bindings = isset($defaults['bind']) ? unserialize(serialize($defaults['bind'])) : array(); + $bindings = isset($defaults['bind']) ? unserialize(serialize($defaults['bind'])) : []; if (isset($service['bind'])) { if (!\is_array($service['bind'])) { @@ -571,11 +571,11 @@ class YamlFileLoader extends FileLoader } } - if (array_key_exists('namespace', $service) && !array_key_exists('resource', $service)) { + if (\array_key_exists('namespace', $service) && !\array_key_exists('resource', $service)) { throw new InvalidArgumentException(sprintf('A "resource" attribute must be set when the "namespace" attribute is set for service "%s" in %s. Check your YAML syntax.', $id, $file)); } - if (array_key_exists('resource', $service)) { + if (\array_key_exists('resource', $service)) { if (!\is_string($service['resource'])) { throw new InvalidArgumentException(sprintf('A "resource" attribute must be of type string for service "%s" in %s. Check your YAML syntax.', $id, $file)); } @@ -595,7 +595,7 @@ class YamlFileLoader extends FileLoader * @param string $id A service identifier * @param string $file A parsed file * - * @throws InvalidArgumentException When errors are occuried + * @throws InvalidArgumentException When errors occur * * @return string|array A parsed callable */ @@ -609,7 +609,7 @@ class YamlFileLoader extends FileLoader if (false !== strpos($callable, ':') && false === strpos($callable, '::')) { $parts = explode(':', $callable); - return array($this->resolveServices('@'.$parts[0], $file), $parts[1]); + return [$this->resolveServices('@'.$parts[0], $file), $parts[1]]; } return $callable; @@ -617,7 +617,7 @@ class YamlFileLoader extends FileLoader if (\is_array($callable)) { if (isset($callable[0]) && isset($callable[1])) { - return array($this->resolveServices($callable[0], $file), $callable[1]); + return [$this->resolveServices($callable[0], $file), $callable[1]]; } if ('factory' === $parameter && isset($callable[1]) && null === $callable[0]) { @@ -666,7 +666,7 @@ class YamlFileLoader extends FileLoader try { $configuration = $this->yamlParser->parseFile($file, Yaml::PARSE_CONSTANT | Yaml::PARSE_CUSTOM_TAGS); } catch (ParseException $e) { - throw new InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $file), 0, $e); + throw new InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML: %s', $file, $e->getMessage()), 0, $e); } finally { restore_error_handler(); } @@ -695,7 +695,7 @@ class YamlFileLoader extends FileLoader } foreach ($content as $namespace => $data) { - if (\in_array($namespace, array('imports', 'parameters', 'services'))) { + if (\in_array($namespace, ['imports', 'parameters', 'services'])) { continue; } @@ -747,10 +747,10 @@ class YamlFileLoader extends FileLoader $isLoadingInstanceof = $this->isLoadingInstanceof; $this->isLoadingInstanceof = false; $instanceof = $this->instanceof; - $this->instanceof = array(); + $this->instanceof = []; $id = sprintf('%d_%s', ++$this->anonymousServicesCount, preg_replace('/^.*\\\\/', '', isset($argument['class']) ? $argument['class'] : '').$this->anonymousServicesSuffix); - $this->parseDefinition($id, $argument, $file, array()); + $this->parseDefinition($id, $argument, $file, []); if (!$this->container->hasDefinition($id)) { throw new InvalidArgumentException(sprintf('Creating an alias using the tag "!service" is not allowed in "%s".', $file)); @@ -811,12 +811,12 @@ class YamlFileLoader extends FileLoader private function loadFromExtensions(array $content) { foreach ($content as $namespace => $values) { - if (\in_array($namespace, array('imports', 'parameters', 'services'))) { + if (\in_array($namespace, ['imports', 'parameters', 'services'])) { continue; } if (!\is_array($values) && null !== $values) { - $values = array(); + $values = []; } $this->container->loadFromExtension($namespace, $values); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php index 12bc7612..e453a774 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php @@ -19,8 +19,8 @@ use Symfony\Component\DependencyInjection\Exception\RuntimeException; */ class EnvPlaceholderParameterBag extends ParameterBag { - private $envPlaceholders = array(); - private $providedTypes = array(); + private $envPlaceholders = []; + private $providedTypes = []; /** * {@inheritdoc} diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php index ad65ad96..a5199937 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php @@ -28,7 +28,7 @@ class FrozenParameterBag extends ParameterBag * * @param array $parameters An array of parameters */ - public function __construct(array $parameters = array()) + public function __construct(array $parameters = []) { $this->parameters = $parameters; $this->resolved = true; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php index e06fd344..c4e70218 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php @@ -22,15 +22,15 @@ use Symfony\Component\DependencyInjection\Exception\RuntimeException; */ class ParameterBag implements ParameterBagInterface { - protected $parameters = array(); + protected $parameters = []; protected $resolved = false; - private $normalizedNames = array(); + private $normalizedNames = []; /** * @param array $parameters An array of parameters */ - public function __construct(array $parameters = array()) + public function __construct(array $parameters = []) { $this->add($parameters); } @@ -40,7 +40,7 @@ class ParameterBag implements ParameterBagInterface */ public function clear() { - $this->parameters = array(); + $this->parameters = []; } /** @@ -70,12 +70,12 @@ class ParameterBag implements ParameterBagInterface { $name = $this->normalizeName($name); - if (!array_key_exists($name, $this->parameters)) { + if (!\array_key_exists($name, $this->parameters)) { if (!$name) { throw new ParameterNotFoundException($name); } - $alternatives = array(); + $alternatives = []; foreach ($this->parameters as $key => $parameterValue) { $lev = levenshtein($name, $key); if ($lev <= \strlen($name) / 3 || false !== strpos($key, $name)) { @@ -121,7 +121,7 @@ class ParameterBag implements ParameterBagInterface */ public function has($name) { - return array_key_exists($this->normalizeName($name), $this->parameters); + return \array_key_exists($this->normalizeName($name), $this->parameters); } /** @@ -143,7 +143,7 @@ class ParameterBag implements ParameterBagInterface return; } - $parameters = array(); + $parameters = []; foreach ($this->parameters as $key => $value) { try { $value = $this->resolveValue($value); @@ -171,10 +171,10 @@ class ParameterBag implements ParameterBagInterface * @throws ParameterCircularReferenceException if a circular reference if detected * @throws RuntimeException when a given parameter has a type problem */ - public function resolveValue($value, array $resolving = array()) + public function resolveValue($value, array $resolving = []) { if (\is_array($value)) { - $args = array(); + $args = []; foreach ($value as $k => $v) { $args[\is_string($k) ? $this->resolveValue($k, $resolving) : $k] = $this->resolveValue($v, $resolving); } @@ -201,7 +201,7 @@ class ParameterBag implements ParameterBagInterface * @throws ParameterCircularReferenceException if a circular reference if detected * @throws RuntimeException when a given parameter has a type problem */ - public function resolveString($value, array $resolving = array()) + public function resolveString($value, array $resolving = []) { // we do this to deal with non string values (Boolean, integer, ...) // as the preg_replace_callback throw an exception when trying @@ -259,7 +259,7 @@ class ParameterBag implements ParameterBagInterface } if (\is_array($value)) { - $result = array(); + $result = []; foreach ($value as $k => $v) { $result[$k] = $this->escapeValue($v); } @@ -280,7 +280,7 @@ class ParameterBag implements ParameterBagInterface } if (\is_array($value)) { - $result = array(); + $result = []; foreach ($value as $k => $v) { $result[$k] = $this->unescapeValue($v); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ServiceLocator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ServiceLocator.php index bdedc88e..a4f5bf99 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ServiceLocator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ServiceLocator.php @@ -22,7 +22,7 @@ use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; class ServiceLocator implements PsrContainerInterface { private $factories; - private $loading = array(); + private $loading = []; private $externalId; private $container; @@ -48,7 +48,7 @@ class ServiceLocator implements PsrContainerInterface public function get($id) { if (!isset($this->factories[$id])) { - throw new ServiceNotFoundException($id, end($this->loading) ?: null, null, array(), $this->createServiceNotFoundMessage($id)); + throw new ServiceNotFoundException($id, end($this->loading) ?: null, null, [], $this->createServiceNotFoundMessage($id)); } if (isset($this->loading[$id])) { @@ -94,39 +94,40 @@ class ServiceLocator implements PsrContainerInterface $class = isset($class[2]['object']) ? \get_class($class[2]['object']) : null; $externalId = $this->externalId ?: $class; - $msg = sprintf('Service "%s" not found: ', $id); + $msg = []; + $msg[] = sprintf('Service "%s" not found:', $id); if (!$this->container) { $class = null; } elseif ($this->container->has($id) || isset($this->container->getRemovedIds()[$id])) { - $msg .= 'even though it exists in the app\'s container, '; + $msg[] = 'even though it exists in the app\'s container,'; } else { try { $this->container->get($id); $class = null; } catch (ServiceNotFoundException $e) { if ($e->getAlternatives()) { - $msg .= sprintf(' did you mean %s? Anyway, ', $this->formatAlternatives($e->getAlternatives(), 'or')); + $msg[] = sprintf('did you mean %s? Anyway,', $this->formatAlternatives($e->getAlternatives(), 'or')); } else { $class = null; } } } if ($externalId) { - $msg .= sprintf('the container inside "%s" is a smaller service locator that %s', $externalId, $this->formatAlternatives()); + $msg[] = sprintf('the container inside "%s" is a smaller service locator that %s', $externalId, $this->formatAlternatives()); } else { - $msg .= sprintf('the current service locator %s', $this->formatAlternatives()); + $msg[] = sprintf('the current service locator %s', $this->formatAlternatives()); } if (!$class) { // no-op } elseif (is_subclass_of($class, ServiceSubscriberInterface::class)) { - $msg .= sprintf(' Unless you need extra laziness, try using dependency injection instead. Otherwise, you need to declare it using "%s::getSubscribedServices()".', preg_replace('/([^\\\\]++\\\\)++/', '', $class)); + $msg[] = sprintf('Unless you need extra laziness, try using dependency injection instead. Otherwise, you need to declare it using "%s::getSubscribedServices()".', preg_replace('/([^\\\\]++\\\\)++/', '', $class)); } else { - $msg .= 'Try using dependency injection instead.'; + $msg[] = 'Try using dependency injection instead.'; } - return $msg; + return implode(' ', $msg); } private function formatAlternatives(array $alternatives = null, $separator = 'and') diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ServiceSubscriberInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ServiceSubscriberInterface.php index 7024484b..10c23875 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ServiceSubscriberInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ServiceSubscriberInterface.php @@ -33,16 +33,16 @@ interface ServiceSubscriberInterface * * For mandatory dependencies: * - * * array('logger' => 'Psr\Log\LoggerInterface') means the objects use the "logger" name + * * ['logger' => 'Psr\Log\LoggerInterface'] means the objects use the "logger" name * internally to fetch a service which must implement Psr\Log\LoggerInterface. - * * array('Psr\Log\LoggerInterface') is a shortcut for - * * array('Psr\Log\LoggerInterface' => 'Psr\Log\LoggerInterface') + * * ['Psr\Log\LoggerInterface'] is a shortcut for + * * ['Psr\Log\LoggerInterface' => 'Psr\Log\LoggerInterface'] * * otherwise: * - * * array('logger' => '?Psr\Log\LoggerInterface') denotes an optional dependency - * * array('?Psr\Log\LoggerInterface') is a shortcut for - * * array('Psr\Log\LoggerInterface' => '?Psr\Log\LoggerInterface') + * * ['logger' => '?Psr\Log\LoggerInterface'] denotes an optional dependency + * * ['?Psr\Log\LoggerInterface'] is a shortcut for + * * ['Psr\Log\LoggerInterface' => '?Psr\Log\LoggerInterface'] * * @return array The required service types, optionally keyed by service names */ diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ChildDefinitionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ChildDefinitionTest.php index a941b960..cbae0eaa 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ChildDefinitionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ChildDefinitionTest.php @@ -22,7 +22,7 @@ class ChildDefinitionTest extends TestCase $def = new ChildDefinition('foo'); $this->assertSame('foo', $def->getParent()); - $this->assertSame(array(), $def->getChanges()); + $this->assertSame([], $def->getChanges()); } /** @@ -38,17 +38,17 @@ class ChildDefinitionTest extends TestCase $this->assertNull($def->$getter()); $this->assertSame($def, $def->$setter('foo')); $this->assertSame('foo', $def->$getter()); - $this->assertSame(array($changeKey => true), $def->getChanges()); + $this->assertSame([$changeKey => true], $def->getChanges()); } public function getPropertyTests() { - return array( - array('class', 'class'), - array('factory', 'factory'), - array('configurator', 'configurator'), - array('file', 'file'), - ); + return [ + ['class', 'class'], + ['factory', 'factory'], + ['configurator', 'configurator'], + ['file', 'file'], + ]; } public function testSetPublic() @@ -58,7 +58,7 @@ class ChildDefinitionTest extends TestCase $this->assertTrue($def->isPublic()); $this->assertSame($def, $def->setPublic(false)); $this->assertFalse($def->isPublic()); - $this->assertSame(array('public' => true), $def->getChanges()); + $this->assertSame(['public' => true], $def->getChanges()); } public function testSetLazy() @@ -68,7 +68,7 @@ class ChildDefinitionTest extends TestCase $this->assertFalse($def->isLazy()); $this->assertSame($def, $def->setLazy(false)); $this->assertFalse($def->isLazy()); - $this->assertSame(array('lazy' => true), $def->getChanges()); + $this->assertSame(['lazy' => true], $def->getChanges()); } public function testSetAutowired() @@ -78,16 +78,16 @@ class ChildDefinitionTest extends TestCase $this->assertFalse($def->isAutowired()); $this->assertSame($def, $def->setAutowired(true)); $this->assertTrue($def->isAutowired()); - $this->assertSame(array('autowired' => true), $def->getChanges()); + $this->assertSame(['autowired' => true], $def->getChanges()); } public function testSetArgument() { $def = new ChildDefinition('foo'); - $this->assertSame(array(), $def->getArguments()); + $this->assertSame([], $def->getArguments()); $this->assertSame($def, $def->replaceArgument(0, 'foo')); - $this->assertSame(array('index_0' => 'foo'), $def->getArguments()); + $this->assertSame(['index_0' => 'foo'], $def->getArguments()); } /** @@ -104,7 +104,7 @@ class ChildDefinitionTest extends TestCase { $def = new ChildDefinition('foo'); - $def->setArguments(array(0 => 'foo', 1 => 'bar')); + $def->setArguments([0 => 'foo', 1 => 'bar']); $this->assertSame('foo', $def->getArgument(0)); $this->assertSame('bar', $def->getArgument(1)); @@ -112,11 +112,11 @@ class ChildDefinitionTest extends TestCase $this->assertSame('foo', $def->getArgument(0)); $this->assertSame('baz', $def->getArgument(1)); - $this->assertSame(array(0 => 'foo', 1 => 'bar', 'index_1' => 'baz'), $def->getArguments()); + $this->assertSame([0 => 'foo', 1 => 'bar', 'index_1' => 'baz'], $def->getArguments()); $this->assertSame($def, $def->replaceArgument('$bar', 'val')); $this->assertSame('val', $def->getArgument('$bar')); - $this->assertSame(array(0 => 'foo', 1 => 'bar', 'index_1' => 'baz', '$bar' => 'val'), $def->getArguments()); + $this->assertSame([0 => 'foo', 1 => 'bar', 'index_1' => 'baz', '$bar' => 'val'], $def->getArguments()); } /** @@ -126,7 +126,7 @@ class ChildDefinitionTest extends TestCase { $def = new ChildDefinition('foo'); - $def->setArguments(array(0 => 'foo')); + $def->setArguments([0 => 'foo']); $def->replaceArgument(0, 'foo'); $def->getArgument(1); @@ -152,6 +152,6 @@ class ChildDefinitionTest extends TestCase public function testCannotCallSetInstanceofConditionals() { $def = new ChildDefinition('foo'); - $def->setInstanceofConditionals(array('Foo' => new ChildDefinition(''))); + $def->setInstanceofConditionals(['Foo' => new ChildDefinition('')]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php index 8d44fad8..0bd94a3e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php @@ -32,7 +32,7 @@ class AnalyzeServiceReferencesPassTest extends TestCase $b = $container ->register('b') - ->addMethodCall('setA', array($ref2 = new Reference('a'))) + ->addMethodCall('setA', [$ref2 = new Reference('a')]) ; $c = $container @@ -48,7 +48,7 @@ class AnalyzeServiceReferencesPassTest extends TestCase $e = $container ->register('e') - ->setConfigurator(array($ref6 = new Reference('b'), 'methodName')) + ->setConfigurator([$ref6 = new Reference('b'), 'methodName']) ; $graph = $this->process($container); @@ -94,7 +94,7 @@ class AnalyzeServiceReferencesPassTest extends TestCase $container ->register('c') ->addArgument($ref1 = new Reference('a')) - ->addArgument(new IteratorArgument(array($ref2 = new Reference('b')))) + ->addArgument(new IteratorArgument([$ref2 = new Reference('b')])) ; $graph = $this->process($container); @@ -119,7 +119,7 @@ class AnalyzeServiceReferencesPassTest extends TestCase $container ->register('b') - ->addArgument(new Definition(null, array($ref = new Reference('a')))) + ->addArgument(new Definition(null, [$ref = new Reference('a')])) ; $graph = $this->process($container); @@ -138,7 +138,7 @@ class AnalyzeServiceReferencesPassTest extends TestCase $container ->register('b') - ->addArgument(new IteratorArgument(array($ref = new Reference('a')))) + ->addArgument(new IteratorArgument([$ref = new Reference('a')])) ; $graph = $this->process($container); @@ -156,7 +156,7 @@ class AnalyzeServiceReferencesPassTest extends TestCase ; $factory = new Definition(); - $factory->setFactory(array(new Reference('a'), 'a')); + $factory->setFactory([new Reference('a'), 'a']); $container ->register('b') @@ -178,8 +178,8 @@ class AnalyzeServiceReferencesPassTest extends TestCase ; $container ->register('b') - ->addArgument(new Definition(null, array($ref1 = new Reference('a')))) - ->addArgument(new Definition(null, array($ref2 = new Reference('a')))) + ->addArgument(new Definition(null, [$ref1 = new Reference('a')])) + ->addArgument(new Definition(null, [$ref2 = new Reference('a')])) ; $graph = $this->process($container); @@ -193,11 +193,11 @@ class AnalyzeServiceReferencesPassTest extends TestCase $container ->register('foo', 'stdClass') - ->setFactory(array('stdClass', 'getInstance')); + ->setFactory(['stdClass', 'getInstance']); $container ->register('bar', 'stdClass') - ->setFactory(array(new Reference('foo'), 'getInstance')); + ->setFactory([new Reference('foo'), 'getInstance']); $graph = $this->process($container); @@ -207,7 +207,7 @@ class AnalyzeServiceReferencesPassTest extends TestCase protected function process(ContainerBuilder $container) { - $pass = new RepeatedPass(array(new AnalyzeServiceReferencesPass())); + $pass = new RepeatedPass([new AnalyzeServiceReferencesPass()]); $pass->process($container); return $container->getCompiler()->getServiceReferenceGraph(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutoAliasServicePassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutoAliasServicePassTest.php index f76001a1..d029636a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutoAliasServicePassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutoAliasServicePassTest.php @@ -25,7 +25,7 @@ class AutoAliasServicePassTest extends TestCase $container = new ContainerBuilder(); $container->register('example') - ->addTag('auto_alias', array('format' => '%non_existing%.example')); + ->addTag('auto_alias', ['format' => '%non_existing%.example']); $pass = new AutoAliasServicePass(); $pass->process($container); @@ -39,7 +39,7 @@ class AutoAliasServicePassTest extends TestCase $container = new ContainerBuilder(); $container->register('example') - ->addTag('auto_alias', array()); + ->addTag('auto_alias', []); $container->setParameter('existing', 'mysql'); $pass = new AutoAliasServicePass(); @@ -51,7 +51,7 @@ class AutoAliasServicePassTest extends TestCase $container = new ContainerBuilder(); $container->register('example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassDefault') - ->addTag('auto_alias', array('format' => '%existing%.example')); + ->addTag('auto_alias', ['format' => '%existing%.example']); $container->setParameter('existing', 'mysql'); $pass = new AutoAliasServicePass(); @@ -65,7 +65,7 @@ class AutoAliasServicePassTest extends TestCase $container = new ContainerBuilder(); $container->register('example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassDefault') - ->addTag('auto_alias', array('format' => '%existing%.example')); + ->addTag('auto_alias', ['format' => '%existing%.example']); $container->register('mysql.example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassMysql'); $container->setParameter('existing', 'mysql'); @@ -83,7 +83,7 @@ class AutoAliasServicePassTest extends TestCase $container = new ContainerBuilder(); $container->register('example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassDefault') - ->addTag('auto_alias', array('format' => '%existing%.example')); + ->addTag('auto_alias', ['format' => '%existing%.example']); $container->register('mysql.example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassMysql'); $container->register('mariadb.example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassMariaDb'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowireExceptionPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowireExceptionPassTest.php index a9c3445c..5bcb1234 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowireExceptionPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowireExceptionPassTest.php @@ -31,13 +31,13 @@ class AutowireExceptionPassTest extends TestCase $autowireException = new AutowiringFailedException('foo_service_id', 'An autowiring exception message'); $autowirePass->expects($this->any()) ->method('getAutowiringExceptions') - ->will($this->returnValue(array($autowireException))); + ->will($this->returnValue([$autowireException])); $inlinePass = $this->getMockBuilder(InlineServiceDefinitionsPass::class) ->getMock(); $inlinePass->expects($this->any()) ->method('getInlinedServiceIds') - ->will($this->returnValue(array())); + ->will($this->returnValue([])); $container = new ContainerBuilder(); $container->register('foo_service_id'); @@ -60,18 +60,18 @@ class AutowireExceptionPassTest extends TestCase $autowireException = new AutowiringFailedException('a_service', 'An autowiring exception message'); $autowirePass->expects($this->any()) ->method('getAutowiringExceptions') - ->will($this->returnValue(array($autowireException))); + ->will($this->returnValue([$autowireException])); $inlinePass = $this->getMockBuilder(InlineServiceDefinitionsPass::class) ->getMock(); $inlinePass->expects($this->any()) ->method('getInlinedServiceIds') - ->will($this->returnValue(array( + ->will($this->returnValue([ // a_service inlined into b_service - 'a_service' => array('b_service'), + 'a_service' => ['b_service'], // b_service inlined into c_service - 'b_service' => array('c_service'), - ))); + 'b_service' => ['c_service'], + ])); $container = new ContainerBuilder(); // ONLY register c_service in the final container @@ -95,18 +95,18 @@ class AutowireExceptionPassTest extends TestCase $autowireException = new AutowiringFailedException('a_service', 'An autowiring exception message'); $autowirePass->expects($this->any()) ->method('getAutowiringExceptions') - ->will($this->returnValue(array($autowireException))); + ->will($this->returnValue([$autowireException])); $inlinePass = $this->getMockBuilder(InlineServiceDefinitionsPass::class) ->getMock(); $inlinePass->expects($this->any()) ->method('getInlinedServiceIds') - ->will($this->returnValue(array( + ->will($this->returnValue([ // a_service inlined into b_service - 'a_service' => array('b_service'), + 'a_service' => ['b_service'], // b_service inlined into c_service - 'b_service' => array('c_service'), - ))); + 'b_service' => ['c_service'], + ])); // do NOT register c_service in the container $container = new ContainerBuilder(); @@ -126,13 +126,13 @@ class AutowireExceptionPassTest extends TestCase $autowireException = new AutowiringFailedException('non_existent_service'); $autowirePass->expects($this->any()) ->method('getAutowiringExceptions') - ->will($this->returnValue(array($autowireException))); + ->will($this->returnValue([$autowireException])); $inlinePass = $this->getMockBuilder(InlineServiceDefinitionsPass::class) ->getMock(); $inlinePass->expects($this->any()) ->method('getInlinedServiceIds') - ->will($this->returnValue(array())); + ->will($this->returnValue([])); $container = new ContainerBuilder(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php index a2168772..6bd49fa5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php @@ -434,22 +434,22 @@ class AutowirePassTest extends TestCase ->setAutowired(true) // set the 2nd (index 1) argument only: autowire the first and third // args are: A, Foo, Dunglas - ->setArguments(array( + ->setArguments([ 1 => new Reference('foo'), - 3 => array('bar'), - )); + 3 => ['bar'], + ]); (new ResolveClassPass())->process($container); (new AutowirePass())->process($container); $definition = $container->getDefinition('multiple'); $this->assertEquals( - array( + [ new TypedReference(A::class, A::class, MultipleArguments::class), new Reference('foo'), new TypedReference(Dunglas::class, Dunglas::class, MultipleArguments::class), - array('bar'), - ), + ['bar'], + ], $definition->getArguments() ); } @@ -465,7 +465,7 @@ class AutowirePassTest extends TestCase $container->register(A::class); $container->register(Dunglas::class); $container->register('arg_no_type_hint', __NAMESPACE__.'\MultipleArguments') - ->setArguments(array(1 => 'foo')) + ->setArguments([1 => 'foo']) ->setAutowired(true); (new ResolveClassPass())->process($container); @@ -518,12 +518,12 @@ class AutowirePassTest extends TestCase $definition = $container->getDefinition('with_optional_scalar'); $this->assertEquals( - array( + [ new TypedReference(A::class, A::class, MultipleArgumentsOptionalScalar::class), // use the default value 'default_val', new TypedReference(Lille::class, Lille::class), - ), + ], $definition->getArguments() ); } @@ -542,10 +542,10 @@ class AutowirePassTest extends TestCase $definition = $container->getDefinition('with_optional_scalar_last'); $this->assertEquals( - array( + [ new TypedReference(A::class, A::class, MultipleArgumentsOptionalScalarLast::class), new TypedReference(Lille::class, Lille::class, MultipleArgumentsOptionalScalarLast::class), - ), + ], $definition->getArguments() ); } @@ -562,7 +562,7 @@ class AutowirePassTest extends TestCase $definition = $container->getDefinition('foo'); $this->assertEquals( - array('foo.txt'), + ['foo.txt'], $definition->getArguments() ); } @@ -579,7 +579,7 @@ class AutowirePassTest extends TestCase $container ->register('setter_injection', SetterInjection::class) ->setAutowired(true) - ->addMethodCall('setWithCallsConfigured', array('manual_arg1', 'manual_arg2')) + ->addMethodCall('setWithCallsConfigured', ['manual_arg1', 'manual_arg2']) ; (new ResolveClassPass())->process($container); @@ -589,18 +589,18 @@ class AutowirePassTest extends TestCase $methodCalls = $container->getDefinition('setter_injection')->getMethodCalls(); $this->assertEquals( - array('setWithCallsConfigured', 'setFoo', 'setDependencies', 'setChildMethodWithoutDocBlock'), + ['setWithCallsConfigured', 'setFoo', 'setDependencies', 'setChildMethodWithoutDocBlock'], array_column($methodCalls, 0) ); // test setWithCallsConfigured args $this->assertEquals( - array('manual_arg1', 'manual_arg2'), + ['manual_arg1', 'manual_arg2'], $methodCalls[0][1] ); // test setFoo args $this->assertEquals( - array(new TypedReference(Foo::class, Foo::class, SetterInjection::class)), + [new TypedReference(Foo::class, Foo::class, SetterInjection::class)], $methodCalls[1][1] ); } @@ -616,7 +616,7 @@ class AutowirePassTest extends TestCase $container ->register('setter_injection', SetterInjection::class) ->setAutowired(true) - ->addMethodCall('notASetter', array()) + ->addMethodCall('notASetter', []) ; (new ResolveClassPass())->process($container); @@ -626,11 +626,11 @@ class AutowirePassTest extends TestCase $methodCalls = $container->getDefinition('setter_injection')->getMethodCalls(); $this->assertEquals( - array('notASetter', 'setFoo', 'setDependencies', 'setWithCallsConfigured', 'setChildMethodWithoutDocBlock'), + ['notASetter', 'setFoo', 'setDependencies', 'setWithCallsConfigured', 'setChildMethodWithoutDocBlock'], array_column($methodCalls, 0) ); $this->assertEquals( - array(new TypedReference(A::class, A::class, SetterInjection::class)), + [new TypedReference(A::class, A::class, SetterInjection::class)], $methodCalls[0][1] ); } @@ -645,7 +645,7 @@ class AutowirePassTest extends TestCase $container ->register('bar', Bar::class) - ->setProperty('a', array(new TypedReference(A::class, A::class, Bar::class))) + ->setProperty('a', [new TypedReference(A::class, A::class, Bar::class)]) ; $pass = new AutowirePass(); @@ -682,10 +682,10 @@ class AutowirePassTest extends TestCase public function getCreateResourceTests() { - return array( - array('IdenticalClassResource', true), - array('ClassChangedConstructorArgs', false), - ); + return [ + ['IdenticalClassResource', true], + ['ClassChangedConstructorArgs', false], + ]; } public function testIgnoreServiceWithClassNotExisting() @@ -773,12 +773,12 @@ class AutowirePassTest extends TestCase $container->register(Lille::class); $container->register('foo', __NAMESPACE__.'\MultipleArgumentsOptionalScalar') ->setAutowired(true) - ->setArguments(array('', '')); + ->setArguments(['', '']); (new ResolveClassPass())->process($container); (new AutowirePass())->process($container); - $this->assertEquals(array(new TypedReference(A::class, A::class, MultipleArgumentsOptionalScalar::class), '', new TypedReference(Lille::class, Lille::class)), $container->getDefinition('foo')->getArguments()); + $this->assertEquals([new TypedReference(A::class, A::class, MultipleArgumentsOptionalScalar::class), '', new TypedReference(Lille::class, Lille::class)], $container->getDefinition('foo')->getArguments()); } public function testWithFactory() @@ -787,13 +787,13 @@ class AutowirePassTest extends TestCase $container->register(Foo::class); $definition = $container->register('a', A::class) - ->setFactory(array(A::class, 'create')) + ->setFactory([A::class, 'create']) ->setAutowired(true); (new ResolveClassPass())->process($container); (new AutowirePass())->process($container); - $this->assertEquals(array(new TypedReference(Foo::class, Foo::class, A::class)), $definition->getArguments()); + $this->assertEquals([new TypedReference(Foo::class, Foo::class, A::class)], $definition->getArguments()); } /** @@ -805,14 +805,14 @@ class AutowirePassTest extends TestCase $container = new ContainerBuilder(); $foo = $container->register('foo', NotWireable::class)->setAutowired(true) - ->addMethodCall('setBar', array()) - ->addMethodCall('setOptionalNotAutowireable', array()) - ->addMethodCall('setOptionalNoTypeHint', array()) - ->addMethodCall('setOptionalArgNoAutowireable', array()) + ->addMethodCall('setBar', []) + ->addMethodCall('setOptionalNotAutowireable', []) + ->addMethodCall('setOptionalNoTypeHint', []) + ->addMethodCall('setOptionalArgNoAutowireable', []) ; if ($method) { - $foo->addMethodCall($method, array()); + $foo->addMethodCall($method, []); } if (method_exists($this, 'expectException')) { @@ -829,11 +829,11 @@ class AutowirePassTest extends TestCase public function provideNotWireableCalls() { - return array( - array('setNotAutowireable', 'Cannot autowire service "foo": argument "$n" of method "Symfony\Component\DependencyInjection\Tests\Compiler\NotWireable::setNotAutowireable()" has type "Symfony\Component\DependencyInjection\Tests\Compiler\NotARealClass" but this class was not found.'), - array('setDifferentNamespace', 'Cannot autowire service "foo": argument "$n" of method "Symfony\Component\DependencyInjection\Tests\Compiler\NotWireable::setDifferentNamespace()" references class "stdClass" but no such service exists. It cannot be auto-registered because it is from a different root namespace.'), - array(null, 'Invalid service "foo": method "Symfony\Component\DependencyInjection\Tests\Compiler\NotWireable::setProtectedMethod()" must be public.'), - ); + return [ + ['setNotAutowireable', 'Cannot autowire service "foo": argument "$n" of method "Symfony\Component\DependencyInjection\Tests\Compiler\NotWireable::setNotAutowireable()" has type "Symfony\Component\DependencyInjection\Tests\Compiler\NotARealClass" but this class was not found.'], + ['setDifferentNamespace', 'Cannot autowire service "foo": argument "$n" of method "Symfony\Component\DependencyInjection\Tests\Compiler\NotWireable::setDifferentNamespace()" references class "stdClass" but no such service exists. It cannot be auto-registered because it is from a different root namespace.'], + [null, 'Invalid service "foo": method "Symfony\Component\DependencyInjection\Tests\Compiler\NotWireable::setProtectedMethod()" must be public.'], + ]; } /** @@ -867,7 +867,7 @@ class AutowirePassTest extends TestCase $container->setAlias(AInterface::class, 'aClass'); $container ->register('bar', Bar::class) - ->setProperty('a', array(new TypedReference(A::class, A::class, Bar::class))) + ->setProperty('a', [new TypedReference(A::class, A::class, Bar::class)]) ; $pass = new AutowirePass(); @@ -922,6 +922,6 @@ class AutowirePassTest extends TestCase $pass = new AutowirePass(); $pass->process($container); - $this->assertSame(array(), $container->getDefinition('autowired')->getArguments()); + $this->assertSame([], $container->getDefinition('autowired')->getArguments()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowireRequiredMethodsPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowireRequiredMethodsPassTest.php index 07c9f9d7..644b32d2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowireRequiredMethodsPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowireRequiredMethodsPassTest.php @@ -32,7 +32,7 @@ class AutowireRequiredMethodsPassTest extends TestCase $container ->register('setter_injection', SetterInjection::class) ->setAutowired(true) - ->addMethodCall('setWithCallsConfigured', array('manual_arg1', 'manual_arg2')); + ->addMethodCall('setWithCallsConfigured', ['manual_arg1', 'manual_arg2']); (new ResolveClassPass())->process($container); (new AutowireRequiredMethodsPass())->process($container); @@ -40,17 +40,17 @@ class AutowireRequiredMethodsPassTest extends TestCase $methodCalls = $container->getDefinition('setter_injection')->getMethodCalls(); $this->assertEquals( - array('setWithCallsConfigured', 'setFoo', 'setDependencies', 'setChildMethodWithoutDocBlock'), + ['setWithCallsConfigured', 'setFoo', 'setDependencies', 'setChildMethodWithoutDocBlock'], array_column($methodCalls, 0) ); // test setWithCallsConfigured args $this->assertEquals( - array('manual_arg1', 'manual_arg2'), + ['manual_arg1', 'manual_arg2'], $methodCalls[0][1] ); // test setFoo args - $this->assertEquals(array(), $methodCalls[1][1]); + $this->assertEquals([], $methodCalls[1][1]); } public function testExplicitMethodInjection() @@ -64,7 +64,7 @@ class AutowireRequiredMethodsPassTest extends TestCase $container ->register('setter_injection', SetterInjection::class) ->setAutowired(true) - ->addMethodCall('notASetter', array()); + ->addMethodCall('notASetter', []); (new ResolveClassPass())->process($container); (new AutowireRequiredMethodsPass())->process($container); @@ -72,9 +72,9 @@ class AutowireRequiredMethodsPassTest extends TestCase $methodCalls = $container->getDefinition('setter_injection')->getMethodCalls(); $this->assertEquals( - array('notASetter', 'setFoo', 'setDependencies', 'setWithCallsConfigured', 'setChildMethodWithoutDocBlock'), + ['notASetter', 'setFoo', 'setDependencies', 'setWithCallsConfigured', 'setChildMethodWithoutDocBlock'], array_column($methodCalls, 0) ); - $this->assertEquals(array(), $methodCalls[0][1]); + $this->assertEquals([], $methodCalls[0][1]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckArgumentsValidityPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckArgumentsValidityPassTest.php index d121689f..c1e47b30 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckArgumentsValidityPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckArgumentsValidityPassTest.php @@ -24,20 +24,20 @@ class CheckArgumentsValidityPassTest extends TestCase { $container = new ContainerBuilder(); $definition = $container->register('foo'); - $definition->setArguments(array(null, 1, 'a')); - $definition->setMethodCalls(array( - array('bar', array('a', 'b')), - array('baz', array('c', 'd')), - )); + $definition->setArguments([null, 1, 'a']); + $definition->setMethodCalls([ + ['bar', ['a', 'b']], + ['baz', ['c', 'd']], + ]); $pass = new CheckArgumentsValidityPass(); $pass->process($container); - $this->assertEquals(array(null, 1, 'a'), $container->getDefinition('foo')->getArguments()); - $this->assertEquals(array( - array('bar', array('a', 'b')), - array('baz', array('c', 'd')), - ), $container->getDefinition('foo')->getMethodCalls()); + $this->assertEquals([null, 1, 'a'], $container->getDefinition('foo')->getArguments()); + $this->assertEquals([ + ['bar', ['a', 'b']], + ['baz', ['c', 'd']], + ], $container->getDefinition('foo')->getMethodCalls()); } /** @@ -57,19 +57,19 @@ class CheckArgumentsValidityPassTest extends TestCase public function definitionProvider() { - return array( - array(array(null, 'a' => 'a'), array()), - array(array(1 => 1), array()), - array(array(), array(array('baz', array(null, 'a' => 'a')))), - array(array(), array(array('baz', array(1 => 1)))), - ); + return [ + [[null, 'a' => 'a'], []], + [[1 => 1], []], + [[], [['baz', [null, 'a' => 'a']]]], + [[], [['baz', [1 => 1]]]], + ]; } public function testNoException() { $container = new ContainerBuilder(); $definition = $container->register('foo'); - $definition->setArguments(array(null, 'a' => 'a')); + $definition->setArguments([null, 'a' => 'a']); $pass = new CheckArgumentsValidityPass(false); $pass->process($container); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckCircularReferencesPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckCircularReferencesPassTest.php index a87dc44a..8423c561 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckCircularReferencesPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckCircularReferencesPassTest.php @@ -55,11 +55,11 @@ class CheckCircularReferencesPassTest extends TestCase $container ->register('a', 'stdClass') - ->setFactory(array(new Reference('b'), 'getInstance')); + ->setFactory([new Reference('b'), 'getInstance']); $container ->register('b', 'stdClass') - ->setFactory(array(new Reference('a'), 'getInstance')); + ->setFactory([new Reference('a'), 'getInstance']); $this->process($container); } @@ -88,7 +88,7 @@ class CheckCircularReferencesPassTest extends TestCase $container ->register('b', 'stdClass') - ->setFactory(array(new Reference('c'), 'getInstance')); + ->setFactory([new Reference('c'), 'getInstance']); $container->register('c')->addArgument(new Reference('a')); @@ -112,7 +112,7 @@ class CheckCircularReferencesPassTest extends TestCase { $container = new ContainerBuilder(); $container->register('a')->addArgument(new Reference('b')); - $container->register('b')->addMethodCall('setA', array(new Reference('a'))); + $container->register('b')->addMethodCall('setA', [new Reference('a')]); $this->process($container); @@ -135,7 +135,7 @@ class CheckCircularReferencesPassTest extends TestCase { $container = new ContainerBuilder(); $container->register('a')->addArgument(new Reference('b')); - $container->register('b')->addArgument(new IteratorArgument(array(new Reference('a')))); + $container->register('b')->addArgument(new IteratorArgument([new Reference('a')])); $this->process($container); @@ -147,11 +147,11 @@ class CheckCircularReferencesPassTest extends TestCase { $compiler = new Compiler(); $passConfig = $compiler->getPassConfig(); - $passConfig->setOptimizationPasses(array( + $passConfig->setOptimizationPasses([ new AnalyzeServiceReferencesPass(true), new CheckCircularReferencesPass(), - )); - $passConfig->setRemovingPasses(array()); + ]); + $passConfig->setRemovingPasses([]); $compiler->compile($container); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php index f698ed02..e1dd60b6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php @@ -55,10 +55,10 @@ class CheckDefinitionValidityPassTest extends TestCase public function testValidTags() { $container = new ContainerBuilder(); - $container->register('a', 'class')->addTag('foo', array('bar' => 'baz')); - $container->register('b', 'class')->addTag('foo', array('bar' => null)); - $container->register('c', 'class')->addTag('foo', array('bar' => 1)); - $container->register('d', 'class')->addTag('foo', array('bar' => 1.1)); + $container->register('a', 'class')->addTag('foo', ['bar' => 'baz']); + $container->register('b', 'class')->addTag('foo', ['bar' => null]); + $container->register('c', 'class')->addTag('foo', ['bar' => 1]); + $container->register('d', 'class')->addTag('foo', ['bar' => 1.1]); $this->process($container); @@ -71,7 +71,7 @@ class CheckDefinitionValidityPassTest extends TestCase public function testInvalidTags() { $container = new ContainerBuilder(); - $container->register('a', 'class')->addTag('foo', array('bar' => array('baz' => 'baz'))); + $container->register('a', 'class')->addTag('foo', ['bar' => ['baz' => 'baz']]); $this->process($container); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php index 631c344f..38717eaf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php @@ -74,7 +74,7 @@ class CheckExceptionOnInvalidReferenceBehaviorPassTest extends TestCase $container ->register('b') - ->setBindings(array(new BoundArgument(new Reference('a')))) + ->setBindings([new BoundArgument(new Reference('a'))]) ; $this->process($container); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/DecoratorServicePassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/DecoratorServicePassTest.php index fe1334e9..29fc5cc5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/DecoratorServicePassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/DecoratorServicePassTest.php @@ -130,18 +130,18 @@ class DecoratorServicePassTest extends TestCase $container = new ContainerBuilder(); $container ->register('foo') - ->setTags(array('bar' => array('attr' => 'baz'))) + ->setTags(['bar' => ['attr' => 'baz']]) ; $container ->register('baz') - ->setTags(array('foobar' => array('attr' => 'bar'))) + ->setTags(['foobar' => ['attr' => 'bar']]) ->setDecoratedService('foo') ; $this->process($container); $this->assertEmpty($container->getDefinition('baz.inner')->getTags()); - $this->assertEquals(array('bar' => array('attr' => 'baz'), 'foobar' => array('attr' => 'bar')), $container->getDefinition('baz')->getTags()); + $this->assertEquals(['bar' => ['attr' => 'baz'], 'foobar' => ['attr' => 'bar']], $container->getDefinition('baz')->getTags()); } /** @@ -164,7 +164,7 @@ class DecoratorServicePassTest extends TestCase $this->process($container); - $this->assertEquals(array('Bar', 'Foo'), $container->getDefinition('child')->getAutowiringTypes()); + $this->assertEquals(['Bar', 'Foo'], $container->getDefinition('child')->getAutowiringTypes()); $this->assertEmpty($container->getDefinition('child.inner')->getAutowiringTypes()); } @@ -174,7 +174,7 @@ class DecoratorServicePassTest extends TestCase $container ->register('foo') ->setPublic(true) - ->setTags(array('bar' => array('attr' => 'baz'))) + ->setTags(['bar' => ['attr' => 'baz']]) ; $container ->register('deco1') @@ -188,7 +188,7 @@ class DecoratorServicePassTest extends TestCase $this->process($container); $this->assertEmpty($container->getDefinition('deco1')->getTags()); - $this->assertEquals(array('bar' => array('attr' => 'baz')), $container->getDefinition('deco2')->getTags()); + $this->assertEquals(['bar' => ['attr' => 'baz']], $container->getDefinition('deco2')->getTags()); } protected function process(ContainerBuilder $container) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/DefinitionErrorExceptionPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/DefinitionErrorExceptionPassTest.php index e0585e21..ce6f0496 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/DefinitionErrorExceptionPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/DefinitionErrorExceptionPassTest.php @@ -29,9 +29,9 @@ class DefinitionErrorExceptionPassTest extends TestCase $def->addError('Things went wrong!'); $def->addError('Now something else!'); $container->register('foo_service_id') - ->setArguments(array( + ->setArguments([ $def, - )); + ]); $pass = new DefinitionErrorExceptionPass(); $pass->process($container); @@ -42,9 +42,9 @@ class DefinitionErrorExceptionPassTest extends TestCase $container = new ContainerBuilder(); $def = new Definition(); $container->register('foo_service_id') - ->setArguments(array( + ->setArguments([ $def, - )); + ]); $pass = new DefinitionErrorExceptionPass(); $pass->process($container); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/FactoryReturnTypePassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/FactoryReturnTypePassTest.php index bfb61c37..87f07c70 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/FactoryReturnTypePassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/FactoryReturnTypePassTest.php @@ -31,15 +31,15 @@ class FactoryReturnTypePassTest extends TestCase $container = new ContainerBuilder(); $factory = $container->register('factory'); - $factory->setFactory(array(FactoryDummy::class, 'createFactory')); + $factory->setFactory([FactoryDummy::class, 'createFactory']); $container->setAlias('alias_factory', 'factory'); $foo = $container->register('foo'); - $foo->setFactory(array(new Reference('alias_factory'), 'create')); + $foo->setFactory([new Reference('alias_factory'), 'create']); $bar = $container->register('bar', __CLASS__); - $bar->setFactory(array(new Reference('factory'), 'create')); + $bar->setFactory([new Reference('factory'), 'create']); $pass = new FactoryReturnTypePass(); $pass->process($container); @@ -80,13 +80,13 @@ class FactoryReturnTypePassTest extends TestCase public function returnTypesProvider() { - return array( + return [ // must be loaded before the function as they are in the same file - array(array(FactoryDummy::class, 'createBuiltin'), null, false), - array(array(FactoryDummy::class, 'createParent'), FactoryParent::class), - array(array(FactoryDummy::class, 'createSelf'), FactoryDummy::class), - array(factoryFunction::class, FactoryDummy::class), - ); + [[FactoryDummy::class, 'createBuiltin'], null, false], + [[FactoryDummy::class, 'createParent'], FactoryParent::class], + [[FactoryDummy::class, 'createSelf'], FactoryDummy::class], + [factoryFunction::class, FactoryDummy::class], + ]; } public function testCircularReference() @@ -94,10 +94,10 @@ class FactoryReturnTypePassTest extends TestCase $container = new ContainerBuilder(); $factory = $container->register('factory'); - $factory->setFactory(array(new Reference('factory2'), 'createSelf')); + $factory->setFactory([new Reference('factory2'), 'createSelf']); $factory2 = $container->register('factory2'); - $factory2->setFactory(array(new Reference('factory'), 'create')); + $factory2->setFactory([new Reference('factory'), 'create']); $pass = new FactoryReturnTypePass(); $pass->process($container); @@ -115,7 +115,7 @@ class FactoryReturnTypePassTest extends TestCase $container = new ContainerBuilder(); $factory = $container->register('factory'); - $factory->setFactory(array(FactoryDummy::class, 'createFactory')); + $factory->setFactory([FactoryDummy::class, 'createFactory']); $container->compile(); $this->assertEquals(FactoryDummy::class, $container->getDefinition('factory')->getClass()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/InlineServiceDefinitionsPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/InlineServiceDefinitionsPassTest.php index b2ad6f94..6e5c80a7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/InlineServiceDefinitionsPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/InlineServiceDefinitionsPassTest.php @@ -33,7 +33,7 @@ class InlineServiceDefinitionsPassTest extends TestCase $container ->register('service') - ->setArguments(array(new Reference('inlinable.service'))) + ->setArguments([new Reference('inlinable.service')]) ; $this->process($container); @@ -54,7 +54,7 @@ class InlineServiceDefinitionsPassTest extends TestCase $container ->register('service') - ->setArguments(array($ref = new Reference('foo'))) + ->setArguments([$ref = new Reference('foo')]) ; $this->process($container); @@ -79,7 +79,7 @@ class InlineServiceDefinitionsPassTest extends TestCase $container ->register('service') - ->setArguments(array(new Reference('foo'), $ref = new Reference('moo'), new Reference('bar'))) + ->setArguments([new Reference('foo'), $ref = new Reference('moo'), new Reference('bar')]) ; $this->process($container); @@ -103,7 +103,7 @@ class InlineServiceDefinitionsPassTest extends TestCase $container ->register('bar') ->setPublic(false) - ->addMethodCall('setFoo', array(new Reference('foo'))) + ->addMethodCall('setFoo', [new Reference('foo')]) ; $this->process($container); @@ -126,7 +126,7 @@ class InlineServiceDefinitionsPassTest extends TestCase $container ->register('bar') ->setShared(false) - ->addMethodCall('setFoo', array(new Reference('foo'))) + ->addMethodCall('setFoo', [new Reference('foo')]) ; $this->process($container); @@ -173,7 +173,7 @@ class InlineServiceDefinitionsPassTest extends TestCase $b = $container ->register('b') ->addArgument(new Reference('a')) - ->addArgument(new Definition(null, array(new Reference('a')))) + ->addArgument(new Definition(null, [new Reference('a')])) ; $this->process($container); @@ -193,14 +193,14 @@ class InlineServiceDefinitionsPassTest extends TestCase $b = $container ->register('b') ->setPublic(false) - ->setFactory(array(new Reference('a'), 'a')) + ->setFactory([new Reference('a'), 'a']) ; $container ->register('foo') - ->setArguments(array( + ->setArguments([ $ref = new Reference('b'), - )); + ]); $this->process($container); @@ -217,15 +217,15 @@ class InlineServiceDefinitionsPassTest extends TestCase $container ->register('b') ->setPublic(false) - ->setFactory(array(new Reference('a'), 'a')) + ->setFactory([new Reference('a'), 'a']) ; $container ->register('foo') - ->setArguments(array( + ->setArguments([ $ref1 = new Reference('b'), $ref2 = new Reference('b'), - )) + ]) ; $this->process($container); @@ -243,19 +243,19 @@ class InlineServiceDefinitionsPassTest extends TestCase $container ->register('b') ->setPublic(false) - ->setFactory(array(new Reference('a'), 'a')) + ->setFactory([new Reference('a'), 'a']) ; $inlineFactory = new Definition(); $inlineFactory->setPublic(false); - $inlineFactory->setFactory(array(new Reference('b'), 'b')); + $inlineFactory->setFactory([new Reference('b'), 'b']); $container ->register('foo') - ->setArguments(array( + ->setArguments([ $ref = new Reference('b'), $inlineFactory, - )) + ]) ; $this->process($container); @@ -274,7 +274,7 @@ class InlineServiceDefinitionsPassTest extends TestCase $container ->register('service') - ->setArguments(array($ref = new Reference('foo'))) + ->setArguments([$ref = new Reference('foo')]) ; $this->process($container); @@ -289,7 +289,7 @@ class InlineServiceDefinitionsPassTest extends TestCase $container ->register('foo') ->setPublic(false) - ->addMethodCall('foo', array($ref = new Reference('foo'))) + ->addMethodCall('foo', [$ref = new Reference('foo')]) ; $this->process($container); @@ -307,11 +307,11 @@ class InlineServiceDefinitionsPassTest extends TestCase ; $container ->register('service-closure') - ->setArguments(array(new ServiceClosureArgument(new Reference('inline')))) + ->setArguments([new ServiceClosureArgument(new Reference('inline'))]) ; $container ->register('iterator') - ->setArguments(array(new IteratorArgument(array(new Reference('inline'))))) + ->setArguments([new IteratorArgument([new Reference('inline')])]) ; $this->process($container); @@ -342,19 +342,19 @@ class InlineServiceDefinitionsPassTest extends TestCase $container ->register('other_service') - ->setArguments(array(new Reference('inlinable.service'))) + ->setArguments([new Reference('inlinable.service')]) ; $inlinePass = new InlineServiceDefinitionsPass(); - $repeatedPass = new RepeatedPass(array(new AnalyzeServiceReferencesPass(), $inlinePass)); + $repeatedPass = new RepeatedPass([new AnalyzeServiceReferencesPass(), $inlinePass]); $repeatedPass->process($container); - $this->assertEquals(array('inlinable.service' => array('other_service')), $inlinePass->getInlinedServiceIds()); + $this->assertEquals(['inlinable.service' => ['other_service']], $inlinePass->getInlinedServiceIds()); } protected function process(ContainerBuilder $container) { - $repeatedPass = new RepeatedPass(array(new AnalyzeServiceReferencesPass(), new InlineServiceDefinitionsPass())); + $repeatedPass = new RepeatedPass([new AnalyzeServiceReferencesPass(), new InlineServiceDefinitionsPass()]); $repeatedPass->process($container); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php index 09ba6ab4..10c34aa4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php @@ -17,6 +17,7 @@ use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ServiceSubscriberInterface; /** * This class tests the integration of the different compiler passes. @@ -96,7 +97,7 @@ class IntegrationTest extends TestCase $container ->register('a', '\stdClass') ->addArgument(new Reference('b')) - ->addMethodCall('setC', array(new Reference('c'))) + ->addMethodCall('setC', [new Reference('c')]) ; $container @@ -117,6 +118,21 @@ class IntegrationTest extends TestCase $this->assertFalse($container->hasDefinition('c'), 'Service C was not inlined.'); } + public function testCanDecorateServiceSubscriber() + { + $container = new ContainerBuilder(); + $container->register(ServiceSubscriberStub::class) + ->addTag('container.service_subscriber') + ->setPublic(true); + + $container->register(DecoratedServiceSubscriber::class) + ->setDecoratedService(ServiceSubscriberStub::class); + + $container->compile(); + + $this->assertInstanceOf(DecoratedServiceSubscriber::class, $container->get(ServiceSubscriberStub::class)); + } + /** * @dataProvider getYamlCompileTests */ @@ -139,8 +155,8 @@ class IntegrationTest extends TestCase $expectedService = $container->getDefinition($expectedServiceId); // reset changes, we don't care if these differ - $actualService->setChanges(array()); - $expectedService->setChanges(array()); + $actualService->setChanges([]); + $expectedService->setChanges([]); $this->assertEquals($expectedService, $actualService); } @@ -149,64 +165,76 @@ class IntegrationTest extends TestCase { $container = new ContainerBuilder(); $container->registerForAutoconfiguration(IntegrationTestStub::class); - yield array( + yield [ 'autoconfigure_child_not_applied', 'child_service', 'child_service_expected', $container, - ); + ]; $container = new ContainerBuilder(); $container->registerForAutoconfiguration(IntegrationTestStub::class); - yield array( + yield [ 'autoconfigure_parent_child', 'child_service', 'child_service_expected', $container, - ); + ]; $container = new ContainerBuilder(); $container->registerForAutoconfiguration(IntegrationTestStub::class) ->addTag('from_autoconfigure'); - yield array( + yield [ 'autoconfigure_parent_child_tags', 'child_service', 'child_service_expected', $container, - ); + ]; - yield array( + yield [ 'child_parent', 'child_service', 'child_service_expected', - ); + ]; - yield array( + yield [ 'defaults_child_tags', 'child_service', 'child_service_expected', - ); + ]; - yield array( + yield [ 'defaults_instanceof_importance', 'main_service', 'main_service_expected', - ); + ]; - yield array( + yield [ 'defaults_parent_child', 'child_service', 'child_service_expected', - ); + ]; - yield array( + yield [ 'instanceof_parent_child', 'child_service', 'child_service_expected', - ); + ]; } } +class ServiceSubscriberStub implements ServiceSubscriberInterface +{ + public static function getSubscribedServices() + { + return []; + } +} + +class DecoratedServiceSubscriber +{ +} + class IntegrationTestStub extends IntegrationTestStubParent { } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php index 3ebd3f5e..667ae388 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php @@ -25,7 +25,7 @@ class MergeExtensionConfigurationPassTest extends TestCase { public function testExpressionLanguageProviderForwarding() { - $tmpProviders = array(); + $tmpProviders = []; $extension = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface')->getMock(); $extension->expects($this->any()) @@ -46,18 +46,18 @@ class MergeExtensionConfigurationPassTest extends TestCase $provider = $this->getMockBuilder('Symfony\\Component\\ExpressionLanguage\\ExpressionFunctionProviderInterface')->getMock(); $container = new ContainerBuilder(new ParameterBag()); $container->registerExtension($extension); - $container->prependExtensionConfig('foo', array('bar' => true)); + $container->prependExtensionConfig('foo', ['bar' => true]); $container->addExpressionLanguageProvider($provider); $pass = new MergeExtensionConfigurationPass(); $pass->process($container); - $this->assertEquals(array($provider), $tmpProviders); + $this->assertEquals([$provider], $tmpProviders); } public function testExtensionLoadGetAMergeExtensionConfigurationContainerBuilderInstance() { - $extension = $this->getMockBuilder(FooExtension::class)->setMethods(array('load'))->getMock(); + $extension = $this->getMockBuilder(FooExtension::class)->setMethods(['load'])->getMock(); $extension->expects($this->once()) ->method('load') ->with($this->isType('array'), $this->isInstanceOf(MergeExtensionConfigurationContainerBuilder::class)) @@ -65,7 +65,7 @@ class MergeExtensionConfigurationPassTest extends TestCase $container = new ContainerBuilder(new ParameterBag()); $container->registerExtension($extension); - $container->prependExtensionConfig('foo', array()); + $container->prependExtensionConfig('foo', []); $pass = new MergeExtensionConfigurationPass(); $pass->process($container); @@ -73,14 +73,14 @@ class MergeExtensionConfigurationPassTest extends TestCase public function testExtensionConfigurationIsTrackedByDefault() { - $extension = $this->getMockBuilder(FooExtension::class)->setMethods(array('getConfiguration'))->getMock(); + $extension = $this->getMockBuilder(FooExtension::class)->setMethods(['getConfiguration'])->getMock(); $extension->expects($this->exactly(2)) ->method('getConfiguration') ->will($this->returnValue(new FooConfiguration())); $container = new ContainerBuilder(new ParameterBag()); $container->registerExtension($extension); - $container->prependExtensionConfig('foo', array('bar' => true)); + $container->prependExtensionConfig('foo', ['bar' => true]); $pass = new MergeExtensionConfigurationPass(); $pass->process($container); @@ -92,14 +92,14 @@ class MergeExtensionConfigurationPassTest extends TestCase { $container = new ContainerBuilder(); $container->registerExtension(new FooExtension()); - $container->prependExtensionConfig('foo', array('bar' => '%env(FOO)%')); - $container->prependExtensionConfig('foo', array('bar' => '%env(BAR)%', 'baz' => '%env(BAZ)%')); + $container->prependExtensionConfig('foo', ['bar' => '%env(FOO)%']); + $container->prependExtensionConfig('foo', ['bar' => '%env(BAR)%', 'baz' => '%env(BAZ)%']); $pass = new MergeExtensionConfigurationPass(); $pass->process($container); - $this->assertSame(array('BAZ', 'FOO'), array_keys($container->getParameterBag()->getEnvPlaceholders())); - $this->assertSame(array('BAZ' => 1, 'FOO' => 0), $container->getEnvCounters()); + $this->assertSame(['BAZ', 'FOO'], array_keys($container->getParameterBag()->getEnvPlaceholders())); + $this->assertSame(['BAZ' => 1, 'FOO' => 0], $container->getEnvCounters()); } /** @@ -110,7 +110,7 @@ class MergeExtensionConfigurationPassTest extends TestCase { $container = new ContainerBuilder(); $container->registerExtension(new BarExtension()); - $container->prependExtensionConfig('bar', array()); + $container->prependExtensionConfig('bar', []); (new MergeExtensionConfigurationPass())->process($container); } @@ -119,7 +119,7 @@ class MergeExtensionConfigurationPassTest extends TestCase { $container = new ContainerBuilder(); $container->registerExtension(new ThrowingExtension()); - $container->prependExtensionConfig('throwing', array('bar' => '%env(FOO)%')); + $container->prependExtensionConfig('throwing', ['bar' => '%env(FOO)%']); try { $pass = new MergeExtensionConfigurationPass(); @@ -128,7 +128,7 @@ class MergeExtensionConfigurationPassTest extends TestCase } catch (\Exception $e) { } - $this->assertSame(array('FOO'), array_keys($container->getParameterBag()->getEnvPlaceholders())); + $this->assertSame(['FOO'], array_keys($container->getParameterBag()->getEnvPlaceholders())); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/PassConfigTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/PassConfigTest.php index 1fd772ee..9470e526 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/PassConfigTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/PassConfigTest.php @@ -23,7 +23,7 @@ class PassConfigTest extends TestCase public function testPassOrdering() { $config = new PassConfig(); - $config->setBeforeOptimizationPasses(array()); + $config->setBeforeOptimizationPasses([]); $pass1 = $this->getMockBuilder(CompilerPassInterface::class)->getMock(); $config->addPass($pass1, PassConfig::TYPE_BEFORE_OPTIMIZATION, 10); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php index 61e3fa94..57682b5d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php @@ -20,27 +20,27 @@ class PriorityTaggedServiceTraitTest extends TestCase { public function testThatCacheWarmersAreProcessedInPriorityOrder() { - $services = array( - 'my_service1' => array('my_custom_tag' => array('priority' => 100)), - 'my_service2' => array('my_custom_tag' => array('priority' => 200)), - 'my_service3' => array('my_custom_tag' => array('priority' => -501)), - 'my_service4' => array('my_custom_tag' => array()), - 'my_service5' => array('my_custom_tag' => array('priority' => -1)), - 'my_service6' => array('my_custom_tag' => array('priority' => -500)), - 'my_service7' => array('my_custom_tag' => array('priority' => -499)), - 'my_service8' => array('my_custom_tag' => array('priority' => 1)), - 'my_service9' => array('my_custom_tag' => array('priority' => -2)), - 'my_service10' => array('my_custom_tag' => array('priority' => -1000)), - 'my_service11' => array('my_custom_tag' => array('priority' => -1001)), - 'my_service12' => array('my_custom_tag' => array('priority' => -1002)), - 'my_service13' => array('my_custom_tag' => array('priority' => -1003)), - 'my_service14' => array('my_custom_tag' => array('priority' => -1000)), - 'my_service15' => array('my_custom_tag' => array('priority' => 1)), - 'my_service16' => array('my_custom_tag' => array('priority' => -1)), - 'my_service17' => array('my_custom_tag' => array('priority' => 200)), - 'my_service18' => array('my_custom_tag' => array('priority' => 100)), - 'my_service19' => array('my_custom_tag' => array()), - ); + $services = [ + 'my_service1' => ['my_custom_tag' => ['priority' => 100]], + 'my_service2' => ['my_custom_tag' => ['priority' => 200]], + 'my_service3' => ['my_custom_tag' => ['priority' => -501]], + 'my_service4' => ['my_custom_tag' => []], + 'my_service5' => ['my_custom_tag' => ['priority' => -1]], + 'my_service6' => ['my_custom_tag' => ['priority' => -500]], + 'my_service7' => ['my_custom_tag' => ['priority' => -499]], + 'my_service8' => ['my_custom_tag' => ['priority' => 1]], + 'my_service9' => ['my_custom_tag' => ['priority' => -2]], + 'my_service10' => ['my_custom_tag' => ['priority' => -1000]], + 'my_service11' => ['my_custom_tag' => ['priority' => -1001]], + 'my_service12' => ['my_custom_tag' => ['priority' => -1002]], + 'my_service13' => ['my_custom_tag' => ['priority' => -1003]], + 'my_service14' => ['my_custom_tag' => ['priority' => -1000]], + 'my_service15' => ['my_custom_tag' => ['priority' => 1]], + 'my_service16' => ['my_custom_tag' => ['priority' => -1]], + 'my_service17' => ['my_custom_tag' => ['priority' => 200]], + 'my_service18' => ['my_custom_tag' => ['priority' => 100]], + 'my_service19' => ['my_custom_tag' => []], + ]; $container = new ContainerBuilder(); @@ -52,7 +52,7 @@ class PriorityTaggedServiceTraitTest extends TestCase } } - $expected = array( + $expected = [ new Reference('my_service2'), new Reference('my_service17'), new Reference('my_service1'), @@ -72,7 +72,7 @@ class PriorityTaggedServiceTraitTest extends TestCase new Reference('my_service11'), new Reference('my_service12'), new Reference('my_service13'), - ); + ]; $priorityTaggedServiceTraitImplementation = new PriorityTaggedServiceTraitImplementation(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterEnvVarProcessorsPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterEnvVarProcessorsPassTest.php index cddb62dc..3d3fdf76 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterEnvVarProcessorsPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterEnvVarProcessorsPassTest.php @@ -28,18 +28,18 @@ class RegisterEnvVarProcessorsPassTest extends TestCase $this->assertTrue($container->has('container.env_var_processors_locator')); $this->assertInstanceOf(SimpleProcessor::class, $container->get('container.env_var_processors_locator')->get('foo')); - $expected = array( - 'foo' => array('string'), - 'base64' => array('string'), - 'bool' => array('bool'), - 'const' => array('bool', 'int', 'float', 'string', 'array'), - 'file' => array('string'), - 'float' => array('float'), - 'int' => array('int'), - 'json' => array('array'), - 'resolve' => array('string'), - 'string' => array('string'), - ); + $expected = [ + 'foo' => ['string'], + 'base64' => ['string'], + 'bool' => ['bool'], + 'const' => ['bool', 'int', 'float', 'string', 'array'], + 'file' => ['string'], + 'float' => ['float'], + 'int' => ['int'], + 'json' => ['array'], + 'resolve' => ['string'], + 'string' => ['string'], + ]; $this->assertSame($expected, $container->getParameterBag()->getProvidedTypes()); } @@ -75,7 +75,7 @@ class SimpleProcessor implements EnvVarProcessorInterface public static function getProvidedTypes() { - return array('foo' => 'string'); + return ['foo' => 'string']; } } @@ -83,6 +83,6 @@ class BadProcessor extends SimpleProcessor { public static function getProvidedTypes() { - return array('foo' => 'string|foo'); + return ['foo' => 'string|foo']; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php index 42f994e8..0356c971 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php @@ -53,7 +53,7 @@ class RegisterServiceSubscribersPassTest extends TestCase $container = new ContainerBuilder(); $container->register('foo', TestServiceSubscriber::class) - ->addTag('container.service_subscriber', array('bar' => '123')) + ->addTag('container.service_subscriber', ['bar' => '123']) ; (new RegisterServiceSubscribersPass())->process($container); @@ -78,12 +78,12 @@ class RegisterServiceSubscribersPassTest extends TestCase $this->assertFalse($locator->isPublic()); $this->assertSame(ServiceLocator::class, $locator->getClass()); - $expected = array( + $expected = [ TestServiceSubscriber::class => new ServiceClosureArgument(new TypedReference(TestServiceSubscriber::class, TestServiceSubscriber::class, TestServiceSubscriber::class)), CustomDefinition::class => new ServiceClosureArgument(new TypedReference(CustomDefinition::class, CustomDefinition::class, TestServiceSubscriber::class, ContainerInterface::IGNORE_ON_INVALID_REFERENCE)), 'bar' => new ServiceClosureArgument(new TypedReference(CustomDefinition::class, CustomDefinition::class, TestServiceSubscriber::class)), 'baz' => new ServiceClosureArgument(new TypedReference(CustomDefinition::class, CustomDefinition::class, TestServiceSubscriber::class, ContainerInterface::IGNORE_ON_INVALID_REFERENCE)), - ); + ]; $this->assertEquals($expected, $container->getDefinition((string) $locator->getFactory()[0])->getArgument(0)); } @@ -95,8 +95,8 @@ class RegisterServiceSubscribersPassTest extends TestCase $container->register('foo', TestServiceSubscriber::class) ->setAutowired(true) ->addArgument(new Reference(PsrContainerInterface::class)) - ->addTag('container.service_subscriber', array('key' => 'bar', 'id' => 'bar')) - ->addTag('container.service_subscriber', array('key' => 'bar', 'id' => 'baz')) // should be ignored: the first wins + ->addTag('container.service_subscriber', ['key' => 'bar', 'id' => 'bar']) + ->addTag('container.service_subscriber', ['key' => 'bar', 'id' => 'baz']) // should be ignored: the first wins ; (new RegisterServiceSubscribersPass())->process($container); @@ -108,12 +108,12 @@ class RegisterServiceSubscribersPassTest extends TestCase $this->assertFalse($locator->isPublic()); $this->assertSame(ServiceLocator::class, $locator->getClass()); - $expected = array( + $expected = [ TestServiceSubscriber::class => new ServiceClosureArgument(new TypedReference(TestServiceSubscriber::class, TestServiceSubscriber::class, TestServiceSubscriber::class)), CustomDefinition::class => new ServiceClosureArgument(new TypedReference(CustomDefinition::class, CustomDefinition::class, TestServiceSubscriber::class, ContainerInterface::IGNORE_ON_INVALID_REFERENCE)), 'bar' => new ServiceClosureArgument(new TypedReference('bar', CustomDefinition::class, TestServiceSubscriber::class)), 'baz' => new ServiceClosureArgument(new TypedReference(CustomDefinition::class, CustomDefinition::class, TestServiceSubscriber::class, ContainerInterface::IGNORE_ON_INVALID_REFERENCE)), - ); + ]; $this->assertEquals($expected, $container->getDefinition((string) $locator->getFactory()[0])->getArgument(0)); } @@ -128,10 +128,10 @@ class RegisterServiceSubscribersPassTest extends TestCase $container->register('foo_service', TestServiceSubscriber::class) ->setAutowired(true) ->addArgument(new Reference(PsrContainerInterface::class)) - ->addTag('container.service_subscriber', array( + ->addTag('container.service_subscriber', [ 'key' => 'test', 'id' => TestServiceSubscriber::class, - )) + ]) ; $container->register(TestServiceSubscriber::class, TestServiceSubscriber::class); $container->compile(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/RemoveUnusedDefinitionsPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/RemoveUnusedDefinitionsPassTest.php index fd26561a..1dfdd9dd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/RemoveUnusedDefinitionsPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/RemoveUnusedDefinitionsPassTest.php @@ -35,7 +35,7 @@ class RemoveUnusedDefinitionsPassTest extends TestCase ; $container ->register('moo') - ->setArguments(array(new Reference('bar'))) + ->setArguments([new Reference('bar')]) ; $this->process($container); @@ -54,7 +54,7 @@ class RemoveUnusedDefinitionsPassTest extends TestCase ; $container ->register('bar') - ->setArguments(array(new Reference('foo'))) + ->setArguments([new Reference('foo')]) ->setPublic(false) ; @@ -73,7 +73,7 @@ class RemoveUnusedDefinitionsPassTest extends TestCase ; $container ->register('bar') - ->setArguments(array(new Definition(null, array(new Reference('foo'))))) + ->setArguments([new Definition(null, [new Reference('foo')])]) ; $this->process($container); @@ -88,12 +88,12 @@ class RemoveUnusedDefinitionsPassTest extends TestCase $container ->register('foo', 'stdClass') - ->setFactory(array('stdClass', 'getInstance')) + ->setFactory(['stdClass', 'getInstance']) ->setPublic(false); $container ->register('bar', 'stdClass') - ->setFactory(array(new Reference('foo'), 'getInstance')) + ->setFactory([new Reference('foo'), 'getInstance']) ->setPublic(false); $container @@ -113,7 +113,7 @@ class RemoveUnusedDefinitionsPassTest extends TestCase $container->setParameter('env(FOOBAR)', 'test'); $container ->register('foo') - ->setArguments(array('%env(FOOBAR)%')) + ->setArguments(['%env(FOOBAR)%']) ->setPublic(false) ; @@ -131,7 +131,7 @@ class RemoveUnusedDefinitionsPassTest extends TestCase protected function process(ContainerBuilder $container) { - $repeatedPass = new RepeatedPass(array(new AnalyzeServiceReferencesPass(), new RemoveUnusedDefinitionsPass())); + $repeatedPass = new RepeatedPass([new AnalyzeServiceReferencesPass(), new RemoveUnusedDefinitionsPass()]); $repeatedPass->process($container); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php index 7574e794..f9c755c3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php @@ -26,7 +26,7 @@ class ReplaceAliasByActualDefinitionPassTest extends TestCase $container = new ContainerBuilder(); $aDefinition = $container->register('a', '\stdClass'); - $aDefinition->setFactory(array(new Reference('b'), 'createA')); + $aDefinition->setFactory([new Reference('b'), 'createA']); $bDefinition = new Definition('\stdClass'); $bDefinition->setPublic(false); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveBindingsPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveBindingsPassTest.php index d59b95af..5118b416 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveBindingsPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveBindingsPassTest.php @@ -30,10 +30,10 @@ class ResolveBindingsPassTest extends TestCase { $container = new ContainerBuilder(); - $bindings = array(CaseSensitiveClass::class => new BoundArgument(new Reference('foo'))); + $bindings = [CaseSensitiveClass::class => new BoundArgument(new Reference('foo'))]; $definition = $container->register(NamedArgumentsDummy::class, NamedArgumentsDummy::class); - $definition->setArguments(array(1 => '123')); + $definition->setArguments([1 => '123']); $definition->addMethodCall('setSensitiveClass'); $definition->setBindings($bindings); @@ -43,8 +43,8 @@ class ResolveBindingsPassTest extends TestCase $pass = new ResolveBindingsPass(); $pass->process($container); - $this->assertEquals(array(new Reference('foo'), '123'), $definition->getArguments()); - $this->assertEquals(array(array('setSensitiveClass', array(new Reference('foo')))), $definition->getMethodCalls()); + $this->assertEquals([new Reference('foo'), '123'], $definition->getArguments()); + $this->assertEquals([['setSensitiveClass', [new Reference('foo')]]], $definition->getMethodCalls()); } /** @@ -56,7 +56,7 @@ class ResolveBindingsPassTest extends TestCase $container = new ContainerBuilder(); $definition = $container->register(NamedArgumentsDummy::class, NamedArgumentsDummy::class); - $definition->setBindings(array('$quz' => '123')); + $definition->setBindings(['$quz' => '123']); $pass = new ResolveBindingsPass(); $pass->process($container); @@ -71,7 +71,7 @@ class ResolveBindingsPassTest extends TestCase $container = new ContainerBuilder(); $definition = $container->register(ParentNotExists::class, ParentNotExists::class); - $definition->setBindings(array('$quz' => '123')); + $definition->setBindings(['$quz' => '123']); $pass = new ResolveBindingsPass(); $pass->process($container); @@ -81,7 +81,7 @@ class ResolveBindingsPassTest extends TestCase { $container = new ContainerBuilder(); - $bindings = array(CaseSensitiveClass::class => new BoundArgument(new Reference('foo'))); + $bindings = [CaseSensitiveClass::class => new BoundArgument(new Reference('foo'))]; // Explicit service id $definition1 = $container->register('def1', NamedArgumentsDummy::class); @@ -95,8 +95,8 @@ class ResolveBindingsPassTest extends TestCase $pass = new ResolveBindingsPass(); $pass->process($container); - $this->assertEquals(array($typedRef), $container->getDefinition('def1')->getArguments()); - $this->assertEquals(array(new Reference('foo')), $container->getDefinition('def2')->getArguments()); + $this->assertEquals([$typedRef], $container->getDefinition('def1')->getArguments()); + $this->assertEquals([new Reference('foo')], $container->getDefinition('def2')->getArguments()); } public function testScalarSetter() @@ -104,11 +104,11 @@ class ResolveBindingsPassTest extends TestCase $container = new ContainerBuilder(); $definition = $container->autowire('foo', ScalarSetter::class); - $definition->setBindings(array('$defaultLocale' => 'fr')); + $definition->setBindings(['$defaultLocale' => 'fr']); (new AutowireRequiredMethodsPass())->process($container); (new ResolveBindingsPass())->process($container); - $this->assertEquals(array(array('setDefaultLocale', array('fr'))), $definition->getMethodCalls()); + $this->assertEquals([['setDefaultLocale', ['fr']]], $definition->getMethodCalls()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php index 1575bd7b..4eca8f70 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php @@ -22,7 +22,7 @@ class ResolveChildDefinitionsPassTest extends TestCase public function testProcess() { $container = new ContainerBuilder(); - $container->register('parent', 'foo')->setArguments(array('moo', 'b'))->setProperty('foo', 'moo'); + $container->register('parent', 'foo')->setArguments(['moo', 'b'])->setProperty('foo', 'moo'); $container->setDefinition('child', new ChildDefinition('parent')) ->replaceArgument(0, 'a') ->setProperty('foo', 'bar') @@ -34,8 +34,8 @@ class ResolveChildDefinitionsPassTest extends TestCase $def = $container->getDefinition('child'); $this->assertNotInstanceOf(ChildDefinition::class, $def); $this->assertEquals('bar', $def->getClass()); - $this->assertEquals(array('a', 'b'), $def->getArguments()); - $this->assertEquals(array('foo' => 'bar'), $def->getProperties()); + $this->assertEquals(['a', 'b'], $def->getArguments()); + $this->assertEquals(['foo' => 'bar'], $def->getProperties()); } public function testProcessAppendsMethodCallsAlways() @@ -44,21 +44,21 @@ class ResolveChildDefinitionsPassTest extends TestCase $container ->register('parent') - ->addMethodCall('foo', array('bar')) + ->addMethodCall('foo', ['bar']) ; $container ->setDefinition('child', new ChildDefinition('parent')) - ->addMethodCall('bar', array('foo')) + ->addMethodCall('bar', ['foo']) ; $this->process($container); $def = $container->getDefinition('child'); - $this->assertEquals(array( - array('foo', array('bar')), - array('bar', array('foo')), - ), $def->getMethodCalls()); + $this->assertEquals([ + ['foo', ['bar']], + ['bar', ['foo']], + ], $def->getMethodCalls()); } public function testProcessDoesNotCopyAbstract() @@ -115,7 +115,7 @@ class ResolveChildDefinitionsPassTest extends TestCase $this->process($container); $def = $container->getDefinition('child'); - $this->assertEquals(array(), $def->getTags()); + $this->assertEquals([], $def->getTags()); } public function testProcessDoesNotCopyDecoratedService() @@ -162,7 +162,7 @@ class ResolveChildDefinitionsPassTest extends TestCase $container ->register('parent', 'foo') - ->setArguments(array('foo', 'bar', 'c')) + ->setArguments(['foo', 'bar', 'c']) ; $container @@ -178,7 +178,7 @@ class ResolveChildDefinitionsPassTest extends TestCase $this->process($container); $def = $container->getDefinition('child2'); - $this->assertEquals(array('a', 'b', 'c'), $def->getArguments()); + $this->assertEquals(['a', 'b', 'c'], $def->getArguments()); $this->assertEquals('foo', $def->getClass()); } @@ -251,10 +251,10 @@ class ResolveChildDefinitionsPassTest extends TestCase $container->register('parent', 'parentClass'); $container->register('sibling', 'siblingClass') ->setConfigurator(new ChildDefinition('parent'), 'foo') - ->setFactory(array(new ChildDefinition('parent'), 'foo')) + ->setFactory([new ChildDefinition('parent'), 'foo']) ->addArgument(new ChildDefinition('parent')) ->setProperty('prop', new ChildDefinition('parent')) - ->addMethodCall('meth', array(new ChildDefinition('parent'))) + ->addMethodCall('meth', [new ChildDefinition('parent')]) ; $this->process($container); @@ -292,7 +292,7 @@ class ResolveChildDefinitionsPassTest extends TestCase $this->process($container); - $this->assertEquals(array('foo', 'foo_inner', 5), $container->getDefinition('child1')->getDecoratedService()); + $this->assertEquals(['foo', 'foo_inner', 5], $container->getDefinition('child1')->getDecoratedService()); } public function testDecoratedServiceCopiesDeprecatedStatusFromParent() @@ -345,10 +345,10 @@ class ResolveChildDefinitionsPassTest extends TestCase $this->process($container); $childDef = $container->getDefinition('child'); - $this->assertEquals(array('Foo', 'Bar'), $childDef->getAutowiringTypes()); + $this->assertEquals(['Foo', 'Bar'], $childDef->getAutowiringTypes()); $parentDef = $container->getDefinition('parent'); - $this->assertSame(array('Foo'), $parentDef->getAutowiringTypes()); + $this->assertSame(['Foo'], $parentDef->getAutowiringTypes()); } public function testProcessResolvesAliases() @@ -369,17 +369,17 @@ class ResolveChildDefinitionsPassTest extends TestCase { $container = new ContainerBuilder(); - $container->register('parent', 'ParentClass')->setArguments(array(0)); - $container->setDefinition('child', (new ChildDefinition('parent'))->setArguments(array( + $container->register('parent', 'ParentClass')->setArguments([0]); + $container->setDefinition('child', (new ChildDefinition('parent'))->setArguments([ 1, 'index_0' => 2, 'foo' => 3, - ))); + ])); $this->process($container); $def = $container->getDefinition('child'); - $this->assertSame(array(2, 1, 'foo' => 3), $def->getArguments()); + $this->assertSame([2, 1, 'foo' => 3], $def->getArguments()); } public function testBindings() @@ -387,20 +387,20 @@ class ResolveChildDefinitionsPassTest extends TestCase $container = new ContainerBuilder(); $container->register('parent', 'stdClass') - ->setBindings(array('a' => '1', 'b' => '2')) + ->setBindings(['a' => '1', 'b' => '2']) ; $child = $container->setDefinition('child', new ChildDefinition('parent')) - ->setBindings(array('b' => 'B', 'c' => 'C')) + ->setBindings(['b' => 'B', 'c' => 'C']) ; $this->process($container); - $bindings = array(); + $bindings = []; foreach ($container->getDefinition('child')->getBindings() as $k => $v) { $bindings[$k] = $v->getValues()[0]; } - $this->assertEquals(array('b' => 'B', 'c' => 'C', 'a' => '1'), $bindings); + $this->assertEquals(['b' => 'B', 'c' => 'C', 'a' => '1'], $bindings); } public function testSetAutoconfiguredOnServiceIsParent() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveClassPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveClassPassTest.php index acbcf1dd..48df3843 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveClassPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveClassPassTest.php @@ -34,8 +34,8 @@ class ResolveClassPassTest extends TestCase public function provideValidClassId() { - yield array('Acme\UnknownClass'); - yield array(CaseSensitiveClass::class); + yield ['Acme\UnknownClass']; + yield [CaseSensitiveClass::class]; } /** @@ -53,9 +53,9 @@ class ResolveClassPassTest extends TestCase public function provideInvalidClassId() { - yield array(\stdClass::class); - yield array('bar'); - yield array('\DateTime'); + yield [\stdClass::class]; + yield ['bar']; + yield ['\DateTime']; } public function testNonFqcnChildDefinition() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php index 39ae7f4f..407c803c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php @@ -24,7 +24,7 @@ class ResolveDefinitionTemplatesPassTest extends TestCase public function testProcess() { $container = new ContainerBuilder(); - $container->register('parent', 'foo')->setArguments(array('moo', 'b'))->setProperty('foo', 'moo'); + $container->register('parent', 'foo')->setArguments(['moo', 'b'])->setProperty('foo', 'moo'); $container->setDefinition('child', new ChildDefinition('parent')) ->replaceArgument(0, 'a') ->setProperty('foo', 'bar') @@ -36,8 +36,8 @@ class ResolveDefinitionTemplatesPassTest extends TestCase $def = $container->getDefinition('child'); $this->assertNotInstanceOf(ChildDefinition::class, $def); $this->assertEquals('bar', $def->getClass()); - $this->assertEquals(array('a', 'b'), $def->getArguments()); - $this->assertEquals(array('foo' => 'bar'), $def->getProperties()); + $this->assertEquals(['a', 'b'], $def->getArguments()); + $this->assertEquals(['foo' => 'bar'], $def->getProperties()); } public function testProcessAppendsMethodCallsAlways() @@ -46,21 +46,21 @@ class ResolveDefinitionTemplatesPassTest extends TestCase $container ->register('parent') - ->addMethodCall('foo', array('bar')) + ->addMethodCall('foo', ['bar']) ; $container ->setDefinition('child', new ChildDefinition('parent')) - ->addMethodCall('bar', array('foo')) + ->addMethodCall('bar', ['foo']) ; $this->process($container); $def = $container->getDefinition('child'); - $this->assertEquals(array( - array('foo', array('bar')), - array('bar', array('foo')), - ), $def->getMethodCalls()); + $this->assertEquals([ + ['foo', ['bar']], + ['bar', ['foo']], + ], $def->getMethodCalls()); } public function testProcessDoesNotCopyAbstract() @@ -117,7 +117,7 @@ class ResolveDefinitionTemplatesPassTest extends TestCase $this->process($container); $def = $container->getDefinition('child'); - $this->assertEquals(array(), $def->getTags()); + $this->assertEquals([], $def->getTags()); } public function testProcessDoesNotCopyDecoratedService() @@ -164,7 +164,7 @@ class ResolveDefinitionTemplatesPassTest extends TestCase $container ->register('parent', 'foo') - ->setArguments(array('foo', 'bar', 'c')) + ->setArguments(['foo', 'bar', 'c']) ; $container @@ -180,7 +180,7 @@ class ResolveDefinitionTemplatesPassTest extends TestCase $this->process($container); $def = $container->getDefinition('child2'); - $this->assertEquals(array('a', 'b', 'c'), $def->getArguments()); + $this->assertEquals(['a', 'b', 'c'], $def->getArguments()); $this->assertEquals('foo', $def->getClass()); } @@ -253,10 +253,10 @@ class ResolveDefinitionTemplatesPassTest extends TestCase $container->register('parent', 'parentClass'); $container->register('sibling', 'siblingClass') ->setConfigurator(new ChildDefinition('parent'), 'foo') - ->setFactory(array(new ChildDefinition('parent'), 'foo')) + ->setFactory([new ChildDefinition('parent'), 'foo']) ->addArgument(new ChildDefinition('parent')) ->setProperty('prop', new ChildDefinition('parent')) - ->addMethodCall('meth', array(new ChildDefinition('parent'))) + ->addMethodCall('meth', [new ChildDefinition('parent')]) ; $this->process($container); @@ -294,7 +294,7 @@ class ResolveDefinitionTemplatesPassTest extends TestCase $this->process($container); - $this->assertEquals(array('foo', 'foo_inner', 5), $container->getDefinition('child1')->getDecoratedService()); + $this->assertEquals(['foo', 'foo_inner', 5], $container->getDefinition('child1')->getDecoratedService()); } public function testDecoratedServiceCopiesDeprecatedStatusFromParent() @@ -347,10 +347,10 @@ class ResolveDefinitionTemplatesPassTest extends TestCase $this->process($container); $childDef = $container->getDefinition('child'); - $this->assertEquals(array('Foo', 'Bar'), $childDef->getAutowiringTypes()); + $this->assertEquals(['Foo', 'Bar'], $childDef->getAutowiringTypes()); $parentDef = $container->getDefinition('parent'); - $this->assertSame(array('Foo'), $parentDef->getAutowiringTypes()); + $this->assertSame(['Foo'], $parentDef->getAutowiringTypes()); } public function testProcessResolvesAliases() @@ -371,17 +371,17 @@ class ResolveDefinitionTemplatesPassTest extends TestCase { $container = new ContainerBuilder(); - $container->register('parent', 'ParentClass')->setArguments(array(0)); - $container->setDefinition('child', (new ChildDefinition('parent'))->setArguments(array( + $container->register('parent', 'ParentClass')->setArguments([0]); + $container->setDefinition('child', (new ChildDefinition('parent'))->setArguments([ 1, 'index_0' => 2, 'foo' => 3, - ))); + ])); $this->process($container); $def = $container->getDefinition('child'); - $this->assertSame(array(2, 1, 'foo' => 3), $def->getArguments()); + $this->assertSame([2, 1, 'foo' => 3], $def->getArguments()); } public function testSetAutoconfiguredOnServiceIsParent() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveFactoryClassPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveFactoryClassPassTest.php index 96453c30..3438fad0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveFactoryClassPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveFactoryClassPassTest.php @@ -24,12 +24,12 @@ class ResolveFactoryClassPassTest extends TestCase $container = new ContainerBuilder(); $factory = $container->register('factory', 'Foo\Bar'); - $factory->setFactory(array(null, 'create')); + $factory->setFactory([null, 'create']); $pass = new ResolveFactoryClassPass(); $pass->process($container); - $this->assertSame(array('Foo\Bar', 'create'), $factory->getFactory()); + $this->assertSame(['Foo\Bar', 'create'], $factory->getFactory()); } public function testInlinedDefinitionFactoryIsProcessed() @@ -37,21 +37,21 @@ class ResolveFactoryClassPassTest extends TestCase $container = new ContainerBuilder(); $factory = $container->register('factory'); - $factory->setFactory(array((new Definition('Baz\Qux'))->setFactory(array(null, 'getInstance')), 'create')); + $factory->setFactory([(new Definition('Baz\Qux'))->setFactory([null, 'getInstance']), 'create']); $pass = new ResolveFactoryClassPass(); $pass->process($container); - $this->assertSame(array('Baz\Qux', 'getInstance'), $factory->getFactory()[0]->getFactory()); + $this->assertSame(['Baz\Qux', 'getInstance'], $factory->getFactory()[0]->getFactory()); } public function provideFulfilledFactories() { - return array( - array(array('Foo\Bar', 'create')), - array(array(new Reference('foo'), 'create')), - array(array(new Definition('Baz'), 'create')), - ); + return [ + [['Foo\Bar', 'create']], + [[new Reference('foo'), 'create']], + [[new Definition('Baz'), 'create']], + ]; } /** @@ -80,7 +80,7 @@ class ResolveFactoryClassPassTest extends TestCase $container = new ContainerBuilder(); $factory = $container->register('factory'); - $factory->setFactory(array(null, 'create')); + $factory->setFactory([null, 'create']); $pass = new ResolveFactoryClassPass(); $pass->process($container); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveHotPathPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveHotPathPassTest.php index d2ba5900..a2fece05 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveHotPathPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveHotPathPassTest.php @@ -26,9 +26,9 @@ class ResolveHotPathPassTest extends TestCase $container->register('foo') ->addTag('container.hot_path') - ->addArgument(new IteratorArgument(array(new Reference('lazy')))) + ->addArgument(new IteratorArgument([new Reference('lazy')])) ->addArgument(new Reference('service_container')) - ->addArgument(new Definition('', array(new Reference('bar')))) + ->addArgument(new Definition('', [new Reference('bar')])) ->addArgument(new Reference('baz', ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE)) ->addArgument(new Reference('missing')) ; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInstanceofConditionalsPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInstanceofConditionalsPassTest.php index ad6f79d4..26560b4c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInstanceofConditionalsPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInstanceofConditionalsPassTest.php @@ -23,10 +23,10 @@ class ResolveInstanceofConditionalsPassTest extends TestCase public function testProcess() { $container = new ContainerBuilder(); - $def = $container->register('foo', self::class)->addTag('tag')->setAutowired(true)->setChanges(array()); - $def->setInstanceofConditionals(array( - parent::class => (new ChildDefinition(''))->setProperty('foo', 'bar')->addTag('baz', array('attr' => 123)), - )); + $def = $container->register('foo', self::class)->addTag('tag')->setAutowired(true)->setChanges([]); + $def->setInstanceofConditionals([ + parent::class => (new ChildDefinition(''))->setProperty('foo', 'bar')->addTag('baz', ['attr' => 123]), + ]); (new ResolveInstanceofConditionalsPass())->process($container); @@ -36,11 +36,11 @@ class ResolveInstanceofConditionalsPassTest extends TestCase $this->assertInstanceOf(ChildDefinition::class, $def); $this->assertTrue($def->isAutowired()); $this->assertSame($parent, $def->getParent()); - $this->assertSame(array('tag' => array(array()), 'baz' => array(array('attr' => 123))), $def->getTags()); + $this->assertSame(['tag' => [[]], 'baz' => [['attr' => 123]]], $def->getTags()); $parent = $container->getDefinition($parent); - $this->assertSame(array('foo' => 'bar'), $parent->getProperties()); - $this->assertSame(array(), $parent->getTags()); + $this->assertSame(['foo' => 'bar'], $parent->getProperties()); + $this->assertSame([], $parent->getTags()); } public function testProcessInheritance() @@ -49,10 +49,10 @@ class ResolveInstanceofConditionalsPassTest extends TestCase $def = $container ->register('parent', parent::class) - ->addMethodCall('foo', array('foo')); - $def->setInstanceofConditionals(array( - parent::class => (new ChildDefinition(''))->addMethodCall('foo', array('bar')), - )); + ->addMethodCall('foo', ['foo']); + $def->setInstanceofConditionals([ + parent::class => (new ChildDefinition(''))->addMethodCall('foo', ['bar']), + ]); $def = (new ChildDefinition('parent'))->setClass(self::class); $container->setDefinition('child', $def); @@ -60,10 +60,10 @@ class ResolveInstanceofConditionalsPassTest extends TestCase (new ResolveInstanceofConditionalsPass())->process($container); (new ResolveChildDefinitionsPass())->process($container); - $expected = array( - array('foo', array('bar')), - array('foo', array('foo')), - ); + $expected = [ + ['foo', ['bar']], + ['foo', ['foo']], + ]; $this->assertSame($expected, $container->getDefinition('parent')->getMethodCalls()); $this->assertSame($expected, $container->getDefinition('child')->getMethodCalls()); @@ -74,9 +74,9 @@ class ResolveInstanceofConditionalsPassTest extends TestCase $container = new ContainerBuilder(); $def = $container->register('foo', 'stdClass'); - $def->setInstanceofConditionals(array( + $def->setInstanceofConditionals([ 'stdClass' => (new ChildDefinition(''))->setShared(false), - )); + ]); (new ResolveInstanceofConditionalsPass())->process($container); @@ -90,10 +90,10 @@ class ResolveInstanceofConditionalsPassTest extends TestCase $def = $container->register('foo', self::class)->setShared(true); - $def->setInstanceofConditionals(array( + $def->setInstanceofConditionals([ parent::class => (new ChildDefinition(''))->setLazy(true)->setShared(false), self::class => (new ChildDefinition(''))->setAutowired(true), - )); + ]); (new ResolveInstanceofConditionalsPass())->process($container); (new ResolveChildDefinitionsPass())->process($container); @@ -108,11 +108,11 @@ class ResolveInstanceofConditionalsPassTest extends TestCase { $container = new ContainerBuilder(); $def = $container->register('normal_service', self::class); - $def->setInstanceofConditionals(array( + $def->setInstanceofConditionals([ parent::class => (new ChildDefinition('')) ->addTag('local_instanceof_tag') ->setFactory('locally_set_factory'), - )); + ]); $def->setAutoconfigured(true); $container->registerForAutoconfiguration(parent::class) ->addTag('autoconfigured_tag') @@ -128,7 +128,7 @@ class ResolveInstanceofConditionalsPassTest extends TestCase // factory from the specific instanceof overrides global one $this->assertEquals('locally_set_factory', $def->getFactory()); // tags are merged, the locally set one is first - $this->assertSame(array('local_instanceof_tag' => array(array()), 'autoconfigured_tag' => array(array())), $def->getTags()); + $this->assertSame(['local_instanceof_tag' => [[]], 'autoconfigured_tag' => [[]]], $def->getTags()); } public function testAutoconfigureInstanceofDoesNotDuplicateTags() @@ -137,31 +137,31 @@ class ResolveInstanceofConditionalsPassTest extends TestCase $def = $container->register('normal_service', self::class); $def ->addTag('duplicated_tag') - ->addTag('duplicated_tag', array('and_attributes' => 1)) + ->addTag('duplicated_tag', ['and_attributes' => 1]) ; - $def->setInstanceofConditionals(array( + $def->setInstanceofConditionals([ parent::class => (new ChildDefinition(''))->addTag('duplicated_tag'), - )); + ]); $def->setAutoconfigured(true); $container->registerForAutoconfiguration(parent::class) - ->addTag('duplicated_tag', array('and_attributes' => 1)) + ->addTag('duplicated_tag', ['and_attributes' => 1]) ; (new ResolveInstanceofConditionalsPass())->process($container); (new ResolveChildDefinitionsPass())->process($container); $def = $container->getDefinition('normal_service'); - $this->assertSame(array('duplicated_tag' => array(array(), array('and_attributes' => 1))), $def->getTags()); + $this->assertSame(['duplicated_tag' => [[], ['and_attributes' => 1]]], $def->getTags()); } public function testProcessDoesNotUseAutoconfiguredInstanceofIfNotEnabled() { $container = new ContainerBuilder(); $def = $container->register('normal_service', self::class); - $def->setInstanceofConditionals(array( + $def->setInstanceofConditionals([ parent::class => (new ChildDefinition('')) ->addTag('foo_tag'), - )); + ]); $container->registerForAutoconfiguration(parent::class) ->setAutowired(true); @@ -180,10 +180,10 @@ class ResolveInstanceofConditionalsPassTest extends TestCase { $container = new ContainerBuilder(); $def = $container->register('normal_service', self::class); - $def->setInstanceofConditionals(array( + $def->setInstanceofConditionals([ 'App\\FakeInterface' => (new ChildDefinition('')) ->addTag('foo_tag'), - )); + ]); (new ResolveInstanceofConditionalsPass())->process($container); } @@ -236,9 +236,9 @@ class ResolveInstanceofConditionalsPassTest extends TestCase ->addMethodCall('setB') ->setDecoratedService('foo') ->addTag('t') - ->setInstanceofConditionals(array( + ->setInstanceofConditionals([ parent::class => (new ChildDefinition(''))->addTag('bar'), - )) + ]) ; (new ResolveInstanceofConditionalsPass())->process($container); @@ -255,13 +255,13 @@ class ResolveInstanceofConditionalsPassTest extends TestCase public function testBindings() { $container = new ContainerBuilder(); - $def = $container->register('foo', self::class)->setBindings(array('$toto' => 123)); - $def->setInstanceofConditionals(array(parent::class => new ChildDefinition(''))); + $def = $container->register('foo', self::class)->setBindings(['$toto' => 123]); + $def->setInstanceofConditionals([parent::class => new ChildDefinition('')]); (new ResolveInstanceofConditionalsPass())->process($container); $bindings = $container->getDefinition('foo')->getBindings(); - $this->assertSame(array('$toto'), array_keys($bindings)); + $this->assertSame(['$toto'], array_keys($bindings)); $this->assertInstanceOf(BoundArgument::class, $bindings['$toto']); $this->assertSame(123, $bindings['$toto']->getValues()[0]); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInvalidReferencesPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInvalidReferencesPassTest.php index 61bad48a..817cc64c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInvalidReferencesPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInvalidReferencesPassTest.php @@ -25,17 +25,17 @@ class ResolveInvalidReferencesPassTest extends TestCase $container = new ContainerBuilder(); $def = $container ->register('foo') - ->setArguments(array( + ->setArguments([ new Reference('bar', ContainerInterface::NULL_ON_INVALID_REFERENCE), new Reference('baz', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), - )) - ->addMethodCall('foo', array(new Reference('moo', ContainerInterface::IGNORE_ON_INVALID_REFERENCE))) + ]) + ->addMethodCall('foo', [new Reference('moo', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]) ; $this->process($container); $arguments = $def->getArguments(); - $this->assertSame(array(null, null), $arguments); + $this->assertSame([null, null], $arguments); $this->assertCount(0, $def->getMethodCalls()); } @@ -45,19 +45,19 @@ class ResolveInvalidReferencesPassTest extends TestCase $container->register('baz'); $def = $container ->register('foo') - ->setArguments(array( - array( + ->setArguments([ + [ new Reference('bar', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), $baz = new Reference('baz', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), new Reference('moo', ContainerInterface::NULL_ON_INVALID_REFERENCE), - ), - )) + ], + ]) ; $this->process($container); $arguments = $def->getArguments(); - $this->assertSame(array($baz, null), $arguments[0]); + $this->assertSame([$baz, null], $arguments[0]); } public function testProcessKeepMethodCallOnInvalidArgumentInCollectionArgument() @@ -66,20 +66,20 @@ class ResolveInvalidReferencesPassTest extends TestCase $container->register('baz'); $def = $container ->register('foo') - ->addMethodCall('foo', array( - array( + ->addMethodCall('foo', [ + [ new Reference('bar', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), $baz = new Reference('baz', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), new Reference('moo', ContainerInterface::NULL_ON_INVALID_REFERENCE), - ), - )) + ], + ]) ; $this->process($container); $calls = $def->getMethodCalls(); $this->assertCount(1, $def->getMethodCalls()); - $this->assertSame(array($baz, null), $calls[0][1][0]); + $this->assertSame([$baz, null], $calls[0][1][0]); } public function testProcessIgnoreNonExistentServices() @@ -87,7 +87,7 @@ class ResolveInvalidReferencesPassTest extends TestCase $container = new ContainerBuilder(); $def = $container ->register('foo') - ->setArguments(array(new Reference('bar'))) + ->setArguments([new Reference('bar')]) ; $this->process($container); @@ -106,7 +106,7 @@ class ResolveInvalidReferencesPassTest extends TestCase $this->process($container); - $this->assertEquals(array(), $def->getProperties()); + $this->assertEquals([], $def->getProperties()); } public function testProcessRemovesArgumentsOnInvalid() @@ -114,17 +114,17 @@ class ResolveInvalidReferencesPassTest extends TestCase $container = new ContainerBuilder(); $def = $container ->register('foo') - ->addArgument(array( - array( + ->addArgument([ + [ new Reference('bar', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), new ServiceClosureArgument(new Reference('baz', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)), - ), - )) + ], + ]) ; $this->process($container); - $this->assertSame(array(array(array())), $def->getArguments()); + $this->assertSame([[[]]], $def->getArguments()); } protected function process(ContainerBuilder $container) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveNamedArgumentsPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveNamedArgumentsPassTest.php index fe681b41..e25d96f5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveNamedArgumentsPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveNamedArgumentsPassTest.php @@ -16,8 +16,10 @@ use Symfony\Component\DependencyInjection\Compiler\ResolveNamedArgumentsPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass; +use Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummyWithoutReturnTypes; use Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy; use Symfony\Component\DependencyInjection\Tests\Fixtures\SimilarArgumentsDummy; +use Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition1; /** * @author Kévin Dunglas @@ -29,18 +31,18 @@ class ResolveNamedArgumentsPassTest extends TestCase $container = new ContainerBuilder(); $definition = $container->register(NamedArgumentsDummy::class, NamedArgumentsDummy::class); - $definition->setArguments(array( + $definition->setArguments([ 2 => 'http://api.example.com', '$apiKey' => '123', 0 => new Reference('foo'), - )); - $definition->addMethodCall('setApiKey', array('$apiKey' => '123')); + ]); + $definition->addMethodCall('setApiKey', ['$apiKey' => '123']); $pass = new ResolveNamedArgumentsPass(); $pass->process($container); - $this->assertEquals(array(0 => new Reference('foo'), 1 => '123', 2 => 'http://api.example.com'), $definition->getArguments()); - $this->assertEquals(array(array('setApiKey', array('123'))), $definition->getMethodCalls()); + $this->assertEquals([0 => new Reference('foo'), 1 => '123', 2 => 'http://api.example.com'], $definition->getArguments()); + $this->assertEquals([['setApiKey', ['123']]], $definition->getMethodCalls()); } public function testWithFactory() @@ -49,13 +51,13 @@ class ResolveNamedArgumentsPassTest extends TestCase $container->register('factory', NoConstructor::class); $definition = $container->register('foo', NoConstructor::class) - ->setFactory(array(new Reference('factory'), 'create')) - ->setArguments(array('$apiKey' => '123')); + ->setFactory([new Reference('factory'), 'create']) + ->setArguments(['$apiKey' => '123']); $pass = new ResolveNamedArgumentsPass(); $pass->process($container); - $this->assertSame(array(0 => '123'), $definition->getArguments()); + $this->assertSame([0 => '123'], $definition->getArguments()); } /** @@ -66,7 +68,7 @@ class ResolveNamedArgumentsPassTest extends TestCase $container = new ContainerBuilder(); $definition = $container->register(NamedArgumentsDummy::class); - $definition->setArguments(array('$apiKey' => '123')); + $definition->setArguments(['$apiKey' => '123']); $pass = new ResolveNamedArgumentsPass(); $pass->process($container); @@ -80,7 +82,7 @@ class ResolveNamedArgumentsPassTest extends TestCase $container = new ContainerBuilder(); $definition = $container->register(NotExist::class, NotExist::class); - $definition->setArguments(array('$apiKey' => '123')); + $definition->setArguments(['$apiKey' => '123']); $pass = new ResolveNamedArgumentsPass(); $pass->process($container); @@ -94,7 +96,7 @@ class ResolveNamedArgumentsPassTest extends TestCase $container = new ContainerBuilder(); $definition = $container->register(NoConstructor::class, NoConstructor::class); - $definition->setArguments(array('$apiKey' => '123')); + $definition->setArguments(['$apiKey' => '123']); $pass = new ResolveNamedArgumentsPass(); $pass->process($container); @@ -102,13 +104,32 @@ class ResolveNamedArgumentsPassTest extends TestCase /** * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + * @expectedExceptionMessage Invalid service "Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy": method "__construct()" has no argument named "$notFound". Check your service definition. */ public function testArgumentNotFound() { $container = new ContainerBuilder(); $definition = $container->register(NamedArgumentsDummy::class, NamedArgumentsDummy::class); - $definition->setArguments(array('$notFound' => '123')); + $definition->setArguments(['$notFound' => '123']); + + $pass = new ResolveNamedArgumentsPass(); + $pass->process($container); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + * @expectedExceptionMessage Invalid service "Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition1": method "Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummyWithoutReturnTypes::createTestDefinition1()" has no argument named "$notFound". Check your service definition. + */ + public function testCorrectMethodReportedInException() + { + $container = new ContainerBuilder(); + + $container->register(FactoryDummyWithoutReturnTypes::class, FactoryDummyWithoutReturnTypes::class); + + $definition = $container->register(TestDefinition1::class, TestDefinition1::class); + $definition->setFactory([FactoryDummyWithoutReturnTypes::class, 'createTestDefinition1']); + $definition->setArguments(['$notFound' => '123']); $pass = new ResolveNamedArgumentsPass(); $pass->process($container); @@ -119,12 +140,12 @@ class ResolveNamedArgumentsPassTest extends TestCase $container = new ContainerBuilder(); $definition = $container->register(NamedArgumentsDummy::class, NamedArgumentsDummy::class); - $definition->setArguments(array('$apiKey' => '123', CaseSensitiveClass::class => new Reference('foo'))); + $definition->setArguments(['$apiKey' => '123', CaseSensitiveClass::class => new Reference('foo')]); $pass = new ResolveNamedArgumentsPass(); $pass->process($container); - $this->assertEquals(array(new Reference('foo'), '123'), $definition->getArguments()); + $this->assertEquals([new Reference('foo'), '123'], $definition->getArguments()); } public function testResolvesMultipleArgumentsOfTheSameType() @@ -132,12 +153,12 @@ class ResolveNamedArgumentsPassTest extends TestCase $container = new ContainerBuilder(); $definition = $container->register(SimilarArgumentsDummy::class, SimilarArgumentsDummy::class); - $definition->setArguments(array(CaseSensitiveClass::class => new Reference('foo'), '$token' => 'qwerty')); + $definition->setArguments([CaseSensitiveClass::class => new Reference('foo'), '$token' => 'qwerty']); $pass = new ResolveNamedArgumentsPass(); $pass->process($container); - $this->assertEquals(array(new Reference('foo'), 'qwerty', new Reference('foo')), $definition->getArguments()); + $this->assertEquals([new Reference('foo'), 'qwerty', new Reference('foo')], $definition->getArguments()); } public function testResolvePrioritizeNamedOverType() @@ -145,12 +166,12 @@ class ResolveNamedArgumentsPassTest extends TestCase $container = new ContainerBuilder(); $definition = $container->register(SimilarArgumentsDummy::class, SimilarArgumentsDummy::class); - $definition->setArguments(array(CaseSensitiveClass::class => new Reference('foo'), '$token' => 'qwerty', '$class1' => new Reference('bar'))); + $definition->setArguments([CaseSensitiveClass::class => new Reference('foo'), '$token' => 'qwerty', '$class1' => new Reference('bar')]); $pass = new ResolveNamedArgumentsPass(); $pass->process($container); - $this->assertEquals(array(new Reference('bar'), 'qwerty', new Reference('foo')), $definition->getArguments()); + $this->assertEquals([new Reference('bar'), 'qwerty', new Reference('foo')], $definition->getArguments()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.php index a34e007d..5aa64717 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.php @@ -36,22 +36,22 @@ class ResolveParameterPlaceHoldersPassTest extends TestCase public function testFactoryParametersShouldBeResolved() { - $this->assertSame(array('FooFactory', 'getFoo'), $this->fooDefinition->getFactory()); + $this->assertSame(['FooFactory', 'getFoo'], $this->fooDefinition->getFactory()); } public function testArgumentParametersShouldBeResolved() { - $this->assertSame(array('bar', array('bar' => 'baz')), $this->fooDefinition->getArguments()); + $this->assertSame(['bar', ['bar' => 'baz']], $this->fooDefinition->getArguments()); } public function testMethodCallParametersShouldBeResolved() { - $this->assertSame(array(array('foobar', array('bar', array('bar' => 'baz')))), $this->fooDefinition->getMethodCalls()); + $this->assertSame([['foobar', ['bar', ['bar' => 'baz']]]], $this->fooDefinition->getMethodCalls()); } public function testPropertyParametersShouldBeResolved() { - $this->assertSame(array('bar' => 'baz'), $this->fooDefinition->getProperties()); + $this->assertSame(['bar' => 'baz'], $this->fooDefinition->getProperties()); } public function testFileParametersShouldBeResolved() @@ -78,7 +78,7 @@ class ResolveParameterPlaceHoldersPassTest extends TestCase $containerBuilder->setParameter('foo.class', 'Foo'); $containerBuilder->setParameter('foo.factory.class', 'FooFactory'); $containerBuilder->setParameter('foo.arg1', 'bar'); - $containerBuilder->setParameter('foo.arg2', array('%foo.arg1%' => 'baz')); + $containerBuilder->setParameter('foo.arg2', ['%foo.arg1%' => 'baz']); $containerBuilder->setParameter('foo.method', 'foobar'); $containerBuilder->setParameter('foo.property.name', 'bar'); $containerBuilder->setParameter('foo.property.value', 'baz'); @@ -86,12 +86,12 @@ class ResolveParameterPlaceHoldersPassTest extends TestCase $containerBuilder->setParameter('alias.id', 'bar'); $fooDefinition = $containerBuilder->register('foo', '%foo.class%'); - $fooDefinition->setFactory(array('%foo.factory.class%', 'getFoo')); - $fooDefinition->setArguments(array('%foo.arg1%', array('%foo.arg1%' => 'baz'))); - $fooDefinition->addMethodCall('%foo.method%', array('%foo.arg1%', '%foo.arg2%')); + $fooDefinition->setFactory(['%foo.factory.class%', 'getFoo']); + $fooDefinition->setArguments(['%foo.arg1%', ['%foo.arg1%' => 'baz']]); + $fooDefinition->addMethodCall('%foo.method%', ['%foo.arg1%', '%foo.arg2%']); $fooDefinition->setProperty('%foo.property.name%', '%foo.property.value%'); $fooDefinition->setFile('%foo.file%'); - $fooDefinition->setBindings(array('$baz' => '%env(BAZ)%')); + $fooDefinition->setBindings(['$baz' => '%env(BAZ)%']); $containerBuilder->setAlias('%alias.id%', 'foo'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php index 6fb61971..55b47057 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php @@ -26,7 +26,7 @@ class ResolveReferencesToAliasesPassTest extends TestCase $container->setAlias('bar', 'foo'); $def = $container ->register('moo') - ->setArguments(array(new Reference('bar'))) + ->setArguments([new Reference('bar')]) ; $this->process($container); @@ -42,7 +42,7 @@ class ResolveReferencesToAliasesPassTest extends TestCase $container->setAlias('moo', 'bar'); $def = $container ->register('foobar') - ->setArguments(array(new Reference('moo'))) + ->setArguments([new Reference('moo')]) ; $this->process($container); @@ -68,10 +68,10 @@ class ResolveReferencesToAliasesPassTest extends TestCase $container->register('factory', 'Factory'); $container->setAlias('factory_alias', new Alias('factory')); $foo = new Definition(); - $foo->setFactory(array(new Reference('factory_alias'), 'createFoo')); + $foo->setFactory([new Reference('factory_alias'), 'createFoo']); $container->setDefinition('foo', $foo); $bar = new Definition(); - $bar->setFactory(array('Factory', 'createFoo')); + $bar->setFactory(['Factory', 'createFoo']); $container->setDefinition('bar', $bar); $this->process($container); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveTaggedIteratorArgumentPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveTaggedIteratorArgumentPassTest.php index a219f860..2322817e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveTaggedIteratorArgumentPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveTaggedIteratorArgumentPassTest.php @@ -26,15 +26,15 @@ class ResolveTaggedIteratorArgumentPassTest extends TestCase { $container = new ContainerBuilder(); $container->register('a', 'stdClass')->addTag('foo'); - $container->register('b', 'stdClass')->addTag('foo', array('priority' => 20)); - $container->register('c', 'stdClass')->addTag('foo', array('priority' => 10)); + $container->register('b', 'stdClass')->addTag('foo', ['priority' => 20]); + $container->register('c', 'stdClass')->addTag('foo', ['priority' => 10]); $container->register('d', 'stdClass')->setProperty('foos', new TaggedIteratorArgument('foo')); (new ResolveTaggedIteratorArgumentPass())->process($container); $properties = $container->getDefinition('d')->getProperties(); $expected = new TaggedIteratorArgument('foo'); - $expected->setValues(array(new Reference('b'), new Reference('c'), new Reference('a'))); + $expected->setValues([new Reference('b'), new Reference('c'), new Reference('a')]); $this->assertEquals($expected, $properties['foos']); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Config/AutowireServiceResourceTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Config/AutowireServiceResourceTest.php index 64d99e63..153e0807 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Config/AutowireServiceResourceTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Config/AutowireServiceResourceTest.php @@ -38,7 +38,7 @@ class AutowireServiceResourceTest extends TestCase $this->resource = new AutowireServiceResource( $this->class, $this->file, - array() + [] ); } @@ -73,7 +73,7 @@ class AutowireServiceResourceTest extends TestCase $oldResource = new AutowireServiceResource( $this->class, $this->file, - array('will_be_different') + ['will_be_different'] ); // test with a stale file *and* a resource that *will* be different than the actual @@ -95,7 +95,7 @@ class AutowireServiceResourceTest extends TestCase $resource = new AutowireServiceResource( 'Some\Non\Existent\Class', $this->file, - array() + [] ); $this->assertFalse($resource->isFresh($this->getStaleFileTime()), '->isFresh() returns false if the class no longer exists'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php index a91934b3..fc2d85ec 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php @@ -30,7 +30,7 @@ class ContainerParametersResourceCheckerTest extends TestCase protected function setUp() { - $this->resource = new ContainerParametersResource(array('locales' => array('fr', 'en'), 'default_locale' => 'fr')); + $this->resource = new ContainerParametersResource(['locales' => ['fr', 'en'], 'default_locale' => 'fr']); $this->container = $this->getMockBuilder(ContainerInterface::class)->getMock(); $this->resourceChecker = new ContainerParametersResourceChecker($this->container); } @@ -52,26 +52,26 @@ class ContainerParametersResourceCheckerTest extends TestCase public function isFreshProvider() { - yield 'not fresh on missing parameter' => array(function (\PHPUnit_Framework_MockObject_MockObject $container) { + yield 'not fresh on missing parameter' => [function (\PHPUnit_Framework_MockObject_MockObject $container) { $container->method('hasParameter')->with('locales')->willReturn(false); - }, false); + }, false]; - yield 'not fresh on different value' => array(function (\PHPUnit_Framework_MockObject_MockObject $container) { - $container->method('getParameter')->with('locales')->willReturn(array('nl', 'es')); - }, false); + yield 'not fresh on different value' => [function (\PHPUnit_Framework_MockObject_MockObject $container) { + $container->method('getParameter')->with('locales')->willReturn(['nl', 'es']); + }, false]; - yield 'fresh on every identical parameters' => array(function (\PHPUnit_Framework_MockObject_MockObject $container) { + yield 'fresh on every identical parameters' => [function (\PHPUnit_Framework_MockObject_MockObject $container) { $container->expects($this->exactly(2))->method('hasParameter')->willReturn(true); $container->expects($this->exactly(2))->method('getParameter') ->withConsecutive( - array($this->equalTo('locales')), - array($this->equalTo('default_locale')) + [$this->equalTo('locales')], + [$this->equalTo('default_locale')] ) - ->will($this->returnValueMap(array( - array('locales', array('fr', 'en')), - array('default_locale', 'fr'), - ))) + ->will($this->returnValueMap([ + ['locales', ['fr', 'en']], + ['default_locale', 'fr'], + ])) ; - }, true); + }, true]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceTest.php index 4da4766f..e177ac16 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceTest.php @@ -21,7 +21,7 @@ class ContainerParametersResourceTest extends TestCase protected function setUp() { - $this->resource = new ContainerParametersResource(array('locales' => array('fr', 'en'), 'default_locale' => 'fr')); + $this->resource = new ContainerParametersResource(['locales' => ['fr', 'en'], 'default_locale' => 'fr']); } public function testToString() @@ -38,6 +38,6 @@ class ContainerParametersResourceTest extends TestCase public function testGetParameters() { - $this->assertSame(array('locales' => array('fr', 'en'), 'default_locale' => 'fr'), $this->resource->getParameters()); + $this->assertSame(['locales' => ['fr', 'en'], 'default_locale' => 'fr'], $this->resource->getParameters()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php index 0bf1befa..40afaa16 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -62,10 +62,10 @@ class ContainerBuilderTest extends TestCase public function testDefinitions() { $builder = new ContainerBuilder(); - $definitions = array( + $definitions = [ 'foo' => new Definition('Bar\FooClass'), 'bar' => new Definition('BarClass'), - ); + ]; $builder->setDefinitions($definitions); $this->assertEquals($definitions, $builder->getDefinitions(), '->setDefinitions() sets the service definitions'); $this->assertTrue($builder->hasDefinition('foo'), '->hasDefinition() returns true if a service definition exists'); @@ -75,7 +75,7 @@ class ContainerBuilderTest extends TestCase $this->assertEquals($foo, $builder->getDefinition('foobar'), '->getDefinition() returns a service definition if defined'); $this->assertSame($builder->setDefinition('foobar', $foo = new Definition('FooBarClass')), $foo, '->setDefinition() implements a fluid interface by returning the service reference'); - $builder->addDefinitions($defs = array('foobar' => new Definition('FooBarClass'))); + $builder->addDefinitions($defs = ['foobar' => new Definition('FooBarClass')]); $this->assertEquals(array_merge($definitions, $defs), $builder->getDefinitions(), '->addDefinitions() adds the service definitions'); try { @@ -150,7 +150,7 @@ class ContainerBuilderTest extends TestCase public function testGetThrowsCircularReferenceExceptionIfServiceHasReferenceToItself() { $builder = new ContainerBuilder(); - $builder->register('baz', 'stdClass')->setArguments(array(new Reference('baz'))); + $builder->register('baz', 'stdClass')->setArguments([new Reference('baz')]); $builder->get('baz'); } @@ -221,13 +221,13 @@ class ContainerBuilderTest extends TestCase $builder->bar = $bar = new \stdClass(); $builder->register('bar', 'stdClass'); $this->assertEquals( - array( + [ 'service_container', 'foo', 'bar', 'Psr\Container\ContainerInterface', 'Symfony\Component\DependencyInjection\ContainerInterface', - ), + ], $builder->getServiceIds(), '->getServiceIds() returns all defined service ids' ); @@ -284,7 +284,7 @@ class ContainerBuilderTest extends TestCase public function testSetAliases() { $builder = new ContainerBuilder(); - $builder->setAliases(array('bar' => 'foo', 'foobar' => 'foo')); + $builder->setAliases(['bar' => 'foo', 'foobar' => 'foo']); $aliases = $builder->getAliases(); $this->assertArrayHasKey('bar', $aliases); @@ -294,8 +294,8 @@ class ContainerBuilderTest extends TestCase public function testAddAliases() { $builder = new ContainerBuilder(); - $builder->setAliases(array('bar' => 'foo')); - $builder->addAliases(array('foobar' => 'foo')); + $builder->setAliases(['bar' => 'foo']); + $builder->addAliases(['foobar' => 'foo']); $aliases = $builder->getAliases(); $this->assertArrayHasKey('bar', $aliases); @@ -317,7 +317,7 @@ class ContainerBuilderTest extends TestCase $builder = new ContainerBuilder(); $aliased = new Definition('stdClass'); - $aliased->addMethodCall('setBar', array(new Reference('bar', ContainerInterface::IGNORE_ON_INVALID_REFERENCE))); + $aliased->addMethodCall('setBar', [new Reference('bar', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]); $builder->setDefinition('aliased', $aliased); $builder->setAlias('alias', 'aliased'); @@ -373,18 +373,18 @@ class ContainerBuilderTest extends TestCase { $builder = new ContainerBuilder(); $builder->register('bar', 'stdClass'); - $builder->register('foo1', 'Bar\FooClass')->addArgument(array('foo' => '%value%', '%value%' => 'foo', new Reference('bar'), '%%unescape_it%%')); + $builder->register('foo1', 'Bar\FooClass')->addArgument(['foo' => '%value%', '%value%' => 'foo', new Reference('bar'), '%%unescape_it%%']); $builder->setParameter('value', 'bar'); - $this->assertEquals(array('foo' => 'bar', 'bar' => 'foo', $builder->get('bar'), '%unescape_it%'), $builder->get('foo1')->arguments, '->createService() replaces parameters and service references in the arguments provided by the service definition'); + $this->assertEquals(['foo' => 'bar', 'bar' => 'foo', $builder->get('bar'), '%unescape_it%'], $builder->get('foo1')->arguments, '->createService() replaces parameters and service references in the arguments provided by the service definition'); } public function testCreateServiceFactory() { $builder = new ContainerBuilder(); $builder->register('foo', 'Bar\FooClass')->setFactory('Bar\FooClass::getInstance'); - $builder->register('qux', 'Bar\FooClass')->setFactory(array('Bar\FooClass', 'getInstance')); - $builder->register('bar', 'Bar\FooClass')->setFactory(array(new Definition('Bar\FooClass'), 'getInstance')); - $builder->register('baz', 'Bar\FooClass')->setFactory(array(new Reference('bar'), 'getInstance')); + $builder->register('qux', 'Bar\FooClass')->setFactory(['Bar\FooClass', 'getInstance']); + $builder->register('bar', 'Bar\FooClass')->setFactory([new Definition('Bar\FooClass'), 'getInstance']); + $builder->register('baz', 'Bar\FooClass')->setFactory([new Reference('bar'), 'getInstance']); $this->assertTrue($builder->get('foo')->called, '->createService() calls the factory method to create the service instance'); $this->assertTrue($builder->get('qux')->called, '->createService() calls the factory method to create the service instance'); @@ -396,38 +396,38 @@ class ContainerBuilderTest extends TestCase { $builder = new ContainerBuilder(); $builder->register('bar', 'stdClass'); - $builder->register('foo1', 'Bar\FooClass')->addMethodCall('setBar', array(array('%value%', new Reference('bar')))); + $builder->register('foo1', 'Bar\FooClass')->addMethodCall('setBar', [['%value%', new Reference('bar')]]); $builder->setParameter('value', 'bar'); - $this->assertEquals(array('bar', $builder->get('bar')), $builder->get('foo1')->bar, '->createService() replaces the values in the method calls arguments'); + $this->assertEquals(['bar', $builder->get('bar')], $builder->get('foo1')->bar, '->createService() replaces the values in the method calls arguments'); } public function testCreateServiceMethodCallsWithEscapedParam() { $builder = new ContainerBuilder(); $builder->register('bar', 'stdClass'); - $builder->register('foo1', 'Bar\FooClass')->addMethodCall('setBar', array(array('%%unescape_it%%'))); + $builder->register('foo1', 'Bar\FooClass')->addMethodCall('setBar', [['%%unescape_it%%']]); $builder->setParameter('value', 'bar'); - $this->assertEquals(array('%unescape_it%'), $builder->get('foo1')->bar, '->createService() replaces the values in the method calls arguments'); + $this->assertEquals(['%unescape_it%'], $builder->get('foo1')->bar, '->createService() replaces the values in the method calls arguments'); } public function testCreateServiceProperties() { $builder = new ContainerBuilder(); $builder->register('bar', 'stdClass'); - $builder->register('foo1', 'Bar\FooClass')->setProperty('bar', array('%value%', new Reference('bar'), '%%unescape_it%%')); + $builder->register('foo1', 'Bar\FooClass')->setProperty('bar', ['%value%', new Reference('bar'), '%%unescape_it%%']); $builder->setParameter('value', 'bar'); - $this->assertEquals(array('bar', $builder->get('bar'), '%unescape_it%'), $builder->get('foo1')->bar, '->createService() replaces the values in the properties'); + $this->assertEquals(['bar', $builder->get('bar'), '%unescape_it%'], $builder->get('foo1')->bar, '->createService() replaces the values in the properties'); } public function testCreateServiceConfigurator() { $builder = new ContainerBuilder(); $builder->register('foo1', 'Bar\FooClass')->setConfigurator('sc_configure'); - $builder->register('foo2', 'Bar\FooClass')->setConfigurator(array('%class%', 'configureStatic')); + $builder->register('foo2', 'Bar\FooClass')->setConfigurator(['%class%', 'configureStatic']); $builder->setParameter('class', 'BazClass'); $builder->register('baz', 'BazClass'); - $builder->register('foo3', 'Bar\FooClass')->setConfigurator(array(new Reference('baz'), 'configure')); - $builder->register('foo4', 'Bar\FooClass')->setConfigurator(array($builder->getDefinition('baz'), 'configure')); + $builder->register('foo3', 'Bar\FooClass')->setConfigurator([new Reference('baz'), 'configure']); + $builder->register('foo4', 'Bar\FooClass')->setConfigurator([$builder->getDefinition('baz'), 'configure']); $builder->register('foo5', 'Bar\FooClass')->setConfigurator('foo'); $this->assertTrue($builder->get('foo1')->configured, '->createService() calls the configurator'); @@ -449,10 +449,10 @@ class ContainerBuilderTest extends TestCase $builder->register('bar', 'stdClass'); $builder ->register('lazy_context', 'LazyContext') - ->setArguments(array( - new IteratorArgument(array('k1' => new Reference('bar'), new Reference('invalid', ContainerInterface::IGNORE_ON_INVALID_REFERENCE))), - new IteratorArgument(array()), - )) + ->setArguments([ + new IteratorArgument(['k1' => new Reference('bar'), new Reference('invalid', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]), + new IteratorArgument([]), + ]) ; $lazyContext = $builder->get('lazy_context'); @@ -494,7 +494,7 @@ class ContainerBuilderTest extends TestCase $builder = new ContainerBuilder(); $builder->setParameter('bar', 'bar'); $builder->register('bar', 'BarClass'); - $builder->register('foo', 'Bar\FooClass')->addArgument(array('foo' => new Expression('service("bar").foo ~ parameter("bar")'))); + $builder->register('foo', 'Bar\FooClass')->addArgument(['foo' => new Expression('service("bar").foo ~ parameter("bar")')]); $this->assertEquals('foobar', $builder->get('foo')->arguments['foo']); } @@ -503,7 +503,7 @@ class ContainerBuilderTest extends TestCase $builder = new ContainerBuilder(); $builder->register('foo', 'Bar\FooClass'); $this->assertEquals($builder->get('foo'), $builder->resolveServices(new Reference('foo')), '->resolveServices() resolves service references to service instances'); - $this->assertEquals(array('foo' => array('foo', $builder->get('foo'))), $builder->resolveServices(array('foo' => array('foo', new Reference('foo')))), '->resolveServices() resolves service references to service instances in nested arrays'); + $this->assertEquals(['foo' => ['foo', $builder->get('foo')]], $builder->resolveServices(['foo' => ['foo', new Reference('foo')]]), '->resolveServices() resolves service references to service instances in nested arrays'); $this->assertEquals($builder->get('foo'), $builder->resolveServices(new Expression('service("foo")')), '->resolveServices() resolves expressions'); } @@ -531,25 +531,25 @@ class ContainerBuilderTest extends TestCase public function testMerge() { - $container = new ContainerBuilder(new ParameterBag(array('bar' => 'foo'))); + $container = new ContainerBuilder(new ParameterBag(['bar' => 'foo'])); $container->setResourceTracking(false); - $config = new ContainerBuilder(new ParameterBag(array('foo' => 'bar'))); + $config = new ContainerBuilder(new ParameterBag(['foo' => 'bar'])); $container->merge($config); - $this->assertEquals(array('bar' => 'foo', 'foo' => 'bar'), $container->getParameterBag()->all(), '->merge() merges current parameters with the loaded ones'); + $this->assertEquals(['bar' => 'foo', 'foo' => 'bar'], $container->getParameterBag()->all(), '->merge() merges current parameters with the loaded ones'); - $container = new ContainerBuilder(new ParameterBag(array('bar' => 'foo'))); + $container = new ContainerBuilder(new ParameterBag(['bar' => 'foo'])); $container->setResourceTracking(false); - $config = new ContainerBuilder(new ParameterBag(array('foo' => '%bar%'))); + $config = new ContainerBuilder(new ParameterBag(['foo' => '%bar%'])); $container->merge($config); $container->compile(); - $this->assertEquals(array('bar' => 'foo', 'foo' => 'foo'), $container->getParameterBag()->all(), '->merge() evaluates the values of the parameters towards already defined ones'); + $this->assertEquals(['bar' => 'foo', 'foo' => 'foo'], $container->getParameterBag()->all(), '->merge() evaluates the values of the parameters towards already defined ones'); - $container = new ContainerBuilder(new ParameterBag(array('bar' => 'foo'))); + $container = new ContainerBuilder(new ParameterBag(['bar' => 'foo'])); $container->setResourceTracking(false); - $config = new ContainerBuilder(new ParameterBag(array('foo' => '%bar%', 'baz' => '%foo%'))); + $config = new ContainerBuilder(new ParameterBag(['foo' => '%bar%', 'baz' => '%foo%'])); $container->merge($config); $container->compile(); - $this->assertEquals(array('bar' => 'foo', 'foo' => 'foo', 'baz' => 'foo'), $container->getParameterBag()->all(), '->merge() evaluates the values of the parameters towards already defined ones'); + $this->assertEquals(['bar' => 'foo', 'foo' => 'foo', 'baz' => 'foo'], $container->getParameterBag()->all(), '->merge() evaluates the values of the parameters towards already defined ones'); $container = new ContainerBuilder(); $container->setResourceTracking(false); @@ -559,7 +559,7 @@ class ContainerBuilderTest extends TestCase $config->setDefinition('baz', new Definition('BazClass')); $config->setAlias('alias_for_foo', 'foo'); $container->merge($config); - $this->assertEquals(array('service_container', 'foo', 'bar', 'baz'), array_keys($container->getDefinitions()), '->merge() merges definitions already defined ones'); + $this->assertEquals(['service_container', 'foo', 'bar', 'baz'], array_keys($container->getDefinitions()), '->merge() merges definitions already defined ones'); $aliases = $container->getAliases(); $this->assertArrayHasKey('alias_for_foo', $aliases); @@ -576,16 +576,16 @@ class ContainerBuilderTest extends TestCase $bag = new EnvPlaceholderParameterBag(); $bag->get('env(Foo)'); $config = new ContainerBuilder($bag); - $this->assertSame(array('%env(Bar)%'), $config->resolveEnvPlaceholders(array($bag->get('env(Bar)')))); + $this->assertSame(['%env(Bar)%'], $config->resolveEnvPlaceholders([$bag->get('env(Bar)')])); $container->merge($config); - $this->assertEquals(array('Foo' => 0, 'Bar' => 1), $container->getEnvCounters()); + $this->assertEquals(['Foo' => 0, 'Bar' => 1], $container->getEnvCounters()); $container = new ContainerBuilder(); $config = new ContainerBuilder(); $childDefA = $container->registerForAutoconfiguration('AInterface'); $childDefB = $config->registerForAutoconfiguration('BInterface'); $container->merge($config); - $this->assertSame(array('AInterface' => $childDefA, 'BInterface' => $childDefB), $container->getAutoconfiguredInstanceof()); + $this->assertSame(['AInterface' => $childDefA, 'BInterface' => $childDefB], $container->getAutoconfiguredInstanceof()); } /** @@ -620,7 +620,7 @@ class ContainerBuilderTest extends TestCase { $_ENV['ANOTHER_DUMMY_ENV_VAR'] = 'dummy'; - $dummyArray = array('1' => 'one', '2' => 'two'); + $dummyArray = ['1' => 'one', '2' => 'two']; $container = new ContainerBuilder(); $container->setParameter('dummy', '%env(ANOTHER_DUMMY_ENV_VAR)%'); @@ -673,7 +673,7 @@ class ContainerBuilderTest extends TestCase $container->setParameter('foo', '%env(json:ARRAY)%'); $container->compile(true); - $this->assertSame(array('foo' => 'bar'), $container->getParameter('foo')); + $this->assertSame(['foo' => 'bar'], $container->getParameter('foo')); putenv('ARRAY'); } @@ -688,7 +688,7 @@ class ContainerBuilderTest extends TestCase $container->setParameter('bar', '%env(DUMMY_ENV_VAR)%'); $container->compile(true); - $this->assertSame(array('foo' => 'bar'), $container->getParameter('foo')); + $this->assertSame(['foo' => 'bar'], $container->getParameter('foo')); $this->assertSame('abc', $container->getParameter('bar')); putenv('DUMMY_ENV_VAR'); @@ -745,9 +745,9 @@ class ContainerBuilderTest extends TestCase $container->register('foo', 'stdClass') ->setPublic(true) - ->setProperties(array( + ->setProperties([ 'fake' => '%env(int:FAKE)%', - )); + ]); $container->compile(true); @@ -761,9 +761,9 @@ class ContainerBuilderTest extends TestCase $container->register('foo', 'stdClass') ->setPublic(true) - ->setProperties(array( + ->setProperties([ 'fake' => '%env(int:FAKE)%', - )); + ]); $container->compile(true); @@ -775,23 +775,23 @@ class ContainerBuilderTest extends TestCase $container = include __DIR__.'/Fixtures/containers/container_env_in_id.php'; $container->compile(true); - $expected = array( + $expected = [ 'service_container', 'foo', 'bar', 'bar_%env(BAR)%', - ); + ]; $this->assertSame($expected, array_keys($container->getDefinitions())); - $expected = array( + $expected = [ PsrContainerInterface::class => true, ContainerInterface::class => true, 'baz_%env(BAR)%' => true, 'bar_%env(BAR)%' => true, - ); + ]; $this->assertSame($expected, $container->getRemovedIds()); - $this->assertSame(array('baz_bar'), array_keys($container->getDefinition('foo')->getArgument(1))); + $this->assertSame(['baz_bar'], array_keys($container->getDefinition('foo')->getArgument(1))); } /** @@ -829,17 +829,17 @@ class ContainerBuilderTest extends TestCase $builder = new ContainerBuilder(); $builder ->register('foo', 'Bar\FooClass') - ->addTag('foo', array('foo' => 'foo')) - ->addTag('bar', array('bar' => 'bar')) - ->addTag('foo', array('foofoo' => 'foofoo')) + ->addTag('foo', ['foo' => 'foo']) + ->addTag('bar', ['bar' => 'bar']) + ->addTag('foo', ['foofoo' => 'foofoo']) ; - $this->assertEquals($builder->findTaggedServiceIds('foo'), array( - 'foo' => array( - array('foo' => 'foo'), - array('foofoo' => 'foofoo'), - ), - ), '->findTaggedServiceIds() returns an array of service ids and its tag attributes'); - $this->assertEquals(array(), $builder->findTaggedServiceIds('foobar'), '->findTaggedServiceIds() returns an empty array if there is annotated services'); + $this->assertEquals($builder->findTaggedServiceIds('foo'), [ + 'foo' => [ + ['foo' => 'foo'], + ['foofoo' => 'foofoo'], + ], + ], '->findTaggedServiceIds() returns an array of service ids and its tag attributes'); + $this->assertEquals([], $builder->findTaggedServiceIds('foobar'), '->findTaggedServiceIds() returns an empty array if there is annotated services'); } public function testFindUnusedTags() @@ -847,11 +847,11 @@ class ContainerBuilderTest extends TestCase $builder = new ContainerBuilder(); $builder ->register('foo', 'Bar\FooClass') - ->addTag('kernel.event_listener', array('foo' => 'foo')) - ->addTag('kenrel.event_listener', array('bar' => 'bar')) + ->addTag('kernel.event_listener', ['foo' => 'foo']) + ->addTag('kenrel.event_listener', ['bar' => 'bar']) ; $builder->findTaggedServiceIds('kernel.event_listener'); - $this->assertEquals(array('kenrel.event_listener'), $builder->findUnusedTags(), '->findUnusedTags() returns an array with unused tags'); + $this->assertEquals(['kenrel.event_listener'], $builder->findUnusedTags(), '->findUnusedTags() returns an array with unused tags'); } public function testFindDefinition() @@ -981,15 +981,15 @@ class ContainerBuilderTest extends TestCase $container = new ContainerBuilder(); $container->addResource($a = new FileResource(__DIR__.'/Fixtures/xml/services1.xml')); $container->addResource($b = new FileResource(__DIR__.'/Fixtures/xml/services2.xml')); - $resources = array(); + $resources = []; foreach ($container->getResources() as $resource) { if (false === strpos($resource, '.php')) { $resources[] = $resource; } } - $this->assertEquals(array($a, $b), $resources, '->getResources() returns an array of resources read for the current configuration'); - $this->assertSame($container, $container->setResources(array())); - $this->assertEquals(array(), $container->getResources()); + $this->assertEquals([$a, $b], $resources, '->getResources() returns an array of resources read for the current configuration'); + $this->assertSame($container, $container->setResources([])); + $this->assertEquals([], $container->getResources()); } public function testFileExists() @@ -1002,14 +1002,14 @@ class ContainerBuilderTest extends TestCase $this->assertTrue($container->fileExists((string) $a) && $container->fileExists((string) $b) && $container->fileExists($dir)); - $resources = array(); + $resources = []; foreach ($container->getResources() as $resource) { if (false === strpos($resource, '.php')) { $resources[] = $resource; } } - $this->assertEquals(array($A, $a, $b, $c), $resources, '->getResources() returns an array of resources read for the current configuration'); + $this->assertEquals([$A, $a, $b, $c], $resources, '->getResources() returns an array of resources read for the current configuration'); } public function testExtension() @@ -1040,28 +1040,28 @@ class ContainerBuilderTest extends TestCase { $extension = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface')->getMock(); $extension->expects($this->exactly(2))->method('getAlias')->will($this->returnValue('project')); - $extension->expects($this->once())->method('load')->with(array(array('foo' => 'bar'))); + $extension->expects($this->once())->method('load')->with([['foo' => 'bar']]); $container = new ContainerBuilder(); $container->setResourceTracking(false); $container->registerExtension($extension); - $container->loadFromExtension('project', array('foo' => 'bar')); + $container->loadFromExtension('project', ['foo' => 'bar']); $container->compile(); } public function testPrivateServiceUser() { $fooDefinition = new Definition('BarClass'); - $fooUserDefinition = new Definition('BarUserClass', array(new Reference('bar'))); + $fooUserDefinition = new Definition('BarUserClass', [new Reference('bar')]); $container = new ContainerBuilder(); $container->setResourceTracking(false); $fooDefinition->setPublic(false); - $container->addDefinitions(array( + $container->addDefinitions([ 'bar' => $fooDefinition, 'bar_user' => $fooUserDefinition->setPublic(true), - )); + ]); $container->compile(); $this->assertInstanceOf('BarClass', $container->get('bar_user')->bar); @@ -1116,15 +1116,15 @@ class ContainerBuilderTest extends TestCase $configs = $container->getExtensionConfig('foo'); $this->assertEmpty($configs); - $first = array('foo' => 'bar'); + $first = ['foo' => 'bar']; $container->prependExtensionConfig('foo', $first); $configs = $container->getExtensionConfig('foo'); - $this->assertEquals(array($first), $configs); + $this->assertEquals([$first], $configs); - $second = array('ding' => 'dong'); + $second = ['ding' => 'dong']; $container->prependExtensionConfig('foo', $second); $configs = $container->getExtensionConfig('foo'); - $this->assertEquals(array($second, $first), $configs); + $this->assertEquals([$second, $first], $configs); } public function testAbstractAlias() @@ -1184,7 +1184,7 @@ class ContainerBuilderTest extends TestCase $container->register('bar', 'BarClass') ->setProperty('foo', $definition) - ->addMethodCall('setBaz', array($definition)); + ->addMethodCall('setBaz', [$definition]); $barUser = $container->get('bar_user'); $bar = $container->get('bar'); @@ -1202,11 +1202,11 @@ class ContainerBuilderTest extends TestCase { $builder = new ContainerBuilder(); - $builder->setAliases(array( + $builder->setAliases([ 'foo' => new Alias('app.test_class'), 'app.test_class' => new Alias('App\\TestClass'), 'App\\TestClass' => new Alias('app.test_class'), - )); + ]); $builder->findDefinition('foo'); } @@ -1317,12 +1317,12 @@ class ContainerBuilderTest extends TestCase $container = new ContainerBuilder(); $container->register('foo_service', ServiceLocator::class) ->setPublic(true) - ->addArgument(array( + ->addArgument([ 'bar' => new ServiceClosureArgument(new Reference('bar_service')), 'baz' => new ServiceClosureArgument(new TypedReference('baz_service', 'stdClass')), - )) + ]) ; - $container->register('bar_service', 'stdClass')->setArguments(array(new Reference('baz_service')))->setPublic(true); + $container->register('bar_service', 'stdClass')->setArguments([new Reference('baz_service')])->setPublic(true); $container->register('baz_service', 'stdClass')->setPublic(false); $container->compile(); @@ -1343,7 +1343,7 @@ class ContainerBuilderTest extends TestCase $this->assertNull($bar->closures[0]()); $this->assertNull($bar->closures[1]()); $this->assertNull($bar->closures[2]()); - $this->assertSame(array(), iterator_to_array($bar->iter)); + $this->assertSame([], iterator_to_array($bar->iter)); $container = include __DIR__.'/Fixtures/containers/container_uninitialized_ref.php'; $container->compile(); @@ -1359,7 +1359,7 @@ class ContainerBuilderTest extends TestCase $this->assertEquals(new \stdClass(), $bar->closures[0]()); $this->assertNull($bar->closures[1]()); $this->assertEquals(new \stdClass(), $bar->closures[2]()); - $this->assertEquals(array('foo1' => new \stdClass(), 'foo3' => new \stdClass()), iterator_to_array($bar->iter)); + $this->assertEquals(['foo1' => new \stdClass(), 'foo3' => new \stdClass()], iterator_to_array($bar->iter)); } /** @@ -1375,7 +1375,7 @@ class ContainerBuilderTest extends TestCase $foo2 = $container->get('foo2'); $this->assertSame($foo2, $foo2->bar->foobar->foo); - $this->assertSame(array(), (array) $container->get('foobar4')); + $this->assertSame([], (array) $container->get('foobar4')); $foo5 = $container->get('foo5'); $this->assertSame($foo5, $foo5->bar->foo); @@ -1387,15 +1387,15 @@ class ContainerBuilderTest extends TestCase $this->assertEquals(new \stdClass(), $manager); $foo6 = $container->get('foo6'); - $this->assertEquals((object) array('bar6' => (object) array()), $foo6); + $this->assertEquals((object) ['bar6' => (object) []], $foo6); $this->assertInstanceOf(\stdClass::class, $container->get('root')); } public function provideAlmostCircular() { - yield array('public'); - yield array('private'); + yield ['public']; + yield ['private']; } public function testRegisterForAutoconfiguration() @@ -1403,7 +1403,7 @@ class ContainerBuilderTest extends TestCase $container = new ContainerBuilder(); $childDefA = $container->registerForAutoconfiguration('AInterface'); $childDefB = $container->registerForAutoconfiguration('BInterface'); - $this->assertSame(array('AInterface' => $childDefA, 'BInterface' => $childDefB), $container->getAutoconfiguredInstanceof()); + $this->assertSame(['AInterface' => $childDefA, 'BInterface' => $childDefB], $container->getAutoconfiguredInstanceof()); // when called multiple times, the same instance is returned $this->assertSame($childDefA, $container->registerForAutoconfiguration('AInterface')); @@ -1436,7 +1436,7 @@ class ContainerBuilderTest extends TestCase */ public function testParameterWithMixedCase() { - $container = new ContainerBuilder(new ParameterBag(array('foo' => 'bar'))); + $container = new ContainerBuilder(new ParameterBag(['foo' => 'bar'])); $container->register('foo', 'stdClass') ->setPublic(true) ->setProperty('foo', '%FOO%'); @@ -1449,20 +1449,20 @@ class ContainerBuilderTest extends TestCase public function testArgumentsHaveHigherPriorityThanBindings() { $container = new ContainerBuilder(); - $container->register('class.via.bindings', CaseSensitiveClass::class)->setArguments(array( + $container->register('class.via.bindings', CaseSensitiveClass::class)->setArguments([ 'via-bindings', - )); - $container->register('class.via.argument', CaseSensitiveClass::class)->setArguments(array( + ]); + $container->register('class.via.argument', CaseSensitiveClass::class)->setArguments([ 'via-argument', - )); - $container->register('foo', SimilarArgumentsDummy::class)->setPublic(true)->setBindings(array( + ]); + $container->register('foo', SimilarArgumentsDummy::class)->setPublic(true)->setBindings([ CaseSensitiveClass::class => new Reference('class.via.bindings'), '$token' => '1234', - ))->setArguments(array( + ])->setArguments([ '$class1' => new Reference('class.via.argument'), - )); + ]); - $this->assertSame(array('service_container', 'class.via.bindings', 'class.via.argument', 'foo', 'Psr\Container\ContainerInterface', 'Symfony\Component\DependencyInjection\ContainerInterface'), $container->getServiceIds()); + $this->assertSame(['service_container', 'class.via.bindings', 'class.via.argument', 'foo', 'Psr\Container\ContainerInterface', 'Symfony\Component\DependencyInjection\ContainerInterface'], $container->getServiceIds()); $container->compile(); @@ -1479,10 +1479,10 @@ class ContainerBuilderTest extends TestCase $container->compile(); - $this->assertEquals((object) array('foo' => null), $container->get('bar')); + $this->assertEquals((object) ['foo' => null], $container->get('bar')); - $container->set('foo', (object) array(123)); - $this->assertEquals((object) array('foo' => (object) array(123)), $container->get('bar')); + $container->set('foo', (object) [123]); + $this->assertEquals((object) ['foo' => (object) [123]], $container->get('bar')); } public function testDecoratedSelfReferenceInvolvingPrivateServices() @@ -1498,7 +1498,7 @@ class ContainerBuilderTest extends TestCase $container->compile(); - $this->assertSame(array('service_container'), array_keys($container->getDefinitions())); + $this->assertSame(['service_container'], array_keys($container->getDefinitions())); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php index a57f7879..d2616a34 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php @@ -25,8 +25,8 @@ class ContainerTest extends TestCase $sc = new Container(); $this->assertSame($sc, $sc->get('service_container'), '__construct() automatically registers itself as a service'); - $sc = new Container(new ParameterBag(array('foo' => 'bar'))); - $this->assertEquals(array('foo' => 'bar'), $sc->getParameterBag()->all(), '__construct() takes an array of parameters as its first argument'); + $sc = new Container(new ParameterBag(['foo' => 'bar'])); + $this->assertEquals(['foo' => 'bar'], $sc->getParameterBag()->all(), '__construct() takes an array of parameters as its first argument'); } /** @@ -39,18 +39,18 @@ class ContainerTest extends TestCase public function dataForTestCamelize() { - return array( - array('foo_bar', 'FooBar'), - array('foo.bar', 'Foo_Bar'), - array('foo.bar_baz', 'Foo_BarBaz'), - array('foo._bar', 'Foo_Bar'), - array('foo_.bar', 'Foo_Bar'), - array('_foo', 'Foo'), - array('.foo', '_Foo'), - array('foo_', 'Foo'), - array('foo.', 'Foo_'), - array('foo\bar', 'Foo_Bar'), - ); + return [ + ['foo_bar', 'FooBar'], + ['foo.bar', 'Foo_Bar'], + ['foo.bar_baz', 'Foo_BarBaz'], + ['foo._bar', 'Foo_Bar'], + ['foo_.bar', 'Foo_Bar'], + ['_foo', 'Foo'], + ['.foo', '_Foo'], + ['foo_', 'Foo'], + ['foo.', 'Foo_'], + ['foo\bar', 'Foo_Bar'], + ]; } /** @@ -63,24 +63,24 @@ class ContainerTest extends TestCase public function dataForTestUnderscore() { - return array( - array('FooBar', 'foo_bar'), - array('Foo_Bar', 'foo.bar'), - array('Foo_BarBaz', 'foo.bar_baz'), - array('FooBar_BazQux', 'foo_bar.baz_qux'), - array('_Foo', '.foo'), - array('Foo_', 'foo.'), - ); + return [ + ['FooBar', 'foo_bar'], + ['Foo_Bar', 'foo.bar'], + ['Foo_BarBaz', 'foo.bar_baz'], + ['FooBar_BazQux', 'foo_bar.baz_qux'], + ['_Foo', '.foo'], + ['Foo_', 'foo.'], + ]; } public function testCompile() { - $sc = new Container(new ParameterBag(array('foo' => 'bar'))); + $sc = new Container(new ParameterBag(['foo' => 'bar'])); $this->assertFalse($sc->getParameterBag()->isResolved(), '->compile() resolves the parameter bag'); $sc->compile(); $this->assertTrue($sc->getParameterBag()->isResolved(), '->compile() resolves the parameter bag'); $this->assertInstanceOf('Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag', $sc->getParameterBag(), '->compile() changes the parameter bag to a FrozenParameterBag instance'); - $this->assertEquals(array('foo' => 'bar'), $sc->getParameterBag()->all(), '->compile() copies the current parameters to the new parameter bag'); + $this->assertEquals(['foo' => 'bar'], $sc->getParameterBag()->all(), '->compile() copies the current parameters to the new parameter bag'); } /** @@ -90,7 +90,7 @@ class ContainerTest extends TestCase */ public function testIsFrozen() { - $sc = new Container(new ParameterBag(array('foo' => 'bar'))); + $sc = new Container(new ParameterBag(['foo' => 'bar'])); $this->assertFalse($sc->isFrozen(), '->isFrozen() returns false if the parameters are not frozen'); $sc->compile(); $this->assertTrue($sc->isFrozen(), '->isFrozen() returns true if the parameters are frozen'); @@ -98,7 +98,7 @@ class ContainerTest extends TestCase public function testIsCompiled() { - $sc = new Container(new ParameterBag(array('foo' => 'bar'))); + $sc = new Container(new ParameterBag(['foo' => 'bar'])); $this->assertFalse($sc->isCompiled(), '->isCompiled() returns false if the container is not compiled'); $sc->compile(); $this->assertTrue($sc->isCompiled(), '->isCompiled() returns true if the container is compiled'); @@ -106,19 +106,19 @@ class ContainerTest extends TestCase public function testIsCompiledWithFrozenParameters() { - $sc = new Container(new FrozenParameterBag(array('foo' => 'bar'))); + $sc = new Container(new FrozenParameterBag(['foo' => 'bar'])); $this->assertFalse($sc->isCompiled(), '->isCompiled() returns false if the container is not compiled but the parameter bag is already frozen'); } public function testGetParameterBag() { $sc = new Container(); - $this->assertEquals(array(), $sc->getParameterBag()->all(), '->getParameterBag() returns an empty array if no parameter has been defined'); + $this->assertEquals([], $sc->getParameterBag()->all(), '->getParameterBag() returns an empty array if no parameter has been defined'); } public function testGetSetParameter() { - $sc = new Container(new ParameterBag(array('foo' => 'bar'))); + $sc = new Container(new ParameterBag(['foo' => 'bar'])); $sc->setParameter('bar', 'foo'); $this->assertEquals('foo', $sc->getParameter('bar'), '->setParameter() sets the value of a new parameter'); @@ -141,7 +141,7 @@ class ContainerTest extends TestCase */ public function testGetSetParameterWithMixedCase() { - $sc = new Container(new ParameterBag(array('foo' => 'bar'))); + $sc = new Container(new ParameterBag(['foo' => 'bar'])); $sc->setParameter('Foo', 'baz1'); $this->assertEquals('baz1', $sc->getParameter('foo'), '->setParameter() converts the key to lowercase'); @@ -153,11 +153,11 @@ class ContainerTest extends TestCase $sc = new Container(); $sc->set('foo', $obj = new \stdClass()); $sc->set('bar', $obj = new \stdClass()); - $this->assertEquals(array('service_container', 'foo', 'bar'), $sc->getServiceIds(), '->getServiceIds() returns all defined service ids'); + $this->assertEquals(['service_container', 'foo', 'bar'], $sc->getServiceIds(), '->getServiceIds() returns all defined service ids'); $sc = new ProjectServiceContainer(); $sc->set('foo', $obj = new \stdClass()); - $this->assertEquals(array('service_container', 'internal', 'bar', 'foo_bar', 'foo.baz', 'circular', 'throw_exception', 'throws_exception_on_service_configuration', 'internal_dependency', 'foo'), $sc->getServiceIds(), '->getServiceIds() returns defined service ids by factory methods in the method map, followed by service ids defined by set()'); + $this->assertEquals(['service_container', 'internal', 'bar', 'foo_bar', 'foo.baz', 'circular', 'throw_exception', 'throws_exception_on_service_configuration', 'internal_dependency', 'foo'], $sc->getServiceIds(), '->getServiceIds() returns defined service ids by factory methods in the method map, followed by service ids defined by set()'); } /** @@ -169,7 +169,7 @@ class ContainerTest extends TestCase $sc = new LegacyProjectServiceContainer(); $sc->set('foo', $obj = new \stdClass()); - $this->assertEquals(array('internal', 'bar', 'foo_bar', 'foo.baz', 'circular', 'throw_exception', 'throws_exception_on_service_configuration', 'service_container', 'foo'), $sc->getServiceIds(), '->getServiceIds() returns defined service ids by getXXXService() methods, followed by service ids defined by set()'); + $this->assertEquals(['internal', 'bar', 'foo_bar', 'foo.baz', 'circular', 'throw_exception', 'throws_exception_on_service_configuration', 'service_container', 'foo'], $sc->getServiceIds(), '->getServiceIds() returns defined service ids by getXXXService() methods, followed by service ids defined by set()'); } public function testSet() @@ -557,7 +557,7 @@ class ProjectServiceContainer extends Container public $__foo_baz; public $__internal; protected $privates; - protected $methodMap = array( + protected $methodMap = [ 'internal' => 'getInternalService', 'bar' => 'getBarService', 'foo_bar' => 'getFooBarService', @@ -566,7 +566,7 @@ class ProjectServiceContainer extends Container 'throw_exception' => 'getThrowExceptionService', 'throws_exception_on_service_configuration' => 'getThrowsExceptionOnServiceConfigurationService', 'internal_dependency' => 'getInternalDependencyService', - ); + ]; public function __construct() { @@ -576,11 +576,11 @@ class ProjectServiceContainer extends Container $this->__foo_bar = new \stdClass(); $this->__foo_baz = new \stdClass(); $this->__internal = new \stdClass(); - $this->privates = array( + $this->privates = [ 'internal' => true, 'synthetic' => true, - ); - $this->aliases = array('alias' => 'bar'); + ]; + $this->aliases = ['alias' => 'bar']; $this->syntheticIds['synthetic'] = true; } @@ -646,8 +646,8 @@ class LegacyProjectServiceContainer extends Container $this->__foo_bar = new \stdClass(); $this->__foo_baz = new \stdClass(); $this->__internal = new \stdClass(); - $this->privates = array('internal' => true); - $this->aliases = array('alias' => 'bar'); + $this->privates = ['internal' => true]; + $this->aliases = ['alias' => 'bar']; } protected function getInternalService() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php index 6ec9d33f..fe132af4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php @@ -58,16 +58,16 @@ class CrossCheckTest extends TestCase $r = new \ReflectionProperty(ContainerBuilder::class, 'normalizedIds'); $r->setAccessible(true); - $r->setValue($container2, array()); - $r->setValue($container1, array()); + $r->setValue($container2, []); + $r->setValue($container1, []); $this->assertEquals(serialize($container2), serialize($container1), 'loading a dump from a previously loaded container returns the same container'); - $services1 = array(); + $services1 = []; foreach ($container1 as $id => $service) { $services1[$id] = serialize($service); } - $services2 = array(); + $services2 = []; foreach ($container2 as $id => $service) { $services2[$id] = serialize($service); } @@ -79,17 +79,17 @@ class CrossCheckTest extends TestCase public function crossCheckLoadersDumpers() { - return array( - array('services1.xml', 'xml'), - array('services2.xml', 'xml'), - array('services6.xml', 'xml'), - array('services8.xml', 'xml'), - array('services9.xml', 'xml'), - array('services1.yml', 'yaml'), - array('services2.yml', 'yaml'), - array('services6.yml', 'yaml'), - array('services8.yml', 'yaml'), - array('services9.yml', 'yaml'), - ); + return [ + ['services1.xml', 'xml'], + ['services2.xml', 'xml'], + ['services6.xml', 'xml'], + ['services8.xml', 'xml'], + ['services9.xml', 'xml'], + ['services1.yml', 'yaml'], + ['services2.yml', 'yaml'], + ['services6.yml', 'yaml'], + ['services8.yml', 'yaml'], + ['services9.yml', 'yaml'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/DefinitionDecoratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/DefinitionDecoratorTest.php index 92a212ec..ac58d345 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/DefinitionDecoratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/DefinitionDecoratorTest.php @@ -24,7 +24,7 @@ class DefinitionDecoratorTest extends TestCase $def = new DefinitionDecorator('foo'); $this->assertEquals('foo', $def->getParent()); - $this->assertEquals(array(), $def->getChanges()); + $this->assertEquals([], $def->getChanges()); } /** @@ -40,17 +40,17 @@ class DefinitionDecoratorTest extends TestCase $this->assertNull($def->$getter()); $this->assertSame($def, $def->$setter('foo')); $this->assertEquals('foo', $def->$getter()); - $this->assertEquals(array($changeKey => true), $def->getChanges()); + $this->assertEquals([$changeKey => true], $def->getChanges()); } public function getPropertyTests() { - return array( - array('class', 'class'), - array('factory', 'factory'), - array('configurator', 'configurator'), - array('file', 'file'), - ); + return [ + ['class', 'class'], + ['factory', 'factory'], + ['configurator', 'configurator'], + ['file', 'file'], + ]; } public function testSetPublic() @@ -60,7 +60,7 @@ class DefinitionDecoratorTest extends TestCase $this->assertTrue($def->isPublic()); $this->assertSame($def, $def->setPublic(false)); $this->assertFalse($def->isPublic()); - $this->assertEquals(array('public' => true), $def->getChanges()); + $this->assertEquals(['public' => true], $def->getChanges()); } public function testSetLazy() @@ -70,7 +70,7 @@ class DefinitionDecoratorTest extends TestCase $this->assertFalse($def->isLazy()); $this->assertSame($def, $def->setLazy(false)); $this->assertFalse($def->isLazy()); - $this->assertEquals(array('lazy' => true), $def->getChanges()); + $this->assertEquals(['lazy' => true], $def->getChanges()); } public function testSetAutowired() @@ -80,16 +80,16 @@ class DefinitionDecoratorTest extends TestCase $this->assertFalse($def->isAutowired()); $this->assertSame($def, $def->setAutowired(true)); $this->assertTrue($def->isAutowired()); - $this->assertSame(array('autowired' => true), $def->getChanges()); + $this->assertSame(['autowired' => true], $def->getChanges()); } public function testSetArgument() { $def = new DefinitionDecorator('foo'); - $this->assertEquals(array(), $def->getArguments()); + $this->assertEquals([], $def->getArguments()); $this->assertSame($def, $def->replaceArgument(0, 'foo')); - $this->assertEquals(array('index_0' => 'foo'), $def->getArguments()); + $this->assertEquals(['index_0' => 'foo'], $def->getArguments()); } /** @@ -106,7 +106,7 @@ class DefinitionDecoratorTest extends TestCase { $def = new DefinitionDecorator('foo'); - $def->setArguments(array(0 => 'foo', 1 => 'bar')); + $def->setArguments([0 => 'foo', 1 => 'bar']); $this->assertEquals('foo', $def->getArgument(0)); $this->assertEquals('bar', $def->getArgument(1)); @@ -114,7 +114,7 @@ class DefinitionDecoratorTest extends TestCase $this->assertEquals('foo', $def->getArgument(0)); $this->assertEquals('baz', $def->getArgument(1)); - $this->assertEquals(array(0 => 'foo', 1 => 'bar', 'index_1' => 'baz'), $def->getArguments()); + $this->assertEquals([0 => 'foo', 1 => 'bar', 'index_1' => 'baz'], $def->getArguments()); } /** @@ -124,7 +124,7 @@ class DefinitionDecoratorTest extends TestCase { $def = new DefinitionDecorator('foo'); - $def->setArguments(array(0 => 'foo')); + $def->setArguments([0 => 'foo']); $def->replaceArgument(0, 'foo'); $def->getArgument(1); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php index 5fe4236a..3581fe85 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php @@ -20,10 +20,10 @@ class DefinitionTest extends TestCase { $def = new Definition('stdClass'); $this->assertEquals('stdClass', $def->getClass(), '__construct() takes the class name as its first argument'); - $this->assertSame(array('class' => true), $def->getChanges()); + $this->assertSame(['class' => true], $def->getChanges()); - $def = new Definition('stdClass', array('foo')); - $this->assertEquals(array('foo'), $def->getArguments(), '__construct() takes an optional array of arguments as its second argument'); + $def = new Definition('stdClass', ['foo']); + $this->assertEquals(['foo'], $def->getArguments(), '__construct() takes an optional array of arguments as its second argument'); } public function testSetGetFactory() @@ -34,8 +34,8 @@ class DefinitionTest extends TestCase $this->assertEquals('foo', $def->getFactory(), '->getFactory() returns the factory'); $def->setFactory('Foo::bar'); - $this->assertEquals(array('Foo', 'bar'), $def->getFactory(), '->setFactory() converts string static method call to the array'); - $this->assertSame(array('factory' => true), $def->getChanges()); + $this->assertEquals(['Foo', 'bar'], $def->getFactory(), '->setFactory() converts string static method call to the array'); + $this->assertSame(['factory' => true], $def->getChanges()); } public function testSetGetClass() @@ -50,20 +50,20 @@ class DefinitionTest extends TestCase $def = new Definition('stdClass'); $this->assertNull($def->getDecoratedService()); $def->setDecoratedService('foo', 'foo.renamed', 5); - $this->assertEquals(array('foo', 'foo.renamed', 5), $def->getDecoratedService()); + $this->assertEquals(['foo', 'foo.renamed', 5], $def->getDecoratedService()); $def->setDecoratedService(null); $this->assertNull($def->getDecoratedService()); $def = new Definition('stdClass'); $this->assertNull($def->getDecoratedService()); $def->setDecoratedService('foo', 'foo.renamed'); - $this->assertEquals(array('foo', 'foo.renamed', 0), $def->getDecoratedService()); + $this->assertEquals(['foo', 'foo.renamed', 0], $def->getDecoratedService()); $def->setDecoratedService(null); $this->assertNull($def->getDecoratedService()); $def = new Definition('stdClass'); $def->setDecoratedService('foo'); - $this->assertEquals(array('foo', null, 0), $def->getDecoratedService()); + $this->assertEquals(['foo', null, 0], $def->getDecoratedService()); $def->setDecoratedService(null); $this->assertNull($def->getDecoratedService()); @@ -82,23 +82,23 @@ class DefinitionTest extends TestCase public function testArguments() { $def = new Definition('stdClass'); - $this->assertSame($def, $def->setArguments(array('foo')), '->setArguments() implements a fluent interface'); - $this->assertEquals(array('foo'), $def->getArguments(), '->getArguments() returns the arguments'); + $this->assertSame($def, $def->setArguments(['foo']), '->setArguments() implements a fluent interface'); + $this->assertEquals(['foo'], $def->getArguments(), '->getArguments() returns the arguments'); $this->assertSame($def, $def->addArgument('bar'), '->addArgument() implements a fluent interface'); - $this->assertEquals(array('foo', 'bar'), $def->getArguments(), '->addArgument() adds an argument'); + $this->assertEquals(['foo', 'bar'], $def->getArguments(), '->addArgument() adds an argument'); } public function testMethodCalls() { $def = new Definition('stdClass'); - $this->assertSame($def, $def->setMethodCalls(array(array('foo', array('foo')))), '->setMethodCalls() implements a fluent interface'); - $this->assertEquals(array(array('foo', array('foo'))), $def->getMethodCalls(), '->getMethodCalls() returns the methods to call'); - $this->assertSame($def, $def->addMethodCall('bar', array('bar')), '->addMethodCall() implements a fluent interface'); - $this->assertEquals(array(array('foo', array('foo')), array('bar', array('bar'))), $def->getMethodCalls(), '->addMethodCall() adds a method to call'); + $this->assertSame($def, $def->setMethodCalls([['foo', ['foo']]]), '->setMethodCalls() implements a fluent interface'); + $this->assertEquals([['foo', ['foo']]], $def->getMethodCalls(), '->getMethodCalls() returns the methods to call'); + $this->assertSame($def, $def->addMethodCall('bar', ['bar']), '->addMethodCall() implements a fluent interface'); + $this->assertEquals([['foo', ['foo']], ['bar', ['bar']]], $def->getMethodCalls(), '->addMethodCall() adds a method to call'); $this->assertTrue($def->hasMethodCall('bar'), '->hasMethodCall() returns true if first argument is a method to call registered'); $this->assertFalse($def->hasMethodCall('no_registered'), '->hasMethodCall() returns false if first argument is not a method to call registered'); $this->assertSame($def, $def->removeMethodCall('bar'), '->removeMethodCall() implements a fluent interface'); - $this->assertEquals(array(array('foo', array('foo'))), $def->getMethodCalls(), '->removeMethodCall() removes a method to call'); + $this->assertEquals([['foo', ['foo']]], $def->getMethodCalls(), '->removeMethodCall() removes a method to call'); } /** @@ -179,12 +179,12 @@ class DefinitionTest extends TestCase public function invalidDeprecationMessageProvider() { - return array( - "With \rs" => array("invalid \r message %service_id%"), - "With \ns" => array("invalid \n message %service_id%"), - 'With */s' => array('invalid */ message %service_id%'), - 'message not containing require %service_id% variable' => array('this is deprecated'), - ); + return [ + "With \rs" => ["invalid \r message %service_id%"], + "With \ns" => ["invalid \n message %service_id%"], + 'With */s' => ['invalid */ message %service_id%'], + 'message not containing require %service_id% variable' => ['this is deprecated'], + ]; } public function testSetGetConfigurator() @@ -198,18 +198,18 @@ class DefinitionTest extends TestCase { $def = new Definition('stdClass'); $this->assertSame($def, $def->clearTags(), '->clearTags() implements a fluent interface'); - $def->addTag('foo', array('foo' => 'bar')); + $def->addTag('foo', ['foo' => 'bar']); $def->clearTags(); - $this->assertEquals(array(), $def->getTags(), '->clearTags() removes all current tags'); + $this->assertEquals([], $def->getTags(), '->clearTags() removes all current tags'); } public function testClearTag() { $def = new Definition('stdClass'); $this->assertSame($def, $def->clearTags(), '->clearTags() implements a fluent interface'); - $def->addTag('1foo1', array('foo1' => 'bar1')); - $def->addTag('2foo2', array('foo2' => 'bar2')); - $def->addTag('3foo3', array('foo3' => 'bar3')); + $def->addTag('1foo1', ['foo1' => 'bar1']); + $def->addTag('2foo2', ['foo2' => 'bar2']); + $def->addTag('3foo3', ['foo3' => 'bar3']); $def->clearTag('2foo2'); $this->assertTrue($def->hasTag('1foo1')); $this->assertFalse($def->hasTag('2foo2')); @@ -222,18 +222,18 @@ class DefinitionTest extends TestCase public function testTags() { $def = new Definition('stdClass'); - $this->assertEquals(array(), $def->getTag('foo'), '->getTag() returns an empty array if the tag is not defined'); + $this->assertEquals([], $def->getTag('foo'), '->getTag() returns an empty array if the tag is not defined'); $this->assertFalse($def->hasTag('foo')); $this->assertSame($def, $def->addTag('foo'), '->addTag() implements a fluent interface'); $this->assertTrue($def->hasTag('foo')); - $this->assertEquals(array(array()), $def->getTag('foo'), '->getTag() returns attributes for a tag name'); - $def->addTag('foo', array('foo' => 'bar')); - $this->assertEquals(array(array(), array('foo' => 'bar')), $def->getTag('foo'), '->addTag() can adds the same tag several times'); - $def->addTag('bar', array('bar' => 'bar')); - $this->assertEquals($def->getTags(), array( - 'foo' => array(array(), array('foo' => 'bar')), - 'bar' => array(array('bar' => 'bar')), - ), '->getTags() returns all tags'); + $this->assertEquals([[]], $def->getTag('foo'), '->getTag() returns attributes for a tag name'); + $def->addTag('foo', ['foo' => 'bar']); + $this->assertEquals([[], ['foo' => 'bar']], $def->getTag('foo'), '->addTag() can adds the same tag several times'); + $def->addTag('bar', ['bar' => 'bar']); + $this->assertEquals($def->getTags(), [ + 'foo' => [[], ['foo' => 'bar']], + 'bar' => [['bar' => 'bar']], + ], '->getTags() returns all tags'); } public function testSetArgument() @@ -241,17 +241,17 @@ class DefinitionTest extends TestCase $def = new Definition('stdClass'); $def->addArgument('foo'); - $this->assertSame(array('foo'), $def->getArguments()); + $this->assertSame(['foo'], $def->getArguments()); $this->assertSame($def, $def->replaceArgument(0, 'moo')); - $this->assertSame(array('moo'), $def->getArguments()); + $this->assertSame(['moo'], $def->getArguments()); $def->addArgument('moo'); $def ->replaceArgument(0, 'foo') ->replaceArgument(1, 'bar') ; - $this->assertSame(array('foo', 'bar'), $def->getArguments()); + $this->assertSame(['foo', 'bar'], $def->getArguments()); } /** @@ -291,18 +291,18 @@ class DefinitionTest extends TestCase { $def = new Definition('stdClass'); - $this->assertEquals(array(), $def->getProperties()); - $this->assertSame($def, $def->setProperties(array('foo' => 'bar'))); - $this->assertEquals(array('foo' => 'bar'), $def->getProperties()); + $this->assertEquals([], $def->getProperties()); + $this->assertSame($def, $def->setProperties(['foo' => 'bar'])); + $this->assertEquals(['foo' => 'bar'], $def->getProperties()); } public function testSetProperty() { $def = new Definition('stdClass'); - $this->assertEquals(array(), $def->getProperties()); + $this->assertEquals([], $def->getProperties()); $this->assertSame($def, $def->setProperty('foo', 'bar')); - $this->assertEquals(array('foo' => 'bar'), $def->getProperties()); + $this->assertEquals(['foo' => 'bar'], $def->getProperties()); } public function testAutowired() @@ -321,12 +321,12 @@ class DefinitionTest extends TestCase { $def = new Definition(); - $this->assertSame(array(), $def->getChanges()); + $this->assertSame([], $def->getChanges()); } public function testGetChangesWithChanges() { - $def = new Definition('stdClass', array('fooarg')); + $def = new Definition('stdClass', ['fooarg']); $def->setAbstract(true); $def->setAutowired(true); @@ -340,13 +340,13 @@ class DefinitionTest extends TestCase $def->setShared(true); $def->setSynthetic(true); // changes aren't tracked for these, class or arguments - $def->setInstanceofConditionals(array()); + $def->setInstanceofConditionals([]); $def->addTag('foo_tag'); $def->addMethodCall('methodCall'); $def->setProperty('fooprop', true); $def->setAutoconfigured(true); - $this->assertSame(array( + $this->assertSame([ 'class' => true, 'autowired' => true, 'configurator' => true, @@ -358,10 +358,10 @@ class DefinitionTest extends TestCase 'public' => true, 'shared' => true, 'autoconfigured' => true, - ), $def->getChanges()); + ], $def->getChanges()); - $def->setChanges(array()); - $this->assertSame(array(), $def->getChanges()); + $def->setChanges([]); + $this->assertSame([], $def->getChanges()); } /** @@ -371,13 +371,13 @@ class DefinitionTest extends TestCase { $def = new Definition('stdClass'); - $this->assertEquals(array(), $def->getAutowiringTypes()); - $this->assertSame($def, $def->setAutowiringTypes(array('Foo'))); - $this->assertEquals(array('Foo'), $def->getAutowiringTypes()); + $this->assertEquals([], $def->getAutowiringTypes()); + $this->assertSame($def, $def->setAutowiringTypes(['Foo'])); + $this->assertEquals(['Foo'], $def->getAutowiringTypes()); $this->assertSame($def, $def->addAutowiringType('Bar')); $this->assertTrue($def->hasAutowiringType('Bar')); $this->assertSame($def, $def->removeAutowiringType('Foo')); - $this->assertEquals(array('Bar'), $def->getAutowiringTypes()); + $this->assertEquals(['Bar'], $def->getAutowiringTypes()); } public function testShouldAutoconfigure() @@ -394,6 +394,6 @@ class DefinitionTest extends TestCase $this->assertEmpty($def->getErrors()); $def->addError('First error'); $def->addError('Second error'); - $this->assertSame(array('First error', 'Second error'), $def->getErrors()); + $this->assertSame(['First error', 'Second error'], $def->getErrors()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php index 3c40bb55..ea11c7c5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php @@ -42,14 +42,14 @@ class GraphvizDumperTest extends TestCase $container = include self::$fixturesPath.'/containers/container10.php'; $dumper = new GraphvizDumper($container); - $this->assertEquals($dumper->dump(array( - 'graph' => array('ratio' => 'normal'), - 'node' => array('fontsize' => 13, 'fontname' => 'Verdana', 'shape' => 'square'), - 'edge' => array('fontsize' => 12, 'fontname' => 'Verdana', 'color' => 'white', 'arrowhead' => 'closed', 'arrowsize' => 1), - 'node.instance' => array('fillcolor' => 'green', 'style' => 'empty'), - 'node.definition' => array('fillcolor' => 'grey'), - 'node.missing' => array('fillcolor' => 'red', 'style' => 'empty'), - )), file_get_contents(self::$fixturesPath.'/graphviz/services10-1.dot'), '->dump() dumps services'); + $this->assertEquals($dumper->dump([ + 'graph' => ['ratio' => 'normal'], + 'node' => ['fontsize' => 13, 'fontname' => 'Verdana', 'shape' => 'square'], + 'edge' => ['fontsize' => 12, 'fontname' => 'Verdana', 'color' => 'white', 'arrowhead' => 'closed', 'arrowsize' => 1], + 'node.instance' => ['fillcolor' => 'green', 'style' => 'empty'], + 'node.definition' => ['fillcolor' => 'grey'], + 'node.missing' => ['fillcolor' => 'red', 'style' => 'empty'], + ]), file_get_contents(self::$fixturesPath.'/graphviz/services10-1.dot'), '->dump() dumps services'); } public function testDumpWithFrozenContainer() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php index 51c5fd21..6d985eac 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -54,14 +54,14 @@ class PhpDumperTest extends TestCase $dumper = new PhpDumper($container); $this->assertStringEqualsFile(self::$fixturesPath.'/php/services1.php', $dumper->dump(), '->dump() dumps an empty container as an empty PHP class'); - $this->assertStringEqualsFile(self::$fixturesPath.'/php/services1-1.php', $dumper->dump(array('class' => 'Container', 'base_class' => 'AbstractContainer', 'namespace' => 'Symfony\Component\DependencyInjection\Dump')), '->dump() takes a class and a base_class options'); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services1-1.php', $dumper->dump(['class' => 'Container', 'base_class' => 'AbstractContainer', 'namespace' => 'Symfony\Component\DependencyInjection\Dump']), '->dump() takes a class and a base_class options'); } public function testDumpOptimizationString() { $definition = new Definition(); $definition->setClass('stdClass'); - $definition->addArgument(array( + $definition->addArgument([ 'only dot' => '.', 'concatenation as value' => '.\'\'.', 'concatenation from the start value' => '\'\'.', @@ -73,7 +73,7 @@ class PhpDumperTest extends TestCase 'optimize concatenation from the start' => '%empty_value%start', 'optimize concatenation at the end' => 'end%empty_value%', 'new line' => "string with \nnew line", - )); + ]); $definition->setPublic(true); $container = new ContainerBuilder(); @@ -92,7 +92,7 @@ class PhpDumperTest extends TestCase $definition = new Definition(); $definition->setClass('stdClass'); $definition->addArgument('%foo%'); - $definition->addArgument(array('%foo%' => '%buz%/')); + $definition->addArgument(['%foo%' => '%buz%/']); $definition->setPublic(true); $container = new ContainerBuilder(); @@ -104,7 +104,7 @@ class PhpDumperTest extends TestCase $container->compile(); $dumper = new PhpDumper($container); - $this->assertStringEqualsFile(self::$fixturesPath.'/php/services12.php', $dumper->dump(array('file' => __FILE__)), '->dump() dumps __DIR__ relative strings'); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services12.php', $dumper->dump(['file' => __FILE__]), '->dump() dumps __DIR__ relative strings'); } public function testDumpCustomContainerClassWithoutConstructor() @@ -114,7 +114,7 @@ class PhpDumperTest extends TestCase $dumper = new PhpDumper($container); - $this->assertStringEqualsFile(self::$fixturesPath.'/php/custom_container_class_without_constructor.php', $dumper->dump(array('base_class' => 'NoConstructorContainer', 'namespace' => 'Symfony\Component\DependencyInjection\Tests\Fixtures\Container'))); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/custom_container_class_without_constructor.php', $dumper->dump(['base_class' => 'NoConstructorContainer', 'namespace' => 'Symfony\Component\DependencyInjection\Tests\Fixtures\Container'])); } public function testDumpCustomContainerClassConstructorWithoutArguments() @@ -124,7 +124,7 @@ class PhpDumperTest extends TestCase $dumper = new PhpDumper($container); - $this->assertStringEqualsFile(self::$fixturesPath.'/php/custom_container_class_constructor_without_arguments.php', $dumper->dump(array('base_class' => 'ConstructorWithoutArgumentsContainer', 'namespace' => 'Symfony\Component\DependencyInjection\Tests\Fixtures\Container'))); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/custom_container_class_constructor_without_arguments.php', $dumper->dump(['base_class' => 'ConstructorWithoutArgumentsContainer', 'namespace' => 'Symfony\Component\DependencyInjection\Tests\Fixtures\Container'])); } public function testDumpCustomContainerClassWithOptionalArgumentLessConstructor() @@ -134,7 +134,7 @@ class PhpDumperTest extends TestCase $dumper = new PhpDumper($container); - $this->assertStringEqualsFile(self::$fixturesPath.'/php/custom_container_class_with_optional_constructor_arguments.php', $dumper->dump(array('base_class' => 'ConstructorWithOptionalArgumentsContainer', 'namespace' => 'Symfony\Component\DependencyInjection\Tests\Fixtures\Container'))); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/custom_container_class_with_optional_constructor_arguments.php', $dumper->dump(['base_class' => 'ConstructorWithOptionalArgumentsContainer', 'namespace' => 'Symfony\Component\DependencyInjection\Tests\Fixtures\Container'])); } public function testDumpCustomContainerClassWithMandatoryArgumentLessConstructor() @@ -144,7 +144,7 @@ class PhpDumperTest extends TestCase $dumper = new PhpDumper($container); - $this->assertStringEqualsFile(self::$fixturesPath.'/php/custom_container_class_with_mandatory_constructor_arguments.php', $dumper->dump(array('base_class' => 'ConstructorWithMandatoryArgumentsContainer', 'namespace' => 'Symfony\Component\DependencyInjection\Tests\Fixtures\Container'))); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/custom_container_class_with_mandatory_constructor_arguments.php', $dumper->dump(['base_class' => 'ConstructorWithMandatoryArgumentsContainer', 'namespace' => 'Symfony\Component\DependencyInjection\Tests\Fixtures\Container'])); } /** @@ -161,12 +161,12 @@ class PhpDumperTest extends TestCase public function provideInvalidParameters() { - return array( - array(array('foo' => new Definition('stdClass'))), - array(array('foo' => new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")'))), - array(array('foo' => new Reference('foo'))), - array(array('foo' => new Variable('foo'))), - ); + return [ + [['foo' => new Definition('stdClass')]], + [['foo' => new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')]], + [['foo' => new Reference('foo')]], + [['foo' => new Variable('foo')]], + ]; } public function testAddParameters() @@ -214,7 +214,7 @@ class PhpDumperTest extends TestCase $container->getDefinition('bar')->addTag('hot'); $container->compile(); $dumper = new PhpDumper($container); - $dump = print_r($dumper->dump(array('as_files' => true, 'file' => __DIR__, 'hot_path_tag' => 'hot')), true); + $dump = print_r($dumper->dump(['as_files' => true, 'file' => __DIR__, 'hot_path_tag' => 'hot']), true); if ('\\' === \DIRECTORY_SEPARATOR) { $dump = str_replace('\\\\Fixtures\\\\includes\\\\foo.php', '/Fixtures/includes/foo.php', $dump); } @@ -238,7 +238,7 @@ class PhpDumperTest extends TestCase $container->register('bar$!', 'FooClass')->setPublic(true); $container->compile(); $dumper = new PhpDumper($container); - eval('?>'.$dumper->dump(array('class' => $class))); + eval('?>'.$dumper->dump(['class' => $class])); $this->assertTrue(method_exists($class, 'getBarService')); $this->assertTrue(method_exists($class, 'getBar2Service')); @@ -252,7 +252,7 @@ class PhpDumperTest extends TestCase $container->register('foobar', 'FooClass')->setPublic(true); $container->compile(); $dumper = new PhpDumper($container); - eval('?>'.$dumper->dump(array('class' => $class))); + eval('?>'.$dumper->dump(['class' => $class])); $this->assertTrue(method_exists($class, 'getFooBarService')); $this->assertTrue(method_exists($class, 'getFoobar2Service')); @@ -266,10 +266,10 @@ class PhpDumperTest extends TestCase $container->register('foo_bar', 'FooClass')->setPublic(true); $container->compile(); $dumper = new PhpDumper($container); - eval('?>'.$dumper->dump(array( + eval('?>'.$dumper->dump([ 'class' => $class, 'base_class' => 'Symfony\Component\DependencyInjection\Tests\Fixtures\containers\CustomContainer', - ))); + ])); $this->assertTrue(method_exists($class, 'getBar2Service')); $this->assertTrue(method_exists($class, 'getFoobar2Service')); @@ -294,12 +294,12 @@ class PhpDumperTest extends TestCase public function provideInvalidFactories() { - return array( - array(array('', 'method')), - array(array('class', '')), - array(array('...', 'method')), - array(array('class', '...')), - ); + return [ + [['', 'method']], + [['class', '']], + [['...', 'method']], + [['class', '...']], + ]; } public function testAliases() @@ -308,7 +308,7 @@ class PhpDumperTest extends TestCase $container->setParameter('foo_bar', 'foo_bar'); $container->compile(); $dumper = new PhpDumper($container); - eval('?>'.$dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Aliases'))); + eval('?>'.$dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Aliases'])); $container = new \Symfony_DI_PhpDumper_Test_Aliases(); $foo = $container->get('foo'); @@ -322,7 +322,7 @@ class PhpDumperTest extends TestCase $container->compile(); $dumper = new PhpDumper($container); - eval('?>'.$dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Frozen_No_Aliases'))); + eval('?>'.$dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Frozen_No_Aliases'])); $container = new \Symfony_DI_PhpDumper_Test_Frozen_No_Aliases(); $this->assertFalse($container->has('foo')); @@ -372,12 +372,12 @@ class PhpDumperTest extends TestCase $container->compile(); $dumper = new PhpDumper($container); - $this->assertStringEqualsFile(self::$fixturesPath.'/php/services26.php', $dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_EnvParameters', 'file' => self::$fixturesPath.'/php/services26.php'))); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services26.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_EnvParameters', 'file' => self::$fixturesPath.'/php/services26.php'])); require self::$fixturesPath.'/php/services26.php'; $container = new \Symfony_DI_PhpDumper_Test_EnvParameters(); $this->assertSame($rand, $container->getParameter('baz')); - $this->assertSame(array(123, 'abc'), $container->getParameter('json')); + $this->assertSame([123, 'abc'], $container->getParameter('json')); $this->assertSame('sqlite:///foo/bar/var/data.db', $container->getParameter('db_dsn')); putenv('Baz'); } @@ -389,10 +389,10 @@ class PhpDumperTest extends TestCase $container->setParameter('hello', '%env(base64:foo)%'); $container->compile(true); - $expected = array( + $expected = [ 'env(foo)' => 'd29ybGQ=', 'hello' => 'world', - ); + ]; $this->assertSame($expected, $container->getParameterBag()->all()); } @@ -406,7 +406,7 @@ class PhpDumperTest extends TestCase $dumper = new PhpDumper($container); $dumper->dump(); - $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_base64_env.php', $dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Base64Parameters'))); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_base64_env.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Base64Parameters'])); require self::$fixturesPath.'/php/services_base64_env.php'; $container = new \Symfony_DI_PhpDumper_Test_Base64Parameters(); @@ -424,7 +424,7 @@ class PhpDumperTest extends TestCase $dumper = new PhpDumper($container); $dumper->dump(); - $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_rot13_env.php', $dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Rot13Parameters'))); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_rot13_env.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Rot13Parameters'])); require self::$fixturesPath.'/php/services_rot13_env.php'; $container = new \Symfony_DI_PhpDumper_Test_Rot13Parameters(); @@ -466,7 +466,7 @@ class PhpDumperTest extends TestCase $container->compile(); $dumper = new PhpDumper($container); - $dump = $dumper->dump(array('class' => $class = __FUNCTION__)); + $dump = $dumper->dump(['class' => $class = __FUNCTION__]); eval('?>'.$dump); $container = new $class(); @@ -482,7 +482,7 @@ class PhpDumperTest extends TestCase public function testInlinedDefinitionReferencingServiceContainer() { $container = new ContainerBuilder(); - $container->register('foo', 'stdClass')->addMethodCall('add', array(new Reference('service_container')))->setPublic(false); + $container->register('foo', 'stdClass')->addMethodCall('add', [new Reference('service_container')])->setPublic(false); $container->register('bar', 'stdClass')->addArgument(new Reference('foo'))->setPublic(true); $container->compile(); @@ -517,7 +517,7 @@ class PhpDumperTest extends TestCase $container->compile(); $dumper = new PhpDumper($container); - eval('?>'.$dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Properties_Before_Method_Calls'))); + eval('?>'.$dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Properties_Before_Method_Calls'])); $container = new \Symfony_DI_PhpDumper_Test_Properties_Before_Method_Calls(); $this->assertTrue($container->get('bar')->callPassed(), '->dump() initializes properties before method calls'); @@ -571,15 +571,15 @@ class PhpDumperTest extends TestCase $container ->register('lazy_context', 'LazyContext') ->setPublic(true) - ->setArguments(array( - new IteratorArgument(array('k1' => new Reference('lazy_referenced'), 'k2' => new Reference('service_container'))), - new IteratorArgument(array()), - )) + ->setArguments([ + new IteratorArgument(['k1' => new Reference('lazy_referenced'), 'k2' => new Reference('service_container')]), + new IteratorArgument([]), + ]) ; $container->compile(); $dumper = new PhpDumper($container); - eval('?>'.$dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Lazy_Argument_Provide_Generator'))); + eval('?>'.$dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Lazy_Argument_Provide_Generator'])); $container = new \Symfony_DI_PhpDumper_Test_Lazy_Argument_Provide_Generator(); $lazyContext = $container->get('lazy_context'); @@ -618,8 +618,8 @@ class PhpDumperTest extends TestCase public function testDumpContainerBuilderWithFrozenConstructorIncludingPrivateServices() { $container = new ContainerBuilder(); - $container->register('foo_service', 'stdClass')->setArguments(array(new Reference('baz_service')))->setPublic(true); - $container->register('bar_service', 'stdClass')->setArguments(array(new Reference('baz_service')))->setPublic(true); + $container->register('foo_service', 'stdClass')->setArguments([new Reference('baz_service')])->setPublic(true); + $container->register('bar_service', 'stdClass')->setArguments([new Reference('baz_service')])->setPublic(true); $container->register('baz_service', 'stdClass')->setPublic(false); $container->compile(); @@ -633,20 +633,20 @@ class PhpDumperTest extends TestCase $container = new ContainerBuilder(); $container->register('foo_service', ServiceLocator::class) ->setPublic(true) - ->addArgument(array( + ->addArgument([ 'bar' => new ServiceClosureArgument(new Reference('bar_service')), 'baz' => new ServiceClosureArgument(new TypedReference('baz_service', 'stdClass')), 'nil' => $nil = new ServiceClosureArgument(new Reference('nil')), - )) + ]) ; // no method calls $container->register('translator.loader_1', 'stdClass')->setPublic(true); $container->register('translator.loader_1_locator', ServiceLocator::class) ->setPublic(false) - ->addArgument(array( + ->addArgument([ 'translator.loader_1' => new ServiceClosureArgument(new Reference('translator.loader_1')), - )); + ]); $container->register('translator_1', StubbedTranslator::class) ->setPublic(true) ->addArgument(new Reference('translator.loader_1_locator')); @@ -655,29 +655,29 @@ class PhpDumperTest extends TestCase $container->register('translator.loader_2', 'stdClass')->setPublic(true); $container->register('translator.loader_2_locator', ServiceLocator::class) ->setPublic(false) - ->addArgument(array( + ->addArgument([ 'translator.loader_2' => new ServiceClosureArgument(new Reference('translator.loader_2')), - )); + ]); $container->register('translator_2', StubbedTranslator::class) ->setPublic(true) ->addArgument(new Reference('translator.loader_2_locator')) - ->addMethodCall('addResource', array('db', new Reference('translator.loader_2'), 'nl')); + ->addMethodCall('addResource', ['db', new Reference('translator.loader_2'), 'nl']); // two method calls $container->register('translator.loader_3', 'stdClass')->setPublic(true); $container->register('translator.loader_3_locator', ServiceLocator::class) ->setPublic(false) - ->addArgument(array( + ->addArgument([ 'translator.loader_3' => new ServiceClosureArgument(new Reference('translator.loader_3')), - )); + ]); $container->register('translator_3', StubbedTranslator::class) ->setPublic(true) ->addArgument(new Reference('translator.loader_3_locator')) - ->addMethodCall('addResource', array('db', new Reference('translator.loader_3'), 'nl')) - ->addMethodCall('addResource', array('db', new Reference('translator.loader_3'), 'en')); + ->addMethodCall('addResource', ['db', new Reference('translator.loader_3'), 'nl']) + ->addMethodCall('addResource', ['db', new Reference('translator.loader_3'), 'en']); - $nil->setValues(array(null)); - $container->register('bar_service', 'stdClass')->setArguments(array(new Reference('baz_service')))->setPublic(true); + $nil->setValues([null]); + $container->register('bar_service', 'stdClass')->setArguments([new Reference('baz_service')])->setPublic(true); $container->register('baz_service', 'stdClass')->setPublic(false); $container->compile(); @@ -693,10 +693,10 @@ class PhpDumperTest extends TestCase ->setPublic(true) ->setAutowired(true) ->addArgument(new Reference(ContainerInterface::class)) - ->addTag('container.service_subscriber', array( + ->addTag('container.service_subscriber', [ 'key' => 'bar', 'id' => TestServiceSubscriber::class, - )) + ]) ; $container->register(TestServiceSubscriber::class, TestServiceSubscriber::class)->setPublic(true); @@ -718,11 +718,11 @@ class PhpDumperTest extends TestCase ->setPublic(false); $container->register('bar', 'BarClass') ->setPublic(true) - ->addMethodCall('setBaz', array(new Reference('not_invalid', SymfonyContainerInterface::IGNORE_ON_INVALID_REFERENCE))); + ->addMethodCall('setBaz', [new Reference('not_invalid', SymfonyContainerInterface::IGNORE_ON_INVALID_REFERENCE)]); $container->compile(); $dumper = new PhpDumper($container); - eval('?>'.$dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Private_With_Ignore_On_Invalid_Reference'))); + eval('?>'.$dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Private_With_Ignore_On_Invalid_Reference'])); $container = new \Symfony_DI_PhpDumper_Test_Private_With_Ignore_On_Invalid_Reference(); $this->assertInstanceOf('BazClass', $container->get('bar')->getBaz()); @@ -731,16 +731,16 @@ class PhpDumperTest extends TestCase public function testArrayParameters() { $container = new ContainerBuilder(); - $container->setParameter('array_1', array(123)); - $container->setParameter('array_2', array(__DIR__)); + $container->setParameter('array_1', [123]); + $container->setParameter('array_2', [__DIR__]); $container->register('bar', 'BarClass') ->setPublic(true) - ->addMethodCall('setBaz', array('%array_1%', '%array_2%', '%%array_1%%', array(123))); + ->addMethodCall('setBaz', ['%array_1%', '%array_2%', '%%array_1%%', [123]]); $container->compile(); $dumper = new PhpDumper($container); - $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_array_params.php', str_replace('\\\\Dumper', '/Dumper', $dumper->dump(array('file' => self::$fixturesPath.'/php/services_array_params.php')))); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_array_params.php', str_replace('\\\\Dumper', '/Dumper', $dumper->dump(['file' => self::$fixturesPath.'/php/services_array_params.php']))); } public function testExpressionReferencingPrivateService() @@ -752,7 +752,7 @@ class PhpDumperTest extends TestCase ->setPublic(false); $container->register('public_foo', 'stdClass') ->setPublic(true) - ->addArgument(new Expression('service("private_foo")')); + ->addArgument(new Expression('service("private_foo").bar')); $container->compile(); $dumper = new PhpDumper($container); @@ -766,7 +766,7 @@ class PhpDumperTest extends TestCase $container->compile(); $dumper = new PhpDumper($container); - $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_uninitialized_ref.php', $dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Uninitialized_Reference'))); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_uninitialized_ref.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Uninitialized_Reference'])); require self::$fixturesPath.'/php/services_uninitialized_ref.php'; @@ -780,7 +780,7 @@ class PhpDumperTest extends TestCase $this->assertNull($bar->closures[0]()); $this->assertNull($bar->closures[1]()); $this->assertNull($bar->closures[2]()); - $this->assertSame(array(), iterator_to_array($bar->iter)); + $this->assertSame([], iterator_to_array($bar->iter)); $container = new \Symfony_DI_PhpDumper_Test_Uninitialized_Reference(); @@ -795,7 +795,7 @@ class PhpDumperTest extends TestCase $this->assertEquals(new \stdClass(), $bar->closures[0]()); $this->assertNull($bar->closures[1]()); $this->assertEquals(new \stdClass(), $bar->closures[2]()); - $this->assertEquals(array('foo1' => new \stdClass(), 'foo3' => new \stdClass()), iterator_to_array($bar->iter)); + $this->assertEquals(['foo1' => new \stdClass(), 'foo3' => new \stdClass()], iterator_to_array($bar->iter)); } /** @@ -808,7 +808,7 @@ class PhpDumperTest extends TestCase $dumper = new PhpDumper($container); $container = 'Symfony_DI_PhpDumper_Test_Almost_Circular_'.ucfirst($visibility); - $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_almost_circular_'.$visibility.'.php', $dumper->dump(array('class' => $container))); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_almost_circular_'.$visibility.'.php', $dumper->dump(['class' => $container])); require self::$fixturesPath.'/php/services_almost_circular_'.$visibility.'.php'; @@ -820,7 +820,7 @@ class PhpDumperTest extends TestCase $foo2 = $container->get('foo2'); $this->assertSame($foo2, $foo2->bar->foobar->foo); - $this->assertSame(array(), (array) $container->get('foobar4')); + $this->assertSame([], (array) $container->get('foobar4')); $foo5 = $container->get('foo5'); $this->assertSame($foo5, $foo5->bar->foo); @@ -832,15 +832,15 @@ class PhpDumperTest extends TestCase $this->assertEquals(new \stdClass(), $manager); $foo6 = $container->get('foo6'); - $this->assertEquals((object) array('bar6' => (object) array()), $foo6); + $this->assertEquals((object) ['bar6' => (object) []], $foo6); $this->assertInstanceOf(\stdClass::class, $container->get('root')); } public function provideAlmostCircular() { - yield array('public'); - yield array('private'); + yield ['public']; + yield ['private']; } public function testDeepServiceGraph() @@ -855,14 +855,14 @@ class PhpDumperTest extends TestCase $dumper = new PhpDumper($container); $dumper->dump(); - $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_deep_graph.php', $dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Deep_Graph'))); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_deep_graph.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Deep_Graph'])); require self::$fixturesPath.'/php/services_deep_graph.php'; $container = new \Symfony_DI_PhpDumper_Test_Deep_Graph(); $this->assertInstanceOf(FooForDeepGraph::class, $container->get('foo')); - $this->assertEquals((object) array('p2' => (object) array('p3' => (object) array())), $container->get('foo')->bClone); + $this->assertEquals((object) ['p2' => (object) ['p3' => (object) []]], $container->get('foo')->bClone); } public function testInlineSelfRef() @@ -884,7 +884,7 @@ class PhpDumperTest extends TestCase $container->compile(); $dumper = new PhpDumper($container); - $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_inline_self_ref.php', $dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Inline_Self_Ref'))); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_inline_self_ref.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Inline_Self_Ref'])); } public function testHotPathOptimizations() @@ -894,7 +894,7 @@ class PhpDumperTest extends TestCase $container->compile(); $dumper = new PhpDumper($container); - $dump = $dumper->dump(array('hot_path_tag' => 'container.hot_path', 'inline_class_loader_parameter' => 'inline_requires', 'file' => self::$fixturesPath.'/php/services_inline_requires.php')); + $dump = $dumper->dump(['hot_path_tag' => 'container.hot_path', 'inline_class_loader_parameter' => 'inline_requires', 'file' => self::$fixturesPath.'/php/services_inline_requires.php']); if ('\\' === \DIRECTORY_SEPARATOR) { $dump = str_replace("'\\\\includes\\\\HotPath\\\\", "'/includes/HotPath/", $dump); } @@ -909,7 +909,7 @@ class PhpDumperTest extends TestCase $container->compile(); $dumper = new PhpDumper($container); - eval('?>'.$dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Literal_Class_With_Root_Namespace'))); + eval('?>'.$dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Literal_Class_With_Root_Namespace'])); $container = new \Symfony_DI_PhpDumper_Test_Literal_Class_With_Root_Namespace(); @@ -918,23 +918,23 @@ class PhpDumperTest extends TestCase public function testDumpHandlesObjectClassNames() { - $container = new ContainerBuilder(new ParameterBag(array( + $container = new ContainerBuilder(new ParameterBag([ 'class' => 'stdClass', - ))); + ])); $container->setDefinition('foo', new Definition(new Parameter('class'))); - $container->setDefinition('bar', new Definition('stdClass', array( + $container->setDefinition('bar', new Definition('stdClass', [ new Reference('foo'), - )))->setPublic(true); + ]))->setPublic(true); $container->setParameter('inline_requires', true); $container->compile(); $dumper = new PhpDumper($container); - eval('?>'.$dumper->dump(array( + eval('?>'.$dumper->dump([ 'class' => 'Symfony_DI_PhpDumper_Test_Object_Class_Name', 'inline_class_loader_parameter' => 'inline_requires', - ))); + ])); $container = new \Symfony_DI_PhpDumper_Test_Object_Class_Name(); @@ -951,17 +951,17 @@ class PhpDumperTest extends TestCase $container->compile(); $dumper = new PhpDumper($container); - eval('?>'.$dumper->dump(array( + eval('?>'.$dumper->dump([ 'class' => 'Symfony_DI_PhpDumper_Test_UninitializedSyntheticReference', 'inline_class_loader_parameter' => 'inline_requires', - ))); + ])); $container = new \Symfony_DI_PhpDumper_Test_UninitializedSyntheticReference(); - $this->assertEquals((object) array('foo' => null), $container->get('bar')); + $this->assertEquals((object) ['foo' => null], $container->get('bar')); - $container->set('foo', (object) array(123)); - $this->assertEquals((object) array('foo' => (object) array(123)), $container->get('bar')); + $container->set('foo', (object) [123]); + $this->assertEquals((object) ['foo' => (object) [123]], $container->get('bar')); } public function testAdawsonContainer() @@ -1007,7 +1007,7 @@ class PhpDumperTest extends TestCase $container->compile(); $dumper = new PhpDumper($container); - $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_legacy_privates.php', $dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Legacy_Privates', 'file' => self::$fixturesPath.'/php/services_legacy_privates.php'))); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_legacy_privates.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Legacy_Privates', 'file' => self::$fixturesPath.'/php/services_legacy_privates.php'])); require self::$fixturesPath.'/php/services_legacy_privates.php'; @@ -1044,7 +1044,7 @@ class PhpDumperTest extends TestCase $container->compile(); $dumper = new PhpDumper($container); - eval('?>'.$dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Private_Service_Triggers_Deprecation'))); + eval('?>'.$dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Private_Service_Triggers_Deprecation'])); $container = new \Symfony_DI_PhpDumper_Test_Private_Service_Triggers_Deprecation(); @@ -1059,11 +1059,11 @@ class PhpDumperTest extends TestCase */ public function testParameterWithMixedCase() { - $container = new ContainerBuilder(new ParameterBag(array('Foo' => 'bar', 'BAR' => 'foo'))); + $container = new ContainerBuilder(new ParameterBag(['Foo' => 'bar', 'BAR' => 'foo'])); $container->compile(); $dumper = new PhpDumper($container); - eval('?>'.$dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Parameter_With_Mixed_Case'))); + eval('?>'.$dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Parameter_With_Mixed_Case'])); $container = new \Symfony_DI_PhpDumper_Test_Parameter_With_Mixed_Case(); @@ -1079,11 +1079,11 @@ class PhpDumperTest extends TestCase */ public function testParameterWithLowerCase() { - $container = new ContainerBuilder(new ParameterBag(array('foo' => 'bar'))); + $container = new ContainerBuilder(new ParameterBag(['foo' => 'bar'])); $container->compile(); $dumper = new PhpDumper($container); - eval('?>'.$dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Parameter_With_Lower_Case'))); + eval('?>'.$dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Parameter_With_Lower_Case'])); $container = new \Symfony_DI_PhpDumper_Test_Parameter_With_Lower_Case(); @@ -1103,11 +1103,11 @@ class PhpDumperTest extends TestCase $container->compile(); $dumper = new PhpDumper($container); - eval('?>'.$dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Reference_With_Lower_Case_Id'))); + eval('?>'.$dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Reference_With_Lower_Case_Id'])); $container = new \Symfony_DI_PhpDumper_Test_Reference_With_Lower_Case_Id(); - $this->assertEquals((object) array('foo' => (object) array()), $container->get('Bar')); + $this->assertEquals((object) ['foo' => (object) []], $container->get('Bar')); } } @@ -1120,7 +1120,7 @@ class Rot13EnvVarProcessor implements EnvVarProcessorInterface public static function getProvidedTypes() { - return array('rot13' => 'string'); + return ['rot13' => 'string']; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php index f33b3b8d..ac274c6f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php @@ -123,8 +123,8 @@ class XmlDumperTest extends TestCase { $fixturesPath = realpath(__DIR__.'/../Fixtures/'); - return array( - array(" + return [ + [" @@ -133,8 +133,8 @@ class XmlDumperTest extends TestCase -", include $fixturesPath.'/containers/container15.php'), - array(" +", include $fixturesPath.'/containers/container15.php'], + [" @@ -143,8 +143,8 @@ class XmlDumperTest extends TestCase -", include $fixturesPath.'/containers/container16.php'), - ); +", include $fixturesPath.'/containers/container16.php'], + ]; } /** @@ -163,13 +163,13 @@ class XmlDumperTest extends TestCase public function provideCompiledContainerData() { - return array( - array('container8'), - array('container9'), - array('container11'), - array('container12'), - array('container14'), - ); + return [ + ['container8'], + ['container9'], + ['container11'], + ['container12'], + ['container14'], + ]; } public function testDumpInlinedServices() @@ -194,7 +194,7 @@ class XmlDumperTest extends TestCase $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); $loader->load('services_dump_load.xml'); - $this->assertEquals(array(new Reference('bar', ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)), $container->getDefinition('foo')->getArguments()); + $this->assertEquals([new Reference('bar', ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)], $container->getDefinition('foo')->getArguments()); $dumper = new XmlDumper($container); $this->assertStringEqualsFile(self::$fixturesPath.'/xml/services_dump_load.xml', $dumper->dump()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php index ff2239fb..49ee8e6f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php @@ -75,7 +75,7 @@ class YamlDumperTest extends TestCase $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')); $loader->load('services_dump_load.yml'); - $this->assertEquals(array(new Reference('bar', ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)), $container->getDefinition('foo')->getArguments()); + $this->assertEquals([new Reference('bar', ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)], $container->getDefinition('foo')->getArguments()); $dumper = new YamlDumper($container); $this->assertStringEqualsFile(self::$fixturesPath.'/yaml/services_dump_load.yml', $dumper->dump()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php index b1ee044e..97235046 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php @@ -31,16 +31,16 @@ class EnvVarProcessorTest extends TestCase public function validStrings() { - return array( - array('hello', 'hello'), - array('true', 'true'), - array('false', 'false'), - array('null', 'null'), - array('1', '1'), - array('0', '0'), - array('1.1', '1.1'), - array('1e1', '1e1'), - ); + return [ + ['hello', 'hello'], + ['true', 'true'], + ['false', 'false'], + ['null', 'null'], + ['1', '1'], + ['0', '0'], + ['1.1', '1.1'], + ['1e1', '1e1'], + ]; } /** @@ -61,15 +61,15 @@ class EnvVarProcessorTest extends TestCase public function validBools() { - return array( - array('true', true), - array('false', false), - array('null', false), - array('1', true), - array('0', false), - array('1.1', true), - array('1e1', true), - ); + return [ + ['true', true], + ['false', false], + ['null', false], + ['1', true], + ['0', false], + ['1.1', true], + ['1e1', true], + ]; } /** @@ -90,11 +90,11 @@ class EnvVarProcessorTest extends TestCase public function validInts() { - return array( - array('1', 1), - array('1.1', 1), - array('1e1', 10), - ); + return [ + ['1', 1], + ['1.1', 1], + ['1e1', 10], + ]; } /** @@ -115,11 +115,11 @@ class EnvVarProcessorTest extends TestCase public function invalidInts() { - return array( - array('foo'), - array('true'), - array('null'), - ); + return [ + ['foo'], + ['true'], + ['null'], + ]; } /** @@ -140,11 +140,11 @@ class EnvVarProcessorTest extends TestCase public function validFloats() { - return array( - array('1', 1.0), - array('1.1', 1.1), - array('1e1', 10.0), - ); + return [ + ['1', 1.0], + ['1.1', 1.1], + ['1e1', 10.0], + ]; } /** @@ -165,11 +165,11 @@ class EnvVarProcessorTest extends TestCase public function invalidFloats() { - return array( - array('foo'), - array('true'), - array('null'), - ); + return [ + ['foo'], + ['true'], + ['null'], + ]; } /** @@ -190,10 +190,10 @@ class EnvVarProcessorTest extends TestCase public function validConsts() { - return array( - array('Symfony\Component\DependencyInjection\Tests\EnvVarProcessorTest::TEST_CONST', self::TEST_CONST), - array('E_ERROR', E_ERROR), - ); + return [ + ['Symfony\Component\DependencyInjection\Tests\EnvVarProcessorTest::TEST_CONST', self::TEST_CONST], + ['E_ERROR', E_ERROR], + ]; } /** @@ -214,10 +214,10 @@ class EnvVarProcessorTest extends TestCase public function invalidConsts() { - return array( - array('Symfony\Component\DependencyInjection\Tests\EnvVarProcessorTest::UNDEFINED_CONST'), - array('UNDEFINED_CONST'), - ); + return [ + ['Symfony\Component\DependencyInjection\Tests\EnvVarProcessorTest::UNDEFINED_CONST'], + ['UNDEFINED_CONST'], + ]; } public function testGetEnvBase64() @@ -240,10 +240,10 @@ class EnvVarProcessorTest extends TestCase $result = $processor->getEnv('json', 'foo', function ($name) { $this->assertSame('foo', $name); - return json_encode(array(1)); + return json_encode([1]); }); - $this->assertSame(array(1), $result); + $this->assertSame([1], $result); } /** @@ -279,12 +279,12 @@ class EnvVarProcessorTest extends TestCase public function otherJsonValues() { - return array( - array(1), - array(1.1), - array(true), - array(false), - ); + return [ + [1], + [1.1], + [true], + [false], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php index 9f66bfd7..3c912f2a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php @@ -23,15 +23,15 @@ class ExtensionTest extends TestCase public function testIsConfigEnabledReturnsTheResolvedValue($enabled) { $extension = new EnableableExtension(); - $this->assertSame($enabled, $extension->isConfigEnabled(new ContainerBuilder(), array('enabled' => $enabled))); + $this->assertSame($enabled, $extension->isConfigEnabled(new ContainerBuilder(), ['enabled' => $enabled])); } public function getResolvedEnabledFixtures() { - return array( - array(true), - array(false), - ); + return [ + [true], + [false], + ]; } /** @@ -42,7 +42,7 @@ class ExtensionTest extends TestCase { $extension = new EnableableExtension(); - $extension->isConfigEnabled(new ContainerBuilder(), array()); + $extension->isConfigEnabled(new ContainerBuilder(), []); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Bar.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Bar.php index d243866d..83f2da12 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Bar.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Bar.php @@ -13,7 +13,7 @@ namespace Symfony\Component\DependencyInjection\Tests\Fixtures; class Bar implements BarInterface { - public function __construct($quz = null, \NonExistent $nonExistent = null, BarInterface $decorated = null, array $foo = array()) + public function __construct($quz = null, \NonExistent $nonExistent = null, BarInterface $decorated = null, array $foo = []) { } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/TestServiceSubscriber.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/TestServiceSubscriber.php index 875abe9e..a3b042b8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/TestServiceSubscriber.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/TestServiceSubscriber.php @@ -12,11 +12,11 @@ class TestServiceSubscriber implements ServiceSubscriberInterface public static function getSubscribedServices() { - return array( + return [ __CLASS__, '?'.CustomDefinition::class, 'bar' => CustomDefinition::class, 'baz' => '?'.CustomDefinition::class, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/basic.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/basic.php index b98e894c..a9e250b9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/basic.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/basic.php @@ -7,5 +7,5 @@ use App\BarService; return function (ContainerConfigurator $c) { $s = $c->services(); $s->set(BarService::class) - ->args(array(inline('FooClass'))); + ->args([inline('FooClass')]); }; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/child.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/child.php index 6fd84485..8a5f2431 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/child.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/child.php @@ -13,7 +13,7 @@ return function (ContainerConfigurator $c) { ->set('foo') ->parent(BarService::class) ->decorate('bar', 'b', 1) - ->args(array(ref('b'))) + ->args([ref('b')]) ->class('Class2') ->file('file.php') ->parent('bar') diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/defaults.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/defaults.php index de3b99d7..2889d3fb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/defaults.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/defaults.php @@ -12,10 +12,10 @@ return function (ContainerConfigurator $c) { ->private() ->autoconfigure() ->autowire() - ->tag('t', array('a' => 'b')) + ->tag('t', ['a' => 'b']) ->bind(Foo::class, ref('bar')) ->private(); - $s->set(Foo::class)->args(array(ref('bar')))->public(); + $s->set(Foo::class)->args([ref('bar')])->public(); $s->set('bar', Foo::class)->call('setFoo')->autoconfigure(false); }; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/instanceof.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/instanceof.php index 062e8c00..0d6aac7a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/instanceof.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/instanceof.php @@ -9,8 +9,8 @@ return function (ContainerConfigurator $c) { $s = $c->services(); $s->instanceof(Prototype\Foo::class) ->property('p', 0) - ->call('setFoo', array(ref('foo'))) - ->tag('tag', array('k' => 'v')) + ->call('setFoo', [ref('foo')]) + ->tag('tag', ['k' => 'v']) ->share(false) ->lazy() ->configurator('c') diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/prototype.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/prototype.php index 622c51af..e2884aa2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/prototype.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/prototype.php @@ -12,8 +12,8 @@ return function (ContainerConfigurator $c) { ->exclude('../Prototype/{OtherDir,BadClasses}') ->factory('f') ->deprecate('%service_id%') - ->args(array(0)) - ->args(array(1)) + ->args([0]) + ->args([1]) ->autoconfigure(false) ->tag('foo') ->parent('foo'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/services9.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/services9.php index b013e512..d9373a2a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/services9.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/services9.php @@ -16,65 +16,65 @@ return function (ContainerConfigurator $c) { $s = $c->services(); $s->set('foo') - ->args(array('foo', ref('foo.baz'), array('%foo%' => 'foo is %foo%', 'foobar' => '%foo%'), true, ref('service_container'))) + ->args(['foo', ref('foo.baz'), ['%foo%' => 'foo is %foo%', 'foobar' => '%foo%'], true, ref('service_container')]) ->class(FooClass::class) - ->tag('foo', array('foo' => 'foo')) - ->tag('foo', array('bar' => 'bar', 'baz' => 'baz')) - ->factory(array(FooClass::class, 'getInstance')) + ->tag('foo', ['foo' => 'foo']) + ->tag('foo', ['bar' => 'bar', 'baz' => 'baz']) + ->factory([FooClass::class, 'getInstance']) ->property('foo', 'bar') ->property('moo', ref('foo.baz')) - ->property('qux', array('%foo%' => 'foo is %foo%', 'foobar' => '%foo%')) - ->call('setBar', array(ref('bar'))) + ->property('qux', ['%foo%' => 'foo is %foo%', 'foobar' => '%foo%']) + ->call('setBar', [ref('bar')]) ->call('initialize') ->configurator('sc_configure'); $s->set('foo.baz', '%baz_class%') - ->factory(array('%baz_class%', 'getInstance')) - ->configurator(array('%baz_class%', 'configureStatic1')); + ->factory(['%baz_class%', 'getInstance']) + ->configurator(['%baz_class%', 'configureStatic1']); $s->set('bar', FooClass::class) - ->args(array('foo', ref('foo.baz'), new Parameter('foo_bar'))) - ->configurator(array(ref('foo.baz'), 'configure')); + ->args(['foo', ref('foo.baz'), new Parameter('foo_bar')]) + ->configurator([ref('foo.baz'), 'configure']); $s->set('foo_bar', '%foo_class%') - ->args(array(ref('deprecated_service'))) + ->args([ref('deprecated_service')]) ->share(false); $s->set('method_call1', 'Bar\FooClass') ->file(realpath(__DIR__.'/../includes/foo.php')) - ->call('setBar', array(ref('foo'))) - ->call('setBar', array(ref('foo2')->nullOnInvalid())) - ->call('setBar', array(ref('foo3')->ignoreOnInvalid())) - ->call('setBar', array(ref('foobaz')->ignoreOnInvalid())) - ->call('setBar', array(expr('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")'))); + ->call('setBar', [ref('foo')]) + ->call('setBar', [ref('foo2')->nullOnInvalid()]) + ->call('setBar', [ref('foo3')->ignoreOnInvalid()]) + ->call('setBar', [ref('foobaz')->ignoreOnInvalid()]) + ->call('setBar', [expr('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')]); $s->set('foo_with_inline', 'Foo') - ->call('setBar', array(ref('inlined'))); + ->call('setBar', [ref('inlined')]); $s->set('inlined', 'Bar') ->property('pub', 'pub') - ->call('setBaz', array(ref('baz'))) + ->call('setBaz', [ref('baz')]) ->private(); $s->set('baz', 'Baz') - ->call('setFoo', array(ref('foo_with_inline'))); + ->call('setFoo', [ref('foo_with_inline')]); $s->set('request', 'Request') ->synthetic(); $s->set('configurator_service', 'ConfClass') ->private() - ->call('setFoo', array(ref('baz'))); + ->call('setFoo', [ref('baz')]); $s->set('configured_service', 'stdClass') - ->configurator(array(ref('configurator_service'), 'configureStdClass')); + ->configurator([ref('configurator_service'), 'configureStdClass']); $s->set('configurator_service_simple', 'ConfClass') - ->args(array('bar')) + ->args(['bar']) ->private(); $s->set('configured_service_simple', 'stdClass') - ->configurator(array(ref('configurator_service_simple'), 'configureStdClass')); + ->configurator([ref('configurator_service_simple'), 'configureStdClass']); $s->set('decorated', 'stdClass'); @@ -92,28 +92,28 @@ return function (ContainerConfigurator $c) { ->private(); $s->set('factory_service', 'Bar') - ->factory(array(ref('foo.baz'), 'getInstance')); + ->factory([ref('foo.baz'), 'getInstance']); $s->set('new_factory_service', 'FooBarBaz') ->property('foo', 'bar') - ->factory(array(ref('new_factory'), 'getInstance')); + ->factory([ref('new_factory'), 'getInstance']); $s->set('service_from_static_method', 'Bar\FooClass') - ->factory(array('Bar\FooClass', 'getInstance')); + ->factory(['Bar\FooClass', 'getInstance']); $s->set('factory_simple', 'SimpleFactoryClass') ->deprecate() - ->args(array('foo')) + ->args(['foo']) ->private(); $s->set('factory_service_simple', 'Bar') - ->factory(array(ref('factory_simple'), 'getInstance')); + ->factory([ref('factory_simple'), 'getInstance']); $s->set('lazy_context', 'LazyContext') - ->args(array(iterator(array('k1' => ref('foo.baz'), 'k2' => ref('service_container'))), iterator(array()))); + ->args([iterator(['k1' => ref('foo.baz'), 'k2' => ref('service_container')]), iterator([])]); $s->set('lazy_context_ignore_invalid_ref', 'LazyContext') - ->args(array(iterator(array(ref('foo.baz'), ref('invalid')->ignoreOnInvalid())), iterator(array()))); + ->args([iterator([ref('foo.baz'), ref('invalid')->ignoreOnInvalid()]), iterator([])]); $s->set('tagged_iterator_foo', 'Bar') ->private() @@ -121,7 +121,7 @@ return function (ContainerConfigurator $c) { $s->set('tagged_iterator', 'Bar') ->public() - ->args(array(tagged('foo'))); + ->args([tagged('foo')]); $s->alias('alias_for_foo', 'foo')->private()->public(); $s->alias('alias_for_alias', ref('alias_for_foo')); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container11.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container11.php index 150cd792..91e5c263 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container11.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container11.php @@ -6,7 +6,7 @@ use Symfony\Component\DependencyInjection\Definition; $container = new ContainerBuilder(); $container-> register('foo', 'FooClass')-> - addArgument(new Definition('BarClass', array(new Definition('BazClass')))) + addArgument(new Definition('BarClass', [new Definition('BazClass')])) ->setPublic(true) ; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container12.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container12.php index bc527eb7..ef077030 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container12.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container12.php @@ -6,7 +6,7 @@ $container = new ContainerBuilder(); $container-> register('foo', 'FooClass\\Foo')-> addArgument('foo<>&bar')-> - addTag('foo"bar\\bar', array('foo' => 'foo"barřž€')) + addTag('foo"bar\\bar', ['foo' => 'foo"barřž€']) ->setPublic(true) ; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container19.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container19.php index 300a5cc7..c3af5c96 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container19.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container19.php @@ -12,7 +12,7 @@ $container->setParameter('foo', '%env(FOO)%'); $container ->register('service_from_anonymous_factory', '%foo%') - ->setFactory(array(new Definition('%foo%'), 'getInstance')) + ->setFactory([new Definition('%foo%'), 'getInstance']) ->setPublic(true) ; @@ -20,7 +20,7 @@ $anonymousServiceWithFactory = new Definition('Bar\FooClass'); $anonymousServiceWithFactory->setFactory('Bar\FooClass::getInstance'); $container ->register('service_with_method_call_and_factory', 'Bar\FooClass') - ->addMethodCall('setBar', array($anonymousServiceWithFactory)) + ->addMethodCall('setBar', [$anonymousServiceWithFactory]) ->setPublic(true) ; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container21.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container21.php index 298c9266..d82cf385 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container21.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container21.php @@ -6,15 +6,15 @@ use Symfony\Component\DependencyInjection\Definition; $container = new ContainerBuilder(); $bar = new Definition('Bar'); -$bar->setConfigurator(array(new Definition('Baz'), 'configureBar')); +$bar->setConfigurator([new Definition('Baz'), 'configureBar']); $fooFactory = new Definition('FooFactory'); -$fooFactory->setFactory(array(new Definition('Foobar'), 'createFooFactory')); +$fooFactory->setFactory([new Definition('Foobar'), 'createFooFactory']); $container ->register('foo', 'Foo') - ->setFactory(array($fooFactory, 'createFoo')) - ->setConfigurator(array($bar, 'configureFoo')) + ->setFactory([$fooFactory, 'createFoo']) + ->setConfigurator([$bar, 'configureFoo']) ->setPublic(true) ; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container8.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container8.php index 1a4e5ab5..5b3c01c2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container8.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container8.php @@ -3,12 +3,12 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -$container = new ContainerBuilder(new ParameterBag(array( +$container = new ContainerBuilder(new ParameterBag([ 'foo' => '%baz%', 'baz' => 'bar', 'bar' => 'foo is %%foo bar', 'escape' => '@escapeme', - 'values' => array(true, false, null, 0, 1000.3, 'true', 'false', 'null'), -))); + 'values' => [true, false, null, 0, 1000.3, 'true', 'false', 'null'], +])); return $container; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container9.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container9.php index 21d35611..691a7fa6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container9.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container9.php @@ -14,26 +14,26 @@ use Symfony\Component\ExpressionLanguage\Expression; $container = new ContainerBuilder(); $container ->register('foo', '\Bar\FooClass') - ->addTag('foo', array('foo' => 'foo')) - ->addTag('foo', array('bar' => 'bar', 'baz' => 'baz')) - ->setFactory(array('Bar\\FooClass', 'getInstance')) - ->setArguments(array('foo', new Reference('foo.baz'), array('%foo%' => 'foo is %foo%', 'foobar' => '%foo%'), true, new Reference('service_container'))) - ->setProperties(array('foo' => 'bar', 'moo' => new Reference('foo.baz'), 'qux' => array('%foo%' => 'foo is %foo%', 'foobar' => '%foo%'))) - ->addMethodCall('setBar', array(new Reference('bar'))) + ->addTag('foo', ['foo' => 'foo']) + ->addTag('foo', ['bar' => 'bar', 'baz' => 'baz']) + ->setFactory(['Bar\\FooClass', 'getInstance']) + ->setArguments(['foo', new Reference('foo.baz'), ['%foo%' => 'foo is %foo%', 'foobar' => '%foo%'], true, new Reference('service_container')]) + ->setProperties(['foo' => 'bar', 'moo' => new Reference('foo.baz'), 'qux' => ['%foo%' => 'foo is %foo%', 'foobar' => '%foo%']]) + ->addMethodCall('setBar', [new Reference('bar')]) ->addMethodCall('initialize') ->setConfigurator('sc_configure') ->setPublic(true) ; $container ->register('foo.baz', '%baz_class%') - ->setFactory(array('%baz_class%', 'getInstance')) - ->setConfigurator(array('%baz_class%', 'configureStatic1')) + ->setFactory(['%baz_class%', 'getInstance']) + ->setConfigurator(['%baz_class%', 'configureStatic1']) ->setPublic(true) ; $container ->register('bar', 'Bar\FooClass') - ->setArguments(array('foo', new Reference('foo.baz'), new Parameter('foo_bar'))) - ->setConfigurator(array(new Reference('foo.baz'), 'configure')) + ->setArguments(['foo', new Reference('foo.baz'), new Parameter('foo_bar')]) + ->setConfigurator([new Reference('foo.baz'), 'configure']) ->setPublic(true) ; $container @@ -43,35 +43,35 @@ $container ->setPublic(true) ; $container->getParameterBag()->clear(); -$container->getParameterBag()->add(array( +$container->getParameterBag()->add([ 'baz_class' => 'BazClass', 'foo_class' => 'Bar\FooClass', 'foo' => 'bar', -)); +]); $container ->register('method_call1', 'Bar\FooClass') ->setFile(realpath(__DIR__.'/../includes/foo.php')) - ->addMethodCall('setBar', array(new Reference('foo'))) - ->addMethodCall('setBar', array(new Reference('foo2', ContainerInterface::NULL_ON_INVALID_REFERENCE))) - ->addMethodCall('setBar', array(new Reference('foo3', ContainerInterface::IGNORE_ON_INVALID_REFERENCE))) - ->addMethodCall('setBar', array(new Reference('foobaz', ContainerInterface::IGNORE_ON_INVALID_REFERENCE))) - ->addMethodCall('setBar', array(new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")'))) + ->addMethodCall('setBar', [new Reference('foo')]) + ->addMethodCall('setBar', [new Reference('foo2', ContainerInterface::NULL_ON_INVALID_REFERENCE)]) + ->addMethodCall('setBar', [new Reference('foo3', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]) + ->addMethodCall('setBar', [new Reference('foobaz', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]) + ->addMethodCall('setBar', [new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')]) ->setPublic(true) ; $container ->register('foo_with_inline', 'Foo') - ->addMethodCall('setBar', array(new Reference('inlined'))) + ->addMethodCall('setBar', [new Reference('inlined')]) ->setPublic(true) ; $container ->register('inlined', 'Bar') ->setProperty('pub', 'pub') - ->addMethodCall('setBaz', array(new Reference('baz'))) + ->addMethodCall('setBaz', [new Reference('baz')]) ->setPublic(false) ; $container ->register('baz', 'Baz') - ->addMethodCall('setFoo', array(new Reference('foo_with_inline'))) + ->addMethodCall('setFoo', [new Reference('foo_with_inline')]) ->setPublic(true) ; $container @@ -82,11 +82,11 @@ $container $container ->register('configurator_service', 'ConfClass') ->setPublic(false) - ->addMethodCall('setFoo', array(new Reference('baz'))) + ->addMethodCall('setFoo', [new Reference('baz')]) ; $container ->register('configured_service', 'stdClass') - ->setConfigurator(array(new Reference('configurator_service'), 'configureStdClass')) + ->setConfigurator([new Reference('configurator_service'), 'configureStdClass']) ->setPublic(true) ; $container @@ -96,7 +96,7 @@ $container ; $container ->register('configured_service_simple', 'stdClass') - ->setConfigurator(array(new Reference('configurator_service_simple'), 'configureStdClass')) + ->setConfigurator([new Reference('configurator_service_simple'), 'configureStdClass']) ->setPublic(true) ; $container @@ -125,18 +125,18 @@ $container ; $container ->register('factory_service', 'Bar') - ->setFactory(array(new Reference('foo.baz'), 'getInstance')) + ->setFactory([new Reference('foo.baz'), 'getInstance']) ->setPublic(true) ; $container ->register('new_factory_service', 'FooBarBaz') ->setProperty('foo', 'bar') - ->setFactory(array(new Reference('new_factory'), 'getInstance')) + ->setFactory([new Reference('new_factory'), 'getInstance']) ->setPublic(true) ; $container ->register('service_from_static_method', 'Bar\FooClass') - ->setFactory(array('Bar\FooClass', 'getInstance')) + ->setFactory(['Bar\FooClass', 'getInstance']) ->setPublic(true) ; $container @@ -147,17 +147,17 @@ $container ; $container ->register('factory_service_simple', 'Bar') - ->setFactory(array(new Reference('factory_simple'), 'getInstance')) + ->setFactory([new Reference('factory_simple'), 'getInstance']) ->setPublic(true) ; $container ->register('lazy_context', 'LazyContext') - ->setArguments(array(new IteratorArgument(array('k1' => new Reference('foo.baz'), 'k2' => new Reference('service_container'))), new IteratorArgument(array()))) + ->setArguments([new IteratorArgument(['k1' => new Reference('foo.baz'), 'k2' => new Reference('service_container')]), new IteratorArgument([])]) ->setPublic(true) ; $container ->register('lazy_context_ignore_invalid_ref', 'LazyContext') - ->setArguments(array(new IteratorArgument(array(new Reference('foo.baz'), new Reference('invalid', ContainerInterface::IGNORE_ON_INVALID_REFERENCE))), new IteratorArgument(array()))) + ->setArguments([new IteratorArgument([new Reference('foo.baz'), new Reference('invalid', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]), new IteratorArgument([])]) ->setPublic(true) ; $container diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_almost_circular.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_almost_circular.php index 4c9906f7..df136cfa 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_almost_circular.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_almost_circular.php @@ -15,7 +15,7 @@ $container->register('foo', FooCircular::class)->setPublic(true) ->addArgument(new Reference('bar')); $container->register('bar', BarCircular::class)->setPublic($public) - ->addMethodCall('addFoobar', array(new Reference('foobar'))); + ->addMethodCall('addFoobar', [new Reference('foobar')]); $container->register('foobar', FoobarCircular::class)->setPublic($public) ->addArgument(new Reference('foo')); @@ -26,7 +26,7 @@ $container->register('foo2', FooCircular::class)->setPublic(true) ->addArgument(new Reference('bar2')); $container->register('bar2', BarCircular::class)->setPublic(!$public) - ->addMethodCall('addFoobar', array(new Reference('foobar2'))); + ->addMethodCall('addFoobar', [new Reference('foobar2')]); $container->register('foobar2', FoobarCircular::class)->setPublic($public) ->addArgument(new Reference('foo2')); @@ -34,7 +34,7 @@ $container->register('foobar2', FoobarCircular::class)->setPublic($public) // simple inline setter with internal reference $container->register('bar3', BarCircular::class)->setPublic(true) - ->addMethodCall('addFoobar', array(new Reference('foobar3'), new Reference('foobar3'))); + ->addMethodCall('addFoobar', [new Reference('foobar3'), new Reference('foobar3')]); $container->register('foobar3', FoobarCircular::class)->setPublic($public); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_env_in_id.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_env_in_id.php index 4699f410..1e851cf0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_env_in_id.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_env_in_id.php @@ -11,7 +11,7 @@ $container->setParameter('env(BAR)', 'bar'); $container->register('foo', 'stdClass')->setPublic(true) ->addArgument(new Reference('bar_%env(BAR)%')) - ->addArgument(array('baz_%env(BAR)%' => new Reference('baz_%env(BAR)%'))); + ->addArgument(['baz_%env(BAR)%' => new Reference('baz_%env(BAR)%')]); $container->register('bar', 'stdClass')->setPublic(true) ->addArgument(new Reference('bar_%env(BAR)%')); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_uninitialized_ref.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_uninitialized_ref.php index 7aeefb4d..36c05c3f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_uninitialized_ref.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_uninitialized_ref.php @@ -33,16 +33,16 @@ $container ->setProperty('foo1', new Reference('foo1', $container::IGNORE_ON_UNINITIALIZED_REFERENCE)) ->setProperty('foo2', new Reference('foo2', $container::IGNORE_ON_UNINITIALIZED_REFERENCE)) ->setProperty('foo3', new Reference('foo3', $container::IGNORE_ON_UNINITIALIZED_REFERENCE)) - ->setProperty('closures', array( + ->setProperty('closures', [ new ServiceClosureArgument(new Reference('foo1', $container::IGNORE_ON_UNINITIALIZED_REFERENCE)), new ServiceClosureArgument(new Reference('foo2', $container::IGNORE_ON_UNINITIALIZED_REFERENCE)), new ServiceClosureArgument(new Reference('foo3', $container::IGNORE_ON_UNINITIALIZED_REFERENCE)), - )) - ->setProperty('iter', new IteratorArgument(array( + ]) + ->setProperty('iter', new IteratorArgument([ 'foo1' => new Reference('foo1', $container::IGNORE_ON_UNINITIALIZED_REFERENCE), 'foo2' => new Reference('foo2', $container::IGNORE_ON_UNINITIALIZED_REFERENCE), 'foo3' => new Reference('foo3', $container::IGNORE_ON_UNINITIALIZED_REFERENCE), - ))) + ])) ->setPublic(true) ; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/ProjectExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/ProjectExtension.php index ba07d7c4..2198b19c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/ProjectExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/ProjectExtension.php @@ -14,7 +14,7 @@ class ProjectExtension implements ExtensionInterface if ($configs) { $config = call_user_func_array('array_merge', $configs); } else { - $config = array(); + $config = []; } $configuration->setDefinition('project.service.bar', new Definition('FooClass')); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/foo.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/foo.php index bcb4e20a..20bc928b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/foo.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/foo.php @@ -11,14 +11,14 @@ class FooClass public $initialized = false; public $configured = false; public $called = false; - public $arguments = array(); + public $arguments = []; - public function __construct($arguments = array()) + public function __construct($arguments = []) { $this->arguments = $arguments; } - public static function getInstance($arguments = array()) + public static function getInstance($arguments = []) { $obj = new self($arguments); $obj->called = true; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php index 0a443f3a..7495110d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php @@ -19,24 +19,24 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tests\Fixtures\Container\ConstructorWithoutArgumentsContainer { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { parent::__construct(); $this->parameterBag = null; - $this->services = array(); + $this->services = []; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php index dd9ed9cb..eb573f9b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php @@ -19,21 +19,21 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tests\Fixtures\Container\ConstructorWithMandatoryArgumentsContainer { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); + $this->services = []; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php index 6bf3c906..d322f80a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php @@ -19,24 +19,24 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tests\Fixtures\Container\ConstructorWithOptionalArgumentsContainer { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { parent::__construct(); $this->parameterBag = null; - $this->services = array(); + $this->services = []; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_without_constructor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_without_constructor.php index 4cf1ae40..68bc1ef8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_without_constructor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_without_constructor.php @@ -19,21 +19,21 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tests\Fixtures\Container\NoConstructorContainer { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); + $this->services = []; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php index bdd0d101..ed085a5e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php @@ -19,21 +19,21 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class Container extends \Symfony\Component\DependencyInjection\Dump\AbstractContainer { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); + $this->services = []; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1.php index 85830af7..9733ba9c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1.php @@ -17,21 +17,21 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); + $this->services = []; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php index aa078ab8..1b744335 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php @@ -17,26 +17,26 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { $this->parameters = $this->getDefaultParameters(); - $this->services = array(); - $this->methodMap = array( + $this->services = []; + $this->methodMap = [ 'test' => 'getTestService', - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() @@ -63,7 +63,7 @@ class ProjectServiceContainer extends Container */ protected function getTestService() { - return $this->services['test'] = new \stdClass(array('only dot' => '.', 'concatenation as value' => '.\'\'.', 'concatenation from the start value' => '\'\'.', '.' => 'dot as a key', '.\'\'.' => 'concatenation as a key', '\'\'.' => 'concatenation from the start key', 'optimize concatenation' => 'string1-string2', 'optimize concatenation with empty string' => 'string1string2', 'optimize concatenation from the start' => 'start', 'optimize concatenation at the end' => 'end', 'new line' => 'string with '."\n".'new line')); + return $this->services['test'] = new \stdClass(['only dot' => '.', 'concatenation as value' => '.\'\'.', 'concatenation from the start value' => '\'\'.', '.' => 'dot as a key', '.\'\'.' => 'concatenation as a key', '\'\'.' => 'concatenation from the start key', 'optimize concatenation' => 'string1-string2', 'optimize concatenation with empty string' => 'string1string2', 'optimize concatenation from the start' => 'start', 'optimize concatenation at the end' => 'end', 'new line' => 'string with '."\n".'new line']); } public function getParameter($name) @@ -109,8 +109,8 @@ class ProjectServiceContainer extends Container return $this->parameterBag; } - private $loadedDynamicParameters = array(); - private $dynamicParameters = array(); + private $loadedDynamicParameters = []; + private $dynamicParameters = []; /** * Computes a dynamic parameter. @@ -126,7 +126,7 @@ class ProjectServiceContainer extends Container throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name)); } - private $normalizedParameterNames = array(); + private $normalizedParameterNames = []; private function normalizeParameterName($name) { @@ -149,9 +149,9 @@ class ProjectServiceContainer extends Container */ protected function getDefaultParameters() { - return array( + return [ 'empty_value' => '', 'some_string' => '-', - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php index 4266ad8e..ba564b82 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php @@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { @@ -27,20 +27,20 @@ class ProjectServiceContainer extends Container } $this->parameters = $this->getDefaultParameters(); - $this->services = array(); - $this->methodMap = array( + $this->services = []; + $this->methodMap = [ 'test' => 'getTestService', - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() @@ -67,7 +67,7 @@ class ProjectServiceContainer extends Container */ protected function getTestService() { - return $this->services['test'] = new \stdClass(('wiz'.$this->targetDirs[1]), array(('wiz'.$this->targetDirs[1]) => ($this->targetDirs[2].'/'))); + return $this->services['test'] = new \stdClass(('wiz'.$this->targetDirs[1]), [('wiz'.$this->targetDirs[1]) => ($this->targetDirs[2].'/')]); } public function getParameter($name) @@ -113,11 +113,11 @@ class ProjectServiceContainer extends Container return $this->parameterBag; } - private $loadedDynamicParameters = array( + private $loadedDynamicParameters = [ 'foo' => false, 'buz' => false, - ); - private $dynamicParameters = array(); + ]; + private $dynamicParameters = []; /** * Computes a dynamic parameter. @@ -140,7 +140,7 @@ class ProjectServiceContainer extends Container return $this->dynamicParameters[$name] = $value; } - private $normalizedParameterNames = array(); + private $normalizedParameterNames = []; private function normalizeParameterName($name) { @@ -163,9 +163,9 @@ class ProjectServiceContainer extends Container */ protected function getDefaultParameters() { - return array( + return [ 'bar' => __DIR__, 'baz' => (__DIR__.'/PhpDumperTest.php'), - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php index 04705a29..40ce06de 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php @@ -17,25 +17,25 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); - $this->methodMap = array( + $this->services = []; + $this->methodMap = [ 'bar' => 'getBarService', - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'foo' => true, - ); + ]; } public function compile() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php index c8b57a7c..664f4dd9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php @@ -17,27 +17,27 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { $this->parameters = $this->getDefaultParameters(); - $this->services = array(); - $this->methodMap = array( + $this->services = []; + $this->methodMap = [ 'service_from_anonymous_factory' => 'getServiceFromAnonymousFactoryService', 'service_with_method_call_and_factory' => 'getServiceWithMethodCallAndFactoryService', - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() @@ -124,10 +124,10 @@ class ProjectServiceContainer extends Container return $this->parameterBag; } - private $loadedDynamicParameters = array( + private $loadedDynamicParameters = [ 'foo' => false, - ); - private $dynamicParameters = array(); + ]; + private $dynamicParameters = []; /** * Computes a dynamic parameter. @@ -149,9 +149,9 @@ class ProjectServiceContainer extends Container return $this->dynamicParameters[$name] = $value; } - private $normalizedParameterNames = array( + private $normalizedParameterNames = [ 'env(foo)' => 'env(FOO)', - ); + ]; private function normalizeParameterName($name) { @@ -174,8 +174,8 @@ class ProjectServiceContainer extends Container */ protected function getDefaultParameters() { - return array( + return [ 'env(FOO)' => 'Bar\\FaooClass', - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services24.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services24.php index 1be6319e..b277ddd1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services24.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services24.php @@ -17,24 +17,24 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); - $this->methodMap = array( + $this->services = []; + $this->methodMap = [ 'foo' => 'getFooService', - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services26.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services26.php index d6256008..595d12ba 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services26.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services26.php @@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class Symfony_DI_PhpDumper_Test_EnvParameters extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { @@ -27,21 +27,21 @@ class Symfony_DI_PhpDumper_Test_EnvParameters extends Container } $this->parameters = $this->getDefaultParameters(); - $this->services = array(); - $this->methodMap = array( + $this->services = []; + $this->methodMap = [ 'bar' => 'getBarService', 'test' => 'getTestService', - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() @@ -126,14 +126,14 @@ class Symfony_DI_PhpDumper_Test_EnvParameters extends Container return $this->parameterBag; } - private $loadedDynamicParameters = array( + private $loadedDynamicParameters = [ 'bar' => false, 'baz' => false, 'json' => false, 'db_dsn' => false, 'env(json_file)' => false, - ); - private $dynamicParameters = array(); + ]; + private $dynamicParameters = []; /** * Computes a dynamic parameter. @@ -159,10 +159,10 @@ class Symfony_DI_PhpDumper_Test_EnvParameters extends Container return $this->dynamicParameters[$name] = $value; } - private $normalizedParameterNames = array( + private $normalizedParameterNames = [ 'env(foo)' => 'env(FOO)', 'env(db)' => 'env(DB)', - ); + ]; private function normalizeParameterName($name) { @@ -185,10 +185,10 @@ class Symfony_DI_PhpDumper_Test_EnvParameters extends Container */ protected function getDefaultParameters() { - return array( + return [ 'project_dir' => '/foo/bar', 'env(FOO)' => 'foo', 'env(DB)' => 'sqlite://%project_dir%/var/data.db', - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services33.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services33.php index 3e308c1d..98e34bc9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services33.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services33.php @@ -17,29 +17,29 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); - $this->normalizedIds = array( + $this->services = []; + $this->normalizedIds = [ 'bar\\foo' => 'Bar\\Foo', 'foo\\foo' => 'Foo\\Foo', - ); - $this->methodMap = array( + ]; + $this->methodMap = [ 'Bar\\Foo' => 'getFooService', 'Foo\\Foo' => 'getFoo2Service', - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php index 285942eb..cc78c196 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php @@ -17,23 +17,23 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { $this->parameters = $this->getDefaultParameters(); - $this->services = array(); + $this->services = []; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() @@ -96,8 +96,8 @@ class ProjectServiceContainer extends Container return $this->parameterBag; } - private $loadedDynamicParameters = array(); - private $dynamicParameters = array(); + private $loadedDynamicParameters = []; + private $dynamicParameters = []; /** * Computes a dynamic parameter. @@ -113,7 +113,7 @@ class ProjectServiceContainer extends Container throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name)); } - private $normalizedParameterNames = array(); + private $normalizedParameterNames = []; private function normalizeParameterName($name) { @@ -136,12 +136,12 @@ class ProjectServiceContainer extends Container */ protected function getDefaultParameters() { - return array( + return [ 'foo' => 'bar', 'baz' => 'bar', 'bar' => 'foo is %foo bar', 'escape' => '@escapeme', - 'values' => array( + 'values' => [ 0 => true, 1 => false, 2 => NULL, @@ -150,7 +150,7 @@ class ProjectServiceContainer extends Container 5 => 'true', 6 => 'false', 7 => 'null', - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php index ad316b23..0e09ec62 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php @@ -17,19 +17,19 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { parent::__construct(new ParameterBag($this->getDefaultParameters())); - $this->normalizedIds = array( + $this->normalizedIds = [ 'psr\\container\\containerinterface' => 'Psr\\Container\\ContainerInterface', 'symfony\\component\\dependencyinjection\\containerinterface' => 'Symfony\\Component\\DependencyInjection\\ContainerInterface', - ); - $this->syntheticIds = array( + ]; + $this->syntheticIds = [ 'request' => true, - ); - $this->methodMap = array( + ]; + $this->methodMap = [ 'bar' => 'getBarService', 'baz' => 'getBazService', 'configurator_service' => 'getConfiguratorServiceService', @@ -56,21 +56,21 @@ class ProjectServiceContainer extends Container 'service_from_static_method' => 'getServiceFromStaticMethodService', 'tagged_iterator' => 'getTaggedIteratorService', 'tagged_iterator_foo' => 'getTaggedIteratorFooService', - ); - $this->privates = array( + ]; + $this->privates = [ 'configurator_service' => true, 'configurator_service_simple' => true, 'factory_simple' => true, 'inlined' => true, 'new_factory' => true, 'tagged_iterator_foo' => true, - ); - $this->aliases = array( + ]; + $this->aliases = [ 'Psr\\Container\\ContainerInterface' => 'service_container', 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => 'service_container', 'alias_for_alias' => 'foo', 'alias_for_foo' => 'foo', - ); + ]; } /** @@ -126,7 +126,7 @@ class ProjectServiceContainer extends Container { $this->services['configured_service_simple'] = $instance = new \stdClass(); - ${($_ = isset($this->services['configurator_service_simple']) ? $this->services['configurator_service_simple'] : $this->services['configurator_service_simple'] = new \ConfClass('bar')) && false ?: '_'}->configureStdClass($instance); + ${($_ = isset($this->services['configurator_service_simple']) ? $this->services['configurator_service_simple'] : ($this->services['configurator_service_simple'] = new \ConfClass('bar'))) && false ?: '_'}->configureStdClass($instance); return $instance; } @@ -204,11 +204,11 @@ class ProjectServiceContainer extends Container { $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'}; - $this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, array($this->getParameter('foo') => 'foo is '.$this->getParameter('foo').'', 'foobar' => $this->getParameter('foo')), true, $this); + $this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, [$this->getParameter('foo') => 'foo is '.$this->getParameter('foo').'', 'foobar' => $this->getParameter('foo')], true, $this); $instance->foo = 'bar'; $instance->moo = $a; - $instance->qux = array($this->getParameter('foo') => 'foo is '.$this->getParameter('foo').'', 'foobar' => $this->getParameter('foo')); + $instance->qux = [$this->getParameter('foo') => 'foo is '.$this->getParameter('foo').'', 'foobar' => $this->getParameter('foo')]; $instance->setBar(${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && false ?: '_'}); $instance->initialize(); sc_configure($instance); @@ -223,9 +223,9 @@ class ProjectServiceContainer extends Container */ protected function getFoo_BazService() { - $this->services['foo.baz'] = $instance = \call_user_func(array($this->getParameter('baz_class'), 'getInstance')); + $this->services['foo.baz'] = $instance = \call_user_func([$this->getParameter('baz_class'), 'getInstance']); - \call_user_func(array($this->getParameter('baz_class'), 'configureStatic1'), $instance); + \call_user_func([$this->getParameter('baz_class'), 'configureStatic1'], $instance); return $instance; } @@ -434,10 +434,10 @@ class ProjectServiceContainer extends Container */ protected function getDefaultParameters() { - return array( + return [ 'baz_class' => 'BazClass', 'foo_class' => 'Bar\\FooClass', 'foo' => 'bar', - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_as_files.txt b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_as_files.txt index 4b6e2f59..2dc415ce 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_as_files.txt +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_as_files.txt @@ -2,7 +2,7 @@ Array ( [Container%s/removed-ids.php] => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'configurator_service' => true, @@ -13,7 +13,7 @@ return array( 'inlined' => true, 'new_factory' => true, 'tagged_iterator_foo' => true, -); +]; [Container%s/getBazService.php] => services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'}; -$this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, array('bar' => 'foo is bar', 'foobar' => 'bar'), true, $this); +$this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, ['bar' => 'foo is bar', 'foobar' => 'bar'], true, $this); $instance->foo = 'bar'; $instance->moo = $a; -$instance->qux = array('bar' => 'foo is bar', 'foobar' => 'bar'); +$instance->qux = ['bar' => 'foo is bar', 'foobar' => 'bar']; $instance->setBar(${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && false ?: '_'}); $instance->initialize(); sc_configure($instance); @@ -243,7 +243,7 @@ use Symfony\Component\DependencyInjection\Argument\RewindableGenerator; return $this->services['tagged_iterator'] = new \Bar(new RewindableGenerator(function () { yield 0 => ${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->load('getFooService.php')) && false ?: '_'}; - yield 1 => ${($_ = isset($this->services['tagged_iterator_foo']) ? $this->services['tagged_iterator_foo'] : $this->services['tagged_iterator_foo'] = new \Bar()) && false ?: '_'}; + yield 1 => ${($_ = isset($this->services['tagged_iterator_foo']) ? $this->services['tagged_iterator_foo'] : ($this->services['tagged_iterator_foo'] = new \Bar())) && false ?: '_'}; }, 2)); [Container%s/getTaggedIteratorFooService.php] => targetDirs[0] = \dirname($containerDir); for ($i = 1; $i <= 5; ++$i) { @@ -290,15 +290,15 @@ class ProjectServiceContainer extends Container $this->containerDir = $containerDir; $this->parameters = $this->getDefaultParameters(); - $this->services = array(); - $this->syntheticIds = array( + $this->services = []; + $this->syntheticIds = [ 'request' => true, - ); - $this->methodMap = array( + ]; + $this->methodMap = [ 'bar' => 'getBarService', 'foo_bar' => 'getFooBarService', - ); - $this->fileMap = array( + ]; + $this->fileMap = [ 'baz' => 'getBazService.php', 'configured_service' => 'getConfiguredServiceService.php', 'configured_service_simple' => 'getConfiguredServiceSimpleService.php', @@ -318,16 +318,16 @@ class ProjectServiceContainer extends Container 'service_from_static_method' => 'getServiceFromStaticMethodService.php', 'tagged_iterator' => 'getTaggedIteratorService.php', 'tagged_iterator_foo' => 'getTaggedIteratorFooService.php', - ); - $this->privates = array( + ]; + $this->privates = [ 'factory_simple' => true, 'tagged_iterator_foo' => true, - ); - $this->aliases = array( + ]; + $this->aliases = [ 'alias_for_alias' => 'foo', 'alias_for_foo' => 'foo', 'decorated' => 'decorator_service_with_name', - ); + ]; } public function getRemovedIds() @@ -435,8 +435,8 @@ class ProjectServiceContainer extends Container return $this->parameterBag; } - private $loadedDynamicParameters = array(); - private $dynamicParameters = array(); + private $loadedDynamicParameters = []; + private $dynamicParameters = []; /** * Computes a dynamic parameter. @@ -452,7 +452,7 @@ class ProjectServiceContainer extends Container throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name)); } - private $normalizedParameterNames = array(); + private $normalizedParameterNames = []; private function normalizeParameterName($name) { @@ -475,11 +475,11 @@ class ProjectServiceContainer extends Container */ protected function getDefaultParameters() { - return array( + return [ 'baz_class' => 'BazClass', 'foo_class' => 'Bar\\FooClass', 'foo' => 'bar', - ); + ]; } } @@ -499,10 +499,10 @@ if (!\class_exists(ProjectServiceContainer::class, false)) { \class_alias(\Container%s\ProjectServiceContainer::class, ProjectServiceContainer::class, false); } -return new \Container%s\ProjectServiceContainer(array( +return new \Container%s\ProjectServiceContainer([ 'container.build_hash' => '%s', 'container.build_id' => '%s', 'container.build_time' => %d, -), __DIR__.\DIRECTORY_SEPARATOR.'Container%s'); +], __DIR__.\DIRECTORY_SEPARATOR.'Container%s'); ) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php index 37cc5be3..02e0680d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php @@ -17,17 +17,17 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { $this->parameters = $this->getDefaultParameters(); - $this->services = array(); - $this->syntheticIds = array( + $this->services = []; + $this->syntheticIds = [ 'request' => true, - ); - $this->methodMap = array( + ]; + $this->methodMap = [ 'bar' => 'getBarService', 'baz' => 'getBazService', 'configured_service' => 'getConfiguredServiceService', @@ -49,21 +49,21 @@ class ProjectServiceContainer extends Container 'service_from_static_method' => 'getServiceFromStaticMethodService', 'tagged_iterator' => 'getTaggedIteratorService', 'tagged_iterator_foo' => 'getTaggedIteratorFooService', - ); - $this->privates = array( + ]; + $this->privates = [ 'factory_simple' => true, 'tagged_iterator_foo' => true, - ); - $this->aliases = array( + ]; + $this->aliases = [ 'alias_for_alias' => 'foo', 'alias_for_foo' => 'foo', 'decorated' => 'decorator_service_with_name', - ); + ]; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'configurator_service' => true, @@ -74,7 +74,7 @@ class ProjectServiceContainer extends Container 'inlined' => true, 'new_factory' => true, 'tagged_iterator_foo' => true, - ); + ]; } public function compile() @@ -218,11 +218,11 @@ class ProjectServiceContainer extends Container { $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'}; - $this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, array('bar' => 'foo is bar', 'foobar' => 'bar'), true, $this); + $this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, ['bar' => 'foo is bar', 'foobar' => 'bar'], true, $this); $instance->foo = 'bar'; $instance->moo = $a; - $instance->qux = array('bar' => 'foo is bar', 'foobar' => 'bar'); + $instance->qux = ['bar' => 'foo is bar', 'foobar' => 'bar']; $instance->setBar(${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && false ?: '_'}); $instance->initialize(); sc_configure($instance); @@ -355,7 +355,7 @@ class ProjectServiceContainer extends Container { return $this->services['tagged_iterator'] = new \Bar(new RewindableGenerator(function () { yield 0 => ${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'}; - yield 1 => ${($_ = isset($this->services['tagged_iterator_foo']) ? $this->services['tagged_iterator_foo'] : $this->services['tagged_iterator_foo'] = new \Bar()) && false ?: '_'}; + yield 1 => ${($_ = isset($this->services['tagged_iterator_foo']) ? $this->services['tagged_iterator_foo'] : ($this->services['tagged_iterator_foo'] = new \Bar())) && false ?: '_'}; }, 2)); } @@ -426,8 +426,8 @@ class ProjectServiceContainer extends Container return $this->parameterBag; } - private $loadedDynamicParameters = array(); - private $dynamicParameters = array(); + private $loadedDynamicParameters = []; + private $dynamicParameters = []; /** * Computes a dynamic parameter. @@ -443,7 +443,7 @@ class ProjectServiceContainer extends Container throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name)); } - private $normalizedParameterNames = array(); + private $normalizedParameterNames = []; private function normalizeParameterName($name) { @@ -466,10 +466,10 @@ class ProjectServiceContainer extends Container */ protected function getDefaultParameters() { - return array( + return [ 'baz_class' => 'BazClass', 'foo_class' => 'Bar\\FooClass', 'foo' => 'bar', - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_adawson.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_adawson.php index 37b95567..f222fc6e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_adawson.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_adawson.php @@ -17,12 +17,12 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); - $this->normalizedIds = array( + $this->services = []; + $this->normalizedIds = [ 'app\\bus' => 'App\\Bus', 'app\\db' => 'App\\Db', 'app\\handler1' => 'App\\Handler1', @@ -30,8 +30,8 @@ class ProjectServiceContainer extends Container 'app\\processor' => 'App\\Processor', 'app\\registry' => 'App\\Registry', 'app\\schema' => 'App\\Schema', - ); - $this->methodMap = array( + ]; + $this->methodMap = [ 'App\\Bus' => 'getBusService', 'App\\Db' => 'getDbService', 'App\\Handler1' => 'getHandler1Service', @@ -39,21 +39,21 @@ class ProjectServiceContainer extends Container 'App\\Processor' => 'getProcessorService', 'App\\Registry' => 'getRegistryService', 'App\\Schema' => 'getSchemaService', - ); - $this->privates = array( + ]; + $this->privates = [ 'App\\Handler1' => true, 'App\\Handler2' => true, 'App\\Processor' => true, 'App\\Registry' => true, 'App\\Schema' => true, - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'App\\Handler1' => true, 'App\\Handler2' => true, 'App\\Processor' => true, @@ -61,7 +61,7 @@ class ProjectServiceContainer extends Container 'App\\Schema' => true, 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() @@ -167,7 +167,7 @@ class ProjectServiceContainer extends Container { $this->services['App\Registry'] = $instance = new \App\Registry(); - $instance->processor = array(0 => ${($_ = isset($this->services['App\Db']) ? $this->services['App\Db'] : $this->getDbService()) && false ?: '_'}, 1 => ${($_ = isset($this->services['App\Bus']) ? $this->services['App\Bus'] : $this->getBusService()) && false ?: '_'}); + $instance->processor = [0 => ${($_ = isset($this->services['App\Db']) ? $this->services['App\Db'] : $this->getDbService()) && false ?: '_'}, 1 => ${($_ = isset($this->services['App\Bus']) ? $this->services['App\Bus'] : $this->getBusService()) && false ?: '_'}]; return $instance; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.php index 9c54acc6..5345aa3b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.php @@ -17,12 +17,12 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); - $this->methodMap = array( + $this->services = []; + $this->methodMap = [ 'bar2' => 'getBar2Service', 'bar3' => 'getBar3Service', 'bar6' => 'getBar6Service', @@ -45,8 +45,8 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container 'multiuse1' => 'getMultiuse1Service', 'root' => 'getRootService', 'subscriber' => 'getSubscriberService', - ); - $this->privates = array( + ]; + $this->privates = [ 'bar6' => true, 'level2' => true, 'level3' => true, @@ -54,14 +54,14 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container 'level5' => true, 'level6' => true, 'multiuse1' => true, - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'bar' => true, @@ -83,7 +83,7 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container 'logger2' => true, 'multiuse1' => true, 'subscriber2' => true, - ); + ]; } public function compile() @@ -331,7 +331,7 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container */ protected function getRootService() { - return $this->services['root'] = new \stdClass(${($_ = isset($this->services['level2']) ? $this->services['level2'] : $this->getLevel2Service()) && false ?: '_'}, ${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : $this->services['multiuse1'] = new \stdClass()) && false ?: '_'}); + return $this->services['root'] = new \stdClass(${($_ = isset($this->services['level2']) ? $this->services['level2'] : $this->getLevel2Service()) && false ?: '_'}, ${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : ($this->services['multiuse1'] = new \stdClass())) && false ?: '_'}); } /** @@ -397,7 +397,7 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container */ protected function getLevel4Service() { - return $this->services['level4'] = new \stdClass(${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : $this->services['multiuse1'] = new \stdClass()) && false ?: '_'}, ${($_ = isset($this->services['level5']) ? $this->services['level5'] : $this->getLevel5Service()) && false ?: '_'}); + return $this->services['level4'] = new \stdClass(${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : ($this->services['multiuse1'] = new \stdClass())) && false ?: '_'}, ${($_ = isset($this->services['level5']) ? $this->services['level5'] : $this->getLevel5Service()) && false ?: '_'}); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_public.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_public.php index bd08c4d1..b569b335 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_public.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_public.php @@ -17,12 +17,12 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); - $this->methodMap = array( + $this->services = []; + $this->methodMap = [ 'bar' => 'getBarService', 'bar3' => 'getBar3Service', 'bar5' => 'getBar5Service', @@ -52,8 +52,8 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container 'multiuse1' => 'getMultiuse1Service', 'root' => 'getRootService', 'subscriber' => 'getSubscriberService', - ); - $this->privates = array( + ]; + $this->privates = [ 'bar6' => true, 'level2' => true, 'level3' => true, @@ -61,14 +61,14 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container 'level5' => true, 'level6' => true, 'multiuse1' => true, - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'bar2' => true, @@ -83,7 +83,7 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container 'logger2' => true, 'multiuse1' => true, 'subscriber2' => true, - ); + ]; } public function compile() @@ -126,7 +126,7 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container { $this->services['bar3'] = $instance = new \BarCircular(); - $a = ${($_ = isset($this->services['foobar3']) ? $this->services['foobar3'] : $this->services['foobar3'] = new \FoobarCircular()) && false ?: '_'}; + $a = ${($_ = isset($this->services['foobar3']) ? $this->services['foobar3'] : ($this->services['foobar3'] = new \FoobarCircular())) && false ?: '_'}; $instance->addFoobar($a, $a); @@ -431,7 +431,7 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container */ protected function getRootService() { - return $this->services['root'] = new \stdClass(${($_ = isset($this->services['level2']) ? $this->services['level2'] : $this->getLevel2Service()) && false ?: '_'}, ${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : $this->services['multiuse1'] = new \stdClass()) && false ?: '_'}); + return $this->services['root'] = new \stdClass(${($_ = isset($this->services['level2']) ? $this->services['level2'] : $this->getLevel2Service()) && false ?: '_'}, ${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : ($this->services['multiuse1'] = new \stdClass())) && false ?: '_'}); } /** @@ -497,7 +497,7 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container */ protected function getLevel4Service() { - return $this->services['level4'] = new \stdClass(${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : $this->services['multiuse1'] = new \stdClass()) && false ?: '_'}, ${($_ = isset($this->services['level5']) ? $this->services['level5'] : $this->getLevel5Service()) && false ?: '_'}); + return $this->services['level4'] = new \stdClass(${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : ($this->services['multiuse1'] = new \stdClass())) && false ?: '_'}, ${($_ = isset($this->services['level5']) ? $this->services['level5'] : $this->getLevel5Service()) && false ?: '_'}); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_array_params.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_array_params.php index 5ef6cb68..be59456b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_array_params.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_array_params.php @@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { @@ -27,20 +27,20 @@ class ProjectServiceContainer extends Container } $this->parameters = $this->getDefaultParameters(); - $this->services = array(); - $this->methodMap = array( + $this->services = []; + $this->methodMap = [ 'bar' => 'getBarService', - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() @@ -117,10 +117,10 @@ class ProjectServiceContainer extends Container return $this->parameterBag; } - private $loadedDynamicParameters = array( + private $loadedDynamicParameters = [ 'array_2' => false, - ); - private $dynamicParameters = array(); + ]; + private $dynamicParameters = []; /** * Computes a dynamic parameter. @@ -134,9 +134,9 @@ class ProjectServiceContainer extends Container private function getDynamicParameter($name) { switch ($name) { - case 'array_2': $value = array( + case 'array_2': $value = [ 0 => ($this->targetDirs[2].'/Dumper'), - ); break; + ]; break; default: throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name)); } $this->loadedDynamicParameters[$name] = true; @@ -144,7 +144,7 @@ class ProjectServiceContainer extends Container return $this->dynamicParameters[$name] = $value; } - private $normalizedParameterNames = array(); + private $normalizedParameterNames = []; private function normalizeParameterName($name) { @@ -167,10 +167,10 @@ class ProjectServiceContainer extends Container */ protected function getDefaultParameters() { - return array( - 'array_1' => array( + return [ + 'array_1' => [ 0 => 123, - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_base64_env.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_base64_env.php index 6b6be956..8582c3e2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_base64_env.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_base64_env.php @@ -17,23 +17,23 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class Symfony_DI_PhpDumper_Test_Base64Parameters extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { $this->parameters = $this->getDefaultParameters(); - $this->services = array(); + $this->services = []; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() @@ -96,10 +96,10 @@ class Symfony_DI_PhpDumper_Test_Base64Parameters extends Container return $this->parameterBag; } - private $loadedDynamicParameters = array( + private $loadedDynamicParameters = [ 'hello' => false, - ); - private $dynamicParameters = array(); + ]; + private $dynamicParameters = []; /** * Computes a dynamic parameter. @@ -121,7 +121,7 @@ class Symfony_DI_PhpDumper_Test_Base64Parameters extends Container return $this->dynamicParameters[$name] = $value; } - private $normalizedParameterNames = array(); + private $normalizedParameterNames = []; private function normalizeParameterName($name) { @@ -144,8 +144,8 @@ class Symfony_DI_PhpDumper_Test_Base64Parameters extends Container */ protected function getDefaultParameters() { - return array( + return [ 'env(foo)' => 'd29ybGQ=', - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_proxy.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_proxy.php index 73a7f259..ec3c8028 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_proxy.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_proxy.php @@ -17,25 +17,25 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); - $this->methodMap = array( + $this->services = []; + $this->methodMap = [ 'bar' => 'getBarService', 'foo' => 'getFooService', - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_deep_graph.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_deep_graph.php index 9a1d1ab8..4158fc62 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_deep_graph.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_deep_graph.php @@ -17,25 +17,25 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class Symfony_DI_PhpDumper_Test_Deep_Graph extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); - $this->methodMap = array( + $this->services = []; + $this->methodMap = [ 'bar' => 'getBarService', 'foo' => 'getFooService', - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_env_in_id.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_env_in_id.php index 91114fd9..ad76566b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_env_in_id.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_env_in_id.php @@ -17,36 +17,36 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { $this->parameters = $this->getDefaultParameters(); - $this->services = array(); - $this->normalizedIds = array( + $this->services = []; + $this->normalizedIds = [ 'bar_%env(bar)%' => 'bar_%env(BAR)%', - ); - $this->methodMap = array( + ]; + $this->methodMap = [ 'bar' => 'getBarService', 'bar_%env(BAR)%' => 'getBarenvBARService', 'foo' => 'getFooService', - ); - $this->privates = array( + ]; + $this->privates = [ 'bar_%env(BAR)%' => true, - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'bar_%env(BAR)%' => true, 'baz_%env(BAR)%' => true, - ); + ]; } public function compile() @@ -73,7 +73,7 @@ class ProjectServiceContainer extends Container */ protected function getBarService() { - return $this->services['bar'] = new \stdClass(${($_ = isset($this->services['bar_%env(BAR)%']) ? $this->services['bar_%env(BAR)%'] : $this->services['bar_%env(BAR)%'] = new \stdClass()) && false ?: '_'}); + return $this->services['bar'] = new \stdClass(${($_ = isset($this->services['bar_%env(BAR)%']) ? $this->services['bar_%env(BAR)%'] : ($this->services['bar_%env(BAR)%'] = new \stdClass())) && false ?: '_'}); } /** @@ -83,7 +83,7 @@ class ProjectServiceContainer extends Container */ protected function getFooService() { - return $this->services['foo'] = new \stdClass(${($_ = isset($this->services['bar_%env(BAR)%']) ? $this->services['bar_%env(BAR)%'] : $this->services['bar_%env(BAR)%'] = new \stdClass()) && false ?: '_'}, array('baz_'.$this->getEnv('string:BAR') => new \stdClass())); + return $this->services['foo'] = new \stdClass(${($_ = isset($this->services['bar_%env(BAR)%']) ? $this->services['bar_%env(BAR)%'] : ($this->services['bar_%env(BAR)%'] = new \stdClass())) && false ?: '_'}, ['baz_'.$this->getEnv('string:BAR') => new \stdClass()]); } /** @@ -139,8 +139,8 @@ class ProjectServiceContainer extends Container return $this->parameterBag; } - private $loadedDynamicParameters = array(); - private $dynamicParameters = array(); + private $loadedDynamicParameters = []; + private $dynamicParameters = []; /** * Computes a dynamic parameter. @@ -156,9 +156,9 @@ class ProjectServiceContainer extends Container throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name)); } - private $normalizedParameterNames = array( + private $normalizedParameterNames = [ 'env(bar)' => 'env(BAR)', - ); + ]; private function normalizeParameterName($name) { @@ -181,8 +181,8 @@ class ProjectServiceContainer extends Container */ protected function getDefaultParameters() { - return array( + return [ 'env(BAR)' => 'bar', - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_requires.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_requires.php index 08a474ee..a23a6936 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_requires.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_requires.php @@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { @@ -27,24 +27,24 @@ class ProjectServiceContainer extends Container } $this->parameters = $this->getDefaultParameters(); - $this->services = array(); - $this->normalizedIds = array( + $this->services = []; + $this->normalizedIds = [ 'symfony\\component\\dependencyinjection\\tests\\fixtures\\includes\\hotpath\\c1' => 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C1', 'symfony\\component\\dependencyinjection\\tests\\fixtures\\includes\\hotpath\\c2' => 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C2', 'symfony\\component\\dependencyinjection\\tests\\fixtures\\includes\\hotpath\\c3' => 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3', 'symfony\\component\\dependencyinjection\\tests\\fixtures\\parentnotexists' => 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\ParentNotExists', - ); - $this->methodMap = array( + ]; + $this->methodMap = [ 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\ParentNotExists' => 'getParentNotExistsService', 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C1' => 'getC1Service', 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C2' => 'getC2Service', 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3' => 'getC3Service', - ); - $this->privates = array( + ]; + $this->privates = [ 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3' => true, - ); + ]; - $this->aliases = array(); + $this->aliases = []; $this->privates['service_container'] = function () { include_once $this->targetDirs[1].'/includes/HotPath/I1.php'; @@ -56,11 +56,11 @@ class ProjectServiceContainer extends Container public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3' => true, - ); + ]; } public function compile() @@ -110,7 +110,7 @@ class ProjectServiceContainer extends Container include_once $this->targetDirs[1].'/includes/HotPath/C2.php'; include_once $this->targetDirs[1].'/includes/HotPath/C3.php'; - return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3'] : $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3()) && false ?: '_'}); + return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3'] : ($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3())) && false ?: '_'}); } /** @@ -168,8 +168,8 @@ class ProjectServiceContainer extends Container return $this->parameterBag; } - private $loadedDynamicParameters = array(); - private $dynamicParameters = array(); + private $loadedDynamicParameters = []; + private $dynamicParameters = []; /** * Computes a dynamic parameter. @@ -185,7 +185,7 @@ class ProjectServiceContainer extends Container throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name)); } - private $normalizedParameterNames = array(); + private $normalizedParameterNames = []; private function normalizeParameterName($name) { @@ -208,8 +208,8 @@ class ProjectServiceContainer extends Container */ protected function getDefaultParameters() { - return array( + return [ 'inline_requires' => true, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_self_ref.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_self_ref.php index fa8a4e69..a2573eae 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_self_ref.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_self_ref.php @@ -17,27 +17,27 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class Symfony_DI_PhpDumper_Test_Inline_Self_Ref extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); - $this->normalizedIds = array( + $this->services = []; + $this->normalizedIds = [ 'app\\foo' => 'App\\Foo', - ); - $this->methodMap = array( + ]; + $this->methodMap = [ 'App\\Foo' => 'getFooService', - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_legacy_privates.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_legacy_privates.php index 7aa1bff8..30dd2c9b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_legacy_privates.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_legacy_privates.php @@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class Symfony_DI_PhpDumper_Test_Legacy_Privates extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { @@ -25,8 +25,8 @@ class Symfony_DI_PhpDumper_Test_Legacy_Privates extends Container for ($i = 1; $i <= 5; ++$i) { $this->targetDirs[$i] = $dir = \dirname($dir); } - $this->services = array(); - $this->methodMap = array( + $this->services = []; + $this->methodMap = [ 'bar' => 'getBarService', 'private' => 'getPrivateService', 'private_alias' => 'getPrivateAliasService', @@ -37,8 +37,8 @@ class Symfony_DI_PhpDumper_Test_Legacy_Privates extends Container 'private_not_removed' => 'getPrivateNotRemovedService', 'private_parent' => 'getPrivateParentService', 'public_child' => 'getPublicChildService', - ); - $this->privates = array( + ]; + $this->privates = [ 'decorated_private' => true, 'decorated_private_alias' => true, 'private' => true, @@ -47,17 +47,17 @@ class Symfony_DI_PhpDumper_Test_Legacy_Privates extends Container 'private_not_inlined' => true, 'private_not_removed' => true, 'private_parent' => true, - ); - $this->aliases = array( + ]; + $this->aliases = [ 'alias_to_private' => 'private', 'decorated_private' => 'private_decorator', 'decorated_private_alias' => 'private_alias_decorator', - ); + ]; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'decorated_private' => true, @@ -71,7 +71,7 @@ class Symfony_DI_PhpDumper_Test_Legacy_Privates extends Container 'private_not_inlined' => true, 'private_not_removed' => true, 'private_parent' => true, - ); + ]; } public function compile() @@ -98,7 +98,7 @@ class Symfony_DI_PhpDumper_Test_Legacy_Privates extends Container */ protected function getBarService() { - return $this->services['bar'] = new \stdClass(${($_ = isset($this->services['private_not_inlined']) ? $this->services['private_not_inlined'] : $this->services['private_not_inlined'] = new \stdClass()) && false ?: '_'}); + return $this->services['bar'] = new \stdClass(${($_ = isset($this->services['private_not_inlined']) ? $this->services['private_not_inlined'] : ($this->services['private_not_inlined'] = new \stdClass())) && false ?: '_'}); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_locator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_locator.php index 496f6aa7..4969b2db 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_locator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_locator.php @@ -17,12 +17,12 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); - $this->methodMap = array( + $this->services = []; + $this->methodMap = [ 'bar_service' => 'getBarServiceService', 'baz_service' => 'getBazServiceService', 'foo_service' => 'getFooServiceService', @@ -32,24 +32,24 @@ class ProjectServiceContainer extends Container 'translator_1' => 'getTranslator1Service', 'translator_2' => 'getTranslator2Service', 'translator_3' => 'getTranslator3Service', - ); - $this->privates = array( + ]; + $this->privates = [ 'baz_service' => true, - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'baz_service' => true, 'translator.loader_1_locator' => true, 'translator.loader_2_locator' => true, 'translator.loader_3_locator' => true, - ); + ]; } public function compile() @@ -76,7 +76,7 @@ class ProjectServiceContainer extends Container */ protected function getBarServiceService() { - return $this->services['bar_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : $this->services['baz_service'] = new \stdClass()) && false ?: '_'}); + return $this->services['bar_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : ($this->services['baz_service'] = new \stdClass())) && false ?: '_'}); } /** @@ -86,13 +86,13 @@ class ProjectServiceContainer extends Container */ protected function getFooServiceService() { - return $this->services['foo_service'] = new \Symfony\Component\DependencyInjection\ServiceLocator(array('bar' => function () { + return $this->services['foo_service'] = new \Symfony\Component\DependencyInjection\ServiceLocator(['bar' => function () { return ${($_ = isset($this->services['bar_service']) ? $this->services['bar_service'] : $this->getBarServiceService()) && false ?: '_'}; }, 'baz' => function () { - $f = function (\stdClass $v) { return $v; }; return $f(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : $this->services['baz_service'] = new \stdClass()) && false ?: '_'}); + $f = function (\stdClass $v) { return $v; }; return $f(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : ($this->services['baz_service'] = new \stdClass())) && false ?: '_'}); }, 'nil' => function () { return NULL; - })); + }]); } /** @@ -132,9 +132,9 @@ class ProjectServiceContainer extends Container */ protected function getTranslator1Service() { - return $this->services['translator_1'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(array('translator.loader_1' => function () { - return ${($_ = isset($this->services['translator.loader_1']) ? $this->services['translator.loader_1'] : $this->services['translator.loader_1'] = new \stdClass()) && false ?: '_'}; - }))); + return $this->services['translator_1'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(['translator.loader_1' => function () { + return ${($_ = isset($this->services['translator.loader_1']) ? $this->services['translator.loader_1'] : ($this->services['translator.loader_1'] = new \stdClass())) && false ?: '_'}; + }])); } /** @@ -144,11 +144,11 @@ class ProjectServiceContainer extends Container */ protected function getTranslator2Service() { - $this->services['translator_2'] = $instance = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(array('translator.loader_2' => function () { - return ${($_ = isset($this->services['translator.loader_2']) ? $this->services['translator.loader_2'] : $this->services['translator.loader_2'] = new \stdClass()) && false ?: '_'}; - }))); + $this->services['translator_2'] = $instance = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(['translator.loader_2' => function () { + return ${($_ = isset($this->services['translator.loader_2']) ? $this->services['translator.loader_2'] : ($this->services['translator.loader_2'] = new \stdClass())) && false ?: '_'}; + }])); - $instance->addResource('db', ${($_ = isset($this->services['translator.loader_2']) ? $this->services['translator.loader_2'] : $this->services['translator.loader_2'] = new \stdClass()) && false ?: '_'}, 'nl'); + $instance->addResource('db', ${($_ = isset($this->services['translator.loader_2']) ? $this->services['translator.loader_2'] : ($this->services['translator.loader_2'] = new \stdClass())) && false ?: '_'}, 'nl'); return $instance; } @@ -160,11 +160,11 @@ class ProjectServiceContainer extends Container */ protected function getTranslator3Service() { - $this->services['translator_3'] = $instance = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(array('translator.loader_3' => function () { - return ${($_ = isset($this->services['translator.loader_3']) ? $this->services['translator.loader_3'] : $this->services['translator.loader_3'] = new \stdClass()) && false ?: '_'}; - }))); + $this->services['translator_3'] = $instance = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(['translator.loader_3' => function () { + return ${($_ = isset($this->services['translator.loader_3']) ? $this->services['translator.loader_3'] : ($this->services['translator.loader_3'] = new \stdClass())) && false ?: '_'}; + }])); - $a = ${($_ = isset($this->services['translator.loader_3']) ? $this->services['translator.loader_3'] : $this->services['translator.loader_3'] = new \stdClass()) && false ?: '_'}; + $a = ${($_ = isset($this->services['translator.loader_3']) ? $this->services['translator.loader_3'] : ($this->services['translator.loader_3'] = new \stdClass())) && false ?: '_'}; $instance->addResource('db', $a, 'nl'); $instance->addResource('db', $a, 'en'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy.php index 6c3b1405..b56063a1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy.php @@ -17,31 +17,31 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); - $this->methodMap = array( + $this->services = []; + $this->methodMap = [ 'bar' => 'getBarService', 'foo' => 'getFooService', - ); - $this->privates = array( + ]; + $this->privates = [ 'bar' => true, 'foo' => true, - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'bar' => true, 'foo' => true, - ); + ]; } public function compile() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_frozen.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_frozen.php index 1275e9f2..da1d716c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_frozen.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_frozen.php @@ -17,30 +17,30 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); - $this->methodMap = array( + $this->services = []; + $this->methodMap = [ 'bar_service' => 'getBarServiceService', 'baz_service' => 'getBazServiceService', 'foo_service' => 'getFooServiceService', - ); - $this->privates = array( + ]; + $this->privates = [ 'baz_service' => true, - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'baz_service' => true, - ); + ]; } public function compile() @@ -67,7 +67,7 @@ class ProjectServiceContainer extends Container */ protected function getBarServiceService() { - return $this->services['bar_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : $this->services['baz_service'] = new \stdClass()) && false ?: '_'}); + return $this->services['bar_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : ($this->services['baz_service'] = new \stdClass())) && false ?: '_'}); } /** @@ -77,7 +77,7 @@ class ProjectServiceContainer extends Container */ protected function getFooServiceService() { - return $this->services['foo_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : $this->services['baz_service'] = new \stdClass()) && false ?: '_'}); + return $this->services['foo_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : ($this->services['baz_service'] = new \stdClass())) && false ?: '_'}); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_in_expression.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_in_expression.php index fe84f497..c7fb579b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_in_expression.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_in_expression.php @@ -17,30 +17,30 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); - $this->methodMap = array( + $this->services = []; + $this->methodMap = [ 'private_foo' => 'getPrivateFooService', 'public_foo' => 'getPublicFooService', - ); - $this->privates = array( + ]; + $this->privates = [ 'private_foo' => true, - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'private_bar' => true, 'private_foo' => true, - ); + ]; } public function compile() @@ -67,7 +67,7 @@ class ProjectServiceContainer extends Container */ protected function getPublicFooService() { - return $this->services['public_foo'] = new \stdClass(${($_ = isset($this->services['private_foo']) ? $this->services['private_foo'] : $this->services['private_foo'] = new \stdClass()) && false ?: '_'}); + return $this->services['public_foo'] = new \stdClass(${($_ = isset($this->services['private_foo']) ? $this->services['private_foo'] : ($this->services['private_foo'] = new \stdClass())) && false ?: '_'}->bar); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_rot13_env.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_rot13_env.php index 90836aa9..7c903b11 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_rot13_env.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_rot13_env.php @@ -17,30 +17,30 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class Symfony_DI_PhpDumper_Test_Rot13Parameters extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { $this->parameters = $this->getDefaultParameters(); - $this->services = array(); - $this->normalizedIds = array( + $this->services = []; + $this->normalizedIds = [ 'symfony\\component\\dependencyinjection\\tests\\dumper\\rot13envvarprocessor' => 'Symfony\\Component\\DependencyInjection\\Tests\\Dumper\\Rot13EnvVarProcessor', - ); - $this->methodMap = array( + ]; + $this->methodMap = [ 'Symfony\\Component\\DependencyInjection\\Tests\\Dumper\\Rot13EnvVarProcessor' => 'getRot13EnvVarProcessorService', 'container.env_var_processors_locator' => 'getContainer_EnvVarProcessorsLocatorService', - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() @@ -77,9 +77,9 @@ class Symfony_DI_PhpDumper_Test_Rot13Parameters extends Container */ protected function getContainer_EnvVarProcessorsLocatorService() { - return $this->services['container.env_var_processors_locator'] = new \Symfony\Component\DependencyInjection\ServiceLocator(array('rot13' => function () { - return ${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor'] : $this->services['Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor'] = new \Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor()) && false ?: '_'}; - })); + return $this->services['container.env_var_processors_locator'] = new \Symfony\Component\DependencyInjection\ServiceLocator(['rot13' => function () { + return ${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor'] : ($this->services['Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor'] = new \Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor())) && false ?: '_'}; + }]); } public function getParameter($name) @@ -125,10 +125,10 @@ class Symfony_DI_PhpDumper_Test_Rot13Parameters extends Container return $this->parameterBag; } - private $loadedDynamicParameters = array( + private $loadedDynamicParameters = [ 'hello' => false, - ); - private $dynamicParameters = array(); + ]; + private $dynamicParameters = []; /** * Computes a dynamic parameter. @@ -150,7 +150,7 @@ class Symfony_DI_PhpDumper_Test_Rot13Parameters extends Container return $this->dynamicParameters[$name] = $value; } - private $normalizedParameterNames = array(); + private $normalizedParameterNames = []; private function normalizeParameterName($name) { @@ -173,8 +173,8 @@ class Symfony_DI_PhpDumper_Test_Rot13Parameters extends Container */ protected function getDefaultParameters() { - return array( + return [ 'env(foo)' => 'jbeyq', - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php index 9475c923..9424a761 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php @@ -17,36 +17,36 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); - $this->normalizedIds = array( + $this->services = []; + $this->normalizedIds = [ 'symfony\\component\\dependencyinjection\\tests\\fixtures\\customdefinition' => 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition', 'symfony\\component\\dependencyinjection\\tests\\fixtures\\testservicesubscriber' => 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber', - ); - $this->methodMap = array( + ]; + $this->methodMap = [ 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => 'getCustomDefinitionService', 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber' => 'getTestServiceSubscriberService', 'foo_service' => 'getFooServiceService', - ); - $this->privates = array( + ]; + $this->privates = [ 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => true, - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => true, 'service_locator.jmktfsv' => true, 'service_locator.jmktfsv.foo_service' => true, - ); + ]; } public function compile() @@ -83,15 +83,15 @@ class ProjectServiceContainer extends Container */ protected function getFooServiceService() { - return $this->services['foo_service'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber((new \Symfony\Component\DependencyInjection\ServiceLocator(array('Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => function () { - $f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v = null) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] : $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition()) && false ?: '_'}); + return $this->services['foo_service'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber((new \Symfony\Component\DependencyInjection\ServiceLocator(['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => function () { + $f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v = null) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] : ($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition())) && false ?: '_'}); }, 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber' => function () { - $f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber $v) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] : $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber()) && false ?: '_'}); + $f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber $v) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] : ($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber())) && false ?: '_'}); }, 'bar' => function () { - $f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] : $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber()) && false ?: '_'}); + $f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] : ($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber())) && false ?: '_'}); }, 'baz' => function () { - $f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v = null) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] : $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition()) && false ?: '_'}); - })))->withContext('foo_service', $this)); + $f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v = null) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] : ($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition())) && false ?: '_'}); + }]))->withContext('foo_service', $this)); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_tsantos.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_tsantos.php index dbaa7095..b14cdebb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_tsantos.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_tsantos.php @@ -17,28 +17,28 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class ProjectServiceContainer extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); - $this->normalizedIds = array( + $this->services = []; + $this->normalizedIds = [ 'tsantos\\serializer\\serializerinterface' => 'TSantos\\Serializer\\SerializerInterface', - ); - $this->methodMap = array( + ]; + $this->methodMap = [ 'tsantos_serializer' => 'getTsantosSerializerService', - ); - $this->aliases = array( + ]; + $this->aliases = [ 'TSantos\\Serializer\\SerializerInterface' => 'tsantos_serializer', - ); + ]; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + ]; } public function compile() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_uninitialized_ref.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_uninitialized_ref.php index 4d0c00b2..7a24f72c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_uninitialized_ref.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_uninitialized_ref.php @@ -17,32 +17,32 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class Symfony_DI_PhpDumper_Test_Uninitialized_Reference extends Container { private $parameters; - private $targetDirs = array(); + private $targetDirs = []; public function __construct() { - $this->services = array(); - $this->methodMap = array( + $this->services = []; + $this->methodMap = [ 'bar' => 'getBarService', 'baz' => 'getBazService', 'foo1' => 'getFoo1Service', 'foo3' => 'getFoo3Service', - ); - $this->privates = array( + ]; + $this->privates = [ 'foo3' => true, - ); + ]; - $this->aliases = array(); + $this->aliases = []; } public function getRemovedIds() { - return array( + return [ 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'foo2' => true, 'foo3' => true, - ); + ]; } public function compile() @@ -74,13 +74,13 @@ class Symfony_DI_PhpDumper_Test_Uninitialized_Reference extends Container $instance->foo1 = ${($_ = isset($this->services['foo1']) ? $this->services['foo1'] : null) && false ?: '_'}; $instance->foo2 = null; $instance->foo3 = ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : null) && false ?: '_'}; - $instance->closures = array(0 => function () { + $instance->closures = [0 => function () { return ${($_ = isset($this->services['foo1']) ? $this->services['foo1'] : null) && false ?: '_'}; }, 1 => function () { return null; }, 2 => function () { return ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : null) && false ?: '_'}; - }); + }]; $instance->iter = new RewindableGenerator(function () { if (isset($this->services['foo1'])) { yield 'foo1' => ${($_ = isset($this->services['foo1']) ? $this->services['foo1'] : null) && false ?: '_'}; @@ -107,7 +107,7 @@ class Symfony_DI_PhpDumper_Test_Uninitialized_Reference extends Container { $this->services['baz'] = $instance = new \stdClass(); - $instance->foo3 = ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : $this->services['foo3'] = new \stdClass()) && false ?: '_'}; + $instance->foo3 = ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : ($this->services['foo3'] = new \stdClass())) && false ?: '_'}; return $instance; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services6.xml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services6.xml index cffd5df6..c85b7a7c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services6.xml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services6.xml @@ -61,5 +61,9 @@ + + + + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/DirectoryLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/DirectoryLoaderTest.php index 559abbe2..c7c303b6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/DirectoryLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/DirectoryLoaderTest.php @@ -37,25 +37,25 @@ class DirectoryLoaderTest extends TestCase $locator = new FileLocator(self::$fixturesPath); $this->container = new ContainerBuilder(); $this->loader = new DirectoryLoader($this->container, $locator); - $resolver = new LoaderResolver(array( + $resolver = new LoaderResolver([ new PhpFileLoader($this->container, $locator), new IniFileLoader($this->container, $locator), new YamlFileLoader($this->container, $locator), $this->loader, - )); + ]); $this->loader->setResolver($resolver); } public function testDirectoryCanBeLoadedRecursively() { $this->loader->load('directory/'); - $this->assertEquals(array('ini' => 'ini', 'yaml' => 'yaml', 'php' => 'php'), $this->container->getParameterBag()->all(), '->load() takes a single directory'); + $this->assertEquals(['ini' => 'ini', 'yaml' => 'yaml', 'php' => 'php'], $this->container->getParameterBag()->all(), '->load() takes a single directory'); } public function testImports() { $this->loader->resolve('directory/import/import.yml')->load('directory/import/import.yml'); - $this->assertEquals(array('ini' => 'ini', 'yaml' => 'yaml'), $this->container->getParameterBag()->all(), '->load() takes a single file that imports a directory'); + $this->assertEquals(['ini' => 'ini', 'yaml' => 'yaml'], $this->container->getParameterBag()->all(), '->load() takes a single file that imports a directory'); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php index 73015084..065acdf1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php @@ -47,21 +47,21 @@ class FileLoaderTest extends TestCase $container = new ContainerBuilder(); $loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath)); - $resolver = new LoaderResolver(array( + $resolver = new LoaderResolver([ new IniFileLoader($container, new FileLocator(self::$fixturesPath.'/ini')), new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')), new PhpFileLoader($container, new FileLocator(self::$fixturesPath.'/php')), new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')), - )); + ]); $loader->setResolver($resolver); $loader->import('{F}ixtures/{xml,yaml}/services2.{yml,xml}'); $actual = $container->getParameterBag()->all(); - $expected = array( + $expected = [ 'a string', 'foo' => 'bar', - 'values' => array( + 'values' => [ 0, 'integer' => 4, 100 => null, @@ -73,14 +73,14 @@ class FileLoaderTest extends TestCase 'float' => 1.3, 1000.3, 'a string', - array('foo', 'bar'), - ), - 'mixedcase' => array('MixedCaseKey' => 'value'), + ['foo', 'bar'], + ], + 'mixedcase' => ['MixedCaseKey' => 'value'], 'constant' => PHP_EOL, 'bar' => '%foo%', 'escape' => '@escapeme', 'foo_bar' => new Reference('foo_bar'), - ); + ]; $this->assertEquals(array_keys($expected), array_keys($actual), '->load() imports and merges imported files'); } @@ -94,15 +94,15 @@ class FileLoaderTest extends TestCase $loader->registerClasses(new Definition(), 'Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\\', 'Prototype/%sub_dir%/*'); $this->assertEquals( - array('service_container', Bar::class), + ['service_container', Bar::class], array_keys($container->getDefinitions()) ); $this->assertEquals( - array( + [ PsrContainerInterface::class, ContainerInterface::class, BarInterface::class, - ), + ], array_keys($container->getAliases()) ); } @@ -127,11 +127,11 @@ class FileLoaderTest extends TestCase $this->assertFalse($container->has(DeeperBaz::class)); $this->assertEquals( - array( + [ PsrContainerInterface::class, ContainerInterface::class, BarInterface::class, - ), + ], array_keys($container->getAliases()) ); } @@ -150,11 +150,11 @@ class FileLoaderTest extends TestCase $this->assertTrue($container->has(Foo::class)); $this->assertEquals( - array( + [ PsrContainerInterface::class, ContainerInterface::class, FooInterface::class, - ), + ], array_keys($container->getAliases()) ); @@ -179,7 +179,7 @@ class FileLoaderTest extends TestCase $this->assertTrue($container->has(MissingParent::class)); $this->assertSame( - array('While discovering services from namespace "Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\BadClasses\", an error was thrown when processing the class "Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\BadClasses\MissingParent": "Class Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\BadClasses\MissingClass not found".'), + ['While discovering services from namespace "Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\BadClasses\", an error was thrown when processing the class "Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\BadClasses\MissingParent": "Class Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\BadClasses\MissingClass not found".'], $container->getDefinition(MissingParent::class)->getErrors() ); } @@ -222,8 +222,8 @@ class FileLoaderTest extends TestCase public function getIncompatibleExcludeTests() { - yield array('Prototype/*', 'yaml/*', false); - yield array('Prototype/OtherDir/*', 'Prototype/*', false); + yield ['Prototype/*', 'yaml/*', false]; + yield ['Prototype/OtherDir/*', 'Prototype/*', false]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php index c2332f82..1d7d3a93 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php @@ -30,7 +30,7 @@ class IniFileLoaderTest extends TestCase public function testIniFileCanBeLoaded() { $this->loader->load('parameters.ini'); - $this->assertEquals(array('foo' => 'bar', 'bar' => '%foo%'), $this->container->getParameterBag()->all(), '->load() takes a single file name as its first argument'); + $this->assertEquals(['foo' => 'bar', 'bar' => '%foo%'], $this->container->getParameterBag()->all(), '->load() takes a single file name as its first argument'); } /** @@ -64,35 +64,35 @@ class IniFileLoaderTest extends TestCase public function getTypeConversions() { - return array( - array('true_comment', true, true), - array('true', true, true), - array('false', false, true), - array('on', true, true), - array('off', false, true), - array('yes', true, true), - array('no', false, true), - array('none', false, true), - array('null', null, true), - array('constant', PHP_VERSION, true), - array('12', 12, true), - array('12_string', '12', true), - array('12_quoted_number', 12, false), // INI_SCANNER_RAW removes the double quotes - array('12_comment', 12, true), - array('12_string_comment', '12', true), - array('12_quoted_number_comment', 12, false), // INI_SCANNER_RAW removes the double quotes - array('-12', -12, true), - array('1', 1, true), - array('0', 0, true), - array('0b0110', bindec('0b0110'), false), // not supported by INI_SCANNER_TYPED - array('11112222333344445555', '1111,2222,3333,4444,5555', true), - array('0777', 0777, false), // not supported by INI_SCANNER_TYPED - array('255', 0xFF, false), // not supported by INI_SCANNER_TYPED - array('100.0', 1e2, false), // not supported by INI_SCANNER_TYPED - array('-120.0', -1.2E2, false), // not supported by INI_SCANNER_TYPED - array('-10100.1', -10100.1, false), // not supported by INI_SCANNER_TYPED - array('-10,100.1', '-10,100.1', true), - ); + return [ + ['true_comment', true, true], + ['true', true, true], + ['false', false, true], + ['on', true, true], + ['off', false, true], + ['yes', true, true], + ['no', false, true], + ['none', false, true], + ['null', null, true], + ['constant', PHP_VERSION, true], + ['12', 12, true], + ['12_string', '12', true], + ['12_quoted_number', 12, false], // INI_SCANNER_RAW removes the double quotes + ['12_comment', 12, true], + ['12_string_comment', '12', true], + ['12_quoted_number_comment', 12, false], // INI_SCANNER_RAW removes the double quotes + ['-12', -12, true], + ['1', 1, true], + ['0', 0, true], + ['0b0110', bindec('0b0110'), false], // not supported by INI_SCANNER_TYPED + ['11112222333344445555', '1111,2222,3333,4444,5555', true], + ['0777', 0777, false], // not supported by INI_SCANNER_TYPED + ['255', 0xFF, false], // not supported by INI_SCANNER_TYPED + ['100.0', 1e2, false], // not supported by INI_SCANNER_TYPED + ['-120.0', -1.2E2, false], // not supported by INI_SCANNER_TYPED + ['-10100.1', -10100.1, false], // not supported by INI_SCANNER_TYPED + ['-10,100.1', '-10,100.1', true], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/LoaderResolverTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/LoaderResolverTest.php index cb2d6ddc..9167e18c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/LoaderResolverTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/LoaderResolverTest.php @@ -33,23 +33,23 @@ class LoaderResolverTest extends TestCase self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); $container = new ContainerBuilder(); - $this->resolver = new LoaderResolver(array( + $this->resolver = new LoaderResolver([ new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')), new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')), new IniFileLoader($container, new FileLocator(self::$fixturesPath.'/ini')), new PhpFileLoader($container, new FileLocator(self::$fixturesPath.'/php')), new ClosureLoader($container), - )); + ]); } public function provideResourcesToLoad() { - return array( - array('ini_with_wrong_ext.xml', 'ini', IniFileLoader::class), - array('xml_with_wrong_ext.php', 'xml', XmlFileLoader::class), - array('php_with_wrong_ext.yml', 'php', PhpFileLoader::class), - array('yaml_with_wrong_ext.ini', 'yaml', YamlFileLoader::class), - ); + return [ + ['ini_with_wrong_ext.xml', 'ini', IniFileLoader::class], + ['xml_with_wrong_ext.php', 'xml', XmlFileLoader::class], + ['php_with_wrong_ext.yml', 'php', PhpFileLoader::class], + ['yaml_with_wrong_ext.ini', 'yaml', YamlFileLoader::class], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php index e0a21e88..4f7c1689 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php @@ -66,14 +66,14 @@ class PhpFileLoaderTest extends TestCase public function provideConfig() { - yield array('basic'); - yield array('defaults'); - yield array('instanceof'); - yield array('prototype'); - yield array('child'); + yield ['basic']; + yield ['defaults']; + yield ['instanceof']; + yield ['prototype']; + yield ['child']; if (\PHP_VERSION_ID >= 70000) { - yield array('php7'); + yield ['php7']; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php index 2a9ac68e..d89887ac 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php @@ -67,7 +67,7 @@ class XmlFileLoaderTest extends TestCase $this->fail('->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file'); - $this->assertRegExp(sprintf('#^Unable to parse file ".+%s".$#', 'parameters.ini'), $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file'); + $this->assertRegExp(sprintf('#^Unable to parse file ".+%s": .+.$#', 'parameters.ini'), $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file'); $e = $e->getPrevious(); $this->assertInstanceOf('InvalidArgumentException', $e, '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file'); @@ -81,7 +81,7 @@ class XmlFileLoaderTest extends TestCase $this->fail('->parseFileToDOM() throws an InvalidArgumentException if the loaded file does not validate the XSD'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->parseFileToDOM() throws an InvalidArgumentException if the loaded file does not validate the XSD'); - $this->assertRegExp(sprintf('#^Unable to parse file ".+%s".$#', 'nonvalid.xml'), $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file'); + $this->assertRegExp(sprintf('#^Unable to parse file ".+%s": .+.$#', 'nonvalid.xml'), $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file'); $e = $e->getPrevious(); $this->assertInstanceOf('InvalidArgumentException', $e, '->parseFileToDOM() throws an InvalidArgumentException if the loaded file does not validate the XSD'); @@ -112,10 +112,10 @@ class XmlFileLoaderTest extends TestCase $loader->load('services2.xml'); $actual = $container->getParameterBag()->all(); - $expected = array( + $expected = [ 'a string', 'foo' => 'bar', - 'values' => array( + 'values' => [ 0, 'integer' => 4, 100 => null, @@ -127,11 +127,11 @@ class XmlFileLoaderTest extends TestCase 'float' => 1.3, 1000.3, 'a string', - array('foo', 'bar'), - ), - 'mixedcase' => array('MixedCaseKey' => 'value'), + ['foo', 'bar'], + ], + 'mixedcase' => ['MixedCaseKey' => 'value'], 'constant' => PHP_EOL, - ); + ]; $this->assertEquals($expected, $actual, '->load() converts XML values to PHP ones'); } @@ -139,19 +139,19 @@ class XmlFileLoaderTest extends TestCase public function testLoadImports() { $container = new ContainerBuilder(); - $resolver = new LoaderResolver(array( + $resolver = new LoaderResolver([ new IniFileLoader($container, new FileLocator(self::$fixturesPath.'/ini')), new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yml')), $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')), - )); + ]); $loader->setResolver($resolver); $loader->load('services4.xml'); $actual = $container->getParameterBag()->all(); - $expected = array( + $expected = [ 'a string', 'foo' => 'bar', - 'values' => array( + 'values' => [ 0, 'integer' => 4, 100 => null, @@ -163,15 +163,15 @@ class XmlFileLoaderTest extends TestCase 'float' => 1.3, 1000.3, 'a string', - array('foo', 'bar'), - ), - 'mixedcase' => array('MixedCaseKey' => 'value'), + ['foo', 'bar'], + ], + 'mixedcase' => ['MixedCaseKey' => 'value'], 'constant' => PHP_EOL, 'bar' => '%foo%', 'imported_from_ini' => true, 'imported_from_yaml' => true, 'with_wrong_ext' => 'from yaml', - ); + ]; $this->assertEquals(array_keys($expected), array_keys($actual), '->load() imports and merges imported files'); $this->assertTrue($actual['imported_from_ini']); @@ -266,16 +266,16 @@ class XmlFileLoaderTest extends TestCase $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Definition', $services['foo'], '->load() converts element to Definition instances'); $this->assertEquals('FooClass', $services['foo']->getClass(), '->load() parses the class attribute'); $this->assertEquals('%path%/foo.php', $services['file']->getFile(), '->load() parses the file tag'); - $this->assertEquals(array('foo', new Reference('foo'), array(true, false)), $services['arguments']->getArguments(), '->load() parses the argument tags'); + $this->assertEquals(['foo', new Reference('foo'), [true, false]], $services['arguments']->getArguments(), '->load() parses the argument tags'); $this->assertEquals('sc_configure', $services['configurator1']->getConfigurator(), '->load() parses the configurator tag'); - $this->assertEquals(array(new Reference('baz'), 'configure'), $services['configurator2']->getConfigurator(), '->load() parses the configurator tag'); - $this->assertEquals(array('BazClass', 'configureStatic'), $services['configurator3']->getConfigurator(), '->load() parses the configurator tag'); - $this->assertEquals(array(array('setBar', array()), array('setBar', array(new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')))), $services['method_call1']->getMethodCalls(), '->load() parses the method_call tag'); - $this->assertEquals(array(array('setBar', array('foo', new Reference('foo'), array(true, false)))), $services['method_call2']->getMethodCalls(), '->load() parses the method_call tag'); + $this->assertEquals([new Reference('baz'), 'configure'], $services['configurator2']->getConfigurator(), '->load() parses the configurator tag'); + $this->assertEquals(['BazClass', 'configureStatic'], $services['configurator3']->getConfigurator(), '->load() parses the configurator tag'); + $this->assertEquals([['setBar', []], ['setBar', [new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')]]], $services['method_call1']->getMethodCalls(), '->load() parses the method_call tag'); + $this->assertEquals([['setBar', ['foo', new Reference('foo'), [true, false]]]], $services['method_call2']->getMethodCalls(), '->load() parses the method_call tag'); $this->assertEquals('factory', $services['new_factory1']->getFactory(), '->load() parses the factory tag'); - $this->assertEquals(array(new Reference('baz'), 'getClass'), $services['new_factory2']->getFactory(), '->load() parses the factory tag'); - $this->assertEquals(array('BazClass', 'getInstance'), $services['new_factory3']->getFactory(), '->load() parses the factory tag'); - $this->assertSame(array(null, 'getInstance'), $services['new_factory4']->getFactory(), '->load() accepts factory tag without class'); + $this->assertEquals([new Reference('baz'), 'getClass'], $services['new_factory2']->getFactory(), '->load() parses the factory tag'); + $this->assertEquals(['BazClass', 'getInstance'], $services['new_factory3']->getFactory(), '->load() parses the factory tag'); + $this->assertSame([null, 'getInstance'], $services['new_factory4']->getFactory(), '->load() accepts factory tag without class'); $aliases = $container->getAliases(); $this->assertArrayHasKey('alias_for_foo', $aliases, '->load() parses elements'); @@ -285,9 +285,9 @@ class XmlFileLoaderTest extends TestCase $this->assertEquals('foo', (string) $aliases['another_alias_for_foo']); $this->assertFalse($aliases['another_alias_for_foo']->isPublic()); - $this->assertEquals(array('decorated', null, 0), $services['decorator_service']->getDecoratedService()); - $this->assertEquals(array('decorated', 'decorated.pif-pouf', 0), $services['decorator_service_with_name']->getDecoratedService()); - $this->assertEquals(array('decorated', 'decorated.pif-pouf', 5), $services['decorator_service_with_name_and_priority']->getDecoratedService()); + $this->assertEquals(['decorated', null, 0], $services['decorator_service']->getDecoratedService()); + $this->assertEquals(['decorated', 'decorated.pif-pouf', 0], $services['decorator_service_with_name']->getDecoratedService()); + $this->assertEquals(['decorated', 'decorated.pif-pouf', 5], $services['decorator_service_with_name_and_priority']->getDecoratedService()); } public function testParsesIteratorArgument() @@ -298,7 +298,7 @@ class XmlFileLoaderTest extends TestCase $lazyDefinition = $container->getDefinition('lazy_context'); - $this->assertEquals(array(new IteratorArgument(array('k1' => new Reference('foo.baz'), 'k2' => new Reference('service_container'))), new IteratorArgument(array())), $lazyDefinition->getArguments(), '->load() parses lazy arguments'); + $this->assertEquals([new IteratorArgument(['k1' => new Reference('foo.baz'), 'k2' => new Reference('service_container')]), new IteratorArgument([])], $lazyDefinition->getArguments(), '->load() parses lazy arguments'); } public function testParsesTags() @@ -368,27 +368,27 @@ class XmlFileLoaderTest extends TestCase $doc = new \DOMDocument('1.0'); $doc->loadXML(''); - $this->assertEquals(array('foo' => 'bar'), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); + $this->assertEquals(['foo' => 'bar'], XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); $doc = new \DOMDocument('1.0'); $doc->loadXML('bar'); - $this->assertEquals(array('foo' => 'bar'), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); + $this->assertEquals(['foo' => 'bar'], XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); $doc = new \DOMDocument('1.0'); $doc->loadXML('barbar'); - $this->assertEquals(array('foo' => array('value' => 'bar', 'foo' => 'bar')), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); + $this->assertEquals(['foo' => ['value' => 'bar', 'foo' => 'bar']], XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); $doc = new \DOMDocument('1.0'); $doc->loadXML(''); - $this->assertEquals(array('foo' => null), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); + $this->assertEquals(['foo' => null], XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); $doc = new \DOMDocument('1.0'); $doc->loadXML(''); - $this->assertEquals(array('foo' => null), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); + $this->assertEquals(['foo' => null], XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); $doc = new \DOMDocument('1.0'); $doc->loadXML(''); - $this->assertEquals(array('foo' => array(array('foo' => 'bar'), array('foo' => 'bar'))), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); + $this->assertEquals(['foo' => [['foo' => 'bar'], ['foo' => 'bar']]], XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); } public function testExtensions() @@ -437,7 +437,7 @@ class XmlFileLoaderTest extends TestCase $this->fail('->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); - $this->assertRegExp(sprintf('#^Unable to parse file ".+%s".$#', 'services3.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); + $this->assertRegExp(sprintf('#^Unable to parse file ".+%s": .+.$#', 'services3.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); $e = $e->getPrevious(); $this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); @@ -477,7 +477,7 @@ class XmlFileLoaderTest extends TestCase $this->fail('->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); - $this->assertRegExp(sprintf('#^Unable to parse file ".+%s".$#', 'services7.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); + $this->assertRegExp(sprintf('#^Unable to parse file ".+%s": .+.$#', 'services7.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); $e = $e->getPrevious(); $this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); @@ -528,7 +528,7 @@ class XmlFileLoaderTest extends TestCase $this->fail('->load() throws an InvalidArgumentException if the configuration contains a document type'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration contains a document type'); - $this->assertRegExp(sprintf('#^Unable to parse file ".+%s".$#', 'withdoctype.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration contains a document type'); + $this->assertRegExp(sprintf('#^Unable to parse file ".+%s": .+.$#', 'withdoctype.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration contains a document type'); $e = $e->getPrevious(); $this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration contains a document type'); @@ -545,7 +545,7 @@ class XmlFileLoaderTest extends TestCase $this->assertArrayHasKey('foo', $services, '->load() parses elements'); $this->assertCount(1, $services['foo']->getTag('foo.tag'), '->load parses elements'); - $this->assertEquals(array(array('setBar', array('foo'))), $services['foo']->getMethodCalls(), '->load() parses the tag'); + $this->assertEquals([['setBar', ['foo']]], $services['foo']->getMethodCalls(), '->load() parses the tag'); } public function testLoadIndexedArguments() @@ -554,7 +554,7 @@ class XmlFileLoaderTest extends TestCase $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); $loader->load('services14.xml'); - $this->assertEquals(array('index_0' => 'app'), $container->findDefinition('logger')->getArguments()); + $this->assertEquals(['index_0' => 'app'], $container->findDefinition('logger')->getArguments()); } public function testLoadInlinedServices() @@ -600,7 +600,7 @@ class XmlFileLoaderTest extends TestCase $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); $loader->load('services22.xml'); - $this->assertEquals(array('Bar', 'Baz'), $container->getDefinition('foo')->getAutowiringTypes()); + $this->assertEquals(['Bar', 'Baz'], $container->getDefinition('foo')->getAutowiringTypes()); } public function testAutowire() @@ -630,7 +630,7 @@ class XmlFileLoaderTest extends TestCase $ids = array_keys($container->getDefinitions()); sort($ids); - $this->assertSame(array(Prototype\Foo::class, Prototype\Sub\Bar::class, 'service_container'), $ids); + $this->assertSame([Prototype\Foo::class, Prototype\Sub\Bar::class, 'service_container'], $ids); $resources = $container->getResources(); @@ -664,7 +664,7 @@ class XmlFileLoaderTest extends TestCase $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); $loader->load('with_key_outside_collection.xml'); - $this->assertSame(array('type' => 'foo', 'bar'), $container->getDefinition('foo')->getArguments()); + $this->assertSame(['type' => 'foo', 'bar'], $container->getDefinition('foo')->getArguments()); } public function testDefaults() @@ -674,7 +674,7 @@ class XmlFileLoaderTest extends TestCase $loader->load('services28.xml'); $this->assertFalse($container->getDefinition('with_defaults')->isPublic()); - $this->assertSame(array('foo' => array(array())), $container->getDefinition('with_defaults')->getTags()); + $this->assertSame(['foo' => [[]]], $container->getDefinition('with_defaults')->getTags()); $this->assertTrue($container->getDefinition('with_defaults')->isAutowired()); $this->assertArrayNotHasKey('public', $container->getDefinition('with_defaults')->getChanges()); $this->assertArrayNotHasKey('autowire', $container->getDefinition('with_defaults')->getChanges()); @@ -683,12 +683,12 @@ class XmlFileLoaderTest extends TestCase $this->assertTrue($container->getDefinition('no_defaults')->isPublic()); - $this->assertSame(array('foo' => array(array())), $container->getDefinition('no_defaults')->getTags()); + $this->assertSame(['foo' => [[]]], $container->getDefinition('no_defaults')->getTags()); $this->assertFalse($container->getDefinition('no_defaults')->isAutowired()); $this->assertTrue($container->getDefinition('child_def')->isPublic()); - $this->assertSame(array('foo' => array(array())), $container->getDefinition('child_def')->getTags()); + $this->assertSame(['foo' => [[]]], $container->getDefinition('child_def')->getTags()); $this->assertFalse($container->getDefinition('child_def')->isAutowired()); $definitions = $container->getDefinitions(); @@ -699,7 +699,7 @@ class XmlFileLoaderTest extends TestCase $this->assertSame('bar', key($definitions)); $this->assertTrue($anonymous->isPublic()); $this->assertTrue($anonymous->isAutowired()); - $this->assertSame(array('foo' => array(array())), $anonymous->getTags()); + $this->assertSame(['foo' => [[]]], $anonymous->getTags()); } public function testNamedArguments() @@ -708,12 +708,12 @@ class XmlFileLoaderTest extends TestCase $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); $loader->load('services_named_args.xml'); - $this->assertEquals(array('$apiKey' => 'ABCD', CaseSensitiveClass::class => null), $container->getDefinition(NamedArgumentsDummy::class)->getArguments()); + $this->assertEquals(['$apiKey' => 'ABCD', CaseSensitiveClass::class => null], $container->getDefinition(NamedArgumentsDummy::class)->getArguments()); $container->compile(); - $this->assertEquals(array(null, 'ABCD'), $container->getDefinition(NamedArgumentsDummy::class)->getArguments()); - $this->assertEquals(array(array('setApiKey', array('123'))), $container->getDefinition(NamedArgumentsDummy::class)->getMethodCalls()); + $this->assertEquals([null, 'ABCD'], $container->getDefinition(NamedArgumentsDummy::class)->getArguments()); + $this->assertEquals([['setApiKey', ['123']]], $container->getDefinition(NamedArgumentsDummy::class)->getMethodCalls()); } public function testInstanceof() @@ -726,7 +726,7 @@ class XmlFileLoaderTest extends TestCase $definition = $container->getDefinition(Bar::class); $this->assertTrue($definition->isAutowired()); $this->assertTrue($definition->isLazy()); - $this->assertSame(array('foo' => array(array()), 'bar' => array(array())), $definition->getTags()); + $this->assertSame(['foo' => [[]], 'bar' => [[]]], $definition->getTags()); } /** @@ -783,30 +783,30 @@ class XmlFileLoaderTest extends TestCase $container->compile(); $definition = $container->getDefinition('bar'); - $this->assertEquals(array( + $this->assertEquals([ 'NonExistent' => null, BarInterface::class => new Reference(Bar::class), - '$foo' => array(null), + '$foo' => [null], '$quz' => 'quz', '$factory' => 'factory', - ), array_map(function ($v) { return $v->getValues()[0]; }, $definition->getBindings())); - $this->assertEquals(array( + ], array_map(function ($v) { return $v->getValues()[0]; }, $definition->getBindings())); + $this->assertEquals([ 'quz', null, new Reference(Bar::class), - array(null), - ), $definition->getArguments()); + [null], + ], $definition->getArguments()); $definition = $container->getDefinition(Bar::class); - $this->assertEquals(array( + $this->assertEquals([ null, 'factory', - ), $definition->getArguments()); - $this->assertEquals(array( + ], $definition->getArguments()); + $this->assertEquals([ 'NonExistent' => null, '$quz' => 'quz', '$factory' => 'factory', - ), array_map(function ($v) { return $v->getValues()[0]; }, $definition->getBindings())); + ], array_map(function ($v) { return $v->getValues()[0]; }, $definition->getBindings())); } public function testTsantosContainer() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php index d8b329a5..7bcf0ec0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php @@ -83,17 +83,17 @@ class YamlFileLoaderTest extends TestCase public function provideInvalidFiles() { - return array( - array('bad_parameters'), - array('bad_imports'), - array('bad_import'), - array('bad_services'), - array('bad_service'), - array('bad_calls'), - array('bad_format'), - array('nonvalid1'), - array('nonvalid2'), - ); + return [ + ['bad_parameters'], + ['bad_imports'], + ['bad_import'], + ['bad_services'], + ['bad_service'], + ['bad_calls'], + ['bad_format'], + ['nonvalid1'], + ['nonvalid2'], + ]; } public function testLoadParameters() @@ -101,33 +101,33 @@ class YamlFileLoaderTest extends TestCase $container = new ContainerBuilder(); $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')); $loader->load('services2.yml'); - $this->assertEquals(array('foo' => 'bar', 'mixedcase' => array('MixedCaseKey' => 'value'), 'values' => array(true, false, 0, 1000.3, PHP_INT_MAX), 'bar' => 'foo', 'escape' => '@escapeme', 'foo_bar' => new Reference('foo_bar')), $container->getParameterBag()->all(), '->load() converts YAML keys to lowercase'); + $this->assertEquals(['foo' => 'bar', 'mixedcase' => ['MixedCaseKey' => 'value'], 'values' => [true, false, 0, 1000.3, PHP_INT_MAX], 'bar' => 'foo', 'escape' => '@escapeme', 'foo_bar' => new Reference('foo_bar')], $container->getParameterBag()->all(), '->load() converts YAML keys to lowercase'); } public function testLoadImports() { $container = new ContainerBuilder(); - $resolver = new LoaderResolver(array( + $resolver = new LoaderResolver([ new IniFileLoader($container, new FileLocator(self::$fixturesPath.'/ini')), new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')), new PhpFileLoader($container, new FileLocator(self::$fixturesPath.'/php')), $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')), - )); + ]); $loader->setResolver($resolver); $loader->load('services4.yml'); $actual = $container->getParameterBag()->all(); - $expected = array( + $expected = [ 'foo' => 'bar', - 'values' => array(true, false, PHP_INT_MAX), + 'values' => [true, false, PHP_INT_MAX], 'bar' => '%foo%', 'escape' => '@escapeme', 'foo_bar' => new Reference('foo_bar'), - 'mixedcase' => array('MixedCaseKey' => 'value'), + 'mixedcase' => ['MixedCaseKey' => 'value'], 'imported_from_ini' => true, 'imported_from_xml' => true, 'with_wrong_ext' => 'from yaml', - ); + ]; $this->assertEquals(array_keys($expected), array_keys($actual), '->load() imports and merges imported files'); $this->assertTrue($actual['imported_from_ini']); @@ -146,17 +146,17 @@ class YamlFileLoaderTest extends TestCase $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Definition', $services['foo'], '->load() converts service element to Definition instances'); $this->assertEquals('FooClass', $services['foo']->getClass(), '->load() parses the class attribute'); $this->assertEquals('%path%/foo.php', $services['file']->getFile(), '->load() parses the file tag'); - $this->assertEquals(array('foo', new Reference('foo'), array(true, false)), $services['arguments']->getArguments(), '->load() parses the argument tags'); + $this->assertEquals(['foo', new Reference('foo'), [true, false]], $services['arguments']->getArguments(), '->load() parses the argument tags'); $this->assertEquals('sc_configure', $services['configurator1']->getConfigurator(), '->load() parses the configurator tag'); - $this->assertEquals(array(new Reference('baz'), 'configure'), $services['configurator2']->getConfigurator(), '->load() parses the configurator tag'); - $this->assertEquals(array('BazClass', 'configureStatic'), $services['configurator3']->getConfigurator(), '->load() parses the configurator tag'); - $this->assertEquals(array(array('setBar', array()), array('setBar', array()), array('setBar', array(new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')))), $services['method_call1']->getMethodCalls(), '->load() parses the method_call tag'); - $this->assertEquals(array(array('setBar', array('foo', new Reference('foo'), array(true, false)))), $services['method_call2']->getMethodCalls(), '->load() parses the method_call tag'); + $this->assertEquals([new Reference('baz'), 'configure'], $services['configurator2']->getConfigurator(), '->load() parses the configurator tag'); + $this->assertEquals(['BazClass', 'configureStatic'], $services['configurator3']->getConfigurator(), '->load() parses the configurator tag'); + $this->assertEquals([['setBar', []], ['setBar', []], ['setBar', [new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')]]], $services['method_call1']->getMethodCalls(), '->load() parses the method_call tag'); + $this->assertEquals([['setBar', ['foo', new Reference('foo'), [true, false]]]], $services['method_call2']->getMethodCalls(), '->load() parses the method_call tag'); $this->assertEquals('factory', $services['new_factory1']->getFactory(), '->load() parses the factory tag'); - $this->assertEquals(array(new Reference('baz'), 'getClass'), $services['new_factory2']->getFactory(), '->load() parses the factory tag'); - $this->assertEquals(array('BazClass', 'getInstance'), $services['new_factory3']->getFactory(), '->load() parses the factory tag'); - $this->assertSame(array(null, 'getInstance'), $services['new_factory4']->getFactory(), '->load() accepts factory tag without class'); - $this->assertEquals(array('foo', new Reference('baz')), $services['Acme\WithShortCutArgs']->getArguments(), '->load() parses short service definition'); + $this->assertEquals([new Reference('baz'), 'getClass'], $services['new_factory2']->getFactory(), '->load() parses the factory tag'); + $this->assertEquals(['BazClass', 'getInstance'], $services['new_factory3']->getFactory(), '->load() parses the factory tag'); + $this->assertSame([null, 'getInstance'], $services['new_factory4']->getFactory(), '->load() accepts factory tag without class'); + $this->assertEquals(['foo', new Reference('baz')], $services['Acme\WithShortCutArgs']->getArguments(), '->load() parses short service definition'); $aliases = $container->getAliases(); $this->assertArrayHasKey('alias_for_foo', $aliases, '->load() parses aliases'); @@ -169,9 +169,9 @@ class YamlFileLoaderTest extends TestCase $this->assertEquals('foo', (string) $aliases['another_third_alias_for_foo']); $this->assertTrue($aliases['another_third_alias_for_foo']->isPublic()); - $this->assertEquals(array('decorated', null, 0), $services['decorator_service']->getDecoratedService()); - $this->assertEquals(array('decorated', 'decorated.pif-pouf', 0), $services['decorator_service_with_name']->getDecoratedService()); - $this->assertEquals(array('decorated', 'decorated.pif-pouf', 5), $services['decorator_service_with_name_and_priority']->getDecoratedService()); + $this->assertEquals(['decorated', null, 0], $services['decorator_service']->getDecoratedService()); + $this->assertEquals(['decorated', 'decorated.pif-pouf', 0], $services['decorator_service_with_name']->getDecoratedService()); + $this->assertEquals(['decorated', 'decorated.pif-pouf', 5], $services['decorator_service_with_name_and_priority']->getDecoratedService()); } public function testLoadFactoryShortSyntax() @@ -181,8 +181,8 @@ class YamlFileLoaderTest extends TestCase $loader->load('services14.yml'); $services = $container->getDefinitions(); - $this->assertEquals(array(new Reference('baz'), 'getClass'), $services['factory']->getFactory(), '->load() parses the factory tag with service:method'); - $this->assertEquals(array('FooBacFactory', 'createFooBar'), $services['factory_with_static_call']->getFactory(), '->load() parses the factory tag with Class::method'); + $this->assertEquals([new Reference('baz'), 'getClass'], $services['factory']->getFactory(), '->load() parses the factory tag with service:method'); + $this->assertEquals(['FooBacFactory', 'createFooBar'], $services['factory_with_static_call']->getFactory(), '->load() parses the factory tag with Class::method'); } public function testLoadConfiguratorShortSyntax() @@ -192,8 +192,8 @@ class YamlFileLoaderTest extends TestCase $loader->load('services_configurator_short_syntax.yml'); $services = $container->getDefinitions(); - $this->assertEquals(array(new Reference('foo_bar_configurator'), 'configure'), $services['foo_bar']->getConfigurator(), '->load() parses the configurator tag with service:method'); - $this->assertEquals(array('FooBarConfigurator', 'configureFooBar'), $services['foo_bar_with_static_call']->getConfigurator(), '->load() parses the configurator tag with Class::method'); + $this->assertEquals([new Reference('foo_bar_configurator'), 'configure'], $services['foo_bar']->getConfigurator(), '->load() parses the configurator tag with service:method'); + $this->assertEquals(['FooBarConfigurator', 'configureFooBar'], $services['foo_bar_with_static_call']->getConfigurator(), '->load() parses the configurator tag with Class::method'); } public function testExtensions() @@ -229,7 +229,7 @@ class YamlFileLoaderTest extends TestCase $loader->load('null_config.yml'); $container->compile(); - $this->assertSame(array(null), $container->getParameter('project.configs')); + $this->assertSame([null], $container->getParameter('project.configs')); } public function testSupports() @@ -295,9 +295,9 @@ class YamlFileLoaderTest extends TestCase $loader->load('services21.yml'); $definition = $container->getDefinition('manager'); - $this->assertEquals(array(array('setLogger', array(new Reference('logger'))), array('setClass', array('User'))), $definition->getMethodCalls()); - $this->assertEquals(array(true), $definition->getArguments()); - $this->assertEquals(array('manager' => array(array('alias' => 'user'))), $definition->getTags()); + $this->assertEquals([['setLogger', [new Reference('logger')]], ['setClass', ['User']]], $definition->getMethodCalls()); + $this->assertEquals([true], $definition->getArguments()); + $this->assertEquals(['manager' => [['alias' => 'user']]], $definition->getTags()); } /** @@ -347,8 +347,8 @@ class YamlFileLoaderTest extends TestCase $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')); $loader->load('services22.yml'); - $this->assertEquals(array('Foo', 'Bar'), $container->getDefinition('foo_service')->getAutowiringTypes()); - $this->assertEquals(array('Foo'), $container->getDefinition('baz_service')->getAutowiringTypes()); + $this->assertEquals(['Foo', 'Bar'], $container->getDefinition('foo_service')->getAutowiringTypes()); + $this->assertEquals(['Foo'], $container->getDefinition('baz_service')->getAutowiringTypes()); } public function testParsesIteratorArgument() @@ -359,7 +359,7 @@ class YamlFileLoaderTest extends TestCase $lazyDefinition = $container->getDefinition('lazy_context'); - $this->assertEquals(array(new IteratorArgument(array('k1' => new Reference('foo.baz'), 'k2' => new Reference('service_container'))), new IteratorArgument(array())), $lazyDefinition->getArguments(), '->load() parses lazy arguments'); + $this->assertEquals([new IteratorArgument(['k1' => new Reference('foo.baz'), 'k2' => new Reference('service_container')]), new IteratorArgument([])], $lazyDefinition->getArguments(), '->load() parses lazy arguments'); } public function testAutowire() @@ -389,7 +389,7 @@ class YamlFileLoaderTest extends TestCase $ids = array_keys($container->getDefinitions()); sort($ids); - $this->assertSame(array(Prototype\Foo::class, Prototype\Sub\Bar::class, 'service_container'), $ids); + $this->assertSame([Prototype\Foo::class, Prototype\Sub\Bar::class, 'service_container'], $ids); $resources = $container->getResources(); @@ -410,13 +410,13 @@ class YamlFileLoaderTest extends TestCase $ids = array_keys($container->getDefinitions()); sort($ids); - $this->assertSame(array( + $this->assertSame([ Prototype\OtherDir\Component1\Dir1\Service1::class, Prototype\OtherDir\Component1\Dir2\Service2::class, Prototype\OtherDir\Component2\Dir1\Service4::class, Prototype\OtherDir\Component2\Dir2\Service5::class, 'service_container', - ), $ids); + ], $ids); $this->assertTrue($container->getDefinition(Prototype\OtherDir\Component1\Dir1\Service1::class)->hasTag('foo')); $this->assertTrue($container->getDefinition(Prototype\OtherDir\Component2\Dir1\Service4::class)->hasTag('foo')); @@ -447,7 +447,7 @@ class YamlFileLoaderTest extends TestCase $loader->load('services28.yml'); $this->assertFalse($container->getDefinition('with_defaults')->isPublic()); - $this->assertSame(array('foo' => array(array())), $container->getDefinition('with_defaults')->getTags()); + $this->assertSame(['foo' => [[]]], $container->getDefinition('with_defaults')->getTags()); $this->assertTrue($container->getDefinition('with_defaults')->isAutowired()); $this->assertArrayNotHasKey('public', $container->getDefinition('with_defaults')->getChanges()); $this->assertArrayNotHasKey('autowire', $container->getDefinition('with_defaults')->getChanges()); @@ -456,7 +456,7 @@ class YamlFileLoaderTest extends TestCase $this->assertFalse($container->getAlias('with_defaults_aliased_short')->isPublic()); $this->assertFalse($container->getDefinition('Acme\WithShortCutArgs')->isPublic()); - $this->assertSame(array('foo' => array(array())), $container->getDefinition('Acme\WithShortCutArgs')->getTags()); + $this->assertSame(['foo' => [[]]], $container->getDefinition('Acme\WithShortCutArgs')->getTags()); $this->assertTrue($container->getDefinition('Acme\WithShortCutArgs')->isAutowired()); $container->compile(); @@ -465,14 +465,14 @@ class YamlFileLoaderTest extends TestCase $this->assertTrue($container->getDefinition('no_defaults')->isPublic()); // foo tag is inherited from defaults - $this->assertSame(array('foo' => array(array())), $container->getDefinition('with_null')->getTags()); - $this->assertSame(array('foo' => array(array())), $container->getDefinition('no_defaults')->getTags()); + $this->assertSame(['foo' => [[]]], $container->getDefinition('with_null')->getTags()); + $this->assertSame(['foo' => [[]]], $container->getDefinition('no_defaults')->getTags()); $this->assertTrue($container->getDefinition('with_null')->isAutowired()); $this->assertFalse($container->getDefinition('no_defaults')->isAutowired()); $this->assertTrue($container->getDefinition('child_def')->isPublic()); - $this->assertSame(array('foo' => array(array())), $container->getDefinition('child_def')->getTags()); + $this->assertSame(['foo' => [[]]], $container->getDefinition('child_def')->getTags()); $this->assertFalse($container->getDefinition('child_def')->isAutowired()); } @@ -482,14 +482,14 @@ class YamlFileLoaderTest extends TestCase $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')); $loader->load('services_named_args.yml'); - $this->assertEquals(array(null, '$apiKey' => 'ABCD'), $container->getDefinition(NamedArgumentsDummy::class)->getArguments()); - $this->assertEquals(array('$apiKey' => 'ABCD', CaseSensitiveClass::class => null), $container->getDefinition('another_one')->getArguments()); + $this->assertEquals([null, '$apiKey' => 'ABCD'], $container->getDefinition(NamedArgumentsDummy::class)->getArguments()); + $this->assertEquals(['$apiKey' => 'ABCD', CaseSensitiveClass::class => null], $container->getDefinition('another_one')->getArguments()); $container->compile(); - $this->assertEquals(array(null, 'ABCD'), $container->getDefinition(NamedArgumentsDummy::class)->getArguments()); - $this->assertEquals(array(null, 'ABCD'), $container->getDefinition('another_one')->getArguments()); - $this->assertEquals(array(array('setApiKey', array('123'))), $container->getDefinition('another_one')->getMethodCalls()); + $this->assertEquals([null, 'ABCD'], $container->getDefinition(NamedArgumentsDummy::class)->getArguments()); + $this->assertEquals([null, 'ABCD'], $container->getDefinition('another_one')->getArguments()); + $this->assertEquals([['setApiKey', ['123']]], $container->getDefinition('another_one')->getMethodCalls()); } public function testInstanceof() @@ -502,7 +502,7 @@ class YamlFileLoaderTest extends TestCase $definition = $container->getDefinition(Bar::class); $this->assertTrue($definition->isAutowired()); $this->assertTrue($definition->isLazy()); - $this->assertSame(array('foo' => array(array()), 'bar' => array(array())), $definition->getTags()); + $this->assertSame(['foo' => [[]], 'bar' => [[]]], $definition->getTags()); } /** @@ -707,29 +707,29 @@ class YamlFileLoaderTest extends TestCase $container->compile(); $definition = $container->getDefinition('bar'); - $this->assertEquals(array( + $this->assertEquals([ 'NonExistent' => null, BarInterface::class => new Reference(Bar::class), - '$foo' => array(null), + '$foo' => [null], '$quz' => 'quz', '$factory' => 'factory', - ), array_map(function ($v) { return $v->getValues()[0]; }, $definition->getBindings())); - $this->assertEquals(array( + ], array_map(function ($v) { return $v->getValues()[0]; }, $definition->getBindings())); + $this->assertEquals([ 'quz', null, new Reference(Bar::class), - array(null), - ), $definition->getArguments()); + [null], + ], $definition->getArguments()); $definition = $container->getDefinition(Bar::class); - $this->assertEquals(array( + $this->assertEquals([ null, 'factory', - ), $definition->getArguments()); - $this->assertEquals(array( + ], $definition->getArguments()); + $this->assertEquals([ 'NonExistent' => null, '$quz' => 'quz', '$factory' => 'factory', - ), array_map(function ($v) { return $v->getValues()[0]; }, $definition->getBindings())); + ], array_map(function ($v) { return $v->getValues()[0]; }, $definition->getBindings())); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/EnvPlaceholderParameterBagTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/EnvPlaceholderParameterBagTest.php index 9abfb45d..e7c88d2b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/EnvPlaceholderParameterBagTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/EnvPlaceholderParameterBagTest.php @@ -137,7 +137,7 @@ class EnvPlaceholderParameterBagTest extends TestCase { $bag = new EnvPlaceholderParameterBag(); $bag->get('env(ARRAY_VAR)'); - $bag->set('env(ARRAY_VAR)', array()); + $bag->set('env(ARRAY_VAR)', []); $bag->resolve(); } @@ -158,7 +158,7 @@ class EnvPlaceholderParameterBagTest extends TestCase public function testGetThrowsOnBadDefaultValue() { $bag = new EnvPlaceholderParameterBag(); - $bag->set('env(ARRAY_VAR)', array()); + $bag->set('env(ARRAY_VAR)', []); $bag->get('env(ARRAY_VAR)'); $bag->resolve(); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/FrozenParameterBagTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/FrozenParameterBagTest.php index ef9a66f6..b168e0c2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/FrozenParameterBagTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/FrozenParameterBagTest.php @@ -18,10 +18,10 @@ class FrozenParameterBagTest extends TestCase { public function testConstructor() { - $parameters = array( + $parameters = [ 'foo' => 'foo', 'bar' => 'bar', - ); + ]; $bag = new FrozenParameterBag($parameters); $this->assertEquals($parameters, $bag->all(), '__construct() takes an array of parameters as its first argument'); } @@ -31,7 +31,7 @@ class FrozenParameterBagTest extends TestCase */ public function testClear() { - $bag = new FrozenParameterBag(array()); + $bag = new FrozenParameterBag([]); $bag->clear(); } @@ -40,7 +40,7 @@ class FrozenParameterBagTest extends TestCase */ public function testSet() { - $bag = new FrozenParameterBag(array()); + $bag = new FrozenParameterBag([]); $bag->set('foo', 'bar'); } @@ -49,8 +49,8 @@ class FrozenParameterBagTest extends TestCase */ public function testAdd() { - $bag = new FrozenParameterBag(array()); - $bag->add(array()); + $bag = new FrozenParameterBag([]); + $bag->add([]); } /** @@ -58,7 +58,7 @@ class FrozenParameterBagTest extends TestCase */ public function testRemove() { - $bag = new FrozenParameterBag(array('foo' => 'bar')); + $bag = new FrozenParameterBag(['foo' => 'bar']); $bag->remove('foo'); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php index a04cc15c..e67e393d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php @@ -21,36 +21,36 @@ class ParameterBagTest extends TestCase { public function testConstructor() { - $bag = new ParameterBag($parameters = array( + $bag = new ParameterBag($parameters = [ 'foo' => 'foo', 'bar' => 'bar', - )); + ]); $this->assertEquals($parameters, $bag->all(), '__construct() takes an array of parameters as its first argument'); } public function testClear() { - $bag = new ParameterBag($parameters = array( + $bag = new ParameterBag($parameters = [ 'foo' => 'foo', 'bar' => 'bar', - )); + ]); $bag->clear(); - $this->assertEquals(array(), $bag->all(), '->clear() removes all parameters'); + $this->assertEquals([], $bag->all(), '->clear() removes all parameters'); } public function testRemove() { - $bag = new ParameterBag(array( + $bag = new ParameterBag([ 'foo' => 'foo', 'bar' => 'bar', - )); + ]); $bag->remove('foo'); - $this->assertEquals(array('bar' => 'bar'), $bag->all(), '->remove() removes a parameter'); + $this->assertEquals(['bar' => 'bar'], $bag->all(), '->remove() removes a parameter'); } public function testGetSet() { - $bag = new ParameterBag(array('foo' => 'bar')); + $bag = new ParameterBag(['foo' => 'bar']); $bag->set('bar', 'foo'); $this->assertEquals('foo', $bag->get('bar'), '->set() sets the value of a new parameter'); @@ -71,12 +71,12 @@ class ParameterBagTest extends TestCase */ public function testGetThrowParameterNotFoundException($parameterKey, $exceptionMessage) { - $bag = new ParameterBag(array( + $bag = new ParameterBag([ 'foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz', - 'fiz' => array('bar' => array('boo' => 12)), - )); + 'fiz' => ['bar' => ['boo' => 12]], + ]); if (method_exists($this, 'expectException')) { $this->expectException(ParameterNotFoundException::class); @@ -90,18 +90,18 @@ class ParameterBagTest extends TestCase public function provideGetThrowParameterNotFoundExceptionData() { - return array( - array('foo1', 'You have requested a non-existent parameter "foo1". Did you mean this: "foo"?'), - array('bag', 'You have requested a non-existent parameter "bag". Did you mean one of these: "bar", "baz"?'), - array('', 'You have requested a non-existent parameter "".'), + return [ + ['foo1', 'You have requested a non-existent parameter "foo1". Did you mean this: "foo"?'], + ['bag', 'You have requested a non-existent parameter "bag". Did you mean one of these: "bar", "baz"?'], + ['', 'You have requested a non-existent parameter "".'], - array('fiz.bar.boo', 'You have requested a non-existent parameter "fiz.bar.boo". You cannot access nested array items, do you want to inject "fiz" instead?'), - ); + ['fiz.bar.boo', 'You have requested a non-existent parameter "fiz.bar.boo". You cannot access nested array items, do you want to inject "fiz" instead?'], + ]; } public function testHas() { - $bag = new ParameterBag(array('foo' => 'bar')); + $bag = new ParameterBag(['foo' => 'bar']); $this->assertTrue($bag->has('foo'), '->has() returns true if a parameter is defined'); $this->assertFalse($bag->has('bar'), '->has() returns false if a parameter is not defined'); } @@ -115,13 +115,13 @@ class ParameterBagTest extends TestCase */ public function testMixedCase() { - $bag = new ParameterBag(array( + $bag = new ParameterBag([ 'foo' => 'foo', 'bar' => 'bar', - )); + ]); $bag->remove('BAR'); - $this->assertEquals(array('foo' => 'foo'), $bag->all(), '->remove() converts key to lowercase before removing'); + $this->assertEquals(['foo' => 'foo'], $bag->all(), '->remove() converts key to lowercase before removing'); $bag->set('Foo', 'baz1'); $this->assertEquals('baz1', $bag->get('foo'), '->set() converts the key to lowercase'); @@ -132,29 +132,29 @@ class ParameterBagTest extends TestCase public function testResolveValue() { - $bag = new ParameterBag(array()); + $bag = new ParameterBag([]); $this->assertEquals('foo', $bag->resolveValue('foo'), '->resolveValue() returns its argument unmodified if no placeholders are found'); - $bag = new ParameterBag(array('foo' => 'bar')); + $bag = new ParameterBag(['foo' => 'bar']); $this->assertEquals('I\'m a bar', $bag->resolveValue('I\'m a %foo%'), '->resolveValue() replaces placeholders by their values'); - $this->assertEquals(array('bar' => 'bar'), $bag->resolveValue(array('%foo%' => '%foo%')), '->resolveValue() replaces placeholders in keys and values of arrays'); - $this->assertEquals(array('bar' => array('bar' => array('bar' => 'bar'))), $bag->resolveValue(array('%foo%' => array('%foo%' => array('%foo%' => '%foo%')))), '->resolveValue() replaces placeholders in nested arrays'); + $this->assertEquals(['bar' => 'bar'], $bag->resolveValue(['%foo%' => '%foo%']), '->resolveValue() replaces placeholders in keys and values of arrays'); + $this->assertEquals(['bar' => ['bar' => ['bar' => 'bar']]], $bag->resolveValue(['%foo%' => ['%foo%' => ['%foo%' => '%foo%']]]), '->resolveValue() replaces placeholders in nested arrays'); $this->assertEquals('I\'m a %%foo%%', $bag->resolveValue('I\'m a %%foo%%'), '->resolveValue() supports % escaping by doubling it'); $this->assertEquals('I\'m a bar %%foo bar', $bag->resolveValue('I\'m a %foo% %%foo %foo%'), '->resolveValue() supports % escaping by doubling it'); - $this->assertEquals(array('foo' => array('bar' => array('ding' => 'I\'m a bar %%foo %%bar'))), $bag->resolveValue(array('foo' => array('bar' => array('ding' => 'I\'m a bar %%foo %%bar')))), '->resolveValue() supports % escaping by doubling it'); + $this->assertEquals(['foo' => ['bar' => ['ding' => 'I\'m a bar %%foo %%bar']]], $bag->resolveValue(['foo' => ['bar' => ['ding' => 'I\'m a bar %%foo %%bar']]]), '->resolveValue() supports % escaping by doubling it'); - $bag = new ParameterBag(array('foo' => true)); + $bag = new ParameterBag(['foo' => true]); $this->assertTrue($bag->resolveValue('%foo%'), '->resolveValue() replaces arguments that are just a placeholder by their value without casting them to strings'); - $bag = new ParameterBag(array('foo' => null)); + $bag = new ParameterBag(['foo' => null]); $this->assertNull($bag->resolveValue('%foo%'), '->resolveValue() replaces arguments that are just a placeholder by their value without casting them to strings'); - $bag = new ParameterBag(array('foo' => 'bar', 'baz' => '%%%foo% %foo%%% %%foo%% %%%foo%%%')); + $bag = new ParameterBag(['foo' => 'bar', 'baz' => '%%%foo% %foo%%% %%foo%% %%%foo%%%']); $this->assertEquals('%%bar bar%% %%foo%% %%bar%%', $bag->resolveValue('%baz%'), '->resolveValue() replaces params placed besides escaped %'); - $bag = new ParameterBag(array('baz' => '%%s?%%s')); + $bag = new ParameterBag(['baz' => '%%s?%%s']); $this->assertEquals('%%s?%%s', $bag->resolveValue('%baz%'), '->resolveValue() is not replacing greedily'); - $bag = new ParameterBag(array()); + $bag = new ParameterBag([]); try { $bag->resolveValue('%foobar%'); $this->fail('->resolveValue() throws an InvalidArgumentException if a placeholder references a non-existent parameter'); @@ -169,7 +169,7 @@ class ParameterBagTest extends TestCase $this->assertEquals('You have requested a non-existent parameter "foobar".', $e->getMessage(), '->resolveValue() throws a ParameterNotFoundException if a placeholder references a non-existent parameter'); } - $bag = new ParameterBag(array('foo' => 'a %bar%', 'bar' => array())); + $bag = new ParameterBag(['foo' => 'a %bar%', 'bar' => []]); try { $bag->resolveValue('%foo%'); $this->fail('->resolveValue() throws a RuntimeException when a parameter embeds another non-string parameter'); @@ -177,7 +177,7 @@ class ParameterBagTest extends TestCase $this->assertEquals('A string value must be composed of strings and/or numbers, but found parameter "bar" of type array inside string value "a %bar%".', $e->getMessage(), '->resolveValue() throws a RuntimeException when a parameter embeds another non-string parameter'); } - $bag = new ParameterBag(array('foo' => '%bar%', 'bar' => '%foobar%', 'foobar' => '%foo%')); + $bag = new ParameterBag(['foo' => '%bar%', 'bar' => '%foobar%', 'foobar' => '%foo%']); try { $bag->resolveValue('%foo%'); $this->fail('->resolveValue() throws a ParameterCircularReferenceException when a parameter has a circular reference'); @@ -185,7 +185,7 @@ class ParameterBagTest extends TestCase $this->assertEquals('Circular reference detected for parameter "foo" ("foo" > "bar" > "foobar" > "foo").', $e->getMessage(), '->resolveValue() throws a ParameterCircularReferenceException when a parameter has a circular reference'); } - $bag = new ParameterBag(array('foo' => 'a %bar%', 'bar' => 'a %foobar%', 'foobar' => 'a %foo%')); + $bag = new ParameterBag(['foo' => 'a %bar%', 'bar' => 'a %foobar%', 'foobar' => 'a %foo%']); try { $bag->resolveValue('%foo%'); $this->fail('->resolveValue() throws a ParameterCircularReferenceException when a parameter has a circular reference'); @@ -193,13 +193,13 @@ class ParameterBagTest extends TestCase $this->assertEquals('Circular reference detected for parameter "foo" ("foo" > "bar" > "foobar" > "foo").', $e->getMessage(), '->resolveValue() throws a ParameterCircularReferenceException when a parameter has a circular reference'); } - $bag = new ParameterBag(array('host' => 'foo.bar', 'port' => 1337)); + $bag = new ParameterBag(['host' => 'foo.bar', 'port' => 1337]); $this->assertEquals('foo.bar:1337', $bag->resolveValue('%host%:%port%')); } public function testResolveIndicatesWhyAParameterIsNeeded() { - $bag = new ParameterBag(array('foo' => '%bar%')); + $bag = new ParameterBag(['foo' => '%bar%']); try { $bag->resolve(); @@ -207,7 +207,7 @@ class ParameterBagTest extends TestCase $this->assertEquals('The parameter "foo" has a dependency on a non-existent parameter "bar".', $e->getMessage()); } - $bag = new ParameterBag(array('foo' => '%bar%')); + $bag = new ParameterBag(['foo' => '%bar%']); try { $bag->resolve(); @@ -218,28 +218,28 @@ class ParameterBagTest extends TestCase public function testResolveUnescapesValue() { - $bag = new ParameterBag(array( - 'foo' => array('bar' => array('ding' => 'I\'m a bar %%foo %%bar')), + $bag = new ParameterBag([ + 'foo' => ['bar' => ['ding' => 'I\'m a bar %%foo %%bar']], 'bar' => 'I\'m a %%foo%%', - )); + ]); $bag->resolve(); $this->assertEquals('I\'m a %foo%', $bag->get('bar'), '->resolveValue() supports % escaping by doubling it'); - $this->assertEquals(array('bar' => array('ding' => 'I\'m a bar %foo %bar')), $bag->get('foo'), '->resolveValue() supports % escaping by doubling it'); + $this->assertEquals(['bar' => ['ding' => 'I\'m a bar %foo %bar']], $bag->get('foo'), '->resolveValue() supports % escaping by doubling it'); } public function testEscapeValue() { $bag = new ParameterBag(); - $bag->add(array( - 'foo' => $bag->escapeValue(array('bar' => array('ding' => 'I\'m a bar %foo %bar', 'zero' => null))), + $bag->add([ + 'foo' => $bag->escapeValue(['bar' => ['ding' => 'I\'m a bar %foo %bar', 'zero' => null]]), 'bar' => $bag->escapeValue('I\'m a %foo%'), - )); + ]); $this->assertEquals('I\'m a %%foo%%', $bag->get('bar'), '->escapeValue() escapes % by doubling it'); - $this->assertEquals(array('bar' => array('ding' => 'I\'m a bar %%foo %%bar', 'zero' => null)), $bag->get('foo'), '->escapeValue() escapes % by doubling it'); + $this->assertEquals(['bar' => ['ding' => 'I\'m a bar %%foo %%bar', 'zero' => null]], $bag->get('foo'), '->escapeValue() escapes % by doubling it'); } /** @@ -247,7 +247,7 @@ class ParameterBagTest extends TestCase */ public function testResolveStringWithSpacesReturnsString($expected, $test, $description) { - $bag = new ParameterBag(array('foo' => 'bar')); + $bag = new ParameterBag(['foo' => 'bar']); try { $this->assertEquals($expected, $bag->resolveString($test), $description); @@ -258,11 +258,11 @@ class ParameterBagTest extends TestCase public function stringsWithSpacesProvider() { - return array( - array('bar', '%foo%', 'Parameters must be wrapped by %.'), - array('% foo %', '% foo %', 'Parameters should not have spaces.'), - array('{% set my_template = "foo" %}', '{% set my_template = "foo" %}', 'Twig-like strings are not parameters.'), - array('50% is less than 100%', '50% is less than 100%', 'Text between % signs is allowed, if there are spaces.'), - ); + return [ + ['bar', '%foo%', 'Parameters must be wrapped by %.'], + ['% foo %', '% foo %', 'Parameters should not have spaces.'], + ['{% set my_template = "foo" %}', '{% set my_template = "foo" %}', 'Twig-like strings are not parameters.'], + ['50% is less than 100%', '50% is less than 100%', 'Text between % signs is allowed, if there are spaces.'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ServiceLocatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ServiceLocatorTest.php index 56fac643..aa9ebab6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ServiceLocatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ServiceLocatorTest.php @@ -20,11 +20,11 @@ class ServiceLocatorTest extends TestCase { public function testHas() { - $locator = new ServiceLocator(array( + $locator = new ServiceLocator([ 'foo' => function () { return 'bar'; }, 'bar' => function () { return 'baz'; }, function () { return 'dummy'; }, - )); + ]); $this->assertTrue($locator->has('foo')); $this->assertTrue($locator->has('bar')); @@ -33,10 +33,10 @@ class ServiceLocatorTest extends TestCase public function testGet() { - $locator = new ServiceLocator(array( + $locator = new ServiceLocator([ 'foo' => function () { return 'bar'; }, 'bar' => function () { return 'baz'; }, - )); + ]); $this->assertSame('bar', $locator->get('foo')); $this->assertSame('baz', $locator->get('bar')); @@ -45,13 +45,13 @@ class ServiceLocatorTest extends TestCase public function testGetDoesNotMemoize() { $i = 0; - $locator = new ServiceLocator(array( + $locator = new ServiceLocator([ 'foo' => function () use (&$i) { ++$i; return 'bar'; }, - )); + ]); $this->assertSame('bar', $locator->get('foo')); $this->assertSame('bar', $locator->get('foo')); @@ -64,10 +64,10 @@ class ServiceLocatorTest extends TestCase */ public function testGetThrowsOnUndefinedService() { - $locator = new ServiceLocator(array( + $locator = new ServiceLocator([ 'foo' => function () { return 'bar'; }, 'bar' => function () { return 'baz'; }, - )); + ]); $locator->get('dummy'); } @@ -78,9 +78,9 @@ class ServiceLocatorTest extends TestCase */ public function testThrowsOnUndefinedInternalService() { - $locator = new ServiceLocator(array( + $locator = new ServiceLocator([ 'foo' => function () use (&$locator) { return $locator->get('bar'); }, - )); + ]); $locator->get('foo'); } @@ -91,11 +91,11 @@ class ServiceLocatorTest extends TestCase */ public function testThrowsOnCircularReference() { - $locator = new ServiceLocator(array( + $locator = new ServiceLocator([ 'foo' => function () use (&$locator) { return $locator->get('bar'); }, 'bar' => function () use (&$locator) { return $locator->get('baz'); }, 'baz' => function () use (&$locator) { return $locator->get('bar'); }, - )); + ]); $locator->get('foo'); } @@ -109,18 +109,32 @@ class ServiceLocatorTest extends TestCase $container = new Container(); $container->set('foo', new \stdClass()); $subscriber = new SomeServiceSubscriber(); - $subscriber->container = new ServiceLocator(array('bar' => function () {})); + $subscriber->container = new ServiceLocator(['bar' => function () {}]); $subscriber->container = $subscriber->container->withContext('caller', $container); $subscriber->getFoo(); } + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException + * @expectedExceptionMessage Service "foo" not found: even though it exists in the app's container, the container inside "foo" is a smaller service locator that is empty... Try using dependency injection instead. + */ + public function testGetThrowsServiceNotFoundException() + { + $container = new Container(); + $container->set('foo', new \stdClass()); + + $locator = new ServiceLocator([]); + $locator = $locator->withContext('foo', $container); + $locator->get('foo'); + } + public function testInvoke() { - $locator = new ServiceLocator(array( + $locator = new ServiceLocator([ 'foo' => function () { return 'bar'; }, 'bar' => function () { return 'baz'; }, - )); + ]); $this->assertSame('bar', $locator('foo')); $this->assertSame('baz', $locator('bar')); @@ -139,6 +153,6 @@ class SomeServiceSubscriber implements ServiceSubscriberinterface public static function getSubscribedServices() { - return array('bar' => 'stdClass'); + return ['bar' => 'stdClass']; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/AbstractUriElement.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/AbstractUriElement.php index 192d7922..7aba8612 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/AbstractUriElement.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/AbstractUriElement.php @@ -42,7 +42,7 @@ abstract class AbstractUriElement */ public function __construct(\DOMElement $node, $currentUri, $method = 'GET') { - if (!\in_array(strtolower(substr($currentUri, 0, 4)), array('http', 'file'))) { + if (!\in_array(strtolower(substr($currentUri, 0, 4)), ['http', 'file'])) { throw new \InvalidArgumentException(sprintf('Current URI must be an absolute URL ("%s").', $currentUri)); } @@ -144,7 +144,7 @@ abstract class AbstractUriElement $path .= '/'; } - $output = array(); + $output = []; foreach (explode('/', $path) as $segment) { if ('..' === $segment) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Crawler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Crawler.php index a3228d1b..68d7c3da 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Crawler.php @@ -30,7 +30,7 @@ class Crawler implements \Countable, \IteratorAggregate /** * @var array A map of manually registered namespaces */ - private $namespaces = array(); + private $namespaces = []; /** * @var string The base href value @@ -45,7 +45,7 @@ class Crawler implements \Countable, \IteratorAggregate /** * @var \DOMElement[] */ - private $nodes = array(); + private $nodes = []; /** * Whether the Crawler contains HTML or XML content (used when converting CSS to XPath). @@ -92,7 +92,7 @@ class Crawler implements \Countable, \IteratorAggregate */ public function clear() { - $this->nodes = array(); + $this->nodes = []; $this->document = null; } @@ -208,7 +208,7 @@ class Crawler implements \Countable, \IteratorAggregate $this->addDocument($dom); - $base = $this->filterRelativeXPath('descendant-or-self::base')->extract(array('href')); + $base = $this->filterRelativeXPath('descendant-or-self::base')->extract(['href']); $baseHref = current($base); if (\count($base) && !empty($baseHref)) { @@ -363,7 +363,7 @@ class Crawler implements \Countable, \IteratorAggregate */ public function each(\Closure $closure) { - $data = array(); + $data = []; foreach ($this->nodes as $i => $node) { $data[] = $closure($this->createSubCrawler($node), $i); } @@ -395,7 +395,7 @@ class Crawler implements \Countable, \IteratorAggregate */ public function reduce(\Closure $closure) { - $nodes = array(); + $nodes = []; foreach ($this->nodes as $i => $node) { if (false !== $closure($this->createSubCrawler($node), $i)) { $nodes[] = $node; @@ -487,7 +487,7 @@ class Crawler implements \Countable, \IteratorAggregate } $node = $this->getNode(0); - $nodes = array(); + $nodes = []; while ($node = $node->parentNode) { if (XML_ELEMENT_NODE === $node->nodeType) { @@ -513,7 +513,7 @@ class Crawler implements \Countable, \IteratorAggregate $node = $this->getNode(0)->firstChild; - return $this->createSubCrawler($node ? $this->sibling($node) : array()); + return $this->createSubCrawler($node ? $this->sibling($node) : []); } /** @@ -605,7 +605,7 @@ class Crawler implements \Countable, \IteratorAggregate throw new \LogicException('Cannot evaluate the expression on an uninitialized crawler.'); } - $data = array(); + $data = []; $domxpath = $this->createDOMXPath($this->document, $this->findNamespacePrefixes($xpath)); foreach ($this->nodes as $node) { @@ -626,7 +626,7 @@ class Crawler implements \Countable, \IteratorAggregate * * Example: * - * $crawler->filter('h1 a')->extract(array('_text', 'href')); + * $crawler->filter('h1 a')->extract(['_text', 'href']); * * @param array $attributes An array of attributes * @@ -637,9 +637,9 @@ class Crawler implements \Countable, \IteratorAggregate $attributes = (array) $attributes; $count = \count($attributes); - $data = array(); + $data = []; foreach ($this->nodes as $node) { - $elements = array(); + $elements = []; foreach ($attributes as $attribute) { if ('_text' === $attribute) { $elements[] = $node->nodeValue; @@ -780,7 +780,7 @@ class Crawler implements \Countable, \IteratorAggregate */ public function links() { - $links = array(); + $links = []; foreach ($this->nodes as $node) { if (!$node instanceof \DOMElement) { throw new \InvalidArgumentException(sprintf('The current node list should contain only DOMElement instances, "%s" found.', \get_class($node))); @@ -821,7 +821,7 @@ class Crawler implements \Countable, \IteratorAggregate */ public function images() { - $images = array(); + $images = []; foreach ($this as $node) { if (!$node instanceof \DOMElement) { throw new \InvalidArgumentException(sprintf('The current node list should contain only DOMElement instances, "%s" found.', \get_class($node))); @@ -915,7 +915,7 @@ class Crawler implements \Countable, \IteratorAggregate } $string = $s; - $parts = array(); + $parts = []; while (true) { if (false !== $pos = strpos($string, "'")) { $parts[] = sprintf("'%s'", substr($string, 0, $pos)); @@ -965,10 +965,10 @@ class Crawler implements \Countable, \IteratorAggregate */ private function relativize($xpath) { - $expressions = array(); + $expressions = []; // An expression which will never match to replace expressions which cannot match in the crawler - // We cannot simply drop + // We cannot drop $nonMatchingExpression = 'a[name() = "b"]'; $xpathLen = \strlen($xpath); @@ -1083,7 +1083,7 @@ class Crawler implements \Countable, \IteratorAggregate */ protected function sibling($node, $siblingDir = 'nextSibling') { - $nodes = array(); + $nodes = []; do { if ($node !== $this->getNode(0) && 1 === $node->nodeType) { @@ -1102,7 +1102,7 @@ class Crawler implements \Countable, \IteratorAggregate * * @throws \InvalidArgumentException */ - private function createDOMXPath(\DOMDocument $document, array $prefixes = array()) + private function createDOMXPath(\DOMDocument $document, array $prefixes = []) { $domxpath = new \DOMXPath($document); @@ -1149,7 +1149,7 @@ class Crawler implements \Countable, \IteratorAggregate return array_unique($matches['prefix']); } - return array(); + return []; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php index 6f112b53..91966287 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php @@ -45,7 +45,7 @@ class ChoiceFormField extends FormField public function hasValue() { // don't send a value for unchecked checkboxes - if (\in_array($this->type, array('checkbox', 'radio')) && null === $this->value) { + if (\in_array($this->type, ['checkbox', 'radio']) && null === $this->value) { return false; } @@ -211,7 +211,7 @@ class ChoiceFormField extends FormField } $this->value = null; - $this->options = array(); + $this->options = []; $this->multiple = false; if ('input' == $this->node->nodeName) { @@ -226,7 +226,7 @@ class ChoiceFormField extends FormField $this->type = 'select'; if ($this->node->hasAttribute('multiple')) { $this->multiple = true; - $this->value = array(); + $this->value = []; $this->name = str_replace('[]', '', $this->name); } @@ -261,7 +261,7 @@ class ChoiceFormField extends FormField */ private function buildOptionValue(\DOMElement $node) { - $option = array(); + $option = []; $defaultDefaultValue = 'select' === $this->node->nodeName ? '' : 'on'; $defaultValue = (isset($node->nodeValue) && !empty($node->nodeValue)) ? $node->nodeValue : $defaultDefaultValue; @@ -301,7 +301,7 @@ class ChoiceFormField extends FormField */ public function availableOptionValues() { - $values = array(); + $values = []; foreach ($this->options as $option) { $values[] = $option['value']; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/FileFormField.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/FileFormField.php index 3288fc13..9e21c9c4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/FileFormField.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/FileFormField.php @@ -27,12 +27,12 @@ class FileFormField extends FormField */ public function setErrorCode($error) { - $codes = array(UPLOAD_ERR_INI_SIZE, UPLOAD_ERR_FORM_SIZE, UPLOAD_ERR_PARTIAL, UPLOAD_ERR_NO_FILE, UPLOAD_ERR_NO_TMP_DIR, UPLOAD_ERR_CANT_WRITE, UPLOAD_ERR_EXTENSION); + $codes = [UPLOAD_ERR_INI_SIZE, UPLOAD_ERR_FORM_SIZE, UPLOAD_ERR_PARTIAL, UPLOAD_ERR_NO_FILE, UPLOAD_ERR_NO_TMP_DIR, UPLOAD_ERR_CANT_WRITE, UPLOAD_ERR_EXTENSION]; if (!\in_array($error, $codes)) { throw new \InvalidArgumentException(sprintf('The error code %s is not valid.', $error)); } - $this->value = array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => $error, 'size' => 0); + $this->value = ['name' => '', 'type' => '', 'tmp_name' => '', 'error' => $error, 'size' => 0]; } /** @@ -60,7 +60,7 @@ class FileFormField extends FormField // copy to a tmp location $tmp = sys_get_temp_dir().'/'.strtr(substr(base64_encode(hash('sha256', uniqid(mt_rand(), true), true)), 0, 7), '/', '_'); - if (array_key_exists('extension', $info)) { + if (\array_key_exists('extension', $info)) { $tmp .= '.'.$info['extension']; } if (is_file($tmp)) { @@ -75,7 +75,7 @@ class FileFormField extends FormField $value = ''; } - $this->value = array('name' => $name, 'type' => '', 'tmp_name' => $value, 'error' => $error, 'size' => $size); + $this->value = ['name' => $name, 'type' => '', 'tmp_name' => $value, 'error' => $error, 'size' => $size]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Form.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Form.php index 47d20a04..87ab3148 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Form.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Form.php @@ -87,7 +87,7 @@ class Form extends Link implements \ArrayAccess */ public function getValues() { - $values = array(); + $values = []; foreach ($this->fields->all() as $name => $field) { if ($field->isDisabled()) { continue; @@ -108,11 +108,11 @@ class Form extends Link implements \ArrayAccess */ public function getFiles() { - if (!\in_array($this->getMethod(), array('POST', 'PUT', 'DELETE', 'PATCH'))) { - return array(); + if (!\in_array($this->getMethod(), ['POST', 'PUT', 'DELETE', 'PATCH'])) { + return []; } - $files = array(); + $files = []; foreach ($this->fields->all() as $name => $field) { if ($field->isDisabled()) { @@ -137,13 +137,13 @@ class Form extends Link implements \ArrayAccess */ public function getPhpValues() { - $values = array(); + $values = []; foreach ($this->getValues() as $name => $value) { - $qs = http_build_query(array($name => $value), '', '&'); + $qs = http_build_query([$name => $value], '', '&'); if (!empty($qs)) { parse_str($qs, $expandedValue); $varName = substr($name, 0, \strlen(key($expandedValue))); - $values = array_replace_recursive($values, array($varName => current($expandedValue))); + $values = array_replace_recursive($values, [$varName => current($expandedValue)]); } } @@ -164,9 +164,9 @@ class Form extends Link implements \ArrayAccess */ public function getPhpFiles() { - $values = array(); + $values = []; foreach ($this->getFiles() as $name => $value) { - $qs = http_build_query(array($name => $value), '', '&'); + $qs = http_build_query([$name => $value], '', '&'); if (!empty($qs)) { parse_str($qs, $expandedValue); $varName = substr($name, 0, \strlen(key($expandedValue))); @@ -182,7 +182,7 @@ class Form extends Link implements \ArrayAccess reset($expandedValue); - $values = array_replace_recursive($values, array($varName => current($expandedValue))); + $values = array_replace_recursive($values, [$varName => current($expandedValue)]); } } @@ -202,9 +202,9 @@ class Form extends Link implements \ArrayAccess { $uri = parent::getUri(); - if (!\in_array($this->getMethod(), array('POST', 'PUT', 'DELETE', 'PATCH'))) { + if (!\in_array($this->getMethod(), ['POST', 'PUT', 'DELETE', 'PATCH'])) { $query = parse_url($uri, PHP_URL_QUERY); - $currentParameters = array(); + $currentParameters = []; if ($query) { parse_str($query, $currentParameters); } @@ -379,7 +379,7 @@ class Form extends Link implements \ArrayAccess protected function setNode(\DOMElement $node) { $this->button = $node; - if ('button' === $node->nodeName || ('input' === $node->nodeName && \in_array(strtolower($node->getAttribute('type')), array('submit', 'button', 'image')))) { + if ('button' === $node->nodeName || ('input' === $node->nodeName && \in_array(strtolower($node->getAttribute('type')), ['submit', 'button', 'image']))) { if ($node->hasAttribute('form')) { // if the node has the HTML5-compliant 'form' attribute, use it $formId = $node->getAttribute('form'); @@ -480,7 +480,7 @@ class Form extends Link implements \ArrayAccess } } elseif ('input' == $nodeName && 'file' == strtolower($node->getAttribute('type'))) { $this->set(new Field\FileFormField($node)); - } elseif ('input' == $nodeName && !\in_array(strtolower($node->getAttribute('type')), array('submit', 'button', 'image'))) { + } elseif ('input' == $nodeName && !\in_array(strtolower($node->getAttribute('type')), ['submit', 'button', 'image'])) { $this->set(new Field\InputFormField($node)); } elseif ('textarea' == $nodeName) { $this->set(new Field\TextareaFormField($node)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/FormFieldRegistry.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/FormFieldRegistry.php index 6398cc60..8f432cfb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/FormFieldRegistry.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/FormFieldRegistry.php @@ -20,7 +20,7 @@ use Symfony\Component\DomCrawler\Field\FormField; */ class FormFieldRegistry { - private $fields = array(); + private $fields = []; private $base; @@ -34,7 +34,7 @@ class FormFieldRegistry $target = &$this->fields; while ($segments) { if (!\is_array($target)) { - $target = array(); + $target = []; } $path = array_shift($segments); if ('' === $path) { @@ -57,7 +57,7 @@ class FormFieldRegistry $target = &$this->fields; while (\count($segments) > 1) { $path = array_shift($segments); - if (!array_key_exists($path, $target)) { + if (!\array_key_exists($path, $target)) { return; } $target = &$target[$path]; @@ -80,7 +80,7 @@ class FormFieldRegistry $target = &$this->fields; while ($segments) { $path = array_shift($segments); - if (!array_key_exists($path, $target)) { + if (!\array_key_exists($path, $target)) { throw new \InvalidArgumentException(sprintf('Unreachable field "%s"', $path)); } $target = &$target[$path]; @@ -133,7 +133,7 @@ class FormFieldRegistry /** * Returns the list of field with their value. * - * @return FormField[] The list of fields as array((string) Fully qualified name => (mixed) value) + * @return FormField[] The list of fields as [string] Fully qualified name => (mixed) value) */ public function all() { @@ -167,9 +167,9 @@ class FormFieldRegistry * @param string $base The name of the base field * @param array $output The initial values * - * @return array The list of fields as array((string) Fully qualified name => (mixed) value) + * @return array The list of fields as [string] Fully qualified name => (mixed) value) */ - private function walk(array $array, $base = '', array &$output = array()) + private function walk(array $array, $base = '', array &$output = []) { foreach ($array as $k => $v) { $path = empty($base) ? $k : sprintf('%s[%s]', $base, $k); @@ -186,7 +186,7 @@ class FormFieldRegistry /** * Splits a field name into segments as a web browser would do. * - * getSegments('base[foo][3][]') = array('base', 'foo, '3', ''); + * getSegments('base[foo][3][]') = ['base', 'foo, '3', '']; * * @param string $name The name of the field * @@ -195,7 +195,7 @@ class FormFieldRegistry private function getSegments($name) { if (preg_match('/^(?P[^[]+)(?P(\[.*)|$)/', $name, $m)) { - $segments = array($m['base']); + $segments = [$m['base']]; while (!empty($m['extra'])) { $extra = $m['extra']; if (preg_match('/^\[(?P.*?)\](?P.*)$/', $extra, $m)) { @@ -208,6 +208,6 @@ class FormFieldRegistry return $segments; } - return array($name); + return [$name]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php index 9b2d1241..1be69f06 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php @@ -52,7 +52,7 @@ class CrawlerTest extends TestCase $crawler->add($this->createNodeList()); $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->add() adds nodes from a \DOMNodeList'); - $list = array(); + $list = []; foreach ($this->createNodeList() as $node) { $list[] = $node; } @@ -269,7 +269,7 @@ EOF public function testAddNodes() { - $list = array(); + $list = []; foreach ($this->createNodeList() as $node) { $list[] = $node; } @@ -314,7 +314,7 @@ EOF return $i.'-'.$node->text(); }); - $this->assertEquals(array('0-One', '1-Two', '2-Three'), $data, '->each() executes an anonymous function on each node of the list'); + $this->assertEquals(['0-One', '1-Two', '2-Three'], $data, '->each() executes an anonymous function on each node of the list'); } public function testIteration() @@ -411,11 +411,11 @@ EOF { $crawler = $this->createTestCrawler()->filterXPath('//ul[1]/li'); - $this->assertEquals(array('One', 'Two', 'Three'), $crawler->extract('_text'), '->extract() returns an array of extracted data from the node list'); - $this->assertEquals(array(array('One', 'first'), array('Two', ''), array('Three', '')), $crawler->extract(array('_text', 'class')), '->extract() returns an array of extracted data from the node list'); - $this->assertEquals(array(array(), array(), array()), $crawler->extract(array()), '->extract() returns empty arrays if the attribute list is empty'); + $this->assertEquals(['One', 'Two', 'Three'], $crawler->extract('_text'), '->extract() returns an array of extracted data from the node list'); + $this->assertEquals([['One', 'first'], ['Two', ''], ['Three', '']], $crawler->extract(['_text', 'class']), '->extract() returns an array of extracted data from the node list'); + $this->assertEquals([[], [], []], $crawler->extract([]), '->extract() returns empty arrays if the attribute list is empty'); - $this->assertEquals(array(), $this->createTestCrawler()->filterXPath('//ol')->extract('_text'), '->extract() returns an empty array if the node list is empty'); + $this->assertEquals([], $this->createTestCrawler()->filterXPath('//ol')->extract('_text'), '->extract() returns an empty array if the node list is empty'); } public function testFilterXpathComplexQueries() @@ -849,7 +849,7 @@ HTML; $links = $crawler->links(); $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Link', $links[0], '->links() returns an array of Link instances'); - $this->assertEquals(array(), $this->createTestCrawler()->filterXPath('//ol')->links(), '->links() returns an empty array if the node selection is empty'); + $this->assertEquals([], $this->createTestCrawler()->filterXPath('//ol')->links(), '->links() returns an empty array if the node selection is empty'); } public function testImages() @@ -861,7 +861,7 @@ HTML; $images = $crawler->images(); $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Image', $images[0], '->images() returns an array of Image instances'); - $this->assertEquals(array(), $this->createTestCrawler()->filterXPath('//ol')->links(), '->links() returns an empty array if the node selection is empty'); + $this->assertEquals([], $this->createTestCrawler()->filterXPath('//ol')->links(), '->links() returns an empty array if the node selection is empty'); } public function testForm() @@ -874,9 +874,9 @@ HTML; $this->assertEquals($crawler->form()->getFormNode()->getAttribute('id'), $crawler2->form()->getFormNode()->getAttribute('id'), '->form() works on elements with form attribute'); - $this->assertEquals(array('FooName' => 'FooBar', 'TextName' => 'TextValue', 'FooTextName' => 'FooTextValue'), $crawler->form(array('FooName' => 'FooBar'))->getValues(), '->form() takes an array of values to submit as its first argument'); - $this->assertEquals(array('FooName' => 'FooValue', 'TextName' => 'TextValue', 'FooTextName' => 'FooTextValue'), $crawler->form()->getValues(), '->getValues() returns correct form values'); - $this->assertEquals(array('FooBarName' => 'FooBarValue', 'TextName' => 'TextValue', 'FooTextName' => 'FooTextValue'), $crawler2->form()->getValues(), '->getValues() returns correct form values'); + $this->assertEquals(['FooName' => 'FooBar', 'TextName' => 'TextValue', 'FooTextName' => 'FooTextValue'], $crawler->form(['FooName' => 'FooBar'])->getValues(), '->form() takes an array of values to submit as its first argument'); + $this->assertEquals(['FooName' => 'FooValue', 'TextName' => 'TextValue', 'FooTextName' => 'FooTextValue'], $crawler->form()->getValues(), '->getValues() returns correct form values'); + $this->assertEquals(['FooBarName' => 'FooBarValue', 'TextName' => 'TextValue', 'FooTextName' => 'FooTextValue'], $crawler2->form()->getValues(), '->getValues() returns correct form values'); try { $this->createTestCrawler()->filterXPath('//ol')->form(); @@ -1035,13 +1035,13 @@ HTML; public function getBaseTagData() { - return array( - array('http://base.com', 'link', 'http://base.com/link'), - array('//base.com', 'link', 'https://base.com/link', 'https://domain.com', ' tag can use a schema-less URL'), - array('path/', 'link', 'https://domain.com/path/link', 'https://domain.com', ' tag can set a path'), - array('http://base.com', '#', 'http://base.com#', 'http://domain.com/path/link', ' tag does work with links to an anchor'), - array('http://base.com', '', 'http://base.com', 'http://domain.com/path/link', ' tag does work with empty links'), - ); + return [ + ['http://base.com', 'link', 'http://base.com/link'], + ['//base.com', 'link', 'https://base.com/link', 'https://domain.com', ' tag can use a schema-less URL'], + ['path/', 'link', 'https://domain.com/path/link', 'https://domain.com', ' tag can set a path'], + ['http://base.com', '#', 'http://base.com#', 'http://domain.com/path/link', ' tag does work with links to an anchor'], + ['http://base.com', '', 'http://base.com', 'http://domain.com/path/link', ' tag does work with empty links'], + ]; } /** @@ -1055,14 +1055,14 @@ HTML; public function getBaseTagWithFormData() { - return array( - array('https://base.com/', 'link/', 'https://base.com/link/', 'https://base.com/link/', ' tag does work with a path and relative form action'), - array('/basepath', '/registration', 'http://domain.com/registration', 'http://domain.com/registration', ' tag does work with a path and form action'), - array('/basepath', '', 'http://domain.com/registration', 'http://domain.com/registration', ' tag does work with a path and empty form action'), - array('http://base.com/', '/registration', 'http://base.com/registration', 'http://domain.com/registration', ' tag does work with a URL and form action'), - array('http://base.com', '', 'http://domain.com/path/form', 'http://domain.com/path/form', ' tag does work with a URL and an empty form action'), - array('http://base.com/path', '/registration', 'http://base.com/registration', 'http://domain.com/path/form', ' tag does work with a URL and form action'), - ); + return [ + ['https://base.com/', 'link/', 'https://base.com/link/', 'https://base.com/link/', ' tag does work with a path and relative form action'], + ['/basepath', '/registration', 'http://domain.com/registration', 'http://domain.com/registration', ' tag does work with a path and form action'], + ['/basepath', '', 'http://domain.com/registration', 'http://domain.com/registration', ' tag does work with a path and empty form action'], + ['http://base.com/', '/registration', 'http://base.com/registration', 'http://domain.com/registration', ' tag does work with a URL and form action'], + ['http://base.com', '', 'http://domain.com/path/form', 'http://domain.com/path/form', ' tag does work with a URL and an empty form action'], + ['http://base.com/path', '/registration', 'http://base.com/registration', 'http://domain.com/path/form', ' tag does work with a URL and form action'], + ]; } public function testCountOfNestedElements() @@ -1078,7 +1078,7 @@ HTML; $result = $crawler->filterXPath('//form/input')->evaluate('substring-before(@name, "Name")'); - $this->assertSame(array('Text', 'Foo', 'Bar'), $result); + $this->assertSame(['Text', 'Foo', 'Bar'], $result); } public function testEvaluateReturnsTypedResultOfNamespacedXPathExpressionOnADocumentSubset() @@ -1087,7 +1087,7 @@ HTML; $result = $crawler->filterXPath('//yt:accessControl/@action')->evaluate('string(.)'); - $this->assertSame(array('comment', 'videoRespond'), $result); + $this->assertSame(['comment', 'videoRespond'], $result); } public function testEvaluateReturnsTypedResultOfNamespacedXPathExpression() @@ -1097,7 +1097,7 @@ HTML; $result = $crawler->evaluate('string(//youtube:accessControl/@action)'); - $this->assertSame(array('comment'), $result); + $this->assertSame(['comment'], $result); } public function testEvaluateReturnsACrawlerIfXPathExpressionEvaluatesToANode() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php index 95922863..61e77673 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php @@ -25,7 +25,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase $this->assertTrue(true, '->initialize() throws a \LogicException if the node is not an input or a select'); } - $node = $this->createNode('input', '', array('type' => 'text')); + $node = $this->createNode('input', '', ['type' => 'text']); try { $field = new ChoiceFormField($node); $this->fail('->initialize() throws a \LogicException if the node is an input with a type different from checkbox or radio'); @@ -36,12 +36,12 @@ class ChoiceFormFieldTest extends FormFieldTestCase public function testGetType() { - $node = $this->createNode('input', '', array('type' => 'radio', 'name' => 'name', 'value' => 'foo')); + $node = $this->createNode('input', '', ['type' => 'radio', 'name' => 'name', 'value' => 'foo']); $field = new ChoiceFormField($node); $this->assertEquals('radio', $field->getType(), '->getType() returns radio for radio buttons'); - $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name', 'value' => 'foo')); + $node = $this->createNode('input', '', ['type' => 'checkbox', 'name' => 'name', 'value' => 'foo']); $field = new ChoiceFormField($node); $this->assertEquals('checkbox', $field->getType(), '->getType() returns radio for a checkbox'); @@ -54,12 +54,12 @@ class ChoiceFormFieldTest extends FormFieldTestCase public function testIsMultiple() { - $node = $this->createNode('input', '', array('type' => 'radio', 'name' => 'name', 'value' => 'foo')); + $node = $this->createNode('input', '', ['type' => 'radio', 'name' => 'name', 'value' => 'foo']); $field = new ChoiceFormField($node); $this->assertFalse($field->isMultiple(), '->isMultiple() returns false for radio buttons'); - $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name', 'value' => 'foo')); + $node = $this->createNode('input', '', ['type' => 'checkbox', 'name' => 'name', 'value' => 'foo']); $field = new ChoiceFormField($node); $this->assertFalse($field->isMultiple(), '->isMultiple() returns false for checkboxes'); @@ -69,12 +69,12 @@ class ChoiceFormFieldTest extends FormFieldTestCase $this->assertFalse($field->isMultiple(), '->isMultiple() returns false for selects without the multiple attribute'); - $node = $this->createNode('select', '', array('multiple' => 'multiple')); + $node = $this->createNode('select', '', ['multiple' => 'multiple']); $field = new ChoiceFormField($node); $this->assertTrue($field->isMultiple(), '->isMultiple() returns true for selects with the multiple attribute'); - $node = $this->createNode('select', '', array('multiple' => '')); + $node = $this->createNode('select', '', ['multiple' => '']); $field = new ChoiceFormField($node); $this->assertTrue($field->isMultiple(), '->isMultiple() returns true for selects with an empty multiple attribute'); @@ -82,14 +82,14 @@ class ChoiceFormFieldTest extends FormFieldTestCase public function testSelects() { - $node = $this->createSelectNode(array('foo' => false, 'bar' => false)); + $node = $this->createSelectNode(['foo' => false, 'bar' => false]); $field = new ChoiceFormField($node); $this->assertTrue($field->hasValue(), '->hasValue() returns true for selects'); $this->assertEquals('foo', $field->getValue(), '->getValue() returns the first option if none are selected'); $this->assertFalse($field->isMultiple(), '->isMultiple() returns false when no multiple attribute is defined'); - $node = $this->createSelectNode(array('foo' => false, 'bar' => true)); + $node = $this->createSelectNode(['foo' => false, 'bar' => true]); $field = new ChoiceFormField($node); $this->assertEquals('bar', $field->getValue(), '->getValue() returns the selected option'); @@ -105,7 +105,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase } try { - $field->setValue(array('foobar')); + $field->setValue(['foobar']); $this->fail('->setValue() throws an \InvalidArgumentException if the value is an array'); } catch (\InvalidArgumentException $e) { $this->assertTrue(true, '->setValue() throws an \InvalidArgumentException if the value is an array'); @@ -114,7 +114,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase public function testSelectWithEmptyBooleanAttribute() { - $node = $this->createSelectNode(array('foo' => false, 'bar' => true), array(), ''); + $node = $this->createSelectNode(['foo' => false, 'bar' => true], [], ''); $field = new ChoiceFormField($node); $this->assertEquals('bar', $field->getValue()); @@ -122,7 +122,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase public function testSelectIsDisabled() { - $node = $this->createSelectNode(array('foo' => false, 'bar' => true), array('disabled' => 'disabled')); + $node = $this->createSelectNode(['foo' => false, 'bar' => true], ['disabled' => 'disabled']); $field = new ChoiceFormField($node); $this->assertTrue($field->isDisabled(), '->isDisabled() returns true for selects with a disabled attribute'); @@ -130,27 +130,27 @@ class ChoiceFormFieldTest extends FormFieldTestCase public function testMultipleSelects() { - $node = $this->createSelectNode(array('foo' => false, 'bar' => false), array('multiple' => 'multiple')); + $node = $this->createSelectNode(['foo' => false, 'bar' => false], ['multiple' => 'multiple']); $field = new ChoiceFormField($node); - $this->assertEquals(array(), $field->getValue(), '->setValue() returns an empty array if multiple is true and no option is selected'); + $this->assertEquals([], $field->getValue(), '->setValue() returns an empty array if multiple is true and no option is selected'); $field->setValue('foo'); - $this->assertEquals(array('foo'), $field->getValue(), '->setValue() returns an array of options if multiple is true'); + $this->assertEquals(['foo'], $field->getValue(), '->setValue() returns an array of options if multiple is true'); $field->setValue('bar'); - $this->assertEquals(array('bar'), $field->getValue(), '->setValue() returns an array of options if multiple is true'); + $this->assertEquals(['bar'], $field->getValue(), '->setValue() returns an array of options if multiple is true'); - $field->setValue(array('foo', 'bar')); - $this->assertEquals(array('foo', 'bar'), $field->getValue(), '->setValue() returns an array of options if multiple is true'); + $field->setValue(['foo', 'bar']); + $this->assertEquals(['foo', 'bar'], $field->getValue(), '->setValue() returns an array of options if multiple is true'); - $node = $this->createSelectNode(array('foo' => true, 'bar' => true), array('multiple' => 'multiple')); + $node = $this->createSelectNode(['foo' => true, 'bar' => true], ['multiple' => 'multiple']); $field = new ChoiceFormField($node); - $this->assertEquals(array('foo', 'bar'), $field->getValue(), '->getValue() returns the selected options'); + $this->assertEquals(['foo', 'bar'], $field->getValue(), '->getValue() returns the selected options'); try { - $field->setValue(array('foobar')); + $field->setValue(['foobar']); $this->fail('->setValue() throws an \InvalidArgumentException if the value is not one of the options'); } catch (\InvalidArgumentException $e) { $this->assertTrue(true, '->setValue() throws an \InvalidArgumentException if the value is not one of the options'); @@ -159,18 +159,18 @@ class ChoiceFormFieldTest extends FormFieldTestCase public function testRadioButtons() { - $node = $this->createNode('input', '', array('type' => 'radio', 'name' => 'name', 'value' => 'foo')); + $node = $this->createNode('input', '', ['type' => 'radio', 'name' => 'name', 'value' => 'foo']); $field = new ChoiceFormField($node); - $node = $this->createNode('input', '', array('type' => 'radio', 'name' => 'name', 'value' => 'bar')); + $node = $this->createNode('input', '', ['type' => 'radio', 'name' => 'name', 'value' => 'bar']); $field->addChoice($node); $this->assertFalse($field->hasValue(), '->hasValue() returns false when no radio button is selected'); $this->assertNull($field->getValue(), '->getValue() returns null if no radio button is selected'); $this->assertFalse($field->isMultiple(), '->isMultiple() returns false for radio buttons'); - $node = $this->createNode('input', '', array('type' => 'radio', 'name' => 'name', 'value' => 'foo')); + $node = $this->createNode('input', '', ['type' => 'radio', 'name' => 'name', 'value' => 'foo']); $field = new ChoiceFormField($node); - $node = $this->createNode('input', '', array('type' => 'radio', 'name' => 'name', 'value' => 'bar', 'checked' => 'checked')); + $node = $this->createNode('input', '', ['type' => 'radio', 'name' => 'name', 'value' => 'bar', 'checked' => 'checked']); $field->addChoice($node); $this->assertTrue($field->hasValue(), '->hasValue() returns true when a radio button is selected'); @@ -189,9 +189,9 @@ class ChoiceFormFieldTest extends FormFieldTestCase public function testRadioButtonsWithEmptyBooleanAttribute() { - $node = $this->createNode('input', '', array('type' => 'radio', 'name' => 'name', 'value' => 'foo')); + $node = $this->createNode('input', '', ['type' => 'radio', 'name' => 'name', 'value' => 'foo']); $field = new ChoiceFormField($node); - $node = $this->createNode('input', '', array('type' => 'radio', 'name' => 'name', 'value' => 'bar', 'checked' => '')); + $node = $this->createNode('input', '', ['type' => 'radio', 'name' => 'name', 'value' => 'bar', 'checked' => '']); $field->addChoice($node); $this->assertTrue($field->hasValue(), '->hasValue() returns true when a radio button is selected'); @@ -200,11 +200,11 @@ class ChoiceFormFieldTest extends FormFieldTestCase public function testRadioButtonIsDisabled() { - $node = $this->createNode('input', '', array('type' => 'radio', 'name' => 'name', 'value' => 'foo', 'disabled' => 'disabled')); + $node = $this->createNode('input', '', ['type' => 'radio', 'name' => 'name', 'value' => 'foo', 'disabled' => 'disabled']); $field = new ChoiceFormField($node); - $node = $this->createNode('input', '', array('type' => 'radio', 'name' => 'name', 'value' => 'bar')); + $node = $this->createNode('input', '', ['type' => 'radio', 'name' => 'name', 'value' => 'bar']); $field->addChoice($node); - $node = $this->createNode('input', '', array('type' => 'radio', 'name' => 'name', 'value' => 'baz', 'disabled' => '')); + $node = $this->createNode('input', '', ['type' => 'radio', 'name' => 'name', 'value' => 'baz', 'disabled' => '']); $field->addChoice($node); $field->select('foo'); @@ -222,7 +222,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase public function testCheckboxes() { - $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name')); + $node = $this->createNode('input', '', ['type' => 'checkbox', 'name' => 'name']); $field = new ChoiceFormField($node); $this->assertFalse($field->hasValue(), '->hasValue() returns false when the checkbox is not checked'); @@ -235,18 +235,18 @@ class ChoiceFormFieldTest extends FormFieldTestCase $this->assertTrue(true, '->initialize() throws a \LogicException for checkboxes'); } - $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name', 'checked' => 'checked')); + $node = $this->createNode('input', '', ['type' => 'checkbox', 'name' => 'name', 'checked' => 'checked']); $field = new ChoiceFormField($node); $this->assertTrue($field->hasValue(), '->hasValue() returns true when the checkbox is checked'); $this->assertEquals('on', $field->getValue(), '->getValue() returns 1 if the checkbox is checked and has no value attribute'); - $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name', 'checked' => 'checked', 'value' => 'foo')); + $node = $this->createNode('input', '', ['type' => 'checkbox', 'name' => 'name', 'checked' => 'checked', 'value' => 'foo']); $field = new ChoiceFormField($node); $this->assertEquals('foo', $field->getValue(), '->getValue() returns the value attribute if the checkbox is checked'); - $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name', 'checked' => 'checked', 'value' => 'foo')); + $node = $this->createNode('input', '', ['type' => 'checkbox', 'name' => 'name', 'checked' => 'checked', 'value' => 'foo']); $field = new ChoiceFormField($node); $field->setValue(false); @@ -265,7 +265,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase public function testCheckboxWithEmptyBooleanAttribute() { - $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name', 'value' => 'foo', 'checked' => '')); + $node = $this->createNode('input', '', ['type' => 'checkbox', 'name' => 'name', 'value' => 'foo', 'checked' => '']); $field = new ChoiceFormField($node); $this->assertTrue($field->hasValue(), '->hasValue() returns true when the checkbox is checked'); @@ -274,7 +274,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase public function testTick() { - $node = $this->createSelectNode(array('foo' => false, 'bar' => false)); + $node = $this->createSelectNode(['foo' => false, 'bar' => false]); $field = new ChoiceFormField($node); try { @@ -284,7 +284,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase $this->assertTrue(true, '->tick() throws a \LogicException for select boxes'); } - $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name')); + $node = $this->createNode('input', '', ['type' => 'checkbox', 'name' => 'name']); $field = new ChoiceFormField($node); $field->tick(); $this->assertEquals('on', $field->getValue(), '->tick() ticks checkboxes'); @@ -292,7 +292,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase public function testUntick() { - $node = $this->createSelectNode(array('foo' => false, 'bar' => false)); + $node = $this->createSelectNode(['foo' => false, 'bar' => false]); $field = new ChoiceFormField($node); try { @@ -302,7 +302,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase $this->assertTrue(true, '->untick() throws a \LogicException for select boxes'); } - $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name', 'checked' => 'checked')); + $node = $this->createNode('input', '', ['type' => 'checkbox', 'name' => 'name', 'checked' => 'checked']); $field = new ChoiceFormField($node); $field->untick(); $this->assertNull($field->getValue(), '->untick() unticks checkboxes'); @@ -310,14 +310,14 @@ class ChoiceFormFieldTest extends FormFieldTestCase public function testSelect() { - $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name', 'checked' => 'checked')); + $node = $this->createNode('input', '', ['type' => 'checkbox', 'name' => 'name', 'checked' => 'checked']); $field = new ChoiceFormField($node); $field->select(true); $this->assertEquals('on', $field->getValue(), '->select() changes the value of the field'); $field->select(false); $this->assertNull($field->getValue(), '->select() changes the value of the field'); - $node = $this->createSelectNode(array('foo' => false, 'bar' => false)); + $node = $this->createSelectNode(['foo' => false, 'bar' => false]); $field = new ChoiceFormField($node); $field->select('foo'); $this->assertEquals('foo', $field->getValue(), '->select() changes the selected option'); @@ -325,11 +325,11 @@ class ChoiceFormFieldTest extends FormFieldTestCase public function testOptionWithNoValue() { - $node = $this->createSelectNodeWithEmptyOption(array('foo' => false, 'bar' => false)); + $node = $this->createSelectNodeWithEmptyOption(['foo' => false, 'bar' => false]); $field = new ChoiceFormField($node); $this->assertEquals('foo', $field->getValue()); - $node = $this->createSelectNodeWithEmptyOption(array('foo' => false, 'bar' => true)); + $node = $this->createSelectNodeWithEmptyOption(['foo' => false, 'bar' => true]); $field = new ChoiceFormField($node); $this->assertEquals('bar', $field->getValue()); $field->select('foo'); @@ -338,28 +338,28 @@ class ChoiceFormFieldTest extends FormFieldTestCase public function testDisableValidation() { - $node = $this->createSelectNode(array('foo' => false, 'bar' => false)); + $node = $this->createSelectNode(['foo' => false, 'bar' => false]); $field = new ChoiceFormField($node); $field->disableValidation(); $field->setValue('foobar'); $this->assertEquals('foobar', $field->getValue(), '->disableValidation() allows to set a value which is not in the selected options.'); - $node = $this->createSelectNode(array('foo' => false, 'bar' => false), array('multiple' => 'multiple')); + $node = $this->createSelectNode(['foo' => false, 'bar' => false], ['multiple' => 'multiple']); $field = new ChoiceFormField($node); $field->disableValidation(); - $field->setValue(array('foobar')); - $this->assertEquals(array('foobar'), $field->getValue(), '->disableValidation() allows to set a value which is not in the selected options.'); + $field->setValue(['foobar']); + $this->assertEquals(['foobar'], $field->getValue(), '->disableValidation() allows to set a value which is not in the selected options.'); } public function testSelectWithEmptyValue() { - $node = $this->createSelectNodeWithEmptyOption(array('' => true, 'Female' => false, 'Male' => false)); + $node = $this->createSelectNodeWithEmptyOption(['' => true, 'Female' => false, 'Male' => false]); $field = new ChoiceFormField($node); $this->assertSame('', $field->getValue()); } - protected function createSelectNode($options, $attributes = array(), $selectedAttrText = 'selected') + protected function createSelectNode($options, $attributes = [], $selectedAttrText = 'selected') { $document = new \DOMDocument(); $node = $document->createElement('select'); @@ -381,7 +381,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase return $node; } - protected function createSelectNodeWithEmptyOption($options, $attributes = array()) + protected function createSelectNodeWithEmptyOption($options, $attributes = []) { $document = new \DOMDocument(); $node = $document->createElement('select'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php index 3ce49a46..03ab383c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php @@ -17,10 +17,10 @@ class FileFormFieldTest extends FormFieldTestCase { public function testInitialize() { - $node = $this->createNode('input', '', array('type' => 'file')); + $node = $this->createNode('input', '', ['type' => 'file']); $field = new FileFormField($node); - $this->assertEquals(array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => UPLOAD_ERR_NO_FILE, 'size' => 0), $field->getValue(), '->initialize() sets the value of the field to no file uploaded'); + $this->assertEquals(['name' => '', 'type' => '', 'tmp_name' => '', 'error' => UPLOAD_ERR_NO_FILE, 'size' => 0], $field->getValue(), '->initialize() sets the value of the field to no file uploaded'); $node = $this->createNode('textarea', ''); try { @@ -30,7 +30,7 @@ class FileFormFieldTest extends FormFieldTestCase $this->assertTrue(true, '->initialize() throws a \LogicException if the node is not an input field'); } - $node = $this->createNode('input', '', array('type' => 'text')); + $node = $this->createNode('input', '', ['type' => 'text']); try { $field = new FileFormField($node); $this->fail('->initialize() throws a \LogicException if the node is not a file input field'); @@ -44,11 +44,11 @@ class FileFormFieldTest extends FormFieldTestCase */ public function testSetValue($method) { - $node = $this->createNode('input', '', array('type' => 'file')); + $node = $this->createNode('input', '', ['type' => 'file']); $field = new FileFormField($node); $field->$method(null); - $this->assertEquals(array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => UPLOAD_ERR_NO_FILE, 'size' => 0), $field->getValue(), "->$method() clears the uploaded file if the value is null"); + $this->assertEquals(['name' => '', 'type' => '', 'tmp_name' => '', 'error' => UPLOAD_ERR_NO_FILE, 'size' => 0], $field->getValue(), "->$method() clears the uploaded file if the value is null"); $field->$method(__FILE__); $value = $field->getValue(); @@ -80,15 +80,15 @@ class FileFormFieldTest extends FormFieldTestCase public function getSetValueMethods() { - return array( - array('setValue'), - array('upload'), - ); + return [ + ['setValue'], + ['upload'], + ]; } public function testSetErrorCode() { - $node = $this->createNode('input', '', array('type' => 'file')); + $node = $this->createNode('input', '', ['type' => 'file']); $field = new FileFormField($node); $field->setErrorCode(UPLOAD_ERR_FORM_SIZE); @@ -105,7 +105,7 @@ class FileFormFieldTest extends FormFieldTestCase public function testSetRawFilePath() { - $node = $this->createNode('input', '', array('type' => 'file')); + $node = $this->createNode('input', '', ['type' => 'file']); $field = new FileFormField($node); $field->setFilePath(__FILE__); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/FormFieldTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/FormFieldTest.php index d150eb3a..e2daa039 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/FormFieldTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/FormFieldTest.php @@ -17,7 +17,7 @@ class FormFieldTest extends FormFieldTestCase { public function testGetName() { - $node = $this->createNode('input', '', array('type' => 'text', 'name' => 'name', 'value' => 'value')); + $node = $this->createNode('input', '', ['type' => 'text', 'name' => 'name', 'value' => 'value']); $field = new InputFormField($node); $this->assertEquals('name', $field->getName(), '->getName() returns the name of the field'); @@ -25,7 +25,7 @@ class FormFieldTest extends FormFieldTestCase public function testGetSetHasValue() { - $node = $this->createNode('input', '', array('type' => 'text', 'name' => 'name', 'value' => 'value')); + $node = $this->createNode('input', '', ['type' => 'text', 'name' => 'name', 'value' => 'value']); $field = new InputFormField($node); $this->assertEquals('value', $field->getValue(), '->getValue() returns the value of the field'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/FormFieldTestCase.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/FormFieldTestCase.php index 2059d049..5ca19d95 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/FormFieldTestCase.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/FormFieldTestCase.php @@ -15,7 +15,7 @@ use PHPUnit\Framework\TestCase; class FormFieldTestCase extends TestCase { - protected function createNode($tag, $value, $attributes = array()) + protected function createNode($tag, $value, $attributes = []) { $document = new \DOMDocument(); $node = $document->createElement($tag, $value); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/InputFormFieldTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/InputFormFieldTest.php index 193d301d..5758f1b7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/InputFormFieldTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/Field/InputFormFieldTest.php @@ -17,7 +17,7 @@ class InputFormFieldTest extends FormFieldTestCase { public function testInitialize() { - $node = $this->createNode('input', '', array('type' => 'text', 'name' => 'name', 'value' => 'value')); + $node = $this->createNode('input', '', ['type' => 'text', 'name' => 'name', 'value' => 'value']); $field = new InputFormField($node); $this->assertEquals('value', $field->getValue(), '->initialize() sets the value of the field to the value attribute value'); @@ -30,7 +30,7 @@ class InputFormFieldTest extends FormFieldTestCase $this->assertTrue(true, '->initialize() throws a \LogicException if the node is not an input'); } - $node = $this->createNode('input', '', array('type' => 'checkbox')); + $node = $this->createNode('input', '', ['type' => 'checkbox']); try { $field = new InputFormField($node); $this->fail('->initialize() throws a \LogicException if the node is a checkbox'); @@ -38,7 +38,7 @@ class InputFormFieldTest extends FormFieldTestCase $this->assertTrue(true, '->initialize() throws a \LogicException if the node is a checkbox'); } - $node = $this->createNode('input', '', array('type' => 'file')); + $node = $this->createNode('input', '', ['type' => 'file']); try { $field = new InputFormField($node); $this->fail('->initialize() throws a \LogicException if the node is a file'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/FormTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/FormTest.php index f7ea51b2..2778fd07 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/FormTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/FormTest.php @@ -129,18 +129,18 @@ class FormTest extends TestCase $form2 = new Form($buttonElements->item(0), 'http://example.com'); // Tests if form values are correctly assigned to forms - $values1 = array( - 'apples' => array('1', '2'), + $values1 = [ + 'apples' => ['1', '2'], 'form_name' => 'form-1', 'button_1' => 'Capture fields', 'outer_field' => 'success', - ); - $values2 = array( - 'oranges' => array('1', '2', '3'), + ]; + $values2 = [ + 'oranges' => ['1', '2', '3'], 'form_name' => 'form_2', 'button_2' => '', - 'app_frontend_form_type_contact_form_type' => array('contactType' => '', 'firstName' => 'John'), - ); + 'app_frontend_form_type_contact_form_type' => ['contactType' => '', 'firstName' => 'John'], + ]; $this->assertEquals($values1, $form1->getPhpValues(), 'HTML5-compliant form attribute handled incorrectly'); $this->assertEquals($values2, $form2->getPhpValues(), 'HTML5-compliant form attribute handled incorrectly'); @@ -161,7 +161,7 @@ class FormTest extends TestCase $this->assertEquals( array_keys($form->all()), - array('foo[2]', 'foo[3]', 'bar[foo][0]', 'bar[foo][foobar]') + ['foo[2]', 'foo[3]', 'bar[foo][0]', 'bar[foo][foobar]'] ); $this->assertEquals($form->get('foo[2]')->getValue(), 'foo'); @@ -175,7 +175,7 @@ class FormTest extends TestCase $this->assertEquals($form->get('foo[2]')->getValue(), 'bar'); $this->assertEquals($form->get('foo[3]')->getValue(), 'bar'); - $form['bar'] = array('foo' => array('0' => 'bar', 'foobar' => 'foobar')); + $form['bar'] = ['foo' => ['0' => 'bar', 'foobar' => 'foobar']]; $this->assertEquals($form->get('bar[foo][0]')->getValue(), 'bar'); $this->assertEquals($form->get('bar[foo][foobar]')->getValue(), 'foobar'); @@ -193,7 +193,7 @@ class FormTest extends TestCase function ($field) { $class = \get_class($field); - return array(substr($class, strrpos($class, '\\') + 1), $field->getValue()); + return [substr($class, strrpos($class, '\\') + 1), $field->getValue()]; }, $form->all() ), @@ -203,84 +203,84 @@ class FormTest extends TestCase public function provideInitializeValues() { - return array( - array( + return [ + [ 'does not take into account input fields without a name attribute', ' ', - array(), - ), - array( + [], + ], + [ 'does not take into account input fields with an empty name attribute value', ' ', - array(), - ), - array( + [], + ], + [ 'takes into account disabled input fields', ' ', - array('foo' => array('InputFormField', 'foo')), - ), - array( + ['foo' => ['InputFormField', 'foo']], + ], + [ 'appends the submitted button value', '', - array('bar' => array('InputFormField', 'bar')), - ), - array( + ['bar' => ['InputFormField', 'bar']], + ], + [ 'appends the submitted button value for Button element', '', - array('bar' => array('InputFormField', 'bar')), - ), - array( + ['bar' => ['InputFormField', 'bar']], + ], + [ 'appends the submitted button value but not other submit buttons', ' ', - array('foobar' => array('InputFormField', 'foobar')), - ), - array( + ['foobar' => ['InputFormField', 'foobar']], + ], + [ 'turns an image input into x and y fields', '', - array('bar.x' => array('InputFormField', '0'), 'bar.y' => array('InputFormField', '0')), - ), - array( + ['bar.x' => ['InputFormField', '0'], 'bar.y' => ['InputFormField', '0']], + ], + [ 'returns textareas', ' ', - array('foo' => array('TextareaFormField', 'foo')), - ), - array( + ['foo' => ['TextareaFormField', 'foo']], + ], + [ 'returns inputs', ' ', - array('foo' => array('InputFormField', 'foo')), - ), - array( + ['foo' => ['InputFormField', 'foo']], + ], + [ 'returns checkboxes', ' ', - array('foo' => array('ChoiceFormField', 'foo')), - ), - array( + ['foo' => ['ChoiceFormField', 'foo']], + ], + [ 'returns not-checked checkboxes', ' ', - array('foo' => array('ChoiceFormField', false)), - ), - array( + ['foo' => ['ChoiceFormField', false]], + ], + [ 'returns radio buttons', ' ', - array('foo' => array('ChoiceFormField', 'bar')), - ), - array( + ['foo' => ['ChoiceFormField', 'bar']], + ], + [ 'returns file inputs', ' ', - array('foo' => array('FileFormField', array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0))), - ), - ); + ['foo' => ['FileFormField', ['name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0]]], + ], + ]; } public function testGetFormNode() @@ -390,86 +390,86 @@ class FormTest extends TestCase public function testGetValues() { $form = $this->createForm('
    '); - $this->assertEquals(array('foo[bar]' => 'foo', 'bar' => 'bar', 'baz' => array()), $form->getValues(), '->getValues() returns all form field values'); + $this->assertEquals(['foo[bar]' => 'foo', 'bar' => 'bar', 'baz' => []], $form->getValues(), '->getValues() returns all form field values'); $form = $this->createForm('
    '); - $this->assertEquals(array('bar' => 'bar'), $form->getValues(), '->getValues() does not include not-checked checkboxes'); + $this->assertEquals(['bar' => 'bar'], $form->getValues(), '->getValues() does not include not-checked checkboxes'); $form = $this->createForm('
    '); - $this->assertEquals(array('bar' => 'bar'), $form->getValues(), '->getValues() does not include file input fields'); + $this->assertEquals(['bar' => 'bar'], $form->getValues(), '->getValues() does not include file input fields'); $form = $this->createForm('
    '); - $this->assertEquals(array('bar' => 'bar'), $form->getValues(), '->getValues() does not include disabled fields'); + $this->assertEquals(['bar' => 'bar'], $form->getValues(), '->getValues() does not include disabled fields'); $form = $this->createForm('
    '); - $this->assertEquals(array('bar' => 'bar'), $form->getValues(), '->getValues() does not include template fields'); + $this->assertEquals(['bar' => 'bar'], $form->getValues(), '->getValues() does not include template fields'); $this->assertFalse($form->has('foo')); } public function testSetValues() { $form = $this->createForm('
    '); - $form->setValues(array('foo' => false, 'bar' => 'foo')); - $this->assertEquals(array('bar' => 'foo'), $form->getValues(), '->setValues() sets the values of fields'); + $form->setValues(['foo' => false, 'bar' => 'foo']); + $this->assertEquals(['bar' => 'foo'], $form->getValues(), '->setValues() sets the values of fields'); } public function testMultiselectSetValues() { $form = $this->createForm('
    '); - $form->setValues(array('multi' => array('foo', 'bar'))); - $this->assertEquals(array('multi' => array('foo', 'bar')), $form->getValues(), '->setValue() sets the values of select'); + $form->setValues(['multi' => ['foo', 'bar']]); + $this->assertEquals(['multi' => ['foo', 'bar']], $form->getValues(), '->setValue() sets the values of select'); } public function testGetPhpValues() { $form = $this->createForm('
    '); - $this->assertEquals(array('foo' => array('bar' => 'foo'), 'bar' => 'bar'), $form->getPhpValues(), '->getPhpValues() converts keys with [] to arrays'); + $this->assertEquals(['foo' => ['bar' => 'foo'], 'bar' => 'bar'], $form->getPhpValues(), '->getPhpValues() converts keys with [] to arrays'); $form = $this->createForm('
    '); - $this->assertEquals(array('fo.o' => array('ba.r' => 'foo'), 'ba r' => 'bar'), $form->getPhpValues(), '->getPhpValues() preserves periods and spaces in names'); + $this->assertEquals(['fo.o' => ['ba.r' => 'foo'], 'ba r' => 'bar'], $form->getPhpValues(), '->getPhpValues() preserves periods and spaces in names'); $form = $this->createForm('
    '); - $this->assertEquals(array('fo.o' => array('ba.r' => array('foo', 'ba.z' => 'bar'))), $form->getPhpValues(), '->getPhpValues() preserves periods and spaces in names recursively'); + $this->assertEquals(['fo.o' => ['ba.r' => ['foo', 'ba.z' => 'bar']]], $form->getPhpValues(), '->getPhpValues() preserves periods and spaces in names recursively'); $form = $this->createForm('
    '); - $this->assertEquals(array('foo' => array('bar' => 'foo'), 'bar' => 'bar'), $form->getPhpValues(), "->getPhpValues() doesn't return empty values"); + $this->assertEquals(['foo' => ['bar' => 'foo'], 'bar' => 'bar'], $form->getPhpValues(), "->getPhpValues() doesn't return empty values"); } public function testGetFiles() { $form = $this->createForm('
    '); - $this->assertEquals(array(), $form->getFiles(), '->getFiles() returns an empty array if method is get'); + $this->assertEquals([], $form->getFiles(), '->getFiles() returns an empty array if method is get'); $form = $this->createForm('
    '); - $this->assertEquals(array('foo[bar]' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0)), $form->getFiles(), '->getFiles() only returns file fields for POST'); + $this->assertEquals(['foo[bar]' => ['name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0]], $form->getFiles(), '->getFiles() only returns file fields for POST'); $form = $this->createForm('
    ', 'put'); - $this->assertEquals(array('foo[bar]' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0)), $form->getFiles(), '->getFiles() only returns file fields for PUT'); + $this->assertEquals(['foo[bar]' => ['name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0]], $form->getFiles(), '->getFiles() only returns file fields for PUT'); $form = $this->createForm('
    ', 'delete'); - $this->assertEquals(array('foo[bar]' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0)), $form->getFiles(), '->getFiles() only returns file fields for DELETE'); + $this->assertEquals(['foo[bar]' => ['name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0]], $form->getFiles(), '->getFiles() only returns file fields for DELETE'); $form = $this->createForm('
    ', 'patch'); - $this->assertEquals(array('foo[bar]' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0)), $form->getFiles(), '->getFiles() only returns file fields for PATCH'); + $this->assertEquals(['foo[bar]' => ['name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0]], $form->getFiles(), '->getFiles() only returns file fields for PATCH'); $form = $this->createForm('
    '); - $this->assertEquals(array(), $form->getFiles(), '->getFiles() does not include disabled file fields'); + $this->assertEquals([], $form->getFiles(), '->getFiles() does not include disabled file fields'); $form = $this->createForm('
    '); - $this->assertEquals(array(), $form->getFiles(), '->getFiles() does not include template file fields'); + $this->assertEquals([], $form->getFiles(), '->getFiles() does not include template file fields'); $this->assertFalse($form->has('foo')); } public function testGetPhpFiles() { $form = $this->createForm('
    '); - $this->assertEquals(array('foo' => array('bar' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0))), $form->getPhpFiles(), '->getPhpFiles() converts keys with [] to arrays'); + $this->assertEquals(['foo' => ['bar' => ['name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0]]], $form->getPhpFiles(), '->getPhpFiles() converts keys with [] to arrays'); $form = $this->createForm('
    '); - $this->assertEquals(array('f.o o' => array('bar' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0))), $form->getPhpFiles(), '->getPhpFiles() preserves periods and spaces in names'); + $this->assertEquals(['f.o o' => ['bar' => ['name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0]]], $form->getPhpFiles(), '->getPhpFiles() preserves periods and spaces in names'); $form = $this->createForm('
    '); - $this->assertEquals(array('f.o o' => array('bar' => array('ba.z' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0), array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0)))), $form->getPhpFiles(), '->getPhpFiles() preserves periods and spaces in names recursively'); + $this->assertEquals(['f.o o' => ['bar' => ['ba.z' => ['name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0], ['name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0]]]], $form->getPhpFiles(), '->getPhpFiles() preserves periods and spaces in names recursively'); $form = $this->createForm('
    '); $files = $form->getPhpFiles(); @@ -478,7 +478,7 @@ class FormTest extends TestCase $this->assertSame(4, $files['foo']['bar']['error'], '->getPhpFiles() converts error to int'); $form = $this->createForm('
    '); - $this->assertEquals(array('size' => array('error' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0))), $form->getPhpFiles(), '->getPhpFiles() int conversion does not collide with file names'); + $this->assertEquals(['size' => ['error' => ['name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0]]], $form->getPhpFiles(), '->getPhpFiles() int conversion does not collide with file names'); } /** @@ -559,83 +559,83 @@ class FormTest extends TestCase public function provideGetUriValues() { - return array( - array( + return [ + [ 'returns the URI of the form', '
    ', - array(), + [], '/foo', - ), - array( + ], + [ 'appends the form values if the method is get', '
    ', - array(), + [], '/foo?foo=foo', - ), - array( + ], + [ 'appends the form values and merges the submitted values', '
    ', - array('foo' => 'bar'), + ['foo' => 'bar'], '/foo?foo=bar', - ), - array( + ], + [ 'does not append values if the method is post', '
    ', - array(), + [], '/foo', - ), - array( + ], + [ 'does not append values if the method is patch', '
    ', - array(), + [], '/foo', 'PUT', - ), - array( + ], + [ 'does not append values if the method is delete', '
    ', - array(), + [], '/foo', 'DELETE', - ), - array( + ], + [ 'does not append values if the method is put', '
    ', - array(), + [], '/foo', 'PATCH', - ), - array( + ], + [ 'appends the form values to an existing query string', '
    ', - array(), + [], '/foo?bar=bar&foo=foo', - ), - array( + ], + [ 'replaces query values with the form values', '
    ', - array(), + [], '/foo?bar=foo', - ), - array( + ], + [ 'returns an empty URI if the action is empty', '
    ', - array(), + [], '/', - ), - array( + ], + [ 'appends the form values even if the action is empty', '
    ', - array(), + [], '/?foo=foo', - ), - array( + ], + [ 'chooses the path if the action attribute value is a sharp (#)', '
    ', - array(), + [], '/#', - ), - ); + ], + ]; } public function testHas() @@ -761,7 +761,7 @@ class FormTest extends TestCase $registry->add($this->getFormFieldMock('bar[baz]')); $this->assertEquals( - array('foo[0]', 'foo[1]', 'bar[5]', 'bar[6]', 'bar[baz]'), + ['foo[0]', 'foo[1]', 'bar[5]', 'bar[6]', 'bar[baz]'], array_keys($registry->all()) ); } @@ -795,13 +795,13 @@ class FormTest extends TestCase $registry->set('foo[3]', 3); $registry->set('foo[bar][baz]', 'fbb'); - $registry->set('foo', array( + $registry->set('foo', [ 2 => 2, 3 => 3, - 'bar' => array( + 'bar' => [ 'baz' => 'fbb', - ), - )); + ], + ]); } /** @@ -825,7 +825,7 @@ class FormTest extends TestCase $registry = new FormFieldRegistry(); $registry->add($this->getFormFieldMock('bar')); - $registry->set('bar', array('baz')); + $registry->set('bar', ['baz']); } public function testDifferentFieldTypesWithSameName() @@ -854,7 +854,7 @@ class FormTest extends TestCase { $field = $this ->getMockBuilder('Symfony\\Component\\DomCrawler\\Field\\FormField') - ->setMethods(array('getName', 'getValue', 'setValue', 'initialize')) + ->setMethods(['getName', 'getValue', 'setValue', 'initialize']) ->disableOriginalConstructor() ->getMock() ; @@ -965,6 +965,6 @@ class FormTest extends TestCase $nodes = $dom->getElementsByTagName('form'); $form = new Form($nodes->item(0), 'http://example.com'); - $this->assertEquals($form->getPhpValues(), array('example' => '')); + $this->assertEquals($form->getPhpValues(), ['example' => '']); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/ImageTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/ImageTest.php index 309578a9..7f9c7192 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/ImageTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/ImageTest.php @@ -41,9 +41,9 @@ class ImageTest extends TestCase public function getGetUriTests() { - return array( - array('/foo.png', 'http://localhost/bar/foo/', 'http://localhost/foo.png'), - array('foo.png', 'http://localhost/bar/foo/', 'http://localhost/bar/foo/foo.png'), - ); + return [ + ['/foo.png', 'http://localhost/bar/foo/', 'http://localhost/foo.png'], + ['foo.png', 'http://localhost/bar/foo/', 'http://localhost/bar/foo/foo.png'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/LinkTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/LinkTest.php index 3f036470..3cbcdbd6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/LinkTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/LinkTest.php @@ -101,61 +101,61 @@ class LinkTest extends TestCase public function getGetUriTests() { - return array( - array('/foo', 'http://localhost/bar/foo/', 'http://localhost/foo'), - array('/foo', 'http://localhost/bar/foo', 'http://localhost/foo'), - array(' - /foo', 'http://localhost/bar/foo/', 'http://localhost/foo'), - array('/foo - ', 'http://localhost/bar/foo', 'http://localhost/foo'), + return [ + ['/foo', 'http://localhost/bar/foo/', 'http://localhost/foo'], + ['/foo', 'http://localhost/bar/foo', 'http://localhost/foo'], + [' + /foo', 'http://localhost/bar/foo/', 'http://localhost/foo'], + ['/foo + ', 'http://localhost/bar/foo', 'http://localhost/foo'], - array('foo', 'http://localhost/bar/foo/', 'http://localhost/bar/foo/foo'), - array('foo', 'http://localhost/bar/foo', 'http://localhost/bar/foo'), + ['foo', 'http://localhost/bar/foo/', 'http://localhost/bar/foo/foo'], + ['foo', 'http://localhost/bar/foo', 'http://localhost/bar/foo'], - array('', 'http://localhost/bar/', 'http://localhost/bar/'), - array('#', 'http://localhost/bar/', 'http://localhost/bar/#'), - array('#bar', 'http://localhost/bar?a=b', 'http://localhost/bar?a=b#bar'), - array('#bar', 'http://localhost/bar/#foo', 'http://localhost/bar/#bar'), - array('?a=b', 'http://localhost/bar#foo', 'http://localhost/bar?a=b'), - array('?a=b', 'http://localhost/bar/', 'http://localhost/bar/?a=b'), + ['', 'http://localhost/bar/', 'http://localhost/bar/'], + ['#', 'http://localhost/bar/', 'http://localhost/bar/#'], + ['#bar', 'http://localhost/bar?a=b', 'http://localhost/bar?a=b#bar'], + ['#bar', 'http://localhost/bar/#foo', 'http://localhost/bar/#bar'], + ['?a=b', 'http://localhost/bar#foo', 'http://localhost/bar?a=b'], + ['?a=b', 'http://localhost/bar/', 'http://localhost/bar/?a=b'], - array('http://login.foo.com/foo', 'http://localhost/bar/', 'http://login.foo.com/foo'), - array('https://login.foo.com/foo', 'https://localhost/bar/', 'https://login.foo.com/foo'), - array('mailto:foo@bar.com', 'http://localhost/foo', 'mailto:foo@bar.com'), + ['http://login.foo.com/foo', 'http://localhost/bar/', 'http://login.foo.com/foo'], + ['https://login.foo.com/foo', 'https://localhost/bar/', 'https://login.foo.com/foo'], + ['mailto:foo@bar.com', 'http://localhost/foo', 'mailto:foo@bar.com'], // tests schema relative URL (issue #7169) - array('//login.foo.com/foo', 'http://localhost/bar/', 'http://login.foo.com/foo'), - array('//login.foo.com/foo', 'https://localhost/bar/', 'https://login.foo.com/foo'), + ['//login.foo.com/foo', 'http://localhost/bar/', 'http://login.foo.com/foo'], + ['//login.foo.com/foo', 'https://localhost/bar/', 'https://login.foo.com/foo'], - array('?foo=2', 'http://localhost?foo=1', 'http://localhost?foo=2'), - array('?foo=2', 'http://localhost/?foo=1', 'http://localhost/?foo=2'), - array('?foo=2', 'http://localhost/bar?foo=1', 'http://localhost/bar?foo=2'), - array('?foo=2', 'http://localhost/bar/?foo=1', 'http://localhost/bar/?foo=2'), - array('?bar=2', 'http://localhost?foo=1', 'http://localhost?bar=2'), + ['?foo=2', 'http://localhost?foo=1', 'http://localhost?foo=2'], + ['?foo=2', 'http://localhost/?foo=1', 'http://localhost/?foo=2'], + ['?foo=2', 'http://localhost/bar?foo=1', 'http://localhost/bar?foo=2'], + ['?foo=2', 'http://localhost/bar/?foo=1', 'http://localhost/bar/?foo=2'], + ['?bar=2', 'http://localhost?foo=1', 'http://localhost?bar=2'], - array('foo', 'http://login.foo.com/bar/baz?/query/string', 'http://login.foo.com/bar/foo'), + ['foo', 'http://login.foo.com/bar/baz?/query/string', 'http://login.foo.com/bar/foo'], - array('.', 'http://localhost/foo/bar/baz', 'http://localhost/foo/bar/'), - array('./', 'http://localhost/foo/bar/baz', 'http://localhost/foo/bar/'), - array('./foo', 'http://localhost/foo/bar/baz', 'http://localhost/foo/bar/foo'), - array('..', 'http://localhost/foo/bar/baz', 'http://localhost/foo/'), - array('../', 'http://localhost/foo/bar/baz', 'http://localhost/foo/'), - array('../foo', 'http://localhost/foo/bar/baz', 'http://localhost/foo/foo'), - array('../..', 'http://localhost/foo/bar/baz', 'http://localhost/'), - array('../../', 'http://localhost/foo/bar/baz', 'http://localhost/'), - array('../../foo', 'http://localhost/foo/bar/baz', 'http://localhost/foo'), - array('../../foo', 'http://localhost/bar/foo/', 'http://localhost/foo'), - array('../bar/../../foo', 'http://localhost/bar/foo/', 'http://localhost/foo'), - array('../bar/./../../foo', 'http://localhost/bar/foo/', 'http://localhost/foo'), - array('../../', 'http://localhost/', 'http://localhost/'), - array('../../', 'http://localhost', 'http://localhost/'), + ['.', 'http://localhost/foo/bar/baz', 'http://localhost/foo/bar/'], + ['./', 'http://localhost/foo/bar/baz', 'http://localhost/foo/bar/'], + ['./foo', 'http://localhost/foo/bar/baz', 'http://localhost/foo/bar/foo'], + ['..', 'http://localhost/foo/bar/baz', 'http://localhost/foo/'], + ['../', 'http://localhost/foo/bar/baz', 'http://localhost/foo/'], + ['../foo', 'http://localhost/foo/bar/baz', 'http://localhost/foo/foo'], + ['../..', 'http://localhost/foo/bar/baz', 'http://localhost/'], + ['../../', 'http://localhost/foo/bar/baz', 'http://localhost/'], + ['../../foo', 'http://localhost/foo/bar/baz', 'http://localhost/foo'], + ['../../foo', 'http://localhost/bar/foo/', 'http://localhost/foo'], + ['../bar/../../foo', 'http://localhost/bar/foo/', 'http://localhost/foo'], + ['../bar/./../../foo', 'http://localhost/bar/foo/', 'http://localhost/foo'], + ['../../', 'http://localhost/', 'http://localhost/'], + ['../../', 'http://localhost', 'http://localhost/'], - array('/foo', 'http://localhost?bar=1', 'http://localhost/foo'), - array('/foo', 'http://localhost#bar', 'http://localhost/foo'), - array('/foo', 'file:///', 'file:///foo'), - array('/foo', 'file:///bar/baz', 'file:///foo'), - array('foo', 'file:///', 'file:///foo'), - array('foo', 'file:///bar/baz', 'file:///bar/foo'), - ); + ['/foo', 'http://localhost?bar=1', 'http://localhost/foo'], + ['/foo', 'http://localhost#bar', 'http://localhost/foo'], + ['/foo', 'file:///', 'file:///foo'], + ['/foo', 'file:///bar/baz', 'file:///foo'], + ['foo', 'file:///', 'file:///foo'], + ['foo', 'file:///bar/baz', 'file:///bar/foo'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Dotenv/Dotenv.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Dotenv/Dotenv.php index e5f5cd7e..d21e0435 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Dotenv/Dotenv.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Dotenv/Dotenv.php @@ -107,12 +107,12 @@ final class Dotenv public function parse($data, $path = '.env') { $this->path = $path; - $this->data = str_replace(array("\r\n", "\r"), "\n", $data); + $this->data = str_replace(["\r\n", "\r"], "\n", $data); $this->lineno = 1; $this->cursor = 0; $this->end = \strlen($this->data); $this->state = self::STATE_VARNAME; - $this->values = array(); + $this->values = []; $name = ''; $this->skipEmptyLines(); @@ -138,7 +138,7 @@ final class Dotenv try { return $this->values; } finally { - $this->values = array(); + $this->values = []; $this->data = null; $this->path = null; } @@ -161,7 +161,7 @@ final class Dotenv } if (' ' === $this->data[$this->cursor] || "\t" === $this->data[$this->cursor]) { - throw $this->createFormatException('Whitespace are not supported after the variable name'); + throw $this->createFormatException('Whitespace characters are not supported after the variable name'); } if ('=' !== $this->data[$this->cursor]) { @@ -224,7 +224,7 @@ final class Dotenv throw $this->createFormatException('Missing quote to end the value'); } ++$this->cursor; - $value = str_replace(array('\\"', '\r', '\n'), array('"', "\r", "\n"), $value); + $value = str_replace(['\\"', '\r', '\n'], ['"', "\r", "\n"], $value); $resolvedValue = $value; $resolvedValue = $this->resolveVariables($resolvedValue); $resolvedValue = $this->resolveCommands($resolvedValue); @@ -233,7 +233,7 @@ final class Dotenv } else { $value = ''; $prevChr = $this->data[$this->cursor - 1]; - while ($this->cursor < $this->end && !\in_array($this->data[$this->cursor], array("\n", '"', "'"), true) && !((' ' === $prevChr || "\t" === $prevChr) && '#' === $this->data[$this->cursor])) { + while ($this->cursor < $this->end && !\in_array($this->data[$this->cursor], ["\n", '"', "'"], true) && !((' ' === $prevChr || "\t" === $prevChr) && '#' === $this->data[$this->cursor])) { if ('\\' === $this->data[$this->cursor] && isset($this->data[$this->cursor + 1]) && ('"' === $this->data[$this->cursor + 1] || "'" === $this->data[$this->cursor + 1])) { ++$this->cursor; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Dotenv/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Dotenv/LICENSE index fcd3fa76..3c464ca9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Dotenv/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Dotenv/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016-2018 Fabien Potencier +Copyright (c) 2016-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Dotenv/Tests/DotenvTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Dotenv/Tests/DotenvTest.php index 332c2052..7137d83b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Dotenv/Tests/DotenvTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Dotenv/Tests/DotenvTest.php @@ -34,18 +34,18 @@ class DotenvTest extends TestCase public function getEnvDataWithFormatErrors() { - $tests = array( - array('FOO=BAR BAZ', "A value containing spaces must be surrounded by quotes in \".env\" at line 1.\n...FOO=BAR BAZ...\n ^ line 1 offset 11"), - array('FOO BAR=BAR', "Whitespace are not supported after the variable name in \".env\" at line 1.\n...FOO BAR=BAR...\n ^ line 1 offset 3"), - array('FOO', "Missing = in the environment variable declaration in \".env\" at line 1.\n...FOO...\n ^ line 1 offset 3"), - array('FOO="foo', "Missing quote to end the value in \".env\" at line 1.\n...FOO=\"foo...\n ^ line 1 offset 8"), - array('FOO=\'foo', "Missing quote to end the value in \".env\" at line 1.\n...FOO='foo...\n ^ line 1 offset 8"), - array('export FOO', "Unable to unset an environment variable in \".env\" at line 1.\n...export FOO...\n ^ line 1 offset 10"), - array('FOO=${FOO', "Unclosed braces on variable expansion in \".env\" at line 1.\n...FOO=\${FOO...\n ^ line 1 offset 9"), - ); + $tests = [ + ['FOO=BAR BAZ', "A value containing spaces must be surrounded by quotes in \".env\" at line 1.\n...FOO=BAR BAZ...\n ^ line 1 offset 11"], + ['FOO BAR=BAR', "Whitespace characters are not supported after the variable name in \".env\" at line 1.\n...FOO BAR=BAR...\n ^ line 1 offset 3"], + ['FOO', "Missing = in the environment variable declaration in \".env\" at line 1.\n...FOO...\n ^ line 1 offset 3"], + ['FOO="foo', "Missing quote to end the value in \".env\" at line 1.\n...FOO=\"foo...\n ^ line 1 offset 8"], + ['FOO=\'foo', "Missing quote to end the value in \".env\" at line 1.\n...FOO='foo...\n ^ line 1 offset 8"], + ['export FOO', "Unable to unset an environment variable in \".env\" at line 1.\n...export FOO...\n ^ line 1 offset 10"], + ['FOO=${FOO', "Unclosed braces on variable expansion in \".env\" at line 1.\n...FOO=\${FOO...\n ^ line 1 offset 9"], + ]; if ('\\' !== \DIRECTORY_SEPARATOR) { - $tests[] = array('FOO=$((1dd2))', "Issue expanding a command (%s\n) in \".env\" at line 1.\n...FOO=$((1dd2))...\n ^ line 1 offset 13"); + $tests[] = ['FOO=$((1dd2))', "Issue expanding a command (%s\n) in \".env\" at line 1.\n...FOO=$((1dd2))...\n ^ line 1 offset 13"]; } return $tests; @@ -65,104 +65,104 @@ class DotenvTest extends TestCase putenv('LOCAL=local'); $_ENV['REMOTE'] = 'remote'; - $tests = array( + $tests = [ // backslashes - array('FOO=foo\\\\bar', array('FOO' => 'foo\\bar')), - array("FOO='foo\\\\bar'", array('FOO' => 'foo\\\\bar')), - array('FOO="foo\\\\bar"', array('FOO' => 'foo\\bar')), + ['FOO=foo\\\\bar', ['FOO' => 'foo\\bar']], + ["FOO='foo\\\\bar'", ['FOO' => 'foo\\\\bar']], + ['FOO="foo\\\\bar"', ['FOO' => 'foo\\bar']], // escaped backslash in front of variable - array("BAR=bar\nFOO=foo\\\\\$BAR", array('BAR' => 'bar', 'FOO' => 'foo\\bar')), - array("BAR=bar\nFOO='foo\\\\\$BAR'", array('BAR' => 'bar', 'FOO' => 'foo\\\\$BAR')), - array("BAR=bar\nFOO=\"foo\\\\\$BAR\"", array('BAR' => 'bar', 'FOO' => 'foo\\bar')), + ["BAR=bar\nFOO=foo\\\\\$BAR", ['BAR' => 'bar', 'FOO' => 'foo\\bar']], + ["BAR=bar\nFOO='foo\\\\\$BAR'", ['BAR' => 'bar', 'FOO' => 'foo\\\\$BAR']], + ["BAR=bar\nFOO=\"foo\\\\\$BAR\"", ['BAR' => 'bar', 'FOO' => 'foo\\bar']], - array('FOO=foo\\\\\\$BAR', array('FOO' => 'foo\\$BAR')), - array('FOO=\'foo\\\\\\$BAR\'', array('FOO' => 'foo\\\\\\$BAR')), - array('FOO="foo\\\\\\$BAR"', array('FOO' => 'foo\\$BAR')), + ['FOO=foo\\\\\\$BAR', ['FOO' => 'foo\\$BAR']], + ['FOO=\'foo\\\\\\$BAR\'', ['FOO' => 'foo\\\\\\$BAR']], + ['FOO="foo\\\\\\$BAR"', ['FOO' => 'foo\\$BAR']], // spaces - array('FOO=bar', array('FOO' => 'bar')), - array(' FOO=bar ', array('FOO' => 'bar')), - array('FOO=', array('FOO' => '')), - array("FOO=\n\n\nBAR=bar", array('FOO' => '', 'BAR' => 'bar')), - array('FOO= ', array('FOO' => '')), - array("FOO=\nBAR=bar", array('FOO' => '', 'BAR' => 'bar')), + ['FOO=bar', ['FOO' => 'bar']], + [' FOO=bar ', ['FOO' => 'bar']], + ['FOO=', ['FOO' => '']], + ["FOO=\n\n\nBAR=bar", ['FOO' => '', 'BAR' => 'bar']], + ['FOO= ', ['FOO' => '']], + ["FOO=\nBAR=bar", ['FOO' => '', 'BAR' => 'bar']], // newlines - array("\n\nFOO=bar\r\n\n", array('FOO' => 'bar')), - array("FOO=bar\r\nBAR=foo", array('FOO' => 'bar', 'BAR' => 'foo')), - array("FOO=bar\rBAR=foo", array('FOO' => 'bar', 'BAR' => 'foo')), - array("FOO=bar\nBAR=foo", array('FOO' => 'bar', 'BAR' => 'foo')), + ["\n\nFOO=bar\r\n\n", ['FOO' => 'bar']], + ["FOO=bar\r\nBAR=foo", ['FOO' => 'bar', 'BAR' => 'foo']], + ["FOO=bar\rBAR=foo", ['FOO' => 'bar', 'BAR' => 'foo']], + ["FOO=bar\nBAR=foo", ['FOO' => 'bar', 'BAR' => 'foo']], // quotes - array("FOO=\"bar\"\n", array('FOO' => 'bar')), - array("FOO=\"bar'foo\"\n", array('FOO' => 'bar\'foo')), - array("FOO='bar'\n", array('FOO' => 'bar')), - array("FOO='bar\"foo'\n", array('FOO' => 'bar"foo')), - array("FOO=\"bar\\\"foo\"\n", array('FOO' => 'bar"foo')), - array('FOO="bar\nfoo"', array('FOO' => "bar\nfoo")), - array('FOO="bar\rfoo"', array('FOO' => "bar\rfoo")), - array('FOO=\'bar\nfoo\'', array('FOO' => 'bar\nfoo')), - array('FOO=\'bar\rfoo\'', array('FOO' => 'bar\rfoo')), - array('FOO=" FOO "', array('FOO' => ' FOO ')), - array('FOO=" "', array('FOO' => ' ')), - array('PATH="c:\\\\"', array('PATH' => 'c:\\')), - array("FOO=\"bar\nfoo\"", array('FOO' => "bar\nfoo")), - array('FOO=BAR\\"', array('FOO' => 'BAR"')), - array("FOO=BAR\\'BAZ", array('FOO' => "BAR'BAZ")), - array('FOO=\\"BAR', array('FOO' => '"BAR')), + ["FOO=\"bar\"\n", ['FOO' => 'bar']], + ["FOO=\"bar'foo\"\n", ['FOO' => 'bar\'foo']], + ["FOO='bar'\n", ['FOO' => 'bar']], + ["FOO='bar\"foo'\n", ['FOO' => 'bar"foo']], + ["FOO=\"bar\\\"foo\"\n", ['FOO' => 'bar"foo']], + ['FOO="bar\nfoo"', ['FOO' => "bar\nfoo"]], + ['FOO="bar\rfoo"', ['FOO' => "bar\rfoo"]], + ['FOO=\'bar\nfoo\'', ['FOO' => 'bar\nfoo']], + ['FOO=\'bar\rfoo\'', ['FOO' => 'bar\rfoo']], + ['FOO=" FOO "', ['FOO' => ' FOO ']], + ['FOO=" "', ['FOO' => ' ']], + ['PATH="c:\\\\"', ['PATH' => 'c:\\']], + ["FOO=\"bar\nfoo\"", ['FOO' => "bar\nfoo"]], + ['FOO=BAR\\"', ['FOO' => 'BAR"']], + ["FOO=BAR\\'BAZ", ['FOO' => "BAR'BAZ"]], + ['FOO=\\"BAR', ['FOO' => '"BAR']], // concatenated values - array("FOO='bar''foo'\n", array('FOO' => 'barfoo')), - array("FOO='bar '' baz'", array('FOO' => 'bar baz')), - array("FOO=bar\nBAR='baz'\"\$FOO\"", array('FOO' => 'bar', 'BAR' => 'bazbar')), - array("FOO='bar '\\'' baz'", array('FOO' => "bar ' baz")), + ["FOO='bar''foo'\n", ['FOO' => 'barfoo']], + ["FOO='bar '' baz'", ['FOO' => 'bar baz']], + ["FOO=bar\nBAR='baz'\"\$FOO\"", ['FOO' => 'bar', 'BAR' => 'bazbar']], + ["FOO='bar '\\'' baz'", ['FOO' => "bar ' baz"]], // comments - array("#FOO=bar\nBAR=foo", array('BAR' => 'foo')), - array("#FOO=bar # Comment\nBAR=foo", array('BAR' => 'foo')), - array("FOO='bar foo' # Comment", array('FOO' => 'bar foo')), - array("FOO='bar#foo' # Comment", array('FOO' => 'bar#foo')), - array("# Comment\r\nFOO=bar\n# Comment\nBAR=foo", array('FOO' => 'bar', 'BAR' => 'foo')), - array("FOO=bar # Another comment\nBAR=foo", array('FOO' => 'bar', 'BAR' => 'foo')), - array("FOO=\n\n# comment\nBAR=bar", array('FOO' => '', 'BAR' => 'bar')), - array('FOO=NOT#COMMENT', array('FOO' => 'NOT#COMMENT')), - array('FOO= # Comment', array('FOO' => '')), + ["#FOO=bar\nBAR=foo", ['BAR' => 'foo']], + ["#FOO=bar # Comment\nBAR=foo", ['BAR' => 'foo']], + ["FOO='bar foo' # Comment", ['FOO' => 'bar foo']], + ["FOO='bar#foo' # Comment", ['FOO' => 'bar#foo']], + ["# Comment\r\nFOO=bar\n# Comment\nBAR=foo", ['FOO' => 'bar', 'BAR' => 'foo']], + ["FOO=bar # Another comment\nBAR=foo", ['FOO' => 'bar', 'BAR' => 'foo']], + ["FOO=\n\n# comment\nBAR=bar", ['FOO' => '', 'BAR' => 'bar']], + ['FOO=NOT#COMMENT', ['FOO' => 'NOT#COMMENT']], + ['FOO= # Comment', ['FOO' => '']], // edge cases (no conversions, only strings as values) - array('FOO=0', array('FOO' => '0')), - array('FOO=false', array('FOO' => 'false')), - array('FOO=null', array('FOO' => 'null')), + ['FOO=0', ['FOO' => '0']], + ['FOO=false', ['FOO' => 'false']], + ['FOO=null', ['FOO' => 'null']], // export - array('export FOO=bar', array('FOO' => 'bar')), - array(' export FOO=bar', array('FOO' => 'bar')), + ['export FOO=bar', ['FOO' => 'bar']], + [' export FOO=bar', ['FOO' => 'bar']], // variable expansion - array("FOO=BAR\nBAR=\$FOO", array('FOO' => 'BAR', 'BAR' => 'BAR')), - array("FOO=BAR\nBAR=\"\$FOO\"", array('FOO' => 'BAR', 'BAR' => 'BAR')), - array("FOO=BAR\nBAR='\$FOO'", array('FOO' => 'BAR', 'BAR' => '$FOO')), - array("FOO_BAR9=BAR\nBAR=\$FOO_BAR9", array('FOO_BAR9' => 'BAR', 'BAR' => 'BAR')), - array("FOO=BAR\nBAR=\${FOO}Z", array('FOO' => 'BAR', 'BAR' => 'BARZ')), - array("FOO=BAR\nBAR=\$FOO}", array('FOO' => 'BAR', 'BAR' => 'BAR}')), - array("FOO=BAR\nBAR=\\\$FOO", array('FOO' => 'BAR', 'BAR' => '$FOO')), - array('FOO=" \\$ "', array('FOO' => ' $ ')), - array('FOO=" $ "', array('FOO' => ' $ ')), - array('BAR=$LOCAL', array('BAR' => 'local')), - array('BAR=$REMOTE', array('BAR' => 'remote')), - array('FOO=$NOTDEFINED', array('FOO' => '')), - ); + ["FOO=BAR\nBAR=\$FOO", ['FOO' => 'BAR', 'BAR' => 'BAR']], + ["FOO=BAR\nBAR=\"\$FOO\"", ['FOO' => 'BAR', 'BAR' => 'BAR']], + ["FOO=BAR\nBAR='\$FOO'", ['FOO' => 'BAR', 'BAR' => '$FOO']], + ["FOO_BAR9=BAR\nBAR=\$FOO_BAR9", ['FOO_BAR9' => 'BAR', 'BAR' => 'BAR']], + ["FOO=BAR\nBAR=\${FOO}Z", ['FOO' => 'BAR', 'BAR' => 'BARZ']], + ["FOO=BAR\nBAR=\$FOO}", ['FOO' => 'BAR', 'BAR' => 'BAR}']], + ["FOO=BAR\nBAR=\\\$FOO", ['FOO' => 'BAR', 'BAR' => '$FOO']], + ['FOO=" \\$ "', ['FOO' => ' $ ']], + ['FOO=" $ "', ['FOO' => ' $ ']], + ['BAR=$LOCAL', ['BAR' => 'local']], + ['BAR=$REMOTE', ['BAR' => 'remote']], + ['FOO=$NOTDEFINED', ['FOO' => '']], + ]; if ('\\' !== \DIRECTORY_SEPARATOR) { - $tests = array_merge($tests, array( + $tests = array_merge($tests, [ // command expansion - array('FOO=$(echo foo)', array('FOO' => 'foo')), - array('FOO=$((1+2))', array('FOO' => '3')), - array('FOO=FOO$((1+2))BAR', array('FOO' => 'FOO3BAR')), - array('FOO=$(echo "$(echo "$(echo "$(echo foo)")")")', array('FOO' => 'foo')), - array("FOO=$(echo \"Quotes won't be a problem\")", array('FOO' => 'Quotes won\'t be a problem')), - array("FOO=bar\nBAR=$(echo \"FOO is \$FOO\")", array('FOO' => 'bar', 'BAR' => 'FOO is bar')), - )); + ['FOO=$(echo foo)', ['FOO' => 'foo']], + ['FOO=$((1+2))', ['FOO' => '3']], + ['FOO=FOO$((1+2))BAR', ['FOO' => 'FOO3BAR']], + ['FOO=$(echo "$(echo "$(echo "$(echo foo)")")")', ['FOO' => 'foo']], + ["FOO=$(echo \"Quotes won't be a problem\")", ['FOO' => 'Quotes won\'t be a problem']], + ["FOO=bar\nBAR=$(echo \"FOO is \$FOO\")", ['FOO' => 'bar', 'BAR' => 'FOO is bar']], + ]); } return $tests; @@ -214,7 +214,7 @@ class DotenvTest extends TestCase $originalValue = $_SERVER['argc']; $dotenv = new Dotenv(); - $dotenv->populate(array('argc' => 'new_value')); + $dotenv->populate(['argc' => 'new_value']); $this->assertSame($originalValue, $_SERVER['argc']); } @@ -225,7 +225,7 @@ class DotenvTest extends TestCase $_SERVER['TEST_ENV_VAR'] = 'original_value'; $dotenv = new Dotenv(); - $dotenv->populate(array('TEST_ENV_VAR' => 'new_value')); + $dotenv->populate(['TEST_ENV_VAR' => 'new_value']); $this->assertSame('original_value', getenv('TEST_ENV_VAR')); } @@ -235,7 +235,7 @@ class DotenvTest extends TestCase $_SERVER['HTTP_TEST_ENV_VAR'] = 'http_value'; $dotenv = new Dotenv(); - $dotenv->populate(array('HTTP_TEST_ENV_VAR' => 'env_value')); + $dotenv->populate(['HTTP_TEST_ENV_VAR' => 'env_value']); $this->assertSame('env_value', getenv('HTTP_TEST_ENV_VAR')); $this->assertSame('env_value', $_ENV['HTTP_TEST_ENV_VAR']); @@ -257,7 +257,7 @@ class DotenvTest extends TestCase putenv('DATABASE_URL'); $dotenv = new Dotenv(); - $dotenv->populate(array('APP_DEBUG' => '1', 'DATABASE_URL' => 'mysql://root@localhost/db')); + $dotenv->populate(['APP_DEBUG' => '1', 'DATABASE_URL' => 'mysql://root@localhost/db']); $this->assertSame('APP_DEBUG,DATABASE_URL', getenv('SYMFONY_DOTENV_VARS')); @@ -274,8 +274,8 @@ class DotenvTest extends TestCase putenv('DATABASE_URL'); $dotenv = new Dotenv(); - $dotenv->populate(array('APP_DEBUG' => '0', 'DATABASE_URL' => 'mysql://root@localhost/db')); - $dotenv->populate(array('DATABASE_URL' => 'sqlite:///somedb.sqlite')); + $dotenv->populate(['APP_DEBUG' => '0', 'DATABASE_URL' => 'mysql://root@localhost/db']); + $dotenv->populate(['DATABASE_URL' => 'sqlite:///somedb.sqlite']); $this->assertSame('APP_ENV,DATABASE_URL', getenv('SYMFONY_DOTENV_VARS')); } @@ -290,7 +290,7 @@ class DotenvTest extends TestCase putenv('DOCUMENT_ROOT=/var/www'); $dotenv = new Dotenv(); - $dotenv->populate(array('FOO' => 'foo1', 'BAR' => 'bar1', 'BAZ' => 'baz1', 'DOCUMENT_ROOT' => '/boot')); + $dotenv->populate(['FOO' => 'foo1', 'BAR' => 'bar1', 'BAZ' => 'baz1', 'DOCUMENT_ROOT' => '/boot']); $this->assertSame('foo1', getenv('FOO')); $this->assertSame('bar1', getenv('BAR')); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php index cd44a31c..aeafd9ec 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php @@ -30,12 +30,12 @@ class ContainerAwareEventDispatcher extends EventDispatcher /** * The service IDs of the event listeners and subscribers. */ - private $listenerIds = array(); + private $listenerIds = []; /** * The services registered as listeners. */ - private $listeners = array(); + private $listeners = []; public function __construct(ContainerInterface $container) { @@ -67,10 +67,10 @@ class ContainerAwareEventDispatcher extends EventDispatcher @trigger_error(sprintf('The %s class is deprecated since Symfony 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead.', __CLASS__), E_USER_DEPRECATED); if (!\is_array($callback) || 2 !== \count($callback)) { - throw new \InvalidArgumentException('Expected an array("service", "method") argument'); + throw new \InvalidArgumentException('Expected an ["service", "method"] argument'); } - $this->listenerIds[$eventName][] = array($callback[0], $callback[1], $priority); + $this->listenerIds[$eventName][] = [$callback[0], $callback[1], $priority]; } public function removeListener($eventName, $listener) @@ -80,7 +80,7 @@ class ContainerAwareEventDispatcher extends EventDispatcher if (isset($this->listenerIds[$eventName])) { foreach ($this->listenerIds[$eventName] as $i => list($serviceId, $method)) { $key = $serviceId.'.'.$method; - if (isset($this->listeners[$eventName][$key]) && $listener === array($this->listeners[$eventName][$key], $method)) { + if (isset($this->listeners[$eventName][$key]) && $listener === [$this->listeners[$eventName][$key], $method]) { unset($this->listeners[$eventName][$key]); if (empty($this->listeners[$eventName])) { unset($this->listeners[$eventName]); @@ -150,12 +150,12 @@ class ContainerAwareEventDispatcher extends EventDispatcher foreach ($class::getSubscribedEvents() as $eventName => $params) { if (\is_string($params)) { - $this->listenerIds[$eventName][] = array($serviceId, $params, 0); + $this->listenerIds[$eventName][] = [$serviceId, $params, 0]; } elseif (\is_string($params[0])) { - $this->listenerIds[$eventName][] = array($serviceId, $params[0], isset($params[1]) ? $params[1] : 0); + $this->listenerIds[$eventName][] = [$serviceId, $params[0], isset($params[1]) ? $params[1] : 0]; } else { foreach ($params as $listener) { - $this->listenerIds[$eventName][] = array($serviceId, $listener[0], isset($listener[1]) ? $listener[1] : 0); + $this->listenerIds[$eventName][] = [$serviceId, $listener[0], isset($listener[1]) ? $listener[1] : 0]; } } } @@ -184,10 +184,10 @@ class ContainerAwareEventDispatcher extends EventDispatcher $key = $serviceId.'.'.$method; if (!isset($this->listeners[$eventName][$key])) { - $this->addListener($eventName, array($listener, $method), $priority); + $this->addListener($eventName, [$listener, $method], $priority); } elseif ($this->listeners[$eventName][$key] !== $listener) { - parent::removeListener($eventName, array($this->listeners[$eventName][$key], $method)); - $this->addListener($eventName, array($listener, $method), $priority); + parent::removeListener($eventName, [$this->listeners[$eventName][$key], $method]); + $this->addListener($eventName, [$listener, $method], $priority); } $this->listeners[$eventName][$key] = $listener; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php index 7577b85a..2339a688 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php @@ -29,7 +29,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface protected $logger; protected $stopwatch; - private $called; + private $callStack; private $dispatcher; private $wrappedListeners; @@ -38,8 +38,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface $this->dispatcher = $dispatcher; $this->stopwatch = $stopwatch; $this->logger = $logger; - $this->called = array(); - $this->wrappedListeners = array(); + $this->wrappedListeners = []; } /** @@ -123,6 +122,10 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface */ public function dispatch($eventName, Event $event = null) { + if (null === $this->callStack) { + $this->callStack = new \SplObjectStorage(); + } + if (null === $event) { $event = new Event(); } @@ -132,19 +135,24 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface } $this->preProcess($eventName); - $this->preDispatch($eventName, $event); - - $e = $this->stopwatch->start($eventName, 'section'); - - $this->dispatcher->dispatch($eventName, $event); - - if ($e->isStarted()) { - $e->stop(); + try { + $this->preDispatch($eventName, $event); + try { + $e = $this->stopwatch->start($eventName, 'section'); + try { + $this->dispatcher->dispatch($eventName, $event); + } finally { + if ($e->isStarted()) { + $e->stop(); + } + } + } finally { + $this->postDispatch($eventName, $event); + } + } finally { + $this->postProcess($eventName); } - $this->postDispatch($eventName, $event); - $this->postProcess($eventName); - return $event; } @@ -153,11 +161,15 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface */ public function getCalledListeners() { - $called = array(); - foreach ($this->called as $eventName => $listeners) { - foreach ($listeners as $listener) { - $called[$eventName.'.'.$listener->getPretty()] = $listener->getInfo($eventName); - } + if (null === $this->callStack) { + return []; + } + + $called = []; + foreach ($this->callStack as $listener) { + list($eventName) = $this->callStack->getInfo(); + + $called[] = $listener->getInfo($eventName); } return $called; @@ -172,20 +184,20 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface $allListeners = $this->getListeners(); } catch (\Exception $e) { if (null !== $this->logger) { - $this->logger->info('An exception was thrown while getting the uncalled listeners.', array('exception' => $e)); + $this->logger->info('An exception was thrown while getting the uncalled listeners.', ['exception' => $e]); } // unable to retrieve the uncalled listeners - return array(); + return []; } - $notCalled = array(); + $notCalled = []; foreach ($allListeners as $eventName => $listeners) { foreach ($listeners as $listener) { $called = false; - if (isset($this->called[$eventName])) { - foreach ($this->called[$eventName] as $l) { - if ($l->getWrappedListener() === $listener) { + if (null !== $this->callStack) { + foreach ($this->callStack as $calledListener) { + if ($calledListener->getWrappedListener() === $listener) { $called = true; break; @@ -197,19 +209,19 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface if (!$listener instanceof WrappedListener) { $listener = new WrappedListener($listener, null, $this->stopwatch, $this); } - $notCalled[$eventName.'.'.$listener->getPretty()] = $listener->getInfo($eventName); + $notCalled[] = $listener->getInfo($eventName); } } } - uasort($notCalled, array($this, 'sortListenersByPriority')); + uasort($notCalled, [$this, 'sortNotCalledListeners']); return $notCalled; } public function reset() { - $this->called = array(); + $this->callStack = null; } /** @@ -222,7 +234,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface */ public function __call($method, $arguments) { - return \call_user_func_array(array($this->dispatcher, $method), $arguments); + return \call_user_func_array([$this->dispatcher, $method], $arguments); } /** @@ -253,6 +265,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface $this->wrappedListeners[$eventName][] = $wrappedListener; $this->dispatcher->removeListener($eventName, $listener); $this->dispatcher->addListener($eventName, $wrappedListener, $priority); + $this->callStack->attach($wrappedListener, [$eventName]); } } @@ -270,7 +283,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface $this->dispatcher->addListener($eventName, $listener->getWrappedListener(), $priority); if (null !== $this->logger) { - $context = array('event' => $eventName, 'listener' => $listener->getPretty()); + $context = ['event' => $eventName, 'listener' => $listener->getPretty()]; } if ($listener->wasCalled()) { @@ -281,8 +294,8 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface if (!isset($this->called[$eventName])) { $this->called[$eventName] = new \SplObjectStorage(); } - - $this->called[$eventName]->attach($listener); + } else { + $this->callStack->detach($listener); } if (null !== $this->logger && $skipped) { @@ -299,8 +312,12 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface } } - private function sortListenersByPriority($a, $b) + private function sortNotCalledListeners(array $a, array $b) { + if (0 !== $cmp = strcmp($a['event'], $b['event'])) { + return $cmp; + } + if (\is_int($a['priority']) && !\is_int($b['priority'])) { return 1; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php index d49f69de..de2b8509 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php @@ -29,6 +29,7 @@ class WrappedListener private $dispatcher; private $pretty; private $stub; + private $priority; private static $hasClassStub; public function __construct($listener, $name, Stopwatch $stopwatch, EventDispatcherInterface $dispatcher = null) @@ -94,21 +95,24 @@ class WrappedListener $this->stub = self::$hasClassStub ? new ClassStub($this->pretty.'()', $this->listener) : $this->pretty.'()'; } - return array( + return [ 'event' => $eventName, - 'priority' => null !== $this->dispatcher ? $this->dispatcher->getListenerPriority($eventName, $this->listener) : null, + 'priority' => null !== $this->priority ? $this->priority : (null !== $this->dispatcher ? $this->dispatcher->getListenerPriority($eventName, $this->listener) : null), 'pretty' => $this->pretty, 'stub' => $this->stub, - ); + ]; } public function __invoke(Event $event, $eventName, EventDispatcherInterface $dispatcher) { + $dispatcher = $this->dispatcher ?: $dispatcher; + $this->called = true; + $this->priority = $dispatcher->getListenerPriority($eventName, $this->listener); $e = $this->stopwatch->start($this->name, 'event_listener'); - \call_user_func($this->listener, $event, $eventName, $this->dispatcher ?: $dispatcher); + \call_user_func($this->listener, $event, $eventName, $dispatcher); if ($e->isStarted()) { $e->stop(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php index a6fcde33..bdad9fe9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php @@ -28,7 +28,7 @@ class RegisterListenersPass implements CompilerPassInterface protected $listenerTag; protected $subscriberTag; - private $hotPathEvents = array(); + private $hotPathEvents = []; private $hotPathTagName; /** @@ -68,14 +68,14 @@ class RegisterListenersPass implements CompilerPassInterface } if (!isset($event['method'])) { - $event['method'] = 'on'.preg_replace_callback(array( + $event['method'] = 'on'.preg_replace_callback([ '/(?<=\b)[a-z]/i', '/[^a-z0-9]/i', - ), function ($matches) { return strtoupper($matches[0]); }, $event['event']); + ], function ($matches) { return strtoupper($matches[0]); }, $event['event']); $event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']); } - $definition->addMethodCall('addListener', array($event['event'], array(new ServiceClosureArgument(new Reference($id)), $event['method']), $priority)); + $definition->addMethodCall('addListener', [$event['event'], [new ServiceClosureArgument(new Reference($id)), $event['method']], $priority]); if (isset($this->hotPathEvents[$event['event']])) { $container->getDefinition($id)->addTag($this->hotPathTagName); @@ -102,14 +102,14 @@ class RegisterListenersPass implements CompilerPassInterface ExtractingEventDispatcher::$subscriber = $class; $extractingDispatcher->addSubscriber($extractingDispatcher); foreach ($extractingDispatcher->listeners as $args) { - $args[1] = array(new ServiceClosureArgument(new Reference($id)), $args[1]); + $args[1] = [new ServiceClosureArgument(new Reference($id)), $args[1]]; $definition->addMethodCall('addListener', $args); if (isset($this->hotPathEvents[$args[0]])) { $container->getDefinition($id)->addTag('container.hot_path'); } } - $extractingDispatcher->listeners = array(); + $extractingDispatcher->listeners = []; } } } @@ -119,18 +119,18 @@ class RegisterListenersPass implements CompilerPassInterface */ class ExtractingEventDispatcher extends EventDispatcher implements EventSubscriberInterface { - public $listeners = array(); + public $listeners = []; public static $subscriber; public function addListener($eventName, $listener, $priority = 0) { - $this->listeners[] = array($eventName, $listener[1], $priority); + $this->listeners[] = [$eventName, $listener[1], $priority]; } public static function getSubscribedEvents() { - $callback = array(self::$subscriber, 'getSubscribedEvents'); + $callback = [self::$subscriber, 'getSubscribedEvents']; return $callback(); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php index 4e75c63e..968e345b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php @@ -28,8 +28,8 @@ namespace Symfony\Component\EventDispatcher; */ class EventDispatcher implements EventDispatcherInterface { - private $listeners = array(); - private $sorted = array(); + private $listeners = []; + private $sorted = []; /** * {@inheritdoc} @@ -54,7 +54,7 @@ class EventDispatcher implements EventDispatcherInterface { if (null !== $eventName) { if (empty($this->listeners[$eventName])) { - return array(); + return []; } if (!isset($this->sorted[$eventName])) { @@ -166,12 +166,12 @@ class EventDispatcher implements EventDispatcherInterface { foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { if (\is_string($params)) { - $this->addListener($eventName, array($subscriber, $params)); + $this->addListener($eventName, [$subscriber, $params]); } elseif (\is_string($params[0])) { - $this->addListener($eventName, array($subscriber, $params[0]), isset($params[1]) ? $params[1] : 0); + $this->addListener($eventName, [$subscriber, $params[0]], isset($params[1]) ? $params[1] : 0); } else { foreach ($params as $listener) { - $this->addListener($eventName, array($subscriber, $listener[0]), isset($listener[1]) ? $listener[1] : 0); + $this->addListener($eventName, [$subscriber, $listener[0]], isset($listener[1]) ? $listener[1] : 0); } } } @@ -185,10 +185,10 @@ class EventDispatcher implements EventDispatcherInterface foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { if (\is_array($params) && \is_array($params[0])) { foreach ($params as $listener) { - $this->removeListener($eventName, array($subscriber, $listener[0])); + $this->removeListener($eventName, [$subscriber, $listener[0]]); } } else { - $this->removeListener($eventName, array($subscriber, \is_string($params) ? $params : $params[0])); + $this->removeListener($eventName, [$subscriber, \is_string($params) ? $params : $params[0]]); } } } @@ -221,7 +221,7 @@ class EventDispatcher implements EventDispatcherInterface private function sortListeners($eventName) { krsort($this->listeners[$eventName]); - $this->sorted[$eventName] = array(); + $this->sorted[$eventName] = []; foreach ($this->listeners[$eventName] as $priority => $listeners) { foreach ($listeners as $k => $listener) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php index d3d0cb8a..bde753a1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php @@ -23,11 +23,11 @@ interface EventDispatcherInterface /** * Dispatches an event to all registered listeners. * - * @param string $eventName The name of the event to dispatch. The name of - * the event is the name of the method that is - * invoked on listeners. - * @param Event $event The event to pass to the event handlers/listeners - * If not supplied, an empty Event instance is created + * @param string $eventName The name of the event to dispatch. The name of + * the event is the name of the method that is + * invoked on listeners. + * @param Event|null $event The event to pass to the event handlers/listeners + * If not supplied, an empty Event instance is created * * @return Event */ @@ -46,7 +46,7 @@ interface EventDispatcherInterface /** * Adds an event subscriber. * - * The subscriber is asked for all the events he is + * The subscriber is asked for all the events it is * interested in and added as a listener for these events. */ public function addSubscriber(EventSubscriberInterface $subscriber); @@ -64,7 +64,7 @@ interface EventDispatcherInterface /** * Gets the listeners of a specific event or all listeners sorted by descending priority. * - * @param string $eventName The name of the event + * @param string|null $eventName The name of the event * * @return array The event listeners for the specified event, or all event listeners by event name */ @@ -85,7 +85,7 @@ interface EventDispatcherInterface /** * Checks whether an event has any registered listeners. * - * @param string $eventName The name of the event + * @param string|null $eventName The name of the event * * @return bool true if the specified event has any listeners, false otherwise */ diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php index 8af77891..824f2159 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php @@ -12,7 +12,7 @@ namespace Symfony\Component\EventDispatcher; /** - * An EventSubscriber knows himself what events he is interested in. + * An EventSubscriber knows itself what events it is interested in. * If an EventSubscriber is added to an EventDispatcherInterface, the manager invokes * {@link getSubscribedEvents} and registers the subscriber as a listener for all * returned events. @@ -36,9 +36,9 @@ interface EventSubscriberInterface * * For instance: * - * * array('eventName' => 'methodName') - * * array('eventName' => array('methodName', $priority)) - * * array('eventName' => array(array('methodName1', $priority), array('methodName2'))) + * * ['eventName' => 'methodName'] + * * ['eventName' => ['methodName', $priority]] + * * ['eventName' => [['methodName1', $priority], ['methodName2']]] * * @return array The event names to listen to */ diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/GenericEvent.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/GenericEvent.php index f0be7e18..f005e3a3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/GenericEvent.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/GenericEvent.php @@ -29,7 +29,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate * @param mixed $subject The subject of the event, usually an object or a callable * @param array $arguments Arguments to store in the event */ - public function __construct($subject = null, array $arguments = array()) + public function __construct($subject = null, array $arguments = []) { $this->subject = $subject; $this->arguments = $arguments; @@ -95,7 +95,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate * * @return $this */ - public function setArguments(array $args = array()) + public function setArguments(array $args = []) { $this->arguments = $args; @@ -111,7 +111,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate */ public function hasArgument($key) { - return array_key_exists($key, $this->arguments); + return \array_key_exists($key, $this->arguments); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php index 6d377d11..b157659d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php @@ -47,15 +47,15 @@ abstract class AbstractEventDispatcherTest extends TestCase public function testInitialState() { - $this->assertEquals(array(), $this->dispatcher->getListeners()); + $this->assertEquals([], $this->dispatcher->getListeners()); $this->assertFalse($this->dispatcher->hasListeners(self::preFoo)); $this->assertFalse($this->dispatcher->hasListeners(self::postFoo)); } public function testAddListener() { - $this->dispatcher->addListener('pre.foo', array($this->listener, 'preFoo')); - $this->dispatcher->addListener('post.foo', array($this->listener, 'postFoo')); + $this->dispatcher->addListener('pre.foo', [$this->listener, 'preFoo']); + $this->dispatcher->addListener('post.foo', [$this->listener, 'postFoo']); $this->assertTrue($this->dispatcher->hasListeners()); $this->assertTrue($this->dispatcher->hasListeners(self::preFoo)); $this->assertTrue($this->dispatcher->hasListeners(self::postFoo)); @@ -73,15 +73,15 @@ abstract class AbstractEventDispatcherTest extends TestCase $listener2->name = '2'; $listener3->name = '3'; - $this->dispatcher->addListener('pre.foo', array($listener1, 'preFoo'), -10); - $this->dispatcher->addListener('pre.foo', array($listener2, 'preFoo'), 10); - $this->dispatcher->addListener('pre.foo', array($listener3, 'preFoo')); + $this->dispatcher->addListener('pre.foo', [$listener1, 'preFoo'], -10); + $this->dispatcher->addListener('pre.foo', [$listener2, 'preFoo'], 10); + $this->dispatcher->addListener('pre.foo', [$listener3, 'preFoo']); - $expected = array( - array($listener2, 'preFoo'), - array($listener3, 'preFoo'), - array($listener1, 'preFoo'), - ); + $expected = [ + [$listener2, 'preFoo'], + [$listener3, 'preFoo'], + [$listener1, 'preFoo'], + ]; $this->assertSame($expected, $this->dispatcher->getListeners('pre.foo')); } @@ -102,10 +102,10 @@ abstract class AbstractEventDispatcherTest extends TestCase $this->dispatcher->addListener('post.foo', $listener5); $this->dispatcher->addListener('post.foo', $listener6, 10); - $expected = array( - 'pre.foo' => array($listener3, $listener2, $listener1), - 'post.foo' => array($listener6, $listener5, $listener4), - ); + $expected = [ + 'pre.foo' => [$listener3, $listener2, $listener1], + 'post.foo' => [$listener6, $listener5, $listener4], + ]; $this->assertSame($expected, $this->dispatcher->getListeners()); } @@ -126,8 +126,8 @@ abstract class AbstractEventDispatcherTest extends TestCase public function testDispatch() { - $this->dispatcher->addListener('pre.foo', array($this->listener, 'preFoo')); - $this->dispatcher->addListener('post.foo', array($this->listener, 'postFoo')); + $this->dispatcher->addListener('pre.foo', [$this->listener, 'preFoo']); + $this->dispatcher->addListener('post.foo', [$this->listener, 'postFoo']); $this->dispatcher->dispatch(self::preFoo); $this->assertTrue($this->listener->preFooInvoked); $this->assertFalse($this->listener->postFooInvoked); @@ -157,8 +157,8 @@ abstract class AbstractEventDispatcherTest extends TestCase // postFoo() stops the propagation, so only one listener should // be executed // Manually set priority to enforce $this->listener to be called first - $this->dispatcher->addListener('post.foo', array($this->listener, 'postFoo'), 10); - $this->dispatcher->addListener('post.foo', array($otherListener, 'postFoo')); + $this->dispatcher->addListener('post.foo', [$this->listener, 'postFoo'], 10); + $this->dispatcher->addListener('post.foo', [$otherListener, 'postFoo']); $this->dispatcher->dispatch(self::postFoo); $this->assertTrue($this->listener->postFooInvoked); $this->assertFalse($otherListener->postFooInvoked); @@ -166,7 +166,7 @@ abstract class AbstractEventDispatcherTest extends TestCase public function testDispatchByPriority() { - $invoked = array(); + $invoked = []; $listener1 = function () use (&$invoked) { $invoked[] = '1'; }; @@ -180,7 +180,7 @@ abstract class AbstractEventDispatcherTest extends TestCase $this->dispatcher->addListener('pre.foo', $listener2); $this->dispatcher->addListener('pre.foo', $listener3, 10); $this->dispatcher->dispatch(self::preFoo); - $this->assertEquals(array('3', '2', '1'), $invoked); + $this->assertEquals(['3', '2', '1'], $invoked); } public function testRemoveListener() @@ -258,7 +258,7 @@ abstract class AbstractEventDispatcherTest extends TestCase public function testEventReceivesTheDispatcherInstanceAsArgument() { $listener = new TestWithDispatcher(); - $this->dispatcher->addListener('test', array($listener, 'foo')); + $this->dispatcher->addListener('test', [$listener, 'foo']); $this->assertNull($listener->name); $this->assertNull($listener->dispatcher); $this->dispatcher->dispatch('test'); @@ -295,7 +295,7 @@ abstract class AbstractEventDispatcherTest extends TestCase $listener = function () {}; $this->dispatcher->addListener('foo', $listener); $this->dispatcher->removeListener('foo', $listener); - $this->assertSame(array(), $this->dispatcher->getListeners()); + $this->assertSame([], $this->dispatcher->getListeners()); } public function testHasListenersWithoutEventsReturnsFalseAfterHasListenersWithEventHasBeenCalled() @@ -307,7 +307,7 @@ abstract class AbstractEventDispatcherTest extends TestCase public function testHasListenersIsLazy() { $called = 0; - $listener = array(function () use (&$called) { ++$called; }, 'onFoo'); + $listener = [function () use (&$called) { ++$called; }, 'onFoo']; $this->dispatcher->addListener('foo', $listener); $this->assertTrue($this->dispatcher->hasListeners()); $this->assertTrue($this->dispatcher->hasListeners('foo')); @@ -322,7 +322,7 @@ abstract class AbstractEventDispatcherTest extends TestCase return new TestWithDispatcher(); }; - $this->dispatcher->addListener('foo', array($factory, 'foo')); + $this->dispatcher->addListener('foo', [$factory, 'foo']); $this->assertSame(0, $called); $this->dispatcher->dispatch('foo', new Event()); $this->dispatcher->dispatch('foo', new Event()); @@ -334,14 +334,14 @@ abstract class AbstractEventDispatcherTest extends TestCase $test = new TestWithDispatcher(); $factory = function () use ($test) { return $test; }; - $this->dispatcher->addListener('foo', array($factory, 'foo')); + $this->dispatcher->addListener('foo', [$factory, 'foo']); $this->assertTrue($this->dispatcher->hasListeners('foo')); - $this->dispatcher->removeListener('foo', array($test, 'foo')); + $this->dispatcher->removeListener('foo', [$test, 'foo']); $this->assertFalse($this->dispatcher->hasListeners('foo')); - $this->dispatcher->addListener('foo', array($test, 'foo')); + $this->dispatcher->addListener('foo', [$test, 'foo']); $this->assertTrue($this->dispatcher->hasListeners('foo')); - $this->dispatcher->removeListener('foo', array($factory, 'foo')); + $this->dispatcher->removeListener('foo', [$factory, 'foo']); $this->assertFalse($this->dispatcher->hasListeners('foo')); } @@ -350,12 +350,12 @@ abstract class AbstractEventDispatcherTest extends TestCase $test = new TestWithDispatcher(); $factory = function () use ($test) { return $test; }; - $this->dispatcher->addListener('foo', array($factory, 'foo'), 3); - $this->assertSame(3, $this->dispatcher->getListenerPriority('foo', array($test, 'foo'))); - $this->dispatcher->removeListener('foo', array($factory, 'foo')); + $this->dispatcher->addListener('foo', [$factory, 'foo'], 3); + $this->assertSame(3, $this->dispatcher->getListenerPriority('foo', [$test, 'foo'])); + $this->dispatcher->removeListener('foo', [$factory, 'foo']); - $this->dispatcher->addListener('foo', array($test, 'foo'), 5); - $this->assertSame(5, $this->dispatcher->getListenerPriority('foo', array($factory, 'foo'))); + $this->dispatcher->addListener('foo', [$test, 'foo'], 5); + $this->assertSame(5, $this->dispatcher->getListenerPriority('foo', [$factory, 'foo'])); } public function testGetLazyListeners() @@ -363,12 +363,12 @@ abstract class AbstractEventDispatcherTest extends TestCase $test = new TestWithDispatcher(); $factory = function () use ($test) { return $test; }; - $this->dispatcher->addListener('foo', array($factory, 'foo'), 3); - $this->assertSame(array(array($test, 'foo')), $this->dispatcher->getListeners('foo')); + $this->dispatcher->addListener('foo', [$factory, 'foo'], 3); + $this->assertSame([[$test, 'foo']], $this->dispatcher->getListeners('foo')); - $this->dispatcher->removeListener('foo', array($test, 'foo')); - $this->dispatcher->addListener('bar', array($factory, 'foo'), 3); - $this->assertSame(array('bar' => array(array($test, 'foo'))), $this->dispatcher->getListeners()); + $this->dispatcher->removeListener('foo', [$test, 'foo']); + $this->dispatcher->addListener('bar', [$factory, 'foo'], 3); + $this->assertSame(['bar' => [[$test, 'foo']]], $this->dispatcher->getListeners()); } } @@ -415,7 +415,7 @@ class TestEventSubscriber implements EventSubscriberInterface { public static function getSubscribedEvents() { - return array('pre.foo' => 'preFoo', 'post.foo' => 'postFoo'); + return ['pre.foo' => 'preFoo', 'post.foo' => 'postFoo']; } } @@ -423,10 +423,10 @@ class TestEventSubscriberWithPriorities implements EventSubscriberInterface { public static function getSubscribedEvents() { - return array( - 'pre.foo' => array('preFoo', 10), - 'post.foo' => array('postFoo'), - ); + return [ + 'pre.foo' => ['preFoo', 10], + 'post.foo' => ['postFoo'], + ]; } } @@ -434,9 +434,9 @@ class TestEventSubscriberWithMultipleListeners implements EventSubscriberInterfa { public static function getSubscribedEvents() { - return array('pre.foo' => array( - array('preFoo1'), - array('preFoo2', 10), - )); + return ['pre.foo' => [ + ['preFoo1'], + ['preFoo2', 10], + ]]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php index 9d5eecc5..685cdfc3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php @@ -44,7 +44,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest $container->set('service.listener', $service); $dispatcher = new ContainerAwareEventDispatcher($container); - $dispatcher->addListenerService('onEvent', array('service.listener', 'onEvent')); + $dispatcher->addListenerService('onEvent', ['service.listener', 'onEvent']); $dispatcher->dispatch('onEvent', $event); } @@ -100,8 +100,8 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest $container->set('service.listener', $service); $dispatcher = new ContainerAwareEventDispatcher($container); - $dispatcher->addListenerService('onEvent', array('service.listener', 'onEvent'), 5); - $dispatcher->addListenerService('onEvent', array('service.listener', 'onEvent'), 10); + $dispatcher->addListenerService('onEvent', ['service.listener', 'onEvent'], 5); + $dispatcher->addListenerService('onEvent', ['service.listener', 'onEvent'], 10); $dispatcher->dispatch('onEvent', $event); } @@ -116,7 +116,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest $container->set('service.listener', $service); $dispatcher = new ContainerAwareEventDispatcher($container); - $dispatcher->addListenerService('onEvent', array('service.listener', 'onEvent')); + $dispatcher->addListenerService('onEvent', ['service.listener', 'onEvent']); $service ->expects($this->once()) @@ -139,7 +139,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest $container->set('service.listener', $service); $dispatcher = new ContainerAwareEventDispatcher($container); - $dispatcher->addListenerService('onEvent', array('service.listener', 'onEvent')); + $dispatcher->addListenerService('onEvent', ['service.listener', 'onEvent']); $listeners = $dispatcher->getListeners(); @@ -156,10 +156,10 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest $container->set('service.listener', $service); $dispatcher = new ContainerAwareEventDispatcher($container); - $dispatcher->addListenerService('onEvent', array('service.listener', 'onEvent')); + $dispatcher->addListenerService('onEvent', ['service.listener', 'onEvent']); $dispatcher->dispatch('onEvent', new Event()); - $dispatcher->removeListener('onEvent', array($container->get('service.listener'), 'onEvent')); + $dispatcher->removeListener('onEvent', [$container->get('service.listener'), 'onEvent']); $this->assertFalse($dispatcher->hasListeners('onEvent')); } @@ -171,9 +171,9 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest $container->set('service.listener', $service); $dispatcher = new ContainerAwareEventDispatcher($container); - $dispatcher->addListenerService('onEvent', array('service.listener', 'onEvent')); + $dispatcher->addListenerService('onEvent', ['service.listener', 'onEvent']); - $dispatcher->removeListener('onEvent', array($container->get('service.listener'), 'onEvent')); + $dispatcher->removeListener('onEvent', [$container->get('service.listener'), 'onEvent']); $this->assertFalse($dispatcher->hasListeners('onEvent')); } } @@ -189,11 +189,11 @@ class SubscriberService implements EventSubscriberInterface { public static function getSubscribedEvents() { - return array( + return [ 'onEvent' => 'onEvent', - 'onEventWithPriority' => array('onEventWithPriority', 10), - 'onEventNested' => array(array('onEventNested')), - ); + 'onEventWithPriority' => ['onEventWithPriority', 10], + 'onEventNested' => [['onEventNested']], + ]; } public function onEvent(Event $e) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php index d7c5ce18..aabd95c0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php @@ -98,7 +98,7 @@ class TraceableEventDispatcherTest extends TestCase $tdispatcher->addSubscriber($subscriber); $listeners = $dispatcher->getListeners('foo'); $this->assertCount(1, $listeners); - $this->assertSame(array($subscriber, 'call'), $listeners[0]); + $this->assertSame([$subscriber, 'call'], $listeners[0]); $tdispatcher->removeSubscriber($subscriber); $this->assertCount(0, $dispatcher->getListeners('foo')); @@ -110,18 +110,18 @@ class TraceableEventDispatcherTest extends TestCase $tdispatcher->addListener('foo', function () {}, 5); $listeners = $tdispatcher->getNotCalledListeners(); - $this->assertArrayHasKey('stub', $listeners['foo.closure']); - unset($listeners['foo.closure']['stub']); - $this->assertEquals(array(), $tdispatcher->getCalledListeners()); - $this->assertEquals(array('foo.closure' => array('event' => 'foo', 'pretty' => 'closure', 'priority' => 5)), $listeners); + $this->assertArrayHasKey('stub', $listeners[0]); + unset($listeners[0]['stub']); + $this->assertEquals([], $tdispatcher->getCalledListeners()); + $this->assertEquals([['event' => 'foo', 'pretty' => 'closure', 'priority' => 5]], $listeners); $tdispatcher->dispatch('foo'); $listeners = $tdispatcher->getCalledListeners(); - $this->assertArrayHasKey('stub', $listeners['foo.closure']); - unset($listeners['foo.closure']['stub']); - $this->assertEquals(array('foo.closure' => array('event' => 'foo', 'pretty' => 'closure', 'priority' => 5)), $listeners); - $this->assertEquals(array(), $tdispatcher->getNotCalledListeners()); + $this->assertArrayHasKey('stub', $listeners[0]); + unset($listeners[0]['stub']); + $this->assertEquals([['event' => 'foo', 'pretty' => 'closure', 'priority' => 5]], $listeners); + $this->assertEquals([], $tdispatcher->getNotCalledListeners()); } public function testClearCalledListeners() @@ -133,10 +133,22 @@ class TraceableEventDispatcherTest extends TestCase $tdispatcher->reset(); $listeners = $tdispatcher->getNotCalledListeners(); - $this->assertArrayHasKey('stub', $listeners['foo.closure']); - unset($listeners['foo.closure']['stub']); - $this->assertEquals(array(), $tdispatcher->getCalledListeners()); - $this->assertEquals(array('foo.closure' => array('event' => 'foo', 'pretty' => 'closure', 'priority' => 5)), $listeners); + $this->assertArrayHasKey('stub', $listeners[0]); + unset($listeners[0]['stub']); + $this->assertEquals([], $tdispatcher->getCalledListeners()); + $this->assertEquals([['event' => 'foo', 'pretty' => 'closure', 'priority' => 5]], $listeners); + } + + public function testDispatchAfterReset() + { + $tdispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch()); + $tdispatcher->addListener('foo', function () {}, 5); + + $tdispatcher->reset(); + $tdispatcher->dispatch('foo'); + + $listeners = $tdispatcher->getCalledListeners(); + $this->assertArrayHasKey('stub', $listeners[0]); } public function testGetCalledListenersNested() @@ -162,8 +174,8 @@ class TraceableEventDispatcherTest extends TestCase $tdispatcher->addListener('foo', $listener1 = function () {}); $tdispatcher->addListener('foo', $listener2 = function () {}); - $logger->expects($this->at(0))->method('debug')->with('Notified event "{event}" to listener "{listener}".', array('event' => 'foo', 'listener' => 'closure')); - $logger->expects($this->at(1))->method('debug')->with('Notified event "{event}" to listener "{listener}".', array('event' => 'foo', 'listener' => 'closure')); + $logger->expects($this->at(0))->method('debug')->with('Notified event "{event}" to listener "{listener}".', ['event' => 'foo', 'listener' => 'closure']); + $logger->expects($this->at(1))->method('debug')->with('Notified event "{event}" to listener "{listener}".', ['event' => 'foo', 'listener' => 'closure']); $tdispatcher->dispatch('foo'); } @@ -177,16 +189,16 @@ class TraceableEventDispatcherTest extends TestCase $tdispatcher->addListener('foo', $listener1 = function (Event $event) { $event->stopPropagation(); }); $tdispatcher->addListener('foo', $listener2 = function () {}); - $logger->expects($this->at(0))->method('debug')->with('Notified event "{event}" to listener "{listener}".', array('event' => 'foo', 'listener' => 'closure')); - $logger->expects($this->at(1))->method('debug')->with('Listener "{listener}" stopped propagation of the event "{event}".', array('event' => 'foo', 'listener' => 'closure')); - $logger->expects($this->at(2))->method('debug')->with('Listener "{listener}" was not called for event "{event}".', array('event' => 'foo', 'listener' => 'closure')); + $logger->expects($this->at(0))->method('debug')->with('Notified event "{event}" to listener "{listener}".', ['event' => 'foo', 'listener' => 'closure']); + $logger->expects($this->at(1))->method('debug')->with('Listener "{listener}" stopped propagation of the event "{event}".', ['event' => 'foo', 'listener' => 'closure']); + $logger->expects($this->at(2))->method('debug')->with('Listener "{listener}" was not called for event "{event}".', ['event' => 'foo', 'listener' => 'closure']); $tdispatcher->dispatch('foo'); } public function testDispatchCallListeners() { - $called = array(); + $called = []; $dispatcher = new EventDispatcher(); $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); @@ -195,7 +207,7 @@ class TraceableEventDispatcherTest extends TestCase $tdispatcher->dispatch('foo'); - $this->assertSame(array('foo2', 'foo1'), $called); + $this->assertSame(['foo2', 'foo1'], $called); } public function testDispatchNested() @@ -252,6 +264,6 @@ class EventSubscriber implements EventSubscriberInterface { public static function getSubscribedEvents() { - return array('foo' => 'call'); + return ['foo' => 'call']; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/Debug/WrappedListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/Debug/WrappedListenerTest.php index f743f148..258938ed 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/Debug/WrappedListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/Debug/WrappedListenerTest.php @@ -30,18 +30,18 @@ class WrappedListenerTest extends TestCase public function provideListenersToDescribe() { - $listeners = array( - array(new FooListener(), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::__invoke'), - array(array(new FooListener(), 'listen'), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listen'), - array(array('Symfony\Component\EventDispatcher\Tests\Debug\FooListener', 'listenStatic'), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listenStatic'), - array('var_dump', 'var_dump'), - array(function () {}, 'closure'), - ); + $listeners = [ + [new FooListener(), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::__invoke'], + [[new FooListener(), 'listen'], 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listen'], + [['Symfony\Component\EventDispatcher\Tests\Debug\FooListener', 'listenStatic'], 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listenStatic'], + ['var_dump', 'var_dump'], + [function () {}, 'closure'], + ]; if (\PHP_VERSION_ID >= 70100) { - $listeners[] = array(\Closure::fromCallable(array(new FooListener(), 'listen')), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listen'); - $listeners[] = array(\Closure::fromCallable(array('Symfony\Component\EventDispatcher\Tests\Debug\FooListener', 'listenStatic')), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listenStatic'); - $listeners[] = array(\Closure::fromCallable(function () {}), 'closure'); + $listeners[] = [\Closure::fromCallable([new FooListener(), 'listen']), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listen']; + $listeners[] = [\Closure::fromCallable(['Symfony\Component\EventDispatcher\Tests\Debug\FooListener', 'listenStatic']), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listenStatic']; + $listeners[] = [\Closure::fromCallable(function () {}), 'closure']; } return $listeners; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php index c1b49f75..801471b4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php @@ -38,9 +38,9 @@ class RegisterListenersPassTest extends TestCase public function testValidEventSubscriber() { - $services = array( - 'my_event_subscriber' => array(0 => array()), - ); + $services = [ + 'my_event_subscriber' => [0 => []], + ]; $builder = new ContainerBuilder(); $eventDispatcherDefinition = $builder->register('event_dispatcher'); @@ -50,16 +50,16 @@ class RegisterListenersPassTest extends TestCase $registerListenersPass = new RegisterListenersPass(); $registerListenersPass->process($builder); - $expectedCalls = array( - array( + $expectedCalls = [ + [ 'addListener', - array( + [ 'event', - array(new ServiceClosureArgument(new Reference('my_event_subscriber')), 'onEvent'), + [new ServiceClosureArgument(new Reference('my_event_subscriber')), 'onEvent'], 0, - ), - ), - ); + ], + ], + ]; $this->assertEquals($expectedCalls, $eventDispatcherDefinition->getMethodCalls()); } @@ -70,7 +70,7 @@ class RegisterListenersPassTest extends TestCase public function testAbstractEventListener() { $container = new ContainerBuilder(); - $container->register('foo', 'stdClass')->setAbstract(true)->addTag('kernel.event_listener', array()); + $container->register('foo', 'stdClass')->setAbstract(true)->addTag('kernel.event_listener', []); $container->register('event_dispatcher', 'stdClass'); $registerListenersPass = new RegisterListenersPass(); @@ -84,7 +84,7 @@ class RegisterListenersPassTest extends TestCase public function testAbstractEventSubscriber() { $container = new ContainerBuilder(); - $container->register('foo', 'stdClass')->setAbstract(true)->addTag('kernel.event_subscriber', array()); + $container->register('foo', 'stdClass')->setAbstract(true)->addTag('kernel.event_subscriber', []); $container->register('event_dispatcher', 'stdClass'); $registerListenersPass = new RegisterListenersPass(); @@ -96,23 +96,23 @@ class RegisterListenersPassTest extends TestCase $container = new ContainerBuilder(); $container->setParameter('subscriber.class', 'Symfony\Component\EventDispatcher\Tests\DependencyInjection\SubscriberService'); - $container->register('foo', '%subscriber.class%')->addTag('kernel.event_subscriber', array()); + $container->register('foo', '%subscriber.class%')->addTag('kernel.event_subscriber', []); $container->register('event_dispatcher', 'stdClass'); $registerListenersPass = new RegisterListenersPass(); $registerListenersPass->process($container); $definition = $container->getDefinition('event_dispatcher'); - $expectedCalls = array( - array( + $expectedCalls = [ + [ 'addListener', - array( + [ 'event', - array(new ServiceClosureArgument(new Reference('foo')), 'onEvent'), + [new ServiceClosureArgument(new Reference('foo')), 'onEvent'], 0, - ), - ), - ); + ], + ], + ]; $this->assertEquals($expectedCalls, $definition->getMethodCalls()); } @@ -120,10 +120,10 @@ class RegisterListenersPassTest extends TestCase { $container = new ContainerBuilder(); - $container->register('foo', SubscriberService::class)->addTag('kernel.event_subscriber', array()); + $container->register('foo', SubscriberService::class)->addTag('kernel.event_subscriber', []); $container->register('event_dispatcher', 'stdClass'); - (new RegisterListenersPass())->setHotPathEvents(array('event'))->process($container); + (new RegisterListenersPass())->setHotPathEvents(['event'])->process($container); $this->assertTrue($container->getDefinition('foo')->hasTag('container.hot_path')); } @@ -135,7 +135,7 @@ class RegisterListenersPassTest extends TestCase public function testEventSubscriberUnresolvableClassName() { $container = new ContainerBuilder(); - $container->register('foo', '%subscriber.class%')->addTag('kernel.event_subscriber', array()); + $container->register('foo', '%subscriber.class%')->addTag('kernel.event_subscriber', []); $container->register('event_dispatcher', 'stdClass'); $registerListenersPass = new RegisterListenersPass(); @@ -147,8 +147,8 @@ class SubscriberService implements \Symfony\Component\EventDispatcher\EventSubsc { public static function getSubscribedEvents() { - return array( + return [ 'event' => 'onEvent', - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php index b63f69df..461f8616 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php @@ -32,7 +32,7 @@ class GenericEventTest extends TestCase protected function setUp() { $this->subject = new \stdClass(); - $this->event = new GenericEvent($this->subject, array('name' => 'Event')); + $this->event = new GenericEvent($this->subject, ['name' => 'Event']); } /** @@ -46,7 +46,7 @@ class GenericEventTest extends TestCase public function testConstruct() { - $this->assertEquals($this->event, new GenericEvent($this->subject, array('name' => 'Event'))); + $this->assertEquals($this->event, new GenericEvent($this->subject, ['name' => 'Event'])); } /** @@ -55,20 +55,20 @@ class GenericEventTest extends TestCase public function testGetArguments() { // test getting all - $this->assertSame(array('name' => 'Event'), $this->event->getArguments()); + $this->assertSame(['name' => 'Event'], $this->event->getArguments()); } public function testSetArguments() { - $result = $this->event->setArguments(array('foo' => 'bar')); - $this->assertAttributeSame(array('foo' => 'bar'), 'arguments', $this->event); + $result = $this->event->setArguments(['foo' => 'bar']); + $this->assertAttributeSame(['foo' => 'bar'], 'arguments', $this->event); $this->assertSame($this->event, $result); } public function testSetArgument() { $result = $this->event->setArgument('foo2', 'bar2'); - $this->assertAttributeSame(array('name' => 'Event', 'foo2' => 'bar2'), 'arguments', $this->event); + $this->assertAttributeSame(['name' => 'Event', 'foo2' => 'bar2'], 'arguments', $this->event); $this->assertEquals($this->event, $result); } @@ -99,13 +99,13 @@ class GenericEventTest extends TestCase public function testOffsetSet() { $this->event['foo2'] = 'bar2'; - $this->assertAttributeSame(array('name' => 'Event', 'foo2' => 'bar2'), 'arguments', $this->event); + $this->assertAttributeSame(['name' => 'Event', 'foo2' => 'bar2'], 'arguments', $this->event); } public function testOffsetUnset() { unset($this->event['name']); - $this->assertAttributeSame(array(), 'arguments', $this->event); + $this->assertAttributeSame([], 'arguments', $this->event); } public function testOffsetIsset() @@ -127,10 +127,10 @@ class GenericEventTest extends TestCase public function testHasIterator() { - $data = array(); + $data = []; foreach ($this->event as $key => $value) { $data[$key] = $value; } - $this->assertEquals(array('name' => 'Event'), $data); + $this->assertEquals(['name' => 'Event'], $data); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Compiler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Compiler.php index acfb6184..282e82df 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Compiler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Compiler.php @@ -125,7 +125,7 @@ class Compiler } elseif (\is_bool($value)) { $this->raw($value ? 'true' : 'false'); } elseif (\is_array($value)) { - $this->raw('array('); + $this->raw('['); $first = true; foreach ($value as $key => $value) { if (!$first) { @@ -136,7 +136,7 @@ class Compiler $this->raw(' => '); $this->repr($value); } - $this->raw(')'); + $this->raw(']'); } else { $this->string($value); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php index 20e8386f..b6760a55 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php @@ -28,13 +28,13 @@ class ExpressionLanguage private $parser; private $compiler; - protected $functions = array(); + protected $functions = []; /** * @param CacheItemPoolInterface $cache * @param ExpressionFunctionProviderInterface[] $providers */ - public function __construct($cache = null, array $providers = array()) + public function __construct($cache = null, array $providers = []) { if (null !== $cache) { if ($cache instanceof ParserCacheInterface) { @@ -60,7 +60,7 @@ class ExpressionLanguage * * @return string The compiled PHP source code */ - public function compile($expression, $names = array()) + public function compile($expression, $names = []) { return $this->getCompiler()->compile($this->parse($expression, $names)->getNodes())->getSource(); } @@ -73,7 +73,7 @@ class ExpressionLanguage * * @return mixed The result of the evaluation of the expression */ - public function evaluate($expression, $values = array()) + public function evaluate($expression, $values = []) { return $this->parse($expression, array_keys($values))->getNodes()->evaluate($this->functions, $values); } @@ -93,7 +93,7 @@ class ExpressionLanguage } asort($names); - $cacheKeyItems = array(); + $cacheKeyItems = []; foreach ($names as $nameKey => $name) { $cacheKeyItems[] = \is_int($nameKey) ? $name : $nameKey.':'.$name; @@ -129,7 +129,7 @@ class ExpressionLanguage throw new \LogicException('Registering functions after calling evaluate(), compile() or parse() is not supported.'); } - $this->functions[$name] = array('compiler' => $compiler, 'evaluator' => $evaluator); + $this->functions[$name] = ['compiler' => $compiler, 'evaluator' => $evaluator]; } public function addFunction(ExpressionFunction $function) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Lexer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Lexer.php index bd54e891..48b15ffe 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Lexer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Lexer.php @@ -29,10 +29,10 @@ class Lexer */ public function tokenize($expression) { - $expression = str_replace(array("\r", "\n", "\t", "\v", "\f"), ' ', $expression); + $expression = str_replace(["\r", "\n", "\t", "\v", "\f"], ' ', $expression); $cursor = 0; - $tokens = array(); - $brackets = array(); + $tokens = []; + $brackets = []; $end = \strlen($expression); while ($cursor < $end) { @@ -52,7 +52,7 @@ class Lexer $cursor += \strlen($match[0]); } elseif (false !== strpos('([{', $expression[$cursor])) { // opening bracket - $brackets[] = array($expression[$cursor], $cursor); + $brackets[] = [$expression[$cursor], $cursor]; $tokens[] = new Token(Token::PUNCTUATION_TYPE, $expression[$cursor], $cursor + 1); ++$cursor; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/ArgumentsNode.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/ArgumentsNode.php index 1c78d805..e9849a44 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/ArgumentsNode.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/ArgumentsNode.php @@ -27,7 +27,7 @@ class ArgumentsNode extends ArrayNode public function toArray() { - $array = array(); + $array = []; foreach ($this->getKeyValuePairs() as $pair) { $array[] = $pair['value']; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/ArrayNode.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/ArrayNode.php index e1a2f2e9..921319a7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/ArrayNode.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/ArrayNode.php @@ -41,14 +41,14 @@ class ArrayNode extends Node */ public function compile(Compiler $compiler) { - $compiler->raw('array('); + $compiler->raw('['); $this->compileArguments($compiler); - $compiler->raw(')'); + $compiler->raw(']'); } public function evaluate($functions, $values) { - $result = array(); + $result = []; foreach ($this->getKeyValuePairs() as $pair) { $result[$pair['key']->evaluate($functions, $values)] = $pair['value']->evaluate($functions, $values); } @@ -58,12 +58,12 @@ class ArrayNode extends Node public function toArray() { - $value = array(); + $value = []; foreach ($this->getKeyValuePairs() as $pair) { $value[$pair['key']->attributes['value']] = $pair['value']; } - $array = array(); + $array = []; if ($this->isHash($value)) { foreach ($value as $k => $v) { @@ -88,9 +88,9 @@ class ArrayNode extends Node protected function getKeyValuePairs() { - $pairs = array(); + $pairs = []; foreach (array_chunk($this->nodes, 2) as $pair) { - $pairs[] = array('key' => $pair[0], 'value' => $pair[1]); + $pairs[] = ['key' => $pair[0], 'value' => $pair[1]]; } return $pairs; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/BinaryNode.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/BinaryNode.php index f1755dae..92378102 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/BinaryNode.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/BinaryNode.php @@ -20,24 +20,24 @@ use Symfony\Component\ExpressionLanguage\Compiler; */ class BinaryNode extends Node { - private static $operators = array( + private static $operators = [ '~' => '.', 'and' => '&&', 'or' => '||', - ); + ]; - private static $functions = array( + private static $functions = [ '**' => 'pow', '..' => 'range', 'in' => 'in_array', 'not in' => '!in_array', - ); + ]; public function __construct($operator, Node $left, Node $right) { parent::__construct( - array('left' => $left, 'right' => $right), - array('operator' => $operator) + ['left' => $left, 'right' => $right], + ['operator' => $operator] ); } @@ -157,6 +157,6 @@ class BinaryNode extends Node public function toArray() { - return array('(', $this->nodes['left'], ' '.$this->attributes['operator'].' ', $this->nodes['right'], ')'); + return ['(', $this->nodes['left'], ' '.$this->attributes['operator'].' ', $this->nodes['right'], ')']; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/ConditionalNode.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/ConditionalNode.php index 9db0f931..ca1b484b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/ConditionalNode.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/ConditionalNode.php @@ -23,7 +23,7 @@ class ConditionalNode extends Node public function __construct(Node $expr1, Node $expr2, Node $expr3) { parent::__construct( - array('expr1' => $expr1, 'expr2' => $expr2, 'expr3' => $expr3) + ['expr1' => $expr1, 'expr2' => $expr2, 'expr3' => $expr3] ); } @@ -51,6 +51,6 @@ class ConditionalNode extends Node public function toArray() { - return array('(', $this->nodes['expr1'], ' ? ', $this->nodes['expr2'], ' : ', $this->nodes['expr3'], ')'); + return ['(', $this->nodes['expr1'], ' ? ', $this->nodes['expr2'], ' : ', $this->nodes['expr3'], ')']; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/ConstantNode.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/ConstantNode.php index 53c3290b..670e52ed 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/ConstantNode.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/ConstantNode.php @@ -26,8 +26,8 @@ class ConstantNode extends Node { $this->isIdentifier = $isIdentifier; parent::__construct( - array(), - array('value' => $value) + [], + ['value' => $value] ); } @@ -43,7 +43,7 @@ class ConstantNode extends Node public function toArray() { - $array = array(); + $array = []; $value = $this->attributes['value']; if ($this->isIdentifier) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/FunctionNode.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/FunctionNode.php index ca479b3d..90008d5d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/FunctionNode.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/FunctionNode.php @@ -23,14 +23,14 @@ class FunctionNode extends Node public function __construct($name, Node $arguments) { parent::__construct( - array('arguments' => $arguments), - array('name' => $name) + ['arguments' => $arguments], + ['name' => $name] ); } public function compile(Compiler $compiler) { - $arguments = array(); + $arguments = []; foreach ($this->nodes['arguments']->nodes as $node) { $arguments[] = $compiler->subcompile($node); } @@ -42,7 +42,7 @@ class FunctionNode extends Node public function evaluate($functions, $values) { - $arguments = array($values); + $arguments = [$values]; foreach ($this->nodes['arguments']->nodes as $node) { $arguments[] = $node->evaluate($functions, $values); } @@ -52,7 +52,7 @@ class FunctionNode extends Node public function toArray() { - $array = array(); + $array = []; $array[] = $this->attributes['name']; foreach ($this->nodes['arguments']->nodes as $node) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php index f76ce175..1cf414ae 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php @@ -27,8 +27,8 @@ class GetAttrNode extends Node public function __construct(Node $node, Node $attribute, ArrayNode $arguments, $type) { parent::__construct( - array('node' => $node, 'attribute' => $attribute, 'arguments' => $arguments), - array('type' => $type) + ['node' => $node, 'attribute' => $attribute, 'arguments' => $arguments], + ['type' => $type] ); } @@ -82,7 +82,7 @@ class GetAttrNode extends Node if (!\is_object($obj)) { throw new \RuntimeException('Unable to get a property on a non-object.'); } - if (!\is_callable($toCall = array($obj, $this->nodes['attribute']->attributes['value']))) { + if (!\is_callable($toCall = [$obj, $this->nodes['attribute']->attributes['value']])) { throw new \RuntimeException(sprintf('Unable to call method "%s" of object "%s".', $this->nodes['attribute']->attributes['value'], \get_class($obj))); } @@ -102,13 +102,13 @@ class GetAttrNode extends Node { switch ($this->attributes['type']) { case self::PROPERTY_CALL: - return array($this->nodes['node'], '.', $this->nodes['attribute']); + return [$this->nodes['node'], '.', $this->nodes['attribute']]; case self::METHOD_CALL: - return array($this->nodes['node'], '.', $this->nodes['attribute'], '(', $this->nodes['arguments'], ')'); + return [$this->nodes['node'], '.', $this->nodes['attribute'], '(', $this->nodes['arguments'], ')']; case self::ARRAY_CALL: - return array($this->nodes['node'], '[', $this->nodes['attribute'], ']'); + return [$this->nodes['node'], '[', $this->nodes['attribute'], ']']; } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/NameNode.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/NameNode.php index 9e1462f2..1c9c277b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/NameNode.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/NameNode.php @@ -23,8 +23,8 @@ class NameNode extends Node public function __construct($name) { parent::__construct( - array(), - array('name' => $name) + [], + ['name' => $name] ); } @@ -40,6 +40,6 @@ class NameNode extends Node public function toArray() { - return array($this->attributes['name']); + return [$this->attributes['name']]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/Node.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/Node.php index c6eb9f03..7923cb1d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/Node.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/Node.php @@ -20,14 +20,14 @@ use Symfony\Component\ExpressionLanguage\Compiler; */ class Node { - public $nodes = array(); - public $attributes = array(); + public $nodes = []; + public $attributes = []; /** * @param array $nodes An array of nodes * @param array $attributes An array of attributes */ - public function __construct(array $nodes = array(), array $attributes = array()) + public function __construct(array $nodes = [], array $attributes = []) { $this->nodes = $nodes; $this->attributes = $attributes; @@ -35,12 +35,12 @@ class Node public function __toString() { - $attributes = array(); + $attributes = []; foreach ($this->attributes as $name => $value) { $attributes[] = sprintf('%s: %s', $name, str_replace("\n", '', var_export($value, true))); } - $repr = array(str_replace('Symfony\Component\ExpressionLanguage\Node\\', '', \get_class($this)).'('.implode(', ', $attributes)); + $repr = [str_replace('Symfony\Component\ExpressionLanguage\Node\\', '', \get_class($this)).'('.implode(', ', $attributes)]; if (\count($this->nodes)) { foreach ($this->nodes as $node) { @@ -66,7 +66,7 @@ class Node public function evaluate($functions, $values) { - $results = array(); + $results = []; foreach ($this->nodes as $node) { $results[] = $node->evaluate($functions, $values); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/UnaryNode.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/UnaryNode.php index 58310321..497b7fe5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/UnaryNode.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Node/UnaryNode.php @@ -20,18 +20,18 @@ use Symfony\Component\ExpressionLanguage\Compiler; */ class UnaryNode extends Node { - private static $operators = array( + private static $operators = [ '!' => '!', 'not' => '!', '+' => '+', '-' => '-', - ); + ]; public function __construct($operator, Node $node) { parent::__construct( - array('node' => $node), - array('operator' => $operator) + ['node' => $node], + ['operator' => $operator] ); } @@ -61,6 +61,6 @@ class UnaryNode extends Node public function toArray() { - return array('(', $this->attributes['operator'].' ', $this->nodes['node'], ')'); + return ['(', $this->attributes['operator'].' ', $this->nodes['node'], ')']; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Parser.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Parser.php index a3b31ce9..0930bac2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Parser.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Parser.php @@ -36,40 +36,40 @@ class Parser { $this->functions = $functions; - $this->unaryOperators = array( - 'not' => array('precedence' => 50), - '!' => array('precedence' => 50), - '-' => array('precedence' => 500), - '+' => array('precedence' => 500), - ); - $this->binaryOperators = array( - 'or' => array('precedence' => 10, 'associativity' => self::OPERATOR_LEFT), - '||' => array('precedence' => 10, 'associativity' => self::OPERATOR_LEFT), - 'and' => array('precedence' => 15, 'associativity' => self::OPERATOR_LEFT), - '&&' => array('precedence' => 15, 'associativity' => self::OPERATOR_LEFT), - '|' => array('precedence' => 16, 'associativity' => self::OPERATOR_LEFT), - '^' => array('precedence' => 17, 'associativity' => self::OPERATOR_LEFT), - '&' => array('precedence' => 18, 'associativity' => self::OPERATOR_LEFT), - '==' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), - '===' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), - '!=' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), - '!==' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), - '<' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), - '>' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), - '>=' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), - '<=' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), - 'not in' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), - 'in' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), - 'matches' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), - '..' => array('precedence' => 25, 'associativity' => self::OPERATOR_LEFT), - '+' => array('precedence' => 30, 'associativity' => self::OPERATOR_LEFT), - '-' => array('precedence' => 30, 'associativity' => self::OPERATOR_LEFT), - '~' => array('precedence' => 40, 'associativity' => self::OPERATOR_LEFT), - '*' => array('precedence' => 60, 'associativity' => self::OPERATOR_LEFT), - '/' => array('precedence' => 60, 'associativity' => self::OPERATOR_LEFT), - '%' => array('precedence' => 60, 'associativity' => self::OPERATOR_LEFT), - '**' => array('precedence' => 200, 'associativity' => self::OPERATOR_RIGHT), - ); + $this->unaryOperators = [ + 'not' => ['precedence' => 50], + '!' => ['precedence' => 50], + '-' => ['precedence' => 500], + '+' => ['precedence' => 500], + ]; + $this->binaryOperators = [ + 'or' => ['precedence' => 10, 'associativity' => self::OPERATOR_LEFT], + '||' => ['precedence' => 10, 'associativity' => self::OPERATOR_LEFT], + 'and' => ['precedence' => 15, 'associativity' => self::OPERATOR_LEFT], + '&&' => ['precedence' => 15, 'associativity' => self::OPERATOR_LEFT], + '|' => ['precedence' => 16, 'associativity' => self::OPERATOR_LEFT], + '^' => ['precedence' => 17, 'associativity' => self::OPERATOR_LEFT], + '&' => ['precedence' => 18, 'associativity' => self::OPERATOR_LEFT], + '==' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT], + '===' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT], + '!=' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT], + '!==' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT], + '<' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT], + '>' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT], + '>=' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT], + '<=' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT], + 'not in' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT], + 'in' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT], + 'matches' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT], + '..' => ['precedence' => 25, 'associativity' => self::OPERATOR_LEFT], + '+' => ['precedence' => 30, 'associativity' => self::OPERATOR_LEFT], + '-' => ['precedence' => 30, 'associativity' => self::OPERATOR_LEFT], + '~' => ['precedence' => 40, 'associativity' => self::OPERATOR_LEFT], + '*' => ['precedence' => 60, 'associativity' => self::OPERATOR_LEFT], + '/' => ['precedence' => 60, 'associativity' => self::OPERATOR_LEFT], + '%' => ['precedence' => 60, 'associativity' => self::OPERATOR_LEFT], + '**' => ['precedence' => 200, 'associativity' => self::OPERATOR_RIGHT], + ]; } /** @@ -92,7 +92,7 @@ class Parser * * @throws SyntaxError */ - public function parse(TokenStream $stream, $names = array()) + public function parse(TokenStream $stream, $names = []) { $this->stream = $stream; $this->names = $names; @@ -364,7 +364,7 @@ class Parser */ public function parseArguments() { - $args = array(); + $args = []; $this->stream->expect(Token::PUNCTUATION_TYPE, '(', 'A list of arguments must begin with an opening parenthesis'); while (!$this->stream->current->test(Token::PUNCTUATION_TYPE, ')')) { if (!empty($args)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/ParserCache/ArrayParserCache.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/ParserCache/ArrayParserCache.php index 12496250..8f9d9f43 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/ParserCache/ArrayParserCache.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/ParserCache/ArrayParserCache.php @@ -22,7 +22,7 @@ use Symfony\Component\ExpressionLanguage\ParsedExpression; */ class ArrayParserCache implements ParserCacheInterface { - private $cache = array(); + private $cache = []; /** * {@inheritdoc} diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/ParserCache/ParserCacheAdapter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/ParserCache/ParserCacheAdapter.php index a3e227d0..30d9f842 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/ParserCache/ParserCacheAdapter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/ParserCache/ParserCacheAdapter.php @@ -65,7 +65,7 @@ class ParserCacheAdapter implements CacheItemPoolInterface /** * {@inheritdoc} */ - public function getItems(array $keys = array()) + public function getItems(array $keys = []) { throw new \BadMethodCallException('Not implemented'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Resources/bin/generate_operator_regex.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Resources/bin/generate_operator_regex.php index 74a10089..e1196c7f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Resources/bin/generate_operator_regex.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Resources/bin/generate_operator_regex.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -$operators = array('not', '!', 'or', '||', '&&', 'and', '|', '^', '&', '==', '===', '!=', '!==', '<', '>', '>=', '<=', 'not in', 'in', '..', '+', '-', '~', '*', '/', '%', 'matches', '**'); +$operators = ['not', '!', 'or', '||', '&&', 'and', '|', '^', '&', '==', '===', '!=', '!==', '<', '>', '>=', '<=', 'not in', 'in', '..', '+', '-', '~', '*', '/', '%', 'matches', '**']; $operators = array_combine($operators, array_map('strlen', $operators)); arsort($operators); -$regex = array(); +$regex = []; foreach ($operators as $operator => $length) { // an operator that ends with a character must be followed by // a whitespace or a parenthesis diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php index a1e5b7cc..d2a66028 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php @@ -56,10 +56,10 @@ class ExpressionLanguageTest extends TestCase ->with($cacheItemMock) ; - $parsedExpression = $expressionLanguage->parse('1 + 1', array()); + $parsedExpression = $expressionLanguage->parse('1 + 1', []); $this->assertSame($savedParsedExpression, $parsedExpression); - $parsedExpression = $expressionLanguage->parse('1 + 1', array()); + $parsedExpression = $expressionLanguage->parse('1 + 1', []); $this->assertSame($savedParsedExpression, $parsedExpression); } @@ -90,7 +90,7 @@ class ExpressionLanguageTest extends TestCase })) ; - $parsedExpression = $expressionLanguage->parse('1 + 1', array()); + $parsedExpression = $expressionLanguage->parse('1 + 1', []); $this->assertSame($savedParsedExpression, $parsedExpression); } @@ -115,7 +115,7 @@ class ExpressionLanguageTest extends TestCase public function testProviders() { - $expressionLanguage = new ExpressionLanguage(null, array(new TestProvider())); + $expressionLanguage = new ExpressionLanguage(null, [new TestProvider()]); $this->assertEquals('foo', $expressionLanguage->evaluate('identity("foo")')); $this->assertEquals('"foo"', $expressionLanguage->compile('identity("foo")')); $this->assertEquals('FOO', $expressionLanguage->evaluate('strtoupper("foo")')); @@ -153,38 +153,38 @@ class ExpressionLanguageTest extends TestCase public function testParseThrowsInsteadOfNotice() { $expressionLanguage = new ExpressionLanguage(); - $expressionLanguage->parse('node.', array('node')); + $expressionLanguage->parse('node.', ['node']); } public function shortCircuitProviderEvaluate() { - $object = $this->getMockBuilder('stdClass')->setMethods(array('foo'))->getMock(); + $object = $this->getMockBuilder('stdClass')->setMethods(['foo'])->getMock(); $object->expects($this->never())->method('foo'); - return array( - array('false and object.foo()', array('object' => $object), false), - array('false && object.foo()', array('object' => $object), false), - array('true || object.foo()', array('object' => $object), true), - array('true or object.foo()', array('object' => $object), true), - ); + return [ + ['false and object.foo()', ['object' => $object], false], + ['false && object.foo()', ['object' => $object], false], + ['true || object.foo()', ['object' => $object], true], + ['true or object.foo()', ['object' => $object], true], + ]; } public function shortCircuitProviderCompile() { - return array( - array('false and foo', array('foo' => 'foo'), false), - array('false && foo', array('foo' => 'foo'), false), - array('true || foo', array('foo' => 'foo'), true), - array('true or foo', array('foo' => 'foo'), true), - ); + return [ + ['false and foo', ['foo' => 'foo'], false], + ['false && foo', ['foo' => 'foo'], false], + ['true || foo', ['foo' => 'foo'], true], + ['true or foo', ['foo' => 'foo'], true], + ]; } public function testCachingForOverriddenVariableNames() { $expressionLanguage = new ExpressionLanguage(); $expression = 'a + b'; - $expressionLanguage->evaluate($expression, array('a' => 1, 'b' => 1)); - $result = $expressionLanguage->compile($expression, array('a', 'B' => 'b')); + $expressionLanguage->evaluate($expression, ['a' => 1, 'b' => 1]); + $result = $expressionLanguage->compile($expression, ['a', 'B' => 'b']); $this->assertSame('($a + $B)', $result); } @@ -192,7 +192,7 @@ class ExpressionLanguageTest extends TestCase { $expressionLanguage = new ExpressionLanguage(); $expression = '123 === a'; - $result = $expressionLanguage->compile($expression, array('a')); + $result = $expressionLanguage->compile($expression, ['a']); $this->assertSame('(123 === $a)', $result); } @@ -201,7 +201,7 @@ class ExpressionLanguageTest extends TestCase $cacheMock = $this->getMockBuilder('Psr\Cache\CacheItemPoolInterface')->getMock(); $cacheItemMock = $this->getMockBuilder('Psr\Cache\CacheItemInterface')->getMock(); $expressionLanguage = new ExpressionLanguage($cacheMock); - $savedParsedExpressions = array(); + $savedParsedExpressions = []; $cacheMock ->expects($this->exactly(2)) @@ -234,8 +234,8 @@ class ExpressionLanguageTest extends TestCase ; $expression = 'a + b'; - $expressionLanguage->compile($expression, array('a', 'B' => 'b')); - $expressionLanguage->compile($expression, array('B' => 'b', 'a')); + $expressionLanguage->compile($expression, ['a', 'B' => 'b']); + $expressionLanguage->compile($expression, ['B' => 'b', 'a']); } /** @@ -245,7 +245,7 @@ class ExpressionLanguageTest extends TestCase public function testRegisterAfterParse($registerCallback) { $el = new ExpressionLanguage(); - $el->parse('1 + 1', array()); + $el->parse('1 + 1', []); $registerCallback($el); } @@ -267,7 +267,7 @@ class ExpressionLanguageTest extends TestCase public function testCallBadCallable() { $el = new ExpressionLanguage(); - $el->evaluate('foo.myfunction()', array('foo' => new \stdClass())); + $el->evaluate('foo.myfunction()', ['foo' => new \stdClass()]); } /** @@ -283,22 +283,22 @@ class ExpressionLanguageTest extends TestCase public function getRegisterCallbacks() { - return array( - array( + return [ + [ function (ExpressionLanguage $el) { $el->register('fn', function () {}, function () {}); }, - ), - array( + ], + [ function (ExpressionLanguage $el) { $el->addFunction(new ExpressionFunction('fn', function () {}, function () {})); }, - ), - array( + ], + [ function (ExpressionLanguage $el) { $el->registerProvider(new TestProvider()); }, - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Fixtures/TestProvider.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Fixtures/TestProvider.php index 20c5182b..8405d4f9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Fixtures/TestProvider.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Fixtures/TestProvider.php @@ -19,7 +19,7 @@ class TestProvider implements ExpressionFunctionProviderInterface { public function getFunctions() { - return array( + return [ new ExpressionFunction('identity', function ($input) { return $input; }, function (array $values, $input) { @@ -31,7 +31,7 @@ class TestProvider implements ExpressionFunctionProviderInterface ExpressionFunction::fromPhp('\strtolower'), ExpressionFunction::fromPhp('Symfony\Component\ExpressionLanguage\Tests\Fixtures\fn_namespaced', 'fn_namespaced'), - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php index 16bf4508..ba35e7d1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php @@ -59,33 +59,33 @@ class LexerTest extends TestCase public function getTokenizeData() { - return array( - array( - array(new Token('name', 'a', 3)), + return [ + [ + [new Token('name', 'a', 3)], ' a ', - ), - array( - array(new Token('name', 'a', 1)), + ], + [ + [new Token('name', 'a', 1)], 'a', - ), - array( - array(new Token('string', 'foo', 1)), + ], + [ + [new Token('string', 'foo', 1)], '"foo"', - ), - array( - array(new Token('number', '3', 1)), + ], + [ + [new Token('number', '3', 1)], '3', - ), - array( - array(new Token('operator', '+', 1)), + ], + [ + [new Token('operator', '+', 1)], '+', - ), - array( - array(new Token('punctuation', '.', 1)), + ], + [ + [new Token('punctuation', '.', 1)], '.', - ), - array( - array( + ], + [ + [ new Token('punctuation', '(', 1), new Token('number', '3', 2), new Token('operator', '+', 4), @@ -101,21 +101,21 @@ class LexerTest extends TestCase new Token('punctuation', '[', 25), new Token('number', '4', 26), new Token('punctuation', ']', 27), - ), + ], '(3 + 5) ~ foo("bar").baz[4]', - ), - array( - array(new Token('operator', '..', 1)), + ], + [ + [new Token('operator', '..', 1)], '..', - ), - array( - array(new Token('string', '#foo', 1)), + ], + [ + [new Token('string', '#foo', 1)], "'#foo'", - ), - array( - array(new Token('string', '#foo', 1)), + ], + [ + [new Token('string', '#foo', 1)], '"#foo"', - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/AbstractNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/AbstractNodeTest.php index a6f80c2f..29750374 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/AbstractNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/AbstractNodeTest.php @@ -19,7 +19,7 @@ abstract class AbstractNodeTest extends TestCase /** * @dataProvider getEvaluateData */ - public function testEvaluate($expected, $node, $variables = array(), $functions = array()) + public function testEvaluate($expected, $node, $variables = [], $functions = []) { $this->assertSame($expected, $node->evaluate($functions, $variables)); } @@ -29,7 +29,7 @@ abstract class AbstractNodeTest extends TestCase /** * @dataProvider getCompileData */ - public function testCompile($expected, $node, $functions = array()) + public function testCompile($expected, $node, $functions = []) { $compiler = new Compiler($functions); $node->compile($compiler); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/ArgumentsNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/ArgumentsNodeTest.php index 60a6d1ca..9d88b4ae 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/ArgumentsNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/ArgumentsNodeTest.php @@ -17,16 +17,16 @@ class ArgumentsNodeTest extends ArrayNodeTest { public function getCompileData() { - return array( - array('"a", "b"', $this->getArrayNode()), - ); + return [ + ['"a", "b"', $this->getArrayNode()], + ]; } public function getDumpData() { - return array( - array('"a", "b"', $this->getArrayNode()), - ); + return [ + ['"a", "b"', $this->getArrayNode()], + ]; } protected function createArrayNode() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/ArrayNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/ArrayNodeTest.php index 11a35d46..3d03d837 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/ArrayNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/ArrayNodeTest.php @@ -30,31 +30,31 @@ class ArrayNodeTest extends AbstractNodeTest public function getEvaluateData() { - return array( - array(array('b' => 'a', 'b'), $this->getArrayNode()), - ); + return [ + [['b' => 'a', 'b'], $this->getArrayNode()], + ]; } public function getCompileData() { - return array( - array('array("b" => "a", 0 => "b")', $this->getArrayNode()), - ); + return [ + ['["b" => "a", 0 => "b"]', $this->getArrayNode()], + ]; } public function getDumpData() { - yield array('{"b": "a", 0: "b"}', $this->getArrayNode()); + yield ['{"b": "a", 0: "b"}', $this->getArrayNode()]; $array = $this->createArrayNode(); $array->addElement(new ConstantNode('c'), new ConstantNode('a"b')); $array->addElement(new ConstantNode('d'), new ConstantNode('a\b')); - yield array('{"a\\"b": "c", "a\\\\b": "d"}', $array); + yield ['{"a\\"b": "c", "a\\\\b": "d"}', $array]; $array = $this->createArrayNode(); $array->addElement(new ConstantNode('c')); $array->addElement(new ConstantNode('d')); - yield array('["c", "d"]', $array); + yield ['["c", "d"]', $array]; } protected function getArrayNode() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/BinaryNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/BinaryNodeTest.php index f8456f8d..b45a1e57 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/BinaryNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/BinaryNodeTest.php @@ -23,47 +23,47 @@ class BinaryNodeTest extends AbstractNodeTest $array->addElement(new ConstantNode('a')); $array->addElement(new ConstantNode('b')); - return array( - array(true, new BinaryNode('or', new ConstantNode(true), new ConstantNode(false))), - array(true, new BinaryNode('||', new ConstantNode(true), new ConstantNode(false))), - array(false, new BinaryNode('and', new ConstantNode(true), new ConstantNode(false))), - array(false, new BinaryNode('&&', new ConstantNode(true), new ConstantNode(false))), + return [ + [true, new BinaryNode('or', new ConstantNode(true), new ConstantNode(false))], + [true, new BinaryNode('||', new ConstantNode(true), new ConstantNode(false))], + [false, new BinaryNode('and', new ConstantNode(true), new ConstantNode(false))], + [false, new BinaryNode('&&', new ConstantNode(true), new ConstantNode(false))], - array(0, new BinaryNode('&', new ConstantNode(2), new ConstantNode(4))), - array(6, new BinaryNode('|', new ConstantNode(2), new ConstantNode(4))), - array(6, new BinaryNode('^', new ConstantNode(2), new ConstantNode(4))), + [0, new BinaryNode('&', new ConstantNode(2), new ConstantNode(4))], + [6, new BinaryNode('|', new ConstantNode(2), new ConstantNode(4))], + [6, new BinaryNode('^', new ConstantNode(2), new ConstantNode(4))], - array(true, new BinaryNode('<', new ConstantNode(1), new ConstantNode(2))), - array(true, new BinaryNode('<=', new ConstantNode(1), new ConstantNode(2))), - array(true, new BinaryNode('<=', new ConstantNode(1), new ConstantNode(1))), + [true, new BinaryNode('<', new ConstantNode(1), new ConstantNode(2))], + [true, new BinaryNode('<=', new ConstantNode(1), new ConstantNode(2))], + [true, new BinaryNode('<=', new ConstantNode(1), new ConstantNode(1))], - array(false, new BinaryNode('>', new ConstantNode(1), new ConstantNode(2))), - array(false, new BinaryNode('>=', new ConstantNode(1), new ConstantNode(2))), - array(true, new BinaryNode('>=', new ConstantNode(1), new ConstantNode(1))), + [false, new BinaryNode('>', new ConstantNode(1), new ConstantNode(2))], + [false, new BinaryNode('>=', new ConstantNode(1), new ConstantNode(2))], + [true, new BinaryNode('>=', new ConstantNode(1), new ConstantNode(1))], - array(true, new BinaryNode('===', new ConstantNode(true), new ConstantNode(true))), - array(false, new BinaryNode('!==', new ConstantNode(true), new ConstantNode(true))), + [true, new BinaryNode('===', new ConstantNode(true), new ConstantNode(true))], + [false, new BinaryNode('!==', new ConstantNode(true), new ConstantNode(true))], - array(false, new BinaryNode('==', new ConstantNode(2), new ConstantNode(1))), - array(true, new BinaryNode('!=', new ConstantNode(2), new ConstantNode(1))), + [false, new BinaryNode('==', new ConstantNode(2), new ConstantNode(1))], + [true, new BinaryNode('!=', new ConstantNode(2), new ConstantNode(1))], - array(-1, new BinaryNode('-', new ConstantNode(1), new ConstantNode(2))), - array(3, new BinaryNode('+', new ConstantNode(1), new ConstantNode(2))), - array(4, new BinaryNode('*', new ConstantNode(2), new ConstantNode(2))), - array(1, new BinaryNode('/', new ConstantNode(2), new ConstantNode(2))), - array(1, new BinaryNode('%', new ConstantNode(5), new ConstantNode(2))), - array(25, new BinaryNode('**', new ConstantNode(5), new ConstantNode(2))), - array('ab', new BinaryNode('~', new ConstantNode('a'), new ConstantNode('b'))), + [-1, new BinaryNode('-', new ConstantNode(1), new ConstantNode(2))], + [3, new BinaryNode('+', new ConstantNode(1), new ConstantNode(2))], + [4, new BinaryNode('*', new ConstantNode(2), new ConstantNode(2))], + [1, new BinaryNode('/', new ConstantNode(2), new ConstantNode(2))], + [1, new BinaryNode('%', new ConstantNode(5), new ConstantNode(2))], + [25, new BinaryNode('**', new ConstantNode(5), new ConstantNode(2))], + ['ab', new BinaryNode('~', new ConstantNode('a'), new ConstantNode('b'))], - array(true, new BinaryNode('in', new ConstantNode('a'), $array)), - array(false, new BinaryNode('in', new ConstantNode('c'), $array)), - array(true, new BinaryNode('not in', new ConstantNode('c'), $array)), - array(false, new BinaryNode('not in', new ConstantNode('a'), $array)), + [true, new BinaryNode('in', new ConstantNode('a'), $array)], + [false, new BinaryNode('in', new ConstantNode('c'), $array)], + [true, new BinaryNode('not in', new ConstantNode('c'), $array)], + [false, new BinaryNode('not in', new ConstantNode('a'), $array)], - array(array(1, 2, 3), new BinaryNode('..', new ConstantNode(1), new ConstantNode(3))), + [[1, 2, 3], new BinaryNode('..', new ConstantNode(1), new ConstantNode(3))], - array(1, new BinaryNode('matches', new ConstantNode('abc'), new ConstantNode('/^[a-z]+$/'))), - ); + [1, new BinaryNode('matches', new ConstantNode('abc'), new ConstantNode('/^[a-z]+$/'))], + ]; } public function getCompileData() @@ -72,47 +72,47 @@ class BinaryNodeTest extends AbstractNodeTest $array->addElement(new ConstantNode('a')); $array->addElement(new ConstantNode('b')); - return array( - array('(true || false)', new BinaryNode('or', new ConstantNode(true), new ConstantNode(false))), - array('(true || false)', new BinaryNode('||', new ConstantNode(true), new ConstantNode(false))), - array('(true && false)', new BinaryNode('and', new ConstantNode(true), new ConstantNode(false))), - array('(true && false)', new BinaryNode('&&', new ConstantNode(true), new ConstantNode(false))), + return [ + ['(true || false)', new BinaryNode('or', new ConstantNode(true), new ConstantNode(false))], + ['(true || false)', new BinaryNode('||', new ConstantNode(true), new ConstantNode(false))], + ['(true && false)', new BinaryNode('and', new ConstantNode(true), new ConstantNode(false))], + ['(true && false)', new BinaryNode('&&', new ConstantNode(true), new ConstantNode(false))], - array('(2 & 4)', new BinaryNode('&', new ConstantNode(2), new ConstantNode(4))), - array('(2 | 4)', new BinaryNode('|', new ConstantNode(2), new ConstantNode(4))), - array('(2 ^ 4)', new BinaryNode('^', new ConstantNode(2), new ConstantNode(4))), + ['(2 & 4)', new BinaryNode('&', new ConstantNode(2), new ConstantNode(4))], + ['(2 | 4)', new BinaryNode('|', new ConstantNode(2), new ConstantNode(4))], + ['(2 ^ 4)', new BinaryNode('^', new ConstantNode(2), new ConstantNode(4))], - array('(1 < 2)', new BinaryNode('<', new ConstantNode(1), new ConstantNode(2))), - array('(1 <= 2)', new BinaryNode('<=', new ConstantNode(1), new ConstantNode(2))), - array('(1 <= 1)', new BinaryNode('<=', new ConstantNode(1), new ConstantNode(1))), + ['(1 < 2)', new BinaryNode('<', new ConstantNode(1), new ConstantNode(2))], + ['(1 <= 2)', new BinaryNode('<=', new ConstantNode(1), new ConstantNode(2))], + ['(1 <= 1)', new BinaryNode('<=', new ConstantNode(1), new ConstantNode(1))], - array('(1 > 2)', new BinaryNode('>', new ConstantNode(1), new ConstantNode(2))), - array('(1 >= 2)', new BinaryNode('>=', new ConstantNode(1), new ConstantNode(2))), - array('(1 >= 1)', new BinaryNode('>=', new ConstantNode(1), new ConstantNode(1))), + ['(1 > 2)', new BinaryNode('>', new ConstantNode(1), new ConstantNode(2))], + ['(1 >= 2)', new BinaryNode('>=', new ConstantNode(1), new ConstantNode(2))], + ['(1 >= 1)', new BinaryNode('>=', new ConstantNode(1), new ConstantNode(1))], - array('(true === true)', new BinaryNode('===', new ConstantNode(true), new ConstantNode(true))), - array('(true !== true)', new BinaryNode('!==', new ConstantNode(true), new ConstantNode(true))), + ['(true === true)', new BinaryNode('===', new ConstantNode(true), new ConstantNode(true))], + ['(true !== true)', new BinaryNode('!==', new ConstantNode(true), new ConstantNode(true))], - array('(2 == 1)', new BinaryNode('==', new ConstantNode(2), new ConstantNode(1))), - array('(2 != 1)', new BinaryNode('!=', new ConstantNode(2), new ConstantNode(1))), + ['(2 == 1)', new BinaryNode('==', new ConstantNode(2), new ConstantNode(1))], + ['(2 != 1)', new BinaryNode('!=', new ConstantNode(2), new ConstantNode(1))], - array('(1 - 2)', new BinaryNode('-', new ConstantNode(1), new ConstantNode(2))), - array('(1 + 2)', new BinaryNode('+', new ConstantNode(1), new ConstantNode(2))), - array('(2 * 2)', new BinaryNode('*', new ConstantNode(2), new ConstantNode(2))), - array('(2 / 2)', new BinaryNode('/', new ConstantNode(2), new ConstantNode(2))), - array('(5 % 2)', new BinaryNode('%', new ConstantNode(5), new ConstantNode(2))), - array('pow(5, 2)', new BinaryNode('**', new ConstantNode(5), new ConstantNode(2))), - array('("a" . "b")', new BinaryNode('~', new ConstantNode('a'), new ConstantNode('b'))), + ['(1 - 2)', new BinaryNode('-', new ConstantNode(1), new ConstantNode(2))], + ['(1 + 2)', new BinaryNode('+', new ConstantNode(1), new ConstantNode(2))], + ['(2 * 2)', new BinaryNode('*', new ConstantNode(2), new ConstantNode(2))], + ['(2 / 2)', new BinaryNode('/', new ConstantNode(2), new ConstantNode(2))], + ['(5 % 2)', new BinaryNode('%', new ConstantNode(5), new ConstantNode(2))], + ['pow(5, 2)', new BinaryNode('**', new ConstantNode(5), new ConstantNode(2))], + ['("a" . "b")', new BinaryNode('~', new ConstantNode('a'), new ConstantNode('b'))], - array('in_array("a", array(0 => "a", 1 => "b"))', new BinaryNode('in', new ConstantNode('a'), $array)), - array('in_array("c", array(0 => "a", 1 => "b"))', new BinaryNode('in', new ConstantNode('c'), $array)), - array('!in_array("c", array(0 => "a", 1 => "b"))', new BinaryNode('not in', new ConstantNode('c'), $array)), - array('!in_array("a", array(0 => "a", 1 => "b"))', new BinaryNode('not in', new ConstantNode('a'), $array)), + ['in_array("a", [0 => "a", 1 => "b"])', new BinaryNode('in', new ConstantNode('a'), $array)], + ['in_array("c", [0 => "a", 1 => "b"])', new BinaryNode('in', new ConstantNode('c'), $array)], + ['!in_array("c", [0 => "a", 1 => "b"])', new BinaryNode('not in', new ConstantNode('c'), $array)], + ['!in_array("a", [0 => "a", 1 => "b"])', new BinaryNode('not in', new ConstantNode('a'), $array)], - array('range(1, 3)', new BinaryNode('..', new ConstantNode(1), new ConstantNode(3))), + ['range(1, 3)', new BinaryNode('..', new ConstantNode(1), new ConstantNode(3))], - array('preg_match("/^[a-z]+/i\$/", "abc")', new BinaryNode('matches', new ConstantNode('abc'), new ConstantNode('/^[a-z]+/i$/'))), - ); + ['preg_match("/^[a-z]+/i\$/", "abc")', new BinaryNode('matches', new ConstantNode('abc'), new ConstantNode('/^[a-z]+/i$/'))], + ]; } public function getDumpData() @@ -121,46 +121,46 @@ class BinaryNodeTest extends AbstractNodeTest $array->addElement(new ConstantNode('a')); $array->addElement(new ConstantNode('b')); - return array( - array('(true or false)', new BinaryNode('or', new ConstantNode(true), new ConstantNode(false))), - array('(true || false)', new BinaryNode('||', new ConstantNode(true), new ConstantNode(false))), - array('(true and false)', new BinaryNode('and', new ConstantNode(true), new ConstantNode(false))), - array('(true && false)', new BinaryNode('&&', new ConstantNode(true), new ConstantNode(false))), + return [ + ['(true or false)', new BinaryNode('or', new ConstantNode(true), new ConstantNode(false))], + ['(true || false)', new BinaryNode('||', new ConstantNode(true), new ConstantNode(false))], + ['(true and false)', new BinaryNode('and', new ConstantNode(true), new ConstantNode(false))], + ['(true && false)', new BinaryNode('&&', new ConstantNode(true), new ConstantNode(false))], - array('(2 & 4)', new BinaryNode('&', new ConstantNode(2), new ConstantNode(4))), - array('(2 | 4)', new BinaryNode('|', new ConstantNode(2), new ConstantNode(4))), - array('(2 ^ 4)', new BinaryNode('^', new ConstantNode(2), new ConstantNode(4))), + ['(2 & 4)', new BinaryNode('&', new ConstantNode(2), new ConstantNode(4))], + ['(2 | 4)', new BinaryNode('|', new ConstantNode(2), new ConstantNode(4))], + ['(2 ^ 4)', new BinaryNode('^', new ConstantNode(2), new ConstantNode(4))], - array('(1 < 2)', new BinaryNode('<', new ConstantNode(1), new ConstantNode(2))), - array('(1 <= 2)', new BinaryNode('<=', new ConstantNode(1), new ConstantNode(2))), - array('(1 <= 1)', new BinaryNode('<=', new ConstantNode(1), new ConstantNode(1))), + ['(1 < 2)', new BinaryNode('<', new ConstantNode(1), new ConstantNode(2))], + ['(1 <= 2)', new BinaryNode('<=', new ConstantNode(1), new ConstantNode(2))], + ['(1 <= 1)', new BinaryNode('<=', new ConstantNode(1), new ConstantNode(1))], - array('(1 > 2)', new BinaryNode('>', new ConstantNode(1), new ConstantNode(2))), - array('(1 >= 2)', new BinaryNode('>=', new ConstantNode(1), new ConstantNode(2))), - array('(1 >= 1)', new BinaryNode('>=', new ConstantNode(1), new ConstantNode(1))), + ['(1 > 2)', new BinaryNode('>', new ConstantNode(1), new ConstantNode(2))], + ['(1 >= 2)', new BinaryNode('>=', new ConstantNode(1), new ConstantNode(2))], + ['(1 >= 1)', new BinaryNode('>=', new ConstantNode(1), new ConstantNode(1))], - array('(true === true)', new BinaryNode('===', new ConstantNode(true), new ConstantNode(true))), - array('(true !== true)', new BinaryNode('!==', new ConstantNode(true), new ConstantNode(true))), + ['(true === true)', new BinaryNode('===', new ConstantNode(true), new ConstantNode(true))], + ['(true !== true)', new BinaryNode('!==', new ConstantNode(true), new ConstantNode(true))], - array('(2 == 1)', new BinaryNode('==', new ConstantNode(2), new ConstantNode(1))), - array('(2 != 1)', new BinaryNode('!=', new ConstantNode(2), new ConstantNode(1))), + ['(2 == 1)', new BinaryNode('==', new ConstantNode(2), new ConstantNode(1))], + ['(2 != 1)', new BinaryNode('!=', new ConstantNode(2), new ConstantNode(1))], - array('(1 - 2)', new BinaryNode('-', new ConstantNode(1), new ConstantNode(2))), - array('(1 + 2)', new BinaryNode('+', new ConstantNode(1), new ConstantNode(2))), - array('(2 * 2)', new BinaryNode('*', new ConstantNode(2), new ConstantNode(2))), - array('(2 / 2)', new BinaryNode('/', new ConstantNode(2), new ConstantNode(2))), - array('(5 % 2)', new BinaryNode('%', new ConstantNode(5), new ConstantNode(2))), - array('(5 ** 2)', new BinaryNode('**', new ConstantNode(5), new ConstantNode(2))), - array('("a" ~ "b")', new BinaryNode('~', new ConstantNode('a'), new ConstantNode('b'))), + ['(1 - 2)', new BinaryNode('-', new ConstantNode(1), new ConstantNode(2))], + ['(1 + 2)', new BinaryNode('+', new ConstantNode(1), new ConstantNode(2))], + ['(2 * 2)', new BinaryNode('*', new ConstantNode(2), new ConstantNode(2))], + ['(2 / 2)', new BinaryNode('/', new ConstantNode(2), new ConstantNode(2))], + ['(5 % 2)', new BinaryNode('%', new ConstantNode(5), new ConstantNode(2))], + ['(5 ** 2)', new BinaryNode('**', new ConstantNode(5), new ConstantNode(2))], + ['("a" ~ "b")', new BinaryNode('~', new ConstantNode('a'), new ConstantNode('b'))], - array('("a" in ["a", "b"])', new BinaryNode('in', new ConstantNode('a'), $array)), - array('("c" in ["a", "b"])', new BinaryNode('in', new ConstantNode('c'), $array)), - array('("c" not in ["a", "b"])', new BinaryNode('not in', new ConstantNode('c'), $array)), - array('("a" not in ["a", "b"])', new BinaryNode('not in', new ConstantNode('a'), $array)), + ['("a" in ["a", "b"])', new BinaryNode('in', new ConstantNode('a'), $array)], + ['("c" in ["a", "b"])', new BinaryNode('in', new ConstantNode('c'), $array)], + ['("c" not in ["a", "b"])', new BinaryNode('not in', new ConstantNode('c'), $array)], + ['("a" not in ["a", "b"])', new BinaryNode('not in', new ConstantNode('a'), $array)], - array('(1 .. 3)', new BinaryNode('..', new ConstantNode(1), new ConstantNode(3))), + ['(1 .. 3)', new BinaryNode('..', new ConstantNode(1), new ConstantNode(3))], - array('("abc" matches "/^[a-z]+/i$/")', new BinaryNode('matches', new ConstantNode('abc'), new ConstantNode('/^[a-z]+/i$/'))), - ); + ['("abc" matches "/^[a-z]+/i$/")', new BinaryNode('matches', new ConstantNode('abc'), new ConstantNode('/^[a-z]+/i$/'))], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/ConditionalNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/ConditionalNodeTest.php index cbf9e8d4..13b7cbde 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/ConditionalNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/ConditionalNodeTest.php @@ -18,25 +18,25 @@ class ConditionalNodeTest extends AbstractNodeTest { public function getEvaluateData() { - return array( - array(1, new ConditionalNode(new ConstantNode(true), new ConstantNode(1), new ConstantNode(2))), - array(2, new ConditionalNode(new ConstantNode(false), new ConstantNode(1), new ConstantNode(2))), - ); + return [ + [1, new ConditionalNode(new ConstantNode(true), new ConstantNode(1), new ConstantNode(2))], + [2, new ConditionalNode(new ConstantNode(false), new ConstantNode(1), new ConstantNode(2))], + ]; } public function getCompileData() { - return array( - array('((true) ? (1) : (2))', new ConditionalNode(new ConstantNode(true), new ConstantNode(1), new ConstantNode(2))), - array('((false) ? (1) : (2))', new ConditionalNode(new ConstantNode(false), new ConstantNode(1), new ConstantNode(2))), - ); + return [ + ['((true) ? (1) : (2))', new ConditionalNode(new ConstantNode(true), new ConstantNode(1), new ConstantNode(2))], + ['((false) ? (1) : (2))', new ConditionalNode(new ConstantNode(false), new ConstantNode(1), new ConstantNode(2))], + ]; } public function getDumpData() { - return array( - array('(true ? 1 : 2)', new ConditionalNode(new ConstantNode(true), new ConstantNode(1), new ConstantNode(2))), - array('(false ? 1 : 2)', new ConditionalNode(new ConstantNode(false), new ConstantNode(1), new ConstantNode(2))), - ); + return [ + ['(true ? 1 : 2)', new ConditionalNode(new ConstantNode(true), new ConstantNode(1), new ConstantNode(2))], + ['(false ? 1 : 2)', new ConditionalNode(new ConstantNode(false), new ConstantNode(1), new ConstantNode(2))], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/ConstantNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/ConstantNodeTest.php index af79a91c..fee9f5bf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/ConstantNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/ConstantNodeTest.php @@ -17,44 +17,44 @@ class ConstantNodeTest extends AbstractNodeTest { public function getEvaluateData() { - return array( - array(false, new ConstantNode(false)), - array(true, new ConstantNode(true)), - array(null, new ConstantNode(null)), - array(3, new ConstantNode(3)), - array(3.3, new ConstantNode(3.3)), - array('foo', new ConstantNode('foo')), - array(array(1, 'b' => 'a'), new ConstantNode(array(1, 'b' => 'a'))), - ); + return [ + [false, new ConstantNode(false)], + [true, new ConstantNode(true)], + [null, new ConstantNode(null)], + [3, new ConstantNode(3)], + [3.3, new ConstantNode(3.3)], + ['foo', new ConstantNode('foo')], + [[1, 'b' => 'a'], new ConstantNode([1, 'b' => 'a'])], + ]; } public function getCompileData() { - return array( - array('false', new ConstantNode(false)), - array('true', new ConstantNode(true)), - array('null', new ConstantNode(null)), - array('3', new ConstantNode(3)), - array('3.3', new ConstantNode(3.3)), - array('"foo"', new ConstantNode('foo')), - array('array(0 => 1, "b" => "a")', new ConstantNode(array(1, 'b' => 'a'))), - ); + return [ + ['false', new ConstantNode(false)], + ['true', new ConstantNode(true)], + ['null', new ConstantNode(null)], + ['3', new ConstantNode(3)], + ['3.3', new ConstantNode(3.3)], + ['"foo"', new ConstantNode('foo')], + ['[0 => 1, "b" => "a"]', new ConstantNode([1, 'b' => 'a'])], + ]; } public function getDumpData() { - return array( - array('false', new ConstantNode(false)), - array('true', new ConstantNode(true)), - array('null', new ConstantNode(null)), - array('3', new ConstantNode(3)), - array('3.3', new ConstantNode(3.3)), - array('"foo"', new ConstantNode('foo')), - array('foo', new ConstantNode('foo', true)), - array('{0: 1, "b": "a", 1: true}', new ConstantNode(array(1, 'b' => 'a', true))), - array('{"a\\"b": "c", "a\\\\b": "d"}', new ConstantNode(array('a"b' => 'c', 'a\\b' => 'd'))), - array('["c", "d"]', new ConstantNode(array('c', 'd'))), - array('{"a": ["b"]}', new ConstantNode(array('a' => array('b')))), - ); + return [ + ['false', new ConstantNode(false)], + ['true', new ConstantNode(true)], + ['null', new ConstantNode(null)], + ['3', new ConstantNode(3)], + ['3.3', new ConstantNode(3.3)], + ['"foo"', new ConstantNode('foo')], + ['foo', new ConstantNode('foo', true)], + ['{0: 1, "b": "a", 1: true}', new ConstantNode([1, 'b' => 'a', true])], + ['{"a\\"b": "c", "a\\\\b": "d"}', new ConstantNode(['a"b' => 'c', 'a\\b' => 'd'])], + ['["c", "d"]', new ConstantNode(['c', 'd'])], + ['{"a": ["b"]}', new ConstantNode(['a' => ['b']])], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/FunctionNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/FunctionNodeTest.php index 3bddc5e5..c6cb02c1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/FunctionNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/FunctionNodeTest.php @@ -19,34 +19,34 @@ class FunctionNodeTest extends AbstractNodeTest { public function getEvaluateData() { - return array( - array('bar', new FunctionNode('foo', new Node(array(new ConstantNode('bar')))), array(), array('foo' => $this->getCallables())), - ); + return [ + ['bar', new FunctionNode('foo', new Node([new ConstantNode('bar')])), [], ['foo' => $this->getCallables()]], + ]; } public function getCompileData() { - return array( - array('foo("bar")', new FunctionNode('foo', new Node(array(new ConstantNode('bar')))), array('foo' => $this->getCallables())), - ); + return [ + ['foo("bar")', new FunctionNode('foo', new Node([new ConstantNode('bar')])), ['foo' => $this->getCallables()]], + ]; } public function getDumpData() { - return array( - array('foo("bar")', new FunctionNode('foo', new Node(array(new ConstantNode('bar')))), array('foo' => $this->getCallables())), - ); + return [ + ['foo("bar")', new FunctionNode('foo', new Node([new ConstantNode('bar')])), ['foo' => $this->getCallables()]], + ]; } protected function getCallables() { - return array( + return [ 'compiler' => function ($arg) { return sprintf('foo(%s)', $arg); }, 'evaluator' => function ($variables, $arg) { return $arg; }, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/GetAttrNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/GetAttrNodeTest.php index 750acaf9..c790f33a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/GetAttrNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/GetAttrNodeTest.php @@ -20,41 +20,41 @@ class GetAttrNodeTest extends AbstractNodeTest { public function getEvaluateData() { - return array( - array('b', new GetAttrNode(new NameNode('foo'), new ConstantNode(0), $this->getArrayNode(), GetAttrNode::ARRAY_CALL), array('foo' => array('b' => 'a', 'b'))), - array('a', new GetAttrNode(new NameNode('foo'), new ConstantNode('b'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL), array('foo' => array('b' => 'a', 'b'))), + return [ + ['b', new GetAttrNode(new NameNode('foo'), new ConstantNode(0), $this->getArrayNode(), GetAttrNode::ARRAY_CALL), ['foo' => ['b' => 'a', 'b']]], + ['a', new GetAttrNode(new NameNode('foo'), new ConstantNode('b'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL), ['foo' => ['b' => 'a', 'b']]], - array('bar', new GetAttrNode(new NameNode('foo'), new ConstantNode('foo'), $this->getArrayNode(), GetAttrNode::PROPERTY_CALL), array('foo' => new Obj())), + ['bar', new GetAttrNode(new NameNode('foo'), new ConstantNode('foo'), $this->getArrayNode(), GetAttrNode::PROPERTY_CALL), ['foo' => new Obj()]], - array('baz', new GetAttrNode(new NameNode('foo'), new ConstantNode('foo'), $this->getArrayNode(), GetAttrNode::METHOD_CALL), array('foo' => new Obj())), - array('a', new GetAttrNode(new NameNode('foo'), new NameNode('index'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL), array('foo' => array('b' => 'a', 'b'), 'index' => 'b')), - ); + ['baz', new GetAttrNode(new NameNode('foo'), new ConstantNode('foo'), $this->getArrayNode(), GetAttrNode::METHOD_CALL), ['foo' => new Obj()]], + ['a', new GetAttrNode(new NameNode('foo'), new NameNode('index'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL), ['foo' => ['b' => 'a', 'b'], 'index' => 'b']], + ]; } public function getCompileData() { - return array( - array('$foo[0]', new GetAttrNode(new NameNode('foo'), new ConstantNode(0), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)), - array('$foo["b"]', new GetAttrNode(new NameNode('foo'), new ConstantNode('b'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)), + return [ + ['$foo[0]', new GetAttrNode(new NameNode('foo'), new ConstantNode(0), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)], + ['$foo["b"]', new GetAttrNode(new NameNode('foo'), new ConstantNode('b'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)], - array('$foo->foo', new GetAttrNode(new NameNode('foo'), new ConstantNode('foo'), $this->getArrayNode(), GetAttrNode::PROPERTY_CALL), array('foo' => new Obj())), + ['$foo->foo', new GetAttrNode(new NameNode('foo'), new ConstantNode('foo'), $this->getArrayNode(), GetAttrNode::PROPERTY_CALL), ['foo' => new Obj()]], - array('$foo->foo(array("b" => "a", 0 => "b"))', new GetAttrNode(new NameNode('foo'), new ConstantNode('foo'), $this->getArrayNode(), GetAttrNode::METHOD_CALL), array('foo' => new Obj())), - array('$foo[$index]', new GetAttrNode(new NameNode('foo'), new NameNode('index'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)), - ); + ['$foo->foo(["b" => "a", 0 => "b"])', new GetAttrNode(new NameNode('foo'), new ConstantNode('foo'), $this->getArrayNode(), GetAttrNode::METHOD_CALL), ['foo' => new Obj()]], + ['$foo[$index]', new GetAttrNode(new NameNode('foo'), new NameNode('index'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)], + ]; } public function getDumpData() { - return array( - array('foo[0]', new GetAttrNode(new NameNode('foo'), new ConstantNode(0), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)), - array('foo["b"]', new GetAttrNode(new NameNode('foo'), new ConstantNode('b'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)), + return [ + ['foo[0]', new GetAttrNode(new NameNode('foo'), new ConstantNode(0), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)], + ['foo["b"]', new GetAttrNode(new NameNode('foo'), new ConstantNode('b'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)], - array('foo.foo', new GetAttrNode(new NameNode('foo'), new NameNode('foo'), $this->getArrayNode(), GetAttrNode::PROPERTY_CALL), array('foo' => new Obj())), + ['foo.foo', new GetAttrNode(new NameNode('foo'), new NameNode('foo'), $this->getArrayNode(), GetAttrNode::PROPERTY_CALL), ['foo' => new Obj()]], - array('foo.foo({"b": "a", 0: "b"})', new GetAttrNode(new NameNode('foo'), new NameNode('foo'), $this->getArrayNode(), GetAttrNode::METHOD_CALL), array('foo' => new Obj())), - array('foo[index]', new GetAttrNode(new NameNode('foo'), new NameNode('index'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)), - ); + ['foo.foo({"b": "a", 0: "b"})', new GetAttrNode(new NameNode('foo'), new NameNode('foo'), $this->getArrayNode(), GetAttrNode::METHOD_CALL), ['foo' => new Obj()]], + ['foo[index]', new GetAttrNode(new NameNode('foo'), new NameNode('index'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)], + ]; } protected function getArrayNode() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/NameNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/NameNodeTest.php index 5fa2c37f..a30c27b8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/NameNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/NameNodeTest.php @@ -17,22 +17,22 @@ class NameNodeTest extends AbstractNodeTest { public function getEvaluateData() { - return array( - array('bar', new NameNode('foo'), array('foo' => 'bar')), - ); + return [ + ['bar', new NameNode('foo'), ['foo' => 'bar']], + ]; } public function getCompileData() { - return array( - array('$foo', new NameNode('foo')), - ); + return [ + ['$foo', new NameNode('foo')], + ]; } public function getDumpData() { - return array( - array('foo', new NameNode('foo')), - ); + return [ + ['foo', new NameNode('foo')], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/NodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/NodeTest.php index 140f1521..351da051 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/NodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/NodeTest.php @@ -19,7 +19,7 @@ class NodeTest extends TestCase { public function testToString() { - $node = new Node(array(new ConstantNode('foo'))); + $node = new Node([new ConstantNode('foo')]); $this->assertEquals(<<<'EOF' Node( @@ -31,7 +31,7 @@ EOF public function testSerialization() { - $node = new Node(array('foo' => 'bar'), array('bar' => 'foo')); + $node = new Node(['foo' => 'bar'], ['bar' => 'foo']); $serializedNode = serialize($node); $unserializedNode = unserialize($serializedNode); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/UnaryNodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/UnaryNodeTest.php index ef072cb6..bac75d24 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/UnaryNodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/Node/UnaryNodeTest.php @@ -18,31 +18,31 @@ class UnaryNodeTest extends AbstractNodeTest { public function getEvaluateData() { - return array( - array(-1, new UnaryNode('-', new ConstantNode(1))), - array(3, new UnaryNode('+', new ConstantNode(3))), - array(false, new UnaryNode('!', new ConstantNode(true))), - array(false, new UnaryNode('not', new ConstantNode(true))), - ); + return [ + [-1, new UnaryNode('-', new ConstantNode(1))], + [3, new UnaryNode('+', new ConstantNode(3))], + [false, new UnaryNode('!', new ConstantNode(true))], + [false, new UnaryNode('not', new ConstantNode(true))], + ]; } public function getCompileData() { - return array( - array('(-1)', new UnaryNode('-', new ConstantNode(1))), - array('(+3)', new UnaryNode('+', new ConstantNode(3))), - array('(!true)', new UnaryNode('!', new ConstantNode(true))), - array('(!true)', new UnaryNode('not', new ConstantNode(true))), - ); + return [ + ['(-1)', new UnaryNode('-', new ConstantNode(1))], + ['(+3)', new UnaryNode('+', new ConstantNode(3))], + ['(!true)', new UnaryNode('!', new ConstantNode(true))], + ['(!true)', new UnaryNode('not', new ConstantNode(true))], + ]; } public function getDumpData() { - return array( - array('(- 1)', new UnaryNode('-', new ConstantNode(1))), - array('(+ 3)', new UnaryNode('+', new ConstantNode(3))), - array('(! true)', new UnaryNode('!', new ConstantNode(true))), - array('(not true)', new UnaryNode('not', new ConstantNode(true))), - ); + return [ + ['(- 1)', new UnaryNode('-', new ConstantNode(1))], + ['(+ 3)', new UnaryNode('+', new ConstantNode(3))], + ['(! true)', new UnaryNode('!', new ConstantNode(true))], + ['(not true)', new UnaryNode('not', new ConstantNode(true))], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/ParserCache/ParserCacheAdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/ParserCache/ParserCacheAdapterTest.php index 20fbe802..b75224c8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/ParserCache/ParserCacheAdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/ParserCache/ParserCacheAdapterTest.php @@ -47,7 +47,7 @@ class ParserCacheAdapterTest extends TestCase $poolMock = $this->getMockBuilder('Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface')->getMock(); $cacheItemMock = $this->getMockBuilder('Psr\Cache\CacheItemInterface')->getMock(); $key = 'key'; - $value = new ParsedExpression('1 + 1', new Node(array(), array())); + $value = new ParsedExpression('1 + 1', new Node([], [])); $parserCacheAdapter = new ParserCacheAdapter($poolMock); $poolMock @@ -112,7 +112,7 @@ class ParserCacheAdapterTest extends TestCase public function testDeleteItems() { $poolMock = $this->getMockBuilder('Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface')->getMock(); - $keys = array('key'); + $keys = ['key']; $parserCacheAdapter = new ParserCacheAdapter($poolMock); $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(\BadMethodCallException::class); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/ParserTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/ParserTest.php index 1e9ffba2..d030600f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/ParserTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/ExpressionLanguage/Tests/ParserTest.php @@ -25,7 +25,7 @@ class ParserTest extends TestCase public function testParseWithInvalidName() { $lexer = new Lexer(); - $parser = new Parser(array()); + $parser = new Parser([]); $parser->parse($lexer->tokenize('foo')); } @@ -36,17 +36,17 @@ class ParserTest extends TestCase public function testParseWithZeroInNames() { $lexer = new Lexer(); - $parser = new Parser(array()); - $parser->parse($lexer->tokenize('foo'), array(0)); + $parser = new Parser([]); + $parser->parse($lexer->tokenize('foo'), [0]); } /** * @dataProvider getParseData */ - public function testParse($node, $expression, $names = array()) + public function testParse($node, $expression, $names = []) { $lexer = new Lexer(); - $parser = new Parser(array()); + $parser = new Parser([]); $this->assertEquals($node, $parser->parse($lexer->tokenize($expression), $names)); } @@ -57,63 +57,63 @@ class ParserTest extends TestCase $arguments->addElement(new Node\ConstantNode(2)); $arguments->addElement(new Node\ConstantNode(true)); - return array( - array( + return [ + [ new Node\NameNode('a'), 'a', - array('a'), - ), - array( + ['a'], + ], + [ new Node\ConstantNode('a'), '"a"', - ), - array( + ], + [ new Node\ConstantNode(3), '3', - ), - array( + ], + [ new Node\ConstantNode(false), 'false', - ), - array( + ], + [ new Node\ConstantNode(true), 'true', - ), - array( + ], + [ new Node\ConstantNode(null), 'null', - ), - array( + ], + [ new Node\UnaryNode('-', new Node\ConstantNode(3)), '-3', - ), - array( + ], + [ new Node\BinaryNode('-', new Node\ConstantNode(3), new Node\ConstantNode(3)), '3 - 3', - ), - array( + ], + [ new Node\BinaryNode('*', new Node\BinaryNode('-', new Node\ConstantNode(3), new Node\ConstantNode(3)), new Node\ConstantNode(2) ), '(3 - 3) * 2', - ), - array( + ], + [ new Node\GetAttrNode(new Node\NameNode('foo'), new Node\ConstantNode('bar', true), new Node\ArgumentsNode(), Node\GetAttrNode::PROPERTY_CALL), 'foo.bar', - array('foo'), - ), - array( + ['foo'], + ], + [ new Node\GetAttrNode(new Node\NameNode('foo'), new Node\ConstantNode('bar', true), new Node\ArgumentsNode(), Node\GetAttrNode::METHOD_CALL), 'foo.bar()', - array('foo'), - ), - array( + ['foo'], + ], + [ new Node\GetAttrNode(new Node\NameNode('foo'), new Node\ConstantNode('not', true), new Node\ArgumentsNode(), Node\GetAttrNode::METHOD_CALL), 'foo.not()', - array('foo'), - ), - array( + ['foo'], + ], + [ new Node\GetAttrNode( new Node\NameNode('foo'), new Node\ConstantNode('bar', true), @@ -121,24 +121,24 @@ class ParserTest extends TestCase Node\GetAttrNode::METHOD_CALL ), 'foo.bar("arg1", 2, true)', - array('foo'), - ), - array( + ['foo'], + ], + [ new Node\GetAttrNode(new Node\NameNode('foo'), new Node\ConstantNode(3), new Node\ArgumentsNode(), Node\GetAttrNode::ARRAY_CALL), 'foo[3]', - array('foo'), - ), - array( + ['foo'], + ], + [ new Node\ConditionalNode(new Node\ConstantNode(true), new Node\ConstantNode(true), new Node\ConstantNode(false)), 'true ? true : false', - ), - array( + ], + [ new Node\BinaryNode('matches', new Node\ConstantNode('foo'), new Node\ConstantNode('/foo/')), '"foo" matches "/foo/"', - ), + ], // chained calls - array( + [ $this->createGetAttrNode( $this->createGetAttrNode( $this->createGetAttrNode( @@ -147,15 +147,15 @@ class ParserTest extends TestCase 'baz', Node\GetAttrNode::PROPERTY_CALL), '3', Node\GetAttrNode::ARRAY_CALL), 'foo.bar().foo().baz[3]', - array('foo'), - ), + ['foo'], + ], - array( + [ new Node\NameNode('foo'), 'bar', - array('foo' => 'bar'), - ), - ); + ['foo' => 'bar'], + ], + ]; } private function createGetAttrNode($node, $item, $type) @@ -167,33 +167,33 @@ class ParserTest extends TestCase * @dataProvider getInvalidPostfixData * @expectedException \Symfony\Component\ExpressionLanguage\SyntaxError */ - public function testParseWithInvalidPostfixData($expr, $names = array()) + public function testParseWithInvalidPostfixData($expr, $names = []) { $lexer = new Lexer(); - $parser = new Parser(array()); + $parser = new Parser([]); $parser->parse($lexer->tokenize($expr), $names); } public function getInvalidPostfixData() { - return array( - array( + return [ + [ 'foo."#"', - array('foo'), - ), - array( + ['foo'], + ], + [ 'foo."bar"', - array('foo'), - ), - array( + ['foo'], + ], + [ 'foo.**', - array('foo'), - ), - array( + ['foo'], + ], + [ 'foo.123', - array('foo'), - ), - ); + ['foo'], + ], + ]; } /** @@ -203,8 +203,8 @@ class ParserTest extends TestCase public function testNameProposal() { $lexer = new Lexer(); - $parser = new Parser(array()); + $parser = new Parser([]); - $parser->parse($lexer->tokenize('foo > bar'), array('foo', 'baz')); + $parser->parse($lexer->tokenize('foo > bar'), ['foo', 'baz']); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Exception/IOExceptionInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Exception/IOExceptionInterface.php index c11965a4..f9d4644a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Exception/IOExceptionInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Exception/IOExceptionInterface.php @@ -21,7 +21,7 @@ interface IOExceptionInterface extends ExceptionInterface /** * Returns the associated path for the exception. * - * @return string The path + * @return string|null The path */ public function getPath(); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php index 08151cbf..3c61fc15 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php @@ -58,7 +58,7 @@ class Filesystem } // Stream context created to allow files overwrite when using FTP stream wrapper - disabled by default - if (false === $target = @fopen($targetFile, 'w', null, stream_context_create(array('ftp' => array('overwrite' => true))))) { + if (false === $target = @fopen($targetFile, 'w', null, stream_context_create(['ftp' => ['overwrite' => true]]))) { throw new IOException(sprintf('Failed to copy "%s" to "%s" because target file could not be opened for writing.', $originFile, $targetFile), 0, null, $originFile); } @@ -137,8 +137,8 @@ class Filesystem * Sets access and modification time of file. * * @param string|iterable $files A filename, an array of files, or a \Traversable instance to create - * @param int $time The touch time as a Unix timestamp - * @param int $atime The access time as a Unix timestamp + * @param int|null $time The touch time as a Unix timestamp, if not supplied the current system time is used + * @param int|null $atime The access time as a Unix timestamp, if not supplied the current system time is used * * @throws IOException When touch fails */ @@ -164,7 +164,7 @@ class Filesystem if ($files instanceof \Traversable) { $files = iterator_to_array($files, false); } elseif (!\is_array($files)) { - $files = array($files); + $files = [$files]; } $files = array_reverse($files); foreach ($files as $file) { @@ -193,7 +193,7 @@ class Filesystem * @param int $umask The mode mask (octal) * @param bool $recursive Whether change the mod recursively or not * - * @throws IOException When the change fail + * @throws IOException When the change fails */ public function chmod($files, $mode, $umask = 0000, $recursive = false) { @@ -214,7 +214,7 @@ class Filesystem * @param string $user The new owner user name * @param bool $recursive Whether change the owner recursively or not * - * @throws IOException When the change fail + * @throws IOException When the change fails */ public function chown($files, $user, $recursive = false) { @@ -241,7 +241,7 @@ class Filesystem * @param string $group The group name * @param bool $recursive Whether change the group recursively or not * - * @throws IOException When the change fail + * @throws IOException When the change fails */ public function chgrp($files, $group, $recursive = false) { @@ -281,7 +281,7 @@ class Filesystem if (true !== @rename($origin, $target)) { if (is_dir($origin)) { // See https://bugs.php.net/bug.php?id=54097 & http://php.net/manual/en/function.rename.php#113943 - $this->mirror($origin, $target, null, array('override' => $overwrite, 'delete' => $overwrite)); + $this->mirror($origin, $target, null, ['override' => $overwrite, 'delete' => $overwrite]); $this->remove($origin); return; @@ -471,7 +471,7 @@ class Filesystem $endPathArr = explode('/', trim($endPath, '/')); $normalizePathArray = function ($pathSegments, $absolute) { - $result = array(); + $result = []; foreach ($pathSegments as $segment) { if ('..' === $segment && ($absolute || \count($result))) { @@ -519,18 +519,18 @@ class Filesystem * - existing files in the target directory will be overwritten, except if they are newer (see the `override` option) * - files in the target directory that do not exist in the source directory will not be deleted (see the `delete` option) * - * @param string $originDir The origin directory - * @param string $targetDir The target directory - * @param \Traversable $iterator Iterator that filters which files and directories to copy - * @param array $options An array of boolean options - * Valid options are: - * - $options['override'] If true, target files newer than origin files are overwritten (see copy(), defaults to false) - * - $options['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink(), defaults to false) - * - $options['delete'] Whether to delete files that are not in the source directory (defaults to false) + * @param string $originDir The origin directory + * @param string $targetDir The target directory + * @param \Traversable|null $iterator Iterator that filters which files and directories to copy, if null a recursive iterator is created + * @param array $options An array of boolean options + * Valid options are: + * - $options['override'] If true, target files newer than origin files are overwritten (see copy(), defaults to false) + * - $options['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink(), defaults to false) + * - $options['delete'] Whether to delete files that are not in the source directory (defaults to false) * * @throws IOException When file type is unknown */ - public function mirror($originDir, $targetDir, \Traversable $iterator = null, $options = array()) + public function mirror($originDir, $targetDir, \Traversable $iterator = null, $options = []) { $targetDir = rtrim($targetDir, '/\\'); $originDir = rtrim($originDir, '/\\'); @@ -726,11 +726,11 @@ class Filesystem */ private function toIterable($files) { - return \is_array($files) || $files instanceof \Traversable ? $files : array($files); + return \is_array($files) || $files instanceof \Traversable ? $files : [$files]; } /** - * Gets a 2-tuple of scheme (may be null) and hierarchical part of a filename (e.g. file:///tmp -> array(file, tmp)). + * Gets a 2-tuple of scheme (may be null) and hierarchical part of a filename (e.g. file:///tmp -> [file, tmp]). * * @param string $filename The filename to be parsed * @@ -740,7 +740,7 @@ class Filesystem { $components = explode('://', $filename, 2); - return 2 === \count($components) ? array($components[0], $components[1]) : array(null, $components[0]); + return 2 === \count($components) ? [$components[0], $components[1]] : [null, $components[0]]; } private static function box($func) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php index df8b8124..8f2bde2e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php @@ -197,9 +197,9 @@ class FilesystemTest extends FilesystemTestCase public function testMkdirCreatesDirectoriesFromArray() { $basePath = $this->workspace.\DIRECTORY_SEPARATOR; - $directories = array( + $directories = [ $basePath.'1', $basePath.'2', $basePath.'3', - ); + ]; $this->filesystem->mkdir($directories); @@ -211,9 +211,9 @@ class FilesystemTest extends FilesystemTestCase public function testMkdirCreatesDirectoriesFromTraversableObject() { $basePath = $this->workspace.\DIRECTORY_SEPARATOR; - $directories = new \ArrayObject(array( + $directories = new \ArrayObject([ $basePath.'1', $basePath.'2', $basePath.'3', - )); + ]); $this->filesystem->mkdir($directories); @@ -257,9 +257,9 @@ class FilesystemTest extends FilesystemTestCase public function testTouchCreatesEmptyFilesFromArray() { $basePath = $this->workspace.\DIRECTORY_SEPARATOR; - $files = array( + $files = [ $basePath.'1', $basePath.'2', $basePath.'3', - ); + ]; $this->filesystem->touch($files); @@ -271,9 +271,9 @@ class FilesystemTest extends FilesystemTestCase public function testTouchCreatesEmptyFilesFromTraversableObject() { $basePath = $this->workspace.\DIRECTORY_SEPARATOR; - $files = new \ArrayObject(array( + $files = new \ArrayObject([ $basePath.'1', $basePath.'2', $basePath.'3', - )); + ]); $this->filesystem->touch($files); @@ -302,9 +302,9 @@ class FilesystemTest extends FilesystemTestCase mkdir($basePath.'dir'); touch($basePath.'file'); - $files = array( + $files = [ $basePath.'dir', $basePath.'file', - ); + ]; $this->filesystem->remove($files); @@ -319,9 +319,9 @@ class FilesystemTest extends FilesystemTestCase mkdir($basePath.'dir'); touch($basePath.'file'); - $files = new \ArrayObject(array( + $files = new \ArrayObject([ $basePath.'dir', $basePath.'file', - )); + ]); $this->filesystem->remove($files); @@ -335,9 +335,9 @@ class FilesystemTest extends FilesystemTestCase mkdir($basePath.'dir'); - $files = array( + $files = [ $basePath.'dir', $basePath.'file', - ); + ]; $this->filesystem->remove($files); @@ -409,9 +409,9 @@ class FilesystemTest extends FilesystemTestCase mkdir($basePath.'dir'); touch($basePath.'file'); - $files = new \ArrayObject(array( + $files = new \ArrayObject([ $basePath.'dir', $basePath.'file', - )); + ]); $this->assertTrue($this->filesystem->exists($files)); } @@ -424,9 +424,9 @@ class FilesystemTest extends FilesystemTestCase touch($basePath.'file'); touch($basePath.'file2'); - $files = new \ArrayObject(array( + $files = new \ArrayObject([ $basePath.'dir', $basePath.'file', $basePath.'file2', - )); + ]); unlink($basePath.'file'); @@ -507,7 +507,7 @@ class FilesystemTest extends FilesystemTestCase $directory = $this->workspace.\DIRECTORY_SEPARATOR.'directory'; $file = $this->workspace.\DIRECTORY_SEPARATOR.'file'; - $files = array($directory, $file); + $files = [$directory, $file]; mkdir($directory); touch($file); @@ -524,7 +524,7 @@ class FilesystemTest extends FilesystemTestCase $directory = $this->workspace.\DIRECTORY_SEPARATOR.'directory'; $file = $this->workspace.\DIRECTORY_SEPARATOR.'file'; - $files = new \ArrayObject(array($directory, $file)); + $files = new \ArrayObject([$directory, $file]); mkdir($directory); touch($file); @@ -979,7 +979,7 @@ class FilesystemTest extends FilesystemTestCase touch($file); - $this->filesystem->hardlink($file, array($link1, $link2)); + $this->filesystem->hardlink($file, [$link1, $link2]); $this->assertTrue(is_file($link1)); $this->assertEquals(fileinode($file), fileinode($link1)); @@ -997,7 +997,7 @@ class FilesystemTest extends FilesystemTestCase touch($file); // practically same as testLinkIsNotOverwrittenIfAlreadyCreated - $this->filesystem->hardlink($file, array($link, $link)); + $this->filesystem->hardlink($file, [$link, $link]); $this->assertTrue(is_file($link)); $this->assertEquals(fileinode($file), fileinode($link)); @@ -1106,47 +1106,47 @@ class FilesystemTest extends FilesystemTestCase public function providePathsForMakePathRelative() { - $paths = array( - array('/var/lib/symfony/src/Symfony/', '/var/lib/symfony/src/Symfony/Component', '../'), - array('/var/lib/symfony/src/Symfony/', '/var/lib/symfony/src/Symfony/Component/', '../'), - array('/var/lib/symfony/src/Symfony', '/var/lib/symfony/src/Symfony/Component', '../'), - array('/var/lib/symfony/src/Symfony', '/var/lib/symfony/src/Symfony/Component/', '../'), - array('/usr/lib/symfony/', '/var/lib/symfony/src/Symfony/Component', '../../../../../../usr/lib/symfony/'), - array('/var/lib/symfony/src/Symfony/', '/var/lib/symfony/', 'src/Symfony/'), - array('/aa/bb', '/aa/bb', './'), - array('/aa/bb', '/aa/bb/', './'), - array('/aa/bb/', '/aa/bb', './'), - array('/aa/bb/', '/aa/bb/', './'), - array('/aa/bb/cc', '/aa/bb/cc/dd', '../'), - array('/aa/bb/cc', '/aa/bb/cc/dd/', '../'), - array('/aa/bb/cc/', '/aa/bb/cc/dd', '../'), - array('/aa/bb/cc/', '/aa/bb/cc/dd/', '../'), - array('/aa/bb/cc', '/aa', 'bb/cc/'), - array('/aa/bb/cc', '/aa/', 'bb/cc/'), - array('/aa/bb/cc/', '/aa', 'bb/cc/'), - array('/aa/bb/cc/', '/aa/', 'bb/cc/'), - array('/a/aab/bb', '/a/aa', '../aab/bb/'), - array('/a/aab/bb', '/a/aa/', '../aab/bb/'), - array('/a/aab/bb/', '/a/aa', '../aab/bb/'), - array('/a/aab/bb/', '/a/aa/', '../aab/bb/'), - array('/a/aab/bb/', '/', 'a/aab/bb/'), - array('/a/aab/bb/', '/b/aab', '../../a/aab/bb/'), - array('/aab/bb', '/aa', '../aab/bb/'), - array('/aab', '/aa', '../aab/'), - array('/aa/bb/cc', '/aa/dd/..', 'bb/cc/'), - array('/aa/../bb/cc', '/aa/dd/..', '../bb/cc/'), - array('/aa/bb/../../cc', '/aa/../dd/..', 'cc/'), - array('/../aa/bb/cc', '/aa/dd/..', 'bb/cc/'), - array('/../../aa/../bb/cc', '/aa/dd/..', '../bb/cc/'), - array('C:/aa/bb/cc', 'C:/aa/dd/..', 'bb/cc/'), - array('c:/aa/../bb/cc', 'c:/aa/dd/..', '../bb/cc/'), - array('C:/aa/bb/../../cc', 'C:/aa/../dd/..', 'cc/'), - array('C:/../aa/bb/cc', 'C:/aa/dd/..', 'bb/cc/'), - array('C:/../../aa/../bb/cc', 'C:/aa/dd/..', '../bb/cc/'), - ); + $paths = [ + ['/var/lib/symfony/src/Symfony/', '/var/lib/symfony/src/Symfony/Component', '../'], + ['/var/lib/symfony/src/Symfony/', '/var/lib/symfony/src/Symfony/Component/', '../'], + ['/var/lib/symfony/src/Symfony', '/var/lib/symfony/src/Symfony/Component', '../'], + ['/var/lib/symfony/src/Symfony', '/var/lib/symfony/src/Symfony/Component/', '../'], + ['/usr/lib/symfony/', '/var/lib/symfony/src/Symfony/Component', '../../../../../../usr/lib/symfony/'], + ['/var/lib/symfony/src/Symfony/', '/var/lib/symfony/', 'src/Symfony/'], + ['/aa/bb', '/aa/bb', './'], + ['/aa/bb', '/aa/bb/', './'], + ['/aa/bb/', '/aa/bb', './'], + ['/aa/bb/', '/aa/bb/', './'], + ['/aa/bb/cc', '/aa/bb/cc/dd', '../'], + ['/aa/bb/cc', '/aa/bb/cc/dd/', '../'], + ['/aa/bb/cc/', '/aa/bb/cc/dd', '../'], + ['/aa/bb/cc/', '/aa/bb/cc/dd/', '../'], + ['/aa/bb/cc', '/aa', 'bb/cc/'], + ['/aa/bb/cc', '/aa/', 'bb/cc/'], + ['/aa/bb/cc/', '/aa', 'bb/cc/'], + ['/aa/bb/cc/', '/aa/', 'bb/cc/'], + ['/a/aab/bb', '/a/aa', '../aab/bb/'], + ['/a/aab/bb', '/a/aa/', '../aab/bb/'], + ['/a/aab/bb/', '/a/aa', '../aab/bb/'], + ['/a/aab/bb/', '/a/aa/', '../aab/bb/'], + ['/a/aab/bb/', '/', 'a/aab/bb/'], + ['/a/aab/bb/', '/b/aab', '../../a/aab/bb/'], + ['/aab/bb', '/aa', '../aab/bb/'], + ['/aab', '/aa', '../aab/'], + ['/aa/bb/cc', '/aa/dd/..', 'bb/cc/'], + ['/aa/../bb/cc', '/aa/dd/..', '../bb/cc/'], + ['/aa/bb/../../cc', '/aa/../dd/..', 'cc/'], + ['/../aa/bb/cc', '/aa/dd/..', 'bb/cc/'], + ['/../../aa/../bb/cc', '/aa/dd/..', '../bb/cc/'], + ['C:/aa/bb/cc', 'C:/aa/dd/..', 'bb/cc/'], + ['c:/aa/../bb/cc', 'c:/aa/dd/..', '../bb/cc/'], + ['C:/aa/bb/../../cc', 'C:/aa/../dd/..', 'cc/'], + ['C:/../aa/bb/cc', 'C:/aa/dd/..', 'bb/cc/'], + ['C:/../../aa/../bb/cc', 'C:/aa/dd/..', '../bb/cc/'], + ]; if ('\\' === \DIRECTORY_SEPARATOR) { - $paths[] = array('c:\var\lib/symfony/src/Symfony/', 'c:/var/lib/symfony/', 'src/Symfony/'); + $paths[] = ['c:\var\lib/symfony/src/Symfony/', 'c:/var/lib/symfony/', 'src/Symfony/']; } return $paths; @@ -1166,20 +1166,20 @@ class FilesystemTest extends FilesystemTestCase public function provideLegacyPathsForMakePathRelativeWithRelativePaths() { - return array( - array('usr/lib/symfony/', 'var/lib/symfony/src/Symfony/Component', '../../../../../../usr/lib/symfony/'), - array('aa/bb', 'aa/cc', '../bb/'), - array('aa/cc', 'bb/cc', '../../aa/cc/'), - array('aa/bb', 'aa/./cc', '../bb/'), - array('aa/./bb', 'aa/cc', '../bb/'), - array('aa/./bb', 'aa/./cc', '../bb/'), - array('../../', '../../', './'), - array('../aa/bb/', 'aa/bb/', '../../../aa/bb/'), - array('../../../', '../../', '../'), - array('', '', './'), - array('', 'aa/', '../'), - array('aa/', '', 'aa/'), - ); + return [ + ['usr/lib/symfony/', 'var/lib/symfony/src/Symfony/Component', '../../../../../../usr/lib/symfony/'], + ['aa/bb', 'aa/cc', '../bb/'], + ['aa/cc', 'bb/cc', '../../aa/cc/'], + ['aa/bb', 'aa/./cc', '../bb/'], + ['aa/./bb', 'aa/cc', '../bb/'], + ['aa/./bb', 'aa/./cc', '../bb/'], + ['../../', '../../', './'], + ['../aa/bb/', 'aa/bb/', '../../../aa/bb/'], + ['../../../', '../../', '../'], + ['', '', './'], + ['', 'aa/', '../'], + ['aa/', '', 'aa/'], + ]; } public function testMirrorCopiesFilesAndDirectoriesRecursively() @@ -1205,19 +1205,19 @@ class FilesystemTest extends FilesystemTestCase $this->filesystem->remove($file1); - $this->filesystem->mirror($sourcePath, $targetPath, null, array('delete' => false)); + $this->filesystem->mirror($sourcePath, $targetPath, null, ['delete' => false]); $this->assertTrue($this->filesystem->exists($targetPath.'directory'.\DIRECTORY_SEPARATOR.'file1')); - $this->filesystem->mirror($sourcePath, $targetPath, null, array('delete' => true)); + $this->filesystem->mirror($sourcePath, $targetPath, null, ['delete' => true]); $this->assertFalse($this->filesystem->exists($targetPath.'directory'.\DIRECTORY_SEPARATOR.'file1')); file_put_contents($file1, 'FILE1'); - $this->filesystem->mirror($sourcePath, $targetPath, null, array('delete' => true)); + $this->filesystem->mirror($sourcePath, $targetPath, null, ['delete' => true]); $this->assertTrue($this->filesystem->exists($targetPath.'directory'.\DIRECTORY_SEPARATOR.'file1')); $this->filesystem->remove($directory); - $this->filesystem->mirror($sourcePath, $targetPath, null, array('delete' => true)); + $this->filesystem->mirror($sourcePath, $targetPath, null, ['delete' => true]); $this->assertFalse($this->filesystem->exists($targetPath.'directory')); $this->assertFalse($this->filesystem->exists($targetPath.'directory'.\DIRECTORY_SEPARATOR.'file1')); } @@ -1339,7 +1339,7 @@ class FilesystemTest extends FilesystemTestCase $oldPath = getcwd(); chdir($this->workspace); - $this->filesystem->mirror('source', 'target', null, array('delete' => true)); + $this->filesystem->mirror('source', 'target', null, ['delete' => true]); chdir($oldPath); @@ -1360,15 +1360,15 @@ class FilesystemTest extends FilesystemTestCase public function providePathsForIsAbsolutePath() { - return array( - array('/var/lib', true), - array('c:\\\\var\\lib', true), - array('\\var\\lib', true), - array('var/lib', false), - array('../var/lib', false), - array('', false), - array(null, false), - ); + return [ + ['/var/lib', true], + ['c:\\\\var\\lib', true], + ['\\var\\lib', true], + ['var/lib', false], + ['../var/lib', false], + ['', false], + [null, false], + ]; } public function testTempnam() @@ -1498,7 +1498,7 @@ class FilesystemTest extends FilesystemTestCase { $filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'baz.txt'; - $this->filesystem->dumpFile($filename, array('bar')); + $this->filesystem->dumpFile($filename, ['bar']); $this->assertFileExists($filename); $this->assertStringEqualsFile($filename, 'bar'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php index 642925dd..eb6b35dd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php @@ -18,7 +18,7 @@ class FilesystemTestCase extends TestCase { private $umask; - protected $longPathNamesWindows = array(); + protected $longPathNamesWindows = []; /** * @var \Symfony\Component\Filesystem\Filesystem @@ -84,7 +84,7 @@ class FilesystemTestCase extends TestCase foreach ($this->longPathNamesWindows as $path) { exec('DEL '.$path); } - $this->longPathNamesWindows = array(); + $this->longPathNamesWindows = []; } $this->filesystem->remove($this->workspace); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Tests/Fixtures/MockStream/MockStream.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Tests/Fixtures/MockStream/MockStream.php index f14420fb..3d80a905 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Tests/Fixtures/MockStream/MockStream.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Tests/Fixtures/MockStream/MockStream.php @@ -41,6 +41,6 @@ class MockStream */ public function url_stat($path, $flags) { - return array(); + return []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Comparator/Comparator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Comparator/Comparator.php index ea37566d..6aee21cf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Comparator/Comparator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Comparator/Comparator.php @@ -64,7 +64,7 @@ class Comparator $operator = '=='; } - if (!\in_array($operator, array('>', '<', '>=', '<=', '==', '!='))) { + if (!\in_array($operator, ['>', '<', '>=', '<=', '==', '!='])) { throw new \InvalidArgumentException(sprintf('Invalid operator "%s".', $operator)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Finder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Finder.php index 05016297..133c4b8c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Finder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Finder.php @@ -29,7 +29,7 @@ use Symfony\Component\Finder\Iterator\SortableIterator; * * All rules may be invoked several times. * - * All methods return the current Finder object to allow easy chaining: + * All methods return the current Finder object to allow chaining: * * $finder = Finder::create()->files()->name('*.php')->in(__DIR__); * @@ -41,25 +41,25 @@ class Finder implements \IteratorAggregate, \Countable const IGNORE_DOT_FILES = 2; private $mode = 0; - private $names = array(); - private $notNames = array(); - private $exclude = array(); - private $filters = array(); - private $depths = array(); - private $sizes = array(); + private $names = []; + private $notNames = []; + private $exclude = []; + private $filters = []; + private $depths = []; + private $sizes = []; private $followLinks = false; private $sort = false; private $ignore = 0; - private $dirs = array(); - private $dates = array(); - private $iterators = array(); - private $contains = array(); - private $notContains = array(); - private $paths = array(); - private $notPaths = array(); + private $dirs = []; + private $dates = []; + private $iterators = []; + private $contains = []; + private $notContains = []; + private $paths = []; + private $notPaths = []; private $ignoreUnreadableDirs = false; - private static $vcsPatterns = array('.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg'); + private static $vcsPatterns = ['.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg']; public function __construct() { @@ -536,13 +536,13 @@ class Finder implements \IteratorAggregate, \Countable */ public function in($dirs) { - $resolvedDirs = array(); + $resolvedDirs = []; foreach ((array) $dirs as $dir) { if (is_dir($dir)) { $resolvedDirs[] = $this->normalizeDir($dir); } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? GLOB_BRACE : 0) | GLOB_ONLYDIR)) { - $resolvedDirs = array_merge($resolvedDirs, array_map(array($this, 'normalizeDir'), $glob)); + $resolvedDirs = array_merge($resolvedDirs, array_map([$this, 'normalizeDir'], $glob)); } else { throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir)); } @@ -645,12 +645,15 @@ class Finder implements \IteratorAggregate, \Countable */ private function searchInDirectory($dir) { + $exclude = $this->exclude; + $notPaths = $this->notPaths; + if (static::IGNORE_VCS_FILES === (static::IGNORE_VCS_FILES & $this->ignore)) { - $this->exclude = array_merge($this->exclude, self::$vcsPatterns); + $exclude = array_merge($exclude, self::$vcsPatterns); } if (static::IGNORE_DOT_FILES === (static::IGNORE_DOT_FILES & $this->ignore)) { - $this->notPaths[] = '#(^|/)\..+(/|$)#'; + $notPaths[] = '#(^|/)\..+(/|$)#'; } $minDepth = 0; @@ -683,8 +686,8 @@ class Finder implements \IteratorAggregate, \Countable $iterator = new Iterator\RecursiveDirectoryIterator($dir, $flags, $this->ignoreUnreadableDirs); - if ($this->exclude) { - $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $this->exclude); + if ($exclude) { + $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $exclude); } $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST); @@ -717,8 +720,8 @@ class Finder implements \IteratorAggregate, \Countable $iterator = new Iterator\CustomFilterIterator($iterator, $this->filters); } - if ($this->paths || $this->notPaths) { - $iterator = new Iterator\PathFilterIterator($iterator, $this->paths, $this->notPaths); + if ($this->paths || $notPaths) { + $iterator = new Iterator\PathFilterIterator($iterator, $this->paths, $notPaths); } if ($this->sort) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Glob.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Glob.php index 27d9ce3d..ea76d51a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Glob.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Glob.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Finder; * * // prints foo.bar and foo.baz * $regex = glob_to_regex("foo.*"); - * for (array('foo.bar', 'foo.baz', 'foo', 'bar') as $t) + * for (['foo.bar', 'foo.baz', 'foo', 'bar'] as $t) * { * if (/$regex/) echo "matched: $car\n"; * } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/CustomFilterIterator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/CustomFilterIterator.php index 6666e07e..896f7e91 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/CustomFilterIterator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/CustomFilterIterator.php @@ -21,7 +21,7 @@ namespace Symfony\Component\Finder\Iterator; */ class CustomFilterIterator extends FilterIterator { - private $filters = array(); + private $filters = []; /** * @param \Iterator $iterator The Iterator to filter diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php index b01e5e3f..8a47321a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php @@ -20,7 +20,7 @@ use Symfony\Component\Finder\Comparator\DateComparator; */ class DateRangeFilterIterator extends FilterIterator { - private $comparators = array(); + private $comparators = []; /** * @param \Iterator $iterator The Iterator to filter diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php index c57128c2..bc0e6fc1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php @@ -20,7 +20,7 @@ class ExcludeDirectoryFilterIterator extends FilterIterator implements \Recursiv { private $iterator; private $isRecursive; - private $excludedDirs = array(); + private $excludedDirs = []; private $excludedPattern; /** @@ -31,7 +31,7 @@ class ExcludeDirectoryFilterIterator extends FilterIterator implements \Recursiv { $this->iterator = $iterator; $this->isRecursive = $iterator instanceof \RecursiveIterator; - $patterns = array(); + $patterns = []; foreach ($directories as $directory) { $directory = rtrim($directory, '/'); if (!$this->isRecursive || false !== strpos($directory, '/')) { @@ -75,7 +75,7 @@ class ExcludeDirectoryFilterIterator extends FilterIterator implements \Recursiv public function getChildren() { - $children = new self($this->iterator->getChildren(), array()); + $children = new self($this->iterator->getChildren(), []); $children->excludedDirs = $this->excludedDirs; $children->excludedPattern = $this->excludedPattern; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php index fc885404..ee365a58 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php @@ -18,8 +18,8 @@ namespace Symfony\Component\Finder\Iterator; */ abstract class MultiplePcreFilterIterator extends FilterIterator { - protected $matchRegexps = array(); - protected $noMatchRegexps = array(); + protected $matchRegexps = []; + protected $noMatchRegexps = []; /** * @param \Iterator $iterator The Iterator to filter @@ -91,7 +91,7 @@ abstract class MultiplePcreFilterIterator extends FilterIterator return !preg_match('/[*?[:alnum:] \\\\]/', $start); } - foreach (array(array('{', '}'), array('(', ')'), array('[', ']'), array('<', '>')) as $delimiters) { + foreach ([['{', '}'], ['(', ')'], ['[', ']'], ['<', '>']] as $delimiters) { if ($start === $delimiters[0] && $end === $delimiters[1]) { return true; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php index 3e6ef86a..ab48a2b8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php @@ -100,7 +100,7 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator } catch (\UnexpectedValueException $e) { if ($this->ignoreUnreadableDirs) { // If directory is unreadable and finder is set to ignore it, a fake empty content is returned. - return new \RecursiveArrayIterator(array()); + return new \RecursiveArrayIterator([]); } else { throw new AccessDeniedException($e->getMessage(), $e->getCode(), $e); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/SizeRangeFilterIterator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/SizeRangeFilterIterator.php index bd1a7fb7..4e521c8c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/SizeRangeFilterIterator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Iterator/SizeRangeFilterIterator.php @@ -20,7 +20,7 @@ use Symfony\Component\Finder\Comparator\NumberComparator; */ class SizeRangeFilterIterator extends FilterIterator { - private $comparators = array(); + private $comparators = []; /** * @param \Iterator $iterator The Iterator to filter diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php index 656fc57a..2f56092e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php @@ -58,8 +58,8 @@ class ComparatorTest extends TestCase public function getTestData() { - return array( - array('<', '1000', array('500', '999'), array('1000', '1500')), - ); + return [ + ['<', '1000', ['500', '999'], ['1000', '1500']], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Comparator/DateComparatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Comparator/DateComparatorTest.php index 8a6c1ddf..3aebf524 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Comparator/DateComparatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Comparator/DateComparatorTest.php @@ -51,14 +51,14 @@ class DateComparatorTest extends TestCase public function getTestData() { - return array( - array('< 2005-10-10', array(strtotime('2005-10-09')), array(strtotime('2005-10-15'))), - array('until 2005-10-10', array(strtotime('2005-10-09')), array(strtotime('2005-10-15'))), - array('before 2005-10-10', array(strtotime('2005-10-09')), array(strtotime('2005-10-15'))), - array('> 2005-10-10', array(strtotime('2005-10-15')), array(strtotime('2005-10-09'))), - array('after 2005-10-10', array(strtotime('2005-10-15')), array(strtotime('2005-10-09'))), - array('since 2005-10-10', array(strtotime('2005-10-15')), array(strtotime('2005-10-09'))), - array('!= 2005-10-10', array(strtotime('2005-10-11')), array(strtotime('2005-10-10'))), - ); + return [ + ['< 2005-10-10', [strtotime('2005-10-09')], [strtotime('2005-10-15')]], + ['until 2005-10-10', [strtotime('2005-10-09')], [strtotime('2005-10-15')]], + ['before 2005-10-10', [strtotime('2005-10-09')], [strtotime('2005-10-15')]], + ['> 2005-10-10', [strtotime('2005-10-15')], [strtotime('2005-10-09')]], + ['after 2005-10-10', [strtotime('2005-10-15')], [strtotime('2005-10-09')]], + ['since 2005-10-10', [strtotime('2005-10-15')], [strtotime('2005-10-09')]], + ['!= 2005-10-10', [strtotime('2005-10-11')], [strtotime('2005-10-10')]], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Comparator/NumberComparatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Comparator/NumberComparatorTest.php index 30a75c73..5b49b660 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Comparator/NumberComparatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Comparator/NumberComparatorTest.php @@ -53,39 +53,39 @@ class NumberComparatorTest extends TestCase public function getTestData() { - return array( - array('< 1000', array('500', '999'), array('1000', '1500')), + return [ + ['< 1000', ['500', '999'], ['1000', '1500']], - array('< 1K', array('500', '999'), array('1000', '1500')), - array('<1k', array('500', '999'), array('1000', '1500')), - array(' < 1 K ', array('500', '999'), array('1000', '1500')), - array('<= 1K', array('1000'), array('1001')), - array('> 1K', array('1001'), array('1000')), - array('>= 1K', array('1000'), array('999')), + ['< 1K', ['500', '999'], ['1000', '1500']], + ['<1k', ['500', '999'], ['1000', '1500']], + [' < 1 K ', ['500', '999'], ['1000', '1500']], + ['<= 1K', ['1000'], ['1001']], + ['> 1K', ['1001'], ['1000']], + ['>= 1K', ['1000'], ['999']], - array('< 1KI', array('500', '1023'), array('1024', '1500')), - array('<= 1KI', array('1024'), array('1025')), - array('> 1KI', array('1025'), array('1024')), - array('>= 1KI', array('1024'), array('1023')), + ['< 1KI', ['500', '1023'], ['1024', '1500']], + ['<= 1KI', ['1024'], ['1025']], + ['> 1KI', ['1025'], ['1024']], + ['>= 1KI', ['1024'], ['1023']], - array('1KI', array('1024'), array('1023', '1025')), - array('==1KI', array('1024'), array('1023', '1025')), + ['1KI', ['1024'], ['1023', '1025']], + ['==1KI', ['1024'], ['1023', '1025']], - array('==1m', array('1000000'), array('999999', '1000001')), - array('==1mi', array(1024 * 1024), array(1024 * 1024 - 1, 1024 * 1024 + 1)), + ['==1m', ['1000000'], ['999999', '1000001']], + ['==1mi', [1024 * 1024], [1024 * 1024 - 1, 1024 * 1024 + 1]], - array('==1g', array('1000000000'), array('999999999', '1000000001')), - array('==1gi', array(1024 * 1024 * 1024), array(1024 * 1024 * 1024 - 1, 1024 * 1024 * 1024 + 1)), + ['==1g', ['1000000000'], ['999999999', '1000000001']], + ['==1gi', [1024 * 1024 * 1024], [1024 * 1024 * 1024 - 1, 1024 * 1024 * 1024 + 1]], - array('!= 1000', array('500', '999'), array('1000')), - ); + ['!= 1000', ['500', '999'], ['1000']], + ]; } public function getConstructorTestData() { - return array( - array( - array( + return [ + [ + [ '1', '0', '3.5', '33.55', '123.456', '123456.78', '.1', '.123', @@ -94,15 +94,15 @@ class NumberComparatorTest extends TestCase '==1', '!=1', '<1', '>1', '<=1', '>=1', '==1k', '==1ki', '==1m', '==1mi', '==1g', '==1gi', '1k', '1ki', '1m', '1mi', '1g', '1gi', - ), - array( + ], + [ false, null, '', ' ', 'foobar', '=1', '===1', '0 . 1', '123 .45', '234. 567', '..', '.0.', '0.1.2', - ), - ), - ); + ], + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/FinderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/FinderTest.php index fbdcc36e..aac35bc2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/FinderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/FinderTest.php @@ -24,33 +24,33 @@ class FinderTest extends Iterator\RealIteratorTestCase { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->directories()); - $this->assertIterator($this->toAbsolute(array('foo', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'toto']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->directories(); $finder->files(); $finder->directories(); - $this->assertIterator($this->toAbsolute(array('foo', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'toto']), $finder->in(self::$tmpDir)->getIterator()); } public function testFiles() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->files()); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo/bar.tmp', 'test.php', 'test.py', 'foo bar']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->files(); $finder->directories(); $finder->files(); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo/bar.tmp', 'test.php', 'test.py', 'foo bar']), $finder->in(self::$tmpDir)->getIterator()); } public function testRemoveTrailingSlash() { $finder = $this->buildFinder(); - $expected = $this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py', 'foo bar')); + $expected = $this->toAbsolute(['foo/bar.tmp', 'test.php', 'test.py', 'foo bar']); $in = self::$tmpDir.'//'; $this->assertIterator($expected, $finder->in($in)->files()->getIterator()); @@ -65,7 +65,7 @@ class FinderTest extends Iterator\RealIteratorTestCase $finder = $this->buildFinder(); symlink($this->toAbsolute('foo'), $this->toAbsolute('baz')); - $expected = $this->toAbsolute(array('baz/bar.tmp')); + $expected = $this->toAbsolute(['baz/bar.tmp']); $in = self::$tmpDir.'/baz/'; try { $this->assertIterator($expected, $finder->in($in)->files()->getIterator()); @@ -80,7 +80,7 @@ class FinderTest extends Iterator\RealIteratorTestCase { $finder = $this->buildFinder(); - $expected = $this->toAbsolute(array('foo/../foo/bar.tmp')); + $expected = $this->toAbsolute(['foo/../foo/bar.tmp']); $in = self::$tmpDir.'/foo/../foo/'; $this->assertIterator($expected, $finder->in($in)->files()->getIterator()); } @@ -89,68 +89,68 @@ class FinderTest extends Iterator\RealIteratorTestCase { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->depth('< 1')); - $this->assertIterator($this->toAbsolute(array('foo', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'test.php', 'test.py', 'toto', 'foo bar']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $this->assertSame($finder, $finder->depth('<= 0')); - $this->assertIterator($this->toAbsolute(array('foo', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'test.php', 'test.py', 'toto', 'foo bar']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $this->assertSame($finder, $finder->depth('>= 1')); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo/bar.tmp']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->depth('< 1')->depth('>= 1'); - $this->assertIterator(array(), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator([], $finder->in(self::$tmpDir)->getIterator()); } public function testName() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->name('*.php')); - $this->assertIterator($this->toAbsolute(array('test.php')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['test.php']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->name('test.ph*'); $finder->name('test.py'); - $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['test.php', 'test.py']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->name('~^test~i'); - $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['test.php', 'test.py']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->name('~\\.php$~i'); - $this->assertIterator($this->toAbsolute(array('test.php')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['test.php']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->name('test.p{hp,y}'); - $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['test.php', 'test.py']), $finder->in(self::$tmpDir)->getIterator()); } public function testNotName() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->notName('*.php')); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'foo/bar.tmp', 'test.py', 'toto', 'foo bar']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->notName('*.php'); $finder->notName('*.py'); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'foo/bar.tmp', 'toto', 'foo bar']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->name('test.ph*'); $finder->name('test.py'); $finder->notName('*.php'); $finder->notName('*.py'); - $this->assertIterator(array(), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator([], $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->name('test.ph*'); $finder->name('test.py'); $finder->notName('*.p{hp,y}'); - $this->assertIterator(array(), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator([], $finder->in(self::$tmpDir)->getIterator()); } /** @@ -160,107 +160,130 @@ class FinderTest extends Iterator\RealIteratorTestCase { $finder = $this->buildFinder(); $finder->name($regex); - $this->assertIterator($this->toAbsolute(array('test.py', 'test.php')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['test.py', 'test.php']), $finder->in(self::$tmpDir)->getIterator()); } public function testSize() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->files()->size('< 1K')->size('> 500')); - $this->assertIterator($this->toAbsolute(array('test.php')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['test.php']), $finder->in(self::$tmpDir)->getIterator()); } public function testDate() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->files()->date('until last month')); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo/bar.tmp', 'test.php']), $finder->in(self::$tmpDir)->getIterator()); } public function testExclude() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->exclude('foo')); - $this->assertIterator($this->toAbsolute(array('test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['test.php', 'test.py', 'toto', 'foo bar']), $finder->in(self::$tmpDir)->getIterator()); } public function testIgnoreVCS() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->ignoreVCS(false)->ignoreDotFiles(false)); - $this->assertIterator($this->toAbsolute(array('.git', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'toto/.git', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['.git', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'toto/.git', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo bar']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->ignoreVCS(false)->ignoreVCS(false)->ignoreDotFiles(false); - $this->assertIterator($this->toAbsolute(array('.git', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'toto/.git', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['.git', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'toto/.git', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo bar']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $this->assertSame($finder, $finder->ignoreVCS(true)->ignoreDotFiles(false)); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo bar']), $finder->in(self::$tmpDir)->getIterator()); + } + + public function testIgnoreVCSCanBeDisabledAfterFirstIteration() + { + $finder = $this->buildFinder(); + $finder->in(self::$tmpDir); + $finder->ignoreDotFiles(false); + + $this->assertIterator($this->toAbsolute(['foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo bar']), $finder->getIterator()); + + $finder->ignoreVCS(false); + $this->assertIterator($this->toAbsolute(['.git', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'toto/.git', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo bar']), $finder->getIterator()); } public function testIgnoreDotFiles() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->ignoreDotFiles(false)->ignoreVCS(false)); - $this->assertIterator($this->toAbsolute(array('.git', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'toto/.git', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['.git', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'toto/.git', 'foo bar']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->ignoreDotFiles(false)->ignoreDotFiles(false)->ignoreVCS(false); - $this->assertIterator($this->toAbsolute(array('.git', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'toto/.git', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['.git', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'toto/.git', 'foo bar']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $this->assertSame($finder, $finder->ignoreDotFiles(true)->ignoreVCS(false)); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'foo bar']), $finder->in(self::$tmpDir)->getIterator()); + } + + public function testIgnoreDotFilesCanBeDisabledAfterFirstIteration() + { + $finder = $this->buildFinder(); + $finder->in(self::$tmpDir); + + $this->assertIterator($this->toAbsolute(['foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'foo bar']), $finder->getIterator()); + + $finder->ignoreDotFiles(false); + $this->assertIterator($this->toAbsolute(['foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo bar']), $finder->getIterator()); } public function testSortByName() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sortByName()); - $this->assertIterator($this->toAbsolute(array('foo', 'foo bar', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'foo bar', 'foo/bar.tmp', 'test.php', 'test.py', 'toto']), $finder->in(self::$tmpDir)->getIterator()); } public function testSortByType() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sortByType()); - $this->assertIterator($this->toAbsolute(array('foo', 'foo bar', 'toto', 'foo/bar.tmp', 'test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'foo bar', 'toto', 'foo/bar.tmp', 'test.php', 'test.py']), $finder->in(self::$tmpDir)->getIterator()); } public function testSortByAccessedTime() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sortByAccessedTime()); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'toto', 'test.py', 'foo', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo/bar.tmp', 'test.php', 'toto', 'test.py', 'foo', 'foo bar']), $finder->in(self::$tmpDir)->getIterator()); } public function testSortByChangedTime() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sortByChangedTime()); - $this->assertIterator($this->toAbsolute(array('toto', 'test.py', 'test.php', 'foo/bar.tmp', 'foo', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['toto', 'test.py', 'test.php', 'foo/bar.tmp', 'foo', 'foo bar']), $finder->in(self::$tmpDir)->getIterator()); } public function testSortByModifiedTime() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sortByModifiedTime()); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'toto', 'test.py', 'foo', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo/bar.tmp', 'test.php', 'toto', 'test.py', 'foo', 'foo bar']), $finder->in(self::$tmpDir)->getIterator()); } public function testSort() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sort(function (\SplFileInfo $a, \SplFileInfo $b) { return strcmp($a->getRealPath(), $b->getRealPath()); })); - $this->assertIterator($this->toAbsolute(array('foo', 'foo bar', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'foo bar', 'foo/bar.tmp', 'test.php', 'test.py', 'toto']), $finder->in(self::$tmpDir)->getIterator()); } public function testFilter() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->filter(function (\SplFileInfo $f) { return false !== strpos($f, 'test'); })); - $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['test.php', 'test.py']), $finder->in(self::$tmpDir)->getIterator()); } public function testFollowLinks() @@ -271,19 +294,19 @@ class FinderTest extends Iterator\RealIteratorTestCase $finder = $this->buildFinder(); $this->assertSame($finder, $finder->followLinks()); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'foo bar']), $finder->in(self::$tmpDir)->getIterator()); } public function testIn() { $finder = $this->buildFinder(); - $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator(); + $iterator = $finder->files()->name('*.php')->depth('< 1')->in([self::$tmpDir, __DIR__])->getIterator(); - $expected = array( + $expected = [ self::$tmpDir.\DIRECTORY_SEPARATOR.'test.php', __DIR__.\DIRECTORY_SEPARATOR.'FinderTest.php', __DIR__.\DIRECTORY_SEPARATOR.'GlobTest.php', - ); + ]; $this->assertIterator($expected, $iterator); } @@ -300,9 +323,9 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testInWithGlob() { $finder = $this->buildFinder(); - $finder->in(array(__DIR__.'/Fixtures/*/B/C/', __DIR__.'/Fixtures/*/*/B/C/'))->getIterator(); + $finder->in([__DIR__.'/Fixtures/*/B/C/', __DIR__.'/Fixtures/*/*/B/C/'])->getIterator(); - $this->assertIterator($this->toAbsoluteFixtures(array('A/B/C/abc.dat', 'copy/A/B/C/abc.dat.copy')), $finder); + $this->assertIterator($this->toAbsoluteFixtures(['A/B/C/abc.dat', 'copy/A/B/C/abc.dat.copy']), $finder); } /** @@ -317,9 +340,9 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testInWithGlobBrace() { $finder = $this->buildFinder(); - $finder->in(array(__DIR__.'/Fixtures/{A,copy/A}/B/C'))->getIterator(); + $finder->in([__DIR__.'/Fixtures/{A,copy/A}/B/C'])->getIterator(); - $this->assertIterator($this->toAbsoluteFixtures(array('A/B/C/abc.dat', 'copy/A/B/C/abc.dat.copy')), $finder); + $this->assertIterator($this->toAbsoluteFixtures(['A/B/C/abc.dat', 'copy/A/B/C/abc.dat.copy']), $finder); } /** @@ -334,12 +357,12 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testGetIterator() { $finder = $this->buildFinder(); - $dirs = array(); + $dirs = []; foreach ($finder->directories()->in(self::$tmpDir) as $dir) { $dirs[] = (string) $dir; } - $expected = $this->toAbsolute(array('foo', 'toto')); + $expected = $this->toAbsolute(['foo', 'toto']); sort($dirs); sort($expected); @@ -360,13 +383,13 @@ class FinderTest extends Iterator\RealIteratorTestCase { $finder = $this->buildFinder()->in(self::$tmpDir); - $paths = array(); + $paths = []; foreach ($finder as $file) { $paths[] = $file->getRelativePath(); } - $ref = array('', '', '', '', 'foo', ''); + $ref = ['', '', '', '', 'foo', '']; sort($ref); sort($paths); @@ -378,13 +401,13 @@ class FinderTest extends Iterator\RealIteratorTestCase { $finder = $this->buildFinder()->in(self::$tmpDir)->sortByName(); - $paths = array(); + $paths = []; foreach ($finder as $file) { $paths[] = $file->getRelativePathname(); } - $ref = array('test.php', 'toto', 'test.py', 'foo', 'foo'.\DIRECTORY_SEPARATOR.'bar.tmp', 'foo bar'); + $ref = ['test.php', 'toto', 'test.py', 'foo', 'foo'.\DIRECTORY_SEPARATOR.'bar.tmp', 'foo bar']; sort($paths); sort($ref); @@ -402,7 +425,7 @@ class FinderTest extends Iterator\RealIteratorTestCase $finder = $finder->append($finder1); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'toto')), $finder->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'foo/bar.tmp', 'toto']), $finder->getIterator()); } public function testAppendWithAnArray() @@ -410,14 +433,14 @@ class FinderTest extends Iterator\RealIteratorTestCase $finder = $this->buildFinder(); $finder->files()->in(self::$tmpDir.\DIRECTORY_SEPARATOR.'foo'); - $finder->append($this->toAbsolute(array('foo', 'toto'))); + $finder->append($this->toAbsolute(['foo', 'toto'])); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'toto')), $finder->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'foo/bar.tmp', 'toto']), $finder->getIterator()); } public function testAppendReturnsAFinder() { - $this->assertInstanceOf('Symfony\\Component\\Finder\\Finder', Finder::create()->append(array())); + $this->assertInstanceOf('Symfony\\Component\\Finder\\Finder', Finder::create()->append([])); } public function testAppendDoesNotRequireIn() @@ -498,7 +521,7 @@ class FinderTest extends Iterator\RealIteratorTestCase ->directories() ->name('Fixtures') ->contains('abc'); - $this->assertIterator(array(), $finder); + $this->assertIterator([], $finder); } public function testNotContainsOnDirectory() @@ -508,7 +531,7 @@ class FinderTest extends Iterator\RealIteratorTestCase ->directories() ->name('Fixtures') ->notContains('abc'); - $this->assertIterator(array(), $finder); + $this->assertIterator([], $finder); } /** @@ -519,10 +542,10 @@ class FinderTest extends Iterator\RealIteratorTestCase */ public function testMultipleLocations() { - $locations = array( + $locations = [ self::$tmpDir.'/', self::$tmpDir.'/toto/', - ); + ]; // it is expected that there are test.py test.php in the tmpDir $finder = new Finder(); @@ -544,18 +567,18 @@ class FinderTest extends Iterator\RealIteratorTestCase */ public function testMultipleLocationsWithSubDirectories() { - $locations = array( + $locations = [ __DIR__.'/Fixtures/one', self::$tmpDir.\DIRECTORY_SEPARATOR.'toto', - ); + ]; $finder = $this->buildFinder(); $finder->in($locations)->depth('< 10')->name('*.neon'); - $expected = array( + $expected = [ __DIR__.'/Fixtures/one'.\DIRECTORY_SEPARATOR.'b'.\DIRECTORY_SEPARATOR.'c.neon', __DIR__.'/Fixtures/one'.\DIRECTORY_SEPARATOR.'b'.\DIRECTORY_SEPARATOR.'d.neon', - ); + ]; $this->assertIterator($expected, $finder); $this->assertIteratorInForeach($expected, $finder); @@ -578,32 +601,32 @@ class FinderTest extends Iterator\RealIteratorTestCase $finder->in(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.'r+e.gex[c]a(r)s') ->path('/^dir/'); - $expected = array('r+e.gex[c]a(r)s'.\DIRECTORY_SEPARATOR.'dir', 'r+e.gex[c]a(r)s'.\DIRECTORY_SEPARATOR.'dir'.\DIRECTORY_SEPARATOR.'bar.dat'); + $expected = ['r+e.gex[c]a(r)s'.\DIRECTORY_SEPARATOR.'dir', 'r+e.gex[c]a(r)s'.\DIRECTORY_SEPARATOR.'dir'.\DIRECTORY_SEPARATOR.'bar.dat']; $this->assertIterator($this->toAbsoluteFixtures($expected), $finder); } public function getContainsTestData() { - return array( - array('', '', array()), - array('foo', 'bar', array()), - array('', 'foobar', array('dolor.txt', 'ipsum.txt', 'lorem.txt')), - array('lorem ipsum dolor sit amet', 'foobar', array('lorem.txt')), - array('sit', 'bar', array('dolor.txt', 'ipsum.txt', 'lorem.txt')), - array('dolor sit amet', '@^L@m', array('dolor.txt', 'ipsum.txt')), - array('/^lorem ipsum dolor sit amet$/m', 'foobar', array('lorem.txt')), - array('lorem', 'foobar', array('lorem.txt')), - array('', 'lorem', array('dolor.txt', 'ipsum.txt')), - array('ipsum dolor sit amet', '/^IPSUM/m', array('lorem.txt')), - ); + return [ + ['', '', []], + ['foo', 'bar', []], + ['', 'foobar', ['dolor.txt', 'ipsum.txt', 'lorem.txt']], + ['lorem ipsum dolor sit amet', 'foobar', ['lorem.txt']], + ['sit', 'bar', ['dolor.txt', 'ipsum.txt', 'lorem.txt']], + ['dolor sit amet', '@^L@m', ['dolor.txt', 'ipsum.txt']], + ['/^lorem ipsum dolor sit amet$/m', 'foobar', ['lorem.txt']], + ['lorem', 'foobar', ['lorem.txt']], + ['', 'lorem', ['dolor.txt', 'ipsum.txt']], + ['ipsum dolor sit amet', '/^IPSUM/m', ['lorem.txt']], + ]; } public function getRegexNameTestData() { - return array( - array('~.+\\.p.+~i'), - array('~t.*s~i'), - ); + return [ + ['~.+\\.p.+~i'], + ['~t.*s~i'], + ]; } /** @@ -621,29 +644,29 @@ class FinderTest extends Iterator\RealIteratorTestCase public function getTestPathData() { - return array( - array('', '', array()), - array('/^A\/B\/C/', '/C$/', - array('A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat'), - ), - array('/^A\/B/', 'foobar', - array( + return [ + ['', '', []], + ['/^A\/B\/C/', '/C$/', + ['A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat'], + ], + ['/^A\/B/', 'foobar', + [ 'A'.\DIRECTORY_SEPARATOR.'B', 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C', 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat', 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat', - ), - ), - array('A/B/C', 'foobar', - array( + ], + ], + ['A/B/C', 'foobar', + [ 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C', 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat', 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C', 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat.copy', - ), - ), - array('A/B', 'foobar', - array( + ], + ], + ['A/B', 'foobar', + [ //dirs 'A'.\DIRECTORY_SEPARATOR.'B', 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C', @@ -654,14 +677,14 @@ class FinderTest extends Iterator\RealIteratorTestCase 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat', 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat.copy', 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat.copy', - ), - ), - array('/^with space\//', 'foobar', - array( + ], + ], + ['/^with space\//', 'foobar', + [ 'with space'.\DIRECTORY_SEPARATOR.'foo.txt', - ), - ), - ); + ], + ], + ]; } public function testAccessDeniedException() @@ -679,7 +702,7 @@ class FinderTest extends Iterator\RealIteratorTestCase if (false === $couldRead = is_readable($testDir)) { try { - $this->assertIterator($this->toAbsolute(array('foo bar', 'test.php', 'test.py')), $finder->getIterator()); + $this->assertIterator($this->toAbsolute(['foo bar', 'test.php', 'test.py']), $finder->getIterator()); $this->fail('Finder should throw an exception when opening a non-readable directory.'); } catch (\Exception $e) { $expectedExceptionClass = 'Symfony\\Component\\Finder\\Exception\\AccessDeniedException'; @@ -697,7 +720,7 @@ class FinderTest extends Iterator\RealIteratorTestCase // restore original permissions chmod($testDir, 0777); - clearstatcache($testDir); + clearstatcache(true, $testDir); if ($couldRead) { $this->markTestSkipped('could read test files while test requires unreadable'); @@ -718,12 +741,12 @@ class FinderTest extends Iterator\RealIteratorTestCase chmod($testDir, 0333); if (false === ($couldRead = is_readable($testDir))) { - $this->assertIterator($this->toAbsolute(array('foo bar', 'test.php', 'test.py')), $finder->getIterator()); + $this->assertIterator($this->toAbsolute(['foo bar', 'test.php', 'test.py']), $finder->getIterator()); } // restore original permissions chmod($testDir, 0777); - clearstatcache($testDir); + clearstatcache(true, $testDir); if ($couldRead) { $this->markTestSkipped('could read test files while test requires unreadable'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/GlobTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/GlobTest.php index 3a5aab31..2d48799c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/GlobTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/GlobTest.php @@ -39,7 +39,7 @@ class GlobTest extends TestCase } sort($match); - $this->assertSame(array('one/b/c.neon', 'one/b/d.neon'), $match); + $this->assertSame(['one/b/c.neon', 'one/b/d.neon'], $match); } public function testGlobToRegexDoubleStarNonStrictDots() @@ -56,7 +56,7 @@ class GlobTest extends TestCase } sort($match); - $this->assertSame(array('.dot/b/c.neon', '.dot/b/d.neon', 'one/b/c.neon', 'one/b/d.neon'), $match); + $this->assertSame(['.dot/b/c.neon', '.dot/b/d.neon', 'one/b/c.neon', 'one/b/d.neon'], $match); } public function testGlobToRegexDoubleStarWithoutLeadingSlash() @@ -73,7 +73,7 @@ class GlobTest extends TestCase } sort($match); - $this->assertSame(array('one/a', 'one/b', 'one/b/c.neon', 'one/b/d.neon'), $match); + $this->assertSame(['one/a', 'one/b', 'one/b/c.neon', 'one/b/d.neon'], $match); } public function testGlobToRegexDoubleStarWithoutLeadingSlashNotStrictLeadingDot() @@ -90,6 +90,6 @@ class GlobTest extends TestCase } sort($match); - $this->assertSame(array('one/.dot', 'one/a', 'one/b', 'one/b/c.neon', 'one/b/d.neon'), $match); + $this->assertSame(['one/.dot', 'one/a', 'one/b', 'one/b/c.neon', 'one/b/d.neon'], $match); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/CustomFilterIteratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/CustomFilterIteratorTest.php index b036ad13..ad0187e0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/CustomFilterIteratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/CustomFilterIteratorTest.php @@ -20,7 +20,7 @@ class CustomFilterIteratorTest extends IteratorTestCase */ public function testWithInvalidFilter() { - new CustomFilterIterator(new Iterator(), array('foo')); + new CustomFilterIterator(new Iterator(), ['foo']); } /** @@ -28,7 +28,7 @@ class CustomFilterIteratorTest extends IteratorTestCase */ public function testAccept($filters, $expected) { - $inner = new Iterator(array('test.php', 'test.py', 'foo.php')); + $inner = new Iterator(['test.php', 'test.py', 'foo.php']); $iterator = new CustomFilterIterator($inner, $filters); @@ -37,10 +37,10 @@ class CustomFilterIteratorTest extends IteratorTestCase public function getAcceptData() { - return array( - array(array(function (\SplFileInfo $fileinfo) { return false; }), array()), - array(array(function (\SplFileInfo $fileinfo) { return 0 === strpos($fileinfo, 'test'); }), array('test.php', 'test.py')), - array(array('is_dir'), array()), - ); + return [ + [[function (\SplFileInfo $fileinfo) { return false; }], []], + [[function (\SplFileInfo $fileinfo) { return 0 === strpos($fileinfo, 'test'); }], ['test.php', 'test.py']], + [['is_dir'], []], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php index 3226f706..7b1800b1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php @@ -32,7 +32,7 @@ class DateRangeFilterIteratorTest extends RealIteratorTestCase public function getAcceptData() { - $since20YearsAgo = array( + $since20YearsAgo = [ '.git', 'test.py', 'foo', @@ -45,9 +45,9 @@ class DateRangeFilterIteratorTest extends RealIteratorTestCase '.foo/.bar', 'foo bar', '.foo/bar', - ); + ]; - $since2MonthsAgo = array( + $since2MonthsAgo = [ '.git', 'test.py', 'foo', @@ -58,17 +58,17 @@ class DateRangeFilterIteratorTest extends RealIteratorTestCase '.foo/.bar', 'foo bar', '.foo/bar', - ); + ]; - $untilLastMonth = array( + $untilLastMonth = [ 'foo/bar.tmp', 'test.php', - ); + ]; - return array( - array(array(new DateComparator('since 20 years ago')), $this->toAbsolute($since20YearsAgo)), - array(array(new DateComparator('since 2 months ago')), $this->toAbsolute($since2MonthsAgo)), - array(array(new DateComparator('until last month')), $this->toAbsolute($untilLastMonth)), - ); + return [ + [[new DateComparator('since 20 years ago')], $this->toAbsolute($since20YearsAgo)], + [[new DateComparator('since 2 months ago')], $this->toAbsolute($since2MonthsAgo)], + [[new DateComparator('until last month')], $this->toAbsolute($untilLastMonth)], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php index 2e901405..dab9723d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php @@ -32,7 +32,7 @@ class DepthRangeFilterIteratorTest extends RealIteratorTestCase public function getAcceptData() { - $lessThan1 = array( + $lessThan1 = [ '.git', 'test.py', 'foo', @@ -41,9 +41,9 @@ class DepthRangeFilterIteratorTest extends RealIteratorTestCase '.foo', '.bar', 'foo bar', - ); + ]; - $lessThanOrEqualTo1 = array( + $lessThanOrEqualTo1 = [ '.git', 'test.py', 'foo', @@ -56,28 +56,28 @@ class DepthRangeFilterIteratorTest extends RealIteratorTestCase '.bar', 'foo bar', '.foo/bar', - ); + ]; - $graterThanOrEqualTo1 = array( + $graterThanOrEqualTo1 = [ 'toto/.git', 'foo/bar.tmp', '.foo/.bar', '.foo/bar', - ); + ]; - $equalTo1 = array( + $equalTo1 = [ 'toto/.git', 'foo/bar.tmp', '.foo/.bar', '.foo/bar', - ); + ]; - return array( - array(0, 0, $this->toAbsolute($lessThan1)), - array(0, 1, $this->toAbsolute($lessThanOrEqualTo1)), - array(2, PHP_INT_MAX, array()), - array(1, PHP_INT_MAX, $this->toAbsolute($graterThanOrEqualTo1)), - array(1, 1, $this->toAbsolute($equalTo1)), - ); + return [ + [0, 0, $this->toAbsolute($lessThan1)], + [0, 1, $this->toAbsolute($lessThanOrEqualTo1)], + [2, PHP_INT_MAX, []], + [1, PHP_INT_MAX, $this->toAbsolute($graterThanOrEqualTo1)], + [1, 1, $this->toAbsolute($equalTo1)], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php index fa192c31..2835ba57 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php @@ -30,7 +30,7 @@ class ExcludeDirectoryFilterIteratorTest extends RealIteratorTestCase public function getAcceptData() { - $foo = array( + $foo = [ '.bar', '.foo', '.foo/.bar', @@ -41,9 +41,9 @@ class ExcludeDirectoryFilterIteratorTest extends RealIteratorTestCase 'toto', 'toto/.git', 'foo bar', - ); + ]; - $fo = array( + $fo = [ '.bar', '.foo', '.foo/.bar', @@ -56,9 +56,9 @@ class ExcludeDirectoryFilterIteratorTest extends RealIteratorTestCase 'toto', 'toto/.git', 'foo bar', - ); + ]; - $toto = array( + $toto = [ '.bar', '.foo', '.foo/.bar', @@ -69,12 +69,12 @@ class ExcludeDirectoryFilterIteratorTest extends RealIteratorTestCase 'foo/bar.tmp', 'test.php', 'foo bar', - ); + ]; - return array( - array(array('foo'), $this->toAbsolute($foo)), - array(array('fo'), $this->toAbsolute($fo)), - array(array('toto/'), $this->toAbsolute($toto)), - ); + return [ + [['foo'], $this->toAbsolute($foo)], + [['fo'], $this->toAbsolute($fo)], + [['toto/'], $this->toAbsolute($toto)], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php index 4350b00c..fe03b434 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php @@ -29,7 +29,7 @@ class FileTypeFilterIteratorTest extends RealIteratorTestCase public function getAcceptData() { - $onlyFiles = array( + $onlyFiles = [ 'test.py', 'foo/bar.tmp', 'test.php', @@ -37,20 +37,20 @@ class FileTypeFilterIteratorTest extends RealIteratorTestCase '.foo/.bar', '.foo/bar', 'foo bar', - ); + ]; - $onlyDirectories = array( + $onlyDirectories = [ '.git', 'foo', 'toto', 'toto/.git', '.foo', - ); + ]; - return array( - array(FileTypeFilterIterator::ONLY_FILES, $this->toAbsolute($onlyFiles)), - array(FileTypeFilterIterator::ONLY_DIRECTORIES, $this->toAbsolute($onlyDirectories)), - ); + return [ + [FileTypeFilterIterator::ONLY_FILES, $this->toAbsolute($onlyFiles)], + [FileTypeFilterIterator::ONLY_DIRECTORIES, $this->toAbsolute($onlyDirectories)], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php index 744bdae1..f4f70c8e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php @@ -17,23 +17,23 @@ class FilecontentFilterIteratorTest extends IteratorTestCase { public function testAccept() { - $inner = new MockFileListIterator(array('test.txt')); - $iterator = new FilecontentFilterIterator($inner, array(), array()); - $this->assertIterator(array('test.txt'), $iterator); + $inner = new MockFileListIterator(['test.txt']); + $iterator = new FilecontentFilterIterator($inner, [], []); + $this->assertIterator(['test.txt'], $iterator); } public function testDirectory() { - $inner = new MockFileListIterator(array('directory')); - $iterator = new FilecontentFilterIterator($inner, array('directory'), array()); - $this->assertIterator(array(), $iterator); + $inner = new MockFileListIterator(['directory']); + $iterator = new FilecontentFilterIterator($inner, ['directory'], []); + $this->assertIterator([], $iterator); } public function testUnreadableFile() { - $inner = new MockFileListIterator(array('file r-')); - $iterator = new FilecontentFilterIterator($inner, array('file r-'), array()); - $this->assertIterator(array(), $iterator); + $inner = new MockFileListIterator(['file r-']); + $iterator = new FilecontentFilterIterator($inner, ['file r-'], []); + $this->assertIterator([], $iterator); } /** @@ -49,38 +49,38 @@ class FilecontentFilterIteratorTest extends IteratorTestCase { $inner = new MockFileListIterator(); - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'a.txt', 'contents' => 'Lorem ipsum...', 'type' => 'file', - 'mode' => 'r+', ) + 'mode' => 'r+', ] ); - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'b.yml', 'contents' => 'dolor sit...', 'type' => 'file', - 'mode' => 'r+', ) + 'mode' => 'r+', ] ); - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'some/other/dir/third.php', 'contents' => 'amet...', 'type' => 'file', - 'mode' => 'r+', ) + 'mode' => 'r+', ] ); - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'unreadable-file.txt', 'contents' => false, 'type' => 'file', - 'mode' => 'r+', ) + 'mode' => 'r+', ] ); - return array( - array($inner, array('.'), array(), array('a.txt', 'b.yml', 'some/other/dir/third.php')), - array($inner, array('ipsum'), array(), array('a.txt')), - array($inner, array('i', 'amet'), array('Lorem', 'amet'), array('b.yml')), - ); + return [ + [$inner, ['.'], [], ['a.txt', 'b.yml', 'some/other/dir/third.php']], + [$inner, ['ipsum'], [], ['a.txt']], + [$inner, ['i', 'amet'], ['Lorem', 'amet'], ['b.yml']], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php index c4b97959..9270dd1c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php @@ -20,7 +20,7 @@ class FilenameFilterIteratorTest extends IteratorTestCase */ public function testAccept($matchPatterns, $noMatchPatterns, $expected) { - $inner = new InnerNameIterator(array('test.php', 'test.py', 'foo.php')); + $inner = new InnerNameIterator(['test.php', 'test.py', 'foo.php']); $iterator = new FilenameFilterIterator($inner, $matchPatterns, $noMatchPatterns); @@ -29,14 +29,14 @@ class FilenameFilterIteratorTest extends IteratorTestCase public function getAcceptData() { - return array( - array(array('test.*'), array(), array('test.php', 'test.py')), - array(array(), array('test.*'), array('foo.php')), - array(array('*.php'), array('test.*'), array('foo.php')), - array(array('*.php', '*.py'), array('foo.*'), array('test.php', 'test.py')), - array(array('/\.php$/'), array(), array('test.php', 'foo.php')), - array(array(), array('/\.php$/'), array('test.py')), - ); + return [ + [['test.*'], [], ['test.php', 'test.py']], + [[], ['test.*'], ['foo.php']], + [['*.php'], ['test.*'], ['foo.php']], + [['*.php', '*.py'], ['foo.*'], ['test.php', 'test.py']], + [['/\.php$/'], [], ['test.php', 'foo.php']], + [[], ['/\.php$/'], ['test.py']], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/FilterIteratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/FilterIteratorTest.php index 8b1a4482..b26f7ba6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/FilterIteratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/FilterIteratorTest.php @@ -23,7 +23,7 @@ class FilterIteratorTest extends RealIteratorTestCase $i = new \FilesystemIterator($this->toAbsolute()); // it is expected that there are test.py test.php in the tmpDir - $i = $this->getMockForAbstractClass('Symfony\Component\Finder\Iterator\FilterIterator', array($i)); + $i = $this->getMockForAbstractClass('Symfony\Component\Finder\Iterator\FilterIterator', [$i]); $i->expects($this->any()) ->method('accept') ->will($this->returnCallback(function () use ($i) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/Iterator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/Iterator.php index 849bf081..3e21a070 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/Iterator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/Iterator.php @@ -13,9 +13,9 @@ namespace Symfony\Component\Finder\Tests\Iterator; class Iterator implements \Iterator { - protected $values = array(); + protected $values = []; - public function __construct(array $values = array()) + public function __construct(array $values = []) { foreach ($values as $value) { $this->attach(new \SplFileInfo($value)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/IteratorTestCase.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/IteratorTestCase.php index 89f042ae..796dc6ac 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/IteratorTestCase.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/IteratorTestCase.php @@ -51,7 +51,7 @@ abstract class IteratorTestCase extends TestCase $values = array_values(array_map(function (\SplFileInfo $fileinfo) { return $fileinfo->getPathname(); }, iterator_to_array($iterator))); foreach ($expected as $subarray) { - $temp = array(); + $temp = []; while (\count($values) && \count($temp) < \count($subarray)) { $temp[] = array_shift($values); } @@ -69,7 +69,7 @@ abstract class IteratorTestCase extends TestCase */ protected function assertIteratorInForeach($expected, \Traversable $iterator) { - $values = array(); + $values = []; foreach ($iterator as $file) { $this->assertInstanceOf('Symfony\\Component\\Finder\\SplFileInfo', $file); $values[] = $file->getPathname(); @@ -89,7 +89,7 @@ abstract class IteratorTestCase extends TestCase */ protected function assertOrderedIteratorInForeach($expected, \Traversable $iterator) { - $values = array(); + $values = []; foreach ($iterator as $file) { $this->assertInstanceOf('Symfony\\Component\\Finder\\SplFileInfo', $file); $values[] = $file->getPathname(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php index eb0adfad..670478d7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php @@ -13,7 +13,7 @@ namespace Symfony\Component\Finder\Tests\Iterator; class MockFileListIterator extends \ArrayIterator { - public function __construct(array $filesArray = array()) + public function __construct(array $filesArray = []) { $files = array_map(function ($file) { return new MockSplFileInfo($file); }, $filesArray); parent::__construct($files); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php index a5ac93a4..58bb5979 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php @@ -28,14 +28,14 @@ class MockSplFileInfo extends \SplFileInfo if (\is_string($param)) { parent::__construct($param); } elseif (\is_array($param)) { - $defaults = array( + $defaults = [ 'name' => 'file.txt', 'contents' => null, 'mode' => null, 'type' => null, 'relativePath' => null, 'relativePathname' => null, - ); + ]; $defaults = array_merge($defaults, $param); parent::__construct($defaults['name']); $this->setContents($defaults['contents']); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php index f2c1cd24..95567769 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php @@ -27,24 +27,24 @@ class MultiplePcreFilterIteratorTest extends TestCase public function getIsRegexFixtures() { - return array( - array('foo', false, 'string'), - array(' foo ', false, '" " is not a valid delimiter'), - array('\\foo\\', false, '"\\" is not a valid delimiter'), - array('afooa', false, '"a" is not a valid delimiter'), - array('//', false, 'the pattern should contain at least 1 character'), - array('/a/', true, 'valid regex'), - array('/foo/', true, 'valid regex'), - array('/foo/i', true, 'valid regex with a single modifier'), - array('/foo/imsxu', true, 'valid regex with multiple modifiers'), - array('#foo#', true, '"#" is a valid delimiter'), - array('{foo}', true, '"{,}" is a valid delimiter pair'), - array('[foo]', true, '"[,]" is a valid delimiter pair'), - array('(foo)', true, '"(,)" is a valid delimiter pair'), - array('', true, '"<,>" is a valid delimiter pair'), - array('*foo.*', false, '"*" is not considered as a valid delimiter'), - array('?foo.?', false, '"?" is not considered as a valid delimiter'), - ); + return [ + ['foo', false, 'string'], + [' foo ', false, '" " is not a valid delimiter'], + ['\\foo\\', false, '"\\" is not a valid delimiter'], + ['afooa', false, '"a" is not a valid delimiter'], + ['//', false, 'the pattern should contain at least 1 character'], + ['/a/', true, 'valid regex'], + ['/foo/', true, 'valid regex'], + ['/foo/i', true, 'valid regex with a single modifier'], + ['/foo/imsxu', true, 'valid regex with multiple modifiers'], + ['#foo#', true, '"#" is a valid delimiter'], + ['{foo}', true, '"{,}" is a valid delimiter pair'], + ['[foo]', true, '"[,]" is a valid delimiter pair'], + ['(foo)', true, '"(,)" is a valid delimiter pair'], + ['', true, '"<,>" is a valid delimiter pair'], + ['*foo.*', false, '"*" is not considered as a valid delimiter'], + ['?foo.?', false, '"?" is not considered as a valid delimiter'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php index 38ed966a..9040ee04 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php @@ -29,54 +29,54 @@ class PathFilterIteratorTest extends IteratorTestCase $inner = new MockFileListIterator(); //PATH: A/B/C/abc.dat - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'abc.dat', 'relativePathname' => 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat', - )); + ]); //PATH: A/B/ab.dat - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'ab.dat', 'relativePathname' => 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat', - )); + ]); //PATH: A/a.dat - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'a.dat', 'relativePathname' => 'A'.\DIRECTORY_SEPARATOR.'a.dat', - )); + ]); //PATH: copy/A/B/C/abc.dat.copy - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'abc.dat.copy', 'relativePathname' => 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat', - )); + ]); //PATH: copy/A/B/ab.dat.copy - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'ab.dat.copy', 'relativePathname' => 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat', - )); + ]); //PATH: copy/A/a.dat.copy - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'a.dat.copy', 'relativePathname' => 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'a.dat', - )); + ]); - return array( - array($inner, array('/^A/'), array(), array('abc.dat', 'ab.dat', 'a.dat')), - array($inner, array('/^A\/B/'), array(), array('abc.dat', 'ab.dat')), - array($inner, array('/^A\/B\/C/'), array(), array('abc.dat')), - array($inner, array('/A\/B\/C/'), array(), array('abc.dat', 'abc.dat.copy')), + return [ + [$inner, ['/^A/'], [], ['abc.dat', 'ab.dat', 'a.dat']], + [$inner, ['/^A\/B/'], [], ['abc.dat', 'ab.dat']], + [$inner, ['/^A\/B\/C/'], [], ['abc.dat']], + [$inner, ['/A\/B\/C/'], [], ['abc.dat', 'abc.dat.copy']], - array($inner, array('A'), array(), array('abc.dat', 'ab.dat', 'a.dat', 'abc.dat.copy', 'ab.dat.copy', 'a.dat.copy')), - array($inner, array('A/B'), array(), array('abc.dat', 'ab.dat', 'abc.dat.copy', 'ab.dat.copy')), - array($inner, array('A/B/C'), array(), array('abc.dat', 'abc.dat.copy')), + [$inner, ['A'], [], ['abc.dat', 'ab.dat', 'a.dat', 'abc.dat.copy', 'ab.dat.copy', 'a.dat.copy']], + [$inner, ['A/B'], [], ['abc.dat', 'ab.dat', 'abc.dat.copy', 'ab.dat.copy']], + [$inner, ['A/B/C'], [], ['abc.dat', 'abc.dat.copy']], - array($inner, array('copy/A'), array(), array('abc.dat.copy', 'ab.dat.copy', 'a.dat.copy')), - array($inner, array('copy/A/B'), array(), array('abc.dat.copy', 'ab.dat.copy')), - array($inner, array('copy/A/B/C'), array(), array('abc.dat.copy')), - ); + [$inner, ['copy/A'], [], ['abc.dat.copy', 'ab.dat.copy', 'a.dat.copy']], + [$inner, ['copy/A/B'], [], ['abc.dat.copy', 'ab.dat.copy']], + [$inner, ['copy/A/B/C'], [], ['abc.dat.copy']], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php index b0223b78..70048a5e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php @@ -20,7 +20,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase { self::$tmpDir = realpath(sys_get_temp_dir()).\DIRECTORY_SEPARATOR.'symfony_finder'; - self::$files = array( + self::$files = [ '.git/', '.foo/', '.foo/.bar', @@ -33,7 +33,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase 'toto/', 'toto/.git/', 'foo bar', - ); + ]; self::$files = self::toAbsolute(self::$files); @@ -88,7 +88,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase } if (\is_array($files)) { - $f = array(); + $f = []; foreach ($files as $file) { if (\is_array($file)) { $f[] = self::toAbsolute($file); @@ -109,7 +109,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase protected static function toAbsoluteFixtures($files) { - $f = array(); + $f = []; foreach ($files as $file) { $f[] = realpath(__DIR__.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.$file); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php index 0c9aca24..037810ae 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php @@ -42,11 +42,11 @@ class RecursiveDirectoryIteratorTest extends IteratorTestCase $this->markTestSkipped('Unsupported stream "ftp".'); } - $contains = array( + $contains = [ 'ftp://speedtest.tele2.net'.\DIRECTORY_SEPARATOR.'1000GB.zip', 'ftp://speedtest.tele2.net'.\DIRECTORY_SEPARATOR.'100GB.zip', - ); - $actual = array(); + ]; + $actual = []; $i->seek(0); $actual[] = $i->getPathname(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/SizeRangeFilterIteratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/SizeRangeFilterIteratorTest.php index 068fc7b0..b1e431ba 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/SizeRangeFilterIteratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/SizeRangeFilterIteratorTest.php @@ -30,18 +30,18 @@ class SizeRangeFilterIteratorTest extends RealIteratorTestCase public function getAcceptData() { - $lessThan1KGreaterThan05K = array( + $lessThan1KGreaterThan05K = [ '.foo', '.git', 'foo', 'test.php', 'toto', 'toto/.git', - ); + ]; - return array( - array(array(new NumberComparator('< 1K'), new NumberComparator('> 0.5K')), $this->toAbsolute($lessThan1KGreaterThan05K)), - ); + return [ + [[new NumberComparator('< 1K'), new NumberComparator('> 0.5K')], $this->toAbsolute($lessThan1KGreaterThan05K)], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php index a35a12b5..57f1e096 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php @@ -18,7 +18,7 @@ class SortableIteratorTest extends RealIteratorTestCase public function testConstructor() { try { - new SortableIterator(new Iterator(array()), 'foobar'); + new SortableIterator(new Iterator([]), 'foobar'); $this->fail('__construct() throws an \InvalidArgumentException exception if the mode is not valid'); } catch (\Exception $e) { $this->assertInstanceOf('InvalidArgumentException', $e, '__construct() throws an \InvalidArgumentException exception if the mode is not valid'); @@ -73,7 +73,7 @@ class SortableIteratorTest extends RealIteratorTestCase public function getAcceptData() { - $sortByName = array( + $sortByName = [ '.bar', '.foo', '.foo/.bar', @@ -86,9 +86,9 @@ class SortableIteratorTest extends RealIteratorTestCase 'test.py', 'toto', 'toto/.git', - ); + ]; - $sortByType = array( + $sortByType = [ '.foo', '.git', 'foo', @@ -101,9 +101,9 @@ class SortableIteratorTest extends RealIteratorTestCase 'foo/bar.tmp', 'test.php', 'test.py', - ); + ]; - $customComparison = array( + $customComparison = [ '.bar', '.foo', '.foo/.bar', @@ -116,13 +116,13 @@ class SortableIteratorTest extends RealIteratorTestCase 'test.py', 'toto', 'toto/.git', - ); + ]; - $sortByAccessedTime = array( + $sortByAccessedTime = [ // For these two files the access time was set to 2005-10-15 - array('foo/bar.tmp', 'test.php'), + ['foo/bar.tmp', 'test.php'], // These files were created more or less at the same time - array( + [ '.git', '.foo', '.foo/.bar', @@ -132,13 +132,13 @@ class SortableIteratorTest extends RealIteratorTestCase 'toto', 'toto/.git', 'foo bar', - ), + ], // This file was accessed after sleeping for 1 sec - array('.bar'), - ); + ['.bar'], + ]; - $sortByChangedTime = array( - array( + $sortByChangedTime = [ + [ '.git', '.foo', '.foo/.bar', @@ -149,13 +149,13 @@ class SortableIteratorTest extends RealIteratorTestCase 'toto', 'toto/.git', 'foo bar', - ), - array('test.php'), - array('test.py'), - ); + ], + ['test.php'], + ['test.py'], + ]; - $sortByModifiedTime = array( - array( + $sortByModifiedTime = [ + [ '.git', '.foo', '.foo/.bar', @@ -166,18 +166,18 @@ class SortableIteratorTest extends RealIteratorTestCase 'toto', 'toto/.git', 'foo bar', - ), - array('test.php'), - array('test.py'), - ); + ], + ['test.php'], + ['test.py'], + ]; - return array( - array(SortableIterator::SORT_BY_NAME, $this->toAbsolute($sortByName)), - array(SortableIterator::SORT_BY_TYPE, $this->toAbsolute($sortByType)), - array(SortableIterator::SORT_BY_ACCESSED_TIME, $this->toAbsolute($sortByAccessedTime)), - array(SortableIterator::SORT_BY_CHANGED_TIME, $this->toAbsolute($sortByChangedTime)), - array(SortableIterator::SORT_BY_MODIFIED_TIME, $this->toAbsolute($sortByModifiedTime)), - array(function (\SplFileInfo $a, \SplFileInfo $b) { return strcmp($a->getRealPath(), $b->getRealPath()); }, $this->toAbsolute($customComparison)), - ); + return [ + [SortableIterator::SORT_BY_NAME, $this->toAbsolute($sortByName)], + [SortableIterator::SORT_BY_TYPE, $this->toAbsolute($sortByType)], + [SortableIterator::SORT_BY_ACCESSED_TIME, $this->toAbsolute($sortByAccessedTime)], + [SortableIterator::SORT_BY_CHANGED_TIME, $this->toAbsolute($sortByChangedTime)], + [SortableIterator::SORT_BY_MODIFIED_TIME, $this->toAbsolute($sortByModifiedTime)], + [function (\SplFileInfo $a, \SplFileInfo $b) { return strcmp($a->getRealPath(), $b->getRealPath()); }, $this->toAbsolute($customComparison)], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/AbstractExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/AbstractExtension.php index 61497aba..f4ac2e5c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/AbstractExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/AbstractExtension.php @@ -86,7 +86,7 @@ abstract class AbstractExtension implements FormExtensionInterface return isset($this->typeExtensions[$name]) ? $this->typeExtensions[$name] - : array(); + : []; } /** @@ -120,7 +120,7 @@ abstract class AbstractExtension implements FormExtensionInterface */ protected function loadTypes() { - return array(); + return []; } /** @@ -130,7 +130,7 @@ abstract class AbstractExtension implements FormExtensionInterface */ protected function loadTypeExtensions() { - return array(); + return []; } /** @@ -149,7 +149,7 @@ abstract class AbstractExtension implements FormExtensionInterface */ private function initTypes() { - $this->types = array(); + $this->types = []; foreach ($this->loadTypes() as $type) { if (!$type instanceof FormTypeInterface) { @@ -168,7 +168,7 @@ abstract class AbstractExtension implements FormExtensionInterface */ private function initTypeExtensions() { - $this->typeExtensions = array(); + $this->typeExtensions = []; foreach ($this->loadTypeExtensions() as $extension) { if (!$extension instanceof FormTypeExtensionInterface) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/AbstractRendererEngine.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/AbstractRendererEngine.php index c56d751e..649b600d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/AbstractRendererEngine.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/AbstractRendererEngine.php @@ -24,11 +24,11 @@ abstract class AbstractRendererEngine implements FormRendererEngineInterface const CACHE_KEY_VAR = 'cache_key'; protected $defaultThemes; - protected $themes = array(); - protected $useDefaultThemes = array(); - protected $resources = array(); + protected $themes = []; + protected $useDefaultThemes = []; + protected $resources = []; - private $resourceHierarchyLevels = array(); + private $resourceHierarchyLevels = []; /** * Creates a new renderer engine. @@ -36,7 +36,7 @@ abstract class AbstractRendererEngine implements FormRendererEngineInterface * @param array $defaultThemes The default themes. The type of these * themes is open to the implementation. */ - public function __construct(array $defaultThemes = array()) + public function __construct(array $defaultThemes = []) { $this->defaultThemes = $defaultThemes; } @@ -49,7 +49,7 @@ abstract class AbstractRendererEngine implements FormRendererEngineInterface $cacheKey = $view->vars[self::CACHE_KEY_VAR]; // Do not cast, as casting turns objects into arrays of properties - $this->themes[$cacheKey] = \is_array($themes) ? $themes : array($themes); + $this->themes[$cacheKey] = \is_array($themes) ? $themes : [$themes]; $args = \func_get_args(); $this->useDefaultThemes[$cacheKey] = isset($args[2]) ? (bool) $args[2] : true; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/AbstractType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/AbstractType.php index 3509db5d..1a9cfd75 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/AbstractType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/AbstractType.php @@ -52,7 +52,7 @@ abstract class AbstractType implements FormTypeInterface */ public function getBlockPrefix() { - return StringUtil::fqcnToBlockPrefix(\get_class($this)); + return StringUtil::fqcnToBlockPrefix(\get_class($this)) ?: ''; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Button.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Button.php index b72e6ae9..8ae4946c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Button.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Button.php @@ -132,7 +132,7 @@ class Button implements \IteratorAggregate, FormInterface * * @throws BadMethodCallException */ - public function add($child, $type = null, array $options = array()) + public function add($child, $type = null, array $options = []) { throw new BadMethodCallException('Buttons cannot have children.'); } @@ -182,7 +182,7 @@ class Button implements \IteratorAggregate, FormInterface */ public function all() { - return array(); + return []; } /** @@ -190,7 +190,7 @@ class Button implements \IteratorAggregate, FormInterface */ public function getErrors($deep = false, $flatten = true) { - return new FormErrorIterator($this, array()); + return new FormErrorIterator($this, []); } /** @@ -234,7 +234,7 @@ class Button implements \IteratorAggregate, FormInterface */ public function getExtraData() { - return array(); + return []; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ButtonBuilder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ButtonBuilder.php index 9524f687..903e842b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ButtonBuilder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ButtonBuilder.php @@ -45,7 +45,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface /** * @var array */ - private $attributes = array(); + private $attributes = []; /** * @var array @@ -60,7 +60,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface * * @throws InvalidArgumentException if the name is empty */ - public function __construct($name, array $options = array()) + public function __construct($name, array $options = []) { $name = (string) $name; if ('' === $name) { @@ -82,7 +82,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface * * @throws BadMethodCallException */ - public function add($child, $type = null, array $options = array()) + public function add($child, $type = null, array $options = []) { throw new BadMethodCallException('Buttons cannot have children.'); } @@ -98,7 +98,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface * * @throws BadMethodCallException */ - public function create($name, $type = null, array $options = array()) + public function create($name, $type = null, array $options = []) { throw new BadMethodCallException('Buttons cannot have children.'); } @@ -150,7 +150,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface */ public function all() { - return array(); + return []; } /** @@ -588,7 +588,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface */ public function getViewTransformers() { - return array(); + return []; } /** @@ -598,7 +598,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface */ public function getModelTransformers() { - return array(); + return []; } /** @@ -664,7 +664,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface */ public function hasAttribute($name) { - return array_key_exists($name, $this->attributes); + return \array_key_exists($name, $this->attributes); } /** @@ -677,7 +677,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface */ public function getAttribute($name, $default = null) { - return array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; + return \array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; } /** @@ -771,7 +771,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface */ public function hasOption($name) { - return array_key_exists($name, $this->options); + return \array_key_exists($name, $this->options); } /** @@ -784,7 +784,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface */ public function getOption($name, $default = null) { - return array_key_exists($name, $this->options) ? $this->options[$name] : $default; + return \array_key_exists($name, $this->options) ? $this->options[$name] : $default; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php index 0554304f..02685a25 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php @@ -78,7 +78,7 @@ class ArrayChoiceList implements ChoiceListInterface // If a deterministic value generator was passed, use it later $this->valueCallback = $value; } else { - // Otherwise simply generate incrementing integers as values + // Otherwise generate incrementing integers as values $i = 0; $value = function () use (&$i) { return $i++; @@ -132,10 +132,10 @@ class ArrayChoiceList implements ChoiceListInterface */ public function getChoicesForValues(array $values) { - $choices = array(); + $choices = []; foreach ($values as $i => $givenValue) { - if (array_key_exists($givenValue, $this->choices)) { + if (\array_key_exists($givenValue, $this->choices)) { $choices[$i] = $this->choices[$givenValue]; } } @@ -148,11 +148,11 @@ class ArrayChoiceList implements ChoiceListInterface */ public function getValuesForChoices(array $choices) { - $values = array(); + $values = []; // Use the value callback to compare choices by their values, if present if ($this->valueCallback) { - $givenValues = array(); + $givenValues = []; foreach ($choices as $i => $givenChoice) { $givenValues[$i] = (string) \call_user_func($this->valueCallback, $givenChoice); @@ -190,9 +190,9 @@ class ArrayChoiceList implements ChoiceListInterface protected function flatten(array $choices, $value, &$choicesByValues, &$keysByValues, &$structuredValues) { if (null === $choicesByValues) { - $choicesByValues = array(); - $keysByValues = array(); - $structuredValues = array(); + $choicesByValues = []; + $keysByValues = []; + $structuredValues = []; } foreach ($choices as $key => $choice) { @@ -219,7 +219,7 @@ class ArrayChoiceList implements ChoiceListInterface * @return bool returns true if the choices can be cast to strings and * false otherwise */ - private function castableToString(array $choices, array &$cache = array()) + private function castableToString(array $choices, array &$cache = []) { foreach ($choices as $choice) { if (\is_array($choice)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/ChoiceListInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/ChoiceListInterface.php index b59e77bf..c1d643ee 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/ChoiceListInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/ChoiceListInterface.php @@ -48,19 +48,19 @@ interface ChoiceListInterface * keys of the choices. If the original array contained nested arrays, these * nested arrays are represented here as well: * - * $form->add('field', 'choice', array( - * 'choices' => array( - * 'Decided' => array('Yes' => true, 'No' => false), - * 'Undecided' => array('Maybe' => null), - * ), - * )); + * $form->add('field', 'choice', [ + * 'choices' => [ + * 'Decided' => ['Yes' => true, 'No' => false], + * 'Undecided' => ['Maybe' => null], + * ], + * ]); * * In this example, the result of this method is: * - * array( - * 'Decided' => array('Yes' => '0', 'No' => '1'), - * 'Undecided' => array('Maybe' => '2'), - * ) + * [ + * 'Decided' => ['Yes' => '0', 'No' => '1'], + * 'Undecided' => ['Maybe' => '2'], + * ] * * @return string[] The choice values */ @@ -73,12 +73,12 @@ interface ChoiceListInterface * "choice" option of the choice type. Note that this array may contain * duplicates if the "choice" option contained choice groups: * - * $form->add('field', 'choice', array( - * 'choices' => array( - * 'Decided' => array(true, false), - * 'Undecided' => array(null), - * ), - * )); + * $form->add('field', 'choice', [ + * 'choices' => [ + * 'Decided' => [true, false], + * 'Undecided' => [null], + * ], + * ]); * * In this example, the original key 0 appears twice, once for `true` and * once for `null`. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php index dba025bc..477afbbb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php @@ -27,12 +27,12 @@ class CachingFactoryDecorator implements ChoiceListFactoryInterface /** * @var ChoiceListInterface[] */ - private $lists = array(); + private $lists = []; /** * @var ChoiceListView[] */ - private $views = array(); + private $views = []; /** * Generates a SHA-256 hash for the given value. @@ -62,30 +62,6 @@ class CachingFactoryDecorator implements ChoiceListFactoryInterface return hash('sha256', $namespace.':'.serialize($value)); } - /** - * Flattens an array into the given output variable. - * - * @param array $array The array to flatten - * @param array $output The flattened output - * - * @internal - */ - private static function flatten(array $array, &$output) - { - if (null === $output) { - $output = array(); - } - - foreach ($array as $key => $value) { - if (\is_array($value)) { - self::flatten($value, $output); - continue; - } - - $output[$key] = $value; - } - } - public function __construct(ChoiceListFactoryInterface $decoratedFactory) { $this->decoratedFactory = $decoratedFactory; @@ -113,12 +89,7 @@ class CachingFactoryDecorator implements ChoiceListFactoryInterface // The value is not validated on purpose. The decorated factory may // decide which values to accept and which not. - // We ignore the choice groups for caching. If two choice lists are - // requested with the same choices, but a different grouping, the same - // choice list is returned. - self::flatten($choices, $flatChoices); - - $hash = self::generateHash(array($flatChoices, $value), 'fromChoices'); + $hash = self::generateHash([$choices, $value], 'fromChoices'); if (!isset($this->lists[$hash])) { $this->lists[$hash] = $this->decoratedFactory->createListFromChoices($choices, $value); @@ -132,7 +103,7 @@ class CachingFactoryDecorator implements ChoiceListFactoryInterface */ public function createListFromLoader(ChoiceLoaderInterface $loader, $value = null) { - $hash = self::generateHash(array($loader, $value), 'fromLoader'); + $hash = self::generateHash([$loader, $value], 'fromLoader'); if (!isset($this->lists[$hash])) { $this->lists[$hash] = $this->decoratedFactory->createListFromLoader($loader, $value); @@ -148,7 +119,7 @@ class CachingFactoryDecorator implements ChoiceListFactoryInterface { // The input is not validated on purpose. This way, the decorated // factory may decide which input to accept and which not. - $hash = self::generateHash(array($list, $preferredChoices, $label, $index, $groupBy, $attr)); + $hash = self::generateHash([$list, $preferredChoices, $label, $index, $groupBy, $attr]); if (!isset($this->views[$hash])) { $this->views[$hash] = $this->decoratedFactory->createView( diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/Factory/DefaultChoiceListFactory.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/Factory/DefaultChoiceListFactory.php index 5dfe8fcd..45b56881 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/Factory/DefaultChoiceListFactory.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/Factory/DefaultChoiceListFactory.php @@ -47,8 +47,8 @@ class DefaultChoiceListFactory implements ChoiceListFactoryInterface */ public function createView(ChoiceListInterface $list, $preferredChoices = null, $label = null, $index = null, $groupBy = null, $attr = null) { - $preferredViews = array(); - $otherViews = array(); + $preferredViews = []; + $otherViews = []; $choices = $list->getChoices(); $keys = $list->getOriginalKeys(); @@ -137,7 +137,7 @@ class DefaultChoiceListFactory implements ChoiceListFactoryInterface $label, // The attributes may be a callable or a mapping from choice indices // to nested arrays - \is_callable($attr) ? \call_user_func($attr, $choice, $key, $value) : (isset($attr[$key]) ? $attr[$key] : array()) + \is_callable($attr) ? \call_user_func($attr, $choice, $key, $value) : (isset($attr[$key]) ? $attr[$key] : []) ); // $isPreferred may be null if no choices are preferred @@ -157,8 +157,8 @@ class DefaultChoiceListFactory implements ChoiceListFactoryInterface // Add the contents of groups to new ChoiceGroupView instances if (\is_array($value)) { - $preferredViewsForGroup = array(); - $otherViewsForGroup = array(); + $preferredViewsForGroup = []; + $otherViewsForGroup = []; self::addChoiceViewsGroupedBy( $value, diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php index b81ad48b..0fb32734 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php @@ -32,7 +32,7 @@ class LazyChoiceList implements ChoiceListInterface /** * The callable creating string values for each choice. * - * If null, choices are simply cast to strings. + * If null, choices are cast to strings. * * @var callable|null */ diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/Loader/CallbackChoiceLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/Loader/CallbackChoiceLoader.php index b2825051..07c048bb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/Loader/CallbackChoiceLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/Loader/CallbackChoiceLoader.php @@ -56,7 +56,7 @@ class CallbackChoiceLoader implements ChoiceLoaderInterface { // Optimize if (empty($values)) { - return array(); + return []; } return $this->loadChoiceList($value)->getChoicesForValues($values); @@ -69,7 +69,7 @@ class CallbackChoiceLoader implements ChoiceLoaderInterface { // Optimize if (empty($choices)) { - return array(); + return []; } return $this->loadChoiceList($value)->getValuesForChoices($choices); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/View/ChoiceGroupView.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/View/ChoiceGroupView.php index 17546182..dd80486c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/View/ChoiceGroupView.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/View/ChoiceGroupView.php @@ -27,7 +27,7 @@ class ChoiceGroupView implements \IteratorAggregate * @param string $label The label of the group * @param ChoiceGroupView[]|ChoiceView[] $choices the choice views in the group */ - public function __construct($label, array $choices = array()) + public function __construct($label, array $choices = []) { $this->label = $label; $this->choices = $choices; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/View/ChoiceListView.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/View/ChoiceListView.php index add892aa..586269b5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/View/ChoiceListView.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/View/ChoiceListView.php @@ -31,7 +31,7 @@ class ChoiceListView * @param ChoiceGroupView[]|ChoiceView[] $choices The choice views * @param ChoiceGroupView[]|ChoiceView[] $preferredChoices the preferred choice views */ - public function __construct(array $choices = array(), array $preferredChoices = array()) + public function __construct(array $choices = [], array $preferredChoices = []) { $this->choices = $choices; $this->preferredChoices = $preferredChoices; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/View/ChoiceView.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/View/ChoiceView.php index 8feed210..83326a7a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/View/ChoiceView.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/View/ChoiceView.php @@ -35,7 +35,7 @@ class ChoiceView * @param string $label The label displayed to humans * @param array $attr Additional attributes for the HTML tag */ - public function __construct($data, $value, $label, array $attr = array()) + public function __construct($data, $value, $label, array $attr = []) { $this->data = $data; $this->value = $value; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Command/DebugCommand.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Command/DebugCommand.php index 7ad84d87..49b2f1fe 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Command/DebugCommand.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Command/DebugCommand.php @@ -38,7 +38,7 @@ class DebugCommand extends Command private $extensions; private $guessers; - public function __construct(FormRegistryInterface $formRegistry, array $namespaces = array('Symfony\Component\Form\Extension\Core\Type'), array $types = array(), array $extensions = array(), array $guessers = array()) + public function __construct(FormRegistryInterface $formRegistry, array $namespaces = ['Symfony\Component\Form\Extension\Core\Type'], array $types = [], array $extensions = [], array $guessers = []) { parent::__construct(); @@ -55,11 +55,11 @@ class DebugCommand extends Command protected function configure() { $this - ->setDefinition(array( + ->setDefinition([ new InputArgument('class', InputArgument::OPTIONAL, 'The form type class'), new InputArgument('option', InputArgument::OPTIONAL, 'The form type option'), new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt or json)', 'txt'), - )) + ]) ->setDescription('Displays form type information') ->setHelp(<<<'EOF' The %command.name% command displays information about form types. @@ -139,7 +139,7 @@ EOF private function getFqcnTypeClass(InputInterface $input, SymfonyStyle $io, $shortClassName) { - $classes = array(); + $classes = []; sort($this->namespaces); foreach ($this->namespaces as $namespace) { if (class_exists($fqcn = $namespace.'\\'.$shortClassName)) { @@ -186,7 +186,7 @@ EOF private function findAlternatives($name, array $collection) { - $alternatives = array(); + $alternatives = []; foreach ($collection as $item) { $lev = levenshtein($name, $item); if ($lev <= \strlen($name) / 3 || false !== strpos($item, $name)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Console/Descriptor/Descriptor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Console/Descriptor/Descriptor.php index bfa4302d..79f66a08 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Console/Descriptor/Descriptor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Console/Descriptor/Descriptor.php @@ -32,20 +32,20 @@ abstract class Descriptor implements DescriptorInterface /** @var OutputStyle */ protected $output; protected $type; - protected $ownOptions = array(); - protected $overriddenOptions = array(); - protected $parentOptions = array(); - protected $extensionOptions = array(); - protected $requiredOptions = array(); - protected $parents = array(); - protected $extensions = array(); + protected $ownOptions = []; + protected $overriddenOptions = []; + protected $parentOptions = []; + protected $extensionOptions = []; + protected $requiredOptions = []; + protected $parents = []; + protected $extensions = []; /** * {@inheritdoc} */ - public function describe(OutputInterface $output, $object, array $options = array()) + public function describe(OutputInterface $output, $object, array $options = []) { - $this->output = $output instanceof OutputStyle ? $output : new SymfonyStyle(new ArrayInput(array()), $output); + $this->output = $output instanceof OutputStyle ? $output : new SymfonyStyle(new ArrayInput([]), $output); switch (true) { case null === $object: @@ -64,14 +64,14 @@ abstract class Descriptor implements DescriptorInterface abstract protected function describeDefaults(array $options); - abstract protected function describeResolvedFormType(ResolvedFormTypeInterface $resolvedFormType, array $options = array()); + abstract protected function describeResolvedFormType(ResolvedFormTypeInterface $resolvedFormType, array $options = []); abstract protected function describeOption(OptionsResolver $optionsResolver, array $options); protected function collectOptions(ResolvedFormTypeInterface $type) { - $this->parents = array(); - $this->extensions = array(); + $this->parents = []; + $this->extensions = []; if (null !== $type->getParent()) { $optionsResolver = clone $this->getParentOptionsResolver($type->getParent()); @@ -83,7 +83,7 @@ abstract class Descriptor implements DescriptorInterface $this->ownOptions = array_diff($ownOptionsResolver->getDefinedOptions(), $optionsResolver->getDefinedOptions()); $overriddenOptions = array_intersect(array_merge($ownOptionsResolver->getDefinedOptions(), $ownOptionsResolver->getUndefinedOptions()), $optionsResolver->getDefinedOptions()); - $this->parentOptions = array(); + $this->parentOptions = []; foreach ($this->parents as $class => $parentOptions) { $this->overriddenOptions[$class] = array_intersect($overriddenOptions, $parentOptions); $this->parentOptions[$class] = array_diff($parentOptions, $overriddenOptions); @@ -91,7 +91,7 @@ abstract class Descriptor implements DescriptorInterface $type->getInnerType()->configureOptions($optionsResolver); $this->collectTypeExtensionsOptions($type, $optionsResolver); - $this->extensionOptions = array(); + $this->extensionOptions = []; foreach ($this->extensions as $class => $extensionOptions) { $this->overriddenOptions[$class] = array_intersect($overriddenOptions, $extensionOptions); $this->extensionOptions[$class] = array_diff($extensionOptions, $overriddenOptions); @@ -108,17 +108,17 @@ abstract class Descriptor implements DescriptorInterface protected function getOptionDefinition(OptionsResolver $optionsResolver, $option) { - $definition = array('required' => $optionsResolver->isRequired($option)); + $definition = ['required' => $optionsResolver->isRequired($option)]; $introspector = new OptionsResolverIntrospector($optionsResolver); - $map = array( + $map = [ 'default' => 'getDefault', 'lazy' => 'getLazyClosures', 'allowedTypes' => 'getAllowedTypes', 'allowedValues' => 'getAllowedValues', 'normalizer' => 'getNormalizer', - ); + ]; foreach ($map as $key => $method) { try { @@ -133,7 +133,7 @@ abstract class Descriptor implements DescriptorInterface private function getParentOptionsResolver(ResolvedFormTypeInterface $type) { - $this->parents[$class = \get_class($type->getInnerType())] = array(); + $this->parents[$class = \get_class($type->getInnerType())] = []; if (null !== $type->getParent()) { $optionsResolver = clone $this->getParentOptionsResolver($type->getParent()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Console/Descriptor/JsonDescriptor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Console/Descriptor/JsonDescriptor.php index 8e5a03e9..ab518dbf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Console/Descriptor/JsonDescriptor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Console/Descriptor/JsonDescriptor.php @@ -31,26 +31,26 @@ class JsonDescriptor extends Descriptor $this->writeData($data, $options); } - protected function describeResolvedFormType(ResolvedFormTypeInterface $resolvedFormType, array $options = array()) + protected function describeResolvedFormType(ResolvedFormTypeInterface $resolvedFormType, array $options = []) { $this->collectOptions($resolvedFormType); - $formOptions = array( + $formOptions = [ 'own' => $this->ownOptions, 'overridden' => $this->overriddenOptions, 'parent' => $this->parentOptions, 'extension' => $this->extensionOptions, 'required' => $this->requiredOptions, - ); + ]; $this->sortOptions($formOptions); - $data = array( + $data = [ 'class' => \get_class($resolvedFormType->getInnerType()), 'block_prefix' => $resolvedFormType->getInnerType()->getBlockPrefix(), 'options' => $formOptions, 'parent_types' => $this->parents, 'type_extensions' => $this->extensions, - ); + ]; $this->writeData($data, $options); } @@ -59,14 +59,14 @@ class JsonDescriptor extends Descriptor { $definition = $this->getOptionDefinition($optionsResolver, $options['option']); - $map = array( + $map = [ 'required' => 'required', 'default' => 'default', 'allowed_types' => 'allowedTypes', 'allowed_values' => 'allowedValues', - ); + ]; foreach ($map as $label => $name) { - if (array_key_exists($name, $definition)) { + if (\array_key_exists($name, $definition)) { $data[$label] = $definition[$name]; if ('default' === $name) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Console/Descriptor/TextDescriptor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Console/Descriptor/TextDescriptor.php index ac8a8bb2..957944f9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Console/Descriptor/TextDescriptor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Console/Descriptor/TextDescriptor.php @@ -43,29 +43,29 @@ class TextDescriptor extends Descriptor $this->output->listing($options['guessers']); } - protected function describeResolvedFormType(ResolvedFormTypeInterface $resolvedFormType, array $options = array()) + protected function describeResolvedFormType(ResolvedFormTypeInterface $resolvedFormType, array $options = []) { $this->collectOptions($resolvedFormType); - $formOptions = $this->normalizeAndSortOptionsColumns(array_filter(array( + $formOptions = $this->normalizeAndSortOptionsColumns(array_filter([ 'own' => $this->ownOptions, 'overridden' => $this->overriddenOptions, 'parent' => $this->parentOptions, 'extension' => $this->extensionOptions, - ))); + ])); // setting headers and column order - $tableHeaders = array_intersect_key(array( + $tableHeaders = array_intersect_key([ 'own' => 'Options', 'overridden' => 'Overridden options', 'parent' => 'Parent options', 'extension' => 'Extension options', - ), $formOptions); + ], $formOptions); - $tableRows = array(); + $tableRows = []; $count = \count(max($formOptions)); for ($i = 0; $i < $count; ++$i) { - $cells = array(); + $cells = []; foreach (array_keys($tableHeaders) as $group) { if (isset($formOptions[$group][$i])) { $option = $formOptions[$group][$i]; @@ -101,27 +101,27 @@ class TextDescriptor extends Descriptor $definition = $this->getOptionDefinition($optionsResolver, $options['option']); $dump = $this->getDumpFunction(); - $map = array( + $map = [ 'Required' => 'required', 'Default' => 'default', 'Allowed types' => 'allowedTypes', 'Allowed values' => 'allowedValues', 'Normalizer' => 'normalizer', - ); - $rows = array(); + ]; + $rows = []; foreach ($map as $label => $name) { - $value = array_key_exists($name, $definition) ? $dump($definition[$name]) : '-'; + $value = \array_key_exists($name, $definition) ? $dump($definition[$name]) : '-'; if ('default' === $name && isset($definition['lazy'])) { $value = "Value: $value\n\nClosure(s): ".$dump($definition['lazy']); } - $rows[] = array("$label", $value); + $rows[] = ["$label", $value]; $rows[] = new TableSeparator(); } array_pop($rows); $this->output->title(sprintf('%s (%s)', \get_class($options['type']), $options['option'])); - $this->output->table(array(), $rows); + $this->output->table([], $rows); } private function normalizeAndSortOptionsColumns(array $options) @@ -138,7 +138,7 @@ class TextDescriptor extends Descriptor } if (!$sorted) { - $options[$group] = array(); + $options[$group] = []; } else { $options[$group][] = null; } @@ -161,15 +161,15 @@ class TextDescriptor extends Descriptor private function getDumpFunction() { $cloner = new VarCloner(); - $cloner->addCasters(array('Closure' => function ($c, $a) { + $cloner->addCasters(['Closure' => function ($c, $a) { $prefix = Caster::PREFIX_VIRTUAL; - return array( + return [ $prefix.'parameters' => isset($a[$prefix.'parameters']) ? \count($a[$prefix.'parameters']->value) : 0, $prefix.'file' => $a[$prefix.'file'], $prefix.'line' => $a[$prefix.'line'], - ); - })); + ]; + }]); $dumper = new CliDumper(null, null, CliDumper::DUMP_LIGHT_ARRAY | CliDumper::DUMP_COMMA_SEPARATOR); $dumper->setColors($this->output->isDecorated()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/DependencyInjection/FormPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/DependencyInjection/FormPass.php index 778d2b9e..a398ad5f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/DependencyInjection/FormPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/DependencyInjection/FormPass.php @@ -51,7 +51,7 @@ class FormPass implements CompilerPassInterface } $definition = $container->getDefinition($this->formExtensionService); - if (new IteratorArgument(array()) != $definition->getArgument(2)) { + if (new IteratorArgument([]) != $definition->getArgument(2)) { return; } $definition->replaceArgument(0, $this->processFormTypes($container)); @@ -62,8 +62,8 @@ class FormPass implements CompilerPassInterface private function processFormTypes(ContainerBuilder $container) { // Get service locator argument - $servicesMap = array(); - $namespaces = array('Symfony\Component\Form\Extension\Core\Type' => true); + $servicesMap = []; + $namespaces = ['Symfony\Component\Form\Extension\Core\Type' => true]; // Builds an array with fully-qualified type class names as keys and service IDs as values foreach ($container->findTaggedServiceIds($this->formTypeTag, true) as $serviceId => $tag) { @@ -84,8 +84,8 @@ class FormPass implements CompilerPassInterface private function processFormTypeExtensions(ContainerBuilder $container) { - $typeExtensions = array(); - $typeExtensionsClasses = array(); + $typeExtensions = []; + $typeExtensionsClasses = []; foreach ($this->findAndSortTaggedServices($this->formTypeExtensionTag, $container) as $reference) { $serviceId = (string) $reference; $serviceDefinition = $container->getDefinition($serviceId); @@ -115,8 +115,8 @@ class FormPass implements CompilerPassInterface private function processFormTypeGuessers(ContainerBuilder $container) { - $guessers = array(); - $guessersClasses = array(); + $guessers = []; + $guessersClasses = []; foreach ($container->findTaggedServiceIds($this->formTypeGuesserTag, true) as $serviceId => $tags) { $guessers[] = new Reference($serviceId); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/CoreExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/CoreExtension.php index 5b01e9e9..4eb980bf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/CoreExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/CoreExtension.php @@ -41,7 +41,7 @@ class CoreExtension extends AbstractExtension protected function loadTypes() { - return array( + return [ new Type\FormType($this->propertyAccessor), new Type\BirthdayType(), new Type\CheckboxType(), @@ -76,13 +76,13 @@ class CoreExtension extends AbstractExtension new Type\CurrencyType(), new Type\TelType(), new Type\ColorType(), - ); + ]; } protected function loadTypeExtensions() { - return array( + return [ new TransformationFailureExtension($this->translator), - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/CheckboxListMapper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/CheckboxListMapper.php index 5e210102..ddc771fe 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/CheckboxListMapper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/CheckboxListMapper.php @@ -31,7 +31,7 @@ class CheckboxListMapper implements DataMapperInterface public function mapDataToForms($choices, $checkboxes) { if (null === $choices) { - $choices = array(); + $choices = []; } if (!\is_array($choices)) { @@ -53,7 +53,7 @@ class CheckboxListMapper implements DataMapperInterface throw new UnexpectedTypeException($choices, 'array'); } - $values = array(); + $values = []; foreach ($checkboxes as $checkbox) { if ($checkbox->getData()) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php index 9e86310b..92187d77 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php @@ -35,7 +35,7 @@ class PropertyPathMapper implements DataMapperInterface */ public function mapDataToForms($data, $forms) { - $empty = null === $data || array() === $data; + $empty = null === $data || [] === $data; if (!$empty && !\is_array($data) && !\is_object($data)) { throw new UnexpectedTypeException($data, 'object, array or empty'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php index b09fba85..2879dffd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php @@ -29,14 +29,14 @@ class ArrayToPartsTransformer implements DataTransformerInterface public function transform($array) { if (null === $array) { - $array = array(); + $array = []; } if (!\is_array($array)) { throw new TransformationFailedException('Expected an array.'); } - $result = array(); + $result = []; foreach ($this->partMapping as $partKey => $originalKeys) { if (empty($array)) { @@ -55,8 +55,8 @@ class ArrayToPartsTransformer implements DataTransformerInterface throw new TransformationFailedException('Expected an array.'); } - $result = array(); - $emptyKeys = array(); + $result = []; + $emptyKeys = []; foreach ($this->partMapping as $partKey => $originalKeys) { if (!empty($array[$partKey])) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/BaseDateTimeTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/BaseDateTimeTransformer.php index 46265828..845ba88f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/BaseDateTimeTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/BaseDateTimeTransformer.php @@ -17,13 +17,13 @@ use Symfony\Component\Form\Exception\UnexpectedTypeException; abstract class BaseDateTimeTransformer implements DataTransformerInterface { - protected static $formats = array( + protected static $formats = [ \IntlDateFormatter::NONE, \IntlDateFormatter::FULL, \IntlDateFormatter::LONG, \IntlDateFormatter::MEDIUM, \IntlDateFormatter::SHORT, - ); + ]; protected $inputTimezone; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php index 1154ad08..fae30857 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php @@ -29,7 +29,7 @@ class ChoiceToValueTransformer implements DataTransformerInterface public function transform($choice) { - return (string) current($this->choiceList->getValuesForChoices(array($choice))); + return (string) current($this->choiceList->getValuesForChoices([$choice])); } public function reverseTransform($value) @@ -38,7 +38,7 @@ class ChoiceToValueTransformer implements DataTransformerInterface throw new TransformationFailedException('Expected a string or null.'); } - $choices = $this->choiceList->getChoicesForValues(array((string) $value)); + $choices = $this->choiceList->getChoicesForValues([(string) $value]); if (1 !== \count($choices)) { if (null === $value || '' === $value) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php index 835d51cd..ac2108f0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php @@ -35,7 +35,7 @@ class ChoicesToValuesTransformer implements DataTransformerInterface public function transform($array) { if (null === $array) { - return array(); + return []; } if (!\is_array($array)) { @@ -55,7 +55,7 @@ class ChoicesToValuesTransformer implements DataTransformerInterface public function reverseTransform($array) { if (null === $array) { - return array(); + return []; } if (!\is_array($array)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateIntervalToArrayTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateIntervalToArrayTransformer.php index e194ec4f..7cf2de51 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateIntervalToArrayTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateIntervalToArrayTransformer.php @@ -30,7 +30,7 @@ class DateIntervalToArrayTransformer implements DataTransformerInterface const SECONDS = 'seconds'; const INVERT = 'invert'; - private static $availableFields = array( + private static $availableFields = [ self::YEARS => 'y', self::MONTHS => 'm', self::DAYS => 'd', @@ -38,7 +38,7 @@ class DateIntervalToArrayTransformer implements DataTransformerInterface self::MINUTES => 'i', self::SECONDS => 's', self::INVERT => 'r', - ); + ]; private $fields; private $pad; @@ -49,7 +49,7 @@ class DateIntervalToArrayTransformer implements DataTransformerInterface public function __construct(array $fields = null, $pad = false) { if (null === $fields) { - $fields = array('years', 'months', 'days', 'hours', 'minutes', 'seconds', 'invert'); + $fields = ['years', 'months', 'days', 'hours', 'minutes', 'seconds', 'invert']; } $this->fields = $fields; $this->pad = (bool) $pad; @@ -68,7 +68,7 @@ class DateIntervalToArrayTransformer implements DataTransformerInterface { if (null === $dateInterval) { return array_intersect_key( - array( + [ 'years' => '', 'months' => '', 'weeks' => '', @@ -77,14 +77,14 @@ class DateIntervalToArrayTransformer implements DataTransformerInterface 'minutes' => '', 'seconds' => '', 'invert' => false, - ), + ], array_flip($this->fields) ); } if (!$dateInterval instanceof \DateInterval) { throw new UnexpectedTypeException($dateInterval, '\DateInterval'); } - $result = array(); + $result = []; foreach (self::$availableFields as $field => $char) { $result[$field] = $dateInterval->format('%'.($this->pad ? strtoupper($char) : $char)); } @@ -122,7 +122,7 @@ class DateIntervalToArrayTransformer implements DataTransformerInterface if ('' === implode('', $value)) { return; } - $emptyFields = array(); + $emptyFields = []; foreach ($this->fields as $field) { if (!isset($value[$field])) { $emptyFields[] = $field; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php index 28b19547..5249ed30 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php @@ -39,7 +39,7 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer parent::__construct($inputTimezone, $outputTimezone); if (null === $fields) { - $fields = array('year', 'month', 'day', 'hour', 'minute', 'second'); + $fields = ['year', 'month', 'day', 'hour', 'minute', 'second']; } $this->fields = $fields; @@ -58,14 +58,14 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer public function transform($dateTime) { if (null === $dateTime) { - return array_intersect_key(array( + return array_intersect_key([ 'year' => '', 'month' => '', 'day' => '', 'hour' => '', 'minute' => '', 'second' => '', - ), array_flip($this->fields)); + ], array_flip($this->fields)); } if (!$dateTime instanceof \DateTimeInterface) { @@ -80,14 +80,14 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer $dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); } - $result = array_intersect_key(array( + $result = array_intersect_key([ 'year' => $dateTime->format('Y'), 'month' => $dateTime->format('m'), 'day' => $dateTime->format('d'), 'hour' => $dateTime->format('H'), 'minute' => $dateTime->format('i'), 'second' => $dateTime->format('s'), - ), array_flip($this->fields)); + ], array_flip($this->fields)); if (!$this->pad) { foreach ($result as &$entry) { @@ -125,7 +125,7 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer return; } - $emptyFields = array(); + $emptyFields = []; foreach ($this->fields as $field) { if (!isset($value[$field])) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php index cd3ac47b..32fa5d11 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php @@ -42,7 +42,7 @@ class DateTimeZoneToStringTransformer implements DataTransformerInterface throw new TransformationFailedException('Expected an array.'); } - return array_map(array(new self(), 'transform'), $dateTimeZone); + return array_map([new self(), 'transform'], $dateTimeZone); } if (!$dateTimeZone instanceof \DateTimeZone) { @@ -66,7 +66,7 @@ class DateTimeZoneToStringTransformer implements DataTransformerInterface throw new TransformationFailedException('Expected an array.'); } - return array_map(array(new self(), 'reverseTransform'), $value); + return array_map([new self(), 'reverseTransform'], $value); } if (!\is_string($value)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php index 999e4739..ca69b5fe 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Form\Extension\Core\DataTransformer; +use Symfony\Component\Form\Exception\TransformationFailedException; + /** * Transforms between an integer and a localized number with grouping * (each thousand) and comma separators. @@ -40,8 +42,22 @@ class IntegerToLocalizedStringTransformer extends NumberToLocalizedStringTransfo */ public function reverseTransform($value) { + $decimalSeparator = $this->getNumberFormatter()->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL); + + if (\is_string($value) && false !== strpos($value, $decimalSeparator)) { + throw new TransformationFailedException(sprintf('The value "%s" is not a valid integer.', $value)); + } + $result = parent::reverseTransform($value); return null !== $result ? (int) $result : null; } + + /** + * @internal + */ + protected function castParsedValue($value) + { + return $value; + } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php index 7449fedf..b163cc09 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php @@ -23,6 +23,12 @@ class MoneyToLocalizedStringTransformer extends NumberToLocalizedStringTransform { private $divisor; + /** + * @param int|null $scale + * @param bool|null $grouping + * @param int|null $roundingMode + * @param int|null $divisor + */ public function __construct($scale = 2, $grouping = true, $roundingMode = self::ROUND_HALF_UP, $divisor = 1) { if (null === $grouping) { @@ -58,7 +64,7 @@ class MoneyToLocalizedStringTransformer extends NumberToLocalizedStringTransform if (!is_numeric($value)) { throw new TransformationFailedException('Expected a numeric.'); } - $value = (string) ($value / $this->divisor); + $value /= $this->divisor; } return parent::transform($value); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php index 9e03606a..d720bb8e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php @@ -78,6 +78,11 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface private $scale; + /** + * @param int|null $scale + * @param bool|null $grouping + * @param int|null $roundingMode + */ public function __construct($scale = null, $grouping = false, $roundingMode = self::ROUND_HALF_UP) { if (null === $grouping) { @@ -121,7 +126,7 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface } // Convert non-breaking and narrow non-breaking spaces to normal ones - $value = str_replace(array("\xc2\xa0", "\xe2\x80\xaf"), ' ', $value); + $value = str_replace(["\xc2\xa0", "\xe2\x80\xaf"], ' ', $value); return $value; } @@ -146,7 +151,7 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface return; } - if ('NaN' === $value) { + if (\in_array($value, ['NaN', 'NAN', 'nan'], true)) { throw new TransformationFailedException('"NaN" is not a valid number'); } @@ -181,9 +186,7 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface throw new TransformationFailedException('I don\'t have a clear idea what infinity looks like'); } - if (\is_int($result) && $result === (int) $float = (float) $result) { - $result = $float; - } + $result = $this->castParsedValue($result); if (false !== $encoding = mb_detect_encoding($value, null, true)) { $length = mb_strlen($value, $encoding); @@ -228,6 +231,18 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface return $formatter; } + /** + * @internal + */ + protected function castParsedValue($value) + { + if (\is_int($value) && $value === (int) $float = (float) $value) { + return $float; + } + + return $value; + } + /** * Rounds a number according to the configured scale and rounding mode. * diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php index 170c2b3d..b01a8d20 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php @@ -26,10 +26,10 @@ class PercentToLocalizedStringTransformer implements DataTransformerInterface const FRACTIONAL = 'fractional'; const INTEGER = 'integer'; - protected static $types = array( + protected static $types = [ self::FRACTIONAL, self::INTEGER, - ); + ]; private $type; private $scale; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php index 49032a67..72e34f45 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php @@ -35,7 +35,7 @@ class ValueToDuplicatesTransformer implements DataTransformerInterface */ public function transform($value) { - $result = array(); + $result = []; foreach ($this->keys as $key) { $result[$key] = $value; @@ -59,10 +59,10 @@ class ValueToDuplicatesTransformer implements DataTransformerInterface } $result = current($array); - $emptyKeys = array(); + $emptyKeys = []; foreach ($this->keys as $key) { - if (isset($array[$key]) && '' !== $array[$key] && false !== $array[$key] && array() !== $array[$key]) { + if (isset($array[$key]) && '' !== $array[$key] && false !== $array[$key] && [] !== $array[$key]) { if ($array[$key] !== $result) { throw new TransformationFailedException('All values in the array should be the same'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php index 2ad44cab..8af36f6b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php @@ -43,6 +43,6 @@ class FixUrlProtocolListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array(FormEvents::SUBMIT => 'onSubmit'); + return [FormEvents::SUBMIT => 'onSubmit']; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php index f8405e1a..71f47ae9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php @@ -36,9 +36,9 @@ class MergeCollectionListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( + return [ FormEvents::SUBMIT => 'onSubmit', - ); + ]; } public function onSubmit(FormEvent $event) @@ -47,7 +47,7 @@ class MergeCollectionListener implements EventSubscriberInterface $data = $event->getData(); if (null === $data) { - $data = array(); + $data = []; } if (!\is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) { @@ -73,7 +73,7 @@ class MergeCollectionListener implements EventSubscriberInterface } else { // Calculate delta $itemsToAdd = \is_object($data) ? clone $data : $data; - $itemsToDelete = array(); + $itemsToDelete = []; foreach ($dataToMergeInto as $beforeKey => $beforeItem) { foreach ($data as $afterKey => $afterItem) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php index 3ef78741..23bdbef3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php @@ -38,7 +38,7 @@ class ResizeFormListener implements EventSubscriberInterface * @param bool $allowDelete Whether children could be removed from the group * @param bool|callable $deleteEmpty */ - public function __construct($type, array $options = array(), $allowAdd = false, $allowDelete = false, $deleteEmpty = false) + public function __construct($type, array $options = [], $allowAdd = false, $allowDelete = false, $deleteEmpty = false) { $this->type = $type; $this->allowAdd = $allowAdd; @@ -49,12 +49,12 @@ class ResizeFormListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( + return [ FormEvents::PRE_SET_DATA => 'preSetData', FormEvents::PRE_SUBMIT => 'preSubmit', // (MergeCollectionListener, MergeDoctrineCollectionListener) - FormEvents::SUBMIT => array('onSubmit', 50), - ); + FormEvents::SUBMIT => ['onSubmit', 50], + ]; } public function preSetData(FormEvent $event) @@ -63,7 +63,7 @@ class ResizeFormListener implements EventSubscriberInterface $data = $event->getData(); if (null === $data) { - $data = array(); + $data = []; } if (!\is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) { @@ -77,9 +77,9 @@ class ResizeFormListener implements EventSubscriberInterface // Then add all rows again in the correct order foreach ($data as $name => $value) { - $form->add($name, $this->type, array_replace(array( + $form->add($name, $this->type, array_replace([ 'property_path' => '['.$name.']', - ), $this->options)); + ], $this->options)); } } @@ -93,7 +93,7 @@ class ResizeFormListener implements EventSubscriberInterface } if (!\is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) { - $data = array(); + $data = []; } // Remove all empty rows @@ -109,9 +109,9 @@ class ResizeFormListener implements EventSubscriberInterface if ($this->allowAdd) { foreach ($data as $name => $value) { if (!$form->has($name)) { - $form->add($name, $this->type, array_replace(array( + $form->add($name, $this->type, array_replace([ 'property_path' => '['.$name.']', - ), $this->options)); + ], $this->options)); } } } @@ -127,7 +127,7 @@ class ResizeFormListener implements EventSubscriberInterface // entries, so we need to manually unset removed entries in the collection. if (null === $data) { - $data = array(); + $data = []; } if (!\is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) { @@ -153,7 +153,7 @@ class ResizeFormListener implements EventSubscriberInterface // The data mapper only adds, but does not remove items, so do this // here if ($this->allowDelete) { - $toDelete = array(); + $toDelete = []; foreach ($data as $name => $child) { if (!$form->has($name)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/TransformationFailureListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/TransformationFailureListener.php index f46eb499..835a0283 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/TransformationFailureListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/TransformationFailureListener.php @@ -31,9 +31,9 @@ class TransformationFailureListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( - FormEvents::POST_SUBMIT => array('convertTransformationFailureToFormError', -1024), - ); + return [ + FormEvents::POST_SUBMIT => ['convertTransformationFailureToFormError', -1024], + ]; } public function convertTransformationFailureToFormError(FormEvent $event) @@ -54,11 +54,11 @@ class TransformationFailureListener implements EventSubscriberInterface $messageTemplate = 'The value {{ value }} is not valid.'; if (null !== $this->translator) { - $message = $this->translator->trans($messageTemplate, array('{{ value }}' => $clientDataAsString)); + $message = $this->translator->trans($messageTemplate, ['{{ value }}' => $clientDataAsString]); } else { - $message = strtr($messageTemplate, array('{{ value }}' => $clientDataAsString)); + $message = strtr($messageTemplate, ['{{ value }}' => $clientDataAsString]); } - $form->addError(new FormError($message, $messageTemplate, array('{{ value }}' => $clientDataAsString), null, $form->getTransformationFailure())); + $form->addError(new FormError($message, $messageTemplate, ['{{ value }}' => $clientDataAsString], null, $form->getTransformationFailure())); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php index 59f1a242..be8c38a8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php @@ -36,6 +36,6 @@ class TrimListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array(FormEvents::PRE_SUBMIT => 'preSubmit'); + return [FormEvents::PRE_SUBMIT => 'preSubmit']; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php index d68337e3..32825ab7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php @@ -75,13 +75,13 @@ abstract class BaseType extends AbstractType $id = ltrim($id, '_0123456789'); } - $blockPrefixes = array(); + $blockPrefixes = []; for ($type = $form->getConfig()->getType(); null !== $type; $type = $type->getParent()) { array_unshift($blockPrefixes, $type->getBlockPrefix()); } $blockPrefixes[] = $uniqueBlockPrefix; - $view->vars = array_replace($view->vars, array( + $view->vars = array_replace($view->vars, [ 'form' => $view, 'id' => $id, 'name' => $name, @@ -101,7 +101,7 @@ abstract class BaseType extends AbstractType // be rendered differently. // https://github.com/symfony/symfony/issues/5038 'cache_key' => $uniqueBlockPrefix.'_'.$form->getConfig()->getType()->getBlockPrefix(), - )); + ]); } /** @@ -109,15 +109,15 @@ abstract class BaseType extends AbstractType */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ 'block_name' => null, 'disabled' => false, 'label' => null, 'label_format' => null, - 'attr' => array(), + 'attr' => [], 'translation_domain' => null, 'auto_initialize' => true, - )); + ]); $resolver->setAllowedTypes('attr', 'array'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/ButtonType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/ButtonType.php index 3a62eb8a..2b60f4f3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/ButtonType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/ButtonType.php @@ -43,8 +43,8 @@ class ButtonType extends BaseType implements ButtonTypeInterface { parent::configureOptions($resolver); - $resolver->setDefaults(array( + $resolver->setDefaults([ 'auto_initialize' => false, - )); + ]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php index 1661caa0..19ff62c1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php @@ -40,10 +40,10 @@ class CheckboxType extends AbstractType */ public function buildView(FormView $view, FormInterface $form, array $options) { - $view->vars = array_replace($view->vars, array( + $view->vars = array_replace($view->vars, [ 'value' => $options['value'], 'checked' => null !== $form->getViewData(), - )); + ]); } /** @@ -55,11 +55,11 @@ class CheckboxType extends AbstractType return $viewData; }; - $resolver->setDefaults(array( + $resolver->setDefaults([ 'value' => '1', 'empty_data' => $emptyData, 'compound' => false, - )); + ]); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php index a7e8025a..28320ca3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php @@ -70,7 +70,7 @@ class ChoiceType extends AbstractType // Check if the choices already contain the empty value // Only add the placeholder option if this is not the case - if (null !== $options['placeholder'] && 0 === \count($choiceList->getChoicesForValues(array('')))) { + if (null !== $options['placeholder'] && 0 === \count($choiceList->getChoicesForValues(['']))) { $placeholderView = new ChoiceView(null, '', $options['placeholder']); // "placeholder" is a reserved name @@ -108,7 +108,7 @@ class ChoiceType extends AbstractType $unknownValues = $valueMap; // Reconstruct the data as mapping from child names to values - $data = array(); + $data = []; /** @var FormInterface $child */ foreach ($form as $child) { @@ -184,7 +184,7 @@ class ChoiceType extends AbstractType ? $form->getConfig()->getAttribute('choice_list_view') : $this->createChoiceListView($choiceList, $options); - $view->vars = array_replace($view->vars, array( + $view->vars = array_replace($view->vars, [ 'multiple' => $options['multiple'], 'expanded' => $options['expanded'], 'preferred_choices' => $choiceListView->preferredChoices, @@ -192,7 +192,7 @@ class ChoiceType extends AbstractType 'separator' => '-------------------', 'placeholder' => null, 'choice_translation_domain' => $choiceTranslationDomain, - )); + ]); // The decision, whether a choice is selected, is potentially done // thousand of times during the rendering of a template. Provide a @@ -255,7 +255,7 @@ class ChoiceType extends AbstractType } if ($options['multiple']) { - return array(); + return []; } return ''; @@ -312,17 +312,17 @@ class ChoiceType extends AbstractType return $choiceTranslationDomain; }; - $resolver->setDefaults(array( + $resolver->setDefaults([ 'multiple' => false, 'expanded' => false, - 'choices' => array(), + 'choices' => [], 'choices_as_values' => null, // deprecated since 3.1 'choice_loader' => null, 'choice_label' => null, 'choice_name' => null, 'choice_value' => null, 'choice_attr' => null, - 'preferred_choices' => array(), + 'preferred_choices' => [], 'group_by' => null, 'empty_data' => $emptyData, 'placeholder' => $placeholderDefault, @@ -334,21 +334,21 @@ class ChoiceType extends AbstractType 'data_class' => null, 'choice_translation_domain' => true, 'trim' => false, - )); + ]); $resolver->setNormalizer('placeholder', $placeholderNormalizer); $resolver->setNormalizer('choice_translation_domain', $choiceTranslationDomainNormalizer); $resolver->setNormalizer('choices_as_values', $choicesAsValuesNormalizer); - $resolver->setAllowedTypes('choices', array('null', 'array', '\Traversable')); - $resolver->setAllowedTypes('choice_translation_domain', array('null', 'bool', 'string')); - $resolver->setAllowedTypes('choice_loader', array('null', 'Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface')); - $resolver->setAllowedTypes('choice_label', array('null', 'bool', 'callable', 'string', 'Symfony\Component\PropertyAccess\PropertyPath')); - $resolver->setAllowedTypes('choice_name', array('null', 'callable', 'string', 'Symfony\Component\PropertyAccess\PropertyPath')); - $resolver->setAllowedTypes('choice_value', array('null', 'callable', 'string', 'Symfony\Component\PropertyAccess\PropertyPath')); - $resolver->setAllowedTypes('choice_attr', array('null', 'array', 'callable', 'string', 'Symfony\Component\PropertyAccess\PropertyPath')); - $resolver->setAllowedTypes('preferred_choices', array('array', '\Traversable', 'callable', 'string', 'Symfony\Component\PropertyAccess\PropertyPath')); - $resolver->setAllowedTypes('group_by', array('null', 'callable', 'string', 'Symfony\Component\PropertyAccess\PropertyPath')); + $resolver->setAllowedTypes('choices', ['null', 'array', '\Traversable']); + $resolver->setAllowedTypes('choice_translation_domain', ['null', 'bool', 'string']); + $resolver->setAllowedTypes('choice_loader', ['null', 'Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface']); + $resolver->setAllowedTypes('choice_label', ['null', 'bool', 'callable', 'string', 'Symfony\Component\PropertyAccess\PropertyPath']); + $resolver->setAllowedTypes('choice_name', ['null', 'callable', 'string', 'Symfony\Component\PropertyAccess\PropertyPath']); + $resolver->setAllowedTypes('choice_value', ['null', 'callable', 'string', 'Symfony\Component\PropertyAccess\PropertyPath']); + $resolver->setAllowedTypes('choice_attr', ['null', 'array', 'callable', 'string', 'Symfony\Component\PropertyAccess\PropertyPath']); + $resolver->setAllowedTypes('preferred_choices', ['array', '\Traversable', 'callable', 'string', 'Symfony\Component\PropertyAccess\PropertyPath']); + $resolver->setAllowedTypes('group_by', ['null', 'callable', 'string', 'Symfony\Component\PropertyAccess\PropertyPath']); } /** @@ -385,18 +385,18 @@ class ChoiceType extends AbstractType */ private function addSubForm(FormBuilderInterface $builder, $name, ChoiceView $choiceView, array $options) { - $choiceOpts = array( + $choiceOpts = [ 'value' => $choiceView->value, 'label' => $choiceView->label, 'attr' => $choiceView->attr, 'translation_domain' => $options['translation_domain'], 'block_name' => 'entry', - ); + ]; if ($options['multiple']) { $choiceType = __NAMESPACE__.'\CheckboxType'; // The user can check 0 or more checkboxes. If required - // is true, he is required to check all of them. + // is true, they are required to check all of them. $choiceOpts['required'] = false; } else { $choiceType = __NAMESPACE__.'\RadioType'; @@ -415,7 +415,7 @@ class ChoiceType extends AbstractType } // Harden against NULL values (like in EntityType and ModelType) - $choices = null !== $options['choices'] ? $options['choices'] : array(); + $choices = null !== $options['choices'] ? $options['choices'] : []; return $this->choiceListFactory->createListFromChoices($choices, $options['choice_value']); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php index 1cdc9901..fc36cca6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php @@ -27,10 +27,10 @@ class CollectionType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { if ($options['allow_add'] && $options['prototype']) { - $prototypeOptions = array_replace(array( + $prototypeOptions = array_replace([ 'required' => $options['required'], 'label' => $options['prototype_name'].'label__', - ), $options['entry_options']); + ], $options['entry_options']); if (null !== $options['prototype_data']) { $prototypeOptions['data'] = $options['prototype_data']; @@ -56,10 +56,10 @@ class CollectionType extends AbstractType */ public function buildView(FormView $view, FormInterface $form, array $options) { - $view->vars = array_replace($view->vars, array( + $view->vars = array_replace($view->vars, [ 'allow_add' => $options['allow_add'], 'allow_delete' => $options['allow_delete'], - )); + ]); if ($form->getConfig()->hasAttribute('prototype')) { $prototype = $form->getConfig()->getAttribute('prototype'); @@ -88,19 +88,19 @@ class CollectionType extends AbstractType return $value; }; - $resolver->setDefaults(array( + $resolver->setDefaults([ 'allow_add' => false, 'allow_delete' => false, 'prototype' => true, 'prototype_data' => null, 'prototype_name' => '__name__', 'entry_type' => __NAMESPACE__.'\TextType', - 'entry_options' => array(), + 'entry_options' => [], 'delete_empty' => false, - )); + ]); $resolver->setNormalizer('entry_options', $entryOptionsNormalizer); - $resolver->setAllowedTypes('delete_empty', array('bool', 'callable')); + $resolver->setAllowedTypes('delete_empty', ['bool', 'callable']); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/CountryType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/CountryType.php index 5032ef4b..c5b6b0dc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/CountryType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/CountryType.php @@ -36,7 +36,7 @@ class CountryType extends AbstractType implements ChoiceLoaderInterface */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ 'choice_loader' => function (Options $options) { if ($options['choices']) { @trigger_error(sprintf('Using the "choices" option in %s has been deprecated since Symfony 3.3 and will be ignored in 4.0. Override the "choice_loader" option instead or set it to null.', __CLASS__), E_USER_DEPRECATED); @@ -47,7 +47,7 @@ class CountryType extends AbstractType implements ChoiceLoaderInterface return $this; }, 'choice_translation_domain' => false, - )); + ]); } /** @@ -86,12 +86,7 @@ class CountryType extends AbstractType implements ChoiceLoaderInterface // Optimize $values = array_filter($values); if (empty($values)) { - return array(); - } - - // If no callable is set, values are the same as choices - if (null === $value) { - return $values; + return []; } return $this->loadChoiceList($value)->getChoicesForValues($values); @@ -105,7 +100,7 @@ class CountryType extends AbstractType implements ChoiceLoaderInterface // Optimize $choices = array_filter($choices); if (empty($choices)) { - return array(); + return []; } // If no callable is set, choices are the same as values diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php index e4fd0622..638c2e1a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php @@ -36,7 +36,7 @@ class CurrencyType extends AbstractType implements ChoiceLoaderInterface */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ 'choice_loader' => function (Options $options) { if ($options['choices']) { @trigger_error(sprintf('Using the "choices" option in %s has been deprecated since Symfony 3.3 and will be ignored in 4.0. Override the "choice_loader" option instead or set it to null.', __CLASS__), E_USER_DEPRECATED); @@ -47,7 +47,7 @@ class CurrencyType extends AbstractType implements ChoiceLoaderInterface return $this; }, 'choice_translation_domain' => false, - )); + ]); } /** @@ -86,12 +86,7 @@ class CurrencyType extends AbstractType implements ChoiceLoaderInterface // Optimize $values = array_filter($values); if (empty($values)) { - return array(); - } - - // If no callable is set, values are the same as choices - if (null === $value) { - return $values; + return []; } return $this->loadChoiceList($value)->getChoicesForValues($values); @@ -105,7 +100,7 @@ class CurrencyType extends AbstractType implements ChoiceLoaderInterface // Optimize $choices = array_filter($choices); if (empty($choices)) { - return array(); + return []; } // If no callable is set, choices are the same as values diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php index 29e122a7..181ce749 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php @@ -28,7 +28,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; */ class DateIntervalType extends AbstractType { - private $timeParts = array( + private $timeParts = [ 'years', 'months', 'weeks', @@ -36,12 +36,12 @@ class DateIntervalType extends AbstractType 'hours', 'minutes', 'seconds', - ); - private static $widgets = array( + ]; + private static $widgets = [ 'text' => TextType::class, 'integer' => IntegerType::class, 'choice' => ChoiceType::class, - ); + ]; /** * {@inheritdoc} @@ -58,7 +58,7 @@ class DateIntervalType extends AbstractType throw new InvalidConfigurationException('You can not enable weeks and days fields together.'); } $format = 'P'; - $parts = array(); + $parts = []; if ($options['with_years']) { $format .= '%yY'; $parts[] = 'years'; @@ -98,7 +98,7 @@ class DateIntervalType extends AbstractType } else { foreach ($this->timeParts as $part) { if ($options['with_'.$part]) { - $childOptions = array( + $childOptions = [ 'error_bubbling' => true, 'label' => $options['labels'][$part], // Append generic carry-along options @@ -106,7 +106,7 @@ class DateIntervalType extends AbstractType 'translation_domain' => $options['translation_domain'], // when compound the array entries are ignored, we need to cascade the configuration here 'empty_data' => isset($options['empty_data'][$part]) ? $options['empty_data'][$part] : null, - ); + ]; if ('choice' === $options['widget']) { $childOptions['choice_translation_domain'] = false; $childOptions['choices'] = $options[$part]; @@ -124,12 +124,12 @@ class DateIntervalType extends AbstractType } } if ($options['with_invert']) { - $builder->add('invert', CheckboxType::class, array( + $builder->add('invert', CheckboxType::class, [ 'label' => $options['labels']['invert'], 'error_bubbling' => true, 'required' => false, 'translation_domain' => $options['translation_domain'], - )); + ]); } $builder->addViewTransformer(new DateIntervalToArrayTransformer($parts, 'text' === $options['widget'])); } @@ -153,10 +153,10 @@ class DateIntervalType extends AbstractType */ public function buildView(FormView $view, FormInterface $form, array $options) { - $vars = array( + $vars = [ 'widget' => $options['widget'], 'with_invert' => $options['with_invert'], - ); + ]; foreach ($this->timeParts as $part) { $vars['with_'.$part] = $options['with_'.$part]; } @@ -173,7 +173,7 @@ class DateIntervalType extends AbstractType return 'single_text' !== $options['widget']; }; $emptyData = function (Options $options) { - return 'single_text' === $options['widget'] ? '' : array(); + return 'single_text' === $options['widget'] ? '' : []; }; $placeholderDefault = function (Options $options) { @@ -191,7 +191,7 @@ class DateIntervalType extends AbstractType }; $labelsNormalizer = function (Options $options, array $labels) { - return array_replace(array( + return array_replace([ 'years' => null, 'months' => null, 'days' => null, @@ -200,13 +200,13 @@ class DateIntervalType extends AbstractType 'minutes' => null, 'seconds' => null, 'invert' => 'Negative interval', - ), array_filter($labels, function ($label) { + ], array_filter($labels, function ($label) { return null !== $label; })); }; $resolver->setDefaults( - array( + [ 'with_years' => true, 'with_months' => true, 'with_days' => true, @@ -234,28 +234,28 @@ class DateIntervalType extends AbstractType 'data_class' => null, 'compound' => $compound, 'empty_data' => $emptyData, - 'labels' => array(), - ) + 'labels' => [], + ] ); $resolver->setNormalizer('placeholder', $placeholderNormalizer); $resolver->setNormalizer('labels', $labelsNormalizer); $resolver->setAllowedValues( 'input', - array( + [ 'dateinterval', 'string', 'array', - ) + ] ); $resolver->setAllowedValues( 'widget', - array( + [ 'single_text', 'text', 'integer', 'choice', - ) + ] ); // Don't clone \DateInterval classes, as i.e. format() // does not work after that diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php index 56d895cf..04b0221f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php @@ -38,21 +38,21 @@ class DateTimeType extends AbstractType */ const HTML5_FORMAT = "yyyy-MM-dd'T'HH:mm:ss"; - private static $acceptedFormats = array( + private static $acceptedFormats = [ \IntlDateFormatter::FULL, \IntlDateFormatter::LONG, \IntlDateFormatter::MEDIUM, \IntlDateFormatter::SHORT, - ); + ]; /** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { - $parts = array('year', 'month', 'day', 'hour'); - $dateParts = array('year', 'month', 'day'); - $timeParts = array('hour'); + $parts = ['year', 'month', 'day', 'hour']; + $dateParts = ['year', 'month', 'day']; + $timeParts = ['hour']; if ($options['with_minutes']) { $parts[] = 'minute'; @@ -92,9 +92,9 @@ class DateTimeType extends AbstractType } else { // when the form is compound the entries of the array are ignored in favor of children data // so we need to handle the cascade setting here - $emptyData = $builder->getEmptyData() ?: array(); + $emptyData = $builder->getEmptyData() ?: []; // Only pass a subset of the options to children - $dateOptions = array_intersect_key($options, array_flip(array( + $dateOptions = array_intersect_key($options, array_flip([ 'years', 'months', 'days', @@ -105,13 +105,13 @@ class DateTimeType extends AbstractType 'html5', 'invalid_message', 'invalid_message_parameters', - ))); + ])); if (isset($emptyData['date'])) { $dateOptions['empty_data'] = $emptyData['date']; } - $timeOptions = array_intersect_key($options, array_flip(array( + $timeOptions = array_intersect_key($options, array_flip([ 'hours', 'minutes', 'seconds', @@ -124,7 +124,7 @@ class DateTimeType extends AbstractType 'html5', 'invalid_message', 'invalid_message_parameters', - ))); + ])); if (isset($emptyData['time'])) { $timeOptions['empty_data'] = $emptyData['time']; @@ -151,13 +151,13 @@ class DateTimeType extends AbstractType $dateOptions['error_bubbling'] = $timeOptions['error_bubbling'] = true; $builder - ->addViewTransformer(new DataTransformerChain(array( + ->addViewTransformer(new DataTransformerChain([ new DateTimeToArrayTransformer($options['model_timezone'], $options['view_timezone'], $parts), - new ArrayToPartsTransformer(array( + new ArrayToPartsTransformer([ 'date' => $dateParts, 'time' => $timeParts, - )), - ))) + ]), + ])) ->add('date', __NAMESPACE__.'\DateType', $dateOptions) ->add('time', __NAMESPACE__.'\TimeType', $timeOptions) ; @@ -213,7 +213,7 @@ class DateTimeType extends AbstractType return $options['widget']; }; - $resolver->setDefaults(array( + $resolver->setDefaults([ 'input' => 'datetime', 'model_timezone' => null, 'view_timezone' => null, @@ -236,13 +236,13 @@ class DateTimeType extends AbstractType 'data_class' => null, 'compound' => $compound, 'empty_data' => function (Options $options) { - return $options['compound'] ? array() : ''; + return $options['compound'] ? [] : ''; }, - )); + ]); // Don't add some defaults in order to preserve the defaults // set in DateType and TimeType - $resolver->setDefined(array( + $resolver->setDefined([ 'placeholder', 'choice_translation_domain', 'years', @@ -251,33 +251,33 @@ class DateTimeType extends AbstractType 'hours', 'minutes', 'seconds', - )); + ]); - $resolver->setAllowedValues('input', array( + $resolver->setAllowedValues('input', [ 'datetime', 'string', 'timestamp', 'array', - )); - $resolver->setAllowedValues('date_widget', array( + ]); + $resolver->setAllowedValues('date_widget', [ null, // inherit default from DateType 'single_text', 'text', 'choice', - )); - $resolver->setAllowedValues('time_widget', array( + ]); + $resolver->setAllowedValues('time_widget', [ null, // inherit default from TimeType 'single_text', 'text', 'choice', - )); + ]); // This option will overwrite "date_widget" and "time_widget" options - $resolver->setAllowedValues('widget', array( + $resolver->setAllowedValues('widget', [ null, // default, don't overwrite options 'single_text', 'text', 'choice', - )); + ]); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/DateType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/DateType.php index 7384921a..09f5e1de 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/DateType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/DateType.php @@ -29,17 +29,17 @@ class DateType extends AbstractType const DEFAULT_FORMAT = \IntlDateFormatter::MEDIUM; const HTML5_FORMAT = 'yyyy-MM-dd'; - private static $acceptedFormats = array( + private static $acceptedFormats = [ \IntlDateFormatter::FULL, \IntlDateFormatter::LONG, \IntlDateFormatter::MEDIUM, \IntlDateFormatter::SHORT, - ); + ]; - private static $widgets = array( + private static $widgets = [ 'text' => 'Symfony\Component\Form\Extension\Core\Type\TextType', 'choice' => 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', - ); + ]; /** * {@inheritdoc} @@ -73,13 +73,13 @@ class DateType extends AbstractType throw new InvalidOptionsException(sprintf('The "format" option should contain the letters "y", "M" and "d". Its current value is "%s".', $pattern)); } - $yearOptions = $monthOptions = $dayOptions = array( + $yearOptions = $monthOptions = $dayOptions = [ 'error_bubbling' => true, 'empty_data' => '', - ); + ]; // when the form is compound the entries of the array are ignored in favor of children data // so we need to handle the cascade setting here - $emptyData = $builder->getEmptyData() ?: array(); + $emptyData = $builder->getEmptyData() ?: []; if (isset($emptyData['year'])) { $yearOptions['empty_data'] = $emptyData['year']; @@ -134,7 +134,7 @@ class DateType extends AbstractType } // Append generic carry-along options - foreach (array('required', 'translation_domain') as $passOpt) { + foreach (['required', 'translation_domain'] as $passOpt) { $yearOptions[$passOpt] = $monthOptions[$passOpt] = $dayOptions[$passOpt] = $options[$passOpt]; } @@ -143,7 +143,7 @@ class DateType extends AbstractType ->add('month', self::$widgets[$options['widget']], $monthOptions) ->add('day', self::$widgets[$options['widget']], $dayOptions) ->addViewTransformer(new DateTimeToArrayTransformer( - $options['model_timezone'], $options['view_timezone'], array('year', 'month', 'day') + $options['model_timezone'], $options['view_timezone'], ['year', 'month', 'day'] )) ->setAttribute('formatter', $formatter) ; @@ -159,7 +159,7 @@ class DateType extends AbstractType )); } elseif ('array' === $options['input']) { $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToArrayTransformer($options['model_timezone'], $options['model_timezone'], array('year', 'month', 'day')) + new DateTimeToArrayTransformer($options['model_timezone'], $options['model_timezone'], ['year', 'month', 'day']) )); } } @@ -194,7 +194,7 @@ class DateType extends AbstractType // set right order with respect to locale (e.g.: de_DE=dd.MM.yy; en_US=M/d/yy) // lookup various formats at http://userguide.icu-project.org/formatparse/datetime if (preg_match('/^([yMd]+)[^yMd]*([yMd]+)[^yMd]*([yMd]+)$/', $pattern)) { - $pattern = preg_replace(array('/y+/', '/M+/', '/d+/'), array('{{ year }}', '{{ month }}', '{{ day }}'), $pattern); + $pattern = preg_replace(['/y+/', '/M+/', '/d+/'], ['{{ year }}', '{{ month }}', '{{ day }}'], $pattern); } else { // default fallback $pattern = '{{ year }}{{ month }}{{ day }}'; @@ -222,16 +222,16 @@ class DateType extends AbstractType $default = $placeholderDefault($options); return array_merge( - array('year' => $default, 'month' => $default, 'day' => $default), + ['year' => $default, 'month' => $default, 'day' => $default], $placeholder ); } - return array( + return [ 'year' => $placeholder, 'month' => $placeholder, 'day' => $placeholder, - ); + ]; }; $choiceTranslationDomainNormalizer = function (Options $options, $choiceTranslationDomain) { @@ -239,23 +239,23 @@ class DateType extends AbstractType $default = false; return array_replace( - array('year' => $default, 'month' => $default, 'day' => $default), + ['year' => $default, 'month' => $default, 'day' => $default], $choiceTranslationDomain ); } - return array( + return [ 'year' => $choiceTranslationDomain, 'month' => $choiceTranslationDomain, 'day' => $choiceTranslationDomain, - ); + ]; }; $format = function (Options $options) { - return 'single_text' === $options['widget'] ? DateType::HTML5_FORMAT : DateType::DEFAULT_FORMAT; + return 'single_text' === $options['widget'] ? self::HTML5_FORMAT : self::DEFAULT_FORMAT; }; - $resolver->setDefaults(array( + $resolver->setDefaults([ 'years' => range(date('Y') - 5, date('Y') + 5), 'months' => range(1, 12), 'days' => range(1, 31), @@ -277,27 +277,27 @@ class DateType extends AbstractType 'data_class' => null, 'compound' => $compound, 'empty_data' => function (Options $options) { - return $options['compound'] ? array() : ''; + return $options['compound'] ? [] : ''; }, 'choice_translation_domain' => false, - )); + ]); $resolver->setNormalizer('placeholder', $placeholderNormalizer); $resolver->setNormalizer('choice_translation_domain', $choiceTranslationDomainNormalizer); - $resolver->setAllowedValues('input', array( + $resolver->setAllowedValues('input', [ 'datetime', 'string', 'timestamp', 'array', - )); - $resolver->setAllowedValues('widget', array( + ]); + $resolver->setAllowedValues('widget', [ 'single_text', 'text', 'choice', - )); + ]); - $resolver->setAllowedTypes('format', array('int', 'string')); + $resolver->setAllowedTypes('format', ['int', 'string']); $resolver->setAllowedTypes('years', 'array'); $resolver->setAllowedTypes('months', 'array'); $resolver->setAllowedTypes('days', 'array'); @@ -315,7 +315,7 @@ class DateType extends AbstractType { $pattern = $formatter->getPattern(); $timezone = $formatter->getTimeZoneId(); - $formattedTimestamps = array(); + $formattedTimestamps = []; $formatter->setTimeZone('UTC'); @@ -338,7 +338,7 @@ class DateType extends AbstractType private function listYears(array $years) { - $result = array(); + $result = []; foreach ($years as $year) { if (false !== $y = gmmktime(0, 0, 0, 6, 15, $year)) { @@ -351,7 +351,7 @@ class DateType extends AbstractType private function listMonths(array $months) { - $result = array(); + $result = []; foreach ($months as $month) { $result[gmmktime(0, 0, 0, $month, 15)] = $month; @@ -362,7 +362,7 @@ class DateType extends AbstractType private function listDays(array $days) { - $result = array(); + $result = []; foreach ($days as $day) { $result[gmmktime(0, 0, 0, 5, $day)] = $day; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/FileType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/FileType.php index 1b699d51..59c72889 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/FileType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/FileType.php @@ -33,11 +33,11 @@ class FileType extends AbstractType $requestHandler = $form->getConfig()->getRequestHandler(); if ($options['multiple']) { - $data = array(); + $data = []; $files = $event->getData(); if (!\is_array($files)) { - $files = array(); + $files = []; } foreach ($files as $file) { @@ -48,7 +48,7 @@ class FileType extends AbstractType // Since the array is never considered empty in the view data format // on submission, we need to evaluate the configured empty data here - if (array() === $data) { + if ([] === $data) { $emptyData = $form->getConfig()->getEmptyData(); $data = $emptyData instanceof \Closure ? $emptyData($form, $data) : $emptyData; } @@ -70,10 +70,10 @@ class FileType extends AbstractType $view->vars['attr']['multiple'] = 'multiple'; } - $view->vars = array_replace($view->vars, array( + $view->vars = array_replace($view->vars, [ 'type' => 'file', 'value' => '', - )); + ]); } /** @@ -97,15 +97,16 @@ class FileType extends AbstractType } $emptyData = function (Options $options) { - return $options['multiple'] ? array() : null; + return $options['multiple'] ? [] : null; }; - $resolver->setDefaults(array( + $resolver->setDefaults([ 'compound' => false, 'data_class' => $dataClass, 'empty_data' => $emptyData, 'multiple' => false, - )); + 'allow_file_upload' => true, + ]); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/FormType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/FormType.php index 363fd465..72b14035 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/FormType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/FormType.php @@ -38,7 +38,7 @@ class FormType extends BaseType { parent::buildForm($builder, $options); - $isDataOptionSet = array_key_exists('data', $options); + $isDataOptionSet = \array_key_exists('data', $options); $builder ->setRequired($options['required']) @@ -81,7 +81,7 @@ class FormType extends BaseType } $formConfig = $form->getConfig(); - $view->vars = array_replace($view->vars, array( + $view->vars = array_replace($view->vars, [ 'errors' => $form->getErrors(), 'valid' => $form->isSubmitted() ? $form->isValid() : true, 'value' => $form->getViewData(), @@ -93,7 +93,7 @@ class FormType extends BaseType 'method' => $formConfig->getMethod(), 'action' => $formConfig->getAction(), 'submitted' => $form->isSubmitted(), - )); + ]); } /** @@ -136,7 +136,7 @@ class FormType extends BaseType } return function (FormInterface $form) { - return $form->getConfig()->getCompound() ? array() : ''; + return $form->getConfig()->getCompound() ? [] : ''; }; }; @@ -155,11 +155,11 @@ class FormType extends BaseType // If data is given, the form is locked to that data // (independent of its value) - $resolver->setDefined(array( + $resolver->setDefined([ 'data', - )); + ]); - $resolver->setDefaults(array( + $resolver->setDefaults([ 'data_class' => $dataClass, 'empty_data' => $emptyData, 'trim' => true, @@ -168,20 +168,21 @@ class FormType extends BaseType 'mapped' => true, 'by_reference' => true, 'error_bubbling' => $errorBubbling, - 'label_attr' => array(), + 'label_attr' => [], 'inherit_data' => false, 'compound' => true, 'method' => 'POST', // According to RFC 2396 (http://www.ietf.org/rfc/rfc2396.txt) // section 4.2., empty URIs are considered same-document references 'action' => '', - 'attr' => array(), + 'attr' => [], 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'upload_max_size_message' => $uploadMaxSizeMessage, // internal - )); + 'allow_file_upload' => false, + ]); $resolver->setAllowedTypes('label_attr', 'array'); - $resolver->setAllowedTypes('upload_max_size_message', array('callable')); + $resolver->setAllowedTypes('upload_max_size_message', ['callable']); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php index 10377501..dae7f2bd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php @@ -21,13 +21,13 @@ class HiddenType extends AbstractType */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ // hidden fields cannot have a required attribute 'required' => false, // Pass errors to the parent 'error_bubbling' => true, 'compound' => false, - )); + ]); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php index 4051cbf2..e3699614 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php @@ -14,6 +14,8 @@ namespace Symfony\Component\Form\Extension\Core\Type; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\DataTransformer\IntegerToLocalizedStringTransformer; use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Form\FormInterface; +use Symfony\Component\Form\FormView; use Symfony\Component\OptionsResolver\OptionsResolver; class IntegerType extends AbstractType @@ -31,21 +33,31 @@ class IntegerType extends AbstractType )); } + /** + * {@inheritdoc} + */ + public function buildView(FormView $view, FormInterface $form, array $options) + { + if ($options['grouping']) { + $view->vars['type'] = 'text'; + } + } + /** * {@inheritdoc} */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ // default scale is locale specific (usually around 3) 'scale' => null, 'grouping' => false, // Integer cast rounds towards 0, so do the same when displaying fractions 'rounding_mode' => IntegerToLocalizedStringTransformer::ROUND_DOWN, 'compound' => false, - )); + ]); - $resolver->setAllowedValues('rounding_mode', array( + $resolver->setAllowedValues('rounding_mode', [ IntegerToLocalizedStringTransformer::ROUND_FLOOR, IntegerToLocalizedStringTransformer::ROUND_DOWN, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN, @@ -53,9 +65,9 @@ class IntegerType extends AbstractType IntegerToLocalizedStringTransformer::ROUND_HALF_UP, IntegerToLocalizedStringTransformer::ROUND_UP, IntegerToLocalizedStringTransformer::ROUND_CEILING, - )); + ]); - $resolver->setAllowedTypes('scale', array('null', 'int')); + $resolver->setAllowedTypes('scale', ['null', 'int']); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php index 04f25a62..e23bc954 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php @@ -36,7 +36,7 @@ class LanguageType extends AbstractType implements ChoiceLoaderInterface */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ 'choice_loader' => function (Options $options) { if ($options['choices']) { @trigger_error(sprintf('Using the "choices" option in %s has been deprecated since Symfony 3.3 and will be ignored in 4.0. Override the "choice_loader" option instead or set it to null.', __CLASS__), E_USER_DEPRECATED); @@ -47,7 +47,7 @@ class LanguageType extends AbstractType implements ChoiceLoaderInterface return $this; }, 'choice_translation_domain' => false, - )); + ]); } /** @@ -86,12 +86,7 @@ class LanguageType extends AbstractType implements ChoiceLoaderInterface // Optimize $values = array_filter($values); if (empty($values)) { - return array(); - } - - // If no callable is set, values are the same as choices - if (null === $value) { - return $values; + return []; } return $this->loadChoiceList($value)->getChoicesForValues($values); @@ -105,7 +100,7 @@ class LanguageType extends AbstractType implements ChoiceLoaderInterface // Optimize $choices = array_filter($choices); if (empty($choices)) { - return array(); + return []; } // If no callable is set, choices are the same as values diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php index 2622e322..21225b03 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php @@ -36,7 +36,7 @@ class LocaleType extends AbstractType implements ChoiceLoaderInterface */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ 'choice_loader' => function (Options $options) { if ($options['choices']) { @trigger_error(sprintf('Using the "choices" option in %s has been deprecated since Symfony 3.3 and will be ignored in 4.0. Override the "choice_loader" option instead or set it to null.', __CLASS__), E_USER_DEPRECATED); @@ -47,7 +47,7 @@ class LocaleType extends AbstractType implements ChoiceLoaderInterface return $this; }, 'choice_translation_domain' => false, - )); + ]); } /** @@ -86,12 +86,7 @@ class LocaleType extends AbstractType implements ChoiceLoaderInterface // Optimize $values = array_filter($values); if (empty($values)) { - return array(); - } - - // If no callable is set, values are the same as choices - if (null === $value) { - return $values; + return []; } return $this->loadChoiceList($value)->getChoicesForValues($values); @@ -105,7 +100,7 @@ class LocaleType extends AbstractType implements ChoiceLoaderInterface // Optimize $choices = array_filter($choices); if (empty($choices)) { - return array(); + return []; } // If no callable is set, choices are the same as values diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php index 4ca60105..45d0b219 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php @@ -20,7 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class MoneyType extends AbstractType { - protected static $patterns = array(); + protected static $patterns = []; /** * {@inheritdoc} @@ -50,13 +50,13 @@ class MoneyType extends AbstractType */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ 'scale' => 2, 'grouping' => false, 'divisor' => 1, 'currency' => 'EUR', 'compound' => false, - )); + ]); $resolver->setAllowedTypes('scale', 'int'); } @@ -84,7 +84,7 @@ class MoneyType extends AbstractType $locale = \Locale::getDefault(); if (!isset(self::$patterns[$locale])) { - self::$patterns[$locale] = array(); + self::$patterns[$locale] = []; } if (!isset(self::$patterns[$locale][$currency])) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php index 4ef1cac1..1054b589 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php @@ -35,15 +35,15 @@ class NumberType extends AbstractType */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ // default scale is locale specific (usually around 3) 'scale' => null, 'grouping' => false, 'rounding_mode' => NumberToLocalizedStringTransformer::ROUND_HALF_UP, 'compound' => false, - )); + ]); - $resolver->setAllowedValues('rounding_mode', array( + $resolver->setAllowedValues('rounding_mode', [ NumberToLocalizedStringTransformer::ROUND_FLOOR, NumberToLocalizedStringTransformer::ROUND_DOWN, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN, @@ -51,9 +51,9 @@ class NumberType extends AbstractType NumberToLocalizedStringTransformer::ROUND_HALF_UP, NumberToLocalizedStringTransformer::ROUND_UP, NumberToLocalizedStringTransformer::ROUND_CEILING, - )); + ]); - $resolver->setAllowedTypes('scale', array('null', 'int')); + $resolver->setAllowedTypes('scale', ['null', 'int']); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php index e651ee8d..5a5b2605 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php @@ -33,10 +33,10 @@ class PasswordType extends AbstractType */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ 'always_empty' => true, 'trim' => false, - )); + ]); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/PercentType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/PercentType.php index ff4d7168..dedb9e8c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/PercentType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/PercentType.php @@ -31,16 +31,16 @@ class PercentType extends AbstractType */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ 'scale' => 0, 'type' => 'fractional', 'compound' => false, - )); + ]); - $resolver->setAllowedValues('type', array( + $resolver->setAllowedValues('type', [ 'fractional', 'integer', - )); + ]); $resolver->setAllowedTypes('scale', 'int'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/RepeatedType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/RepeatedType.php index 1189190f..5f9ee532 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/RepeatedType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/RepeatedType.php @@ -32,10 +32,10 @@ class RepeatedType extends AbstractType } $builder - ->addViewTransformer(new ValueToDuplicatesTransformer(array( + ->addViewTransformer(new ValueToDuplicatesTransformer([ $options['first_name'], $options['second_name'], - ))) + ])) ->add($options['first_name'], $options['type'], array_merge($options['options'], $options['first_options'])) ->add($options['second_name'], $options['type'], array_merge($options['options'], $options['second_options'])) ; @@ -46,15 +46,15 @@ class RepeatedType extends AbstractType */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ 'type' => __NAMESPACE__.'\TextType', - 'options' => array(), - 'first_options' => array(), - 'second_options' => array(), + 'options' => [], + 'first_options' => [], + 'second_options' => [], 'first_name' => 'first', 'second_name' => 'second', 'error_bubbling' => false, - )); + ]); $resolver->setAllowedTypes('options', 'array'); $resolver->setAllowedTypes('first_options', 'array'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/TextType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/TextType.php index 0944c38b..9b3c59db 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/TextType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/TextType.php @@ -35,9 +35,9 @@ class TextType extends AbstractType implements DataTransformerInterface */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ 'compound' => false, - )); + ]); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php index cff079d2..c88bea81 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php @@ -27,17 +27,17 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class TimeType extends AbstractType { - private static $widgets = array( + private static $widgets = [ 'text' => 'Symfony\Component\Form\Extension\Core\Type\TextType', 'choice' => 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', - ); + ]; /** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { - $parts = array('hour'); + $parts = ['hour']; $format = 'H'; if ($options['with_seconds'] && !$options['with_minutes']) { @@ -68,13 +68,13 @@ class TimeType extends AbstractType }); } } else { - $hourOptions = $minuteOptions = $secondOptions = array( + $hourOptions = $minuteOptions = $secondOptions = [ 'error_bubbling' => true, 'empty_data' => '', - ); + ]; // when the form is compound the entries of the array are ignored in favor of children data // so we need to handle the cascade setting here - $emptyData = $builder->getEmptyData() ?: array(); + $emptyData = $builder->getEmptyData() ?: []; if (isset($emptyData['hour'])) { $hourOptions['empty_data'] = $emptyData['hour']; @@ -93,7 +93,7 @@ class TimeType extends AbstractType } if ('choice' === $options['widget']) { - $hours = $minutes = array(); + $hours = $minutes = []; foreach ($options['hours'] as $hour) { $hours[str_pad($hour, 2, '0', STR_PAD_LEFT)] = $hour; @@ -115,7 +115,7 @@ class TimeType extends AbstractType } if ($options['with_seconds']) { - $seconds = array(); + $seconds = []; foreach ($options['seconds'] as $second) { $seconds[str_pad($second, 2, '0', STR_PAD_LEFT)] = $second; @@ -127,7 +127,7 @@ class TimeType extends AbstractType } // Append generic carry-along options - foreach (array('required', 'translation_domain') as $passOpt) { + foreach (['required', 'translation_domain'] as $passOpt) { $hourOptions[$passOpt] = $options[$passOpt]; if ($options['with_minutes']) { @@ -179,11 +179,11 @@ class TimeType extends AbstractType */ public function buildView(FormView $view, FormInterface $form, array $options) { - $view->vars = array_replace($view->vars, array( + $view->vars = array_replace($view->vars, [ 'widget' => $options['widget'], 'with_minutes' => $options['with_minutes'], 'with_seconds' => $options['with_seconds'], - )); + ]); // Change the input to a HTML5 time input if // * the widget is set to "single_text" @@ -219,16 +219,16 @@ class TimeType extends AbstractType $default = $placeholderDefault($options); return array_merge( - array('hour' => $default, 'minute' => $default, 'second' => $default), + ['hour' => $default, 'minute' => $default, 'second' => $default], $placeholder ); } - return array( + return [ 'hour' => $placeholder, 'minute' => $placeholder, 'second' => $placeholder, - ); + ]; }; $choiceTranslationDomainNormalizer = function (Options $options, $choiceTranslationDomain) { @@ -236,19 +236,19 @@ class TimeType extends AbstractType $default = false; return array_replace( - array('hour' => $default, 'minute' => $default, 'second' => $default), + ['hour' => $default, 'minute' => $default, 'second' => $default], $choiceTranslationDomain ); } - return array( + return [ 'hour' => $choiceTranslationDomain, 'minute' => $choiceTranslationDomain, 'second' => $choiceTranslationDomain, - ); + ]; }; - $resolver->setDefaults(array( + $resolver->setDefaults([ 'hours' => range(0, 23), 'minutes' => range(0, 59), 'seconds' => range(0, 59), @@ -270,26 +270,26 @@ class TimeType extends AbstractType // this option. 'data_class' => null, 'empty_data' => function (Options $options) { - return $options['compound'] ? array() : ''; + return $options['compound'] ? [] : ''; }, 'compound' => $compound, 'choice_translation_domain' => false, - )); + ]); $resolver->setNormalizer('placeholder', $placeholderNormalizer); $resolver->setNormalizer('choice_translation_domain', $choiceTranslationDomainNormalizer); - $resolver->setAllowedValues('input', array( + $resolver->setAllowedValues('input', [ 'datetime', 'string', 'timestamp', 'array', - )); - $resolver->setAllowedValues('widget', array( + ]); + $resolver->setAllowedValues('widget', [ 'single_text', 'text', 'choice', - )); + ]); $resolver->setAllowedTypes('hours', 'array'); $resolver->setAllowedTypes('minutes', 'array'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php index 6bad4993..dfbe2b18 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php @@ -48,7 +48,7 @@ class TimezoneType extends AbstractType implements ChoiceLoaderInterface */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ 'choice_loader' => function (Options $options) { if ($options['choices']) { @trigger_error(sprintf('Using the "choices" option in %s has been deprecated since Symfony 3.3 and will be ignored in 4.0. Override the "choice_loader" option instead or set it to null.', __CLASS__), E_USER_DEPRECATED); @@ -65,9 +65,9 @@ class TimezoneType extends AbstractType implements ChoiceLoaderInterface 'choice_translation_domain' => false, 'input' => 'string', 'regions' => \DateTimeZone::ALL, - )); + ]); - $resolver->setAllowedValues('input', array('string', 'datetimezone')); + $resolver->setAllowedValues('input', ['string', 'datetimezone']); $resolver->setAllowedTypes('regions', 'int'); } @@ -116,7 +116,7 @@ class TimezoneType extends AbstractType implements ChoiceLoaderInterface // Optimize $values = array_filter($values); if (empty($values)) { - return array(); + return []; } // If no callable is set, values are the same as choices @@ -139,7 +139,7 @@ class TimezoneType extends AbstractType implements ChoiceLoaderInterface // Optimize $choices = array_filter($choices); if (empty($choices)) { - return array(); + return []; } // If no callable is set, choices are the same as values @@ -159,7 +159,7 @@ class TimezoneType extends AbstractType implements ChoiceLoaderInterface */ private static function getTimezones($regions) { - $timezones = array(); + $timezones = []; foreach (\DateTimeZone::listIdentifiers($regions) as $timezone) { $parts = explode('/', $timezone); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/UrlType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/UrlType.php index 689a2a10..39b9d2d2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/UrlType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/UrlType.php @@ -14,6 +14,8 @@ namespace Symfony\Component\Form\Extension\Core\Type; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\EventListener\FixUrlProtocolListener; use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Form\FormInterface; +use Symfony\Component\Form\FormView; use Symfony\Component\OptionsResolver\OptionsResolver; class UrlType extends AbstractType @@ -28,6 +30,17 @@ class UrlType extends AbstractType } } + /** + * {@inheritdoc} + */ + public function buildView(FormView $view, FormInterface $form, array $options) + { + if ($options['default_protocol']) { + $view->vars['attr']['inputmode'] = 'url'; + $view->vars['type'] = 'text'; + } + } + /** * {@inheritdoc} */ @@ -35,7 +48,7 @@ class UrlType extends AbstractType { $resolver->setDefault('default_protocol', 'http'); - $resolver->setAllowedTypes('default_protocol', array('null', 'string')); + $resolver->setAllowedTypes('default_protocol', ['null', 'string']); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php index c6959c6e..0fd919fe 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php @@ -43,8 +43,8 @@ class CsrfExtension extends AbstractExtension */ protected function loadTypeExtensions() { - return array( + return [ new Type\FormTypeCsrfExtension($this->tokenManager, true, '_token', $this->translator, $this->translationDomain), - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php index 0e9c6456..8f90d21c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php @@ -35,9 +35,9 @@ class CsrfValidationListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( + return [ FormEvents::PRE_SUBMIT => 'preSubmit', - ); + ]; } public function __construct($fieldName, CsrfTokenManagerInterface $tokenManager, $tokenId, $errorMessage, TranslatorInterface $translator = null, $translationDomain = null, ServerParams $serverParams = null) @@ -59,11 +59,11 @@ class CsrfValidationListener implements EventSubscriberInterface if ($form->isRoot() && $form->getConfig()->getOption('compound') && !$postRequestSizeExceeded) { $data = $event->getData(); - if (!isset($data[$this->fieldName]) || !$this->tokenManager->isTokenValid(new CsrfToken($this->tokenId, $data[$this->fieldName]))) { + if (!isset($data[$this->fieldName]) || !\is_string($data[$this->fieldName]) || !$this->tokenManager->isTokenValid(new CsrfToken($this->tokenId, $data[$this->fieldName]))) { $errorMessage = $this->errorMessage; if (null !== $this->translator) { - $errorMessage = $this->translator->trans($errorMessage, array(), $this->translationDomain); + $errorMessage = $this->translator->trans($errorMessage, [], $this->translationDomain); } $form->addError(new FormError($errorMessage)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php index bcfc3cdf..927c7157 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php @@ -90,9 +90,9 @@ class FormTypeCsrfExtension extends AbstractTypeExtension $tokenId = $options['csrf_token_id'] ?: ($form->getName() ?: \get_class($form->getConfig()->getType()->getInnerType())); $data = (string) $options['csrf_token_manager']->getToken($tokenId); - $csrfForm = $factory->createNamed($options['csrf_field_name'], 'Symfony\Component\Form\Extension\Core\Type\HiddenType', $data, array( + $csrfForm = $factory->createNamed($options['csrf_field_name'], 'Symfony\Component\Form\Extension\Core\Type\HiddenType', $data, [ 'mapped' => false, - )); + ]); $view->children[$options['csrf_field_name']] = $csrfForm->createView($view); } @@ -103,13 +103,13 @@ class FormTypeCsrfExtension extends AbstractTypeExtension */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ 'csrf_protection' => $this->defaultEnabled, 'csrf_field_name' => $this->defaultFieldName, 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'csrf_token_manager' => $this->defaultTokenManager, 'csrf_token_id' => null, - )); + ]); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/DataCollectorExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/DataCollectorExtension.php index 5b60cfbb..4b23513b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/DataCollectorExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/DataCollectorExtension.php @@ -33,8 +33,8 @@ class DataCollectorExtension extends AbstractExtension */ protected function loadTypeExtensions() { - return array( + return [ new Type\DataCollectorTypeExtension($this->dataCollector), - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php index 1ae6e9f3..77595ab3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php @@ -36,12 +36,12 @@ class DataCollectorListener implements EventSubscriberInterface */ public static function getSubscribedEvents() { - return array( + return [ // High priority in order to be called as soon as possible - FormEvents::POST_SET_DATA => array('postSetData', 255), + FormEvents::POST_SET_DATA => ['postSetData', 255], // Low priority in order to be called as late as possible - FormEvents::POST_SUBMIT => array('postSubmit', -255), - ); + FormEvents::POST_SUBMIT => ['postSubmit', -255], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php index d76944cc..88fa453a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php @@ -84,11 +84,11 @@ class FormDataCollector extends DataCollector implements FormDataCollectorInterf public function reset() { - $this->data = array( - 'forms' => array(), - 'forms_by_hash' => array(), + $this->data = [ + 'forms' => [], + 'forms_by_hash' => [], 'nb_errors' => 0, - ); + ]; } /** @@ -107,7 +107,7 @@ class FormDataCollector extends DataCollector implements FormDataCollectorInterf $hash = spl_object_hash($form); if (!isset($this->dataByForm[$hash])) { - $this->dataByForm[$hash] = array(); + $this->dataByForm[$hash] = []; } $this->dataByForm[$hash] = array_replace( @@ -128,7 +128,7 @@ class FormDataCollector extends DataCollector implements FormDataCollectorInterf $hash = spl_object_hash($form); if (!isset($this->dataByForm[$hash])) { - $this->dataByForm[$hash] = array(); + $this->dataByForm[$hash] = []; } $this->dataByForm[$hash] = array_replace( @@ -183,7 +183,7 @@ class FormDataCollector extends DataCollector implements FormDataCollectorInterf $hash = spl_object_hash($view); if (!isset($this->dataByView[$hash])) { - $this->dataByView[$hash] = array(); + $this->dataByView[$hash] = []; } $this->dataByView[$hash] = array_replace( @@ -246,9 +246,9 @@ class FormDataCollector extends DataCollector implements FormDataCollectorInterf */ protected function getCasters() { - return parent::getCasters() + array( + return parent::getCasters() + [ \Exception::class => function (\Exception $e, array $a, Stub $s) { - foreach (array("\0Exception\0previous", "\0Exception\0trace") as $k) { + foreach (["\0Exception\0previous", "\0Exception\0trace"] as $k) { if (isset($a[$k])) { unset($a[$k]); ++$s->cut; @@ -258,20 +258,20 @@ class FormDataCollector extends DataCollector implements FormDataCollectorInterf return $a; }, FormInterface::class => function (FormInterface $f, array $a) { - return array( + return [ Caster::PREFIX_VIRTUAL.'name' => $f->getName(), Caster::PREFIX_VIRTUAL.'type_class' => new ClassStub(\get_class($f->getConfig()->getType()->getInnerType())), - ); + ]; }, - FormView::class => array(StubCaster::class, 'cutInternals'), + FormView::class => [StubCaster::class, 'cutInternals'], ConstraintViolationInterface::class => function (ConstraintViolationInterface $v, array $a) { - return array( + return [ Caster::PREFIX_VIRTUAL.'root' => $v->getRoot(), Caster::PREFIX_VIRTUAL.'path' => $v->getPropertyPath(), Caster::PREFIX_VIRTUAL.'value' => $v->getInvalidValue(), - ); + ]; }, - ); + ]; } private function &recursiveBuildPreliminaryFormTree(FormInterface $form, array &$outputByHash) @@ -281,9 +281,9 @@ class FormDataCollector extends DataCollector implements FormDataCollectorInterf $output = &$outputByHash[$hash]; $output = isset($this->dataByForm[$hash]) ? $this->dataByForm[$hash] - : array(); + : []; - $output['children'] = array(); + $output['children'] = []; foreach ($form as $name => $child) { $output['children'][$name] = &$this->recursiveBuildPreliminaryFormTree($child, $outputByHash); @@ -311,18 +311,18 @@ class FormDataCollector extends DataCollector implements FormDataCollectorInterf $output = isset($this->dataByView[$viewHash]) ? $this->dataByView[$viewHash] - : array(); + : []; if (null !== $formHash) { $output = array_replace( $output, isset($this->dataByForm[$formHash]) ? $this->dataByForm[$formHash] - : array() + : [] ); } - $output['children'] = array(); + $output['children'] = []; foreach ($view->children as $name => $childView) { // The CSRF token, for example, is never added to the form tree. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php index c7f65f44..75691c26 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php @@ -38,16 +38,16 @@ class FormDataExtractor implements FormDataExtractorInterface */ public function extractConfiguration(FormInterface $form) { - $data = array( + $data = [ 'id' => $this->buildId($form), 'name' => $form->getName(), 'type_class' => \get_class($form->getConfig()->getType()->getInnerType()), 'synchronized' => $form->isSynchronized(), - 'passed_options' => array(), - 'resolved_options' => array(), - ); + 'passed_options' => [], + 'resolved_options' => [], + ]; - foreach ($form->getConfig()->getAttribute('data_collector/passed_options', array()) as $option => $value) { + foreach ($form->getConfig()->getAttribute('data_collector/passed_options', []) as $option => $value) { $data['passed_options'][$option] = $value; } @@ -66,12 +66,12 @@ class FormDataExtractor implements FormDataExtractorInterface */ public function extractDefaultData(FormInterface $form) { - $data = array( - 'default_data' => array( + $data = [ + 'default_data' => [ 'norm' => $form->getNormData(), - ), - 'submitted_data' => array(), - ); + ], + 'submitted_data' => [], + ]; if ($form->getData() !== $form->getNormData()) { $data['default_data']['model'] = $form->getData(); @@ -89,12 +89,12 @@ class FormDataExtractor implements FormDataExtractorInterface */ public function extractSubmittedData(FormInterface $form) { - $data = array( - 'submitted_data' => array( + $data = [ + 'submitted_data' => [ 'norm' => $form->getNormData(), - ), - 'errors' => array(), - ); + ], + 'errors' => [], + ]; if ($form->getViewData() !== $form->getNormData()) { $data['submitted_data']['view'] = $form->getViewData(); @@ -105,13 +105,13 @@ class FormDataExtractor implements FormDataExtractorInterface } foreach ($form->getErrors() as $error) { - $errorData = array( + $errorData = [ 'message' => $error->getMessage(), 'origin' => \is_object($error->getOrigin()) ? spl_object_hash($error->getOrigin()) : null, - 'trace' => array(), - ); + 'trace' => [], + ]; $cause = $error->getCause(); @@ -148,11 +148,11 @@ class FormDataExtractor implements FormDataExtractorInterface */ public function extractViewVariables(FormView $view) { - $data = array( + $data = [ 'id' => isset($view->vars['id']) ? $view->vars['id'] : null, 'name' => isset($view->vars['name']) ? $view->vars['name'] : null, - 'view_vars' => array(), - ); + 'view_vars' => [], + ]; foreach ($view->vars as $varName => $value) { $data['view_vars'][$varName] = $value; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php index c403be37..53a76c84 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php @@ -69,7 +69,7 @@ class ResolvedTypeDataCollectorProxy implements ResolvedFormTypeInterface /** * {@inheritdoc} */ - public function createBuilder(FormFactoryInterface $factory, $name, array $options = array()) + public function createBuilder(FormFactoryInterface $factory, $name, array $options = []) { $builder = $this->proxiedType->createBuilder($factory, $name, $options); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php index 4d89bdb6..6479c859 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php @@ -76,7 +76,7 @@ class DependencyInjectionExtension implements FormExtensionInterface public function getTypeExtensions($name) { - $extensions = array(); + $extensions = []; if (isset($this->typeExtensionServices[$name])) { foreach ($this->typeExtensionServices[$name] as $serviceId => $extension) { @@ -105,7 +105,7 @@ class DependencyInjectionExtension implements FormExtensionInterface { if (!$this->guesserLoaded) { $this->guesserLoaded = true; - $guessers = array(); + $guessers = []; foreach ($this->guesserServices as $serviceId => $service) { if (null !== $this->guesserServiceIds) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationExtension.php index 08bd89c9..27305ada 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationExtension.php @@ -22,8 +22,8 @@ class HttpFoundationExtension extends AbstractExtension { protected function loadTypeExtensions() { - return array( + return [ new Type\FormTypeHttpFoundationExtension(), - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php index 0a1297d3..75ee6544 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php @@ -75,7 +75,7 @@ class HttpFoundationRequestHandler implements RequestHandlerInterface $form->addError(new FormError( \call_user_func($form->getConfig()->getOption('upload_max_size_message')), null, - array('{{ max }}' => $this->serverParams->getNormalizedIniPostMaxSize()) + ['{{ max }}' => $this->serverParams->getNormalizedIniPostMaxSize()] )); return; @@ -85,7 +85,7 @@ class HttpFoundationRequestHandler implements RequestHandlerInterface $params = $request->request->all(); $files = $request->files->all(); } elseif ($request->request->has($name) || $request->files->has($name)) { - $default = $form->getConfig()->getCompound() ? array() : null; + $default = $form->getConfig()->getCompound() ? [] : null; $params = $request->request->get($name, $default); $files = $request->files->get($name, $default); } else { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Templating/TemplatingExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Templating/TemplatingExtension.php index 903f7c75..84dcb1ed 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Templating/TemplatingExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Templating/TemplatingExtension.php @@ -24,10 +24,10 @@ use Symfony\Component\Templating\PhpEngine; */ class TemplatingExtension extends AbstractExtension { - public function __construct(PhpEngine $engine, CsrfTokenManagerInterface $csrfTokenManager = null, array $defaultThemes = array()) + public function __construct(PhpEngine $engine, CsrfTokenManagerInterface $csrfTokenManager = null, array $defaultThemes = []) { - $engine->addHelpers(array( + $engine->addHelpers([ new FormHelper(new FormRenderer(new TemplatingRendererEngine($engine, $defaultThemes), $csrfTokenManager)), - )); + ]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Templating/TemplatingRendererEngine.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Templating/TemplatingRendererEngine.php index b26c9ef1..4805a66b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Templating/TemplatingRendererEngine.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Templating/TemplatingRendererEngine.php @@ -22,7 +22,7 @@ class TemplatingRendererEngine extends AbstractRendererEngine { private $engine; - public function __construct(EngineInterface $engine, array $defaultThemes = array()) + public function __construct(EngineInterface $engine, array $defaultThemes = []) { parent::__construct($defaultThemes); @@ -32,7 +32,7 @@ class TemplatingRendererEngine extends AbstractRendererEngine /** * {@inheritdoc} */ - public function renderBlock(FormView $view, $resource, $blockName, array $variables = array()) + public function renderBlock(FormView $view, $resource, $blockName, array $variables = []) { return trim($this->engine->render($resource, $variables)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php index 9abb1418..7d2d7515 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php @@ -21,10 +21,10 @@ class Form extends Constraint const NOT_SYNCHRONIZED_ERROR = '1dafa156-89e1-4736-b832-419c2e501fca'; const NO_SUCH_FIELD_ERROR = '6e5212ed-a197-4339-99aa-5654798a4854'; - protected static $errorNames = array( + protected static $errorNames = [ self::NOT_SYNCHRONIZED_ERROR => 'NOT_SYNCHRONIZED_ERROR', self::NO_SUCH_FIELD_ERROR => 'NO_SUCH_FIELD_ERROR', - ); + ]; /** * {@inheritdoc} diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php index 02f8237a..7922bcc7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php @@ -26,10 +26,10 @@ class FormValidator extends ConstraintValidator /** * {@inheritdoc} */ - public function validate($form, Constraint $constraint) + public function validate($form, Constraint $formConstraint) { - if (!$constraint instanceof Form) { - throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Form'); + if (!$formConstraint instanceof Form) { + throw new UnexpectedTypeException($formConstraint, __NAMESPACE__.'\Form'); } if (!$form instanceof FormInterface) { @@ -41,7 +41,7 @@ class FormValidator extends ConstraintValidator $validator = $this->context->getValidator()->inContext($this->context); - if ($form->isSynchronized()) { + if ($form->isSubmitted() && $form->isSynchronized()) { // Validate the form data only if transformation succeeded $groups = self::getValidationGroups($form); $data = $form->getData(); @@ -55,15 +55,15 @@ class FormValidator extends ConstraintValidator // Validate the data against the constraints defined // in the form - $constraints = $config->getOption('constraints', array()); + $constraints = $config->getOption('constraints', []); if ($groups instanceof GroupSequence) { $validator->atPath('data')->validate($form->getData(), $constraints, $groups); // Otherwise validate a constraint only once for the first // matching group foreach ($groups as $group) { - if (\in_array($group, $constraint->groups)) { - $validator->atPath('data')->validate($form->getData(), $constraint, $group); + if (\in_array($group, $formConstraint->groups)) { + $validator->atPath('data')->validate($form->getData(), $formConstraint, $group); if (\count($this->context->getViolations()) > 0) { break; } @@ -90,7 +90,7 @@ class FormValidator extends ConstraintValidator } } } - } else { + } elseif (!$form->isSynchronized()) { $childrenSynchronized = true; /** @var FormInterface $child */ @@ -113,9 +113,9 @@ class FormValidator extends ConstraintValidator ? (string) $form->getViewData() : \gettype($form->getViewData()); - $this->context->setConstraint($constraint); + $this->context->setConstraint($formConstraint); $this->context->buildViolation($config->getOption('invalid_message')) - ->setParameters(array_replace(array('{{ value }}' => $clientDataAsString), $config->getOption('invalid_message_parameters'))) + ->setParameters(array_replace(['{{ value }}' => $clientDataAsString], $config->getOption('invalid_message_parameters'))) ->setInvalidValue($form->getViewData()) ->setCode(Form::NOT_SYNCHRONIZED_ERROR) ->setCause($form->getTransformationFailure()) @@ -125,7 +125,7 @@ class FormValidator extends ConstraintValidator // Mark the form with an error if it contains extra fields if (!$config->getOption('allow_extra_fields') && \count($form->getExtraData()) > 0) { - $this->context->setConstraint($constraint); + $this->context->setConstraint($formConstraint); $this->context->buildViolation($config->getOption('extra_fields_message')) ->setParameter('{{ extra_fields }}', '"'.implode('", "', array_keys($form->getExtraData())).'"') ->setInvalidValue($form->getExtraData()) @@ -166,7 +166,7 @@ class FormValidator extends ConstraintValidator $form = $form->getParent(); } while (null !== $form); - return array(Constraint::DEFAULT_GROUP); + return [Constraint::DEFAULT_GROUP]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php index 7b95f147..80c94dc6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php @@ -32,7 +32,7 @@ class ValidationListener implements EventSubscriberInterface */ public static function getSubscribedEvents() { - return array(FormEvents::POST_SUBMIT => 'validateForm'); + return [FormEvents::POST_SUBMIT => 'validateForm']; } public function __construct(ValidatorInterface $validator, ViolationMapperInterface $violationMapper) @@ -51,7 +51,7 @@ class ValidationListener implements EventSubscriberInterface $form = $event->getForm(); if ($form->isRoot()) { - // Validate the form in group "Default" + // Form groups are validated internally (FormValidator). Here we don't set groups as they are retrieved into the validator. foreach ($this->validator->validate($form) as $violation) { // Allow the "invalid" constraint to be put onto // non-synchronized forms diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Type/BaseValidatorExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Type/BaseValidatorExtension.php index 431bf5ec..63505ba2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Type/BaseValidatorExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Type/BaseValidatorExtension.php @@ -32,7 +32,7 @@ abstract class BaseValidatorExtension extends AbstractTypeExtension // Make sure that validation groups end up as null, closure or array $validationGroupsNormalizer = function (Options $options, $groups) { if (false === $groups) { - return array(); + return []; } if (empty($groups)) { @@ -50,9 +50,9 @@ abstract class BaseValidatorExtension extends AbstractTypeExtension return (array) $groups; }; - $resolver->setDefaults(array( + $resolver->setDefaults([ 'validation_groups' => null, - )); + ]); $resolver->setNormalizer('validation_groups', $validationGroupsNormalizer); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php index b83c2030..aafd479e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php @@ -49,17 +49,17 @@ class FormTypeValidatorExtension extends BaseValidatorExtension // Constraint should always be converted to an array $constraintsNormalizer = function (Options $options, $constraints) { - return \is_object($constraints) ? array($constraints) : (array) $constraints; + return \is_object($constraints) ? [$constraints] : (array) $constraints; }; - $resolver->setDefaults(array( - 'error_mapping' => array(), - 'constraints' => array(), + $resolver->setDefaults([ + 'error_mapping' => [], + 'constraints' => [], 'invalid_message' => 'This value is not valid.', - 'invalid_message_parameters' => array(), + 'invalid_message_parameters' => [], 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', - )); + ]); $resolver->setNormalizer('constraints', $constraintsNormalizer); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php index ff27fbdb..ddffdc1b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php @@ -27,12 +27,12 @@ class RepeatedTypeValidatorExtension extends AbstractTypeExtension { // Map errors to the first field $errorMapping = function (Options $options) { - return array('.' => $options['first_name']); + return ['.' => $options['first_name']]; }; - $resolver->setDefaults(array( + $resolver->setDefaults([ 'error_mapping' => $errorMapping, - )); + ]); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php index 04e60f6c..c7ab9326 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php @@ -44,7 +44,7 @@ class UploadValidatorExtension extends AbstractTypeExtension $translationDomain = $this->translationDomain; $resolver->setNormalizer('upload_max_size_message', function (Options $options, $message) use ($translator, $translationDomain) { return function () use ($translator, $translationDomain, $message) { - return $translator->trans(\call_user_func($message), array(), $translationDomain); + return $translator->trans(\call_user_func($message), [], $translationDomain); }; }); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php index 8e90a54d..a5e38859 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php @@ -49,10 +49,10 @@ class ValidatorExtension extends AbstractExtension protected function loadTypeExtensions() { - return array( + return [ new Type\FormTypeValidatorExtension($this->validator), new Type\RepeatedTypeValidatorExtension(), new Type\SubmitTypeValidatorExtension(), - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php index d784c13e..22cc7726 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php @@ -81,77 +81,77 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface case 'Symfony\Component\Validator\Constraints\Type': switch ($constraint->type) { case 'array': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CollectionType', array(), Guess::MEDIUM_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CollectionType', [], Guess::MEDIUM_CONFIDENCE); case 'boolean': case 'bool': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CheckboxType', array(), Guess::MEDIUM_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CheckboxType', [], Guess::MEDIUM_CONFIDENCE); case 'double': case 'float': case 'numeric': case 'real': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\NumberType', array(), Guess::MEDIUM_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\NumberType', [], Guess::MEDIUM_CONFIDENCE); case 'integer': case 'int': case 'long': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\IntegerType', array(), Guess::MEDIUM_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\IntegerType', [], Guess::MEDIUM_CONFIDENCE); case '\DateTime': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\DateType', array(), Guess::MEDIUM_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\DateType', [], Guess::MEDIUM_CONFIDENCE); case 'string': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TextType', array(), Guess::LOW_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TextType', [], Guess::LOW_CONFIDENCE); } break; case 'Symfony\Component\Validator\Constraints\Country': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CountryType', array(), Guess::HIGH_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CountryType', [], Guess::HIGH_CONFIDENCE); case 'Symfony\Component\Validator\Constraints\Currency': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CurrencyType', array(), Guess::HIGH_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CurrencyType', [], Guess::HIGH_CONFIDENCE); case 'Symfony\Component\Validator\Constraints\Date': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\DateType', array('input' => 'string'), Guess::HIGH_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\DateType', ['input' => 'string'], Guess::HIGH_CONFIDENCE); case 'Symfony\Component\Validator\Constraints\DateTime': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\DateTimeType', array('input' => 'string'), Guess::HIGH_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\DateTimeType', ['input' => 'string'], Guess::HIGH_CONFIDENCE); case 'Symfony\Component\Validator\Constraints\Email': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\EmailType', array(), Guess::HIGH_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\EmailType', [], Guess::HIGH_CONFIDENCE); case 'Symfony\Component\Validator\Constraints\File': case 'Symfony\Component\Validator\Constraints\Image': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\FileType', array(), Guess::HIGH_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\FileType', [], Guess::HIGH_CONFIDENCE); case 'Symfony\Component\Validator\Constraints\Language': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\LanguageType', array(), Guess::HIGH_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\LanguageType', [], Guess::HIGH_CONFIDENCE); case 'Symfony\Component\Validator\Constraints\Locale': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\LocaleType', array(), Guess::HIGH_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\LocaleType', [], Guess::HIGH_CONFIDENCE); case 'Symfony\Component\Validator\Constraints\Time': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TimeType', array('input' => 'string'), Guess::HIGH_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TimeType', ['input' => 'string'], Guess::HIGH_CONFIDENCE); case 'Symfony\Component\Validator\Constraints\Url': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\UrlType', array(), Guess::HIGH_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\UrlType', [], Guess::HIGH_CONFIDENCE); case 'Symfony\Component\Validator\Constraints\Ip': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TextType', array(), Guess::MEDIUM_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TextType', [], Guess::MEDIUM_CONFIDENCE); case 'Symfony\Component\Validator\Constraints\Length': case 'Symfony\Component\Validator\Constraints\Regex': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TextType', array(), Guess::LOW_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TextType', [], Guess::LOW_CONFIDENCE); case 'Symfony\Component\Validator\Constraints\Range': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\NumberType', array(), Guess::LOW_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\NumberType', [], Guess::LOW_CONFIDENCE); case 'Symfony\Component\Validator\Constraints\Count': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CollectionType', array(), Guess::LOW_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CollectionType', [], Guess::LOW_CONFIDENCE); case 'Symfony\Component\Validator\Constraints\IsTrue': case 'Symfony\Component\Validator\Constraints\IsFalse': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CheckboxType', array(), Guess::MEDIUM_CONFIDENCE); + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CheckboxType', [], Guess::MEDIUM_CONFIDENCE); } } @@ -185,7 +185,7 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface break; case 'Symfony\Component\Validator\Constraints\Type': - if (\in_array($constraint->type, array('double', 'float', 'numeric', 'real'))) { + if (\in_array($constraint->type, ['double', 'float', 'numeric', 'real'])) { return new ValueGuess(null, Guess::MEDIUM_CONFIDENCE); } break; @@ -227,7 +227,7 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface break; case 'Symfony\Component\Validator\Constraints\Type': - if (\in_array($constraint->type, array('double', 'float', 'numeric', 'real'))) { + if (\in_array($constraint->type, ['double', 'float', 'numeric', 'real'])) { return new ValueGuess(null, Guess::MEDIUM_CONFIDENCE); } break; @@ -249,7 +249,7 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface */ protected function guess($class, $property, \Closure $closure, $defaultValue = null) { - $guesses = array(); + $guesses = []; $classMetadata = $this->metadataFactory->getMetadataFor($class); if ($classMetadata instanceof ClassMetadataInterface && $classMetadata->hasPropertyMetadata($property)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php index 590f7df2..cb9f3f95 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php @@ -55,7 +55,7 @@ class MappingRule */ public function match($propertyPath) { - if ($propertyPath === (string) $this->propertyPath) { + if ($propertyPath === $this->propertyPath) { return $this->getTarget(); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php index 9671082a..659c266c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php @@ -153,7 +153,7 @@ class ViolationMapper implements ViolationMapperInterface $foundAtIndex = null; // Construct mapping rules for the given form - $rules = array(); + $rules = []; foreach ($form->getConfig()->getOption('error_mapping') as $propertyPath => $targetPath) { // Dot rules are considered at the very end @@ -273,9 +273,6 @@ class ViolationMapper implements ViolationMapperInterface */ private function acceptsErrors(FormInterface $form) { - // Ignore non-submitted forms. This happens, for example, in PATCH - // requests. - // https://github.com/symfony/symfony/pull/10567 - return $form->isSubmitted() && ($this->allowNonSynchronized || $form->isSynchronized()); + return $this->allowNonSynchronized || $form->isSynchronized(); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php index 19020c7a..a38195af 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php @@ -23,17 +23,17 @@ class ViolationPath implements \IteratorAggregate, PropertyPathInterface /** * @var array */ - private $elements = array(); + private $elements = []; /** * @var array */ - private $isIndex = array(); + private $isIndex = []; /** * @var array */ - private $mapsForm = array(); + private $mapsForm = []; /** * @var string diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Form.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Form.php index 8b15447d..cfa7eb5b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Form.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Form.php @@ -42,9 +42,9 @@ use Symfony\Component\PropertyAccess\PropertyPath; * * In most cases, format (1) and format (2) will be the same. For example, * a checkbox field uses a Boolean value for both internal processing and - * storage in the object. In these cases you simply need to set a view - * transformer to convert between formats (2) and (3). You can do this by - * calling addViewTransformer(). + * storage in the object. In these cases you need to set a view transformer + * to convert between formats (2) and (3). You can do this by calling + * addViewTransformer(). * * In some cases though it makes sense to make format (1) configurable. To * demonstrate this, let's extend our above date field to store the value @@ -88,7 +88,7 @@ class Form implements \IteratorAggregate, FormInterface * * @var FormError[] An array of FormError instances */ - private $errors = array(); + private $errors = []; /** * Whether this form was submitted. @@ -130,7 +130,7 @@ class Form implements \IteratorAggregate, FormInterface * * @var array */ - private $extraData = array(); + private $extraData = []; /** * Returns the transformation failure generated during submission, if any. @@ -507,7 +507,7 @@ class Form implements \IteratorAggregate, FormInterface // Initialize errors in the very beginning so that we don't lose any // errors added during listeners - $this->errors = array(); + $this->errors = []; // Obviously, a disabled form should not change its data upon submission. if ($this->isDisabled()) { @@ -532,6 +532,14 @@ class Form implements \IteratorAggregate, FormInterface $submittedData = null; } elseif (is_scalar($submittedData)) { $submittedData = (string) $submittedData; + } elseif ($this->config->getRequestHandler()->isFileUpload($submittedData)) { + if (!$this->config->getOption('allow_file_upload')) { + $submittedData = null; + $this->transformationFailure = new TransformationFailedException('Submitted data was expected to be text or number, file upload given.'); + } + } elseif (\is_array($submittedData) && !$this->config->getCompound() && !$this->config->hasOption('multiple')) { + $submittedData = null; + $this->transformationFailure = new TransformationFailedException('Submitted data was expected to be text or number, array given.'); } $dispatcher = $this->config->getEventDispatcher(); @@ -541,6 +549,10 @@ class Form implements \IteratorAggregate, FormInterface $viewData = null; try { + if (null !== $this->transformationFailure) { + throw $this->transformationFailure; + } + // Hook to change content of the data submitted by the browser if ($dispatcher->hasListeners(FormEvents::PRE_SUBMIT)) { $event = new FormEvent($this, $submittedData); @@ -554,7 +566,7 @@ class Form implements \IteratorAggregate, FormInterface // (think of empty collection forms) if ($this->config->getCompound()) { if (null === $submittedData) { - $submittedData = array(); + $submittedData = []; } if (!\is_array($submittedData)) { @@ -562,7 +574,7 @@ class Form implements \IteratorAggregate, FormInterface } foreach ($this->children as $name => $child) { - $isSubmitted = array_key_exists($name, $submittedData); + $isSubmitted = \array_key_exists($name, $submittedData); if ($isSubmitted || $clearMissing) { $child->submit($isSubmitted ? $submittedData[$name] : null, $clearMissing); @@ -804,7 +816,7 @@ class Form implements \IteratorAggregate, FormInterface /** * {@inheritdoc} */ - public function add($child, $type = null, array $options = array()) + public function add($child, $type = null, array $options = []) { if ($this->submitted) { throw new AlreadySubmittedException('You cannot add children to a submitted form'); @@ -867,7 +879,7 @@ class Form implements \IteratorAggregate, FormInterface $child->setParent($this); if (!$this->lockSetData && $this->defaultDataSet && !$this->config->getInheritData()) { - $iterator = new InheritDataAwareIterator(new \ArrayIterator(array($child->getName() => $child))); + $iterator = new InheritDataAwareIterator(new \ArrayIterator([$child->getName() => $child])); $iterator = new \RecursiveIteratorIterator($iterator); $this->config->getDataMapper()->mapDataToForms($viewData, $iterator); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilder.php index a5d6ca82..00affbf6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilder.php @@ -28,25 +28,25 @@ class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormB * * @var FormBuilderInterface[] */ - private $children = array(); + private $children = []; /** * The data of children who haven't been converted to form builders yet. * * @var array */ - private $unresolvedChildren = array(); + private $unresolvedChildren = []; /** * Creates a new form builder. * * @param string $name - * @param string $dataClass + * @param string|null $dataClass * @param EventDispatcherInterface $dispatcher * @param FormFactoryInterface $factory * @param array $options */ - public function __construct($name, $dataClass, EventDispatcherInterface $dispatcher, FormFactoryInterface $factory, array $options = array()) + public function __construct($name, $dataClass, EventDispatcherInterface $dispatcher, FormFactoryInterface $factory, array $options = []) { parent::__construct($name, $dataClass, $dispatcher, $options); @@ -56,7 +56,7 @@ class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormB /** * {@inheritdoc} */ - public function add($child, $type = null, array $options = array()) + public function add($child, $type = null, array $options = []) { if ($this->locked) { throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); @@ -81,10 +81,10 @@ class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormB // Add to "children" to maintain order $this->children[$child] = null; - $this->unresolvedChildren[$child] = array( + $this->unresolvedChildren[$child] = [ 'type' => $type, 'options' => $options, - ); + ]; return $this; } @@ -92,7 +92,7 @@ class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormB /** * {@inheritdoc} */ - public function create($name, $type = null, array $options = array()) + public function create($name, $type = null, array $options = []) { if ($this->locked) { throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); @@ -197,8 +197,8 @@ class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormB /** @var $config self */ $config = parent::getFormConfig(); - $config->children = array(); - $config->unresolvedChildren = array(); + $config->children = []; + $config->unresolvedChildren = []; return $config; } @@ -269,6 +269,6 @@ class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormB $this->children[$name] = $this->create($name, $info['type'], $info['options']); } - $this->unresolvedChildren = array(); + $this->unresolvedChildren = []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilderInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilderInterface.php index 32582336..1ed695ed 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilderInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilderInterface.php @@ -29,7 +29,7 @@ interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuild * * @return self */ - public function add($child, $type = null, array $options = array()); + public function add($child, $type = null, array $options = []); /** * Creates a form builder. @@ -40,7 +40,7 @@ interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuild * * @return self */ - public function create($name, $type = null, array $options = array()); + public function create($name, $type = null, array $options = []); /** * Returns a child by name. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormConfigBuilder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormConfigBuilder.php index 7f557420..fc864fc6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormConfigBuilder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormConfigBuilder.php @@ -39,13 +39,13 @@ class FormConfigBuilder implements FormConfigBuilderInterface * * @var array */ - private static $allowedMethods = array( + private static $allowedMethods = [ 'GET', 'PUT', 'POST', 'DELETE', 'PATCH', - ); + ]; /** * @var bool @@ -95,12 +95,12 @@ class FormConfigBuilder implements FormConfigBuilderInterface /** * @var array */ - private $viewTransformers = array(); + private $viewTransformers = []; /** * @var array */ - private $modelTransformers = array(); + private $modelTransformers = []; /** * @var DataMapperInterface @@ -130,7 +130,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface /** * @var array */ - private $attributes = array(); + private $attributes = []; /** * @var mixed @@ -188,7 +188,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface * @throws InvalidArgumentException if the data class is not a valid class or if * the name contains invalid characters */ - public function __construct($name, $dataClass, EventDispatcherInterface $dispatcher, array $options = array()) + public function __construct($name, $dataClass, EventDispatcherInterface $dispatcher, array $options = []) { self::validateName($name); @@ -257,7 +257,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } - $this->viewTransformers = array(); + $this->viewTransformers = []; return $this; } @@ -289,7 +289,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } - $this->modelTransformers = array(); + $this->modelTransformers = []; return $this; } @@ -431,7 +431,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface */ public function hasAttribute($name) { - return array_key_exists($name, $this->attributes); + return \array_key_exists($name, $this->attributes); } /** @@ -439,7 +439,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface */ public function getAttribute($name, $default = null) { - return array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; + return \array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; } /** @@ -526,7 +526,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface */ public function hasOption($name) { - return array_key_exists($name, $this->options); + return \array_key_exists($name, $this->options); } /** @@ -534,7 +534,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface */ public function getOption($name, $default = null) { - return array_key_exists($name, $this->options) ? $this->options[$name] : $default; + return \array_key_exists($name, $this->options) ? $this->options[$name] : $default; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormError.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormError.php index 7384cb28..7717c190 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormError.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormError.php @@ -47,7 +47,7 @@ class FormError implements \Serializable * * @see \Symfony\Component\Translation\Translator */ - public function __construct($message, $messageTemplate = null, array $messageParameters = array(), $messagePluralization = null, $cause = null) + public function __construct($message, $messageTemplate = null, array $messageParameters = [], $messagePluralization = null, $cause = null) { $this->message = $message; $this->messageTemplate = $messageTemplate ?: $message; @@ -135,30 +135,26 @@ class FormError implements \Serializable } /** - * Serializes this error. - * - * @return string The serialized error + * @internal */ public function serialize() { - return serialize(array( + return serialize([ $this->message, $this->messageTemplate, $this->messageParameters, $this->messagePluralization, $this->cause, - )); + ]); } /** - * Unserializes a serialized error. - * - * @param string $serialized The serialized error + * @internal */ public function unserialize($serialized) { if (\PHP_VERSION_ID >= 70000) { - list($this->message, $this->messageTemplate, $this->messageParameters, $this->messagePluralization, $this->cause) = unserialize($serialized, array('allowed_classes' => false)); + list($this->message, $this->messageTemplate, $this->messageParameters, $this->messagePluralization, $this->cause) = unserialize($serialized, ['allowed_classes' => false]); } else { list($this->message, $this->messageTemplate, $this->messageParameters, $this->messagePluralization, $this->cause) = unserialize($serialized); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormErrorIterator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormErrorIterator.php index 919b6159..2cc53c09 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormErrorIterator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormErrorIterator.php @@ -19,10 +19,9 @@ use Symfony\Component\Validator\ConstraintViolation; /** * Iterates over the errors of a form. * - * Optionally, this class supports recursive iteration. In order to iterate - * recursively, set the constructor argument $deep to true. Now each element - * returned by the iterator is either an instance of {@link FormError} or of - * {@link FormErrorIterator}, in case the errors belong to a sub-form. + * This class supports recursive iteration. In order to iterate recursively, + * pass a structure of {@link FormError} and {@link FormErrorIterator} objects + * to the $errors constructor argument. * * You can also wrap the iterator into a {@link \RecursiveIteratorIterator} to * flatten the recursive structure into a flat list of errors. @@ -262,7 +261,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array public function findByCodes($codes) { $codes = (array) $codes; - $errors = array(); + $errors = []; foreach ($this as $error) { $cause = $error->getCause(); if ($cause instanceof ConstraintViolation && \in_array($cause->getCode(), $codes, true)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormFactory.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormFactory.php index 3f18ccf3..b397f9a2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormFactory.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormFactory.php @@ -25,7 +25,7 @@ class FormFactory implements FormFactoryInterface /** * {@inheritdoc} */ - public function create($type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = array()) + public function create($type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = []) { return $this->createBuilder($type, $data, $options)->getForm(); } @@ -33,7 +33,7 @@ class FormFactory implements FormFactoryInterface /** * {@inheritdoc} */ - public function createNamed($name, $type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = array()) + public function createNamed($name, $type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = []) { return $this->createNamedBuilder($name, $type, $data, $options)->getForm(); } @@ -41,7 +41,7 @@ class FormFactory implements FormFactoryInterface /** * {@inheritdoc} */ - public function createForProperty($class, $property, $data = null, array $options = array()) + public function createForProperty($class, $property, $data = null, array $options = []) { return $this->createBuilderForProperty($class, $property, $data, $options)->getForm(); } @@ -49,7 +49,7 @@ class FormFactory implements FormFactoryInterface /** * {@inheritdoc} */ - public function createBuilder($type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = array()) + public function createBuilder($type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = []) { if (!\is_string($type)) { throw new UnexpectedTypeException($type, 'string'); @@ -61,9 +61,9 @@ class FormFactory implements FormFactoryInterface /** * {@inheritdoc} */ - public function createNamedBuilder($name, $type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = array()) + public function createNamedBuilder($name, $type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = []) { - if (null !== $data && !array_key_exists('data', $options)) { + if (null !== $data && !\array_key_exists('data', $options)) { $options['data'] = $data; } @@ -85,7 +85,7 @@ class FormFactory implements FormFactoryInterface /** * {@inheritdoc} */ - public function createBuilderForProperty($class, $property, $data = null, array $options = array()) + public function createBuilderForProperty($class, $property, $data = null, array $options = []) { if (null === $guesser = $this->registry->getTypeGuesser()) { return $this->createNamedBuilder($property, 'Symfony\Component\Form\Extension\Core\Type\TextType', $data, $options); @@ -102,23 +102,23 @@ class FormFactory implements FormFactoryInterface $pattern = $patternGuess ? $patternGuess->getValue() : null; if (null !== $pattern) { - $options = array_replace_recursive(array('attr' => array('pattern' => $pattern)), $options); + $options = array_replace_recursive(['attr' => ['pattern' => $pattern]], $options); } if (null !== $maxLength) { - $options = array_replace_recursive(array('attr' => array('maxlength' => $maxLength)), $options); + $options = array_replace_recursive(['attr' => ['maxlength' => $maxLength]], $options); } if ($requiredGuess) { - $options = array_merge(array('required' => $requiredGuess->getValue()), $options); + $options = array_merge(['required' => $requiredGuess->getValue()], $options); } // user options may override guessed options if ($typeGuess) { - $attrs = array(); + $attrs = []; $typeGuessOptions = $typeGuess->getOptions(); if (isset($typeGuessOptions['attr']) && isset($options['attr'])) { - $attrs = array('attr' => array_merge($typeGuessOptions['attr'], $options['attr'])); + $attrs = ['attr' => array_merge($typeGuessOptions['attr'], $options['attr'])]; } $options = array_merge($typeGuessOptions, $options, $attrs); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormFactoryBuilder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormFactoryBuilder.php index 3afe1f53..bccb86f4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormFactoryBuilder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormFactoryBuilder.php @@ -26,22 +26,22 @@ class FormFactoryBuilder implements FormFactoryBuilderInterface /** * @var FormExtensionInterface[] */ - private $extensions = array(); + private $extensions = []; /** * @var FormTypeInterface[] */ - private $types = array(); + private $types = []; /** * @var FormTypeExtensionInterface[] */ - private $typeExtensions = array(); + private $typeExtensions = []; /** * @var FormTypeGuesserInterface[] */ - private $typeGuessers = array(); + private $typeGuessers = []; /** * {@inheritdoc} diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormFactoryInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormFactoryInterface.php index 7014cda1..597537ad 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormFactoryInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormFactoryInterface.php @@ -29,7 +29,7 @@ interface FormFactoryInterface * * @throws \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException if any given option is not applicable to the given type */ - public function create($type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = array()); + public function create($type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = []); /** * Returns a form. @@ -45,7 +45,7 @@ interface FormFactoryInterface * * @throws \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException if any given option is not applicable to the given type */ - public function createNamed($name, $type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = array()); + public function createNamed($name, $type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = []); /** * Returns a form for a property of a class. @@ -61,7 +61,7 @@ interface FormFactoryInterface * * @throws \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException if any given option is not applicable to the form type */ - public function createForProperty($class, $property, $data = null, array $options = array()); + public function createForProperty($class, $property, $data = null, array $options = []); /** * Returns a form builder. @@ -74,7 +74,7 @@ interface FormFactoryInterface * * @throws \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException if any given option is not applicable to the given type */ - public function createBuilder($type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = array()); + public function createBuilder($type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = []); /** * Returns a form builder. @@ -88,7 +88,7 @@ interface FormFactoryInterface * * @throws \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException if any given option is not applicable to the given type */ - public function createNamedBuilder($name, $type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = array()); + public function createNamedBuilder($name, $type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = []); /** * Returns a form builder for a property of a class. @@ -105,5 +105,5 @@ interface FormFactoryInterface * * @throws \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException if any given option is not applicable to the form type */ - public function createBuilderForProperty($class, $property, $data = null, array $options = array()); + public function createBuilderForProperty($class, $property, $data = null, array $options = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormInterface.php index 253f28dd..2add7938 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormInterface.php @@ -29,7 +29,7 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable * @throws Exception\LogicException when trying to set a parent for a form with * an empty name */ - public function setParent(FormInterface $parent = null); + public function setParent(self $parent = null); /** * Returns the parent form. @@ -51,7 +51,7 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable * @throws Exception\LogicException when trying to add a child to a non-compound form * @throws Exception\UnexpectedTypeException if $child or $type has an unexpected type */ - public function add($child, $type = null, array $options = array()); + public function add($child, $type = null, array $options = []); /** * Returns the child with the given name. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormRegistry.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormRegistry.php index 67d11460..14469761 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormRegistry.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormRegistry.php @@ -28,12 +28,12 @@ class FormRegistry implements FormRegistryInterface * * @var FormExtensionInterface[] An array of FormExtensionInterface */ - private $extensions = array(); + private $extensions = []; /** * @var ResolvedFormTypeInterface[] */ - private $types = array(); + private $types = []; /** * @var FormTypeGuesserInterface|false|null @@ -45,7 +45,7 @@ class FormRegistry implements FormRegistryInterface */ private $resolvedTypeFactory; - private $checkedTypes = array(); + private $checkedTypes = []; /** * @param FormExtensionInterface[] $extensions An array of FormExtensionInterface @@ -108,12 +108,12 @@ class FormRegistry implements FormRegistryInterface */ private function resolveType(FormTypeInterface $type) { - $typeExtensions = array(); + $typeExtensions = []; $parentType = $type->getParent(); $fqcn = \get_class($type); if (isset($this->checkedTypes[$fqcn])) { - $types = implode(' > ', array_merge(array_keys($this->checkedTypes), array($fqcn))); + $types = implode(' > ', array_merge(array_keys($this->checkedTypes), [$fqcn])); throw new LogicException(sprintf('Circular reference detected for form type "%s" (%s).', $fqcn, $types)); } @@ -161,7 +161,7 @@ class FormRegistry implements FormRegistryInterface public function getTypeGuesser() { if (false === $this->guesser) { - $guessers = array(); + $guessers = []; foreach ($this->extensions as $extension) { $guesser = $extension->getTypeGuesser(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormRenderer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormRenderer.php index 3bc7bc90..8b15e034 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormRenderer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormRenderer.php @@ -27,9 +27,9 @@ class FormRenderer implements FormRendererInterface private $engine; private $csrfTokenManager; - private $blockNameHierarchyMap = array(); - private $hierarchyLevelMap = array(); - private $variableStack = array(); + private $blockNameHierarchyMap = []; + private $hierarchyLevelMap = []; + private $variableStack = []; public function __construct(FormRendererEngineInterface $engine, CsrfTokenManagerInterface $csrfTokenManager = null) { @@ -69,7 +69,7 @@ class FormRenderer implements FormRendererInterface /** * {@inheritdoc} */ - public function renderBlock(FormView $view, $blockName, array $variables = array()) + public function renderBlock(FormView $view, $blockName, array $variables = []) { $resource = $this->engine->getResourceForBlockName($view, $blockName); @@ -82,7 +82,7 @@ class FormRenderer implements FormRendererInterface // The variables are cached globally for a view (instead of for the // current suffix) if (!isset($this->variableStack[$viewCacheKey])) { - $this->variableStack[$viewCacheKey] = array(); + $this->variableStack[$viewCacheKey] = []; // The default variable scope contains all view variables, merged with // the variables passed explicitly to the helper @@ -128,7 +128,7 @@ class FormRenderer implements FormRendererInterface /** * {@inheritdoc} */ - public function searchAndRenderBlock(FormView $view, $blockNameSuffix, array $variables = array()) + public function searchAndRenderBlock(FormView $view, $blockNameSuffix, array $variables = []) { $renderOnlyOnce = 'row' === $blockNameSuffix || 'widget' === $blockNameSuffix; @@ -161,9 +161,9 @@ class FormRenderer implements FormRendererInterface // to implement a custom "choice_widget" block (no matter in which theme), // or to fallback to the block of the parent type, which would be // "form_widget" in this example (again, no matter in which theme). - // If the designer wants to explicitly fallback to "form_widget" in his - // custom "choice_widget", for example because he only wants to wrap - // a
    around the original implementation, he can simply call the + // If the designer wants to explicitly fallback to "form_widget" in their + // custom "choice_widget", for example because they only want to wrap + // a
    around the original implementation, they can call the // widget() function again to render the block for the parent type. // // The second kind is implemented in the following blocks. @@ -171,7 +171,7 @@ class FormRenderer implements FormRendererInterface // INITIAL CALL // Calculate the hierarchy of template blocks and start on // the bottom level of the hierarchy (= "__
    " block) - $blockNameHierarchy = array(); + $blockNameHierarchy = []; foreach ($view->vars['block_prefixes'] as $blockNamePrefix) { $blockNameHierarchy[] = $blockNamePrefix.'_'.$blockNameSuffix; } @@ -191,7 +191,7 @@ class FormRenderer implements FormRendererInterface // The variables are cached globally for a view (instead of for the // current suffix) if (!isset($this->variableStack[$viewCacheKey])) { - $this->variableStack[$viewCacheKey] = array(); + $this->variableStack[$viewCacheKey] = []; // The default variable scope contains all view variables, merged with // the variables passed explicitly to the helper @@ -282,7 +282,7 @@ class FormRenderer implements FormRendererInterface */ public function humanize($text) { - return ucfirst(strtolower(trim(preg_replace(array('/([A-Z])/', '/[_\s]+/'), array('_$1', ' '), $text)))); + return ucfirst(strtolower(trim(preg_replace(['/([A-Z])/', '/[_\s]+/'], ['_$1', ' '], $text)))); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormRendererEngineInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormRendererEngineInterface.php index d3632d3c..9ae5233f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormRendererEngineInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormRendererEngineInterface.php @@ -136,5 +136,5 @@ interface FormRendererEngineInterface * * @return string The HTML markup */ - public function renderBlock(FormView $view, $resource, $blockName, array $variables = array()); + public function renderBlock(FormView $view, $resource, $blockName, array $variables = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormRendererInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormRendererInterface.php index 4396e5b5..65d6480e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormRendererInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormRendererInterface.php @@ -45,7 +45,7 @@ interface FormRendererInterface * * @return string The HTML markup */ - public function renderBlock(FormView $view, $blockName, array $variables = array()); + public function renderBlock(FormView $view, $blockName, array $variables = []); /** * Searches and renders a block for a given name suffix. @@ -63,7 +63,7 @@ interface FormRendererInterface * * @return string The HTML markup */ - public function searchAndRenderBlock(FormView $view, $blockNameSuffix, array $variables = array()); + public function searchAndRenderBlock(FormView $view, $blockNameSuffix, array $variables = []); /** * Renders a CSRF token. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormTypeGuesserChain.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormTypeGuesserChain.php index 08f8cfd0..f38ba8e5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormTypeGuesserChain.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormTypeGuesserChain.php @@ -16,7 +16,7 @@ use Symfony\Component\Form\Guess\Guess; class FormTypeGuesserChain implements FormTypeGuesserInterface { - private $guessers = array(); + private $guessers = []; /** * @param FormTypeGuesserInterface[] $guessers Guessers as instances of FormTypeGuesserInterface @@ -93,7 +93,7 @@ class FormTypeGuesserChain implements FormTypeGuesserInterface */ private function guess(\Closure $closure) { - $guesses = array(); + $guesses = []; foreach ($this->guessers as $guesser) { if ($guess = $closure($guesser)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormTypeGuesserInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormTypeGuesserInterface.php index 0aec6364..6521ea47 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormTypeGuesserInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormTypeGuesserInterface.php @@ -32,7 +32,7 @@ interface FormTypeGuesserInterface * @param string $class The fully qualified class name * @param string $property The name of the property to guess for * - * @return Guess\ValueGuess A guess for the field's required setting + * @return Guess\ValueGuess|null A guess for the field's required setting */ public function guessRequired($class, $property); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormView.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormView.php index 25e9980f..0d1310b2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormView.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/FormView.php @@ -21,10 +21,10 @@ class FormView implements \ArrayAccess, \IteratorAggregate, \Countable /** * The variables assigned to this view. */ - public $vars = array( + public $vars = [ 'value' => null, - 'attr' => array(), - ); + 'attr' => [], + ]; /** * The parent view. @@ -36,7 +36,7 @@ class FormView implements \ArrayAccess, \IteratorAggregate, \Countable * * @var FormView[] */ - public $children = array(); + public $children = []; /** * Is the form attached to this renderer rendered? diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Forms.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Forms.php index c316eb08..7c61d640 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Forms.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Forms.php @@ -26,9 +26,9 @@ use Symfony\Component\Form\Extension\Core\CoreExtension; * ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType') * ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType') * ->add('age', 'Symfony\Component\Form\Extension\Core\Type\IntegerType') - * ->add('gender', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( - * 'choices' => array('Male' => 'm', 'Female' => 'f'), - * )) + * ->add('color', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', [ + * 'choices' => ['Red' => 'r', 'Blue' => 'b'], + * ]) * ->getForm(); * * You can also add custom extensions to the form factory: @@ -68,9 +68,9 @@ use Symfony\Component\Form\Extension\Core\CoreExtension; * use Symfony\Component\Form\Extension\Templating\TemplatingExtension; * * $formFactory = Forms::createFormFactoryBuilder() - * ->addExtension(new TemplatingExtension($engine, null, array( + * ->addExtension(new TemplatingExtension($engine, null, [ * 'FrameworkBundle:Form', - * ))) + * ])) * ->getFormFactory(); * * The next example shows how to include the "
    " layout: @@ -78,10 +78,10 @@ use Symfony\Component\Form\Extension\Core\CoreExtension; * use Symfony\Component\Form\Extension\Templating\TemplatingExtension; * * $formFactory = Forms::createFormFactoryBuilder() - * ->addExtension(new TemplatingExtension($engine, null, array( + * ->addExtension(new TemplatingExtension($engine, null, [ * 'FrameworkBundle:Form', * 'FrameworkBundle:FormTable', - * ))) + * ])) * ->getFormFactory(); * * @author Bernhard Schussek diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/NativeRequestHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/NativeRequestHandler.php index 94210d51..246ea92c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/NativeRequestHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/NativeRequestHandler.php @@ -26,13 +26,13 @@ class NativeRequestHandler implements RequestHandlerInterface /** * The allowed keys of the $_FILES array. */ - private static $fileKeys = array( + private static $fileKeys = [ 'error', 'name', 'size', 'tmp_name', 'type', - ); + ]; public function __construct(ServerParams $params = null) { @@ -80,13 +80,13 @@ class NativeRequestHandler implements RequestHandlerInterface $form->addError(new FormError( \call_user_func($form->getConfig()->getOption('upload_max_size_message')), null, - array('{{ max }}' => $this->serverParams->getNormalizedIniPostMaxSize()) + ['{{ max }}' => $this->serverParams->getNormalizedIniPostMaxSize()] )); return; } - $fixedFiles = array(); + $fixedFiles = []; foreach ($_FILES as $fileKey => $file) { $fixedFiles[$fileKey] = self::stripEmptyFiles(self::fixPhpFilesArray($file)); } @@ -94,10 +94,10 @@ class NativeRequestHandler implements RequestHandlerInterface if ('' === $name) { $params = $_POST; $files = $fixedFiles; - } elseif (array_key_exists($name, $_POST) || array_key_exists($name, $fixedFiles)) { - $default = $form->getConfig()->getCompound() ? array() : null; - $params = array_key_exists($name, $_POST) ? $_POST[$name] : $default; - $files = array_key_exists($name, $fixedFiles) ? $fixedFiles[$name] : $default; + } elseif (\array_key_exists($name, $_POST) || \array_key_exists($name, $fixedFiles)) { + $default = $form->getConfig()->getCompound() ? [] : null; + $params = \array_key_exists($name, $_POST) ? $_POST[$name] : $default; + $files = \array_key_exists($name, $fixedFiles) ? $fixedFiles[$name] : $default; } else { // Don't submit the form if it is not present in the request return; @@ -115,6 +115,10 @@ class NativeRequestHandler implements RequestHandlerInterface return; } + if (\is_array($data) && \array_key_exists('_method', $data) && $method === $data['_method'] && !$form->has('_method')) { + unset($data['_method']); + } + $form->submit($data, 'PATCH' !== $method); } @@ -183,13 +187,13 @@ class NativeRequestHandler implements RequestHandlerInterface } foreach ($data['name'] as $key => $name) { - $files[$key] = self::fixPhpFilesArray(array( + $files[$key] = self::fixPhpFilesArray([ 'error' => $data['error'][$key], 'name' => $name, 'type' => $data['type'][$key], 'tmp_name' => $data['tmp_name'][$key], 'size' => $data['size'][$key], - )); + ]); } return $files; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/PreloadedExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/PreloadedExtension.php index b26dbe63..759ae9ad 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/PreloadedExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/PreloadedExtension.php @@ -20,8 +20,8 @@ use Symfony\Component\Form\Exception\InvalidArgumentException; */ class PreloadedExtension implements FormExtensionInterface { - private $types = array(); - private $typeExtensions = array(); + private $types = []; + private $typeExtensions = []; private $typeGuesser; /** @@ -68,7 +68,7 @@ class PreloadedExtension implements FormExtensionInterface { return isset($this->typeExtensions[$name]) ? $this->typeExtensions[$name] - : array(); + : []; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormType.php index 4a0c9588..0efde408 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormType.php @@ -42,7 +42,7 @@ class ResolvedFormType implements ResolvedFormTypeInterface */ private $optionsResolver; - public function __construct(FormTypeInterface $innerType, array $typeExtensions = array(), ResolvedFormTypeInterface $parent = null) + public function __construct(FormTypeInterface $innerType, array $typeExtensions = [], ResolvedFormTypeInterface $parent = null) { foreach ($typeExtensions as $extension) { if (!$extension instanceof FormTypeExtensionInterface) { @@ -90,7 +90,7 @@ class ResolvedFormType implements ResolvedFormTypeInterface /** * {@inheritdoc} */ - public function createBuilder(FormFactoryInterface $factory, $name, array $options = array()) + public function createBuilder(FormFactoryInterface $factory, $name, array $options = []) { $options = $this->getOptionsResolver()->resolve($options); @@ -205,7 +205,7 @@ class ResolvedFormType implements ResolvedFormTypeInterface * Override this method if you want to customize the builder class. * * @param string $name The name of the builder - * @param string $dataClass The data class + * @param string|null $dataClass The data class * @param FormFactoryInterface $factory The current form factory * @param array $options The builder options * diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormTypeInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormTypeInterface.php index dc3b81d2..c4ab1d64 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormTypeInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormTypeInterface.php @@ -57,7 +57,7 @@ interface ResolvedFormTypeInterface * * @return FormBuilderInterface The created form builder */ - public function createBuilder(FormFactoryInterface $factory, $name, array $options = array()); + public function createBuilder(FormFactoryInterface $factory, $name, array $options = []); /** * Creates a new form view for a form of this type. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormIntegrationTestCase.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormIntegrationTestCase.php index 28e6cb38..7aa7c1c4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormIntegrationTestCase.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormIntegrationTestCase.php @@ -37,21 +37,21 @@ abstract class FormIntegrationTestCase extends TestCase protected function getExtensions() { - return array(); + return []; } protected function getTypeExtensions() { - return array(); + return []; } protected function getTypes() { - return array(); + return []; } protected function getTypeGuessers() { - return array(); + return []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormPerformanceTestCase.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormPerformanceTestCase.php index 01440575..e11ce033 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormPerformanceTestCase.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormPerformanceTestCase.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Form\Test; +use Symfony\Component\Form\Tests\VersionAwareTest; + /** * Base class for performance tests. * @@ -21,6 +23,8 @@ namespace Symfony\Component\Form\Test; */ abstract class FormPerformanceTestCase extends FormIntegrationTestCase { + use VersionAwareTest; + /** * @var int */ diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Test/Traits/ValidatorExtensionTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Test/Traits/ValidatorExtensionTrait.php index d5bcb04a..07dd9e0d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Test/Traits/ValidatorExtensionTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Test/Traits/ValidatorExtensionTrait.php @@ -18,8 +18,14 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; trait ValidatorExtensionTrait { + /** + * @var ValidatorInterface|null + */ protected $validator; + /** + * @return ValidatorExtension + */ protected function getValidatorExtension() { if (!interface_exists(ValidatorInterface::class)) { @@ -31,9 +37,9 @@ trait ValidatorExtensionTrait } $this->validator = $this->getMockBuilder(ValidatorInterface::class)->getMock(); - $metadata = $this->getMockBuilder(ClassMetadata::class)->disableOriginalConstructor()->setMethods(array('addPropertyConstraint'))->getMock(); + $metadata = $this->getMockBuilder(ClassMetadata::class)->disableOriginalConstructor()->setMethods(['addPropertyConstraint'])->getMock(); $this->validator->expects($this->any())->method('getMetadataFor')->will($this->returnValue($metadata)); - $this->validator->expects($this->any())->method('validate')->will($this->returnValue(array())); + $this->validator->expects($this->any())->method('validate')->will($this->returnValue([])); return new ValidatorExtension($this->validator); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Test/TypeTestCase.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Test/TypeTestCase.php index aa7516f5..7c9aa96a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Test/TypeTestCase.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Test/TypeTestCase.php @@ -32,7 +32,7 @@ abstract class TypeTestCase extends FormIntegrationTestCase parent::setUp(); $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); - $this->builder = new FormBuilder(null, null, $this->dispatcher, $this->factory); + $this->builder = new FormBuilder('', null, $this->dispatcher, $this->factory); } protected function tearDown() @@ -44,7 +44,7 @@ abstract class TypeTestCase extends FormIntegrationTestCase protected function getExtensions() { - $extensions = array(); + $extensions = []; if (\in_array(ValidatorExtensionTrait::class, class_uses($this))) { $extensions[] = $this->getValidatorExtension(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php index 36bb31c3..ab844497 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php @@ -39,11 +39,11 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest public function testRowOverrideVariables() { $view = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType')->createView(); - $html = $this->renderRow($view, array( - 'attr' => array('class' => 'my&class'), + $html = $this->renderRow($view, [ + 'attr' => ['class' => 'my&class'], 'label' => 'foo&bar', - 'label_attr' => array('class' => 'my&label&class'), - )); + 'label_attr' => ['class' => 'my&label&class'], + ]); $this->assertMatchesXpath($html, '/div @@ -283,11 +283,11 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest public function testCollection() { - $form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', array('a', 'b'), array( + $form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', ['a', 'b'], [ 'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./div[./input[@type="text"][@value="a"]] @@ -301,15 +301,15 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest // https://github.com/symfony/symfony/issues/5038 public function testCollectionWithAlternatingRowTypes() { - $data = array( - array('title' => 'a'), - array('title' => 'b'), - ); - $form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', $data, array( + $data = [ + ['title' => 'a'], + ['title' => 'b'], + ]; + $form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', $data, [ 'entry_type' => 'Symfony\Component\Form\Tests\Fixtures\AlternatingRowType', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./div[./div/div/input[@type="text"][@value="a"]] @@ -323,11 +323,11 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest public function testEmptyCollection() { - $form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', array(), array( + $form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', [], [ 'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [./input[@type="hidden"][@id="names__token"]] [count(./div)=0] @@ -340,15 +340,15 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest $collection = $this->factory->createNamedBuilder( 'collection', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', - array('a', 'b'), - array('entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType') + ['a', 'b'], + ['entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType'] ); $form = $this->factory->createNamedBuilder('form', 'Symfony\Component\Form\Extension\Core\Type\FormType') ->add($collection) ->getForm(); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./div @@ -385,10 +385,10 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest ->getForm(); // include ampersands everywhere to validate escaping - $html = $this->renderForm($form->createView(), array( + $html = $this->renderForm($form->createView(), [ 'id' => 'my&id', - 'attr' => array('class' => 'my&class'), - )); + 'attr' => ['class' => 'my&class'], + ]); $this->assertMatchesXpath($html, '/form @@ -426,7 +426,7 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType') ->getForm(); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./div @@ -451,14 +451,14 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest { $form = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') ->add($this->factory - ->createNamedBuilder('child', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array('error_bubbling' => false)) + ->createNamedBuilder('child', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, ['error_bubbling' => false]) ->add('grandChild', 'Symfony\Component\Form\Extension\Core\Type\FormType') ) ->getForm(); $form->get('child')->addError(new FormError('[trans]Error![/trans]')); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./div/label @@ -483,7 +483,7 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest ) ->getForm(); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./div @@ -496,11 +496,11 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest public function testRepeated() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType', 'foobar', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType', 'foobar', [ 'type' => 'Symfony\Component\Form\Extension\Core\Type\TextType', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./div @@ -522,13 +522,13 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest public function testRepeatedWithCustomOptions() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType', null, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType', null, [ // the global required value cannot be overridden - 'first_options' => array('label' => 'Test', 'required' => false), - 'second_options' => array('label' => 'Test2'), - )); + 'first_options' => ['label' => 'Test', 'required' => false], + 'second_options' => ['label' => 'Test2'], + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./div @@ -554,7 +554,7 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest ->add('name', 'Symfony\Component\Form\Extension\Core\Type\SearchType') ->getForm(); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./div @@ -586,9 +586,9 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest public function testLabelIsNotRenderedWhenSetToFalse() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, [ 'label' => false, - )); + ]); $html = $this->renderRow($form->createView()); $this->assertMatchesXpath($html, @@ -637,7 +637,7 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest $this->setTheme($view, $parentTheme); $this->setTheme($view['child'], $childTheme); - $this->assertWidgetMatchesXpath($view, array(), + $this->assertWidgetMatchesXpath($view, [], '/div [ ./div @@ -669,11 +669,11 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest */ public function testCollectionRowWithCustomBlock() { - $collection = array('one', 'two', 'three'); + $collection = ['one', 'two', 'three']; $form = $this->factory->createNamedBuilder('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', $collection) ->getForm(); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./div[./label[.="Custom label: [trans]0[/trans]"]] @@ -690,13 +690,13 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest */ public function testChoiceRowWithCustomBlock() { - $form = $this->factory->createNamedBuilder('name_c', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 'a', array( - 'choices' => array('ChoiceA' => 'a', 'ChoiceB' => 'b'), + $form = $this->factory->createNamedBuilder('name_c', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 'a', [ + 'choices' => ['ChoiceA' => 'a', 'ChoiceB' => 'b'], 'expanded' => true, - )) + ]) ->getForm(); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./label[.="Custom name label: [trans]ChoiceA[/trans]"] @@ -708,14 +708,14 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest public function testSingleChoiceExpandedWithLabelsAsFalse() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'choice_label' => false, 'multiple' => false, 'expanded' => true, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] @@ -730,8 +730,8 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest public function testSingleChoiceExpandedWithLabelsSetByCallable() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'], 'choice_label' => function ($choice, $label, $value) { if ('&b' === $choice) { return false; @@ -741,9 +741,9 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest }, 'multiple' => false, 'expanded' => true, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] @@ -761,16 +761,16 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest public function testSingleChoiceExpandedWithLabelsSetFalseByCallable() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'choice_label' => function () { return false; }, 'multiple' => false, 'expanded' => true, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] @@ -785,14 +785,14 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest public function testMultipleChoiceExpandedWithLabelsAsFalse() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', ['&a'], [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'choice_label' => false, 'multiple' => true, 'expanded' => true, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@value="&a"][@checked] @@ -807,8 +807,8 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest public function testMultipleChoiceExpandedWithLabelsSetByCallable() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', ['&a'], [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'], 'choice_label' => function ($choice, $label, $value) { if ('&b' === $choice) { return false; @@ -818,9 +818,9 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest }, 'multiple' => true, 'expanded' => true, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@value="&a"][@checked] @@ -838,16 +838,16 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest public function testMultipleChoiceExpandedWithLabelsSetFalseByCallable() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', ['&a'], [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'choice_label' => function () { return false; }, 'multiple' => true, 'expanded' => true, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@value="&a"][@checked] @@ -901,16 +901,16 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest $this->renderWidget($view['field1']); // Rest should only contain field2, but isn't rendered - $html = $this->renderEnd($view, array('render_rest' => false)); + $html = $this->renderEnd($view, ['render_rest' => false]); $this->assertEquals('', $html); } public function testWidgetContainerAttributes() { - $form = $this->factory->createNamed('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( - 'attr' => array('class' => 'foobar', 'data-foo' => 'bar'), - )); + $form = $this->factory->createNamed('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, [ + 'attr' => ['class' => 'foobar', 'data-foo' => 'bar'], + ]); $form->add('text', 'Symfony\Component\Form\Extension\Core\Type\TextType'); @@ -922,9 +922,9 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest public function testWidgetContainerAttributeNameRepeatedIfTrue() { - $form = $this->factory->createNamed('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( - 'attr' => array('foo' => true), - )); + $form = $this->factory->createNamed('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, [ + 'attr' => ['foo' => true], + ]); $html = $this->renderWidget($form->createView()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractExtensionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractExtensionTest.php index 815b4f80..c3fa1b6c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractExtensionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractExtensionTest.php @@ -35,7 +35,7 @@ class ConcreteExtension extends AbstractExtension { protected function loadTypes() { - return array(new FooType()); + return [new FooType()]; } protected function loadTypeGuesser() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractFormTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractFormTest.php index 977b5f40..00d9e0fb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractFormTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractFormTest.php @@ -55,36 +55,16 @@ abstract class AbstractFormTest extends TestCase /** * @param string $name * @param EventDispatcherInterface $dispatcher - * @param string $dataClass + * @param string|null $dataClass * @param array $options * * @return FormBuilder */ - protected function getBuilder($name = 'name', EventDispatcherInterface $dispatcher = null, $dataClass = null, array $options = array()) + protected function getBuilder($name = 'name', EventDispatcherInterface $dispatcher = null, $dataClass = null, array $options = []) { return new FormBuilder($name, $dataClass, $dispatcher ?: $this->dispatcher, $this->factory, $options); } - /** - * @param string $name - * - * @return \PHPUnit_Framework_MockObject_MockObject - */ - protected function getMockForm($name = 'name') - { - $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); - $config = $this->getMockBuilder('Symfony\Component\Form\FormConfigInterface')->getMock(); - - $form->expects($this->any()) - ->method('getName') - ->will($this->returnValue($name)); - $form->expects($this->any()) - ->method('getConfig') - ->will($this->returnValue($config)); - - return $form; - } - /** * @return \PHPUnit_Framework_MockObject_MockObject */ diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php index 278bdbe8..4e01253e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php @@ -18,8 +18,10 @@ use Symfony\Component\Form\Test\FormIntegrationTestCase; abstract class AbstractLayoutTest extends FormIntegrationTestCase { + use VersionAwareTest; + protected $csrfTokenManager; - protected $testableFeatures = array(); + protected $testableFeatures = []; protected function setUp() { @@ -36,9 +38,9 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase protected function getExtensions() { - return array( + return [ new CsrfExtension($this->csrfTokenManager), - ); + ]; } protected function tearDown() @@ -91,10 +93,10 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase protected function assertWidgetMatchesXpath(FormView $view, array $vars, $xpath) { // include ampersands everywhere to validate escaping - $html = $this->renderWidget($view, array_merge(array( + $html = $this->renderWidget($view, array_merge([ 'id' => 'my&id', - 'attr' => array('class' => 'my&class'), - ), $vars)); + 'attr' => ['class' => 'my&class'], + ], $vars)); if (!isset($vars['id'])) { $xpath = trim($xpath).' @@ -109,21 +111,21 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase $this->assertMatchesXpath($html, $xpath); } - abstract protected function renderForm(FormView $view, array $vars = array()); + abstract protected function renderForm(FormView $view, array $vars = []); - abstract protected function renderLabel(FormView $view, $label = null, array $vars = array()); + abstract protected function renderLabel(FormView $view, $label = null, array $vars = []); abstract protected function renderErrors(FormView $view); - abstract protected function renderWidget(FormView $view, array $vars = array()); + abstract protected function renderWidget(FormView $view, array $vars = []); - abstract protected function renderRow(FormView $view, array $vars = array()); + abstract protected function renderRow(FormView $view, array $vars = []); - abstract protected function renderRest(FormView $view, array $vars = array()); + abstract protected function renderRest(FormView $view, array $vars = []); - abstract protected function renderStart(FormView $view, array $vars = array()); + abstract protected function renderStart(FormView $view, array $vars = []); - abstract protected function renderEnd(FormView $view, array $vars = array()); + abstract protected function renderEnd(FormView $view, array $vars = []); abstract protected function setTheme(FormView $view, array $themes, $useDefaultThemes = true); @@ -131,7 +133,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); $view = $form->createView(); - $this->renderWidget($view, array('label' => 'foo')); + $this->renderWidget($view, ['label' => 'foo']); $html = $this->renderLabel($view); $this->assertMatchesXpath($html, @@ -144,9 +146,9 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testLabelWithoutTranslation() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, [ 'translation_domain' => false, - )); + ]); $this->assertMatchesXpath($this->renderLabel($form->createView()), '/label @@ -160,7 +162,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType'); $view = $form->createView(); - $this->renderWidget($view, array('label' => 'foo')); + $this->renderWidget($view, ['label' => 'foo']); $html = $this->renderLabel($view); $this->assertMatchesXpath($html, @@ -173,9 +175,9 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testLabelWithCustomTextPassedAsOption() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, [ 'label' => 'Custom label', - )); + ]); $html = $this->renderLabel($form->createView()); $this->assertMatchesXpath($html, @@ -201,9 +203,9 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testLabelWithCustomTextPassedAsOptionAndDirectly() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, [ 'label' => 'Custom label', - )); + ]); $html = $this->renderLabel($form->createView(), 'Overridden label'); $this->assertMatchesXpath($html, @@ -217,11 +219,11 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testLabelDoesNotRenderFieldAttributes() { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); - $html = $this->renderLabel($form->createView(), null, array( - 'attr' => array( + $html = $this->renderLabel($form->createView(), null, [ + 'attr' => [ 'class' => 'my&class', - ), - )); + ], + ]); $this->assertMatchesXpath($html, '/label @@ -234,11 +236,11 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testLabelWithCustomAttributesPassedDirectly() { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); - $html = $this->renderLabel($form->createView(), null, array( - 'label_attr' => array( + $html = $this->renderLabel($form->createView(), null, [ + 'label_attr' => [ 'class' => 'my&class', - ), - )); + ], + ]); $this->assertMatchesXpath($html, '/label @@ -251,11 +253,11 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testLabelWithCustomTextAndCustomAttributesPassedDirectly() { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); - $html = $this->renderLabel($form->createView(), 'Custom label', array( - 'label_attr' => array( + $html = $this->renderLabel($form->createView(), 'Custom label', [ + 'label_attr' => [ 'class' => 'my&class', - ), - )); + ], + ]); $this->assertMatchesXpath($html, '/label @@ -269,14 +271,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase // https://github.com/symfony/symfony/issues/5029 public function testLabelWithCustomTextAsOptionAndCustomAttributesPassedDirectly() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, [ 'label' => 'Custom label', - )); - $html = $this->renderLabel($form->createView(), null, array( - 'label_attr' => array( + ]); + $html = $this->renderLabel($form->createView(), null, [ + 'label_attr' => [ 'class' => 'my&class', - ), - )); + ], + ]); $this->assertMatchesXpath($html, '/label @@ -293,7 +295,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase ->add('myfield', 'Symfony\Component\Form\Extension\Core\Type\TextType') ->getForm(); $view = $form->get('myfield')->createView(); - $html = $this->renderLabel($view, null, array('label_format' => 'form.%name%')); + $html = $this->renderLabel($view, null, ['label_format' => 'form.%name%']); $this->assertMatchesXpath($html, '/label @@ -309,7 +311,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase ->add('myfield', 'Symfony\Component\Form\Extension\Core\Type\TextType') ->getForm(); $view = $form->get('myfield')->createView(); - $html = $this->renderLabel($view, null, array('label_format' => 'form.%id%')); + $html = $this->renderLabel($view, null, ['label_format' => 'form.%id%']); $this->assertMatchesXpath($html, '/label @@ -321,7 +323,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testLabelFormatAsFormOption() { - $options = array('label_format' => 'form.%name%'); + $options = ['label_format' => 'form.%name%']; $form = $this->factory->createNamedBuilder('myform', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, $options) ->add('myfield', 'Symfony\Component\Form\Extension\Core\Type\TextType') @@ -339,10 +341,10 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testLabelFormatOverriddenOption() { - $options = array('label_format' => 'form.%name%'); + $options = ['label_format' => 'form.%name%']; $form = $this->factory->createNamedBuilder('myform', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, $options) - ->add('myfield', 'Symfony\Component\Form\Extension\Core\Type\TextType', array('label_format' => 'field.%name%')) + ->add('myfield', 'Symfony\Component\Form\Extension\Core\Type\TextType', ['label_format' => 'field.%name%']) ->getForm(); $view = $form->get('myfield')->createView(); $html = $this->renderLabel($view); @@ -357,9 +359,9 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testLabelWithoutTranslationOnButton() { - $form = $this->factory->createNamedBuilder('myform', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + $form = $this->factory->createNamedBuilder('myform', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'translation_domain' => false, - )) + ]) ->add('mybutton', 'Symfony\Component\Form\Extension\Core\Type\ButtonType') ->getForm(); $view = $form->get('mybutton')->createView(); @@ -380,7 +382,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase ->add('mybutton', 'Symfony\Component\Form\Extension\Core\Type\ButtonType') ->getForm(); $view = $form->get('mybutton')->createView(); - $html = $this->renderWidget($view, array('label_format' => 'form.%name%')); + $html = $this->renderWidget($view, ['label_format' => 'form.%name%']); $this->assertMatchesXpath($html, '/button @@ -397,7 +399,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase ->add('mybutton', 'Symfony\Component\Form\Extension\Core\Type\ButtonType') ->getForm(); $view = $form->get('mybutton')->createView(); - $html = $this->renderWidget($view, array('label_format' => 'form.%id%')); + $html = $this->renderWidget($view, ['label_format' => 'form.%id%']); $this->assertMatchesXpath($html, '/button @@ -449,7 +451,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', true); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="checkbox"] [@name="name"] @@ -463,7 +465,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', false); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="checkbox"] [@name="name"] @@ -474,11 +476,11 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testCheckboxWithValue() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', false, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', false, [ 'value' => 'foo&bar', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="checkbox"] [@name="name"] @@ -489,11 +491,11 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoice() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'multiple' => false, 'expanded' => false, - )); + ]); // If the field is collapsed, has no "multiple" attribute, is required but // has *no* empty value, the "required" must not be added, otherwise @@ -507,7 +509,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase // have a multiple attribute specified, and has a display size of 1, // then the select element must have a placeholder label option." - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name"] [not(@required)] @@ -522,14 +524,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSelectWithSizeBiggerThanOneCanBeRequired() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', null, array( - 'choices' => array('a', 'b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', null, [ + 'choices' => ['a', 'b'], 'multiple' => false, 'expanded' => false, - 'attr' => array('size' => 2), - )); + 'attr' => ['size' => 2], + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name"] [@required="required"] @@ -541,14 +543,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceWithoutTranslation() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'multiple' => false, 'expanded' => false, 'choice_translation_domain' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name"] [not(@required)] @@ -563,16 +565,16 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceWithPlaceholderWithoutTranslation() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'multiple' => false, 'expanded' => false, 'required' => false, 'translation_domain' => false, 'placeholder' => 'Placeholder&Not&Translated', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name"] [not(@required)] @@ -588,14 +590,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceAttributes() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), - 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], + 'choice_attr' => ['Choice&B' => ['class' => 'foo&bar']], 'multiple' => false, 'expanded' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name"] [not(@required)] @@ -610,14 +612,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceAttributesWithMainAttributes() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'multiple' => false, 'expanded' => false, - 'attr' => array('class' => 'bar&baz'), - )); + 'attr' => ['class' => 'bar&baz'], + ]); - $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'bar&baz')), + $this->assertWidgetMatchesXpath($form->createView(), ['attr' => ['class' => 'bar&baz']], '/select [@name="name"] [@class="bar&baz"] @@ -633,14 +635,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleExpandedChoiceAttributesWithMainAttributes() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'multiple' => false, 'expanded' => true, - 'attr' => array('class' => 'bar&baz'), - )); + 'attr' => ['class' => 'bar&baz'], + ]); - $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'bar&baz')), + $this->assertWidgetMatchesXpath($form->createView(), ['attr' => ['class' => 'bar&baz']], '/div [@class="bar&baz"] [ @@ -657,14 +659,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceWithPreferred() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), - 'preferred_choices' => array('&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], + 'preferred_choices' => ['&b'], 'multiple' => false, 'expanded' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array('separator' => '-- sep --'), + $this->assertWidgetMatchesXpath($form->createView(), ['separator' => '-- sep --'], '/select [@name="name"] [not(@required)] @@ -680,14 +682,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceWithPreferredAndNoSeparator() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), - 'preferred_choices' => array('&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], + 'preferred_choices' => ['&b'], 'multiple' => false, 'expanded' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array('separator' => null), + $this->assertWidgetMatchesXpath($form->createView(), ['separator' => null], '/select [@name="name"] [not(@required)] @@ -702,14 +704,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceWithPreferredAndBlankSeparator() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), - 'preferred_choices' => array('&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], + 'preferred_choices' => ['&b'], 'multiple' => false, 'expanded' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array('separator' => ''), + $this->assertWidgetMatchesXpath($form->createView(), ['separator' => ''], '/select [@name="name"] [not(@required)] @@ -725,14 +727,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testChoiceWithOnlyPreferred() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), - 'preferred_choices' => array('&a', '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], + 'preferred_choices' => ['&a', '&b'], 'multiple' => false, 'expanded' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [count(./option)=2] ' @@ -741,14 +743,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceNonRequired() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'required' => false, 'multiple' => false, 'expanded' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name"] [not(@required)] @@ -764,14 +766,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceNonRequiredNoneSelected() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', null, array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', null, [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'required' => false, 'multiple' => false, 'expanded' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name"] [not(@required)] @@ -787,15 +789,15 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceNonRequiredWithPlaceholder() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'multiple' => false, 'expanded' => false, 'required' => false, 'placeholder' => 'Select&Anything&Not&Me', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name"] [not(@required)] @@ -811,18 +813,18 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceRequiredWithPlaceholder() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'required' => true, 'multiple' => false, 'expanded' => false, 'placeholder' => 'Test&Me', - )); + ]); // The "disabled" attribute was removed again due to a bug in the // BlackBerry 10 browser. // See https://github.com/symfony/symfony/pull/7678 - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name"] [@required="required"] @@ -838,17 +840,17 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceRequiredWithPlaceholderViaView() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'required' => true, 'multiple' => false, 'expanded' => false, - )); + ]); // The "disabled" attribute was removed again due to a bug in the // BlackBerry 10 browser. // See https://github.com/symfony/symfony/pull/7678 - $this->assertWidgetMatchesXpath($form->createView(), array('placeholder' => ''), + $this->assertWidgetMatchesXpath($form->createView(), ['placeholder' => ''], '/select [@name="name"] [@required="required"] @@ -864,16 +866,16 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceGrouped() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array( - 'Group&1' => array('Choice&A' => '&a', 'Choice&B' => '&b'), - 'Group&2' => array('Choice&C' => '&c'), - ), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => [ + 'Group&1' => ['Choice&A' => '&a', 'Choice&B' => '&b'], + 'Group&2' => ['Choice&C' => '&c'], + ], 'multiple' => false, 'expanded' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name"] [./optgroup[@label="[trans]Group&1[/trans]"] @@ -894,14 +896,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testMultipleChoice() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', ['&a'], [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'required' => true, 'multiple' => true, 'expanded' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name[]"] [@required="required"] @@ -917,15 +919,15 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testMultipleChoiceAttributes() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), - 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', ['&a'], [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], + 'choice_attr' => ['Choice&B' => ['class' => 'foo&bar']], 'required' => true, 'multiple' => true, 'expanded' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name[]"] [@required="required"] @@ -941,14 +943,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testMultipleChoiceSkipsPlaceholder() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', ['&a'], [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'multiple' => true, 'expanded' => false, 'placeholder' => 'Test&Me', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name[]"] [@multiple="multiple"] @@ -963,14 +965,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testMultipleChoiceNonRequired() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', ['&a'], [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'required' => false, 'multiple' => true, 'expanded' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name[]"] [@multiple="multiple"] @@ -985,13 +987,13 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceExpanded() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'multiple' => false, 'expanded' => true, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] @@ -1007,15 +1009,15 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceExpandedWithoutTranslation() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'multiple' => false, 'expanded' => true, 'choice_translation_domain' => false, 'placeholder' => 'Placeholder&Not&Translated', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] @@ -1031,14 +1033,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceExpandedAttributes() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), - 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], + 'choice_attr' => ['Choice&B' => ['class' => 'foo&bar']], 'multiple' => false, 'expanded' => true, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] @@ -1054,15 +1056,15 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceExpandedWithPlaceholder() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'multiple' => false, 'expanded' => true, 'placeholder' => 'Test&Me', 'required' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input[@type="radio"][@name="name"][@id="name_placeholder"][not(@checked)] @@ -1080,16 +1082,16 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceExpandedWithPlaceholderWithoutTranslation() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'], 'multiple' => false, 'expanded' => true, 'required' => false, 'choice_translation_domain' => false, 'placeholder' => 'Placeholder&Not&Translated', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input[@type="radio"][@name="name"][@id="name_placeholder"][not(@checked)] @@ -1107,13 +1109,13 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testSingleChoiceExpandedWithBooleanValue() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', true, array( - 'choices' => array('Choice&A' => '1', 'Choice&B' => '0'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', true, [ + 'choices' => ['Choice&A' => '1', 'Choice&B' => '0'], 'multiple' => false, 'expanded' => true, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input[@type="radio"][@name="name"][@id="name_0"][@checked] @@ -1129,14 +1131,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testMultipleChoiceExpanded() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a', '&c'), array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', ['&a', '&c'], [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'], 'multiple' => true, 'expanded' => true, 'required' => true, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@checked][not(@required)] @@ -1154,15 +1156,15 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testMultipleChoiceExpandedWithoutTranslation() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a', '&c'), array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', ['&a', '&c'], [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'], 'multiple' => true, 'expanded' => true, 'required' => true, 'choice_translation_domain' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@checked][not(@required)] @@ -1180,15 +1182,15 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testMultipleChoiceExpandedAttributes() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a', '&c'), array( - 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), - 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', ['&a', '&c'], [ + 'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'], + 'choice_attr' => ['Choice&B' => ['class' => 'foo&bar']], 'multiple' => true, 'expanded' => true, 'required' => true, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@checked][not(@required)] @@ -1208,7 +1210,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CountryType', 'AT'); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name"] [./option[@value="AT"][@selected="selected"][.="Austria"]] @@ -1219,12 +1221,12 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testCountryWithPlaceholder() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CountryType', 'AT', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CountryType', 'AT', [ 'placeholder' => 'Select&Country', 'required' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name"] [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Select&Country[/trans]"]] @@ -1236,12 +1238,12 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testDateTime() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', [ 'input' => 'string', 'with_seconds' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./div @@ -1275,13 +1277,13 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testDateTimeWithPlaceholderGlobal() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', null, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', null, [ 'input' => 'string', 'placeholder' => 'Change&Me', 'required' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./div @@ -1315,14 +1317,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testDateTimeWithHourAndMinute() { - $data = array('year' => date('Y'), 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5'); + $data = ['year' => date('Y'), 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5']; - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', $data, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', $data, [ 'input' => 'array', 'required' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./div @@ -1356,12 +1358,12 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testDateTimeWithSeconds() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', [ 'input' => 'string', 'with_seconds' => true, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./div @@ -1398,13 +1400,13 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testDateTimeSingleText() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', [ 'input' => 'string', 'date_widget' => 'single_text', 'time_widget' => 'single_text', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input @@ -1424,14 +1426,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testDateTimeWithWidgetSingleText() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', [ 'input' => 'string', 'widget' => 'single_text', 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="datetime-local"] [@name="name"] @@ -1442,16 +1444,16 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testDateTimeWithWidgetSingleTextIgnoreDateAndTimeWidgets() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', [ 'input' => 'string', 'date_widget' => 'choice', 'time_widget' => 'choice', 'widget' => 'single_text', 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="datetime-local"] [@name="name"] @@ -1462,12 +1464,12 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testDateChoice() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', date('Y').'-02-03', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', date('Y').'-02-03', [ 'input' => 'string', 'widget' => 'choice', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./select @@ -1487,14 +1489,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testDateChoiceWithPlaceholderGlobal() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', null, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', null, [ 'input' => 'string', 'widget' => 'choice', 'placeholder' => 'Change&Me', 'required' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./select @@ -1514,14 +1516,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testDateChoiceWithPlaceholderOnYear() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', null, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', null, [ 'input' => 'string', 'widget' => 'choice', 'required' => false, - 'placeholder' => array('year' => 'Change&Me'), - )); + 'placeholder' => ['year' => 'Change&Me'], + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./select @@ -1541,12 +1543,12 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testDateText() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', '2011-02-03', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', '2011-02-03', [ 'input' => 'string', 'widget' => 'text', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input @@ -1569,12 +1571,12 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testDateSingleText() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', '2011-02-03', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', '2011-02-03', [ 'input' => 'string', 'widget' => 'single_text', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="date"] [@name="name"] @@ -1597,11 +1599,11 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testBirthDay() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\BirthdayType', '2000-02-03', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\BirthdayType', '2000-02-03', [ 'input' => 'string', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./select @@ -1621,13 +1623,13 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testBirthDayWithPlaceholder() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\BirthdayType', '1950-01-01', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\BirthdayType', '1950-01-01', [ 'input' => 'string', 'placeholder' => '', 'required' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./select @@ -1652,7 +1654,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\EmailType', 'foo&bar'); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="email"] [@name="name"] @@ -1664,11 +1666,11 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testEmailWithMaxLength() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\EmailType', 'foo&bar', array( - 'attr' => array('maxlength' => 123), - )); + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\EmailType', 'foo&bar', [ + 'attr' => ['maxlength' => 123], + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="email"] [@name="name"] @@ -1682,7 +1684,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\FileType'); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="file"] ' @@ -1693,7 +1695,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\HiddenType', 'foo&bar'); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="hidden"] [@name="name"] @@ -1704,11 +1706,11 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testDisabled() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, [ 'disabled' => true, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="text"] [@name="name"] @@ -1721,7 +1723,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\IntegerType', 123); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="number"] [@name="name"] @@ -1730,11 +1732,26 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase ); } + public function testIntegerTypeWithGroupingRendersAsTextInput() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\IntegerType', 123, [ + 'grouping' => true, + ]); + + $this->assertWidgetMatchesXpath($form->createView(), [], +'/input + [@type="text"] + [@name="name"] + [@value="123"] +' + ); + } + public function testLanguage() { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\LanguageType', 'de'); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name"] [./option[@value="de"][@selected="selected"][.="German"]] @@ -1747,7 +1764,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\LocaleType', 'de_AT'); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name"] [./option[@value="de_AT"][@selected="selected"][.="German (Austria)"]] @@ -1758,11 +1775,11 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testMoney() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', 1234.56, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', 1234.56, [ 'currency' => 'EUR', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="text"] [@name="name"] @@ -1776,7 +1793,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\NumberType', 1234.56); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="text"] [@name="name"] @@ -1789,7 +1806,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\PasswordType', 'foo&bar'); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="password"] [@name="name"] @@ -1799,12 +1816,12 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testPasswordSubmittedWithNotAlwaysEmpty() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\PasswordType', null, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\PasswordType', null, [ 'always_empty' => false, - )); + ]); $form->submit('foo&bar'); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="password"] [@name="name"] @@ -1815,11 +1832,11 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testPasswordWithMaxLength() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\PasswordType', 'foo&bar', array( - 'attr' => array('maxlength' => 123), - )); + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\PasswordType', 'foo&bar', [ + 'attr' => ['maxlength' => 123], + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="password"] [@name="name"] @@ -1832,7 +1849,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\PercentType', 0.1); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="text"] [@name="name"] @@ -1846,7 +1863,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RadioType', true); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="radio"] [@name="name"] @@ -1860,7 +1877,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RadioType', false); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="radio"] [@name="name"] @@ -1871,11 +1888,11 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testRadioWithValue() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RadioType', false, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RadioType', false, [ 'value' => 'foo&bar', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="radio"] [@name="name"] @@ -1886,9 +1903,9 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testRange() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RangeType', 42, array('attr' => array('min' => 5))); + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RangeType', 42, ['attr' => ['min' => 5]]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="range"] [@name="name"] @@ -1900,9 +1917,9 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testRangeWithMinMaxValues() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RangeType', 42, array('attr' => array('min' => 5, 'max' => 57))); + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RangeType', 42, ['attr' => ['min' => 5, 'max' => 57]]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="range"] [@name="name"] @@ -1915,11 +1932,11 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testTextarea() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextareaType', 'foo&bar', array( - 'attr' => array('pattern' => 'foo'), - )); + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextareaType', 'foo&bar', [ + 'attr' => ['pattern' => 'foo'], + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/textarea [@name="name"] [@pattern="foo"] @@ -1932,7 +1949,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'foo&bar'); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="text"] [@name="name"] @@ -1944,11 +1961,11 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testTextWithMaxLength() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'foo&bar', array( - 'attr' => array('maxlength' => 123), - )); + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'foo&bar', [ + 'attr' => ['maxlength' => 123], + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="text"] [@name="name"] @@ -1962,7 +1979,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\SearchType', 'foo&bar'); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="search"] [@name="name"] @@ -1974,12 +1991,12 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testTime() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', '04:05:06', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', '04:05:06', [ 'input' => 'string', 'with_seconds' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./select @@ -1998,12 +2015,12 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testTimeWithSeconds() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', '04:05:06', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', '04:05:06', [ 'input' => 'string', 'with_seconds' => true, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./select @@ -2029,12 +2046,12 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testTimeText() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', '04:05:06', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', '04:05:06', [ 'input' => 'string', 'widget' => 'text', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./input @@ -2059,12 +2076,12 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testTimeSingleText() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', '04:05:06', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', '04:05:06', [ 'input' => 'string', 'widget' => 'single_text', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="time"] [@name="name"] @@ -2076,13 +2093,13 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testTimeWithPlaceholderGlobal() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', null, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', null, [ 'input' => 'string', 'placeholder' => 'Change&Me', 'required' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./select @@ -2101,13 +2118,13 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testTimeWithPlaceholderOnYear() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', null, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', null, [ 'input' => 'string', 'required' => false, - 'placeholder' => array('hour' => 'Change&Me'), - )); + 'placeholder' => ['hour' => 'Change&Me'], + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/div [ ./select @@ -2140,7 +2157,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimezoneType', 'Europe/Vienna'); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [@name="name"] [not(@required)] @@ -2156,12 +2173,12 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testTimezoneWithPlaceholder() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimezoneType', null, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimezoneType', null, [ 'placeholder' => 'Select&Timezone', 'required' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/select [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Select&Timezone[/trans]"]] [count(./optgroup)>10] @@ -2170,12 +2187,27 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase ); } - public function testUrl() + public function testUrlWithDefaultProtocol() { $url = 'http://www.google.com?foo1=bar1&foo2=bar2'; - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\UrlType', $url); + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\UrlType', $url, ['default_protocol' => 'http']); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], +'/input + [@type="text"] + [@name="name"] + [@value="http://www.google.com?foo1=bar1&foo2=bar2"] + [@inputmode="url"] +' + ); + } + + public function testUrlWithoutDefaultProtocol() + { + $url = 'http://www.google.com?foo1=bar1&foo2=bar2'; + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\UrlType', $url, ['default_protocol' => null]); + + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="url"] [@name="name"] @@ -2186,8 +2218,8 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testCollectionPrototype() { - $form = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType', array('items' => array('one', 'two', 'three'))) - ->add('items', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', array('allow_add' => true)) + $form = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType', ['items' => ['one', 'two', 'three']]) + ->add('items', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', ['allow_add' => true]) ->getForm() ->createView(); @@ -2216,7 +2248,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ButtonType'); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/button[@type="button"][@name="name"][.="[trans]Name[/trans]"]' ); } @@ -2230,11 +2262,11 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testButtonlabelWithoutTranslation() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', null, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', null, [ 'translation_domain' => false, - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/button[@type="button"][@name="name"][.="Name"]' ); } @@ -2243,7 +2275,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\SubmitType'); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/button[@type="submit"][@name="name"]' ); } @@ -2252,17 +2284,17 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase { $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ResetType'); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/button[@type="reset"][@name="name"]' ); } public function testStartTag() { - $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'method' => 'get', 'action' => 'http://example.com/directory', - )); + ]); $html = $this->renderStart($form->createView()); @@ -2271,10 +2303,10 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testStartTagForPutRequest() { - $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'method' => 'put', 'action' => 'http://example.com/directory', - )); + ]); $html = $this->renderStart($form->createView()); @@ -2288,25 +2320,25 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testStartTagWithOverriddenVars() { - $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'method' => 'put', 'action' => 'http://example.com/directory', - )); + ]); - $html = $this->renderStart($form->createView(), array( + $html = $this->renderStart($form->createView(), [ 'method' => 'post', 'action' => 'http://foo.com/directory', - )); + ]); $this->assertSame('
    ', $html); } public function testStartTagForMultipartForm() { - $form = $this->factory->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + $form = $this->factory->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'method' => 'get', 'action' => 'http://example.com/directory', - )) + ]) ->add('file', 'Symfony\Component\Form\Extension\Core\Type\FileType') ->getForm(); @@ -2317,25 +2349,25 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testStartTagWithExtraAttributes() { - $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'method' => 'get', 'action' => 'http://example.com/directory', - )); + ]); - $html = $this->renderStart($form->createView(), array( - 'attr' => array('class' => 'foobar'), - )); + $html = $this->renderStart($form->createView(), [ + 'attr' => ['class' => 'foobar'], + ]); $this->assertSame('', $html); } public function testWidgetAttributes() { - $form = $this->factory->createNamed('text', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'value', array( + $form = $this->factory->createNamed('text', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'value', [ 'required' => true, 'disabled' => true, - 'attr' => array('readonly' => true, 'maxlength' => 10, 'pattern' => '\d+', 'class' => 'foobar', 'data-foo' => 'bar'), - )); + 'attr' => ['readonly' => true, 'maxlength' => 10, 'pattern' => '\d+', 'class' => 'foobar', 'data-foo' => 'bar'], + ]); $html = $this->renderWidget($form->createView()); @@ -2345,9 +2377,9 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testWidgetAttributeNameRepeatedIfTrue() { - $form = $this->factory->createNamed('text', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'value', array( - 'attr' => array('foo' => true), - )); + $form = $this->factory->createNamed('text', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'value', [ + 'attr' => ['foo' => true], + ]); $html = $this->renderWidget($form->createView()); @@ -2357,9 +2389,9 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testWidgetAttributeHiddenIfFalse() { - $form = $this->factory->createNamed('text', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'value', array( - 'attr' => array('foo' => false), - )); + $form = $this->factory->createNamed('text', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'value', [ + 'attr' => ['foo' => false], + ]); $html = $this->renderWidget($form->createView()); @@ -2368,10 +2400,10 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testButtonAttributes() { - $form = $this->factory->createNamed('button', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', null, array( + $form = $this->factory->createNamed('button', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', null, [ 'disabled' => true, - 'attr' => array('class' => 'foobar', 'data-foo' => 'bar'), - )); + 'attr' => ['class' => 'foobar', 'data-foo' => 'bar'], + ]); $html = $this->renderWidget($form->createView()); @@ -2381,9 +2413,9 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testButtonAttributeNameRepeatedIfTrue() { - $form = $this->factory->createNamed('button', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', null, array( - 'attr' => array('foo' => true), - )); + $form = $this->factory->createNamed('button', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', null, [ + 'attr' => ['foo' => true], + ]); $html = $this->renderWidget($form->createView()); @@ -2393,9 +2425,9 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testButtonAttributeHiddenIfFalse() { - $form = $this->factory->createNamed('button', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', null, array( - 'attr' => array('foo' => false), - )); + $form = $this->factory->createNamed('button', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', null, [ + 'attr' => ['foo' => false], + ]); $html = $this->renderWidget($form->createView()); @@ -2413,7 +2445,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testTextareaWithWhitespaceOnlyContentRetainsValueWhenRenderingForm() { - $form = $this->factory->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', array('textarea' => ' ')) + $form = $this->factory->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', ['textarea' => ' ']) ->add('textarea', 'Symfony\Component\Form\Extension\Core\Type\TextareaType') ->getForm(); @@ -2424,9 +2456,9 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testWidgetContainerAttributeHiddenIfFalse() { - $form = $this->factory->createNamed('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( - 'attr' => array('foo' => false), - )); + $form = $this->factory->createNamed('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, [ + 'attr' => ['foo' => false], + ]); $html = $this->renderWidget($form->createView()); @@ -2437,8 +2469,8 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testTranslatedAttributes() { $view = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') - ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', array('attr' => array('title' => 'Foo'))) - ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType', array('attr' => array('placeholder' => 'Bar'))) + ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', ['attr' => ['title' => 'Foo']]) + ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType', ['attr' => ['placeholder' => 'Bar']]) ->getForm() ->createView(); @@ -2450,11 +2482,11 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase public function testAttributesNotTranslatedWhenTranslationDomainIsFalse() { - $view = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + $view = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'translation_domain' => false, - )) - ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', array('attr' => array('title' => 'Foo'))) - ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType', array('attr' => array('placeholder' => 'Bar'))) + ]) + ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', ['attr' => ['title' => 'Foo']]) + ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType', ['attr' => ['placeholder' => 'Bar']]) ->getForm() ->createView(); @@ -2469,7 +2501,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase $tel = '0102030405'; $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TelType', $tel); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="tel"] [@name="name"] @@ -2483,7 +2515,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase $color = '#0000ff'; $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ColorType', $color); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/input [@type="color"] [@name="name"] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php index 7bc1a652..16d4045e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php @@ -12,6 +12,10 @@ namespace Symfony\Component\Form\Tests; use PHPUnit\Framework\TestCase; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper; +use Symfony\Component\Form\Form; +use Symfony\Component\Form\FormBuilder; use Symfony\Component\Form\FormError; use Symfony\Component\Form\FormFactory; use Symfony\Component\Form\Forms; @@ -38,7 +42,7 @@ abstract class AbstractRequestHandlerTest extends TestCase protected function setUp() { - $this->serverParams = $this->getMockBuilder('Symfony\Component\Form\Util\ServerParams')->setMethods(array('getNormalizedIniPostMaxSize', 'getContentLength'))->getMock(); + $this->serverParams = $this->getMockBuilder('Symfony\Component\Form\Util\ServerParams')->setMethods(['getNormalizedIniPostMaxSize', 'getContentLength'])->getMock(); $this->requestHandler = $this->getRequestHandler(); $this->factory = Forms::createFormFactoryBuilder()->getFormFactory(); $this->request = null; @@ -46,19 +50,19 @@ abstract class AbstractRequestHandlerTest extends TestCase public function methodExceptGetProvider() { - return array( - array('POST'), - array('PUT'), - array('DELETE'), - array('PATCH'), - ); + return [ + ['POST'], + ['PUT'], + ['DELETE'], + ['PATCH'], + ]; } public function methodProvider() { - return array_merge(array( - array('GET'), - ), $this->methodExceptGetProvider()); + return array_merge([ + ['GET'], + ], $this->methodExceptGetProvider()); } /** @@ -66,17 +70,16 @@ abstract class AbstractRequestHandlerTest extends TestCase */ public function testSubmitIfNameInRequest($method) { - $form = $this->getMockForm('param1', $method); + $form = $this->createForm('param1', $method); - $this->setRequestData($method, array( + $this->setRequestData($method, [ 'param1' => 'DATA', - )); - - $form->expects($this->once()) - ->method('submit') - ->with('DATA', 'PATCH' !== $method); + ]); $this->requestHandler->handleRequest($form, $this->request); + + $this->assertTrue($form->isSubmitted()); + $this->assertSame('DATA', $form->getData()); } /** @@ -84,18 +87,17 @@ abstract class AbstractRequestHandlerTest extends TestCase */ public function testDoNotSubmitIfWrongRequestMethod($method) { - $form = $this->getMockForm('param1', $method); + $form = $this->createForm('param1', $method); $otherMethod = 'POST' === $method ? 'PUT' : 'POST'; - $this->setRequestData($otherMethod, array( + $this->setRequestData($otherMethod, [ 'param1' => 'DATA', - )); - - $form->expects($this->never()) - ->method('submit'); + ]); $this->requestHandler->handleRequest($form, $this->request); + + $this->assertFalse($form->isSubmitted()); } /** @@ -103,16 +105,15 @@ abstract class AbstractRequestHandlerTest extends TestCase */ public function testDoNoSubmitSimpleFormIfNameNotInRequestAndNotGetRequest($method) { - $form = $this->getMockForm('param1', $method, false); + $form = $this->createForm('param1', $method, false); - $this->setRequestData($method, array( - 'paramx' => array(), - )); - - $form->expects($this->never()) - ->method('submit'); + $this->setRequestData($method, [ + 'paramx' => [], + ]); $this->requestHandler->handleRequest($form, $this->request); + + $this->assertFalse($form->isSubmitted()); } /** @@ -120,30 +121,28 @@ abstract class AbstractRequestHandlerTest extends TestCase */ public function testDoNotSubmitCompoundFormIfNameNotInRequestAndNotGetRequest($method) { - $form = $this->getMockForm('param1', $method, true); + $form = $this->createForm('param1', $method, true); - $this->setRequestData($method, array( - 'paramx' => array(), - )); - - $form->expects($this->never()) - ->method('submit'); + $this->setRequestData($method, [ + 'paramx' => [], + ]); $this->requestHandler->handleRequest($form, $this->request); + + $this->assertFalse($form->isSubmitted()); } public function testDoNotSubmitIfNameNotInRequestAndGetRequest() { - $form = $this->getMockForm('param1', 'GET'); + $form = $this->createForm('param1', 'GET'); - $this->setRequestData('GET', array( - 'paramx' => array(), - )); - - $form->expects($this->never()) - ->method('submit'); + $this->setRequestData('GET', [ + 'paramx' => [], + ]); $this->requestHandler->handleRequest($form, $this->request); + + $this->assertFalse($form->isSubmitted()); } /** @@ -151,24 +150,28 @@ abstract class AbstractRequestHandlerTest extends TestCase */ public function testSubmitFormWithEmptyNameIfAtLeastOneFieldInRequest($method) { - $form = $this->getMockForm('', $method); - $form->expects($this->any()) - ->method('all') - ->will($this->returnValue(array( - 'param1' => $this->getMockForm('param1'), - 'param2' => $this->getMockForm('param2'), - ))); + $form = $this->createForm('', $method, true); + $form->add($this->createForm('param1')); + $form->add($this->createForm('param2')); - $this->setRequestData($method, $requestData = array( + $this->setRequestData($method, $requestData = [ 'param1' => 'submitted value', 'paramx' => 'submitted value', - )); - - $form->expects($this->once()) - ->method('submit') - ->with($requestData, 'PATCH' !== $method); + ]); $this->requestHandler->handleRequest($form, $this->request); + + $this->assertTrue($form->isSubmitted()); + $this->assertTrue($form->get('param1')->isSubmitted()); + $this->assertSame('submitted value', $form->get('param1')->getData()); + + if ('PATCH' === $method) { + $this->assertFalse($form->get('param2')->isSubmitted()); + } else { + $this->assertTrue($form->get('param2')->isSubmitted()); + } + + $this->assertNull($form->get('param2')->getData()); } /** @@ -176,22 +179,17 @@ abstract class AbstractRequestHandlerTest extends TestCase */ public function testDoNotSubmitFormWithEmptyNameIfNoFieldInRequest($method) { - $form = $this->getMockForm('', $method); - $form->expects($this->any()) - ->method('all') - ->will($this->returnValue(array( - 'param1' => $this->getMockForm('param1'), - 'param2' => $this->getMockForm('param2'), - ))); + $form = $this->createForm('', $method, true); + $form->add($this->createForm('param1')); + $form->add($this->createForm('param2')); - $this->setRequestData($method, array( + $this->setRequestData($method, [ 'paramx' => 'submitted value', - )); - - $form->expects($this->never()) - ->method('submit'); + ]); $this->requestHandler->handleRequest($form, $this->request); + + $this->assertFalse($form->isSubmitted()); } /** @@ -199,27 +197,26 @@ abstract class AbstractRequestHandlerTest extends TestCase */ public function testMergeParamsAndFiles($method) { - $form = $this->getMockForm('param1', $method); - $file = $this->getMockFile(); + $form = $this->createForm('param1', $method, true); + $form->add($this->createForm('field1')); + $form->add($this->createBuilder('field2', false, ['allow_file_upload' => true])->getForm()); + $file = $this->getUploadedFile(); - $this->setRequestData($method, array( - 'param1' => array( + $this->setRequestData($method, [ + 'param1' => [ 'field1' => 'DATA', - ), - ), array( - 'param1' => array( + ], + ], [ + 'param1' => [ 'field2' => $file, - ), - )); - - $form->expects($this->once()) - ->method('submit') - ->with(array( - 'field1' => 'DATA', - 'field2' => $file, - ), 'PATCH' !== $method); + ], + ]); $this->requestHandler->handleRequest($form, $this->request); + + $this->assertTrue($form->isSubmitted()); + $this->assertSame('DATA', $form->get('field1')->getData()); + $this->assertSame($file, $form->get('field2')->getData()); } /** @@ -227,20 +224,19 @@ abstract class AbstractRequestHandlerTest extends TestCase */ public function testParamTakesPrecedenceOverFile($method) { - $form = $this->getMockForm('param1', $method); - $file = $this->getMockFile(); + $form = $this->createForm('param1', $method); + $file = $this->getUploadedFile(); - $this->setRequestData($method, array( + $this->setRequestData($method, [ 'param1' => 'DATA', - ), array( + ], [ 'param1' => $file, - )); - - $form->expects($this->once()) - ->method('submit') - ->with('DATA', 'PATCH' !== $method); + ]); $this->requestHandler->handleRequest($form, $this->request); + + $this->assertTrue($form->isSubmitted()); + $this->assertSame('DATA', $form->getData()); } /** @@ -248,20 +244,21 @@ abstract class AbstractRequestHandlerTest extends TestCase */ public function testSubmitFileIfNoParam($method) { - $form = $this->getMockForm('param1', $method); - $file = $this->getMockFile(); + $form = $this->createBuilder('param1', false, ['allow_file_upload' => true]) + ->setMethod($method) + ->getForm(); + $file = $this->getUploadedFile(); - $this->setRequestData($method, array( + $this->setRequestData($method, [ 'param1' => null, - ), array( + ], [ 'param1' => $file, - )); - - $form->expects($this->once()) - ->method('submit') - ->with($file, 'PATCH' !== $method); + ]); $this->requestHandler->handleRequest($form, $this->request); + + $this->assertTrue($form->isSubmitted()); + $this->assertSame($file, $form->getData()); } /** @@ -269,22 +266,23 @@ abstract class AbstractRequestHandlerTest extends TestCase */ public function testSubmitMultipleFiles($method) { - $form = $this->getMockForm('param1', $method); - $file = $this->getMockFile(); + $form = $this->createBuilder('param1', false, ['allow_file_upload' => true]) + ->setMethod($method) + ->getForm(); + $file = $this->getUploadedFile(); - $this->setRequestData($method, array( + $this->setRequestData($method, [ 'param1' => null, - ), array( - 'param2' => $this->getMockFile('2'), + ], [ + 'param2' => $this->getUploadedFile('2'), 'param1' => $file, - 'param3' => $this->getMockFile('3'), - )); - - $form->expects($this->once()) - ->method('submit') - ->with($file, 'PATCH' !== $method); + 'param3' => $this->getUploadedFile('3'), + ]); $this->requestHandler->handleRequest($form, $this->request); + + $this->assertTrue($form->isSubmitted()); + $this->assertSame($file, $form->getData()); } /** @@ -292,26 +290,25 @@ abstract class AbstractRequestHandlerTest extends TestCase */ public function testSubmitFileWithNamelessForm($method) { - $form = $this->getMockForm(null, $method); - $file = $this->getMockFile(); - - $this->setRequestData($method, array( - '' => null, - ), array( - '' => $file, - )); - - $form->expects($this->once()) - ->method('submit') - ->with($file, 'PATCH' !== $method); - + $form = $this->createForm('', $method, true); + $fileForm = $this->createBuilder('document', false, ['allow_file_upload' => true])->getForm(); + $form->add($fileForm); + $file = $this->getUploadedFile(); + $this->setRequestData($method, [ + 'document' => null, + ], [ + 'document' => $file, + ]); $this->requestHandler->handleRequest($form, $this->request); + + $this->assertTrue($form->isSubmitted()); + $this->assertSame($file, $fileForm->getData()); } /** * @dataProvider getPostMaxSizeFixtures */ - public function testAddFormErrorIfPostMaxSizeExceeded($contentLength, $iniMax, $shouldFail, array $errorParams = array()) + public function testAddFormErrorIfPostMaxSizeExceeded($contentLength, $iniMax, $shouldFail, array $errorParams = []) { $this->serverParams->expects($this->once()) ->method('getContentLength') @@ -320,9 +317,9 @@ abstract class AbstractRequestHandlerTest extends TestCase ->method('getNormalizedIniPostMaxSize') ->will($this->returnValue($iniMax)); - $options = array('post_max_size_message' => 'Max {{ max }}!'); + $options = ['post_max_size_message' => 'Max {{ max }}!']; $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, $options); - $this->setRequestData('POST', array(), array()); + $this->setRequestData('POST', [], []); $this->requestHandler->handleRequest($form, $this->request); @@ -330,7 +327,7 @@ abstract class AbstractRequestHandlerTest extends TestCase $error = new FormError($options['post_max_size_message'], null, $errorParams); $error->setOrigin($form); - $this->assertEquals(array($error), iterator_to_array($form->getErrors())); + $this->assertEquals([$error], iterator_to_array($form->getErrors())); $this->assertTrue($form->isSubmitted()); } else { $this->assertCount(0, $form->getErrors()); @@ -340,22 +337,22 @@ abstract class AbstractRequestHandlerTest extends TestCase public function getPostMaxSizeFixtures() { - return array( - array(pow(1024, 3) + 1, '1G', true, array('{{ max }}' => '1G')), - array(pow(1024, 3), '1G', false), - array(pow(1024, 2) + 1, '1M', true, array('{{ max }}' => '1M')), - array(pow(1024, 2), '1M', false), - array(1024 + 1, '1K', true, array('{{ max }}' => '1K')), - array(1024, '1K', false), - array(null, '1K', false), - array(1024, '', false), - array(1024, 0, false), - ); + return [ + [pow(1024, 3) + 1, '1G', true, ['{{ max }}' => '1G']], + [pow(1024, 3), '1G', false], + [pow(1024, 2) + 1, '1M', true, ['{{ max }}' => '1M']], + [pow(1024, 2), '1M', false], + [1024 + 1, '1K', true, ['{{ max }}' => '1K']], + [1024, '1K', false], + [null, '1K', false], + [1024, '', false], + [1024, 0, false], + ]; } public function testUploadedFilesAreAccepted() { - $this->assertTrue($this->requestHandler->isFileUpload($this->getMockFile())); + $this->assertTrue($this->requestHandler->isFileUpload($this->getUploadedFile())); } public function testInvalidFilesAreRejected() @@ -363,32 +360,34 @@ abstract class AbstractRequestHandlerTest extends TestCase $this->assertFalse($this->requestHandler->isFileUpload($this->getInvalidFile())); } - abstract protected function setRequestData($method, $data, $files = array()); + abstract protected function setRequestData($method, $data, $files = []); abstract protected function getRequestHandler(); - abstract protected function getMockFile($suffix = ''); + abstract protected function getUploadedFile($suffix = ''); abstract protected function getInvalidFile(); - protected function getMockForm($name, $method = null, $compound = true) + protected function createForm($name, $method = null, $compound = false) { - $config = $this->getMockBuilder('Symfony\Component\Form\FormConfigInterface')->getMock(); - $config->expects($this->any()) - ->method('getMethod') - ->will($this->returnValue($method)); - $config->expects($this->any()) - ->method('getCompound') - ->will($this->returnValue($compound)); + $config = $this->createBuilder($name, $compound); - $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); - $form->expects($this->any()) - ->method('getName') - ->will($this->returnValue($name)); - $form->expects($this->any()) - ->method('getConfig') - ->will($this->returnValue($config)); + if (null !== $method) { + $config->setMethod($method); + } - return $form; + return new Form($config); + } + + protected function createBuilder($name, $compound = false, array $options = []) + { + $builder = new FormBuilder($name, null, new EventDispatcher(), $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(), $options); + $builder->setCompound($compound); + + if ($compound) { + $builder->setDataMapper(new PropertyPathMapper()); + } + + return $builder; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php index 9902a6dc..6c09ba8e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php @@ -42,9 +42,9 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest public function testLabelIsNotRenderedWhenSetToFalse() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, [ 'label' => false, - )); + ]); $html = $this->renderRow($form->createView()); $this->assertMatchesXpath($html, @@ -194,11 +194,11 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest public function testCollection() { - $form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', array('a', 'b'), array( + $form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', ['a', 'b'], [ 'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/table [ ./tr[./td/input[@type="text"][@value="a"]] @@ -212,11 +212,11 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest public function testEmptyCollection() { - $form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', array(), array( + $form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', [], [ 'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/table [./tr[@style="display: none"][./td[@colspan="2"]/input[@type="hidden"][@id="names__token"]]] [count(./tr[./td/input])=1] @@ -234,10 +234,10 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest ->getForm() ->createView(); - $html = $this->renderForm($view, array( + $html = $this->renderForm($view, [ 'id' => 'my&id', - 'attr' => array('class' => 'my&class'), - )); + 'attr' => ['class' => 'my&class'], + ]); $this->assertMatchesXpath($html, '/form @@ -284,7 +284,7 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest ->getForm() ->createView(); - $this->assertWidgetMatchesXpath($view, array(), + $this->assertWidgetMatchesXpath($view, [], '/table [ ./tr @@ -317,14 +317,14 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest { $form = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') ->add($this->factory - ->createNamedBuilder('child', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array('error_bubbling' => false)) + ->createNamedBuilder('child', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, ['error_bubbling' => false]) ->add('grandChild', 'Symfony\Component\Form\Extension\Core\Type\FormType') ) ->getForm(); $form->get('child')->addError(new FormError('[trans]Error![/trans]')); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/table [ ./tr/td/ul[./li[.="[trans]Error![/trans]"]] @@ -349,7 +349,7 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest ) ->getForm(); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/table [ ./tr[@style="display: none"] @@ -365,11 +365,11 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest public function testRepeated() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType', 'foobar', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType', 'foobar', [ 'type' => 'Symfony\Component\Form\Extension\Core\Type\TextType', - )); + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/table [ ./tr @@ -399,13 +399,13 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest public function testRepeatedWithCustomOptions() { - $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType', 'foobar', array( + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType', 'foobar', [ 'type' => 'Symfony\Component\Form\Extension\Core\Type\PasswordType', - 'first_options' => array('label' => 'Test', 'required' => false), - 'second_options' => array('label' => 'Test2'), - )); + 'first_options' => ['label' => 'Test', 'required' => false], + 'second_options' => ['label' => 'Test2'], + ]); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/table [ ./tr @@ -439,11 +439,11 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest */ public function testCollectionRowWithCustomBlock() { - $collection = array('one', 'two', 'three'); + $collection = ['one', 'two', 'three']; $form = $this->factory->createNamedBuilder('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', $collection) ->getForm(); - $this->assertWidgetMatchesXpath($form->createView(), array(), + $this->assertWidgetMatchesXpath($form->createView(), [], '/table [ ./tr[./td/label[.="Custom label: [trans]0[/trans]"]] @@ -470,7 +470,7 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest // Insert the start tag, the end tag should be rendered by the helper // Unfortunately this is not valid HTML, because the surrounding table // tag is missing. If someone renders a form with table layout - // manually, she should call form_rest() explicitly within the
    + // manually, they should call form_rest() explicitly within the
    // tag. $this->assertMatchesXpath(''.$html, '/form @@ -503,16 +503,16 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest $this->renderWidget($view['field1']); // Rest should only contain field2, but isn't rendered - $html = $this->renderEnd($view, array('render_rest' => false)); + $html = $this->renderEnd($view, ['render_rest' => false]); $this->assertEquals('', $html); } public function testWidgetContainerAttributes() { - $form = $this->factory->createNamed('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( - 'attr' => array('class' => 'foobar', 'data-foo' => 'bar'), - )); + $form = $this->factory->createNamed('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, [ + 'attr' => ['class' => 'foobar', 'data-foo' => 'bar'], + ]); $form->add('text', 'Symfony\Component\Form\Extension\Core\Type\TextType'); @@ -524,9 +524,9 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest public function testWidgetContainerAttributeNameRepeatedIfTrue() { - $form = $this->factory->createNamed('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( - 'attr' => array('foo' => true), - )); + $form = $this->factory->createNamed('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, [ + 'attr' => ['foo' => true], + ]); $html = $this->renderWidget($form->createView()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php index 014a5ae1..ced54a45 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php @@ -22,14 +22,14 @@ class ButtonBuilderTest extends TestCase { public function getValidNames() { - return array( - array('reset'), - array('submit'), - array('foo'), - array('0'), - array(0), - array('button[]'), - ); + return [ + ['reset'], + ['submit'], + ['foo'], + ['0'], + [0], + ['button[]'], + ]; } /** @@ -42,11 +42,11 @@ class ButtonBuilderTest extends TestCase public function getInvalidNames() { - return array( - array(''), - array(false), - array(null), - ); + return [ + [''], + [false], + [null], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ButtonTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ButtonTest.php index a81c2db5..8c1ccec7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ButtonTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ButtonTest.php @@ -41,7 +41,7 @@ class ButtonTest extends TestCase $button->submit(''); - $button->setParent($this->getFormBuilder('form')->getForm()); + $button->setParent($this->getFormBuilder()->getForm()); } /** @@ -49,7 +49,7 @@ class ButtonTest extends TestCase */ public function testDisabledIfParentIsDisabled($parentDisabled, $buttonDisabled, $result) { - $form = $this->getFormBuilder('form') + $form = $this->getFormBuilder() ->setDisabled($parentDisabled) ->getForm() ; @@ -66,13 +66,13 @@ class ButtonTest extends TestCase public function getDisabledStates() { - return array( + return [ // parent, button, result - array(true, true, true), - array(true, false, true), - array(false, true, true), - array(false, false, false), - ); + [true, true, true], + [true, false, true], + [false, true, true], + [false, false, false], + ]; } private function getButtonBuilder($name) @@ -80,8 +80,8 @@ class ButtonTest extends TestCase return new ButtonBuilder($name); } - private function getFormBuilder($name) + private function getFormBuilder() { - return new FormBuilder($name, null, $this->dispatcher, $this->factory); + return new FormBuilder('form', null, $this->dispatcher, $this->factory); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/AbstractChoiceListTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/AbstractChoiceListTest.php index fc25cffc..aca967da 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/AbstractChoiceListTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/AbstractChoiceListTest.php @@ -154,66 +154,66 @@ abstract class AbstractChoiceListTest extends TestCase public function testGetChoicesForValues() { - $values = array($this->value1, $this->value2); - $this->assertSame(array($this->choice1, $this->choice2), $this->list->getChoicesForValues($values)); + $values = [$this->value1, $this->value2]; + $this->assertSame([$this->choice1, $this->choice2], $this->list->getChoicesForValues($values)); } public function testGetChoicesForValuesPreservesKeys() { - $values = array(5 => $this->value1, 8 => $this->value2); - $this->assertSame(array(5 => $this->choice1, 8 => $this->choice2), $this->list->getChoicesForValues($values)); + $values = [5 => $this->value1, 8 => $this->value2]; + $this->assertSame([5 => $this->choice1, 8 => $this->choice2], $this->list->getChoicesForValues($values)); } public function testGetChoicesForValuesPreservesOrder() { - $values = array($this->value2, $this->value1); - $this->assertSame(array($this->choice2, $this->choice1), $this->list->getChoicesForValues($values)); + $values = [$this->value2, $this->value1]; + $this->assertSame([$this->choice2, $this->choice1], $this->list->getChoicesForValues($values)); } public function testGetChoicesForValuesIgnoresNonExistingValues() { - $values = array($this->value1, $this->value2, 'foobar'); - $this->assertSame(array($this->choice1, $this->choice2), $this->list->getChoicesForValues($values)); + $values = [$this->value1, $this->value2, 'foobar']; + $this->assertSame([$this->choice1, $this->choice2], $this->list->getChoicesForValues($values)); } // https://github.com/symfony/symfony/issues/3446 public function testGetChoicesForValuesEmpty() { - $this->assertSame(array(), $this->list->getChoicesForValues(array())); + $this->assertSame([], $this->list->getChoicesForValues([])); } public function testGetValuesForChoices() { - $choices = array($this->choice1, $this->choice2); - $this->assertSame(array($this->value1, $this->value2), $this->list->getValuesForChoices($choices)); + $choices = [$this->choice1, $this->choice2]; + $this->assertSame([$this->value1, $this->value2], $this->list->getValuesForChoices($choices)); } public function testGetValuesForChoicesPreservesKeys() { - $choices = array(5 => $this->choice1, 8 => $this->choice2); - $this->assertSame(array(5 => $this->value1, 8 => $this->value2), $this->list->getValuesForChoices($choices)); + $choices = [5 => $this->choice1, 8 => $this->choice2]; + $this->assertSame([5 => $this->value1, 8 => $this->value2], $this->list->getValuesForChoices($choices)); } public function testGetValuesForChoicesPreservesOrder() { - $choices = array($this->choice2, $this->choice1); - $this->assertSame(array($this->value2, $this->value1), $this->list->getValuesForChoices($choices)); + $choices = [$this->choice2, $this->choice1]; + $this->assertSame([$this->value2, $this->value1], $this->list->getValuesForChoices($choices)); } public function testGetValuesForChoicesIgnoresNonExistingChoices() { - $choices = array($this->choice1, $this->choice2, 'foobar'); - $this->assertSame(array($this->value1, $this->value2), $this->list->getValuesForChoices($choices)); + $choices = [$this->choice1, $this->choice2, 'foobar']; + $this->assertSame([$this->value1, $this->value2], $this->list->getValuesForChoices($choices)); } public function testGetValuesForChoicesEmpty() { - $this->assertSame(array(), $this->list->getValuesForChoices(array())); + $this->assertSame([], $this->list->getValuesForChoices([])); } public function testGetChoicesForValuesWithNull() { - $values = $this->list->getValuesForChoices(array(null)); + $values = $this->list->getValuesForChoices([null]); $this->assertNotEmpty($this->list->getChoicesForValues($values)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/ArrayChoiceListTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/ArrayChoiceListTest.php index 37b8dddb..c71fd75b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/ArrayChoiceListTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/ArrayChoiceListTest.php @@ -34,12 +34,12 @@ class ArrayChoiceListTest extends AbstractChoiceListTest protected function getChoices() { - return array(0, 1, 1.5, '1', 'a', false, true, $this->object, null); + return [0, 1, 1.5, '1', 'a', false, true, $this->object, null]; } protected function getValues() { - return array('0', '1', '2', '3', '4', '5', '6', '7', '8'); + return ['0', '1', '2', '3', '4', '5', '6', '7', '8']; } public function testCreateChoiceListWithValueCallback() @@ -48,65 +48,65 @@ class ArrayChoiceListTest extends AbstractChoiceListTest return ':'.$choice; }; - $choiceList = new ArrayChoiceList(array(2 => 'foo', 7 => 'bar', 10 => 'baz'), $callback); + $choiceList = new ArrayChoiceList([2 => 'foo', 7 => 'bar', 10 => 'baz'], $callback); - $this->assertSame(array(':foo', ':bar', ':baz'), $choiceList->getValues()); - $this->assertSame(array(':foo' => 'foo', ':bar' => 'bar', ':baz' => 'baz'), $choiceList->getChoices()); - $this->assertSame(array(':foo' => 2, ':bar' => 7, ':baz' => 10), $choiceList->getOriginalKeys()); - $this->assertSame(array(1 => 'foo', 2 => 'baz'), $choiceList->getChoicesForValues(array(1 => ':foo', 2 => ':baz'))); - $this->assertSame(array(1 => ':foo', 2 => ':baz'), $choiceList->getValuesForChoices(array(1 => 'foo', 2 => 'baz'))); + $this->assertSame([':foo', ':bar', ':baz'], $choiceList->getValues()); + $this->assertSame([':foo' => 'foo', ':bar' => 'bar', ':baz' => 'baz'], $choiceList->getChoices()); + $this->assertSame([':foo' => 2, ':bar' => 7, ':baz' => 10], $choiceList->getOriginalKeys()); + $this->assertSame([1 => 'foo', 2 => 'baz'], $choiceList->getChoicesForValues([1 => ':foo', 2 => ':baz'])); + $this->assertSame([1 => ':foo', 2 => ':baz'], $choiceList->getValuesForChoices([1 => 'foo', 2 => 'baz'])); } public function testCreateChoiceListWithoutValueCallbackAndDuplicateFreeToStringChoices() { - $choiceList = new ArrayChoiceList(array(2 => 'foo', 7 => 'bar', 10 => 123)); + $choiceList = new ArrayChoiceList([2 => 'foo', 7 => 'bar', 10 => 123]); - $this->assertSame(array('foo', 'bar', '123'), $choiceList->getValues()); - $this->assertSame(array('foo' => 'foo', 'bar' => 'bar', '123' => 123), $choiceList->getChoices()); - $this->assertSame(array('foo' => 2, 'bar' => 7, '123' => 10), $choiceList->getOriginalKeys()); - $this->assertSame(array(1 => 'foo', 2 => 123), $choiceList->getChoicesForValues(array(1 => 'foo', 2 => '123'))); - $this->assertSame(array(1 => 'foo', 2 => '123'), $choiceList->getValuesForChoices(array(1 => 'foo', 2 => 123))); + $this->assertSame(['foo', 'bar', '123'], $choiceList->getValues()); + $this->assertSame(['foo' => 'foo', 'bar' => 'bar', '123' => 123], $choiceList->getChoices()); + $this->assertSame(['foo' => 2, 'bar' => 7, '123' => 10], $choiceList->getOriginalKeys()); + $this->assertSame([1 => 'foo', 2 => 123], $choiceList->getChoicesForValues([1 => 'foo', 2 => '123'])); + $this->assertSame([1 => 'foo', 2 => '123'], $choiceList->getValuesForChoices([1 => 'foo', 2 => 123])); } public function testCreateChoiceListWithoutValueCallbackAndToStringDuplicates() { - $choiceList = new ArrayChoiceList(array(2 => 'foo', 7 => '123', 10 => 123)); + $choiceList = new ArrayChoiceList([2 => 'foo', 7 => '123', 10 => 123]); - $this->assertSame(array('0', '1', '2'), $choiceList->getValues()); - $this->assertSame(array('0' => 'foo', '1' => '123', '2' => 123), $choiceList->getChoices()); - $this->assertSame(array('0' => 2, '1' => 7, '2' => 10), $choiceList->getOriginalKeys()); - $this->assertSame(array(1 => 'foo', 2 => 123), $choiceList->getChoicesForValues(array(1 => '0', 2 => '2'))); - $this->assertSame(array(1 => '0', 2 => '2'), $choiceList->getValuesForChoices(array(1 => 'foo', 2 => 123))); + $this->assertSame(['0', '1', '2'], $choiceList->getValues()); + $this->assertSame(['0' => 'foo', '1' => '123', '2' => 123], $choiceList->getChoices()); + $this->assertSame(['0' => 2, '1' => 7, '2' => 10], $choiceList->getOriginalKeys()); + $this->assertSame([1 => 'foo', 2 => 123], $choiceList->getChoicesForValues([1 => '0', 2 => '2'])); + $this->assertSame([1 => '0', 2 => '2'], $choiceList->getValuesForChoices([1 => 'foo', 2 => 123])); } public function testCreateChoiceListWithoutValueCallbackAndMixedChoices() { $object = new \stdClass(); - $choiceList = new ArrayChoiceList(array(2 => 'foo', 5 => array(7 => '123'), 10 => $object)); + $choiceList = new ArrayChoiceList([2 => 'foo', 5 => [7 => '123'], 10 => $object]); - $this->assertSame(array('0', '1', '2'), $choiceList->getValues()); - $this->assertSame(array('0' => 'foo', '1' => '123', '2' => $object), $choiceList->getChoices()); - $this->assertSame(array('0' => 2, '1' => 7, '2' => 10), $choiceList->getOriginalKeys()); - $this->assertSame(array(1 => 'foo', 2 => $object), $choiceList->getChoicesForValues(array(1 => '0', 2 => '2'))); - $this->assertSame(array(1 => '0', 2 => '2'), $choiceList->getValuesForChoices(array(1 => 'foo', 2 => $object))); + $this->assertSame(['0', '1', '2'], $choiceList->getValues()); + $this->assertSame(['0' => 'foo', '1' => '123', '2' => $object], $choiceList->getChoices()); + $this->assertSame(['0' => 2, '1' => 7, '2' => 10], $choiceList->getOriginalKeys()); + $this->assertSame([1 => 'foo', 2 => $object], $choiceList->getChoicesForValues([1 => '0', 2 => '2'])); + $this->assertSame([1 => '0', 2 => '2'], $choiceList->getValuesForChoices([1 => 'foo', 2 => $object])); } public function testCreateChoiceListWithGroupedChoices() { - $choiceList = new ArrayChoiceList(array( - 'Group 1' => array('A' => 'a', 'B' => 'b'), - 'Group 2' => array('C' => 'c', 'D' => 'd'), - )); + $choiceList = new ArrayChoiceList([ + 'Group 1' => ['A' => 'a', 'B' => 'b'], + 'Group 2' => ['C' => 'c', 'D' => 'd'], + ]); - $this->assertSame(array('a', 'b', 'c', 'd'), $choiceList->getValues()); - $this->assertSame(array( - 'Group 1' => array('A' => 'a', 'B' => 'b'), - 'Group 2' => array('C' => 'c', 'D' => 'd'), - ), $choiceList->getStructuredValues()); - $this->assertSame(array('a' => 'a', 'b' => 'b', 'c' => 'c', 'd' => 'd'), $choiceList->getChoices()); - $this->assertSame(array('a' => 'A', 'b' => 'B', 'c' => 'C', 'd' => 'D'), $choiceList->getOriginalKeys()); - $this->assertSame(array(1 => 'a', 2 => 'b'), $choiceList->getChoicesForValues(array(1 => 'a', 2 => 'b'))); - $this->assertSame(array(1 => 'a', 2 => 'b'), $choiceList->getValuesForChoices(array(1 => 'a', 2 => 'b'))); + $this->assertSame(['a', 'b', 'c', 'd'], $choiceList->getValues()); + $this->assertSame([ + 'Group 1' => ['A' => 'a', 'B' => 'b'], + 'Group 2' => ['C' => 'c', 'D' => 'd'], + ], $choiceList->getStructuredValues()); + $this->assertSame(['a' => 'a', 'b' => 'b', 'c' => 'c', 'd' => 'd'], $choiceList->getChoices()); + $this->assertSame(['a' => 'A', 'b' => 'B', 'c' => 'C', 'd' => 'D'], $choiceList->getOriginalKeys()); + $this->assertSame([1 => 'a', 2 => 'b'], $choiceList->getChoicesForValues([1 => 'a', 2 => 'b'])); + $this->assertSame([1 => 'a', 2 => 'b'], $choiceList->getValuesForChoices([1 => 'a', 2 => 'b'])); } public function testCompareChoicesByIdentityByDefault() @@ -115,52 +115,52 @@ class ArrayChoiceListTest extends AbstractChoiceListTest return $choice->value; }; - $obj1 = (object) array('value' => 'value1'); - $obj2 = (object) array('value' => 'value2'); + $obj1 = (object) ['value' => 'value1']; + $obj2 = (object) ['value' => 'value2']; - $choiceList = new ArrayChoiceList(array($obj1, $obj2), $callback); - $this->assertSame(array(2 => 'value2'), $choiceList->getValuesForChoices(array(2 => $obj2))); - $this->assertSame(array(2 => 'value2'), $choiceList->getValuesForChoices(array(2 => (object) array('value' => 'value2')))); + $choiceList = new ArrayChoiceList([$obj1, $obj2], $callback); + $this->assertSame([2 => 'value2'], $choiceList->getValuesForChoices([2 => $obj2])); + $this->assertSame([2 => 'value2'], $choiceList->getValuesForChoices([2 => (object) ['value' => 'value2']])); } public function testGetChoicesForValuesWithContainingNull() { - $choiceList = new ArrayChoiceList(array('Null' => null)); + $choiceList = new ArrayChoiceList(['Null' => null]); - $this->assertSame(array(0 => null), $choiceList->getChoicesForValues(array('0'))); + $this->assertSame([0 => null], $choiceList->getChoicesForValues(['0'])); } public function testGetChoicesForValuesWithContainingFalseAndNull() { - $choiceList = new ArrayChoiceList(array('False' => false, 'Null' => null)); + $choiceList = new ArrayChoiceList(['False' => false, 'Null' => null]); - $this->assertSame(array(0 => null), $choiceList->getChoicesForValues(array('1'))); - $this->assertSame(array(0 => false), $choiceList->getChoicesForValues(array('0'))); + $this->assertSame([0 => null], $choiceList->getChoicesForValues(['1'])); + $this->assertSame([0 => false], $choiceList->getChoicesForValues(['0'])); } public function testGetChoicesForValuesWithContainingEmptyStringAndNull() { - $choiceList = new ArrayChoiceList(array('Empty String' => '', 'Null' => null)); + $choiceList = new ArrayChoiceList(['Empty String' => '', 'Null' => null]); - $this->assertSame(array(0 => ''), $choiceList->getChoicesForValues(array('0'))); - $this->assertSame(array(0 => null), $choiceList->getChoicesForValues(array('1'))); + $this->assertSame([0 => ''], $choiceList->getChoicesForValues(['0'])); + $this->assertSame([0 => null], $choiceList->getChoicesForValues(['1'])); } public function testGetChoicesForValuesWithContainingEmptyStringAndBooleans() { - $choiceList = new ArrayChoiceList(array('Empty String' => '', 'True' => true, 'False' => false)); + $choiceList = new ArrayChoiceList(['Empty String' => '', 'True' => true, 'False' => false]); - $this->assertSame(array(0 => ''), $choiceList->getChoicesForValues(array(''))); - $this->assertSame(array(0 => true), $choiceList->getChoicesForValues(array('1'))); - $this->assertSame(array(0 => false), $choiceList->getChoicesForValues(array('0'))); + $this->assertSame([0 => ''], $choiceList->getChoicesForValues([''])); + $this->assertSame([0 => true], $choiceList->getChoicesForValues(['1'])); + $this->assertSame([0 => false], $choiceList->getChoicesForValues(['0'])); } public function testGetChoicesForValuesWithContainingEmptyStringAndFloats() { - $choiceList = new ArrayChoiceList(array('Empty String' => '', '1/3' => 0.3, '1/2' => 0.5)); + $choiceList = new ArrayChoiceList(['Empty String' => '', '1/3' => 0.3, '1/2' => 0.5]); - $this->assertSame(array(0 => ''), $choiceList->getChoicesForValues(array(''))); - $this->assertSame(array(0 => 0.3), $choiceList->getChoicesForValues(array('0.3'))); - $this->assertSame(array(0 => 0.5), $choiceList->getChoicesForValues(array('0.5'))); + $this->assertSame([0 => ''], $choiceList->getChoicesForValues([''])); + $this->assertSame([0 => 0.3], $choiceList->getChoicesForValues(['0.3'])); + $this->assertSame([0 => 0.5], $choiceList->getChoicesForValues(['0.5'])); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php index dd6c968b..ca5b67c8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php @@ -41,18 +41,18 @@ class CachingFactoryDecoratorTest extends TestCase $this->decoratedFactory->expects($this->once()) ->method('createListFromChoices') - ->with(array()) + ->with([]) ->will($this->returnValue($list)); - $this->assertSame($list, $this->factory->createListFromChoices(array())); - $this->assertSame($list, $this->factory->createListFromChoices(array())); + $this->assertSame($list, $this->factory->createListFromChoices([])); + $this->assertSame($list, $this->factory->createListFromChoices([])); } public function testCreateFromChoicesComparesTraversableChoicesAsArray() { // The top-most traversable is converted to an array - $choices1 = new \ArrayIterator(array('A' => 'a')); - $choices2 = array('A' => 'a'); + $choices1 = new \ArrayIterator(['A' => 'a']); + $choices2 = ['A' => 'a']; $list = new \stdClass(); $this->decoratedFactory->expects($this->once()) @@ -64,19 +64,24 @@ class CachingFactoryDecoratorTest extends TestCase $this->assertSame($list, $this->factory->createListFromChoices($choices2)); } - public function testCreateFromChoicesFlattensChoices() + public function testCreateFromChoicesGroupedChoices() { - $choices1 = array('key' => array('A' => 'a')); - $choices2 = array('A' => 'a'); - $list = new \stdClass(); + $choices1 = ['key' => ['A' => 'a']]; + $choices2 = ['A' => 'a']; + $list1 = new \stdClass(); + $list2 = new \stdClass(); - $this->decoratedFactory->expects($this->once()) + $this->decoratedFactory->expects($this->at(0)) ->method('createListFromChoices') ->with($choices1) - ->will($this->returnValue($list)); + ->will($this->returnValue($list1)); + $this->decoratedFactory->expects($this->at(1)) + ->method('createListFromChoices') + ->with($choices2) + ->will($this->returnValue($list2)); - $this->assertSame($list, $this->factory->createListFromChoices($choices1)); - $this->assertSame($list, $this->factory->createListFromChoices($choices2)); + $this->assertSame($list1, $this->factory->createListFromChoices($choices1)); + $this->assertSame($list2, $this->factory->createListFromChoices($choices2)); } /** @@ -84,8 +89,8 @@ class CachingFactoryDecoratorTest extends TestCase */ public function testCreateFromChoicesSameChoices($choice1, $choice2) { - $choices1 = array($choice1); - $choices2 = array($choice2); + $choices1 = [$choice1]; + $choices2 = [$choice2]; $list = new \stdClass(); $this->decoratedFactory->expects($this->once()) @@ -102,8 +107,8 @@ class CachingFactoryDecoratorTest extends TestCase */ public function testCreateFromChoicesDifferentChoices($choice1, $choice2) { - $choices1 = array($choice1); - $choices2 = array($choice2); + $choices1 = [$choice1]; + $choices2 = [$choice2]; $list1 = new \stdClass(); $list2 = new \stdClass(); @@ -122,7 +127,7 @@ class CachingFactoryDecoratorTest extends TestCase public function testCreateFromChoicesSameValueClosure() { - $choices = array(1); + $choices = [1]; $list = new \stdClass(); $closure = function () {}; @@ -137,7 +142,7 @@ class CachingFactoryDecoratorTest extends TestCase public function testCreateFromChoicesDifferentValueClosure() { - $choices = array(1); + $choices = [1]; $list1 = new \stdClass(); $list2 = new \stdClass(); $closure1 = function () {}; @@ -228,7 +233,7 @@ class CachingFactoryDecoratorTest extends TestCase public function testCreateViewSamePreferredChoices() { - $preferred = array('a'); + $preferred = ['a']; $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); $view = new \stdClass(); @@ -243,8 +248,8 @@ class CachingFactoryDecoratorTest extends TestCase public function testCreateViewDifferentPreferredChoices() { - $preferred1 = array('a'); - $preferred2 = array('b'); + $preferred1 = ['a']; + $preferred2 = ['b']; $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); $view1 = new \stdClass(); $view2 = new \stdClass(); @@ -408,7 +413,7 @@ class CachingFactoryDecoratorTest extends TestCase public function testCreateViewSameAttributes() { - $attr = array('class' => 'foobar'); + $attr = ['class' => 'foobar']; $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); $view = new \stdClass(); @@ -423,8 +428,8 @@ class CachingFactoryDecoratorTest extends TestCase public function testCreateViewDifferentAttributes() { - $attr1 = array('class' => 'foobar1'); - $attr2 = array('class' => 'foobar2'); + $attr1 = ['class' => 'foobar1']; + $attr2 = ['class' => 'foobar2']; $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); $view1 = new \stdClass(); $view2 = new \stdClass(); @@ -480,53 +485,53 @@ class CachingFactoryDecoratorTest extends TestCase public function provideSameChoices() { - $object = (object) array('foo' => 'bar'); + $object = (object) ['foo' => 'bar']; - return array( - array(0, 0), - array('a', 'a'), + return [ + [0, 0], + ['a', 'a'], // https://github.com/symfony/symfony/issues/10409 - array(\chr(181).'meter', \chr(181).'meter'), // UTF-8 - array($object, $object), - ); + [\chr(181).'meter', \chr(181).'meter'], // UTF-8 + [$object, $object], + ]; } public function provideDistinguishedChoices() { - return array( - array(0, false), - array(0, null), - array(0, '0'), - array(0, ''), - array(1, true), - array(1, '1'), - array(1, 'a'), - array('', false), - array('', null), - array(false, null), + return [ + [0, false], + [0, null], + [0, '0'], + [0, ''], + [1, true], + [1, '1'], + [1, 'a'], + ['', false], + ['', null], + [false, null], // Same properties, but not identical - array((object) array('foo' => 'bar'), (object) array('foo' => 'bar')), - ); + [(object) ['foo' => 'bar'], (object) ['foo' => 'bar']], + ]; } public function provideSameKeyChoices() { // Only test types here that can be used as array keys - return array( - array(0, 0), - array(0, '0'), - array('a', 'a'), - array(\chr(181).'meter', \chr(181).'meter'), - ); + return [ + [0, 0], + [0, '0'], + ['a', 'a'], + [\chr(181).'meter', \chr(181).'meter'], + ]; } public function provideDistinguishedKeyChoices() { // Only test types here that can be used as array keys - return array( - array(0, ''), - array(1, 'a'), - array('', 'a'), - ); + return [ + [0, ''], + [1, 'a'], + ['', 'a'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php index 24502482..c520ab1a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php @@ -86,28 +86,28 @@ class DefaultChoiceListFactoryTest extends TestCase protected function setUp() { - $this->obj1 = (object) array('label' => 'A', 'index' => 'w', 'value' => 'a', 'preferred' => false, 'group' => 'Group 1', 'attr' => array()); - $this->obj2 = (object) array('label' => 'B', 'index' => 'x', 'value' => 'b', 'preferred' => true, 'group' => 'Group 1', 'attr' => array('attr1' => 'value1')); - $this->obj3 = (object) array('label' => 'C', 'index' => 'y', 'value' => 1, 'preferred' => true, 'group' => 'Group 2', 'attr' => array('attr2' => 'value2')); - $this->obj4 = (object) array('label' => 'D', 'index' => 'z', 'value' => 2, 'preferred' => false, 'group' => 'Group 2', 'attr' => array()); + $this->obj1 = (object) ['label' => 'A', 'index' => 'w', 'value' => 'a', 'preferred' => false, 'group' => 'Group 1', 'attr' => []]; + $this->obj2 = (object) ['label' => 'B', 'index' => 'x', 'value' => 'b', 'preferred' => true, 'group' => 'Group 1', 'attr' => ['attr1' => 'value1']]; + $this->obj3 = (object) ['label' => 'C', 'index' => 'y', 'value' => 1, 'preferred' => true, 'group' => 'Group 2', 'attr' => ['attr2' => 'value2']]; + $this->obj4 = (object) ['label' => 'D', 'index' => 'z', 'value' => 2, 'preferred' => false, 'group' => 'Group 2', 'attr' => []]; $this->list = new ArrayChoiceList( - array('A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4) + ['A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4] ); $this->factory = new DefaultChoiceListFactory(); } public function testCreateFromChoicesEmpty() { - $list = $this->factory->createListFromChoices(array()); + $list = $this->factory->createListFromChoices([]); - $this->assertSame(array(), $list->getChoices()); - $this->assertSame(array(), $list->getValues()); + $this->assertSame([], $list->getChoices()); + $this->assertSame([], $list->getValues()); } public function testCreateFromChoicesFlat() { $list = $this->factory->createListFromChoices( - array('A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4) + ['A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4] ); $this->assertObjectListWithGeneratedValues($list); @@ -116,7 +116,7 @@ class DefaultChoiceListFactoryTest extends TestCase public function testCreateFromChoicesFlatTraversable() { $list = $this->factory->createListFromChoices( - new \ArrayIterator(array('A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4)) + new \ArrayIterator(['A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4]) ); $this->assertObjectListWithGeneratedValues($list); @@ -125,8 +125,8 @@ class DefaultChoiceListFactoryTest extends TestCase public function testCreateFromChoicesFlatValuesAsCallable() { $list = $this->factory->createListFromChoices( - array('A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4), - array($this, 'getValue') + ['A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4], + [$this, 'getValue'] ); $this->assertObjectListWithCustomValues($list); @@ -135,7 +135,7 @@ class DefaultChoiceListFactoryTest extends TestCase public function testCreateFromChoicesFlatValuesAsClosure() { $list = $this->factory->createListFromChoices( - array('A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4), + ['A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4], function ($object) { return $object->value; } ); @@ -145,10 +145,10 @@ class DefaultChoiceListFactoryTest extends TestCase public function testCreateFromChoicesGrouped() { $list = $this->factory->createListFromChoices( - array( - 'Group 1' => array('A' => $this->obj1, 'B' => $this->obj2), - 'Group 2' => array('C' => $this->obj3, 'D' => $this->obj4), - ) + [ + 'Group 1' => ['A' => $this->obj1, 'B' => $this->obj2], + 'Group 2' => ['C' => $this->obj3, 'D' => $this->obj4], + ] ); $this->assertObjectListWithGeneratedValues($list); @@ -157,10 +157,10 @@ class DefaultChoiceListFactoryTest extends TestCase public function testCreateFromChoicesGroupedTraversable() { $list = $this->factory->createListFromChoices( - new \ArrayIterator(array( - 'Group 1' => array('A' => $this->obj1, 'B' => $this->obj2), - 'Group 2' => array('C' => $this->obj3, 'D' => $this->obj4), - )) + new \ArrayIterator([ + 'Group 1' => ['A' => $this->obj1, 'B' => $this->obj2], + 'Group 2' => ['C' => $this->obj3, 'D' => $this->obj4], + ]) ); $this->assertObjectListWithGeneratedValues($list); @@ -169,11 +169,11 @@ class DefaultChoiceListFactoryTest extends TestCase public function testCreateFromChoicesGroupedValuesAsCallable() { $list = $this->factory->createListFromChoices( - array( - 'Group 1' => array('A' => $this->obj1, 'B' => $this->obj2), - 'Group 2' => array('C' => $this->obj3, 'D' => $this->obj4), - ), - array($this, 'getValue') + [ + 'Group 1' => ['A' => $this->obj1, 'B' => $this->obj2], + 'Group 2' => ['C' => $this->obj3, 'D' => $this->obj4], + ], + [$this, 'getValue'] ); $this->assertObjectListWithCustomValues($list); @@ -182,10 +182,10 @@ class DefaultChoiceListFactoryTest extends TestCase public function testCreateFromChoicesGroupedValuesAsClosure() { $list = $this->factory->createListFromChoices( - array( - 'Group 1' => array('A' => $this->obj1, 'B' => $this->obj2), - 'Group 2' => array('C' => $this->obj3, 'D' => $this->obj4), - ), + [ + 'Group 1' => ['A' => $this->obj1, 'B' => $this->obj2], + 'Group 2' => ['C' => $this->obj3, 'D' => $this->obj4], + ], function ($object) { return $object->value; } ); @@ -216,12 +216,12 @@ class DefaultChoiceListFactoryTest extends TestCase $view = $this->factory->createView($this->list); $this->assertEquals(new ChoiceListView( - array( + [ 0 => new ChoiceView($this->obj1, '0', 'A'), 1 => new ChoiceView($this->obj2, '1', 'B'), 2 => new ChoiceView($this->obj3, '2', 'C'), 3 => new ChoiceView($this->obj4, '3', 'D'), - ), array() + ], [] ), $view); } @@ -229,7 +229,7 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3) + [$this->obj2, $this->obj3] ); $this->assertFlatView($view); @@ -239,16 +239,16 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array() + [] ); $this->assertEquals(new ChoiceListView( - array( + [ 0 => new ChoiceView($this->obj1, '0', 'A'), 1 => new ChoiceView($this->obj2, '1', 'B'), 2 => new ChoiceView($this->obj3, '2', 'C'), 3 => new ChoiceView($this->obj4, '3', 'D'), - ), array() + ], [] ), $view); } @@ -256,7 +256,7 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this, 'isPreferred') + [$this, 'isPreferred'] ); $this->assertFlatView($view); @@ -305,8 +305,8 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), - array($this, 'getLabel') + [$this->obj2, $this->obj3], + [$this, 'getLabel'] ); $this->assertFlatView($view); @@ -316,7 +316,7 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], function ($object) { return $object->label; } @@ -329,7 +329,7 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], function ($object, $key) { return $key; } @@ -342,7 +342,7 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], function ($object, $key, $value) { switch ($value) { case '0': return 'A'; @@ -360,9 +360,9 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], null, // label - array($this, 'getFormIndex') + [$this, 'getFormIndex'] ); $this->assertFlatViewWithCustomIndices($view); @@ -372,7 +372,7 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], null, // label function ($object) { return $object->index; @@ -386,7 +386,7 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], null, // label function ($object, $key) { switch ($key) { @@ -405,7 +405,7 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], null, // label function ($object, $key, $value) { switch ($value) { @@ -422,15 +422,15 @@ class DefaultChoiceListFactoryTest extends TestCase public function testCreateViewFlatGroupByOriginalStructure() { - $list = new ArrayChoiceList(array( - 'Group 1' => array('A' => $this->obj1, 'B' => $this->obj2), - 'Group 2' => array('C' => $this->obj3, 'D' => $this->obj4), - 'Group empty' => array(), - )); + $list = new ArrayChoiceList([ + 'Group 1' => ['A' => $this->obj1, 'B' => $this->obj2], + 'Group 2' => ['C' => $this->obj3, 'D' => $this->obj4], + 'Group empty' => [], + ]); $view = $this->factory->createView( $list, - array($this->obj2, $this->obj3) + [$this->obj2, $this->obj3] ); $this->assertGroupedView($view); @@ -440,10 +440,10 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], null, // label null, // index - array() // ignored + null // group ); $this->assertFlatView($view); @@ -453,10 +453,10 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], null, // label null, // index - array($this, 'getGroup') + [$this, 'getGroup'] ); $this->assertGroupedView($view); @@ -466,10 +466,10 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], null, // label null, // index - array($this, 'getGroupAsObject') + [$this, 'getGroupAsObject'] ); $this->assertGroupedView($view); @@ -482,7 +482,7 @@ class DefaultChoiceListFactoryTest extends TestCase $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], null, // label null, // index function ($object) use ($obj1, $obj2) { @@ -497,7 +497,7 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], null, // label null, // index function ($object, $key) { @@ -512,7 +512,7 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], null, // label null, // index function ($object, $key, $value) { @@ -527,14 +527,14 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], null, // label null, // index null, // group - array( - 'B' => array('attr1' => 'value1'), - 'C' => array('attr2' => 'value2'), - ) + [ + 'B' => ['attr1' => 'value1'], + 'C' => ['attr2' => 'value2'], + ] ); $this->assertFlatViewWithAttr($view); @@ -544,11 +544,11 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], null, // label null, // index null, // group - array() + [] ); $this->assertFlatView($view); @@ -558,11 +558,11 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], null, // label null, // index null, // group - array($this, 'getAttr') + [$this, 'getAttr'] ); $this->assertFlatViewWithAttr($view); @@ -572,7 +572,7 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], null, // label null, // index null, // group @@ -588,15 +588,15 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], null, // label null, // index null, // group function ($object, $key) { switch ($key) { - case 'B': return array('attr1' => 'value1'); - case 'C': return array('attr2' => 'value2'); - default: return array(); + case 'B': return ['attr1' => 'value1']; + case 'C': return ['attr2' => 'value2']; + default: return []; } } ); @@ -608,15 +608,15 @@ class DefaultChoiceListFactoryTest extends TestCase { $view = $this->factory->createView( $this->list, - array($this->obj2, $this->obj3), + [$this->obj2, $this->obj3], null, // label null, // index null, // group function ($object, $key, $value) { switch ($value) { - case '1': return array('attr1' => 'value1'); - case '2': return array('attr2' => 'value2'); - default: return array(); + case '1': return ['attr1' => 'value1']; + case '2': return ['attr2' => 'value2']; + default: return []; } } ); @@ -626,151 +626,151 @@ class DefaultChoiceListFactoryTest extends TestCase private function assertScalarListWithChoiceValues(ChoiceListInterface $list) { - $this->assertSame(array('a', 'b', 'c', 'd'), $list->getValues()); + $this->assertSame(['a', 'b', 'c', 'd'], $list->getValues()); - $this->assertSame(array( + $this->assertSame([ 'a' => 'a', 'b' => 'b', 'c' => 'c', 'd' => 'd', - ), $list->getChoices()); + ], $list->getChoices()); - $this->assertSame(array( + $this->assertSame([ 'a' => 'A', 'b' => 'B', 'c' => 'C', 'd' => 'D', - ), $list->getOriginalKeys()); + ], $list->getOriginalKeys()); } private function assertObjectListWithGeneratedValues(ChoiceListInterface $list) { - $this->assertSame(array('0', '1', '2', '3'), $list->getValues()); + $this->assertSame(['0', '1', '2', '3'], $list->getValues()); - $this->assertSame(array( + $this->assertSame([ 0 => $this->obj1, 1 => $this->obj2, 2 => $this->obj3, 3 => $this->obj4, - ), $list->getChoices()); + ], $list->getChoices()); - $this->assertSame(array( + $this->assertSame([ 0 => 'A', 1 => 'B', 2 => 'C', 3 => 'D', - ), $list->getOriginalKeys()); + ], $list->getOriginalKeys()); } private function assertScalarListWithCustomValues(ChoiceListInterface $list) { - $this->assertSame(array('a', 'b', '1', '2'), $list->getValues()); + $this->assertSame(['a', 'b', '1', '2'], $list->getValues()); - $this->assertSame(array( + $this->assertSame([ 'a' => 'a', 'b' => 'b', 1 => 'c', 2 => 'd', - ), $list->getChoices()); + ], $list->getChoices()); - $this->assertSame(array( + $this->assertSame([ 'a' => 'A', 'b' => 'B', 1 => 'C', 2 => 'D', - ), $list->getOriginalKeys()); + ], $list->getOriginalKeys()); } private function assertObjectListWithCustomValues(ChoiceListInterface $list) { - $this->assertSame(array('a', 'b', '1', '2'), $list->getValues()); + $this->assertSame(['a', 'b', '1', '2'], $list->getValues()); - $this->assertSame(array( + $this->assertSame([ 'a' => $this->obj1, 'b' => $this->obj2, 1 => $this->obj3, 2 => $this->obj4, - ), $list->getChoices()); + ], $list->getChoices()); - $this->assertSame(array( + $this->assertSame([ 'a' => 'A', 'b' => 'B', 1 => 'C', 2 => 'D', - ), $list->getOriginalKeys()); + ], $list->getOriginalKeys()); } private function assertFlatView($view) { $this->assertEquals(new ChoiceListView( - array( + [ 0 => new ChoiceView($this->obj1, '0', 'A'), 3 => new ChoiceView($this->obj4, '3', 'D'), - ), array( + ], [ 1 => new ChoiceView($this->obj2, '1', 'B'), 2 => new ChoiceView($this->obj3, '2', 'C'), - ) + ] ), $view); } private function assertFlatViewWithCustomIndices($view) { $this->assertEquals(new ChoiceListView( - array( + [ 'w' => new ChoiceView($this->obj1, '0', 'A'), 'z' => new ChoiceView($this->obj4, '3', 'D'), - ), array( + ], [ 'x' => new ChoiceView($this->obj2, '1', 'B'), 'y' => new ChoiceView($this->obj3, '2', 'C'), - ) + ] ), $view); } private function assertFlatViewWithAttr($view) { $this->assertEquals(new ChoiceListView( - array( + [ 0 => new ChoiceView($this->obj1, '0', 'A'), 3 => new ChoiceView($this->obj4, '3', 'D'), - ), array( + ], [ 1 => new ChoiceView( $this->obj2, '1', 'B', - array('attr1' => 'value1') + ['attr1' => 'value1'] ), 2 => new ChoiceView( $this->obj3, '2', 'C', - array('attr2' => 'value2') + ['attr2' => 'value2'] ), - ) + ] ), $view); } private function assertGroupedView($view) { $this->assertEquals(new ChoiceListView( - array( + [ 'Group 1' => new ChoiceGroupView( 'Group 1', - array(0 => new ChoiceView($this->obj1, '0', 'A')) + [0 => new ChoiceView($this->obj1, '0', 'A')] ), 'Group 2' => new ChoiceGroupView( 'Group 2', - array(3 => new ChoiceView($this->obj4, '3', 'D')) + [3 => new ChoiceView($this->obj4, '3', 'D')] ), - ), array( + ], [ 'Group 1' => new ChoiceGroupView( 'Group 1', - array(1 => new ChoiceView($this->obj2, '1', 'B')) + [1 => new ChoiceView($this->obj2, '1', 'B')] ), 'Group 2' => new ChoiceGroupView( 'Group 2', - array(2 => new ChoiceView($this->obj3, '2', 'C')) + [2 => new ChoiceView($this->obj3, '2', 'C')] ), - ) + ] ), $view); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/PropertyAccessDecoratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/PropertyAccessDecoratorTest.php index d100dcff..1b943e81 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/PropertyAccessDecoratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/PropertyAccessDecoratorTest.php @@ -38,7 +38,7 @@ class PropertyAccessDecoratorTest extends TestCase public function testCreateFromChoicesPropertyPath() { - $choices = array((object) array('property' => 'value')); + $choices = [(object) ['property' => 'value']]; $this->decoratedFactory->expects($this->once()) ->method('createListFromChoices') @@ -47,12 +47,12 @@ class PropertyAccessDecoratorTest extends TestCase return array_map($callback, $choices); })); - $this->assertSame(array('value'), $this->factory->createListFromChoices($choices, 'property')); + $this->assertSame(['value'], $this->factory->createListFromChoices($choices, 'property')); } public function testCreateFromChoicesPropertyPathInstance() { - $choices = array((object) array('property' => 'value')); + $choices = [(object) ['property' => 'value']]; $this->decoratedFactory->expects($this->once()) ->method('createListFromChoices') @@ -61,7 +61,7 @@ class PropertyAccessDecoratorTest extends TestCase return array_map($callback, $choices); })); - $this->assertSame(array('value'), $this->factory->createListFromChoices($choices, new PropertyPath('property'))); + $this->assertSame(['value'], $this->factory->createListFromChoices($choices, new PropertyPath('property'))); } /** @@ -69,7 +69,7 @@ class PropertyAccessDecoratorTest extends TestCase */ public function testCreateFromChoicesPropertyPathWithCallableString() { - $choices = array('foo' => 'bar'); + $choices = ['foo' => 'bar']; $this->decoratedFactory->expects($this->once()) ->method('createListFromChoices') @@ -87,7 +87,7 @@ class PropertyAccessDecoratorTest extends TestCase ->method('createListFromLoader') ->with($loader, $this->isInstanceOf('\Closure')) ->will($this->returnCallback(function ($loader, $callback) { - return $callback((object) array('property' => 'value')); + return $callback((object) ['property' => 'value']); })); $this->assertSame('value', $this->factory->createListFromLoader($loader, 'property')); @@ -111,7 +111,7 @@ class PropertyAccessDecoratorTest extends TestCase // https://github.com/symfony/symfony/issues/5494 public function testCreateFromChoicesAssumeNullIfValuePropertyPathUnreadable() { - $choices = array(null); + $choices = [null]; $this->decoratedFactory->expects($this->once()) ->method('createListFromChoices') @@ -120,7 +120,7 @@ class PropertyAccessDecoratorTest extends TestCase return array_map($callback, $choices); })); - $this->assertSame(array(null), $this->factory->createListFromChoices($choices, 'property')); + $this->assertSame([null], $this->factory->createListFromChoices($choices, 'property')); } // https://github.com/symfony/symfony/issues/5494 @@ -146,7 +146,7 @@ class PropertyAccessDecoratorTest extends TestCase ->method('createListFromLoader') ->with($loader, $this->isInstanceOf('\Closure')) ->will($this->returnCallback(function ($loader, $callback) { - return $callback((object) array('property' => 'value')); + return $callback((object) ['property' => 'value']); })); $this->assertSame('value', $this->factory->createListFromLoader($loader, new PropertyPath('property'))); @@ -160,7 +160,7 @@ class PropertyAccessDecoratorTest extends TestCase ->method('createView') ->with($list, $this->isInstanceOf('\Closure')) ->will($this->returnCallback(function ($list, $preferred) { - return $preferred((object) array('property' => true)); + return $preferred((object) ['property' => true]); })); $this->assertTrue($this->factory->createView( @@ -195,7 +195,7 @@ class PropertyAccessDecoratorTest extends TestCase ->method('createView') ->with($list, $this->isInstanceOf('\Closure')) ->will($this->returnCallback(function ($list, $preferred) { - return $preferred((object) array('property' => true)); + return $preferred((object) ['property' => true]); })); $this->assertTrue($this->factory->createView( @@ -213,7 +213,7 @@ class PropertyAccessDecoratorTest extends TestCase ->method('createView') ->with($list, $this->isInstanceOf('\Closure')) ->will($this->returnCallback(function ($list, $preferred) { - return $preferred((object) array('category' => null)); + return $preferred((object) ['category' => null]); })); $this->assertFalse($this->factory->createView( @@ -230,7 +230,7 @@ class PropertyAccessDecoratorTest extends TestCase ->method('createView') ->with($list, null, $this->isInstanceOf('\Closure')) ->will($this->returnCallback(function ($list, $preferred, $label) { - return $label((object) array('property' => 'label')); + return $label((object) ['property' => 'label']); })); $this->assertSame('label', $this->factory->createView( @@ -267,7 +267,7 @@ class PropertyAccessDecoratorTest extends TestCase ->method('createView') ->with($list, null, $this->isInstanceOf('\Closure')) ->will($this->returnCallback(function ($list, $preferred, $label) { - return $label((object) array('property' => 'label')); + return $label((object) ['property' => 'label']); })); $this->assertSame('label', $this->factory->createView( @@ -285,7 +285,7 @@ class PropertyAccessDecoratorTest extends TestCase ->method('createView') ->with($list, null, null, $this->isInstanceOf('\Closure')) ->will($this->returnCallback(function ($list, $preferred, $label, $index) { - return $index((object) array('property' => 'index')); + return $index((object) ['property' => 'index']); })); $this->assertSame('index', $this->factory->createView( @@ -324,7 +324,7 @@ class PropertyAccessDecoratorTest extends TestCase ->method('createView') ->with($list, null, null, $this->isInstanceOf('\Closure')) ->will($this->returnCallback(function ($list, $preferred, $label, $index) { - return $index((object) array('property' => 'index')); + return $index((object) ['property' => 'index']); })); $this->assertSame('index', $this->factory->createView( @@ -343,7 +343,7 @@ class PropertyAccessDecoratorTest extends TestCase ->method('createView') ->with($list, null, null, null, $this->isInstanceOf('\Closure')) ->will($this->returnCallback(function ($list, $preferred, $label, $index, $groupBy) { - return $groupBy((object) array('property' => 'group')); + return $groupBy((object) ['property' => 'group']); })); $this->assertSame('group', $this->factory->createView( @@ -384,7 +384,7 @@ class PropertyAccessDecoratorTest extends TestCase ->method('createView') ->with($list, null, null, null, $this->isInstanceOf('\Closure')) ->will($this->returnCallback(function ($list, $preferred, $label, $index, $groupBy) { - return $groupBy((object) array('property' => 'group')); + return $groupBy((object) ['property' => 'group']); })); $this->assertSame('group', $this->factory->createView( @@ -405,7 +405,7 @@ class PropertyAccessDecoratorTest extends TestCase ->method('createView') ->with($list, null, null, null, $this->isInstanceOf('\Closure')) ->will($this->returnCallback(function ($list, $preferred, $label, $index, $groupBy) { - return $groupBy((object) array('group' => null)); + return $groupBy((object) ['group' => null]); })); $this->assertNull($this->factory->createView( @@ -425,7 +425,7 @@ class PropertyAccessDecoratorTest extends TestCase ->method('createView') ->with($list, null, null, null, null, $this->isInstanceOf('\Closure')) ->will($this->returnCallback(function ($list, $preferred, $label, $index, $groupBy, $attr) { - return $attr((object) array('property' => 'attr')); + return $attr((object) ['property' => 'attr']); })); $this->assertSame('attr', $this->factory->createView( @@ -468,7 +468,7 @@ class PropertyAccessDecoratorTest extends TestCase ->method('createView') ->with($list, null, null, null, null, $this->isInstanceOf('\Closure')) ->will($this->returnCallback(function ($list, $preferred, $label, $index, $groupBy, $attr) { - return $attr((object) array('property' => 'attr')); + return $attr((object) ['property' => 'attr']); })); $this->assertSame('attr', $this->factory->createView( diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/LazyChoiceListTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/LazyChoiceListTest.php index 61c8a5aa..60795c4a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/LazyChoiceListTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/LazyChoiceListTest.php @@ -74,7 +74,7 @@ class LazyChoiceListTest extends TestCase $this->loader->expects($this->at(1)) ->method('loadChoiceList') ->with($this->value) - ->willReturn(new ArrayChoiceList(array('a', 'b'))); + ->willReturn(new ArrayChoiceList(['a', 'b'])); // The same list is returned by the lazy choice list $this->loadedList->expects($this->exactly(2)) @@ -137,11 +137,11 @@ class LazyChoiceListTest extends TestCase { $this->loader->expects($this->exactly(2)) ->method('loadChoicesForValues') - ->with(array('a', 'b')) + ->with(['a', 'b']) ->will($this->returnValue('RESULT')); - $this->assertSame('RESULT', $this->list->getChoicesForValues(array('a', 'b'))); - $this->assertSame('RESULT', $this->list->getChoicesForValues(array('a', 'b'))); + $this->assertSame('RESULT', $this->list->getChoicesForValues(['a', 'b'])); + $this->assertSame('RESULT', $this->list->getChoicesForValues(['a', 'b'])); } public function testGetChoicesForValuesUsesLoadedList() @@ -158,14 +158,14 @@ class LazyChoiceListTest extends TestCase $this->loadedList->expects($this->exactly(2)) ->method('getChoicesForValues') - ->with(array('a', 'b')) + ->with(['a', 'b']) ->will($this->returnValue('RESULT')); // load choice list $this->list->getChoices(); - $this->assertSame('RESULT', $this->list->getChoicesForValues(array('a', 'b'))); - $this->assertSame('RESULT', $this->list->getChoicesForValues(array('a', 'b'))); + $this->assertSame('RESULT', $this->list->getChoicesForValues(['a', 'b'])); + $this->assertSame('RESULT', $this->list->getChoicesForValues(['a', 'b'])); } /** @@ -175,11 +175,11 @@ class LazyChoiceListTest extends TestCase { $this->loader->expects($this->exactly(2)) ->method('loadValuesForChoices') - ->with(array('a', 'b')) + ->with(['a', 'b']) ->will($this->returnValue('RESULT')); - $this->assertSame('RESULT', $this->list->getValuesForChoices(array('a', 'b'))); - $this->assertSame('RESULT', $this->list->getValuesForChoices(array('a', 'b'))); + $this->assertSame('RESULT', $this->list->getValuesForChoices(['a', 'b'])); + $this->assertSame('RESULT', $this->list->getValuesForChoices(['a', 'b'])); } public function testGetValuesForChoicesUsesLoadedList() @@ -196,13 +196,13 @@ class LazyChoiceListTest extends TestCase $this->loadedList->expects($this->exactly(2)) ->method('getValuesForChoices') - ->with(array('a', 'b')) + ->with(['a', 'b']) ->will($this->returnValue('RESULT')); // load choice list $this->list->getChoices(); - $this->assertSame('RESULT', $this->list->getValuesForChoices(array('a', 'b'))); - $this->assertSame('RESULT', $this->list->getValuesForChoices(array('a', 'b'))); + $this->assertSame('RESULT', $this->list->getValuesForChoices(['a', 'b'])); + $this->assertSame('RESULT', $this->list->getValuesForChoices(['a', 'b'])); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Loader/CallbackChoiceLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Loader/CallbackChoiceLoaderTest.php index 7a1a96d1..362783c9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Loader/CallbackChoiceLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Loader/CallbackChoiceLoaderTest.php @@ -53,11 +53,11 @@ class CallbackChoiceLoaderTest extends TestCase self::$value = function ($choice) { return isset($choice->value) ? $choice->value : null; }; - self::$choices = array( - (object) array('value' => 'choice_one'), - (object) array('value' => 'choice_two'), - ); - self::$choiceValues = array('choice_one', 'choice_two'); + self::$choices = [ + (object) ['value' => 'choice_one'], + (object) ['value' => 'choice_two'], + ]; + self::$choiceValues = ['choice_one', 'choice_two']; self::$lazyChoiceList = new LazyChoiceList(self::$loader, self::$value); } @@ -95,8 +95,8 @@ class CallbackChoiceLoaderTest extends TestCase { self::$loader = null; self::$value = null; - self::$choices = array(); - self::$choiceValues = array(); + self::$choices = []; + self::$choiceValues = []; self::$lazyChoiceList = null; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php index f69222c3..1e7ce798 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php @@ -24,7 +24,7 @@ class DebugCommandTest extends TestCase public function testDebugDefaults() { $tester = $this->createCommandTester(); - $ret = $tester->execute(array(), array('decorated' => false)); + $ret = $tester->execute([], ['decorated' => false]); $this->assertEquals(0, $ret, 'Returns 0 in case of success'); $this->assertContains('Built-in form types', $tester->getDisplay()); @@ -33,7 +33,7 @@ class DebugCommandTest extends TestCase public function testDebugSingleFormType() { $tester = $this->createCommandTester(); - $ret = $tester->execute(array('class' => 'FormType'), array('decorated' => false)); + $ret = $tester->execute(['class' => 'FormType'], ['decorated' => false]); $this->assertEquals(0, $ret, 'Returns 0 in case of success'); $this->assertContains('Symfony\Component\Form\Extension\Core\Type\FormType (Block prefix: "form")', $tester->getDisplay()); @@ -42,7 +42,7 @@ class DebugCommandTest extends TestCase public function testDebugFormTypeOption() { $tester = $this->createCommandTester(); - $ret = $tester->execute(array('class' => 'FormType', 'option' => 'method'), array('decorated' => false)); + $ret = $tester->execute(['class' => 'FormType', 'option' => 'method'], ['decorated' => false]); $this->assertEquals(0, $ret, 'Returns 0 in case of success'); $this->assertContains('Symfony\Component\Form\Extension\Core\Type\FormType (method)', $tester->getDisplay()); @@ -55,7 +55,7 @@ class DebugCommandTest extends TestCase public function testDebugSingleFormTypeNotFound() { $tester = $this->createCommandTester(); - $tester->execute(array('class' => 'NonExistentType'), array('decorated' => false, 'interactive' => false)); + $tester->execute(['class' => 'NonExistentType'], ['decorated' => false, 'interactive' => false]); } public function testDebugAmbiguousFormType() @@ -75,23 +75,23 @@ TXT; $this->setExpectedException(InvalidArgumentException::class, $expectedMessage); } - $tester = $this->createCommandTester(array( + $tester = $this->createCommandTester([ 'Symfony\Component\Form\Tests\Fixtures\Debug\A', 'Symfony\Component\Form\Tests\Fixtures\Debug\B', - )); + ]); - $tester->execute(array('class' => 'AmbiguousType'), array('decorated' => false, 'interactive' => false)); + $tester->execute(['class' => 'AmbiguousType'], ['decorated' => false, 'interactive' => false]); } public function testDebugAmbiguousFormTypeInteractive() { - $tester = $this->createCommandTester(array( + $tester = $this->createCommandTester([ 'Symfony\Component\Form\Tests\Fixtures\Debug\A', 'Symfony\Component\Form\Tests\Fixtures\Debug\B', - )); + ]); - $tester->setInputs(array(0)); - $tester->execute(array('class' => 'AmbiguousType'), array('decorated' => false, 'interactive' => true)); + $tester->setInputs([0]); + $tester->execute(['class' => 'AmbiguousType'], ['decorated' => false, 'interactive' => true]); $this->assertEquals(0, $tester->getStatusCode(), 'Returns 0 in case of success'); $output = $tester->getDisplay(true); @@ -114,12 +114,12 @@ TXT */ public function testDebugInvalidFormType() { - $this->createCommandTester()->execute(array('class' => 'test')); + $this->createCommandTester()->execute(['class' => 'test']); } private function createCommandTester(array $namespaces = null) { - $formRegistry = new FormRegistry(array(), new ResolvedFormTypeFactory()); + $formRegistry = new FormRegistry([], new ResolvedFormTypeFactory()); $command = null === $namespaces ? new DebugCommand($formRegistry) : new DebugCommand($formRegistry, $namespaces); $application = new Application(); $application->add($command); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/CompoundFormPerformanceTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/CompoundFormPerformanceTest.php index e0a33306..b9c81f1d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/CompoundFormPerformanceTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/CompoundFormPerformanceTest.php @@ -31,16 +31,16 @@ class CompoundFormPerformanceTest extends FormPerformanceTestCase $form = $this->factory->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType') ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType') ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType') - ->add('gender', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( - 'choices' => array('male' => 'Male', 'female' => 'Female'), + ->add('color', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', [ + 'choices' => ['red' => 'Red', 'blue' => 'Blue'], 'required' => false, - )) + ]) ->add('age', 'Symfony\Component\Form\Extension\Core\Type\NumberType') ->add('birthDate', 'Symfony\Component\Form\Extension\Core\Type\BirthdayType') - ->add('city', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( + ->add('city', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', [ // simulate 300 different cities 'choices' => range(1, 300), - )) + ]) ->getForm(); // load the form into a view diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/CompoundFormTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/CompoundFormTest.php index 336593f7..ba4f26ec 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/CompoundFormTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/CompoundFormTest.php @@ -11,9 +11,12 @@ namespace Symfony\Component\Form\Tests; +use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper; use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler; use Symfony\Component\Form\FormError; +use Symfony\Component\Form\FormEvent; +use Symfony\Component\Form\FormEvents; use Symfony\Component\Form\Forms; use Symfony\Component\Form\FormView; use Symfony\Component\Form\SubmitButtonBuilder; @@ -28,10 +31,10 @@ class CompoundFormTest extends AbstractFormTest $this->form->add($this->getBuilder('firstName')->getForm()); $this->form->add($this->getBuilder('lastName')->getForm()); - $this->form->submit(array( + $this->form->submit([ 'firstName' => 'Bernhard', 'lastName' => 'Schussek', - )); + ]); $this->assertTrue($this->form->isValid()); } @@ -41,10 +44,10 @@ class CompoundFormTest extends AbstractFormTest $this->form->add($this->getBuilder('firstName')->getForm()); $this->form->add($this->getBuilder('lastName')->getForm()); - $this->form->submit(array( + $this->form->submit([ 'firstName' => 'Bernhard', 'lastName' => 'Schussek', - )); + ]); $this->form->get('lastName')->addError(new FormError('Invalid')); @@ -60,7 +63,7 @@ class CompoundFormTest extends AbstractFormTest ->add($this->getBuilder('name')) ->getForm(); - $form->submit(array('name' => 'Jacques Doe')); + $form->submit(['name' => 'Jacques Doe']); $form->get('name')->addError(new FormError('Invalid')); @@ -69,40 +72,35 @@ class CompoundFormTest extends AbstractFormTest public function testSubmitForwardsNullIfNotClearMissingButValueIsExplicitlyNull() { - $child = $this->getMockForm('firstName'); + $child = $this->createForm('firstName', false); $this->form->add($child); - $child->expects($this->once()) - ->method('submit') - ->with($this->equalTo(null)); + $this->form->submit(['firstName' => null], false); - $this->form->submit(array('firstName' => null), false); + $this->assertNull($this->form->get('firstName')->getData()); } public function testSubmitForwardsNullIfValueIsMissing() { - $child = $this->getMockForm('firstName'); + $child = $this->createForm('firstName', false); $this->form->add($child); - $child->expects($this->once()) - ->method('submit') - ->with($this->equalTo(null)); + $this->form->submit([]); - $this->form->submit(array()); + $this->assertNull($this->form->get('firstName')->getData()); } public function testSubmitDoesNotForwardNullIfNotClearMissing() { - $child = $this->getMockForm('firstName'); + $child = $this->createForm('firstName', false); $this->form->add($child); - $child->expects($this->never()) - ->method('submit'); + $this->form->submit([], false); - $this->form->submit(array(), false); + $this->assertFalse($child->isSubmitted()); } public function testSubmitDoesNotAddExtraFieldForNullValues() @@ -110,25 +108,32 @@ class CompoundFormTest extends AbstractFormTest $factory = Forms::createFormFactoryBuilder() ->getFormFactory(); - $child = $factory->createNamed('file', 'Symfony\Component\Form\Extension\Core\Type\FileType', null, array('auto_initialize' => false)); + $child = $factory->createNamed('file', 'Symfony\Component\Form\Extension\Core\Type\FileType', null, ['auto_initialize' => false]); $this->form->add($child); - $this->form->submit(array('file' => null), false); + $this->form->submit(['file' => null], false); $this->assertCount(0, $this->form->getExtraData()); } public function testClearMissingFlagIsForwarded() { - $child = $this->getMockForm('firstName'); + $personForm = $this->createForm('person'); - $this->form->add($child); + $firstNameForm = $this->createForm('firstName', false); + $personForm->add($firstNameForm); - $child->expects($this->once()) - ->method('submit') - ->with($this->equalTo('foo'), false); + $lastNameForm = $this->createForm('lastName', false); + $lastNameForm->setData('last name'); + $personForm->add($lastNameForm); - $this->form->submit(array('firstName' => 'foo'), false); + $this->form->add($personForm); + $this->form->submit(['person' => ['firstName' => 'foo']], false); + + $this->assertTrue($firstNameForm->isSubmitted()); + $this->assertSame('foo', $firstNameForm->getData()); + $this->assertFalse($lastNameForm->isSubmitted()); + $this->assertSame('last name', $lastNameForm->getData()); } public function testCloneChildren() @@ -145,10 +150,8 @@ class CompoundFormTest extends AbstractFormTest public function testNotEmptyIfChildNotEmpty() { - $child = $this->getMockForm(); - $child->expects($this->once()) - ->method('isEmpty') - ->will($this->returnValue(false)); + $child = $this->createForm('name', false); + $child->setData('foo'); $this->form->setData(null); $this->form->add($child); @@ -163,7 +166,7 @@ class CompoundFormTest extends AbstractFormTest $this->assertTrue($this->form->has('foo')); $this->assertSame($this->form, $child->getParent()); - $this->assertSame(array('foo' => $child), $this->form->all()); + $this->assertSame(['foo' => $child], $this->form->all()); } public function testAddUsingNameAndType() @@ -172,17 +175,17 @@ class CompoundFormTest extends AbstractFormTest $this->factory->expects($this->once()) ->method('createNamed') - ->with('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + ->with('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, [ 'bar' => 'baz', 'auto_initialize' => false, - )) + ]) ->will($this->returnValue($child)); - $this->form->add('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', array('bar' => 'baz')); + $this->form->add('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', ['bar' => 'baz']); $this->assertTrue($this->form->has('foo')); $this->assertSame($this->form, $child->getParent()); - $this->assertSame(array('foo' => $child), $this->form->all()); + $this->assertSame(['foo' => $child], $this->form->all()); } public function testAddUsingIntegerNameAndType() @@ -191,18 +194,18 @@ class CompoundFormTest extends AbstractFormTest $this->factory->expects($this->once()) ->method('createNamed') - ->with('0', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + ->with('0', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, [ 'bar' => 'baz', 'auto_initialize' => false, - )) + ]) ->will($this->returnValue($child)); // in order to make casting unnecessary - $this->form->add(0, 'Symfony\Component\Form\Extension\Core\Type\TextType', array('bar' => 'baz')); + $this->form->add(0, 'Symfony\Component\Form\Extension\Core\Type\TextType', ['bar' => 'baz']); $this->assertTrue($this->form->has(0)); $this->assertSame($this->form, $child->getParent()); - $this->assertSame(array(0 => $child), $this->form->all()); + $this->assertSame([0 => $child], $this->form->all()); } public function testAddWithoutType() @@ -218,7 +221,7 @@ class CompoundFormTest extends AbstractFormTest $this->assertTrue($this->form->has('foo')); $this->assertSame($this->form, $child->getParent()); - $this->assertSame(array('foo' => $child), $this->form->all()); + $this->assertSame(['foo' => $child], $this->form->all()); } public function testAddUsingNameButNoType() @@ -239,7 +242,7 @@ class CompoundFormTest extends AbstractFormTest $this->assertTrue($this->form->has('foo')); $this->assertSame($this->form, $child->getParent()); - $this->assertSame(array('foo' => $child), $this->form->all()); + $this->assertSame(['foo' => $child], $this->form->all()); } public function testAddUsingNameButNoTypeAndOptions() @@ -253,17 +256,17 @@ class CompoundFormTest extends AbstractFormTest $this->factory->expects($this->once()) ->method('createForProperty') - ->with('\stdClass', 'foo', null, array( + ->with('\stdClass', 'foo', null, [ 'bar' => 'baz', 'auto_initialize' => false, - )) + ]) ->will($this->returnValue($child)); - $this->form->add('foo', null, array('bar' => 'baz')); + $this->form->add('foo', null, ['bar' => 'baz']); $this->assertTrue($this->form->has('foo')); $this->assertSame($this->form, $child->getParent()); - $this->assertSame(array('foo' => $child), $this->form->all()); + $this->assertSame(['foo' => $child], $this->form->all()); } /** @@ -271,7 +274,7 @@ class CompoundFormTest extends AbstractFormTest */ public function testAddThrowsExceptionIfAlreadySubmitted() { - $this->form->submit(array()); + $this->form->submit([]); $this->form->add($this->getBuilder('foo')->getForm()); } @@ -291,7 +294,7 @@ class CompoundFormTest extends AbstractFormTest public function testRemoveThrowsExceptionIfAlreadySubmitted() { $this->form->add($this->getBuilder('foo')->setCompound(false)->getForm()); - $this->form->submit(array('foo' => 'bar')); + $this->form->submit(['foo' => 'bar']); $this->form->remove('foo'); } @@ -338,10 +341,10 @@ class CompoundFormTest extends AbstractFormTest $form = $this->getBuilder() ->setCompound(true) ->setDataMapper($mapper) - ->addViewTransformer(new FixedDataTransformer(array( + ->addViewTransformer(new FixedDataTransformer([ '' => '', 'foo' => 'bar', - ))) + ])) ->setData('foo') ->getForm(); @@ -351,7 +354,7 @@ class CompoundFormTest extends AbstractFormTest ->with('bar', $this->isInstanceOf('\RecursiveIteratorIterator')) ->will($this->returnCallback(function ($data, \RecursiveIteratorIterator $iterator) use ($child) { $this->assertInstanceOf('Symfony\Component\Form\Util\InheritDataAwareIterator', $iterator->getInnerIterator()); - $this->assertSame(array($child->getName() => $child), iterator_to_array($iterator)); + $this->assertSame([$child->getName() => $child], iterator_to_array($iterator)); })); $form->initialize(); @@ -400,29 +403,25 @@ class CompoundFormTest extends AbstractFormTest ->setDataMapper(new PropertyPathMapper()) ->getForm(); - $child = $this->getMockForm('child'); - $childToBeRemoved = $this->getMockForm('removed'); - $childToBeAdded = $this->getMockForm('added'); + $childToBeRemoved = $this->createForm('removed', false); + $childToBeAdded = $this->createForm('added', false); + $child = $this->getBuilder('child', new EventDispatcher()) + ->setCompound(true) + ->setDataMapper(new PropertyPathMapper()) + ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($form, $childToBeAdded) { + $form->remove('removed'); + $form->add($childToBeAdded); + }) + ->getForm(); $form->add($child); $form->add($childToBeRemoved); - $child->expects($this->once()) - ->method('setData') - ->will($this->returnCallback(function () use ($form, $childToBeAdded) { - $form->remove('removed'); - $form->add($childToBeAdded); - })); - - $childToBeRemoved->expects($this->never()) - ->method('setData'); - - // once when it it is created, once when it is added - $childToBeAdded->expects($this->exactly(2)) - ->method('setData'); - // pass NULL to all children - $form->setData(array()); + $form->setData([]); + + $this->assertFalse($form->has('removed')); + $this->assertTrue($form->has('added')); } public function testSetDataMapsViewDataToChildren() @@ -431,10 +430,10 @@ class CompoundFormTest extends AbstractFormTest $form = $this->getBuilder() ->setCompound(true) ->setDataMapper($mapper) - ->addViewTransformer(new FixedDataTransformer(array( + ->addViewTransformer(new FixedDataTransformer([ '' => '', 'foo' => 'bar', - ))) + ])) ->getForm(); $form->add($child1 = $this->getBuilder('firstName')->getForm()); @@ -445,7 +444,7 @@ class CompoundFormTest extends AbstractFormTest ->with('bar', $this->isInstanceOf('\RecursiveIteratorIterator')) ->will($this->returnCallback(function ($data, \RecursiveIteratorIterator $iterator) use ($child1, $child2) { $this->assertInstanceOf('Symfony\Component\Form\Util\InheritDataAwareIterator', $iterator->getInnerIterator()); - $this->assertSame(array('firstName' => $child1, 'lastName' => $child2), iterator_to_array($iterator)); + $this->assertSame(['firstName' => $child1, 'lastName' => $child2], iterator_to_array($iterator)); })); $form->setData('foo'); @@ -453,30 +452,25 @@ class CompoundFormTest extends AbstractFormTest public function testSubmitSupportsDynamicAdditionAndRemovalOfChildren() { - $child = $this->getMockForm('child'); - $childToBeRemoved = $this->getMockForm('removed'); - $childToBeAdded = $this->getMockForm('added'); + $form = $this->form; + + $childToBeRemoved = $this->createForm('removed'); + $childToBeAdded = $this->createForm('added'); + $child = $this->getBuilder('child') + ->addEventListener(FormEvents::PRE_SUBMIT, function () use ($form, $childToBeAdded) { + $form->remove('removed'); + $form->add($childToBeAdded); + }) + ->getForm(); $this->form->add($child); $this->form->add($childToBeRemoved); - $form = $this->form; - - $child->expects($this->once()) - ->method('submit') - ->will($this->returnCallback(function () use ($form, $childToBeAdded) { - $form->remove('removed'); - $form->add($childToBeAdded); - })); - - $childToBeRemoved->expects($this->never()) - ->method('submit'); - - $childToBeAdded->expects($this->once()) - ->method('submit'); - // pass NULL to all children - $this->form->submit(array()); + $this->form->submit([]); + + $this->assertFalse($childToBeRemoved->isSubmitted()); + $this->assertTrue($childToBeAdded->isSubmitted()); } public function testSubmitMapsSubmittedChildrenOntoExistingViewData() @@ -485,10 +479,10 @@ class CompoundFormTest extends AbstractFormTest $form = $this->getBuilder() ->setCompound(true) ->setDataMapper($mapper) - ->addViewTransformer(new FixedDataTransformer(array( + ->addViewTransformer(new FixedDataTransformer([ '' => '', 'foo' => 'bar', - ))) + ])) ->setData('foo') ->getForm(); @@ -500,15 +494,15 @@ class CompoundFormTest extends AbstractFormTest ->with($this->isInstanceOf('\RecursiveIteratorIterator'), 'bar') ->will($this->returnCallback(function (\RecursiveIteratorIterator $iterator) use ($child1, $child2) { $this->assertInstanceOf('Symfony\Component\Form\Util\InheritDataAwareIterator', $iterator->getInnerIterator()); - $this->assertSame(array('firstName' => $child1, 'lastName' => $child2), iterator_to_array($iterator)); + $this->assertSame(['firstName' => $child1, 'lastName' => $child2], iterator_to_array($iterator)); $this->assertEquals('Bernhard', $child1->getData()); $this->assertEquals('Schussek', $child2->getData()); })); - $form->submit(array( + $form->submit([ 'firstName' => 'Bernhard', 'lastName' => 'Schussek', - )); + ]); } public function testMapFormsToDataIsNotInvokedIfInheritData() @@ -518,10 +512,10 @@ class CompoundFormTest extends AbstractFormTest ->setCompound(true) ->setDataMapper($mapper) ->setInheritData(true) - ->addViewTransformer(new FixedDataTransformer(array( + ->addViewTransformer(new FixedDataTransformer([ '' => '', 'foo' => 'bar', - ))) + ])) ->getForm(); $form->add($child1 = $this->getBuilder('firstName')->setCompound(false)->getForm()); @@ -530,10 +524,10 @@ class CompoundFormTest extends AbstractFormTest $mapper->expects($this->never()) ->method('mapFormsToData'); - $form->submit(array( + $form->submit([ 'firstName' => 'Bernhard', 'lastName' => 'Schussek', - )); + ]); } /* @@ -549,7 +543,7 @@ class CompoundFormTest extends AbstractFormTest ->setData($object) ->getForm(); - $form->submit(array()); + $form->submit([]); $this->assertSame($object, $form->getData()); } @@ -572,22 +566,22 @@ class CompoundFormTest extends AbstractFormTest ->with($this->isInstanceOf('\RecursiveIteratorIterator'), $object) ->will($this->returnCallback(function (\RecursiveIteratorIterator $iterator) use ($child) { $this->assertInstanceOf('Symfony\Component\Form\Util\InheritDataAwareIterator', $iterator->getInnerIterator()); - $this->assertSame(array('name' => $child), iterator_to_array($iterator)); + $this->assertSame(['name' => $child], iterator_to_array($iterator)); })); - $form->submit(array( + $form->submit([ 'name' => 'Bernhard', - )); + ]); } public function requestMethodProvider() { - return array( - array('POST'), - array('PUT'), - array('DELETE'), - array('PATCH'), - ); + return [ + ['POST'], + ['PUT'], + ['DELETE'], + ['PATCH'], + ]; } /** @@ -598,26 +592,26 @@ class CompoundFormTest extends AbstractFormTest $path = tempnam(sys_get_temp_dir(), 'sf2'); touch($path); - $values = array( - 'author' => array( + $values = [ + 'author' => [ 'name' => 'Bernhard', - 'image' => array('filename' => 'foobar.png'), - ), - ); + 'image' => ['filename' => 'foobar.png'], + ], + ]; - $files = array( - 'author' => array( - 'error' => array('image' => UPLOAD_ERR_OK), - 'name' => array('image' => 'upload.png'), - 'size' => array('image' => 123), - 'tmp_name' => array('image' => $path), - 'type' => array('image' => 'image/png'), - ), - ); + $files = [ + 'author' => [ + 'error' => ['image' => UPLOAD_ERR_OK], + 'name' => ['image' => 'upload.png'], + 'size' => ['image' => 123], + 'tmp_name' => ['image' => $path], + 'type' => ['image' => 'image/png'], + ], + ]; - $request = new Request(array(), $values, array(), array(), $files, array( + $request = new Request([], $values, [], [], $files, [ 'REQUEST_METHOD' => $method, - )); + ]); $form = $this->getBuilder('author') ->setMethod($method) @@ -646,24 +640,24 @@ class CompoundFormTest extends AbstractFormTest $path = tempnam(sys_get_temp_dir(), 'sf2'); touch($path); - $values = array( + $values = [ 'name' => 'Bernhard', 'extra' => 'data', - ); + ]; - $files = array( - 'image' => array( + $files = [ + 'image' => [ 'error' => UPLOAD_ERR_OK, 'name' => 'upload.png', 'size' => 123, 'tmp_name' => $path, 'type' => 'image/png', - ), - ); + ], + ]; - $request = new Request(array(), $values, array(), array(), $files, array( + $request = new Request([], $values, [], [], $files, [ 'REQUEST_METHOD' => $method, - )); + ]); $form = $this->getBuilder('') ->setMethod($method) @@ -680,7 +674,7 @@ class CompoundFormTest extends AbstractFormTest $this->assertEquals('Bernhard', $form['name']->getData()); $this->assertEquals($file, $form['image']->getData()); - $this->assertEquals(array('extra' => 'data'), $form->getExtraData()); + $this->assertEquals(['extra' => 'data'], $form->getExtraData()); unlink($path); } @@ -693,21 +687,21 @@ class CompoundFormTest extends AbstractFormTest $path = tempnam(sys_get_temp_dir(), 'sf2'); touch($path); - $files = array( - 'image' => array( + $files = [ + 'image' => [ 'error' => UPLOAD_ERR_OK, 'name' => 'upload.png', 'size' => 123, 'tmp_name' => $path, 'type' => 'image/png', - ), - ); + ], + ]; - $request = new Request(array(), array(), array(), array(), $files, array( + $request = new Request([], [], [], [], $files, [ 'REQUEST_METHOD' => $method, - )); + ]); - $form = $this->getBuilder('image') + $form = $this->getBuilder('image', null, null, ['allow_file_upload' => true]) ->setMethod($method) ->setRequestHandler(new HttpFoundationRequestHandler()) ->getForm(); @@ -729,13 +723,13 @@ class CompoundFormTest extends AbstractFormTest $path = tempnam(sys_get_temp_dir(), 'sf2'); touch($path); - $values = array( + $values = [ 'name' => 'Bernhard', - ); + ]; - $request = new Request(array(), $values, array(), array(), array(), array( + $request = new Request([], $values, [], [], [], [ 'REQUEST_METHOD' => $method, - )); + ]); $form = $this->getBuilder('name') ->setMethod($method) @@ -751,16 +745,16 @@ class CompoundFormTest extends AbstractFormTest public function testSubmitGetRequest() { - $values = array( - 'author' => array( + $values = [ + 'author' => [ 'firstName' => 'Bernhard', 'lastName' => 'Schussek', - ), - ); + ], + ]; - $request = new Request($values, array(), array(), array(), array(), array( + $request = new Request($values, [], [], [], [], [ 'REQUEST_METHOD' => 'GET', - )); + ]); $form = $this->getBuilder('author') ->setMethod('GET') @@ -779,15 +773,15 @@ class CompoundFormTest extends AbstractFormTest public function testSubmitGetRequestWithEmptyRootFormName() { - $values = array( + $values = [ 'firstName' => 'Bernhard', 'lastName' => 'Schussek', 'extra' => 'data', - ); + ]; - $request = new Request($values, array(), array(), array(), array(), array( + $request = new Request($values, [], [], [], [], [ 'REQUEST_METHOD' => 'GET', - )); + ]); $form = $this->getBuilder('') ->setMethod('GET') @@ -802,7 +796,7 @@ class CompoundFormTest extends AbstractFormTest $this->assertEquals('Bernhard', $form['firstName']->getData()); $this->assertEquals('Schussek', $form['lastName']->getData()); - $this->assertEquals(array('extra' => 'data'), $form->getExtraData()); + $this->assertEquals(['extra' => 'data'], $form->getExtraData()); } public function testGetErrors() @@ -818,7 +812,7 @@ class CompoundFormTest extends AbstractFormTest (string) $errors ); - $this->assertSame(array($error1, $error2), iterator_to_array($errors)); + $this->assertSame([$error1, $error2], iterator_to_array($errors)); } public function testGetErrorsDeep() @@ -840,7 +834,7 @@ class CompoundFormTest extends AbstractFormTest ); $this->assertSame( - array($error1, $error2, $nestedError), + [$error1, $error2, $nestedError], iterator_to_array($errors) ); } @@ -880,12 +874,24 @@ class CompoundFormTest extends AbstractFormTest public function testCreateViewWithChildren() { $type = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormTypeInterface')->getMock(); - $options = array('a' => 'Foo', 'b' => 'Bar'); - $field1 = $this->getMockForm('foo'); - $field2 = $this->getMockForm('bar'); + $type1 = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormTypeInterface')->getMock(); + $type2 = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormTypeInterface')->getMock(); + $options = ['a' => 'Foo', 'b' => 'Bar']; + $field1 = $this->getBuilder('foo') + ->setType($type1) + ->getForm(); + $field2 = $this->getBuilder('bar') + ->setType($type2) + ->getForm(); $view = new FormView(); $field1View = new FormView(); + $type1 + ->method('createView') + ->will($this->returnValue($field1View)); $field2View = new FormView(); + $type2 + ->method('createView') + ->will($this->returnValue($field2View)); $this->form = $this->getBuilder('form', null, null, $options) ->setCompound(true) @@ -910,26 +916,10 @@ class CompoundFormTest extends AbstractFormTest $type->expects($this->once()) ->method('buildView') ->with($view, $this->form, $options) - ->will($this->returnCallback($assertChildViewsEqual(array()))); - - // Then add the first child form - $field1->expects($this->once()) - ->method('createView') - ->will($this->returnValue($field1View)); - - // Then the second child form - $field2->expects($this->once()) - ->method('createView') - ->will($this->returnValue($field2View)); - - // Again build the view for the form itself. This time the child views - // exist. - $type->expects($this->once()) - ->method('finishView') - ->with($view, $this->form, $options) - ->will($this->returnCallback($assertChildViewsEqual(array('foo' => $field1View, 'bar' => $field2View)))); + ->will($this->returnCallback($assertChildViewsEqual([]))); $this->assertSame($view, $this->form->createView()); + $this->assertSame(['foo' => $field1View, 'bar' => $field2View], $view->children); } public function testNoClickedButtonBeforeSubmission() @@ -940,8 +930,8 @@ class CompoundFormTest extends AbstractFormTest public function testNoClickedButton() { $button = $this->getMockBuilder('Symfony\Component\Form\SubmitButton') - ->setConstructorArgs(array(new SubmitButtonBuilder('submit'))) - ->setMethods(array('isClicked')) + ->setConstructorArgs([new SubmitButtonBuilder('submit')]) + ->setMethods(['isClicked']) ->getMock(); $button->expects($this->any()) @@ -954,7 +944,7 @@ class CompoundFormTest extends AbstractFormTest $this->form->setParent($parentForm); $this->form->add($button); $this->form->add($nestedForm); - $this->form->submit(array()); + $this->form->submit([]); $this->assertNull($this->form->getClickedButton()); } @@ -962,8 +952,8 @@ class CompoundFormTest extends AbstractFormTest public function testClickedButton() { $button = $this->getMockBuilder('Symfony\Component\Form\SubmitButton') - ->setConstructorArgs(array(new SubmitButtonBuilder('submit'))) - ->setMethods(array('isClicked')) + ->setConstructorArgs([new SubmitButtonBuilder('submit')]) + ->setMethods(['isClicked']) ->getMock(); $button->expects($this->any()) @@ -971,7 +961,7 @@ class CompoundFormTest extends AbstractFormTest ->will($this->returnValue(true)); $this->form->add($button); - $this->form->submit(array()); + $this->form->submit([]); $this->assertSame($button, $this->form->getClickedButton()); } @@ -981,8 +971,8 @@ class CompoundFormTest extends AbstractFormTest $button = $this->getBuilder('submit')->getForm(); $nestedForm = $this->getMockBuilder('Symfony\Component\Form\Form') - ->setConstructorArgs(array($this->getBuilder('nested'))) - ->setMethods(array('getClickedButton')) + ->setConstructorArgs([$this->getBuilder('nested')]) + ->setMethods(['getClickedButton']) ->getMock(); $nestedForm->expects($this->any()) @@ -990,7 +980,7 @@ class CompoundFormTest extends AbstractFormTest ->will($this->returnValue($button)); $this->form->add($nestedForm); - $this->form->submit(array()); + $this->form->submit([]); $this->assertSame($button, $this->form->getClickedButton()); } @@ -1000,8 +990,8 @@ class CompoundFormTest extends AbstractFormTest $button = $this->getBuilder('submit')->getForm(); $parentForm = $this->getMockBuilder('Symfony\Component\Form\Form') - ->setConstructorArgs(array($this->getBuilder('parent'))) - ->setMethods(array('getClickedButton')) + ->setConstructorArgs([$this->getBuilder('parent')]) + ->setMethods(['getClickedButton']) ->getMock(); $parentForm->expects($this->any()) @@ -1009,7 +999,7 @@ class CompoundFormTest extends AbstractFormTest ->will($this->returnValue($button)); $this->form->setParent($parentForm); - $this->form->submit(array()); + $this->form->submit([]); $this->assertSame($button, $this->form->getClickedButton()); } @@ -1022,25 +1012,62 @@ class CompoundFormTest extends AbstractFormTest ->getForm(); $form = $this->createForm() - ->add($this->getBuilder('text')->getForm()) + ->add($this->createForm('text', false)) ->add($submit) ; - $form->submit(array( + $form->submit([ 'text' => '', 'submit' => '', - )); + ]); $this->assertTrue($submit->isDisabled()); $this->assertFalse($submit->isClicked()); $this->assertFalse($submit->isSubmitted()); } - protected function createForm() + public function testArrayTransformationFailureOnSubmit() { - return $this->getBuilder() - ->setCompound(true) - ->setDataMapper($this->getDataMapper()) - ->getForm(); + $this->form->add($this->getBuilder('foo')->setCompound(false)->getForm()); + $this->form->add($this->getBuilder('bar', null, null, ['multiple' => false])->setCompound(false)->getForm()); + + $this->form->submit([ + 'foo' => ['foo'], + 'bar' => ['bar'], + ]); + + $this->assertNull($this->form->get('foo')->getData()); + $this->assertSame('Submitted data was expected to be text or number, array given.', $this->form->get('foo')->getTransformationFailure()->getMessage()); + + $this->assertSame(['bar'], $this->form->get('bar')->getData()); + } + + public function testFileUpload() + { + $reqHandler = new HttpFoundationRequestHandler(); + $this->form->add($this->getBuilder('foo')->setRequestHandler($reqHandler)->getForm()); + $this->form->add($this->getBuilder('bar')->setRequestHandler($reqHandler)->getForm()); + + $this->form->submit([ + 'foo' => 'Foo', + 'bar' => new UploadedFile(__FILE__, 'upload.png', 'image/png', 123, UPLOAD_ERR_OK), + ]); + + $this->assertSame('Submitted data was expected to be text or number, file upload given.', $this->form->get('bar')->getTransformationFailure()->getMessage()); + $this->assertNull($this->form->get('bar')->getData()); + } + + protected function createForm($name = 'name', $compound = true) + { + $builder = $this->getBuilder($name); + + if ($compound) { + $builder + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ; + } + + return $builder->getForm(); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Console/Descriptor/AbstractDescriptorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Console/Descriptor/AbstractDescriptorTest.php index c29e3fe2..23be3ab1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Console/Descriptor/AbstractDescriptorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Console/Descriptor/AbstractDescriptorTest.php @@ -69,22 +69,22 @@ abstract class AbstractDescriptorTest extends TestCase public function getDescribeDefaultsTestData() { - $options['core_types'] = array('Symfony\Component\Form\Extension\Core\Type\FormType'); - $options['service_types'] = array('Symfony\Bridge\Doctrine\Form\Type\EntityType'); - $options['extensions'] = array('Symfony\Component\Form\Extension\Csrf\Type\FormTypeCsrfExtension'); - $options['guessers'] = array('Symfony\Component\Form\Extension\Validator\ValidatorTypeGuesser'); + $options['core_types'] = ['Symfony\Component\Form\Extension\Core\Type\FormType']; + $options['service_types'] = ['Symfony\Bridge\Doctrine\Form\Type\EntityType']; + $options['extensions'] = ['Symfony\Component\Form\Extension\Csrf\Type\FormTypeCsrfExtension']; + $options['guessers'] = ['Symfony\Component\Form\Extension\Validator\ValidatorTypeGuesser']; $options['decorated'] = false; - yield array(null, $options, 'defaults_1'); + yield [null, $options, 'defaults_1']; } public function getDescribeResolvedFormTypeTestData() { - $typeExtensions = array(new FormTypeCsrfExtension(new CsrfTokenManager())); + $typeExtensions = [new FormTypeCsrfExtension(new CsrfTokenManager())]; $parent = new ResolvedFormType(new FormType(), $typeExtensions); - yield array(new ResolvedFormType(new ChoiceType(), array(), $parent), array('decorated' => false), 'resolved_form_type_1'); - yield array(new ResolvedFormType(new FormType()), array('decorated' => false), 'resolved_form_type_2'); + yield [new ResolvedFormType(new ChoiceType(), [], $parent), ['decorated' => false], 'resolved_form_type_1']; + yield [new ResolvedFormType(new FormType()), ['decorated' => false], 'resolved_form_type_2']; } public function getDescribeOptionTestData() @@ -92,18 +92,18 @@ abstract class AbstractDescriptorTest extends TestCase $parent = new ResolvedFormType(new FormType()); $options['decorated'] = false; - $resolvedType = new ResolvedFormType(new ChoiceType(), array(), $parent); + $resolvedType = new ResolvedFormType(new ChoiceType(), [], $parent); $options['type'] = $resolvedType->getInnerType(); $options['option'] = 'choice_translation_domain'; - yield array($resolvedType->getOptionsResolver(), $options, 'default_option_with_normalizer'); + yield [$resolvedType->getOptionsResolver(), $options, 'default_option_with_normalizer']; - $resolvedType = new ResolvedFormType(new FooType(), array(), $parent); + $resolvedType = new ResolvedFormType(new FooType(), [], $parent); $options['type'] = $resolvedType->getInnerType(); $options['option'] = 'foo'; - yield array($resolvedType->getOptionsResolver(), $options, 'required_option_with_allowed_values'); + yield [$resolvedType->getOptionsResolver(), $options, 'required_option_with_allowed_values']; $options['option'] = 'empty_data'; - yield array($resolvedType->getOptionsResolver(), $options, 'overridden_option_with_default_closures'); + yield [$resolvedType->getOptionsResolver(), $options, 'overridden_option_with_default_closures']; } abstract protected function getDescriptor(); @@ -113,7 +113,7 @@ abstract class AbstractDescriptorTest extends TestCase private function getObjectDescription($object, array $options) { $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, $options['decorated']); - $io = new SymfonyStyle(new ArrayInput(array()), $output); + $io = new SymfonyStyle(new ArrayInput([]), $output); $this->getDescriptor()->describe($io, $object, $options); @@ -140,11 +140,11 @@ class FooType extends AbstractType $foo = $options['foo']; return function (FormInterface $form) use ($foo) { - return $form->getConfig()->getCompound() ? array($foo) : $foo; + return $form->getConfig()->getCompound() ? [$foo] : $foo; }; }); $resolver->setAllowedTypes('foo', 'string'); - $resolver->setAllowedValues('foo', array('bar', 'baz')); + $resolver->setAllowedValues('foo', ['bar', 'baz']); $resolver->setNormalizer('foo', function (Options $options, $value) { return (string) $value; }); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php index f5939b40..a2360741 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php @@ -19,8 +19,9 @@ use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ServiceLocator; use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Command\DebugCommand; use Symfony\Component\Form\DependencyInjection\FormPass; -use Symfony\Component\Form\FormRegistryInterface; +use Symfony\Component\Form\FormRegistry; /** * @author Bernhard Schussek @@ -58,10 +59,10 @@ class FormPassTest extends TestCase $extDefinition = $container->getDefinition('form.extension'); $this->assertEquals( - (new Definition(ServiceLocator::class, array(array( + (new Definition(ServiceLocator::class, [[ __CLASS__.'_Type1' => new ServiceClosureArgument(new Reference('my.type1')), __CLASS__.'_Type2' => new ServiceClosureArgument(new Reference('my.type2')), - ))))->addTag('container.service_locator')->setPublic(false), + ]]))->addTag('container.service_locator')->setPublic(false), $extDefinition->getArgument(0) ); } @@ -70,8 +71,12 @@ class FormPassTest extends TestCase { $container = $this->createContainerBuilder(); + $container->register('form.registry', FormRegistry::class); + $commandDefinition = new Definition(DebugCommand::class, [new Reference('form.registry')]); + $commandDefinition->setPublic(true); + $container->setDefinition('form.extension', $this->createExtensionDefinition()); - $container->setDefinition('console.command.form_debug', $this->createDebugCommandDefinition()); + $container->setDefinition('console.command.form_debug', $commandDefinition); $container->register('my.type1', __CLASS__.'_Type1')->addTag('form.type')->setPublic(true); $container->register('my.type2', __CLASS__.'_Type2')->addTag('form.type')->setPublic(true); @@ -80,10 +85,10 @@ class FormPassTest extends TestCase $cmdDefinition = $container->getDefinition('console.command.form_debug'); $this->assertEquals( - array( + [ 'Symfony\Component\Form\Extension\Core\Type', __NAMESPACE__, - ), + ], $cmdDefinition->getArgument(1) ); } @@ -112,44 +117,44 @@ class FormPassTest extends TestCase */ public function addTaggedTypeExtensionsDataProvider() { - return array( - array( - array( - 'my.type_extension1' => array('extended_type' => 'type1'), - 'my.type_extension2' => array('extended_type' => 'type1'), - 'my.type_extension3' => array('extended_type' => 'type2'), - ), - array( - 'type1' => new IteratorArgument(array( + return [ + [ + [ + 'my.type_extension1' => ['extended_type' => 'type1'], + 'my.type_extension2' => ['extended_type' => 'type1'], + 'my.type_extension3' => ['extended_type' => 'type2'], + ], + [ + 'type1' => new IteratorArgument([ new Reference('my.type_extension1'), new Reference('my.type_extension2'), - )), - 'type2' => new IteratorArgument(array(new Reference('my.type_extension3'))), - ), - ), - array( - array( - 'my.type_extension1' => array('extended_type' => 'type1', 'priority' => 1), - 'my.type_extension2' => array('extended_type' => 'type1', 'priority' => 2), - 'my.type_extension3' => array('extended_type' => 'type1', 'priority' => -1), - 'my.type_extension4' => array('extended_type' => 'type2', 'priority' => 2), - 'my.type_extension5' => array('extended_type' => 'type2', 'priority' => 1), - 'my.type_extension6' => array('extended_type' => 'type2', 'priority' => 1), - ), - array( - 'type1' => new IteratorArgument(array( + ]), + 'type2' => new IteratorArgument([new Reference('my.type_extension3')]), + ], + ], + [ + [ + 'my.type_extension1' => ['extended_type' => 'type1', 'priority' => 1], + 'my.type_extension2' => ['extended_type' => 'type1', 'priority' => 2], + 'my.type_extension3' => ['extended_type' => 'type1', 'priority' => -1], + 'my.type_extension4' => ['extended_type' => 'type2', 'priority' => 2], + 'my.type_extension5' => ['extended_type' => 'type2', 'priority' => 1], + 'my.type_extension6' => ['extended_type' => 'type2', 'priority' => 1], + ], + [ + 'type1' => new IteratorArgument([ new Reference('my.type_extension2'), new Reference('my.type_extension1'), new Reference('my.type_extension3'), - )), - 'type2' => new IteratorArgument(array( + ]), + 'type2' => new IteratorArgument([ new Reference('my.type_extension4'), new Reference('my.type_extension5'), new Reference('my.type_extension6'), - )), - ), - ), - ); + ]), + ], + ], + ]; } /** @@ -186,10 +191,10 @@ class FormPassTest extends TestCase $extDefinition = $container->getDefinition('form.extension'); $this->assertEquals( - new IteratorArgument(array( + new IteratorArgument([ new Reference('my.guesser1'), new Reference('my.guesser2'), - )), + ]), $extDefinition->getArgument(2) ); } @@ -197,7 +202,7 @@ class FormPassTest extends TestCase /** * @dataProvider privateTaggedServicesProvider */ - public function testPrivateTaggedServices($id, $tagName, callable $assertion, array $tagAttributes = array()) + public function testPrivateTaggedServices($id, $tagName, callable $assertion, array $tagAttributes = []) { $formPass = new FormPass(); $container = new ContainerBuilder(); @@ -211,8 +216,8 @@ class FormPassTest extends TestCase public function privateTaggedServicesProvider() { - return array( - array( + return [ + [ 'my.type', 'form.type', function (ContainerBuilder $container) { @@ -221,53 +226,40 @@ class FormPassTest extends TestCase $this->assertInstanceOf(Reference::class, $formTypes); $locator = $container->getDefinition((string) $formTypes); - $expectedLocatorMap = array( + $expectedLocatorMap = [ 'stdClass' => new ServiceClosureArgument(new Reference('my.type')), - ); + ]; $this->assertInstanceOf(Definition::class, $locator); $this->assertEquals($expectedLocatorMap, $locator->getArgument(0)); }, - ), - array( + ], + [ 'my.type_extension', 'form.type_extension', function (ContainerBuilder $container) { $this->assertEquals( - array('Symfony\Component\Form\Extension\Core\Type\FormType' => new IteratorArgument(array(new Reference('my.type_extension')))), + ['Symfony\Component\Form\Extension\Core\Type\FormType' => new IteratorArgument([new Reference('my.type_extension')])], $container->getDefinition('form.extension')->getArgument(1) ); }, - array('extended_type' => 'Symfony\Component\Form\Extension\Core\Type\FormType'), - ), - array('my.guesser', 'form.type_guesser', function (ContainerBuilder $container) { - $this->assertEquals(new IteratorArgument(array(new Reference('my.guesser'))), $container->getDefinition('form.extension')->getArgument(2)); - }), - ); + ['extended_type' => 'Symfony\Component\Form\Extension\Core\Type\FormType'], + ], + ['my.guesser', 'form.type_guesser', function (ContainerBuilder $container) { + $this->assertEquals(new IteratorArgument([new Reference('my.guesser')]), $container->getDefinition('form.extension')->getArgument(2)); + }], + ]; } private function createExtensionDefinition() { $definition = new Definition('Symfony\Component\Form\Extension\DependencyInjection\DependencyInjectionExtension'); $definition->setPublic(true); - $definition->setArguments(array( - array(), - array(), - new IteratorArgument(array()), - )); - - return $definition; - } - - private function createDebugCommandDefinition() - { - $definition = new Definition('Symfony\Component\Form\Command\DebugCommand'); - $definition->setPublic(true); - $definition->setArguments(array( - $formRegistry = $this->getMockBuilder(FormRegistryInterface::class)->getMock(), - array(), - array('Symfony\Component\Form\Extension\Core\Type'), - )); + $definition->setArguments([ + [], + [], + new IteratorArgument([]), + ]); return $definition; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php index 8632b4c6..da351295 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php @@ -12,9 +12,14 @@ namespace Symfony\Component\Form\Tests\Extension\Core\DataMapper; use PHPUnit\Framework\TestCase; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper; +use Symfony\Component\Form\Form; use Symfony\Component\Form\FormConfigBuilder; -use Symfony\Component\Form\FormConfigInterface; +use Symfony\Component\PropertyAccess\PropertyAccess; +use Symfony\Component\PropertyAccess\PropertyAccessorInterface; +use Symfony\Component\PropertyAccess\PropertyPath; class PropertyPathMapperTest extends TestCase { @@ -24,78 +29,36 @@ class PropertyPathMapperTest extends TestCase private $mapper; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var EventDispatcherInterface */ private $dispatcher; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var PropertyAccessorInterface */ private $propertyAccessor; protected function setUp() { - $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); - $this->propertyAccessor = $this->getMockBuilder('Symfony\Component\PropertyAccess\PropertyAccessorInterface')->getMock(); + $this->dispatcher = new EventDispatcher(); + $this->propertyAccessor = PropertyAccess::createPropertyAccessor(); $this->mapper = new PropertyPathMapper($this->propertyAccessor); } - /** - * @return \PHPUnit_Framework_MockObject_MockObject - */ - private function getPropertyPath($path) - { - return $this->getMockBuilder('Symfony\Component\PropertyAccess\PropertyPath') - ->setConstructorArgs(array($path)) - ->setMethods(array('getValue', 'setValue')) - ->getMock(); - } - - /** - * @param FormConfigInterface $config - * @param bool $synchronized - * @param bool $submitted - * - * @return \PHPUnit_Framework_MockObject_MockObject - */ - private function getForm(FormConfigInterface $config, $synchronized = true, $submitted = true) - { - $form = $this->getMockBuilder('Symfony\Component\Form\Form') - ->setConstructorArgs(array($config)) - ->setMethods(array('isSynchronized', 'isSubmitted')) - ->getMock(); - - $form->expects($this->any()) - ->method('isSynchronized') - ->will($this->returnValue($synchronized)); - - $form->expects($this->any()) - ->method('isSubmitted') - ->will($this->returnValue($submitted)); - - return $form; - } - public function testMapDataToFormsPassesObjectRefIfByReference() { $car = new \stdClass(); $engine = new \stdClass(); - $propertyPath = $this->getPropertyPath('engine'); - - $this->propertyAccessor->expects($this->once()) - ->method('getValue') - ->with($car, $propertyPath) - ->will($this->returnValue($engine)); + $car->engine = $engine; + $propertyPath = new PropertyPath('engine'); $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); $config->setByReference(true); $config->setPropertyPath($propertyPath); - $form = $this->getForm($config); + $form = new Form($config); - $this->mapper->mapDataToForms($car, array($form)); + $this->mapper->mapDataToForms($car, [$form]); - // Can't use isIdentical() above because mocks always clone their - // arguments which can't be disabled in PHPUnit 3.6 $this->assertSame($engine, $form->getData()); } @@ -103,19 +66,16 @@ class PropertyPathMapperTest extends TestCase { $car = new \stdClass(); $engine = new \stdClass(); - $propertyPath = $this->getPropertyPath('engine'); - - $this->propertyAccessor->expects($this->once()) - ->method('getValue') - ->with($car, $propertyPath) - ->will($this->returnValue($engine)); + $engine->brand = 'Rolls-Royce'; + $car->engine = $engine; + $propertyPath = new PropertyPath('engine'); $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); $config->setByReference(false); $config->setPropertyPath($propertyPath); - $form = $this->getForm($config); + $form = new Form($config); - $this->mapper->mapDataToForms($car, array($form)); + $this->mapper->mapDataToForms($car, [$form]); $this->assertNotSame($engine, $form->getData()); $this->assertEquals($engine, $form->getData()); @@ -127,11 +87,11 @@ class PropertyPathMapperTest extends TestCase $config = new FormConfigBuilder(null, '\stdClass', $this->dispatcher); $config->setByReference(true); - $form = $this->getForm($config); + $form = new Form($config); $this->assertNull($form->getPropertyPath()); - $this->mapper->mapDataToForms($car, array($form)); + $this->mapper->mapDataToForms($car, [$form]); $this->assertNull($form->getData()); } @@ -139,18 +99,16 @@ class PropertyPathMapperTest extends TestCase public function testMapDataToFormsIgnoresUnmapped() { $car = new \stdClass(); - $propertyPath = $this->getPropertyPath('engine'); - - $this->propertyAccessor->expects($this->never()) - ->method('getValue'); + $car->engine = new \stdClass(); + $propertyPath = new PropertyPath('engine'); $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); $config->setByReference(true); $config->setMapped(false); $config->setPropertyPath($propertyPath); - $form = $this->getForm($config); + $form = new Form($config); - $this->mapper->mapDataToForms($car, array($form)); + $this->mapper->mapDataToForms($car, [$form]); $this->assertNull($form->getData()); } @@ -158,204 +116,188 @@ class PropertyPathMapperTest extends TestCase public function testMapDataToFormsSetsDefaultDataIfPassedDataIsNull() { $default = new \stdClass(); - $propertyPath = $this->getPropertyPath('engine'); - - $this->propertyAccessor->expects($this->never()) - ->method('getValue'); + $propertyPath = new PropertyPath('engine'); $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); $config->setByReference(true); $config->setPropertyPath($propertyPath); $config->setData($default); - $form = $this->getMockBuilder('Symfony\Component\Form\Form') - ->setConstructorArgs(array($config)) - ->setMethods(array('setData')) - ->getMock(); + $form = new Form($config); - $form->expects($this->once()) - ->method('setData') - ->with($default); + $this->mapper->mapDataToForms(null, [$form]); - $this->mapper->mapDataToForms(null, array($form)); + $this->assertSame($default, $form->getData()); } public function testMapDataToFormsSetsDefaultDataIfPassedDataIsEmptyArray() { $default = new \stdClass(); - $propertyPath = $this->getPropertyPath('engine'); - - $this->propertyAccessor->expects($this->never()) - ->method('getValue'); + $propertyPath = new PropertyPath('engine'); $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); $config->setByReference(true); $config->setPropertyPath($propertyPath); $config->setData($default); - $form = $this->getMockBuilder('Symfony\Component\Form\Form') - ->setConstructorArgs(array($config)) - ->setMethods(array('setData')) - ->getMock(); + $form = new Form($config); - $form->expects($this->once()) - ->method('setData') - ->with($default); + $this->mapper->mapDataToForms([], [$form]); - $this->mapper->mapDataToForms(array(), array($form)); + $this->assertSame($default, $form->getData()); } public function testMapFormsToDataWritesBackIfNotByReference() { $car = new \stdClass(); + $car->engine = new \stdClass(); $engine = new \stdClass(); - $propertyPath = $this->getPropertyPath('engine'); - - $this->propertyAccessor->expects($this->once()) - ->method('setValue') - ->with($car, $propertyPath, $engine); + $engine->brand = 'Rolls-Royce'; + $propertyPath = new PropertyPath('engine'); $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); $config->setByReference(false); $config->setPropertyPath($propertyPath); $config->setData($engine); - $form = $this->getForm($config); + $form = new SubmittedForm($config); - $this->mapper->mapFormsToData(array($form), $car); + $this->mapper->mapFormsToData([$form], $car); + + $this->assertEquals($engine, $car->engine); + $this->assertNotSame($engine, $car->engine); } public function testMapFormsToDataWritesBackIfByReferenceButNoReference() { $car = new \stdClass(); + $car->engine = new \stdClass(); $engine = new \stdClass(); - $propertyPath = $this->getPropertyPath('engine'); - - $this->propertyAccessor->expects($this->once()) - ->method('setValue') - ->with($car, $propertyPath, $engine); + $propertyPath = new PropertyPath('engine'); $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); $config->setByReference(true); $config->setPropertyPath($propertyPath); $config->setData($engine); - $form = $this->getForm($config); + $form = new SubmittedForm($config); - $this->mapper->mapFormsToData(array($form), $car); + $this->mapper->mapFormsToData([$form], $car); + + $this->assertSame($engine, $car->engine); } public function testMapFormsToDataWritesBackIfByReferenceAndReference() { $car = new \stdClass(); - $engine = new \stdClass(); - $propertyPath = $this->getPropertyPath('engine'); + $car->engine = 'BMW'; + $propertyPath = new PropertyPath('engine'); - // $car already contains the reference of $engine - $this->propertyAccessor->expects($this->once()) - ->method('getValue') - ->with($car, $propertyPath) - ->will($this->returnValue($engine)); - - $this->propertyAccessor->expects($this->never()) - ->method('setValue'); - - $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); + $config = new FormConfigBuilder('engine', null, $this->dispatcher); $config->setByReference(true); $config->setPropertyPath($propertyPath); - $config->setData($engine); - $form = $this->getForm($config); + $config->setData('Rolls-Royce'); + $form = new SubmittedForm($config); - $this->mapper->mapFormsToData(array($form), $car); + $car->engine = 'Rolls-Royce'; + + $this->mapper->mapFormsToData([$form], $car); + + $this->assertSame('Rolls-Royce', $car->engine); } public function testMapFormsToDataIgnoresUnmapped() { + $initialEngine = new \stdClass(); $car = new \stdClass(); + $car->engine = $initialEngine; $engine = new \stdClass(); - $propertyPath = $this->getPropertyPath('engine'); - - $this->propertyAccessor->expects($this->never()) - ->method('setValue'); + $propertyPath = new PropertyPath('engine'); $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); $config->setByReference(true); $config->setPropertyPath($propertyPath); $config->setData($engine); $config->setMapped(false); - $form = $this->getForm($config); + $form = new SubmittedForm($config); - $this->mapper->mapFormsToData(array($form), $car); + $this->mapper->mapFormsToData([$form], $car); + + $this->assertSame($initialEngine, $car->engine); } public function testMapFormsToDataIgnoresUnsubmittedForms() { + $initialEngine = new \stdClass(); $car = new \stdClass(); + $car->engine = $initialEngine; $engine = new \stdClass(); - $propertyPath = $this->getPropertyPath('engine'); - - $this->propertyAccessor->expects($this->never()) - ->method('setValue'); + $propertyPath = new PropertyPath('engine'); $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); $config->setByReference(true); $config->setPropertyPath($propertyPath); $config->setData($engine); - $form = $this->getForm($config, true, false); + $form = new Form($config); - $this->mapper->mapFormsToData(array($form), $car); + $this->mapper->mapFormsToData([$form], $car); + + $this->assertSame($initialEngine, $car->engine); } public function testMapFormsToDataIgnoresEmptyData() { + $initialEngine = new \stdClass(); $car = new \stdClass(); - $propertyPath = $this->getPropertyPath('engine'); - - $this->propertyAccessor->expects($this->never()) - ->method('setValue'); + $car->engine = $initialEngine; + $propertyPath = new PropertyPath('engine'); $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); $config->setByReference(true); $config->setPropertyPath($propertyPath); $config->setData(null); - $form = $this->getForm($config); + $form = new Form($config); - $this->mapper->mapFormsToData(array($form), $car); + $this->mapper->mapFormsToData([$form], $car); + + $this->assertSame($initialEngine, $car->engine); } public function testMapFormsToDataIgnoresUnsynchronized() { + $initialEngine = new \stdClass(); $car = new \stdClass(); + $car->engine = $initialEngine; $engine = new \stdClass(); - $propertyPath = $this->getPropertyPath('engine'); - - $this->propertyAccessor->expects($this->never()) - ->method('setValue'); + $propertyPath = new PropertyPath('engine'); $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); $config->setByReference(true); $config->setPropertyPath($propertyPath); $config->setData($engine); - $form = $this->getForm($config, false); + $form = new NotSynchronizedForm($config); - $this->mapper->mapFormsToData(array($form), $car); + $this->mapper->mapFormsToData([$form], $car); + + $this->assertSame($initialEngine, $car->engine); } public function testMapFormsToDataIgnoresDisabled() { + $initialEngine = new \stdClass(); $car = new \stdClass(); + $car->engine = $initialEngine; $engine = new \stdClass(); - $propertyPath = $this->getPropertyPath('engine'); - - $this->propertyAccessor->expects($this->never()) - ->method('setValue'); + $propertyPath = new PropertyPath('engine'); $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); $config->setByReference(true); $config->setPropertyPath($propertyPath); $config->setData($engine); $config->setDisabled(true); - $form = $this->getForm($config); + $form = new Form($config); - $this->mapper->mapFormsToData(array($form), $car); + $this->mapper->mapFormsToData([$form], $car); + + $this->assertSame($initialEngine, $car->engine); } /** @@ -363,33 +305,44 @@ class PropertyPathMapperTest extends TestCase */ public function testMapFormsToDataDoesNotChangeEqualDateTimeInstance($date) { - $article = array(); + $article = []; $publishedAt = $date; - $article['publishedAt'] = clone $publishedAt; - $propertyPath = $this->getPropertyPath('[publishedAt]'); - - $this->propertyAccessor->expects($this->once()) - ->method('getValue') - ->willReturn($article['publishedAt']) - ; - $this->propertyAccessor->expects($this->never()) - ->method('setValue') - ; + $publishedAtValue = clone $publishedAt; + $article['publishedAt'] = $publishedAtValue; + $propertyPath = new PropertyPath('[publishedAt]'); $config = new FormConfigBuilder('publishedAt', \get_class($publishedAt), $this->dispatcher); $config->setByReference(false); $config->setPropertyPath($propertyPath); $config->setData($publishedAt); - $form = $this->getForm($config); + $form = new SubmittedForm($config); - $this->mapper->mapFormsToData(array($form), $article); + $this->mapper->mapFormsToData([$form], $article); + + $this->assertSame($publishedAtValue, $article['publishedAt']); } public function provideDate() { - return array( - array(new \DateTime()), - array(new \DateTimeImmutable()), - ); + return [ + [new \DateTime()], + [new \DateTimeImmutable()], + ]; + } +} + +class SubmittedForm extends Form +{ + public function isSubmitted() + { + return true; + } +} + +class NotSynchronizedForm extends Form +{ + public function isSynchronized() + { + return false; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php index 220a3676..4f11c7f7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php @@ -20,10 +20,10 @@ class ArrayToPartsTransformerTest extends TestCase protected function setUp() { - $this->transformer = new ArrayToPartsTransformer(array( - 'first' => array('a', 'b', 'c'), - 'second' => array('d', 'e', 'f'), - )); + $this->transformer = new ArrayToPartsTransformer([ + 'first' => ['a', 'b', 'c'], + 'second' => ['d', 'e', 'f'], + ]); } protected function tearDown() @@ -33,37 +33,37 @@ class ArrayToPartsTransformerTest extends TestCase public function testTransform() { - $input = array( + $input = [ 'a' => '1', 'b' => '2', 'c' => '3', 'd' => '4', 'e' => '5', 'f' => '6', - ); + ]; - $output = array( - 'first' => array( + $output = [ + 'first' => [ 'a' => '1', 'b' => '2', 'c' => '3', - ), - 'second' => array( + ], + 'second' => [ 'd' => '4', 'e' => '5', 'f' => '6', - ), - ); + ], + ]; $this->assertSame($output, $this->transformer->transform($input)); } public function testTransformEmpty() { - $output = array( + $output = [ 'first' => null, 'second' => null, - ); + ]; $this->assertSame($output, $this->transformer->transform(null)); } @@ -78,47 +78,47 @@ class ArrayToPartsTransformerTest extends TestCase public function testReverseTransform() { - $input = array( - 'first' => array( + $input = [ + 'first' => [ 'a' => '1', 'b' => '2', 'c' => '3', - ), - 'second' => array( + ], + 'second' => [ 'd' => '4', 'e' => '5', 'f' => '6', - ), - ); + ], + ]; - $output = array( + $output = [ 'a' => '1', 'b' => '2', 'c' => '3', 'd' => '4', 'e' => '5', 'f' => '6', - ); + ]; $this->assertSame($output, $this->transformer->reverseTransform($input)); } public function testReverseTransformCompletelyEmpty() { - $input = array( + $input = [ 'first' => '', 'second' => '', - ); + ]; $this->assertNull($this->transformer->reverseTransform($input)); } public function testReverseTransformCompletelyNull() { - $input = array( + $input = [ 'first' => null, 'second' => null, - ); + ]; $this->assertNull($this->transformer->reverseTransform($input)); } @@ -128,14 +128,14 @@ class ArrayToPartsTransformerTest extends TestCase */ public function testReverseTransformPartiallyNull() { - $input = array( - 'first' => array( + $input = [ + 'first' => [ 'a' => '1', 'b' => '2', 'c' => '3', - ), + ], 'second' => null, - ); + ]; $this->transformer->reverseTransform($input); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BaseDateTimeTransformerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BaseDateTimeTransformerTest.php index 385accd7..283dd4a8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BaseDateTimeTransformerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BaseDateTimeTransformerTest.php @@ -21,7 +21,7 @@ class BaseDateTimeTransformerTest extends TestCase */ public function testConstructFailsIfInputTimezoneIsInvalid() { - $this->getMockBuilder('Symfony\Component\Form\Extension\Core\DataTransformer\BaseDateTimeTransformer')->setConstructorArgs(array('this_timezone_does_not_exist'))->getMock(); + $this->getMockBuilder('Symfony\Component\Form\Extension\Core\DataTransformer\BaseDateTimeTransformer')->setConstructorArgs(['this_timezone_does_not_exist'])->getMock(); } /** @@ -30,6 +30,6 @@ class BaseDateTimeTransformerTest extends TestCase */ public function testConstructFailsIfOutputTimezoneIsInvalid() { - $this->getMockBuilder('Symfony\Component\Form\Extension\Core\DataTransformer\BaseDateTimeTransformer')->setConstructorArgs(array(null, 'that_timezone_does_not_exist'))->getMock(); + $this->getMockBuilder('Symfony\Component\Form\Extension\Core\DataTransformer\BaseDateTimeTransformer')->setConstructorArgs([null, 'that_timezone_does_not_exist'])->getMock(); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php index cf5dbaa6..da41a897 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php @@ -22,8 +22,8 @@ class ChoiceToValueTransformerTest extends TestCase protected function setUp() { - $list = new ArrayChoiceList(array('', false, 'X', true)); - $listWithNull = new ArrayChoiceList(array('', false, 'X', null)); + $list = new ArrayChoiceList(['', false, 'X', true]); + $listWithNull = new ArrayChoiceList(['', false, 'X', null]); $this->transformer = new ChoiceToValueTransformer($list); $this->transformerWithNull = new ChoiceToValueTransformer($listWithNull); @@ -37,13 +37,13 @@ class ChoiceToValueTransformerTest extends TestCase public function transformProvider() { - return array( + return [ // more extensive test set can be found in FormUtilTest - array('', '', '', '0'), - array(false, '0', false, '1'), - array('X', 'X', 'X', '2'), - array(true, '1', null, '3'), - ); + ['', '', '', '0'], + [false, '0', false, '1'], + ['X', 'X', 'X', '2'], + [true, '1', null, '3'], + ]; } /** @@ -57,14 +57,14 @@ class ChoiceToValueTransformerTest extends TestCase public function reverseTransformProvider() { - return array( + return [ // values are expected to be valid choice keys already and stay // the same - array('', '', '0', ''), - array('0', false, '1', false), - array('X', 'X', '2', 'X'), - array('1', true, '3', null), - ); + ['', '', '0', ''], + ['0', false, '1', false], + ['X', 'X', '2', 'X'], + ['1', true, '3', null], + ]; } /** @@ -78,12 +78,12 @@ class ChoiceToValueTransformerTest extends TestCase public function reverseTransformExpectsStringOrNullProvider() { - return array( - array(0), - array(true), - array(false), - array(array()), - ); + return [ + [0], + [true], + [false], + [[]], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoicesToValuesTransformerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoicesToValuesTransformerTest.php index aa4936f8..9e7a666b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoicesToValuesTransformerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoicesToValuesTransformerTest.php @@ -22,8 +22,8 @@ class ChoicesToValuesTransformerTest extends TestCase protected function setUp() { - $list = new ArrayChoiceList(array('', false, 'X')); - $listWithNull = new ArrayChoiceList(array('', false, 'X', null)); + $list = new ArrayChoiceList(['', false, 'X']); + $listWithNull = new ArrayChoiceList(['', false, 'X', null]); $this->transformer = new ChoicesToValuesTransformer($list); $this->transformerWithNull = new ChoicesToValuesTransformer($listWithNull); @@ -37,20 +37,20 @@ class ChoicesToValuesTransformerTest extends TestCase public function testTransform() { - $in = array('', false, 'X'); - $out = array('', '0', 'X'); + $in = ['', false, 'X']; + $out = ['', '0', 'X']; $this->assertSame($out, $this->transformer->transform($in)); $in[] = null; - $outWithNull = array('0', '1', '2', '3'); + $outWithNull = ['0', '1', '2', '3']; $this->assertSame($outWithNull, $this->transformerWithNull->transform($in)); } public function testTransformNull() { - $this->assertSame(array(), $this->transformer->transform(null)); + $this->assertSame([], $this->transformer->transform(null)); } /** @@ -64,12 +64,12 @@ class ChoicesToValuesTransformerTest extends TestCase public function testReverseTransform() { // values are expected to be valid choices and stay the same - $in = array('', '0', 'X'); - $out = array('', false, 'X'); + $in = ['', '0', 'X']; + $out = ['', false, 'X']; $this->assertSame($out, $this->transformer->reverseTransform($in)); // values are expected to be valid choices and stay the same - $inWithNull = array('0', '1', '2', '3'); + $inWithNull = ['0', '1', '2', '3']; $out[] = null; $this->assertSame($out, $this->transformerWithNull->reverseTransform($inWithNull)); @@ -77,8 +77,8 @@ class ChoicesToValuesTransformerTest extends TestCase public function testReverseTransformNull() { - $this->assertSame(array(), $this->transformer->reverseTransform(null)); - $this->assertSame(array(), $this->transformerWithNull->reverseTransform(null)); + $this->assertSame([], $this->transformer->reverseTransform(null)); + $this->assertSame([], $this->transformerWithNull->reverseTransform(null)); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DataTransformerChainTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DataTransformerChainTest.php index 16302b34..f62d3c52 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DataTransformerChainTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DataTransformerChainTest.php @@ -29,7 +29,7 @@ class DataTransformerChainTest extends TestCase ->with($this->identicalTo('bar')) ->will($this->returnValue('baz')); - $chain = new DataTransformerChain(array($transformer1, $transformer2)); + $chain = new DataTransformerChain([$transformer1, $transformer2]); $this->assertEquals('baz', $chain->transform('foo')); } @@ -47,7 +47,7 @@ class DataTransformerChainTest extends TestCase ->with($this->identicalTo('bar')) ->will($this->returnValue('baz')); - $chain = new DataTransformerChain(array($transformer1, $transformer2)); + $chain = new DataTransformerChain([$transformer1, $transformer2]); $this->assertEquals('baz', $chain->reverseTransform('foo')); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToArrayTransformerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToArrayTransformerTest.php index a75fe114..ead14270 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToArrayTransformerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToArrayTransformerTest.php @@ -24,7 +24,7 @@ class DateIntervalToArrayTransformerTest extends DateIntervalTestCase { $transformer = new DateIntervalToArrayTransformer(); $input = new \DateInterval('P1Y2M3DT4H5M6S'); - $output = array( + $output = [ 'years' => '1', 'months' => '2', 'days' => '3', @@ -32,14 +32,14 @@ class DateIntervalToArrayTransformerTest extends DateIntervalTestCase 'minutes' => '5', 'seconds' => '6', 'invert' => false, - ); + ]; $this->assertSame($output, $transformer->transform($input)); } public function testTransformEmpty() { $transformer = new DateIntervalToArrayTransformer(); - $output = array( + $output = [ 'years' => '', 'months' => '', 'days' => '', @@ -47,43 +47,43 @@ class DateIntervalToArrayTransformerTest extends DateIntervalTestCase 'minutes' => '', 'seconds' => '', 'invert' => false, - ); + ]; $this->assertSame($output, $transformer->transform(null)); } public function testTransformEmptyWithFields() { - $transformer = new DateIntervalToArrayTransformer(array('years', 'weeks', 'minutes', 'seconds')); - $output = array( + $transformer = new DateIntervalToArrayTransformer(['years', 'weeks', 'minutes', 'seconds']); + $output = [ 'years' => '', 'weeks' => '', 'minutes' => '', 'seconds' => '', - ); + ]; $this->assertSame($output, $transformer->transform(null)); } public function testTransformWithFields() { - $transformer = new DateIntervalToArrayTransformer(array('years', 'minutes', 'seconds')); + $transformer = new DateIntervalToArrayTransformer(['years', 'minutes', 'seconds']); $input = new \DateInterval('P1Y2M3DT4H5M6S'); - $output = array( + $output = [ 'years' => '1', 'minutes' => '5', 'seconds' => '6', - ); + ]; $this->assertSame($output, $transformer->transform($input)); } public function testTransformWithWeek() { - $transformer = new DateIntervalToArrayTransformer(array('weeks', 'minutes', 'seconds')); + $transformer = new DateIntervalToArrayTransformer(['weeks', 'minutes', 'seconds']); $input = new \DateInterval('P1Y2M3WT4H5M6S'); - $output = array( + $output = [ 'weeks' => '3', 'minutes' => '5', 'seconds' => '6', - ); + ]; $input = $transformer->transform($input); ksort($input); ksort($output); @@ -92,13 +92,13 @@ class DateIntervalToArrayTransformerTest extends DateIntervalTestCase public function testTransformWithZeroWeek() { - $transformer = new DateIntervalToArrayTransformer(array('weeks', 'minutes', 'seconds')); + $transformer = new DateIntervalToArrayTransformer(['weeks', 'minutes', 'seconds']); $input = new \DateInterval('P1Y2M0WT4H5M6S'); - $output = array( + $output = [ 'weeks' => '0', 'minutes' => '5', 'seconds' => '6', - ); + ]; $input = $transformer->transform($input); ksort($input); ksort($output); @@ -107,13 +107,13 @@ class DateIntervalToArrayTransformerTest extends DateIntervalTestCase public function testTransformDaysToWeeks() { - $transformer = new DateIntervalToArrayTransformer(array('weeks', 'minutes', 'seconds')); + $transformer = new DateIntervalToArrayTransformer(['weeks', 'minutes', 'seconds']); $input = new \DateInterval('P1Y2M23DT4H5M6S'); - $output = array( + $output = [ 'weeks' => '3', 'minutes' => '5', 'seconds' => '6', - ); + ]; $input = $transformer->transform($input); ksort($input); ksort($output); @@ -122,25 +122,25 @@ class DateIntervalToArrayTransformerTest extends DateIntervalTestCase public function testTransformDaysNotOverflowingToWeeks() { - $transformer = new DateIntervalToArrayTransformer(array('days', 'minutes', 'seconds')); + $transformer = new DateIntervalToArrayTransformer(['days', 'minutes', 'seconds']); $input = new \DateInterval('P1Y2M23DT4H5M6S'); - $output = array( + $output = [ 'days' => '23', 'minutes' => '5', 'seconds' => '6', - ); + ]; $this->assertSame($output, $transformer->transform($input)); } public function testTransformWithInvert() { - $transformer = new DateIntervalToArrayTransformer(array('years', 'invert')); + $transformer = new DateIntervalToArrayTransformer(['years', 'invert']); $input = new \DateInterval('P1Y'); $input->invert = 1; - $output = array( + $output = [ 'years' => '1', 'invert' => true, - ); + ]; $this->assertSame($output, $transformer->transform($input)); } @@ -148,7 +148,7 @@ class DateIntervalToArrayTransformerTest extends DateIntervalTestCase { $transformer = new DateIntervalToArrayTransformer(null, true); $input = new \DateInterval('P1Y2M3DT4H5M6S'); - $output = array( + $output = [ 'years' => '01', 'months' => '02', 'days' => '03', @@ -156,19 +156,19 @@ class DateIntervalToArrayTransformerTest extends DateIntervalTestCase 'minutes' => '05', 'seconds' => '06', 'invert' => false, - ); + ]; $this->assertSame($output, $transformer->transform($input)); } public function testTransformWithFieldsAndPadding() { - $transformer = new DateIntervalToArrayTransformer(array('years', 'minutes', 'seconds'), true); + $transformer = new DateIntervalToArrayTransformer(['years', 'minutes', 'seconds'], true); $input = new \DateInterval('P1Y2M3DT4H5M6S'); - $output = array( + $output = [ 'years' => '01', 'minutes' => '05', 'seconds' => '06', - ); + ]; $this->assertSame($output, $transformer->transform($input)); } @@ -183,19 +183,19 @@ class DateIntervalToArrayTransformerTest extends DateIntervalTestCase public function testReverseTransformWithUnsetFields() { $transformer = new DateIntervalToArrayTransformer(); - $input = array('years' => '1'); + $input = ['years' => '1']; $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(TransformationFailedException::class); $transformer->reverseTransform($input); } public function testReverseTransformWithEmptyFields() { - $transformer = new DateIntervalToArrayTransformer(array('years', 'minutes', 'seconds')); - $input = array( + $transformer = new DateIntervalToArrayTransformer(['years', 'minutes', 'seconds']); + $input = [ 'years' => '1', 'minutes' => '', 'seconds' => '6', - ); + ]; if (method_exists($this, 'expectException')) { $this->expectException(TransformationFailedException::class); $this->expectExceptionMessage('This amount of "minutes" is invalid'); @@ -207,10 +207,10 @@ class DateIntervalToArrayTransformerTest extends DateIntervalTestCase public function testReverseTransformWithWrongInvertType() { - $transformer = new DateIntervalToArrayTransformer(array('invert')); - $input = array( + $transformer = new DateIntervalToArrayTransformer(['invert']); + $input = [ 'invert' => '1', - ); + ]; if (method_exists($this, 'expectException')) { $this->expectException(TransformationFailedException::class); $this->expectExceptionMessage('The value of "invert" must be boolean'); @@ -223,7 +223,7 @@ class DateIntervalToArrayTransformerTest extends DateIntervalTestCase public function testReverseTransform() { $transformer = new DateIntervalToArrayTransformer(); - $input = array( + $input = [ 'years' => '1', 'months' => '2', 'days' => '3', @@ -231,7 +231,7 @@ class DateIntervalToArrayTransformerTest extends DateIntervalTestCase 'minutes' => '5', 'seconds' => '6', 'invert' => false, - ); + ]; $output = new \DateInterval('P01Y02M03DT04H05M06S'); $this->assertDateIntervalEquals($output, $transformer->reverseTransform($input)); } @@ -239,28 +239,28 @@ class DateIntervalToArrayTransformerTest extends DateIntervalTestCase public function testReverseTransformWithWeek() { $transformer = new DateIntervalToArrayTransformer( - array('years', 'months', 'weeks', 'hours', 'minutes', 'seconds') + ['years', 'months', 'weeks', 'hours', 'minutes', 'seconds'] ); - $input = array( + $input = [ 'years' => '1', 'months' => '2', 'weeks' => '3', 'hours' => '4', 'minutes' => '5', 'seconds' => '6', - ); + ]; $output = new \DateInterval('P1Y2M21DT4H5M6S'); $this->assertDateIntervalEquals($output, $transformer->reverseTransform($input)); } public function testReverseTransformWithFields() { - $transformer = new DateIntervalToArrayTransformer(array('years', 'minutes', 'seconds')); - $input = array( + $transformer = new DateIntervalToArrayTransformer(['years', 'minutes', 'seconds']); + $input = [ 'years' => '1', 'minutes' => '5', 'seconds' => '6', - ); + ]; $output = new \DateInterval('P1Y0M0DT0H5M6S'); $this->assertDateIntervalEquals($output, $transformer->reverseTransform($input)); } @@ -268,17 +268,17 @@ class DateIntervalToArrayTransformerTest extends DateIntervalTestCase public function testBothTransformsWithWeek() { $transformer = new DateIntervalToArrayTransformer( - array('years', 'months', 'weeks', 'hours', 'minutes', 'seconds') + ['years', 'months', 'weeks', 'hours', 'minutes', 'seconds'] ); $interval = new \DateInterval('P1Y2M21DT4H5M6S'); - $array = array( + $array = [ 'years' => '1', 'months' => '2', 'weeks' => '3', 'hours' => '4', 'minutes' => '5', 'seconds' => '6', - ); + ]; $input = $transformer->transform($interval); ksort($input); ksort($array); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToStringTransformerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToStringTransformerTest.php index 389e0c16..84b03783 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToStringTransformerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToStringTransformerTest.php @@ -22,36 +22,36 @@ class DateIntervalToStringTransformerTest extends DateIntervalTestCase { public function dataProviderISO() { - $data = array( - array('P%YY%MM%DDT%HH%IM%SS', 'P00Y00M00DT00H00M00S', 'PT0S'), - array('P%yY%mM%dDT%hH%iM%sS', 'P0Y0M0DT0H0M0S', 'PT0S'), - array('P%yY%mM%dDT%hH%iM%sS', 'P10Y2M3DT16H5M6S', 'P10Y2M3DT16H5M6S'), - array('P%yY%mM%dDT%hH%iM', 'P10Y2M3DT16H5M', 'P10Y2M3DT16H5M'), - array('P%yY%mM%dDT%hH', 'P10Y2M3DT16H', 'P10Y2M3DT16H'), - array('P%yY%mM%dD', 'P10Y2M3D', 'P10Y2M3DT0H'), - ); + $data = [ + ['P%YY%MM%DDT%HH%IM%SS', 'P00Y00M00DT00H00M00S', 'PT0S'], + ['P%yY%mM%dDT%hH%iM%sS', 'P0Y0M0DT0H0M0S', 'PT0S'], + ['P%yY%mM%dDT%hH%iM%sS', 'P10Y2M3DT16H5M6S', 'P10Y2M3DT16H5M6S'], + ['P%yY%mM%dDT%hH%iM', 'P10Y2M3DT16H5M', 'P10Y2M3DT16H5M'], + ['P%yY%mM%dDT%hH', 'P10Y2M3DT16H', 'P10Y2M3DT16H'], + ['P%yY%mM%dD', 'P10Y2M3D', 'P10Y2M3DT0H'], + ]; return $data; } public function dataProviderDate() { - $data = array( - array( + $data = [ + [ '%y years %m months %d days %h hours %i minutes %s seconds', '10 years 2 months 3 days 16 hours 5 minutes 6 seconds', 'P10Y2M3DT16H5M6S', - ), - array( + ], + [ '%y years %m months %d days %h hours %i minutes', '10 years 2 months 3 days 16 hours 5 minutes', 'P10Y2M3DT16H5M', - ), - array('%y years %m months %d days %h hours', '10 years 2 months 3 days 16 hours', 'P10Y2M3DT16H'), - array('%y years %m months %d days', '10 years 2 months 3 days', 'P10Y2M3D'), - array('%y years %m months', '10 years 2 months', 'P10Y2M'), - array('%y year', '1 year', 'P1Y'), - ); + ], + ['%y years %m months %d days %h hours', '10 years 2 months 3 days 16 hours', 'P10Y2M3DT16H'], + ['%y years %m months %d days', '10 years 2 months 3 days', 'P10Y2M3D'], + ['%y years %m months', '10 years 2 months', 'P10Y2M'], + ['%y year', '1 year', 'P1Y'], + ]; return $data; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToArrayTransformerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToArrayTransformerTest.php index e9a0efb3..2669d3d4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToArrayTransformerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToArrayTransformerTest.php @@ -22,14 +22,14 @@ class DateTimeToArrayTransformerTest extends TestCase $input = new \DateTime('2010-02-03 04:05:06 UTC'); - $output = array( + $output = [ 'year' => '2010', 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5', 'second' => '6', - ); + ]; $this->assertSame($output, $transformer->transform($input)); } @@ -38,43 +38,43 @@ class DateTimeToArrayTransformerTest extends TestCase { $transformer = new DateTimeToArrayTransformer(); - $output = array( + $output = [ 'year' => '', 'month' => '', 'day' => '', 'hour' => '', 'minute' => '', 'second' => '', - ); + ]; $this->assertSame($output, $transformer->transform(null)); } public function testTransformEmptyWithFields() { - $transformer = new DateTimeToArrayTransformer(null, null, array('year', 'minute', 'second')); + $transformer = new DateTimeToArrayTransformer(null, null, ['year', 'minute', 'second']); - $output = array( + $output = [ 'year' => '', 'minute' => '', 'second' => '', - ); + ]; $this->assertSame($output, $transformer->transform(null)); } public function testTransformWithFields() { - $transformer = new DateTimeToArrayTransformer('UTC', 'UTC', array('year', 'month', 'minute', 'second')); + $transformer = new DateTimeToArrayTransformer('UTC', 'UTC', ['year', 'month', 'minute', 'second']); $input = new \DateTime('2010-02-03 04:05:06 UTC'); - $output = array( + $output = [ 'year' => '2010', 'month' => '2', 'minute' => '5', 'second' => '6', - ); + ]; $this->assertSame($output, $transformer->transform($input)); } @@ -85,14 +85,14 @@ class DateTimeToArrayTransformerTest extends TestCase $input = new \DateTime('2010-02-03 04:05:06 UTC'); - $output = array( + $output = [ 'year' => '2010', 'month' => '02', 'day' => '03', 'hour' => '04', 'minute' => '05', 'second' => '06', - ); + ]; $this->assertSame($output, $transformer->transform($input)); } @@ -105,14 +105,14 @@ class DateTimeToArrayTransformerTest extends TestCase $dateTime = new \DateTime('2010-02-03 04:05:06 America/New_York'); $dateTime->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); - $output = array( + $output = [ 'year' => (string) (int) $dateTime->format('Y'), 'month' => (string) (int) $dateTime->format('m'), 'day' => (string) (int) $dateTime->format('d'), 'hour' => (string) (int) $dateTime->format('H'), 'minute' => (string) (int) $dateTime->format('i'), 'second' => (string) (int) $dateTime->format('s'), - ); + ]; $this->assertSame($output, $transformer->transform($input)); } @@ -125,14 +125,14 @@ class DateTimeToArrayTransformerTest extends TestCase $dateTime = new \DateTimeImmutable('2010-02-03 04:05:06 America/New_York'); $dateTime = $dateTime->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); - $output = array( + $output = [ 'year' => (string) (int) $dateTime->format('Y'), 'month' => (string) (int) $dateTime->format('m'), 'day' => (string) (int) $dateTime->format('d'), 'hour' => (string) (int) $dateTime->format('H'), 'minute' => (string) (int) $dateTime->format('i'), 'second' => (string) (int) $dateTime->format('s'), - ); + ]; $this->assertSame($output, $transformer->transform($input)); } @@ -150,14 +150,14 @@ class DateTimeToArrayTransformerTest extends TestCase { $transformer = new DateTimeToArrayTransformer('UTC', 'UTC'); - $input = array( + $input = [ 'year' => '2010', 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5', 'second' => '6', - ); + ]; $output = new \DateTime('2010-02-03 04:05:06 UTC'); @@ -168,14 +168,14 @@ class DateTimeToArrayTransformerTest extends TestCase { $transformer = new DateTimeToArrayTransformer('UTC', 'UTC'); - $input = array( + $input = [ 'year' => '2010', 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '0', 'second' => '0', - ); + ]; $output = new \DateTime('2010-02-03 04:00:00 UTC'); @@ -186,27 +186,27 @@ class DateTimeToArrayTransformerTest extends TestCase { $transformer = new DateTimeToArrayTransformer(); - $input = array( + $input = [ 'year' => '', 'month' => '', 'day' => '', 'hour' => '', 'minute' => '', 'second' => '', - ); + ]; $this->assertNull($transformer->reverseTransform($input)); } public function testReverseTransformCompletelyEmptySubsetOfFields() { - $transformer = new DateTimeToArrayTransformer(null, null, array('year', 'month', 'day')); + $transformer = new DateTimeToArrayTransformer(null, null, ['year', 'month', 'day']); - $input = array( + $input = [ 'year' => '', 'month' => '', 'day' => '', - ); + ]; $this->assertNull($transformer->reverseTransform($input)); } @@ -217,13 +217,13 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformPartiallyEmptyYear() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5', 'second' => '6', - )); + ]); } /** @@ -232,13 +232,13 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformPartiallyEmptyMonth() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '2010', 'day' => '3', 'hour' => '4', 'minute' => '5', 'second' => '6', - )); + ]); } /** @@ -247,13 +247,13 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformPartiallyEmptyDay() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '2010', 'month' => '2', 'hour' => '4', 'minute' => '5', 'second' => '6', - )); + ]); } /** @@ -262,13 +262,13 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformPartiallyEmptyHour() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '2010', 'month' => '2', 'day' => '3', 'minute' => '5', 'second' => '6', - )); + ]); } /** @@ -277,13 +277,13 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformPartiallyEmptyMinute() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '2010', 'month' => '2', 'day' => '3', 'hour' => '4', 'second' => '6', - )); + ]); } /** @@ -292,13 +292,13 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformPartiallyEmptySecond() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '2010', 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5', - )); + ]); } public function testReverseTransformNull() @@ -312,14 +312,14 @@ class DateTimeToArrayTransformerTest extends TestCase { $transformer = new DateTimeToArrayTransformer('America/New_York', 'Asia/Hong_Kong'); - $input = array( + $input = [ 'year' => '2010', 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5', 'second' => '6', - ); + ]; $output = new \DateTime('2010-02-03 04:05:06 Asia/Hong_Kong'); $output->setTimezone(new \DateTimeZone('America/New_York')); @@ -331,14 +331,14 @@ class DateTimeToArrayTransformerTest extends TestCase { $transformer = new DateTimeToArrayTransformer('Asia/Hong_Kong', 'UTC'); - $input = array( + $input = [ 'year' => '2010', 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5', 'second' => '6', - ); + ]; $output = new \DateTime('2010-02-03 04:05:06 UTC'); $output->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); @@ -361,14 +361,14 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformWithNegativeYear() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '-1', 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5', 'second' => '6', - )); + ]); } /** @@ -377,14 +377,14 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformWithNegativeMonth() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '2010', 'month' => '-1', 'day' => '3', 'hour' => '4', 'minute' => '5', 'second' => '6', - )); + ]); } /** @@ -393,14 +393,14 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformWithNegativeDay() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '2010', 'month' => '2', 'day' => '-1', 'hour' => '4', 'minute' => '5', 'second' => '6', - )); + ]); } /** @@ -409,14 +409,14 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformWithNegativeHour() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '2010', 'month' => '2', 'day' => '3', 'hour' => '-1', 'minute' => '5', 'second' => '6', - )); + ]); } /** @@ -425,14 +425,14 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformWithNegativeMinute() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '2010', 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '-1', 'second' => '6', - )); + ]); } /** @@ -441,14 +441,14 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformWithNegativeSecond() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '2010', 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5', 'second' => '-1', - )); + ]); } /** @@ -457,14 +457,14 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformWithInvalidMonth() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '2010', 'month' => '13', 'day' => '3', 'hour' => '4', 'minute' => '5', 'second' => '6', - )); + ]); } /** @@ -473,14 +473,14 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformWithInvalidDay() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '2010', 'month' => '2', 'day' => '31', 'hour' => '4', 'minute' => '5', 'second' => '6', - )); + ]); } /** @@ -489,14 +489,14 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformWithStringDay() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '2010', 'month' => '2', 'day' => 'bazinga', 'hour' => '4', 'minute' => '5', 'second' => '6', - )); + ]); } /** @@ -505,14 +505,14 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformWithStringMonth() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '2010', 'month' => 'bazinga', 'day' => '31', 'hour' => '4', 'minute' => '5', 'second' => '6', - )); + ]); } /** @@ -521,14 +521,14 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformWithStringYear() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => 'bazinga', 'month' => '2', 'day' => '31', 'hour' => '4', 'minute' => '5', 'second' => '6', - )); + ]); } /** @@ -537,14 +537,14 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformWithEmptyStringHour() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '2010', 'month' => '2', 'day' => '31', 'hour' => '', 'minute' => '5', 'second' => '6', - )); + ]); } /** @@ -553,14 +553,14 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformWithEmptyStringMinute() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '2010', 'month' => '2', 'day' => '31', 'hour' => '4', 'minute' => '', 'second' => '6', - )); + ]); } /** @@ -569,13 +569,13 @@ class DateTimeToArrayTransformerTest extends TestCase public function testReverseTransformWithEmptyStringSecond() { $transformer = new DateTimeToArrayTransformer(); - $transformer->reverseTransform(array( + $transformer->reverseTransform([ 'year' => '2010', 'month' => '2', 'day' => '31', 'hour' => '4', 'minute' => '5', 'second' => '', - )); + ]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformerTest.php index 6046022e..e66331aa 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformerTest.php @@ -28,34 +28,34 @@ class DateTimeToHtml5LocalDateTimeTransformerTest extends TestCase public function transformProvider() { - return array( - array('UTC', 'UTC', '2010-02-03 04:05:06 UTC', '2010-02-03T04:05:06'), - array('UTC', 'UTC', null, ''), - array('America/New_York', 'Asia/Hong_Kong', '2010-02-03 04:05:06 America/New_York', '2010-02-03T17:05:06'), - array('America/New_York', 'Asia/Hong_Kong', null, ''), - array('UTC', 'Asia/Hong_Kong', '2010-02-03 04:05:06 UTC', '2010-02-03T12:05:06'), - array('America/New_York', 'UTC', '2010-02-03 04:05:06 America/New_York', '2010-02-03T09:05:06'), - ); + return [ + ['UTC', 'UTC', '2010-02-03 04:05:06 UTC', '2010-02-03T04:05:06'], + ['UTC', 'UTC', null, ''], + ['America/New_York', 'Asia/Hong_Kong', '2010-02-03 04:05:06 America/New_York', '2010-02-03T17:05:06'], + ['America/New_York', 'Asia/Hong_Kong', null, ''], + ['UTC', 'Asia/Hong_Kong', '2010-02-03 04:05:06 UTC', '2010-02-03T12:05:06'], + ['America/New_York', 'UTC', '2010-02-03 04:05:06 America/New_York', '2010-02-03T09:05:06'], + ]; } public function reverseTransformProvider() { - return array( + return [ // format without seconds, as appears in some browsers - array('UTC', 'UTC', '2010-02-03 04:05:06 UTC', '2010-02-03T04:05:06'), - array('UTC', 'UTC', null, ''), - array('America/New_York', 'Asia/Hong_Kong', '2010-02-03 04:05:06 America/New_York', '2010-02-03T17:05:06'), - array('America/New_York', 'Asia/Hong_Kong', null, ''), - array('UTC', 'Asia/Hong_Kong', '2010-02-03 04:05:06 UTC', '2010-02-03T12:05:06'), - array('America/New_York', 'UTC', '2010-02-03 04:05:06 America/New_York', '2010-02-03T09:05:06'), - array('UTC', 'UTC', '2010-02-03 04:05:00 UTC', '2010-02-03T04:05'), - array('America/New_York', 'Asia/Hong_Kong', '2010-02-03 04:05:00 America/New_York', '2010-02-03T17:05'), - array('Europe/Amsterdam', 'Europe/Amsterdam', '2013-08-21 10:30:00 Europe/Amsterdam', '2013-08-21T10:30:00'), - array('UTC', 'UTC', '2018-09-15T10:00:00Z', '2018-09-15T10:00:00Z'), - array('Europe/Berlin', 'Europe/Berlin', '2018-09-15T10:00:00+02:00', '2018-09-15T10:00:00+02:00'), - array('Europe/Berlin', 'Europe/Berlin', '2018-09-15T10:00:00+0200', '2018-09-15T10:00:00+0200'), - array('UTC', 'UTC', '2018-10-03T10:00:00.000Z', '2018-10-03T10:00:00.000Z'), - ); + ['UTC', 'UTC', '2010-02-03 04:05:06 UTC', '2010-02-03T04:05:06'], + ['UTC', 'UTC', null, ''], + ['America/New_York', 'Asia/Hong_Kong', '2010-02-03 04:05:06 America/New_York', '2010-02-03T17:05:06'], + ['America/New_York', 'Asia/Hong_Kong', null, ''], + ['UTC', 'Asia/Hong_Kong', '2010-02-03 04:05:06 UTC', '2010-02-03T12:05:06'], + ['America/New_York', 'UTC', '2010-02-03 04:05:06 America/New_York', '2010-02-03T09:05:06'], + ['UTC', 'UTC', '2010-02-03 04:05:00 UTC', '2010-02-03T04:05'], + ['America/New_York', 'Asia/Hong_Kong', '2010-02-03 04:05:00 America/New_York', '2010-02-03T17:05'], + ['Europe/Amsterdam', 'Europe/Amsterdam', '2013-08-21 10:30:00 Europe/Amsterdam', '2013-08-21T10:30:00'], + ['UTC', 'UTC', '2018-09-15T10:00:00Z', '2018-09-15T10:00:00Z'], + ['Europe/Berlin', 'Europe/Berlin', '2018-09-15T10:00:00+02:00', '2018-09-15T10:00:00+02:00'], + ['Europe/Berlin', 'Europe/Berlin', '2018-09-15T10:00:00+0200', '2018-09-15T10:00:00+0200'], + ['UTC', 'UTC', '2018-10-03T10:00:00.000Z', '2018-10-03T10:00:00.000Z'], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php index 8e7ad393..8cf5986c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php @@ -51,36 +51,36 @@ class DateTimeToLocalizedStringTransformerTest extends TestCase public function dataProvider() { - return array( - array(\IntlDateFormatter::SHORT, null, null, '03.02.10, 04:05', '2010-02-03 04:05:00 UTC'), - array(\IntlDateFormatter::MEDIUM, null, null, '03.02.2010, 04:05', '2010-02-03 04:05:00 UTC'), - array(\IntlDateFormatter::LONG, null, null, '3. Februar 2010 um 04:05', '2010-02-03 04:05:00 UTC'), - array(\IntlDateFormatter::FULL, null, null, 'Mittwoch, 3. Februar 2010 um 04:05', '2010-02-03 04:05:00 UTC'), - array(\IntlDateFormatter::SHORT, \IntlDateFormatter::NONE, null, '03.02.10', '2010-02-03 00:00:00 UTC'), - array(\IntlDateFormatter::MEDIUM, \IntlDateFormatter::NONE, null, '03.02.2010', '2010-02-03 00:00:00 UTC'), - array(\IntlDateFormatter::LONG, \IntlDateFormatter::NONE, null, '3. Februar 2010', '2010-02-03 00:00:00 UTC'), - array(\IntlDateFormatter::FULL, \IntlDateFormatter::NONE, null, 'Mittwoch, 3. Februar 2010', '2010-02-03 00:00:00 UTC'), - array(null, \IntlDateFormatter::SHORT, null, '03.02.2010, 04:05', '2010-02-03 04:05:00 UTC'), - array(null, \IntlDateFormatter::MEDIUM, null, '03.02.2010, 04:05:06', '2010-02-03 04:05:06 UTC'), - array(null, \IntlDateFormatter::LONG, null, '03.02.2010, 04:05:06 UTC', '2010-02-03 04:05:06 UTC'), - array(null, \IntlDateFormatter::LONG, null, '03.02.2010, 04:05:06 UTC', '2010-02-03 04:05:06 GMT'), + return [ + [\IntlDateFormatter::SHORT, null, null, '03.02.10, 04:05', '2010-02-03 04:05:00 UTC'], + [\IntlDateFormatter::MEDIUM, null, null, '03.02.2010, 04:05', '2010-02-03 04:05:00 UTC'], + [\IntlDateFormatter::LONG, null, null, '3. Februar 2010 um 04:05', '2010-02-03 04:05:00 UTC'], + [\IntlDateFormatter::FULL, null, null, 'Mittwoch, 3. Februar 2010 um 04:05', '2010-02-03 04:05:00 UTC'], + [\IntlDateFormatter::SHORT, \IntlDateFormatter::NONE, null, '03.02.10', '2010-02-03 00:00:00 UTC'], + [\IntlDateFormatter::MEDIUM, \IntlDateFormatter::NONE, null, '03.02.2010', '2010-02-03 00:00:00 UTC'], + [\IntlDateFormatter::LONG, \IntlDateFormatter::NONE, null, '3. Februar 2010', '2010-02-03 00:00:00 UTC'], + [\IntlDateFormatter::FULL, \IntlDateFormatter::NONE, null, 'Mittwoch, 3. Februar 2010', '2010-02-03 00:00:00 UTC'], + [null, \IntlDateFormatter::SHORT, null, '03.02.2010, 04:05', '2010-02-03 04:05:00 UTC'], + [null, \IntlDateFormatter::MEDIUM, null, '03.02.2010, 04:05:06', '2010-02-03 04:05:06 UTC'], + [null, \IntlDateFormatter::LONG, null, '03.02.2010, 04:05:06 UTC', '2010-02-03 04:05:06 UTC'], + [null, \IntlDateFormatter::LONG, null, '03.02.2010, 04:05:06 UTC', '2010-02-03 04:05:06 GMT'], // see below for extra test case for time format FULL - array(\IntlDateFormatter::NONE, \IntlDateFormatter::SHORT, null, '04:05', '1970-01-01 04:05:00 UTC'), - array(\IntlDateFormatter::NONE, \IntlDateFormatter::MEDIUM, null, '04:05:06', '1970-01-01 04:05:06 UTC'), - array(\IntlDateFormatter::NONE, \IntlDateFormatter::LONG, null, '04:05:06 UTC', '1970-01-01 04:05:06 GMT'), - array(\IntlDateFormatter::NONE, \IntlDateFormatter::LONG, null, '04:05:06 UTC', '1970-01-01 04:05:06 UTC'), - array(null, null, 'yyyy-MM-dd HH:mm:00', '2010-02-03 04:05:00', '2010-02-03 04:05:00 UTC'), - array(null, null, 'yyyy-MM-dd HH:mm', '2010-02-03 04:05', '2010-02-03 04:05:00 UTC'), - array(null, null, 'yyyy-MM-dd HH', '2010-02-03 04', '2010-02-03 04:00:00 UTC'), - array(null, null, 'yyyy-MM-dd', '2010-02-03', '2010-02-03 00:00:00 UTC'), - array(null, null, 'yyyy-MM', '2010-02', '2010-02-01 00:00:00 UTC'), - array(null, null, 'yyyy', '2010', '2010-01-01 00:00:00 UTC'), - array(null, null, 'dd-MM-yyyy', '03-02-2010', '2010-02-03 00:00:00 UTC'), - array(null, null, 'HH:mm:ss', '04:05:06', '1970-01-01 04:05:06 UTC'), - array(null, null, 'HH:mm:00', '04:05:00', '1970-01-01 04:05:00 UTC'), - array(null, null, 'HH:mm', '04:05', '1970-01-01 04:05:00 UTC'), - array(null, null, 'HH', '04', '1970-01-01 04:00:00 UTC'), - ); + [\IntlDateFormatter::NONE, \IntlDateFormatter::SHORT, null, '04:05', '1970-01-01 04:05:00 UTC'], + [\IntlDateFormatter::NONE, \IntlDateFormatter::MEDIUM, null, '04:05:06', '1970-01-01 04:05:06 UTC'], + [\IntlDateFormatter::NONE, \IntlDateFormatter::LONG, null, '04:05:06 UTC', '1970-01-01 04:05:06 GMT'], + [\IntlDateFormatter::NONE, \IntlDateFormatter::LONG, null, '04:05:06 UTC', '1970-01-01 04:05:06 UTC'], + [null, null, 'yyyy-MM-dd HH:mm:00', '2010-02-03 04:05:00', '2010-02-03 04:05:00 UTC'], + [null, null, 'yyyy-MM-dd HH:mm', '2010-02-03 04:05', '2010-02-03 04:05:00 UTC'], + [null, null, 'yyyy-MM-dd HH', '2010-02-03 04', '2010-02-03 04:00:00 UTC'], + [null, null, 'yyyy-MM-dd', '2010-02-03', '2010-02-03 00:00:00 UTC'], + [null, null, 'yyyy-MM', '2010-02', '2010-02-01 00:00:00 UTC'], + [null, null, 'yyyy', '2010', '2010-01-01 00:00:00 UTC'], + [null, null, 'dd-MM-yyyy', '03-02-2010', '2010-02-03 00:00:00 UTC'], + [null, null, 'HH:mm:ss', '04:05:06', '1970-01-01 04:05:06 UTC'], + [null, null, 'HH:mm:00', '04:05:00', '1970-01-01 04:05:00 UTC'], + [null, null, 'HH:mm', '04:05', '1970-01-01 04:05:00 UTC'], + [null, null, 'HH', '04', '1970-01-01 04:00:00 UTC'], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php index 053cb628..2352ea6c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php @@ -45,14 +45,14 @@ class DateTimeToRfc3339TransformerTest extends TestCase public function allProvider() { - return array( - array('UTC', 'UTC', '2010-02-03 04:05:06 UTC', '2010-02-03T04:05:06Z'), - array('UTC', 'UTC', null, ''), - array('America/New_York', 'Asia/Hong_Kong', '2010-02-03 04:05:06 America/New_York', '2010-02-03T17:05:06+08:00'), - array('America/New_York', 'Asia/Hong_Kong', null, ''), - array('UTC', 'Asia/Hong_Kong', '2010-02-03 04:05:06 UTC', '2010-02-03T12:05:06+08:00'), - array('America/New_York', 'UTC', '2010-02-03 04:05:06 America/New_York', '2010-02-03T09:05:06Z'), - ); + return [ + ['UTC', 'UTC', '2010-02-03 04:05:06 UTC', '2010-02-03T04:05:06Z'], + ['UTC', 'UTC', null, ''], + ['America/New_York', 'Asia/Hong_Kong', '2010-02-03 04:05:06 America/New_York', '2010-02-03T17:05:06+08:00'], + ['America/New_York', 'Asia/Hong_Kong', null, ''], + ['UTC', 'Asia/Hong_Kong', '2010-02-03 04:05:06 UTC', '2010-02-03T12:05:06+08:00'], + ['America/New_York', 'UTC', '2010-02-03 04:05:06 America/New_York', '2010-02-03T09:05:06Z'], + ]; } public function transformProvider() @@ -62,13 +62,13 @@ class DateTimeToRfc3339TransformerTest extends TestCase public function reverseTransformProvider() { - return array_merge($this->allProvider(), array( + return array_merge($this->allProvider(), [ // format without seconds, as appears in some browsers - array('UTC', 'UTC', '2010-02-03 04:05:00 UTC', '2010-02-03T04:05Z'), - array('America/New_York', 'Asia/Hong_Kong', '2010-02-03 04:05:00 America/New_York', '2010-02-03T17:05+08:00'), - array('Europe/Amsterdam', 'Europe/Amsterdam', '2013-08-21 10:30:00 Europe/Amsterdam', '2013-08-21T08:30:00Z'), - array('UTC', 'UTC', '2018-10-03T10:00:00.000Z', '2018-10-03T10:00:00.000Z'), - )); + ['UTC', 'UTC', '2010-02-03 04:05:00 UTC', '2010-02-03T04:05Z'], + ['America/New_York', 'Asia/Hong_Kong', '2010-02-03 04:05:00 America/New_York', '2010-02-03T17:05+08:00'], + ['Europe/Amsterdam', 'Europe/Amsterdam', '2013-08-21 10:30:00 Europe/Amsterdam', '2013-08-21T08:30:00Z'], + ['UTC', 'UTC', '2018-10-03T10:00:00.000Z', '2018-10-03T10:00:00.000Z'], + ]); } /** @@ -146,13 +146,13 @@ class DateTimeToRfc3339TransformerTest extends TestCase public function invalidDateStringProvider() { - return array( - 'invalid month' => array('2010-2010-01'), - 'invalid day' => array('2010-10-2010'), - 'no date' => array('x'), - 'cookie format' => array('Saturday, 01-May-2010 04:05:00 Z'), - 'RFC 822 format' => array('Sat, 01 May 10 04:05:00 +0000'), - 'RSS format' => array('Sat, 01 May 2010 04:05:00 +0000'), - ); + return [ + 'invalid month' => ['2010-2010-01'], + 'invalid day' => ['2010-10-2010'], + 'no date' => ['x'], + 'cookie format' => ['Saturday, 01-May-2010 04:05:00 Z'], + 'RFC 822 format' => ['Sat, 01 May 10 04:05:00 +0000'], + 'RSS format' => ['Sat, 01 May 2010 04:05:00 +0000'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToStringTransformerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToStringTransformerTest.php index c4d04e0e..87587bda 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToStringTransformerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToStringTransformerTest.php @@ -18,50 +18,50 @@ class DateTimeToStringTransformerTest extends TestCase { public function dataProvider() { - $data = array( - array('Y-m-d H:i:s', '2010-02-03 16:05:06', '2010-02-03 16:05:06 UTC'), - array('Y-m-d H:i:00', '2010-02-03 16:05:00', '2010-02-03 16:05:00 UTC'), - array('Y-m-d H:i', '2010-02-03 16:05', '2010-02-03 16:05:00 UTC'), - array('Y-m-d H', '2010-02-03 16', '2010-02-03 16:00:00 UTC'), - array('Y-m-d', '2010-02-03', '2010-02-03 00:00:00 UTC'), - array('Y-m', '2010-12', '2010-12-01 00:00:00 UTC'), - array('Y', '2010', '2010-01-01 00:00:00 UTC'), - array('d-m-Y', '03-02-2010', '2010-02-03 00:00:00 UTC'), - array('H:i:s', '16:05:06', '1970-01-01 16:05:06 UTC'), - array('H:i:00', '16:05:00', '1970-01-01 16:05:00 UTC'), - array('H:i', '16:05', '1970-01-01 16:05:00 UTC'), - array('H', '16', '1970-01-01 16:00:00 UTC'), - array('Y-z', '2010-33', '2010-02-03 00:00:00 UTC'), + $data = [ + ['Y-m-d H:i:s', '2010-02-03 16:05:06', '2010-02-03 16:05:06 UTC'], + ['Y-m-d H:i:00', '2010-02-03 16:05:00', '2010-02-03 16:05:00 UTC'], + ['Y-m-d H:i', '2010-02-03 16:05', '2010-02-03 16:05:00 UTC'], + ['Y-m-d H', '2010-02-03 16', '2010-02-03 16:00:00 UTC'], + ['Y-m-d', '2010-02-03', '2010-02-03 00:00:00 UTC'], + ['Y-m', '2010-12', '2010-12-01 00:00:00 UTC'], + ['Y', '2010', '2010-01-01 00:00:00 UTC'], + ['d-m-Y', '03-02-2010', '2010-02-03 00:00:00 UTC'], + ['H:i:s', '16:05:06', '1970-01-01 16:05:06 UTC'], + ['H:i:00', '16:05:00', '1970-01-01 16:05:00 UTC'], + ['H:i', '16:05', '1970-01-01 16:05:00 UTC'], + ['H', '16', '1970-01-01 16:00:00 UTC'], + ['Y-z', '2010-33', '2010-02-03 00:00:00 UTC'], // different day representations - array('Y-m-j', '2010-02-3', '2010-02-03 00:00:00 UTC'), - array('z', '33', '1970-02-03 00:00:00 UTC'), + ['Y-m-j', '2010-02-3', '2010-02-03 00:00:00 UTC'], + ['z', '33', '1970-02-03 00:00:00 UTC'], // not bijective // this will not work as PHP will use actual date to replace missing info // and after change of date will lookup for closest Wednesday // i.e. value: 2010-02, PHP value: 2010-02-(today i.e. 20), parsed date: 2010-02-24 - //array('Y-m-D', '2010-02-Wed', '2010-02-03 00:00:00 UTC'), - //array('Y-m-l', '2010-02-Wednesday', '2010-02-03 00:00:00 UTC'), + //['Y-m-D', '2010-02-Wed', '2010-02-03 00:00:00 UTC'], + //['Y-m-l', '2010-02-Wednesday', '2010-02-03 00:00:00 UTC'], // different month representations - array('Y-n-d', '2010-2-03', '2010-02-03 00:00:00 UTC'), - array('Y-M-d', '2010-Feb-03', '2010-02-03 00:00:00 UTC'), - array('Y-F-d', '2010-February-03', '2010-02-03 00:00:00 UTC'), + ['Y-n-d', '2010-2-03', '2010-02-03 00:00:00 UTC'], + ['Y-M-d', '2010-Feb-03', '2010-02-03 00:00:00 UTC'], + ['Y-F-d', '2010-February-03', '2010-02-03 00:00:00 UTC'], // different year representations - array('y-m-d', '10-02-03', '2010-02-03 00:00:00 UTC'), + ['y-m-d', '10-02-03', '2010-02-03 00:00:00 UTC'], // different time representations - array('G:i:s', '16:05:06', '1970-01-01 16:05:06 UTC'), - array('g:i:s a', '4:05:06 pm', '1970-01-01 16:05:06 UTC'), - array('h:i:s a', '04:05:06 pm', '1970-01-01 16:05:06 UTC'), + ['G:i:s', '16:05:06', '1970-01-01 16:05:06 UTC'], + ['g:i:s a', '4:05:06 pm', '1970-01-01 16:05:06 UTC'], + ['h:i:s a', '04:05:06 pm', '1970-01-01 16:05:06 UTC'], // seconds since Unix - array('U', '1265213106', '2010-02-03 16:05:06 UTC'), + ['U', '1265213106', '2010-02-03 16:05:06 UTC'], - array('Y-z', '2010-33', '2010-02-03 00:00:00 UTC'), - ); + ['Y-z', '2010-33', '2010-02-03 00:00:00 UTC'], + ]; return $data; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeZoneToStringTransformerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeZoneToStringTransformerTest.php index e6560d75..6aefe3ca 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeZoneToStringTransformerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeZoneToStringTransformerTest.php @@ -34,8 +34,8 @@ class DateTimeZoneToStringTransformerTest extends TestCase $this->assertNull($transformer->transform(null)); $this->assertNull($transformer->reverseTransform(null)); - $this->assertSame(array('Europe/Amsterdam'), $transformer->transform(array(new \DateTimeZone('Europe/Amsterdam')))); - $this->assertEquals(array(new \DateTimeZone('Europe/Amsterdam')), $transformer->reverseTransform(array('Europe/Amsterdam'))); + $this->assertSame(['Europe/Amsterdam'], $transformer->transform([new \DateTimeZone('Europe/Amsterdam')])); + $this->assertEquals([new \DateTimeZone('Europe/Amsterdam')], $transformer->reverseTransform(['Europe/Amsterdam'])); } /** @@ -51,6 +51,6 @@ class DateTimeZoneToStringTransformerTest extends TestCase */ public function testUnknownTimezone() { - (new DateTimeZoneToStringTransformer(true))->reverseTransform(array('Foo/Bar')); + (new DateTimeZoneToStringTransformer(true))->reverseTransform(['Foo/Bar']); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php index fe1f7d31..8cdbb195 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php @@ -26,53 +26,53 @@ class IntegerToLocalizedStringTransformerTest extends TestCase public function transformWithRoundingProvider() { - return array( + return [ // towards positive infinity (1.6 -> 2, -1.6 -> -1) - array(1234.5, '1235', IntegerToLocalizedStringTransformer::ROUND_CEILING), - array(1234.4, '1235', IntegerToLocalizedStringTransformer::ROUND_CEILING), - array(-1234.5, '-1234', IntegerToLocalizedStringTransformer::ROUND_CEILING), - array(-1234.4, '-1234', IntegerToLocalizedStringTransformer::ROUND_CEILING), + [1234.5, '1235', IntegerToLocalizedStringTransformer::ROUND_CEILING], + [1234.4, '1235', IntegerToLocalizedStringTransformer::ROUND_CEILING], + [-1234.5, '-1234', IntegerToLocalizedStringTransformer::ROUND_CEILING], + [-1234.4, '-1234', IntegerToLocalizedStringTransformer::ROUND_CEILING], // towards negative infinity (1.6 -> 1, -1.6 -> -2) - array(1234.5, '1234', IntegerToLocalizedStringTransformer::ROUND_FLOOR), - array(1234.4, '1234', IntegerToLocalizedStringTransformer::ROUND_FLOOR), - array(-1234.5, '-1235', IntegerToLocalizedStringTransformer::ROUND_FLOOR), - array(-1234.4, '-1235', IntegerToLocalizedStringTransformer::ROUND_FLOOR), + [1234.5, '1234', IntegerToLocalizedStringTransformer::ROUND_FLOOR], + [1234.4, '1234', IntegerToLocalizedStringTransformer::ROUND_FLOOR], + [-1234.5, '-1235', IntegerToLocalizedStringTransformer::ROUND_FLOOR], + [-1234.4, '-1235', IntegerToLocalizedStringTransformer::ROUND_FLOOR], // away from zero (1.6 -> 2, -1.6 -> 2) - array(1234.5, '1235', IntegerToLocalizedStringTransformer::ROUND_UP), - array(1234.4, '1235', IntegerToLocalizedStringTransformer::ROUND_UP), - array(-1234.5, '-1235', IntegerToLocalizedStringTransformer::ROUND_UP), - array(-1234.4, '-1235', IntegerToLocalizedStringTransformer::ROUND_UP), + [1234.5, '1235', IntegerToLocalizedStringTransformer::ROUND_UP], + [1234.4, '1235', IntegerToLocalizedStringTransformer::ROUND_UP], + [-1234.5, '-1235', IntegerToLocalizedStringTransformer::ROUND_UP], + [-1234.4, '-1235', IntegerToLocalizedStringTransformer::ROUND_UP], // towards zero (1.6 -> 1, -1.6 -> -1) - array(1234.5, '1234', IntegerToLocalizedStringTransformer::ROUND_DOWN), - array(1234.4, '1234', IntegerToLocalizedStringTransformer::ROUND_DOWN), - array(-1234.5, '-1234', IntegerToLocalizedStringTransformer::ROUND_DOWN), - array(-1234.4, '-1234', IntegerToLocalizedStringTransformer::ROUND_DOWN), + [1234.5, '1234', IntegerToLocalizedStringTransformer::ROUND_DOWN], + [1234.4, '1234', IntegerToLocalizedStringTransformer::ROUND_DOWN], + [-1234.5, '-1234', IntegerToLocalizedStringTransformer::ROUND_DOWN], + [-1234.4, '-1234', IntegerToLocalizedStringTransformer::ROUND_DOWN], // round halves (.5) to the next even number - array(1234.6, '1235', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1234.5, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1234.4, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1233.5, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1232.5, '1232', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(-1234.6, '-1235', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(-1234.5, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(-1234.4, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(-1233.5, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(-1232.5, '-1232', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + [1234.6, '1235', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1234.5, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1234.4, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1233.5, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1232.5, '1232', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + [-1234.6, '-1235', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + [-1234.5, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + [-1234.4, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + [-1233.5, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + [-1232.5, '-1232', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], // round halves (.5) away from zero - array(1234.6, '1235', IntegerToLocalizedStringTransformer::ROUND_HALF_UP), - array(1234.5, '1235', IntegerToLocalizedStringTransformer::ROUND_HALF_UP), - array(1234.4, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_UP), - array(-1234.6, '-1235', IntegerToLocalizedStringTransformer::ROUND_HALF_UP), - array(-1234.5, '-1235', IntegerToLocalizedStringTransformer::ROUND_HALF_UP), - array(-1234.4, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_UP), + [1234.6, '1235', IntegerToLocalizedStringTransformer::ROUND_HALF_UP], + [1234.5, '1235', IntegerToLocalizedStringTransformer::ROUND_HALF_UP], + [1234.4, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_UP], + [-1234.6, '-1235', IntegerToLocalizedStringTransformer::ROUND_HALF_UP], + [-1234.5, '-1235', IntegerToLocalizedStringTransformer::ROUND_HALF_UP], + [-1234.4, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_UP], // round halves (.5) towards zero - array(1234.6, '1235', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(1234.5, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(1234.4, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(-1234.6, '-1235', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(-1234.5, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(-1234.4, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), - ); + [1234.6, '1235', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN], + [1234.5, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN], + [1234.4, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN], + [-1234.6, '-1235', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN], + [-1234.5, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN], + [-1234.4, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN], + ]; } /** @@ -95,9 +95,7 @@ class IntegerToLocalizedStringTransformerTest extends TestCase $transformer = new IntegerToLocalizedStringTransformer(); $this->assertEquals(1, $transformer->reverseTransform('1')); - $this->assertEquals(1, $transformer->reverseTransform('1,5')); - $this->assertEquals(1234, $transformer->reverseTransform('1234,5')); - $this->assertEquals(12345, $transformer->reverseTransform('12345,912')); + $this->assertEquals(12345, $transformer->reverseTransform('12345')); } public function testReverseTransformEmpty() @@ -116,61 +114,61 @@ class IntegerToLocalizedStringTransformerTest extends TestCase $transformer = new IntegerToLocalizedStringTransformer(null, true); - $this->assertEquals(1234, $transformer->reverseTransform('1.234,5')); - $this->assertEquals(12345, $transformer->reverseTransform('12.345,912')); - $this->assertEquals(1234, $transformer->reverseTransform('1234,5')); - $this->assertEquals(12345, $transformer->reverseTransform('12345,912')); + $this->assertEquals(1234, $transformer->reverseTransform('1.234')); + $this->assertEquals(12345, $transformer->reverseTransform('12.345')); + $this->assertEquals(1234, $transformer->reverseTransform('1234')); + $this->assertEquals(12345, $transformer->reverseTransform('12345')); } public function reverseTransformWithRoundingProvider() { - return array( + return [ // towards positive infinity (1.6 -> 2, -1.6 -> -1) - array('1234,5', 1235, IntegerToLocalizedStringTransformer::ROUND_CEILING), - array('1234,4', 1235, IntegerToLocalizedStringTransformer::ROUND_CEILING), - array('-1234,5', -1234, IntegerToLocalizedStringTransformer::ROUND_CEILING), - array('-1234,4', -1234, IntegerToLocalizedStringTransformer::ROUND_CEILING), + ['1234,5', 1235, IntegerToLocalizedStringTransformer::ROUND_CEILING], + ['1234,4', 1235, IntegerToLocalizedStringTransformer::ROUND_CEILING], + ['-1234,5', -1234, IntegerToLocalizedStringTransformer::ROUND_CEILING], + ['-1234,4', -1234, IntegerToLocalizedStringTransformer::ROUND_CEILING], // towards negative infinity (1.6 -> 1, -1.6 -> -2) - array('1234,5', 1234, IntegerToLocalizedStringTransformer::ROUND_FLOOR), - array('1234,4', 1234, IntegerToLocalizedStringTransformer::ROUND_FLOOR), - array('-1234,5', -1235, IntegerToLocalizedStringTransformer::ROUND_FLOOR), - array('-1234,4', -1235, IntegerToLocalizedStringTransformer::ROUND_FLOOR), + ['1234,5', 1234, IntegerToLocalizedStringTransformer::ROUND_FLOOR], + ['1234,4', 1234, IntegerToLocalizedStringTransformer::ROUND_FLOOR], + ['-1234,5', -1235, IntegerToLocalizedStringTransformer::ROUND_FLOOR], + ['-1234,4', -1235, IntegerToLocalizedStringTransformer::ROUND_FLOOR], // away from zero (1.6 -> 2, -1.6 -> 2) - array('1234,5', 1235, IntegerToLocalizedStringTransformer::ROUND_UP), - array('1234,4', 1235, IntegerToLocalizedStringTransformer::ROUND_UP), - array('-1234,5', -1235, IntegerToLocalizedStringTransformer::ROUND_UP), - array('-1234,4', -1235, IntegerToLocalizedStringTransformer::ROUND_UP), + ['1234,5', 1235, IntegerToLocalizedStringTransformer::ROUND_UP], + ['1234,4', 1235, IntegerToLocalizedStringTransformer::ROUND_UP], + ['-1234,5', -1235, IntegerToLocalizedStringTransformer::ROUND_UP], + ['-1234,4', -1235, IntegerToLocalizedStringTransformer::ROUND_UP], // towards zero (1.6 -> 1, -1.6 -> -1) - array('1234,5', 1234, IntegerToLocalizedStringTransformer::ROUND_DOWN), - array('1234,4', 1234, IntegerToLocalizedStringTransformer::ROUND_DOWN), - array('-1234,5', -1234, IntegerToLocalizedStringTransformer::ROUND_DOWN), - array('-1234,4', -1234, IntegerToLocalizedStringTransformer::ROUND_DOWN), + ['1234,5', 1234, IntegerToLocalizedStringTransformer::ROUND_DOWN], + ['1234,4', 1234, IntegerToLocalizedStringTransformer::ROUND_DOWN], + ['-1234,5', -1234, IntegerToLocalizedStringTransformer::ROUND_DOWN], + ['-1234,4', -1234, IntegerToLocalizedStringTransformer::ROUND_DOWN], // round halves (.5) to the next even number - array('1234,6', 1235, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array('1234,5', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array('1234,4', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array('1233,5', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array('1232,5', 1232, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array('-1234,6', -1235, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array('-1234,5', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array('-1234,4', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array('-1233,5', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), - array('-1232,5', -1232, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + ['1234,6', 1235, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + ['1234,5', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + ['1234,4', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + ['1233,5', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + ['1232,5', 1232, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + ['-1234,6', -1235, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + ['-1234,5', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + ['-1234,4', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + ['-1233,5', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], + ['-1232,5', -1232, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN], // round halves (.5) away from zero - array('1234,6', 1235, IntegerToLocalizedStringTransformer::ROUND_HALF_UP), - array('1234,5', 1235, IntegerToLocalizedStringTransformer::ROUND_HALF_UP), - array('1234,4', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_UP), - array('-1234,6', -1235, IntegerToLocalizedStringTransformer::ROUND_HALF_UP), - array('-1234,5', -1235, IntegerToLocalizedStringTransformer::ROUND_HALF_UP), - array('-1234,4', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_UP), + ['1234,6', 1235, IntegerToLocalizedStringTransformer::ROUND_HALF_UP], + ['1234,5', 1235, IntegerToLocalizedStringTransformer::ROUND_HALF_UP], + ['1234,4', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_UP], + ['-1234,6', -1235, IntegerToLocalizedStringTransformer::ROUND_HALF_UP], + ['-1234,5', -1235, IntegerToLocalizedStringTransformer::ROUND_HALF_UP], + ['-1234,4', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_UP], // round halves (.5) towards zero - array('1234,6', 1235, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), - array('1234,5', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), - array('1234,4', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), - array('-1234,6', -1235, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), - array('-1234,5', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), - array('-1234,4', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), - ); + ['1234,6', 1235, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN], + ['1234,5', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN], + ['1234,4', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN], + ['-1234,6', -1235, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN], + ['-1234,5', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN], + ['-1234,4', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN], + ]; } /** @@ -203,6 +201,29 @@ class IntegerToLocalizedStringTransformerTest extends TestCase $transformer->reverseTransform('foo'); } + /** + * @dataProvider floatNumberProvider + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformExpectsInteger($number, $locale) + { + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault($locale); + + $transformer = new IntegerToLocalizedStringTransformer(); + + $transformer->reverseTransform($number); + } + + public function floatNumberProvider() + { + return [ + ['12345.912', 'en'], + ['1.234,5', 'de_DE'], + ]; + } + /** * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException */ diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php index d9fafdff..c5bffe4d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php @@ -17,6 +17,18 @@ use Symfony\Component\Intl\Util\IntlTestHelper; class MoneyToLocalizedStringTransformerTest extends TestCase { + private $previousLocale; + + protected function setUp() + { + $this->previousLocale = setlocale(LC_ALL, '0'); + } + + protected function tearDown() + { + setlocale(LC_ALL, $this->previousLocale); + } + public function testTransform() { // Since we test against "de_AT", we need the full implementation @@ -73,7 +85,7 @@ class MoneyToLocalizedStringTransformerTest extends TestCase $this->assertNull($transformer->reverseTransform('')); } - public function testFloatToIntConversionMismatchOnReversTransform() + public function testFloatToIntConversionMismatchOnReverseTransform() { $transformer = new MoneyToLocalizedStringTransformer(null, null, null, 100); IntlTestHelper::requireFullIntl($this, false); @@ -90,4 +102,16 @@ class MoneyToLocalizedStringTransformerTest extends TestCase $this->assertSame('10,20', $transformer->transform(1020)); } + + public function testValidNumericValuesWithNonDotDecimalPointCharacter() + { + // calling setlocale() here is important as it changes the representation of floats when being cast to strings + setlocale(LC_ALL, 'de_AT.UTF-8'); + + $transformer = new MoneyToLocalizedStringTransformer(4, null, null, 100); + IntlTestHelper::requireFullIntl($this, false); + \Locale::setDefault('de_AT'); + + $this->assertSame('0,0035', $transformer->transform(12 / 34)); + } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php index d6a46621..1f05af61 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php @@ -26,15 +26,15 @@ class NumberToLocalizedStringTransformerTest extends TestCase public function provideTransformations() { - return array( - array(null, '', 'de_AT'), - array(1, '1', 'de_AT'), - array(1.5, '1,5', 'de_AT'), - array(1234.5, '1234,5', 'de_AT'), - array(12345.912, '12345,912', 'de_AT'), - array(1234.5, '1234,5', 'ru'), - array(1234.5, '1234,5', 'fi'), - ); + return [ + [null, '', 'de_AT'], + [1, '1', 'de_AT'], + [1.5, '1,5', 'de_AT'], + [1234.5, '1234,5', 'de_AT'], + [12345.912, '12345,912', 'de_AT'], + [1234.5, '1234,5', 'ru'], + [1234.5, '1234,5', 'fi'], + ]; } /** @@ -54,13 +54,13 @@ class NumberToLocalizedStringTransformerTest extends TestCase public function provideTransformationsWithGrouping() { - return array( - array(1234.5, '1.234,5', 'de_DE'), - array(12345.912, '12.345,912', 'de_DE'), - array(1234.5, '1 234,5', 'fr'), - array(1234.5, '1 234,5', 'ru'), - array(1234.5, '1 234,5', 'fi'), - ); + return [ + [1234.5, '1.234,5', 'de_DE'], + [12345.912, '12.345,912', 'de_DE'], + [1234.5, '1 234,5', 'fr'], + [1234.5, '1 234,5', 'ru'], + [1234.5, '1 234,5', 'fi'], + ]; } /** @@ -93,91 +93,91 @@ class NumberToLocalizedStringTransformerTest extends TestCase public function transformWithRoundingProvider() { - return array( + return [ // towards positive infinity (1.6 -> 2, -1.6 -> -1) - array(0, 1234.5, '1235', NumberToLocalizedStringTransformer::ROUND_CEILING), - array(0, 1234.4, '1235', NumberToLocalizedStringTransformer::ROUND_CEILING), - array(0, -1234.5, '-1234', NumberToLocalizedStringTransformer::ROUND_CEILING), - array(0, -1234.4, '-1234', NumberToLocalizedStringTransformer::ROUND_CEILING), - array(1, 123.45, '123,5', NumberToLocalizedStringTransformer::ROUND_CEILING), - array(1, 123.44, '123,5', NumberToLocalizedStringTransformer::ROUND_CEILING), - array(1, -123.45, '-123,4', NumberToLocalizedStringTransformer::ROUND_CEILING), - array(1, -123.44, '-123,4', NumberToLocalizedStringTransformer::ROUND_CEILING), + [0, 1234.5, '1235', NumberToLocalizedStringTransformer::ROUND_CEILING], + [0, 1234.4, '1235', NumberToLocalizedStringTransformer::ROUND_CEILING], + [0, -1234.5, '-1234', NumberToLocalizedStringTransformer::ROUND_CEILING], + [0, -1234.4, '-1234', NumberToLocalizedStringTransformer::ROUND_CEILING], + [1, 123.45, '123,5', NumberToLocalizedStringTransformer::ROUND_CEILING], + [1, 123.44, '123,5', NumberToLocalizedStringTransformer::ROUND_CEILING], + [1, -123.45, '-123,4', NumberToLocalizedStringTransformer::ROUND_CEILING], + [1, -123.44, '-123,4', NumberToLocalizedStringTransformer::ROUND_CEILING], // towards negative infinity (1.6 -> 1, -1.6 -> -2) - array(0, 1234.5, '1234', NumberToLocalizedStringTransformer::ROUND_FLOOR), - array(0, 1234.4, '1234', NumberToLocalizedStringTransformer::ROUND_FLOOR), - array(0, -1234.5, '-1235', NumberToLocalizedStringTransformer::ROUND_FLOOR), - array(0, -1234.4, '-1235', NumberToLocalizedStringTransformer::ROUND_FLOOR), - array(1, 123.45, '123,4', NumberToLocalizedStringTransformer::ROUND_FLOOR), - array(1, 123.44, '123,4', NumberToLocalizedStringTransformer::ROUND_FLOOR), - array(1, -123.45, '-123,5', NumberToLocalizedStringTransformer::ROUND_FLOOR), - array(1, -123.44, '-123,5', NumberToLocalizedStringTransformer::ROUND_FLOOR), + [0, 1234.5, '1234', NumberToLocalizedStringTransformer::ROUND_FLOOR], + [0, 1234.4, '1234', NumberToLocalizedStringTransformer::ROUND_FLOOR], + [0, -1234.5, '-1235', NumberToLocalizedStringTransformer::ROUND_FLOOR], + [0, -1234.4, '-1235', NumberToLocalizedStringTransformer::ROUND_FLOOR], + [1, 123.45, '123,4', NumberToLocalizedStringTransformer::ROUND_FLOOR], + [1, 123.44, '123,4', NumberToLocalizedStringTransformer::ROUND_FLOOR], + [1, -123.45, '-123,5', NumberToLocalizedStringTransformer::ROUND_FLOOR], + [1, -123.44, '-123,5', NumberToLocalizedStringTransformer::ROUND_FLOOR], // away from zero (1.6 -> 2, -1.6 -> 2) - array(0, 1234.5, '1235', NumberToLocalizedStringTransformer::ROUND_UP), - array(0, 1234.4, '1235', NumberToLocalizedStringTransformer::ROUND_UP), - array(0, -1234.5, '-1235', NumberToLocalizedStringTransformer::ROUND_UP), - array(0, -1234.4, '-1235', NumberToLocalizedStringTransformer::ROUND_UP), - array(1, 123.45, '123,5', NumberToLocalizedStringTransformer::ROUND_UP), - array(1, 123.44, '123,5', NumberToLocalizedStringTransformer::ROUND_UP), - array(1, -123.45, '-123,5', NumberToLocalizedStringTransformer::ROUND_UP), - array(1, -123.44, '-123,5', NumberToLocalizedStringTransformer::ROUND_UP), + [0, 1234.5, '1235', NumberToLocalizedStringTransformer::ROUND_UP], + [0, 1234.4, '1235', NumberToLocalizedStringTransformer::ROUND_UP], + [0, -1234.5, '-1235', NumberToLocalizedStringTransformer::ROUND_UP], + [0, -1234.4, '-1235', NumberToLocalizedStringTransformer::ROUND_UP], + [1, 123.45, '123,5', NumberToLocalizedStringTransformer::ROUND_UP], + [1, 123.44, '123,5', NumberToLocalizedStringTransformer::ROUND_UP], + [1, -123.45, '-123,5', NumberToLocalizedStringTransformer::ROUND_UP], + [1, -123.44, '-123,5', NumberToLocalizedStringTransformer::ROUND_UP], // towards zero (1.6 -> 1, -1.6 -> -1) - array(0, 1234.5, '1234', NumberToLocalizedStringTransformer::ROUND_DOWN), - array(0, 1234.4, '1234', NumberToLocalizedStringTransformer::ROUND_DOWN), - array(0, -1234.5, '-1234', NumberToLocalizedStringTransformer::ROUND_DOWN), - array(0, -1234.4, '-1234', NumberToLocalizedStringTransformer::ROUND_DOWN), - array(1, 123.45, '123,4', NumberToLocalizedStringTransformer::ROUND_DOWN), - array(1, 123.44, '123,4', NumberToLocalizedStringTransformer::ROUND_DOWN), - array(1, -123.45, '-123,4', NumberToLocalizedStringTransformer::ROUND_DOWN), - array(1, -123.44, '-123,4', NumberToLocalizedStringTransformer::ROUND_DOWN), + [0, 1234.5, '1234', NumberToLocalizedStringTransformer::ROUND_DOWN], + [0, 1234.4, '1234', NumberToLocalizedStringTransformer::ROUND_DOWN], + [0, -1234.5, '-1234', NumberToLocalizedStringTransformer::ROUND_DOWN], + [0, -1234.4, '-1234', NumberToLocalizedStringTransformer::ROUND_DOWN], + [1, 123.45, '123,4', NumberToLocalizedStringTransformer::ROUND_DOWN], + [1, 123.44, '123,4', NumberToLocalizedStringTransformer::ROUND_DOWN], + [1, -123.45, '-123,4', NumberToLocalizedStringTransformer::ROUND_DOWN], + [1, -123.44, '-123,4', NumberToLocalizedStringTransformer::ROUND_DOWN], // round halves (.5) to the next even number - array(0, 1234.6, '1235', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, 1234.5, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, 1234.4, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, 1233.5, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, 1232.5, '1232', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, -1234.6, '-1235', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, -1234.5, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, -1234.4, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, -1233.5, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, -1232.5, '-1232', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, 123.46, '123,5', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, 123.45, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, 123.44, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, 123.35, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, 123.25, '123,2', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, -123.46, '-123,5', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, -123.45, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, -123.44, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, -123.35, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, -123.25, '-123,2', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + [0, 1234.6, '1235', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, 1234.5, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, 1234.4, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, 1233.5, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, 1232.5, '1232', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, -1234.6, '-1235', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, -1234.5, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, -1234.4, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, -1233.5, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, -1232.5, '-1232', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, 123.46, '123,5', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, 123.45, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, 123.44, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, 123.35, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, 123.25, '123,2', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, -123.46, '-123,5', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, -123.45, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, -123.44, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, -123.35, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, -123.25, '-123,2', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], // round halves (.5) away from zero - array(0, 1234.6, '1235', NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(0, 1234.5, '1235', NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(0, 1234.4, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(0, -1234.6, '-1235', NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(0, -1234.5, '-1235', NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(0, -1234.4, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(1, 123.46, '123,5', NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(1, 123.45, '123,5', NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(1, 123.44, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(1, -123.46, '-123,5', NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(1, -123.45, '-123,5', NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(1, -123.44, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_UP), + [0, 1234.6, '1235', NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [0, 1234.5, '1235', NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [0, 1234.4, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [0, -1234.6, '-1235', NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [0, -1234.5, '-1235', NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [0, -1234.4, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [1, 123.46, '123,5', NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [1, 123.45, '123,5', NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [1, 123.44, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [1, -123.46, '-123,5', NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [1, -123.45, '-123,5', NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [1, -123.44, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_UP], // round halves (.5) towards zero - array(0, 1234.6, '1235', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(0, 1234.5, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(0, 1234.4, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(0, -1234.6, '-1235', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(0, -1234.5, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(0, -1234.4, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(1, 123.46, '123,5', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(1, 123.45, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(1, 123.44, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(1, -123.46, '-123,5', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(1, -123.45, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(1, -123.44, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - ); + [0, 1234.6, '1235', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [0, 1234.5, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [0, 1234.4, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [0, -1234.6, '-1235', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [0, -1234.5, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [0, -1234.4, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [1, 123.46, '123,5', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [1, 123.45, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [1, 123.44, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [1, -123.46, '-123,5', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [1, -123.45, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [1, -123.44, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + ]; } /** @@ -268,93 +268,93 @@ class NumberToLocalizedStringTransformerTest extends TestCase public function reverseTransformWithRoundingProvider() { - return array( + return [ // towards positive infinity (1.6 -> 2, -1.6 -> -1) - array(0, '1234,5', 1235, NumberToLocalizedStringTransformer::ROUND_CEILING), - array(0, '1234,4', 1235, NumberToLocalizedStringTransformer::ROUND_CEILING), - array(0, '-1234,5', -1234, NumberToLocalizedStringTransformer::ROUND_CEILING), - array(0, '-1234,4', -1234, NumberToLocalizedStringTransformer::ROUND_CEILING), - array(1, '123,45', 123.5, NumberToLocalizedStringTransformer::ROUND_CEILING), - array(1, '123,44', 123.5, NumberToLocalizedStringTransformer::ROUND_CEILING), - array(1, '-123,45', -123.4, NumberToLocalizedStringTransformer::ROUND_CEILING), - array(1, '-123,44', -123.4, NumberToLocalizedStringTransformer::ROUND_CEILING), + [0, '1234,5', 1235, NumberToLocalizedStringTransformer::ROUND_CEILING], + [0, '1234,4', 1235, NumberToLocalizedStringTransformer::ROUND_CEILING], + [0, '-1234,5', -1234, NumberToLocalizedStringTransformer::ROUND_CEILING], + [0, '-1234,4', -1234, NumberToLocalizedStringTransformer::ROUND_CEILING], + [1, '123,45', 123.5, NumberToLocalizedStringTransformer::ROUND_CEILING], + [1, '123,44', 123.5, NumberToLocalizedStringTransformer::ROUND_CEILING], + [1, '-123,45', -123.4, NumberToLocalizedStringTransformer::ROUND_CEILING], + [1, '-123,44', -123.4, NumberToLocalizedStringTransformer::ROUND_CEILING], // towards negative infinity (1.6 -> 1, -1.6 -> -2) - array(0, '1234,5', 1234, NumberToLocalizedStringTransformer::ROUND_FLOOR), - array(0, '1234,4', 1234, NumberToLocalizedStringTransformer::ROUND_FLOOR), - array(0, '-1234,5', -1235, NumberToLocalizedStringTransformer::ROUND_FLOOR), - array(0, '-1234,4', -1235, NumberToLocalizedStringTransformer::ROUND_FLOOR), - array(1, '123,45', 123.4, NumberToLocalizedStringTransformer::ROUND_FLOOR), - array(1, '123,44', 123.4, NumberToLocalizedStringTransformer::ROUND_FLOOR), - array(1, '-123,45', -123.5, NumberToLocalizedStringTransformer::ROUND_FLOOR), - array(1, '-123,44', -123.5, NumberToLocalizedStringTransformer::ROUND_FLOOR), + [0, '1234,5', 1234, NumberToLocalizedStringTransformer::ROUND_FLOOR], + [0, '1234,4', 1234, NumberToLocalizedStringTransformer::ROUND_FLOOR], + [0, '-1234,5', -1235, NumberToLocalizedStringTransformer::ROUND_FLOOR], + [0, '-1234,4', -1235, NumberToLocalizedStringTransformer::ROUND_FLOOR], + [1, '123,45', 123.4, NumberToLocalizedStringTransformer::ROUND_FLOOR], + [1, '123,44', 123.4, NumberToLocalizedStringTransformer::ROUND_FLOOR], + [1, '-123,45', -123.5, NumberToLocalizedStringTransformer::ROUND_FLOOR], + [1, '-123,44', -123.5, NumberToLocalizedStringTransformer::ROUND_FLOOR], // away from zero (1.6 -> 2, -1.6 -> 2) - array(0, '1234,5', 1235, NumberToLocalizedStringTransformer::ROUND_UP), - array(0, '1234,4', 1235, NumberToLocalizedStringTransformer::ROUND_UP), - array(0, '-1234,5', -1235, NumberToLocalizedStringTransformer::ROUND_UP), - array(0, '-1234,4', -1235, NumberToLocalizedStringTransformer::ROUND_UP), - array(1, '123,45', 123.5, NumberToLocalizedStringTransformer::ROUND_UP), - array(1, '123,44', 123.5, NumberToLocalizedStringTransformer::ROUND_UP), - array(1, '-123,45', -123.5, NumberToLocalizedStringTransformer::ROUND_UP), - array(1, '-123,44', -123.5, NumberToLocalizedStringTransformer::ROUND_UP), + [0, '1234,5', 1235, NumberToLocalizedStringTransformer::ROUND_UP], + [0, '1234,4', 1235, NumberToLocalizedStringTransformer::ROUND_UP], + [0, '-1234,5', -1235, NumberToLocalizedStringTransformer::ROUND_UP], + [0, '-1234,4', -1235, NumberToLocalizedStringTransformer::ROUND_UP], + [1, '123,45', 123.5, NumberToLocalizedStringTransformer::ROUND_UP], + [1, '123,44', 123.5, NumberToLocalizedStringTransformer::ROUND_UP], + [1, '-123,45', -123.5, NumberToLocalizedStringTransformer::ROUND_UP], + [1, '-123,44', -123.5, NumberToLocalizedStringTransformer::ROUND_UP], // towards zero (1.6 -> 1, -1.6 -> -1) - array(0, '1234,5', 1234, NumberToLocalizedStringTransformer::ROUND_DOWN), - array(0, '1234,4', 1234, NumberToLocalizedStringTransformer::ROUND_DOWN), - array(0, '-1234,5', -1234, NumberToLocalizedStringTransformer::ROUND_DOWN), - array(0, '-1234,4', -1234, NumberToLocalizedStringTransformer::ROUND_DOWN), - array(1, '123,45', 123.4, NumberToLocalizedStringTransformer::ROUND_DOWN), - array(1, '123,44', 123.4, NumberToLocalizedStringTransformer::ROUND_DOWN), - array(1, '-123,45', -123.4, NumberToLocalizedStringTransformer::ROUND_DOWN), - array(1, '-123,44', -123.4, NumberToLocalizedStringTransformer::ROUND_DOWN), - array(2, '37.37', 37.37, NumberToLocalizedStringTransformer::ROUND_DOWN), - array(2, '2.01', 2.01, NumberToLocalizedStringTransformer::ROUND_DOWN), + [0, '1234,5', 1234, NumberToLocalizedStringTransformer::ROUND_DOWN], + [0, '1234,4', 1234, NumberToLocalizedStringTransformer::ROUND_DOWN], + [0, '-1234,5', -1234, NumberToLocalizedStringTransformer::ROUND_DOWN], + [0, '-1234,4', -1234, NumberToLocalizedStringTransformer::ROUND_DOWN], + [1, '123,45', 123.4, NumberToLocalizedStringTransformer::ROUND_DOWN], + [1, '123,44', 123.4, NumberToLocalizedStringTransformer::ROUND_DOWN], + [1, '-123,45', -123.4, NumberToLocalizedStringTransformer::ROUND_DOWN], + [1, '-123,44', -123.4, NumberToLocalizedStringTransformer::ROUND_DOWN], + [2, '37.37', 37.37, NumberToLocalizedStringTransformer::ROUND_DOWN], + [2, '2.01', 2.01, NumberToLocalizedStringTransformer::ROUND_DOWN], // round halves (.5) to the next even number - array(0, '1234,6', 1235, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, '1234,5', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, '1234,4', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, '1233,5', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, '1232,5', 1232, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, '-1234,6', -1235, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, '-1234,5', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, '-1234,4', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, '-1233,5', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(0, '-1232,5', -1232, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, '123,46', 123.5, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, '123,45', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, '123,44', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, '123,35', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, '123,25', 123.2, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, '-123,46', -123.5, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, '-123,45', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, '-123,44', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, '-123,35', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), - array(1, '-123,25', -123.2, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + [0, '1234,6', 1235, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, '1234,5', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, '1234,4', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, '1233,5', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, '1232,5', 1232, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, '-1234,6', -1235, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, '-1234,5', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, '-1234,4', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, '-1233,5', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [0, '-1232,5', -1232, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, '123,46', 123.5, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, '123,45', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, '123,44', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, '123,35', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, '123,25', 123.2, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, '-123,46', -123.5, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, '-123,45', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, '-123,44', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, '-123,35', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], + [1, '-123,25', -123.2, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN], // round halves (.5) away from zero - array(0, '1234,6', 1235, NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(0, '1234,5', 1235, NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(0, '1234,4', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(0, '-1234,6', -1235, NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(0, '-1234,5', -1235, NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(0, '-1234,4', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(1, '123,46', 123.5, NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(1, '123,45', 123.5, NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(1, '123,44', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(1, '-123,46', -123.5, NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(1, '-123,45', -123.5, NumberToLocalizedStringTransformer::ROUND_HALF_UP), - array(1, '-123,44', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_UP), + [0, '1234,6', 1235, NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [0, '1234,5', 1235, NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [0, '1234,4', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [0, '-1234,6', -1235, NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [0, '-1234,5', -1235, NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [0, '-1234,4', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [1, '123,46', 123.5, NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [1, '123,45', 123.5, NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [1, '123,44', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [1, '-123,46', -123.5, NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [1, '-123,45', -123.5, NumberToLocalizedStringTransformer::ROUND_HALF_UP], + [1, '-123,44', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_UP], // round halves (.5) towards zero - array(0, '1234,6', 1235, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(0, '1234,5', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(0, '1234,4', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(0, '-1234,6', -1235, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(0, '-1234,5', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(0, '-1234,4', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(1, '123,46', 123.5, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(1, '123,45', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(1, '123,44', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(1, '-123,46', -123.5, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(1, '-123,45', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - array(1, '-123,44', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), - ); + [0, '1234,6', 1235, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [0, '1234,5', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [0, '1234,4', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [0, '-1234,6', -1235, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [0, '-1234,5', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [0, '-1234,4', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [1, '123,46', 123.5, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [1, '123,45', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [1, '123,44', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [1, '-123,46', -123.5, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [1, '-123,45', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + [1, '-123,44', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN], + ]; } /** @@ -514,24 +514,24 @@ class NumberToLocalizedStringTransformerTest extends TestCase /** * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + * @dataProvider nanRepresentationProvider * * @see https://github.com/symfony/symfony/issues/3161 */ - public function testReverseTransformDisallowsNaN() + public function testReverseTransformDisallowsNaN($nan) { $transformer = new NumberToLocalizedStringTransformer(); - $transformer->reverseTransform('NaN'); + $transformer->reverseTransform($nan); } - /** - * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException - */ - public function testReverseTransformDisallowsNaN2() + public function nanRepresentationProvider() { - $transformer = new NumberToLocalizedStringTransformer(); - - $transformer->reverseTransform('nan'); + return [ + ['nan'], + ['NaN'], // see https://github.com/symfony/symfony/issues/3161 + ['NAN'], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php index 3467e891..c6007a39 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php @@ -226,8 +226,8 @@ class PercentToLocalizedStringTransformerTest extends TestCase $formatter->setAttribute(\NumberFormatter::GROUPING_USED, false); $transformer = $this->getMockBuilder('Symfony\Component\Form\Extension\Core\DataTransformer\PercentToLocalizedStringTransformer') - ->setMethods(array('getNumberFormatter')) - ->setConstructorArgs(array(1, 'integer')) + ->setMethods(['getNumberFormatter']) + ->setConstructorArgs([1, 'integer']) ->getMock(); $transformer->expects($this->any()) ->method('getNumberFormatter') diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php index 5c1d5626..3ef681da 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php @@ -20,7 +20,7 @@ class ValueToDuplicatesTransformerTest extends TestCase protected function setUp() { - $this->transformer = new ValueToDuplicatesTransformer(array('a', 'b', 'c')); + $this->transformer = new ValueToDuplicatesTransformer(['a', 'b', 'c']); } protected function tearDown() @@ -30,77 +30,77 @@ class ValueToDuplicatesTransformerTest extends TestCase public function testTransform() { - $output = array( + $output = [ 'a' => 'Foo', 'b' => 'Foo', 'c' => 'Foo', - ); + ]; $this->assertSame($output, $this->transformer->transform('Foo')); } public function testTransformEmpty() { - $output = array( + $output = [ 'a' => null, 'b' => null, 'c' => null, - ); + ]; $this->assertSame($output, $this->transformer->transform(null)); } public function testReverseTransform() { - $input = array( + $input = [ 'a' => 'Foo', 'b' => 'Foo', 'c' => 'Foo', - ); + ]; $this->assertSame('Foo', $this->transformer->reverseTransform($input)); } public function testReverseTransformCompletelyEmpty() { - $input = array( + $input = [ 'a' => '', 'b' => '', 'c' => '', - ); + ]; $this->assertNull($this->transformer->reverseTransform($input)); } public function testReverseTransformCompletelyNull() { - $input = array( + $input = [ 'a' => null, 'b' => null, 'c' => null, - ); + ]; $this->assertNull($this->transformer->reverseTransform($input)); } public function testReverseTransformEmptyArray() { - $input = array( - 'a' => array(), - 'b' => array(), - 'c' => array(), - ); + $input = [ + 'a' => [], + 'b' => [], + 'c' => [], + ]; $this->assertNull($this->transformer->reverseTransform($input)); } public function testReverseTransformZeroString() { - $input = array( + $input = [ 'a' => '0', 'b' => '0', 'c' => '0', - ); + ]; $this->assertSame('0', $this->transformer->reverseTransform($input)); } @@ -110,11 +110,11 @@ class ValueToDuplicatesTransformerTest extends TestCase */ public function testReverseTransformPartiallyNull() { - $input = array( + $input = [ 'a' => 'Foo', 'b' => 'Foo', 'c' => null, - ); + ]; $this->transformer->reverseTransform($input); } @@ -124,11 +124,11 @@ class ValueToDuplicatesTransformerTest extends TestCase */ public function testReverseTransformDifferences() { - $input = array( + $input = [ 'a' => 'Foo', 'b' => 'Bar', 'c' => 'Foo', - ); + ]; $this->transformer->reverseTransform($input); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php index 454aaa85..e00cb9e9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php @@ -12,7 +12,10 @@ namespace Symfony\Component\Form\Tests\Extension\Core\EventListener; use PHPUnit\Framework\TestCase; +use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\Form\Extension\Core\EventListener\FixUrlProtocolListener; +use Symfony\Component\Form\Form; +use Symfony\Component\Form\FormConfigBuilder; use Symfony\Component\Form\FormEvent; class FixUrlProtocolListenerTest extends TestCase @@ -20,7 +23,7 @@ class FixUrlProtocolListenerTest extends TestCase public function testFixHttpUrl() { $data = 'www.symfony.com'; - $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $form = new Form(new FormConfigBuilder('name', null, new EventDispatcher())); $event = new FormEvent($form, $data); $filter = new FixUrlProtocolListener('http'); @@ -32,7 +35,7 @@ class FixUrlProtocolListenerTest extends TestCase public function testSkipKnownUrl() { $data = 'http://www.symfony.com'; - $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $form = new Form(new FormConfigBuilder('name', null, new EventDispatcher())); $event = new FormEvent($form, $data); $filter = new FixUrlProtocolListener('http'); @@ -43,13 +46,13 @@ class FixUrlProtocolListenerTest extends TestCase public function provideUrlsWithSupportedProtocols() { - return array( - array('ftp://www.symfony.com'), - array('chrome-extension://foo'), - array('h323://foo'), - array('iris.beep://foo'), - array('foo+bar://foo'), - ); + return [ + ['ftp://www.symfony.com'], + ['chrome-extension://foo'], + ['h323://foo'], + ['iris.beep://foo'], + ['foo+bar://foo'], + ]; } /** @@ -57,7 +60,7 @@ class FixUrlProtocolListenerTest extends TestCase */ public function testSkipOtherProtocol($url) { - $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $form = new Form(new FormConfigBuilder('name', null, new EventDispatcher())); $event = new FormEvent($form, $url); $filter = new FixUrlProtocolListener('http'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerArrayObjectTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerArrayObjectTest.php index 6f46c9d7..59445379 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerArrayObjectTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerArrayObjectTest.php @@ -11,7 +11,9 @@ namespace Symfony\Component\Form\Tests\Extension\Core\EventListener; +use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\Form\FormBuilder; +use Symfony\Component\Form\FormFactoryBuilder; class MergeCollectionListenerArrayObjectTest extends MergeCollectionListenerTest { @@ -22,6 +24,6 @@ class MergeCollectionListenerArrayObjectTest extends MergeCollectionListenerTest protected function getBuilder($name = 'name') { - return new FormBuilder($name, '\ArrayObject', $this->dispatcher, $this->factory); + return new FormBuilder($name, '\ArrayObject', new EventDispatcher(), (new FormFactoryBuilder())->getFormFactory()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerArrayTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerArrayTest.php index c0f3d597..4f19a3ff 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerArrayTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerArrayTest.php @@ -11,7 +11,9 @@ namespace Symfony\Component\Form\Tests\Extension\Core\EventListener; +use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\Form\FormBuilder; +use Symfony\Component\Form\FormFactoryBuilder; class MergeCollectionListenerArrayTest extends MergeCollectionListenerTest { @@ -22,6 +24,6 @@ class MergeCollectionListenerArrayTest extends MergeCollectionListenerTest protected function getBuilder($name = 'name') { - return new FormBuilder($name, null, $this->dispatcher, $this->factory); + return new FormBuilder($name, null, new EventDispatcher(), (new FormFactoryBuilder())->getFormFactory()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerCustomArrayObjectTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerCustomArrayObjectTest.php index 76bdc768..4be3b4ba 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerCustomArrayObjectTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerCustomArrayObjectTest.php @@ -11,7 +11,9 @@ namespace Symfony\Component\Form\Tests\Extension\Core\EventListener; +use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\Form\FormBuilder; +use Symfony\Component\Form\FormFactoryBuilder; use Symfony\Component\Form\Tests\Fixtures\CustomArrayObject; class MergeCollectionListenerCustomArrayObjectTest extends MergeCollectionListenerTest @@ -23,6 +25,6 @@ class MergeCollectionListenerCustomArrayObjectTest extends MergeCollectionListen protected function getBuilder($name = 'name') { - return new FormBuilder($name, 'Symfony\Component\Form\Tests\Fixtures\CustomArrayObject', $this->dispatcher, $this->factory); + return new FormBuilder($name, 'Symfony\Component\Form\Tests\Fixtures\CustomArrayObject', new EventDispatcher(), (new FormFactoryBuilder())->getFormFactory()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php index 627d7bb3..8c691dff 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php @@ -17,21 +17,15 @@ use Symfony\Component\Form\FormEvent; abstract class MergeCollectionListenerTest extends TestCase { - protected $dispatcher; - protected $factory; protected $form; protected function setUp() { - $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); - $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); $this->form = $this->getForm('axes'); } protected function tearDown() { - $this->dispatcher = null; - $this->factory = null; $this->form = null; } @@ -44,27 +38,22 @@ abstract class MergeCollectionListenerTest extends TestCase return $this->getBuilder($name)->setAttribute('property_path', $propertyPath)->getForm(); } - protected function getMockForm() - { - return $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); - } - public function getBooleanMatrix1() { - return array( - array(true), - array(false), - ); + return [ + [true], + [false], + ]; } public function getBooleanMatrix2() { - return array( - array(true, true), - array(true, false), - array(false, true), - array(false, false), - ); + return [ + [true, true], + [true, false], + [false, true], + [false, false], + ]; } abstract protected function getData(array $data); @@ -74,8 +63,8 @@ abstract class MergeCollectionListenerTest extends TestCase */ public function testAddExtraEntriesIfAllowAdd($allowDelete) { - $originalData = $this->getData(array(1 => 'second')); - $newData = $this->getData(array(0 => 'first', 1 => 'second', 2 => 'third')); + $originalData = $this->getData([1 => 'second']); + $newData = $this->getData([0 => 'first', 1 => 'second', 2 => 'third']); $listener = new MergeCollectionListener(true, $allowDelete); @@ -98,8 +87,8 @@ abstract class MergeCollectionListenerTest extends TestCase */ public function testAddExtraEntriesIfAllowAddDontOverwriteExistingIndices($allowDelete) { - $originalData = $this->getData(array(1 => 'first')); - $newData = $this->getData(array(0 => 'first', 1 => 'second')); + $originalData = $this->getData([1 => 'first']); + $newData = $this->getData([0 => 'first', 1 => 'second']); $listener = new MergeCollectionListener(true, $allowDelete); @@ -114,7 +103,7 @@ abstract class MergeCollectionListenerTest extends TestCase } // The original object matches the new object - $this->assertEquals($this->getData(array(1 => 'first', 2 => 'second')), $event->getData()); + $this->assertEquals($this->getData([1 => 'first', 2 => 'second']), $event->getData()); } /** @@ -122,9 +111,9 @@ abstract class MergeCollectionListenerTest extends TestCase */ public function testDoNothingIfNotAllowAdd($allowDelete) { - $originalDataArray = array(1 => 'second'); + $originalDataArray = [1 => 'second']; $originalData = $this->getData($originalDataArray); - $newData = $this->getData(array(0 => 'first', 1 => 'second', 2 => 'third')); + $newData = $this->getData([0 => 'first', 1 => 'second', 2 => 'third']); $listener = new MergeCollectionListener(false, $allowDelete); @@ -147,8 +136,8 @@ abstract class MergeCollectionListenerTest extends TestCase */ public function testRemoveMissingEntriesIfAllowDelete($allowAdd) { - $originalData = $this->getData(array(0 => 'first', 1 => 'second', 2 => 'third')); - $newData = $this->getData(array(1 => 'second')); + $originalData = $this->getData([0 => 'first', 1 => 'second', 2 => 'third']); + $newData = $this->getData([1 => 'second']); $listener = new MergeCollectionListener($allowAdd, true); @@ -171,9 +160,9 @@ abstract class MergeCollectionListenerTest extends TestCase */ public function testDoNothingIfNotAllowDelete($allowAdd) { - $originalDataArray = array(0 => 'first', 1 => 'second', 2 => 'third'); + $originalDataArray = [0 => 'first', 1 => 'second', 2 => 'third']; $originalData = $this->getData($originalDataArray); - $newData = $this->getData(array(1 => 'second')); + $newData = $this->getData([1 => 'second']); $listener = new MergeCollectionListener($allowAdd, false); @@ -205,7 +194,7 @@ abstract class MergeCollectionListenerTest extends TestCase public function testDealWithNullData() { - $originalData = $this->getData(array(0 => 'first', 1 => 'second', 2 => 'third')); + $originalData = $this->getData([0 => 'first', 1 => 'second', 2 => 'third']); $newData = null; $listener = new MergeCollectionListener(false, false); @@ -224,7 +213,7 @@ abstract class MergeCollectionListenerTest extends TestCase public function testDealWithNullOriginalDataIfAllowAdd($allowDelete) { $originalData = null; - $newData = $this->getData(array(0 => 'first', 1 => 'second', 2 => 'third')); + $newData = $this->getData([0 => 'first', 1 => 'second', 2 => 'third']); $listener = new MergeCollectionListener(true, $allowDelete); @@ -242,7 +231,7 @@ abstract class MergeCollectionListenerTest extends TestCase public function testDontDealWithNullOriginalDataIfNotAllowAdd($allowDelete) { $originalData = null; - $newData = $this->getData(array(0 => 'first', 1 => 'second', 2 => 'third')); + $newData = $this->getData([0 => 'first', 1 => 'second', 2 => 'third']); $listener = new MergeCollectionListener(false, $allowDelete); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/ResizeFormListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/ResizeFormListenerTest.php index 017c1bdc..ae7d2db4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/ResizeFormListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/ResizeFormListenerTest.php @@ -13,36 +13,37 @@ namespace Symfony\Component\Form\Tests\Extension\Core\EventListener; use Doctrine\Common\Collections\ArrayCollection; use PHPUnit\Framework\TestCase; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper; use Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener; +use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilder; use Symfony\Component\Form\FormEvent; +use Symfony\Component\Form\FormFactoryBuilder; class ResizeFormListenerTest extends TestCase { - private $dispatcher; private $factory; private $form; protected function setUp() { - $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); - $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); + $this->factory = (new FormFactoryBuilder())->getFormFactory(); $this->form = $this->getBuilder() ->setCompound(true) - ->setDataMapper($this->getDataMapper()) + ->setDataMapper(new PropertyPathMapper()) ->getForm(); } protected function tearDown() { - $this->dispatcher = null; $this->factory = null; $this->form = null; } protected function getBuilder($name = 'name') { - return new FormBuilder($name, null, $this->dispatcher, $this->factory); + return new FormBuilder($name, null, new EventDispatcher(), $this->factory); } protected function getForm($name = 'name') @@ -50,36 +51,14 @@ class ResizeFormListenerTest extends TestCase return $this->getBuilder($name)->getForm(); } - /** - * @return \PHPUnit_Framework_MockObject_MockObject - */ - private function getDataMapper() - { - return $this->getMockBuilder('Symfony\Component\Form\DataMapperInterface')->getMock(); - } - - protected function getMockForm() - { - return $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); - } - public function testPreSetDataResizesForm() { $this->form->add($this->getForm('0')); $this->form->add($this->getForm('1')); - $this->factory->expects($this->at(0)) - ->method('createNamed') - ->with(1, 'text', null, array('property_path' => '[1]', 'attr' => array('maxlength' => 10), 'auto_initialize' => false)) - ->will($this->returnValue($this->getForm('1'))); - $this->factory->expects($this->at(1)) - ->method('createNamed') - ->with(2, 'text', null, array('property_path' => '[2]', 'attr' => array('maxlength' => 10), 'auto_initialize' => false)) - ->will($this->returnValue($this->getForm('2'))); - - $data = array(1 => 'string', 2 => 'string'); + $data = [1 => 'string', 2 => 'string']; $event = new FormEvent($this->form, $data); - $listener = new ResizeFormListener('text', array('attr' => array('maxlength' => 10)), false, false); + $listener = new ResizeFormListener(TextType::class, ['attr' => ['maxlength' => 10]], false, false); $listener->preSetData($event); $this->assertFalse($this->form->has('0')); @@ -94,32 +73,27 @@ class ResizeFormListenerTest extends TestCase { $data = 'no array or traversable'; $event = new FormEvent($this->form, $data); - $listener = new ResizeFormListener('text', array(), false, false); + $listener = new ResizeFormListener('text', [], false, false); $listener->preSetData($event); } public function testPreSetDataDealsWithNullData() { - $this->factory->expects($this->never())->method('createNamed'); - $data = null; $event = new FormEvent($this->form, $data); - $listener = new ResizeFormListener('text', array(), false, false); + $listener = new ResizeFormListener(TextType::class, [], false, false); $listener->preSetData($event); + + $this->assertSame(0, $this->form->count()); } public function testPreSubmitResizesUpIfAllowAdd() { $this->form->add($this->getForm('0')); - $this->factory->expects($this->once()) - ->method('createNamed') - ->with(1, 'text', null, array('property_path' => '[1]', 'attr' => array('maxlength' => 10), 'auto_initialize' => false)) - ->will($this->returnValue($this->getForm('1'))); - - $data = array(0 => 'string', 1 => 'string'); + $data = [0 => 'string', 1 => 'string']; $event = new FormEvent($this->form, $data); - $listener = new ResizeFormListener('text', array('attr' => array('maxlength' => 10)), true, false); + $listener = new ResizeFormListener(TextType::class, ['attr' => ['maxlength' => 10]], true, false); $listener->preSubmit($event); $this->assertTrue($this->form->has('0')); @@ -131,9 +105,9 @@ class ResizeFormListenerTest extends TestCase $this->form->add($this->getForm('0')); $this->form->add($this->getForm('1')); - $data = array(0 => 'string'); + $data = [0 => 'string']; $event = new FormEvent($this->form, $data); - $listener = new ResizeFormListener('text', array(), false, true); + $listener = new ResizeFormListener('text', [], false, true); $listener->preSubmit($event); $this->assertTrue($this->form->has('0')); @@ -145,9 +119,9 @@ class ResizeFormListenerTest extends TestCase { $this->form->add($this->getForm('0')); - $data = array(); + $data = []; $event = new FormEvent($this->form, $data); - $listener = new ResizeFormListener('text', array(), false, true); + $listener = new ResizeFormListener('text', [], false, true); $listener->preSubmit($event); $this->assertFalse($this->form->has('0')); @@ -158,9 +132,9 @@ class ResizeFormListenerTest extends TestCase $this->form->add($this->getForm('0')); $this->form->add($this->getForm('1')); - $data = array(0 => 'string', 2 => 'string'); + $data = [0 => 'string', 2 => 'string']; $event = new FormEvent($this->form, $data); - $listener = new ResizeFormListener('text', array(), false, false); + $listener = new ResizeFormListener('text', [], false, false); $listener->preSubmit($event); $this->assertTrue($this->form->has('0')); @@ -172,7 +146,7 @@ class ResizeFormListenerTest extends TestCase { $data = 'no array or traversable'; $event = new FormEvent($this->form, $data); - $listener = new ResizeFormListener('text', array(), false, false); + $listener = new ResizeFormListener('text', [], false, false); $listener->preSubmit($event); $this->assertFalse($this->form->has('1')); @@ -184,7 +158,7 @@ class ResizeFormListenerTest extends TestCase $data = null; $event = new FormEvent($this->form, $data); - $listener = new ResizeFormListener('text', array(), false, true); + $listener = new ResizeFormListener('text', [], false, true); $listener->preSubmit($event); $this->assertFalse($this->form->has('1')); @@ -197,7 +171,7 @@ class ResizeFormListenerTest extends TestCase $data = ''; $event = new FormEvent($this->form, $data); - $listener = new ResizeFormListener('text', array(), false, true); + $listener = new ResizeFormListener('text', [], false, true); $listener->preSubmit($event); $this->assertFalse($this->form->has('1')); @@ -207,21 +181,21 @@ class ResizeFormListenerTest extends TestCase { $this->form->add($this->getForm('1')); - $data = array(0 => 'first', 1 => 'second', 2 => 'third'); + $data = [0 => 'first', 1 => 'second', 2 => 'third']; $event = new FormEvent($this->form, $data); - $listener = new ResizeFormListener('text', array(), false, true); + $listener = new ResizeFormListener('text', [], false, true); $listener->onSubmit($event); - $this->assertEquals(array(1 => 'second'), $event->getData()); + $this->assertEquals([1 => 'second'], $event->getData()); } public function testOnSubmitNormDataDoesNothingIfNotAllowDelete() { $this->form->add($this->getForm('1')); - $data = array(0 => 'first', 1 => 'second', 2 => 'third'); + $data = [0 => 'first', 1 => 'second', 2 => 'third']; $event = new FormEvent($this->form, $data); - $listener = new ResizeFormListener('text', array(), false, false); + $listener = new ResizeFormListener('text', [], false, false); $listener->onSubmit($event); $this->assertEquals($data, $event->getData()); @@ -234,7 +208,7 @@ class ResizeFormListenerTest extends TestCase { $data = 'no array or traversable'; $event = new FormEvent($this->form, $data); - $listener = new ResizeFormListener('text', array(), false, false); + $listener = new ResizeFormListener('text', [], false, false); $listener->onSubmit($event); } @@ -244,19 +218,19 @@ class ResizeFormListenerTest extends TestCase $data = null; $event = new FormEvent($this->form, $data); - $listener = new ResizeFormListener('text', array(), false, true); + $listener = new ResizeFormListener('text', [], false, true); $listener->onSubmit($event); - $this->assertEquals(array(), $event->getData()); + $this->assertEquals([], $event->getData()); } public function testOnSubmitDealsWithObjectBackedIteratorAggregate() { $this->form->add($this->getForm('1')); - $data = new \ArrayObject(array(0 => 'first', 1 => 'second', 2 => 'third')); + $data = new \ArrayObject([0 => 'first', 1 => 'second', 2 => 'third']); $event = new FormEvent($this->form, $data); - $listener = new ResizeFormListener('text', array(), false, true); + $listener = new ResizeFormListener('text', [], false, true); $listener->onSubmit($event); $this->assertArrayNotHasKey(0, $event->getData()); @@ -267,9 +241,9 @@ class ResizeFormListenerTest extends TestCase { $this->form->add($this->getForm('1')); - $data = new ArrayCollection(array(0 => 'first', 1 => 'second', 2 => 'third')); + $data = new ArrayCollection([0 => 'first', 1 => 'second', 2 => 'third']); $event = new FormEvent($this->form, $data); - $listener = new ResizeFormListener('text', array(), false, true); + $listener = new ResizeFormListener('text', [], false, true); $listener->onSubmit($event); $this->assertArrayNotHasKey(0, $event->getData()); @@ -278,38 +252,38 @@ class ResizeFormListenerTest extends TestCase public function testOnSubmitDeleteEmptyNotCompoundEntriesIfAllowDelete() { - $this->form->setData(array('0' => 'first', '1' => 'second')); + $this->form->setData(['0' => 'first', '1' => 'second']); $this->form->add($this->getForm('0')); $this->form->add($this->getForm('1')); - $data = array(0 => 'first', 1 => ''); + $data = [0 => 'first', 1 => '']; foreach ($data as $child => $dat) { $this->form->get($child)->setData($dat); } $event = new FormEvent($this->form, $data); - $listener = new ResizeFormListener('text', array(), false, true, true); + $listener = new ResizeFormListener('text', [], false, true, true); $listener->onSubmit($event); - $this->assertEquals(array(0 => 'first'), $event->getData()); + $this->assertEquals([0 => 'first'], $event->getData()); } public function testOnSubmitDeleteEmptyCompoundEntriesIfAllowDelete() { - $this->form->setData(array('0' => array('name' => 'John'), '1' => array('name' => 'Jane'))); + $this->form->setData(['0' => ['name' => 'John'], '1' => ['name' => 'Jane']]); $form1 = $this->getBuilder('0') ->setCompound(true) - ->setDataMapper($this->getDataMapper()) + ->setDataMapper(new PropertyPathMapper()) ->getForm(); $form1->add($this->getForm('name')); $form2 = $this->getBuilder('1') ->setCompound(true) - ->setDataMapper($this->getDataMapper()) + ->setDataMapper(new PropertyPathMapper()) ->getForm(); $form2->add($this->getForm('name')); $this->form->add($form1); $this->form->add($form2); - $data = array('0' => array('name' => 'John'), '1' => array('name' => '')); + $data = ['0' => ['name' => 'John'], '1' => ['name' => '']]; foreach ($data as $child => $dat) { $this->form->get($child)->setData($dat); } @@ -317,9 +291,9 @@ class ResizeFormListenerTest extends TestCase $callback = function ($data) { return '' === $data['name']; }; - $listener = new ResizeFormListener('text', array(), false, true, $callback); + $listener = new ResizeFormListener('text', [], false, true, $callback); $listener->onSubmit($event); - $this->assertEquals(array('0' => array('name' => 'John')), $event->getData()); + $this->assertEquals(['0' => ['name' => 'John']], $event->getData()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/TrimListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/TrimListenerTest.php index 1ecd3ad7..a61fb86a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/TrimListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/TrimListenerTest.php @@ -12,7 +12,10 @@ namespace Symfony\Component\Form\Tests\Extension\Core\EventListener; use PHPUnit\Framework\TestCase; +use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\Form\Extension\Core\EventListener\TrimListener; +use Symfony\Component\Form\Form; +use Symfony\Component\Form\FormConfigBuilder; use Symfony\Component\Form\FormEvent; class TrimListenerTest extends TestCase @@ -20,7 +23,7 @@ class TrimListenerTest extends TestCase public function testTrim() { $data = ' Foo! '; - $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $form = new Form(new FormConfigBuilder('name', null, new EventDispatcher())); $event = new FormEvent($form, $data); $filter = new TrimListener(); @@ -32,7 +35,7 @@ class TrimListenerTest extends TestCase public function testTrimSkipNonStrings() { $data = 1234; - $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $form = new Form(new FormConfigBuilder('name', null, new EventDispatcher())); $event = new FormEvent($form, $data); $filter = new TrimListener(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/BaseTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/BaseTypeTest.php index da3f48b4..62654fc6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/BaseTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/BaseTypeTest.php @@ -12,17 +12,20 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; use Symfony\Component\Form\Test\TypeTestCase; +use Symfony\Component\Form\Tests\VersionAwareTest; /** * @author Bernhard Schussek */ abstract class BaseTypeTest extends TypeTestCase { + use VersionAwareTest; + const TESTED_TYPE = ''; public function testPassDisabledAsOption() { - $form = $this->factory->create($this->getTestedType(), null, array('disabled' => true)); + $form = $this->factory->create($this->getTestedType(), null, ['disabled' => true]); $this->assertTrue($form->isDisabled()); } @@ -73,9 +76,9 @@ abstract class BaseTypeTest extends TypeTestCase public function testPassTranslationDomainToView() { - $view = $this->factory->create($this->getTestedType(), null, array( + $view = $this->factory->create($this->getTestedType(), null, [ 'translation_domain' => 'domain', - )) + ]) ->createView(); $this->assertSame('domain', $view->vars['translation_domain']); @@ -84,9 +87,9 @@ abstract class BaseTypeTest extends TypeTestCase public function testInheritTranslationDomainFromParent() { $view = $this->factory - ->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, array( + ->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, [ 'translation_domain' => 'domain', - )) + ]) ->add('child', $this->getTestedType()) ->getForm() ->createView(); @@ -97,12 +100,12 @@ abstract class BaseTypeTest extends TypeTestCase public function testPreferOwnTranslationDomain() { $view = $this->factory - ->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, array( + ->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, [ 'translation_domain' => 'parent_domain', - )) - ->add('child', $this->getTestedType(), array( + ]) + ->add('child', $this->getTestedType(), [ 'translation_domain' => 'domain', - )) + ]) ->getForm() ->createView(); @@ -121,7 +124,7 @@ abstract class BaseTypeTest extends TypeTestCase public function testPassLabelToView() { - $view = $this->factory->createNamed('__test___field', $this->getTestedType(), null, array('label' => 'My label')) + $view = $this->factory->createNamed('__test___field', $this->getTestedType(), null, ['label' => 'My label']) ->createView(); $this->assertSame('My label', $view->vars['label']); @@ -150,7 +153,7 @@ abstract class BaseTypeTest extends TypeTestCase $builder = $this->factory->createBuilder($this->getTestedType()); if ($builder->getCompound()) { - $emptyData = array(); + $emptyData = []; foreach ($builder as $field) { // empty children should map null (model data) in the compound view data $emptyData[$field->getName()] = null; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/BirthdayTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/BirthdayTypeTest.php index 7f9130b9..ffadf8c8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/BirthdayTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/BirthdayTypeTest.php @@ -23,8 +23,8 @@ class BirthdayTypeTest extends DateTypeTest */ public function testSetInvalidYearsOption() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'years' => 'bad value', - )); + ]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php index 3084ba58..fb2d5718 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php @@ -28,7 +28,7 @@ class CheckboxTypeTest extends BaseTypeTest public function testPassValueToView() { - $view = $this->factory->create(static::TESTED_TYPE, null, array('value' => 'foobar')) + $view = $this->factory->create(static::TESTED_TYPE, null, ['value' => 'foobar']) ->createView(); $this->assertEquals('foobar', $view->vars['value']); @@ -45,7 +45,7 @@ class CheckboxTypeTest extends BaseTypeTest public function testCheckedIfDataTrueWithEmptyValue() { - $view = $this->factory->create(static::TESTED_TYPE, null, array('value' => '')) + $view = $this->factory->create(static::TESTED_TYPE, null, ['value' => '']) ->setData(true) ->createView(); @@ -63,9 +63,9 @@ class CheckboxTypeTest extends BaseTypeTest public function testSubmitWithValueChecked() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'value' => 'foobar', - )); + ]); $form->submit('foobar'); $this->assertTrue($form->getData()); @@ -74,9 +74,9 @@ class CheckboxTypeTest extends BaseTypeTest public function testSubmitWithRandomValueChecked() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'value' => 'foobar', - )); + ]); $form->submit('krixikraxi'); $this->assertTrue($form->getData()); @@ -85,9 +85,9 @@ class CheckboxTypeTest extends BaseTypeTest public function testSubmitWithValueUnchecked() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'value' => 'foobar', - )); + ]); $form->submit(null); $this->assertFalse($form->getData()); @@ -96,9 +96,9 @@ class CheckboxTypeTest extends BaseTypeTest public function testSubmitWithEmptyValueChecked() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'value' => '', - )); + ]); $form->submit(''); $this->assertTrue($form->getData()); @@ -107,9 +107,9 @@ class CheckboxTypeTest extends BaseTypeTest public function testSubmitWithEmptyValueUnchecked() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'value' => '', - )); + ]); $form->submit(null); $this->assertFalse($form->getData()); @@ -118,9 +118,9 @@ class CheckboxTypeTest extends BaseTypeTest public function testSubmitWithEmptyValueAndFalseUnchecked() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'value' => '', - )); + ]); $form->submit(false); $this->assertFalse($form->getData()); @@ -129,9 +129,9 @@ class CheckboxTypeTest extends BaseTypeTest public function testSubmitWithEmptyValueAndTrueChecked() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'value' => '', - )); + ]); $form->submit(true); $this->assertTrue($form->getData()); @@ -167,10 +167,10 @@ class CheckboxTypeTest extends BaseTypeTest public function provideCustomModelTransformerData() { - return array( - array('checked', true), - array('unchecked', false), - ); + return [ + ['checked', true], + ['unchecked', false], + ]; } public function testSubmitNull($expected = null, $norm = null, $view = null) @@ -180,9 +180,9 @@ class CheckboxTypeTest extends BaseTypeTest public function testSubmitNullUsesDefaultEmptyData($emptyData = 'empty', $expectedData = true) { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'empty_data' => $emptyData, - )); + ]); $form->submit(null); // view data is transformed to the string true value diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypePerformanceTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypePerformanceTest.php index 3e0ea22f..3616a139 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypePerformanceTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypePerformanceTest.php @@ -30,9 +30,9 @@ class ChoiceTypePerformanceTest extends FormPerformanceTestCase $choices = range(1, 300); for ($i = 0; $i < 100; ++$i) { - $this->factory->create('Symfony\Component\Form\Extension\Core\Type\ChoiceType', mt_rand(1, 400), array( + $this->factory->create('Symfony\Component\Form\Extension\Core\Type\ChoiceType', mt_rand(1, 400), [ 'choices' => $choices, - )); + ]); } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php index cb4d182b..4a7f006f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php @@ -18,59 +18,59 @@ class ChoiceTypeTest extends BaseTypeTest { const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\ChoiceType'; - private $choices = array( + private $choices = [ 'Bernhard' => 'a', 'Fabien' => 'b', 'Kris' => 'c', 'Jon' => 'd', 'Roman' => 'e', - ); + ]; - private $scalarChoices = array( + private $scalarChoices = [ 'Yes' => true, 'No' => false, 'n/a' => '', - ); + ]; - private $booleanChoicesWithNull = array( + private $booleanChoicesWithNull = [ 'Yes' => true, 'No' => false, 'n/a' => null, - ); + ]; - private $numericChoicesFlipped = array( + private $numericChoicesFlipped = [ 0 => 'Bernhard', 1 => 'Fabien', 2 => 'Kris', 3 => 'Jon', 4 => 'Roman', - ); + ]; private $objectChoices; - protected $groupedChoices = array( - 'Symfony' => array( + protected $groupedChoices = [ + 'Symfony' => [ 'Bernhard' => 'a', 'Fabien' => 'b', 'Kris' => 'c', - ), - 'Doctrine' => array( + ], + 'Doctrine' => [ 'Jon' => 'd', 'Roman' => 'e', - ), - ); + ], + ]; protected function setUp() { parent::setUp(); - $this->objectChoices = array( - (object) array('id' => 1, 'name' => 'Bernhard'), - (object) array('id' => 2, 'name' => 'Fabien'), - (object) array('id' => 3, 'name' => 'Kris'), - (object) array('id' => 4, 'name' => 'Jon'), - (object) array('id' => 5, 'name' => 'Roman'), - ); + $this->objectChoices = [ + (object) ['id' => 1, 'name' => 'Bernhard'], + (object) ['id' => 2, 'name' => 'Fabien'], + (object) ['id' => 3, 'name' => 'Kris'], + (object) ['id' => 4, 'name' => 'Jon'], + (object) ['id' => 5, 'name' => 'Roman'], + ]; } protected function tearDown() @@ -85,9 +85,9 @@ class ChoiceTypeTest extends BaseTypeTest */ public function testChoicesOptionExpectsArrayOrTraversable() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'choices' => new \stdClass(), - )); + ]); } /** @@ -95,31 +95,31 @@ class ChoiceTypeTest extends BaseTypeTest */ public function testChoiceLoaderOptionExpectsChoiceLoaderInterface() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'choice_loader' => new \stdClass(), - )); + ]); } public function testChoiceListAndChoicesCanBeEmpty() { - $this->assertInstanceOf('Symfony\Component\Form\FormInterface', $this->factory->create(static::TESTED_TYPE, null, array())); + $this->assertInstanceOf('Symfony\Component\Form\FormInterface', $this->factory->create(static::TESTED_TYPE, null, [])); } public function testExpandedChoicesOptionsTurnIntoChildren() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'expanded' => true, 'choices' => $this->choices, - )); + ]); $this->assertCount(\count($this->choices), $form, 'Each choice should become a new field'); } public function testChoiceListWithScalarValues() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'choices' => $this->scalarChoices, - ))->createView(); + ])->createView(); $this->assertSame('1', $view->vars['choices'][0]->value); $this->assertSame('0', $view->vars['choices'][1]->value); @@ -131,19 +131,19 @@ class ChoiceTypeTest extends BaseTypeTest public function testChoiceListWithScalarValuesAndFalseAsPreSetData() { - $view = $this->factory->create(static::TESTED_TYPE, false, array( + $view = $this->factory->create(static::TESTED_TYPE, false, [ 'choices' => $this->scalarChoices, - ))->createView(); + ])->createView(); $this->assertTrue($view->vars['is_selected']($view->vars['choices'][1]->value, $view->vars['value']), 'False value should be pre selected'); } public function testExpandedChoiceListWithScalarValues() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'choices' => $this->scalarChoices, 'expanded' => true, - ))->createView(); + ])->createView(); $this->assertFalse($view->children[0]->vars['checked'], 'True value should not be pre selected'); $this->assertFalse($view->children[1]->vars['checked'], 'False value should not be pre selected'); @@ -152,10 +152,10 @@ class ChoiceTypeTest extends BaseTypeTest public function testExpandedChoiceListWithBooleanAndNullValues() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'choices' => $this->booleanChoicesWithNull, 'expanded' => true, - ))->createView(); + ])->createView(); $this->assertFalse($view->children[0]->vars['checked'], 'True value should not be pre selected'); $this->assertFalse($view->children[1]->vars['checked'], 'False value should not be pre selected'); @@ -164,10 +164,10 @@ class ChoiceTypeTest extends BaseTypeTest public function testExpandedChoiceListWithScalarValuesAndFalseAsPreSetData() { - $view = $this->factory->create(static::TESTED_TYPE, false, array( + $view = $this->factory->create(static::TESTED_TYPE, false, [ 'choices' => $this->scalarChoices, 'expanded' => true, - ))->createView(); + ])->createView(); $this->assertSame('1', $view->vars['choices'][0]->value); $this->assertSame('0', $view->vars['choices'][1]->value); @@ -177,10 +177,10 @@ class ChoiceTypeTest extends BaseTypeTest public function testExpandedChoiceListWithBooleanAndNullValuesAndFalseAsPreSetData() { - $view = $this->factory->create(static::TESTED_TYPE, false, array( + $view = $this->factory->create(static::TESTED_TYPE, false, [ 'choices' => $this->booleanChoicesWithNull, 'expanded' => true, - ))->createView(); + ])->createView(); $this->assertFalse($view->children[0]->vars['checked'], 'True value should not be pre selected'); $this->assertTrue($view->children[1]->vars['checked'], 'False value should be pre selected'); @@ -189,12 +189,12 @@ class ChoiceTypeTest extends BaseTypeTest public function testPlaceholderPresentOnNonRequiredExpandedSingleChoice() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => $this->choices, - )); + ]); $this->assertArrayHasKey('placeholder', $form); $this->assertCount(\count($this->choices) + 1, $form, 'Each choice should become a new field'); @@ -202,12 +202,12 @@ class ChoiceTypeTest extends BaseTypeTest public function testPlaceholderNotPresentIfRequired() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => true, 'choices' => $this->choices, - )); + ]); $this->assertArrayNotHasKey('placeholder', $form); $this->assertCount(\count($this->choices), $form, 'Each choice should become a new field'); @@ -215,12 +215,12 @@ class ChoiceTypeTest extends BaseTypeTest public function testPlaceholderNotPresentIfMultiple() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => true, 'required' => false, 'choices' => $this->choices, - )); + ]); $this->assertArrayNotHasKey('placeholder', $form); $this->assertCount(\count($this->choices), $form, 'Each choice should become a new field'); @@ -228,15 +228,15 @@ class ChoiceTypeTest extends BaseTypeTest public function testPlaceholderNotPresentIfEmptyChoice() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => false, - 'choices' => array( + 'choices' => [ 'Empty' => '', 'Not empty' => 1, - ), - )); + ], + ]); $this->assertArrayNotHasKey('placeholder', $form); $this->assertCount(2, $form, 'Each choice should become a new field'); @@ -244,16 +244,16 @@ class ChoiceTypeTest extends BaseTypeTest public function testPlaceholderWithBooleanChoices() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => false, 'required' => false, - 'choices' => array( + 'choices' => [ 'Yes' => true, 'No' => false, - ), + ], 'placeholder' => 'Select an option', - )) + ]) ->createView(); $this->assertSame('', $view->vars['value'], 'Value should be empty'); @@ -264,16 +264,16 @@ class ChoiceTypeTest extends BaseTypeTest public function testPlaceholderWithBooleanChoicesWithFalseAsPreSetData() { - $view = $this->factory->create(static::TESTED_TYPE, false, array( + $view = $this->factory->create(static::TESTED_TYPE, false, [ 'multiple' => false, 'expanded' => false, 'required' => false, - 'choices' => array( + 'choices' => [ 'Yes' => true, 'No' => false, - ), + ], 'placeholder' => 'Select an option', - )) + ]) ->createView(); $this->assertSame('0', $view->vars['value'], 'Value should be "0"'); @@ -284,16 +284,16 @@ class ChoiceTypeTest extends BaseTypeTest public function testPlaceholderWithExpandedBooleanChoices() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => false, - 'choices' => array( + 'choices' => [ 'Yes' => true, 'No' => false, - ), + ], 'placeholder' => 'Select an option', - )); + ]); $this->assertArrayHasKey('placeholder', $form, 'Placeholder should be set'); $this->assertCount(3, $form, 'Each choice should become a new field, placeholder included'); @@ -308,16 +308,16 @@ class ChoiceTypeTest extends BaseTypeTest public function testPlaceholderWithExpandedBooleanChoicesAndWithFalseAsPreSetData() { - $form = $this->factory->create(static::TESTED_TYPE, false, array( + $form = $this->factory->create(static::TESTED_TYPE, false, [ 'multiple' => false, 'expanded' => true, 'required' => false, - 'choices' => array( + 'choices' => [ 'Yes' => true, 'No' => false, - ), + ], 'placeholder' => 'Select an option', - )); + ]); $this->assertArrayHasKey('placeholder', $form, 'Placeholder should be set'); $this->assertCount(3, $form, 'Each choice should become a new field, placeholder included'); @@ -332,12 +332,12 @@ class ChoiceTypeTest extends BaseTypeTest public function testExpandedChoicesOptionsAreFlattened() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'expanded' => true, 'choices' => $this->groupedChoices, - )); + ]); - $flattened = array(); + $flattened = []; foreach ($this->groupedChoices as $choices) { $flattened = array_merge($flattened, array_keys($choices)); } @@ -351,20 +351,20 @@ class ChoiceTypeTest extends BaseTypeTest public function testExpandedChoicesOptionsAreFlattenedObjectChoices() { - $obj1 = (object) array('id' => 1, 'name' => 'Bernhard'); - $obj2 = (object) array('id' => 2, 'name' => 'Fabien'); - $obj3 = (object) array('id' => 3, 'name' => 'Kris'); - $obj4 = (object) array('id' => 4, 'name' => 'Jon'); - $obj5 = (object) array('id' => 5, 'name' => 'Roman'); + $obj1 = (object) ['id' => 1, 'name' => 'Bernhard']; + $obj2 = (object) ['id' => 2, 'name' => 'Fabien']; + $obj3 = (object) ['id' => 3, 'name' => 'Kris']; + $obj4 = (object) ['id' => 4, 'name' => 'Jon']; + $obj5 = (object) ['id' => 5, 'name' => 'Roman']; - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'expanded' => true, - 'choices' => array( - 'Symfony' => array($obj1, $obj2, $obj3), - 'Doctrine' => array($obj4, $obj5), - ), + 'choices' => [ + 'Symfony' => [$obj1, $obj2, $obj3], + 'Doctrine' => [$obj4, $obj5], + ], 'choice_name' => 'id', - )); + ]); $this->assertSame(5, $form->count(), 'Each nested choice should become a new field, not the groups'); $this->assertTrue($form->has(1)); @@ -376,12 +376,12 @@ class ChoiceTypeTest extends BaseTypeTest public function testExpandedCheckboxesAreNeverRequired() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => true, 'required' => true, 'choices' => $this->choices, - )); + ]); foreach ($form as $child) { $this->assertFalse($child->isRequired()); @@ -390,12 +390,12 @@ class ChoiceTypeTest extends BaseTypeTest public function testExpandedRadiosAreRequiredIfChoiceChildIsRequired() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => true, 'choices' => $this->choices, - )); + ]); foreach ($form as $child) { $this->assertTrue($child->isRequired()); @@ -404,12 +404,12 @@ class ChoiceTypeTest extends BaseTypeTest public function testExpandedRadiosAreNotRequiredIfChoiceChildIsNotRequired() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => $this->choices, - )); + ]); foreach ($form as $child) { $this->assertFalse($child->isRequired()); @@ -418,11 +418,11 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitSingleNonExpanded() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => false, 'choices' => $this->choices, - )); + ]); $form->submit('b'); @@ -433,11 +433,11 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitSingleNonExpandedInvalidChoice() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => false, 'choices' => $this->choices, - )); + ]); $form->submit('foobar'); @@ -448,11 +448,11 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitSingleNonExpandedNull() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => false, 'choices' => $this->choices, - )); + ]); $form->submit(null); @@ -466,11 +466,11 @@ class ChoiceTypeTest extends BaseTypeTest // choices are available. public function testSubmitNull($expected = null, $norm = null, $view = null) { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => false, - 'choices' => array(), - )); + 'choices' => [], + ]); $form->submit(null); @@ -482,11 +482,11 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitSingleNonExpandedEmpty() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => false, 'choices' => $this->choices, - )); + ]); $form->submit(''); @@ -497,16 +497,16 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitSingleNonExpandedEmptyExplicitEmptyChoice() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => false, - 'choices' => array( + 'choices' => [ 'Empty' => 'EMPTY_CHOICE', - ), + ], 'choice_value' => function () { return ''; }, - )); + ]); $form->submit(''); @@ -520,11 +520,11 @@ class ChoiceTypeTest extends BaseTypeTest // choices are available. public function testSubmitSingleNonExpandedEmptyNoChoices() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => false, - 'choices' => array(), - )); + 'choices' => [], + ]); $form->submit(''); @@ -535,11 +535,11 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitSingleNonExpandedFalse() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => false, 'choices' => $this->choices, - )); + ]); $form->submit(false); @@ -553,11 +553,11 @@ class ChoiceTypeTest extends BaseTypeTest // choices are available. public function testSubmitSingleNonExpandedFalseNoChoices() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => false, - 'choices' => array(), - )); + 'choices' => [], + ]); $form->submit(false); @@ -568,13 +568,13 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitSingleNonExpandedObjectChoices() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => false, 'choices' => $this->objectChoices, 'choice_label' => 'name', 'choice_value' => 'id', - )); + ]); // "id" value of the second entry $form->submit('2'); @@ -586,13 +586,13 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitNullUsesDefaultEmptyData($emptyData = 'empty', $expectedData = null) { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => false, // empty data must match string choice value - 'choices' => array($emptyData), + 'choices' => [$emptyData], 'empty_data' => $emptyData, - )); + ]); $form->submit(null); @@ -601,12 +601,12 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitSingleChoiceWithEmptyDataAndInitialData() { - $form = $this->factory->create(static::TESTED_TYPE, 'initial', array( + $form = $this->factory->create(static::TESTED_TYPE, 'initial', [ 'multiple' => false, 'expanded' => false, - 'choices' => array('initial', 'test'), + 'choices' => ['initial', 'test'], 'empty_data' => 'test', - )); + ]); $form->submit(null); @@ -615,54 +615,54 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitMultipleChoiceWithEmptyData() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => false, - 'choices' => array('test'), - 'empty_data' => array('test'), - )); + 'choices' => ['test'], + 'empty_data' => ['test'], + ]); $form->submit(null); - $this->assertSame(array('test'), $form->getData()); + $this->assertSame(['test'], $form->getData()); } public function testSubmitMultipleChoiceWithEmptyDataAndInitialEmptyArray() { - $form = $this->factory->create(static::TESTED_TYPE, array(), array( + $form = $this->factory->create(static::TESTED_TYPE, [], [ 'multiple' => true, 'expanded' => false, - 'choices' => array('test'), - 'empty_data' => array('test'), - )); + 'choices' => ['test'], + 'empty_data' => ['test'], + ]); $form->submit(null); - $this->assertSame(array('test'), $form->getData()); + $this->assertSame(['test'], $form->getData()); } public function testSubmitMultipleChoiceWithEmptyDataAndInitialData() { - $form = $this->factory->create(static::TESTED_TYPE, array('initial'), array( + $form = $this->factory->create(static::TESTED_TYPE, ['initial'], [ 'multiple' => true, 'expanded' => false, - 'choices' => array('initial', 'test'), - 'empty_data' => array('test'), - )); + 'choices' => ['initial', 'test'], + 'empty_data' => ['test'], + ]); $form->submit(null); - $this->assertSame(array('test'), $form->getData()); + $this->assertSame(['test'], $form->getData()); } public function testSubmitSingleChoiceExpandedWithEmptyData() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, - 'choices' => array('test'), + 'choices' => ['test'], 'empty_data' => 'test', - )); + ]); $form->submit(null); @@ -671,12 +671,12 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitSingleChoiceExpandedWithEmptyDataAndInitialData() { - $form = $this->factory->create(static::TESTED_TYPE, 'initial', array( + $form = $this->factory->create(static::TESTED_TYPE, 'initial', [ 'multiple' => false, 'expanded' => true, - 'choices' => array('initial', 'test'), + 'choices' => ['initial', 'test'], 'empty_data' => 'test', - )); + ]); $form->submit(null); @@ -685,44 +685,44 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitMultipleChoiceExpandedWithEmptyData() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => true, - 'choices' => array('test'), - 'empty_data' => array('test'), - )); + 'choices' => ['test'], + 'empty_data' => ['test'], + ]); $form->submit(null); - $this->assertSame(array('test'), $form->getData()); + $this->assertSame(['test'], $form->getData()); } public function testSubmitMultipleChoiceExpandedWithEmptyDataAndInitialEmptyArray() { - $form = $this->factory->create(static::TESTED_TYPE, array(), array( + $form = $this->factory->create(static::TESTED_TYPE, [], [ 'multiple' => true, 'expanded' => true, - 'choices' => array('test'), - 'empty_data' => array('test'), - )); + 'choices' => ['test'], + 'empty_data' => ['test'], + ]); $form->submit(null); - $this->assertSame(array('test'), $form->getData()); + $this->assertSame(['test'], $form->getData()); } public function testSubmitMultipleChoiceExpandedWithEmptyDataAndInitialData() { - $form = $this->factory->create(static::TESTED_TYPE, array('init'), array( + $form = $this->factory->create(static::TESTED_TYPE, ['init'], [ 'multiple' => true, 'expanded' => true, - 'choices' => array('init', 'test'), - 'empty_data' => array('test'), - )); + 'choices' => ['init', 'test'], + 'empty_data' => ['test'], + ]); $form->submit(null); - $this->assertSame(array('test'), $form->getData()); + $this->assertSame(['test'], $form->getData()); } /** @@ -730,11 +730,11 @@ class ChoiceTypeTest extends BaseTypeTest */ public function testLegacyNullChoices() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => false, 'choices' => null, - )); + ]); $this->assertNull($form->getConfig()->getOption('choices')); $this->assertFalse($form->getConfig()->getOption('multiple')); $this->assertFalse($form->getConfig()->getOption('expanded')); @@ -742,31 +742,31 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitMultipleNonExpanded() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => false, 'choices' => $this->choices, - )); + ]); - $form->submit(array('a', 'b')); + $form->submit(['a', 'b']); - $this->assertEquals(array('a', 'b'), $form->getData()); - $this->assertEquals(array('a', 'b'), $form->getViewData()); + $this->assertEquals(['a', 'b'], $form->getData()); + $this->assertEquals(['a', 'b'], $form->getViewData()); $this->assertTrue($form->isSynchronized()); } public function testSubmitMultipleNonExpandedEmpty() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => false, 'choices' => $this->choices, - )); + ]); - $form->submit(array()); + $form->submit([]); - $this->assertSame(array(), $form->getData()); - $this->assertSame(array(), $form->getViewData()); + $this->assertSame([], $form->getData()); + $this->assertSame([], $form->getViewData()); $this->assertTrue($form->isSynchronized()); } @@ -775,26 +775,26 @@ class ChoiceTypeTest extends BaseTypeTest // choices are available. public function testSubmitMultipleNonExpandedEmptyNoChoices() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => false, - 'choices' => array(), - )); + 'choices' => [], + ]); - $form->submit(array()); + $form->submit([]); - $this->assertSame(array(), $form->getData()); - $this->assertSame(array(), $form->getViewData()); + $this->assertSame([], $form->getData()); + $this->assertSame([], $form->getViewData()); $this->assertTrue($form->isSynchronized()); } public function testSubmitMultipleNonExpandedInvalidScalarChoice() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => false, 'choices' => $this->choices, - )); + ]); $form->submit('foobar'); @@ -805,44 +805,44 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitMultipleNonExpandedInvalidArrayChoice() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => false, 'choices' => $this->choices, - )); + ]); - $form->submit(array('a', 'foobar')); + $form->submit(['a', 'foobar']); $this->assertNull($form->getData()); - $this->assertEquals(array('a', 'foobar'), $form->getViewData()); + $this->assertEquals(['a', 'foobar'], $form->getViewData()); $this->assertFalse($form->isSynchronized()); } public function testSubmitMultipleNonExpandedObjectChoices() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => false, 'choices' => $this->objectChoices, 'choice_label' => 'name', 'choice_value' => 'id', - )); + ]); - $form->submit(array('2', '3')); + $form->submit(['2', '3']); - $this->assertEquals(array($this->objectChoices[1], $this->objectChoices[2]), $form->getData()); - $this->assertEquals(array('2', '3'), $form->getViewData()); + $this->assertEquals([$this->objectChoices[1], $this->objectChoices[2]], $form->getData()); + $this->assertEquals(['2', '3'], $form->getViewData()); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleExpandedRequired() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => true, 'choices' => $this->choices, - )); + ]); $form->submit('b'); @@ -865,12 +865,12 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitSingleExpandedRequiredInvalidChoice() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => true, 'choices' => $this->choices, - )); + ]); $form->submit('foobar'); @@ -893,12 +893,12 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitSingleExpandedNonRequired() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => $this->choices, - )); + ]); $form->submit('b'); @@ -923,12 +923,12 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitSingleExpandedNonRequiredInvalidChoice() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => $this->choices, - )); + ]); $form->submit('foobar'); @@ -951,18 +951,18 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitSingleExpandedRequiredNull() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => true, 'choices' => $this->choices, - )); + ]); $form->submit(null); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData(), 'View data should always be a string'); - $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertSame([], $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); $this->assertTrue($form->isSynchronized()); $this->assertFalse($form[0]->getData()); @@ -982,35 +982,35 @@ class ChoiceTypeTest extends BaseTypeTest // choices are available. public function testSubmitSingleExpandedRequiredNullNoChoices() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => true, - 'choices' => array(), - )); + 'choices' => [], + ]); $form->submit(null); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData(), 'View data should always be a string'); - $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertSame([], $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleExpandedRequiredEmpty() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => true, 'choices' => $this->choices, - )); + ]); $form->submit(''); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData(), 'View data should always be a string'); - $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertSame([], $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); $this->assertTrue($form->isSynchronized()); $this->assertFalse($form[0]->getData()); @@ -1030,35 +1030,35 @@ class ChoiceTypeTest extends BaseTypeTest // choices are available. public function testSubmitSingleExpandedRequiredEmptyNoChoices() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => true, - 'choices' => array(), - )); + 'choices' => [], + ]); $form->submit(''); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData(), 'View data should always be a string'); - $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertSame([], $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleExpandedRequiredFalse() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => true, 'choices' => $this->choices, - )); + ]); $form->submit(false); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData(), 'View data should always be a string'); - $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertSame([], $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); $this->assertTrue($form->isSynchronized()); $this->assertFalse($form[0]->getData()); @@ -1078,35 +1078,35 @@ class ChoiceTypeTest extends BaseTypeTest // choices are available. public function testSubmitSingleExpandedRequiredFalseNoChoices() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => true, - 'choices' => array(), - )); + 'choices' => [], + ]); $form->submit(false); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData(), 'View data should always be a string'); - $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertSame([], $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleExpandedNonRequiredNull() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => $this->choices, - )); + ]); $form->submit(null); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData(), 'View data should always be a string'); - $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertSame([], $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); $this->assertTrue($form->isSynchronized()); $this->assertTrue($form['placeholder']->getData()); @@ -1128,35 +1128,35 @@ class ChoiceTypeTest extends BaseTypeTest // choices are available. public function testSubmitSingleExpandedNonRequiredNullNoChoices() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => false, - 'choices' => array(), - )); + 'choices' => [], + ]); $form->submit(null); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData(), 'View data should always be a string'); - $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertSame([], $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleExpandedNonRequiredEmpty() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => $this->choices, - )); + ]); $form->submit(''); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData(), 'View data should always be a string'); - $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertSame([], $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); $this->assertTrue($form->isSynchronized()); $this->assertTrue($form['placeholder']->getData()); @@ -1178,35 +1178,35 @@ class ChoiceTypeTest extends BaseTypeTest // choices are available. public function testSubmitSingleExpandedNonRequiredEmptyNoChoices() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => false, - 'choices' => array(), - )); + 'choices' => [], + ]); $form->submit(''); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData(), 'View data should always be a string'); - $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertSame([], $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleExpandedNonRequiredFalse() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => $this->choices, - )); + ]); $form->submit(false); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData(), 'View data should always be a string'); - $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertSame([], $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); $this->assertTrue($form->isSynchronized()); $this->assertTrue($form['placeholder']->getData()); @@ -1228,31 +1228,31 @@ class ChoiceTypeTest extends BaseTypeTest // choices are available. public function testSubmitSingleExpandedNonRequiredFalseNoChoices() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'required' => false, - 'choices' => array(), - )); + 'choices' => [], + ]); $form->submit(false); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData(), 'View data should always be a string'); - $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertSame([], $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleExpandedWithEmptyChild() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, - 'choices' => array( + 'choices' => [ 'Empty' => '', 'Not empty' => 1, - ), - )); + ], + ]); $form->submit(''); @@ -1267,13 +1267,13 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitSingleExpandedObjectChoices() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'expanded' => true, 'choices' => $this->objectChoices, 'choice_label' => 'name', 'choice_value' => 'id', - )); + ]); $form->submit('2'); @@ -1294,16 +1294,16 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitMultipleExpanded() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => true, 'choices' => $this->choices, - )); + ]); - $form->submit(array('a', 'c')); + $form->submit(['a', 'c']); - $this->assertSame(array('a', 'c'), $form->getData()); - $this->assertSame(array('a', 'c'), $form->getViewData()); + $this->assertSame(['a', 'c'], $form->getData()); + $this->assertSame(['a', 'c'], $form->getViewData()); $this->assertEmpty($form->getExtraData()); $this->assertTrue($form->isSynchronized()); @@ -1321,11 +1321,11 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitMultipleExpandedInvalidScalarChoice() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => true, 'choices' => $this->choices, - )); + ]); $form->submit('foobar'); @@ -1348,16 +1348,16 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitMultipleExpandedInvalidArrayChoice() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => true, 'choices' => $this->choices, - )); + ]); - $form->submit(array('a', 'foobar')); + $form->submit(['a', 'foobar']); $this->assertNull($form->getData()); - $this->assertSame(array('a', 'foobar'), $form->getViewData()); + $this->assertSame(['a', 'foobar'], $form->getViewData()); $this->assertEmpty($form->getExtraData()); $this->assertFalse($form->isSynchronized()); @@ -1375,15 +1375,15 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitMultipleExpandedEmpty() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => true, 'choices' => $this->choices, - )); + ]); - $form->submit(array()); + $form->submit([]); - $this->assertSame(array(), $form->getData()); + $this->assertSame([], $form->getData()); $this->assertTrue($form->isSynchronized()); $this->assertFalse($form[0]->getData()); @@ -1403,33 +1403,33 @@ class ChoiceTypeTest extends BaseTypeTest // choices are available. public function testSubmitMultipleExpandedEmptyNoChoices() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => true, - 'choices' => array(), - )); + 'choices' => [], + ]); - $form->submit(array()); + $form->submit([]); - $this->assertSame(array(), $form->getData()); + $this->assertSame([], $form->getData()); $this->assertTrue($form->isSynchronized()); } public function testSubmitMultipleExpandedWithEmptyChild() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => true, - 'choices' => array( + 'choices' => [ 'Empty' => '', 'Not Empty' => 1, 'Not Empty 2' => 2, - ), - )); + ], + ]); - $form->submit(array('', '2')); + $form->submit(['', '2']); - $this->assertSame(array('', 2), $form->getData()); + $this->assertSame(['', 2], $form->getData()); $this->assertTrue($form->isSynchronized()); $this->assertTrue($form[0]->getData()); @@ -1442,17 +1442,17 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitMultipleExpandedObjectChoices() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => true, 'choices' => $this->objectChoices, 'choice_label' => 'name', 'choice_value' => 'id', - )); + ]); - $form->submit(array('1', '2')); + $form->submit(['1', '2']); - $this->assertSame(array($this->objectChoices[0], $this->objectChoices[1]), $form->getData()); + $this->assertSame([$this->objectChoices[0], $this->objectChoices[1]], $form->getData()); $this->assertTrue($form->isSynchronized()); $this->assertTrue($form[0]->getData()); @@ -1469,25 +1469,25 @@ class ChoiceTypeTest extends BaseTypeTest public function testSubmitMultipleChoicesInts() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'choices' => array_flip($this->numericChoicesFlipped), - )); + ]); - $form->submit(array(1, 2)); + $form->submit([1, 2]); $this->assertTrue($form->isSynchronized()); } public function testSingleSelectedObjectChoices() { - $view = $this->factory->create(static::TESTED_TYPE, $this->objectChoices[3], array( + $view = $this->factory->create(static::TESTED_TYPE, $this->objectChoices[3], [ 'multiple' => false, 'expanded' => false, 'choices' => $this->objectChoices, 'choice_label' => 'name', 'choice_value' => 'id', - )) + ]) ->createView(); /** @var callable $selectedChecker */ @@ -1499,13 +1499,13 @@ class ChoiceTypeTest extends BaseTypeTest public function testMultipleSelectedObjectChoices() { - $view = $this->factory->create(static::TESTED_TYPE, array($this->objectChoices[3]), array( + $view = $this->factory->create(static::TESTED_TYPE, [$this->objectChoices[3]], [ 'multiple' => true, 'expanded' => false, 'choices' => $this->objectChoices, 'choice_label' => 'name', 'choice_value' => 'id', - )) + ]) ->createView(); /** @var callable $selectedChecker */ @@ -1517,9 +1517,9 @@ class ChoiceTypeTest extends BaseTypeTest public function testPassRequiredToView() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'choices' => $this->choices, - )) + ]) ->createView(); $this->assertTrue($view->vars['required']); @@ -1527,10 +1527,10 @@ class ChoiceTypeTest extends BaseTypeTest public function testPassNonRequiredToView() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => false, 'choices' => $this->choices, - )) + ]) ->createView(); $this->assertFalse($view->vars['required']); @@ -1538,10 +1538,10 @@ class ChoiceTypeTest extends BaseTypeTest public function testPassMultipleToView() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, 'choices' => $this->choices, - )) + ]) ->createView(); $this->assertTrue($view->vars['multiple']); @@ -1549,10 +1549,10 @@ class ChoiceTypeTest extends BaseTypeTest public function testPassExpandedToView() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'expanded' => true, 'choices' => $this->choices, - )) + ]) ->createView(); $this->assertTrue($view->vars['expanded']); @@ -1560,9 +1560,9 @@ class ChoiceTypeTest extends BaseTypeTest public function testPassChoiceTranslationDomainToView() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'choices' => $this->choices, - )) + ]) ->createView(); $this->assertNull($view->vars['choice_translation_domain']); @@ -1570,10 +1570,10 @@ class ChoiceTypeTest extends BaseTypeTest public function testChoiceTranslationDomainWithTrueValueToView() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'choices' => $this->choices, 'choice_translation_domain' => true, - )) + ]) ->createView(); $this->assertNull($view->vars['choice_translation_domain']); @@ -1581,10 +1581,10 @@ class ChoiceTypeTest extends BaseTypeTest public function testDefaultChoiceTranslationDomainIsSameAsTranslationDomainToView() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'choices' => $this->choices, 'translation_domain' => 'foo', - )) + ]) ->createView(); $this->assertEquals('foo', $view->vars['choice_translation_domain']); @@ -1593,9 +1593,9 @@ class ChoiceTypeTest extends BaseTypeTest public function testInheritChoiceTranslationDomainFromParent() { $view = $this->factory - ->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, array( + ->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, [ 'translation_domain' => 'domain', - )) + ]) ->add('child', static::TESTED_TYPE) ->getForm() ->createView(); @@ -1605,11 +1605,11 @@ class ChoiceTypeTest extends BaseTypeTest public function testPlaceholderIsNullByDefaultIfRequired() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'required' => true, 'choices' => $this->choices, - )) + ]) ->createView(); $this->assertNull($view->vars['placeholder']); @@ -1617,11 +1617,11 @@ class ChoiceTypeTest extends BaseTypeTest public function testPlaceholderIsEmptyStringByDefaultIfNotRequired() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => false, 'required' => false, 'choices' => $this->choices, - )) + ]) ->createView(); $this->assertSame('', $view->vars['placeholder']); @@ -1632,13 +1632,13 @@ class ChoiceTypeTest extends BaseTypeTest */ public function testPassPlaceholderToView($multiple, $expanded, $required, $placeholder, $viewValue) { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => $multiple, 'expanded' => $expanded, 'required' => $required, 'placeholder' => $placeholder, 'choices' => $this->choices, - )) + ]) ->createView(); $this->assertSame($viewValue, $view->vars['placeholder']); @@ -1650,13 +1650,13 @@ class ChoiceTypeTest extends BaseTypeTest */ public function testDontPassPlaceholderIfContainedInChoices($multiple, $expanded, $required, $placeholder, $viewValue) { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => $multiple, 'expanded' => $expanded, 'required' => $required, 'placeholder' => $placeholder, - 'choices' => array('Empty' => '', 'A' => 'a'), - )) + 'choices' => ['Empty' => '', 'A' => 'a'], + ]) ->createView(); $this->assertNull($view->vars['placeholder']); @@ -1665,138 +1665,138 @@ class ChoiceTypeTest extends BaseTypeTest public function getOptionsWithPlaceholder() { - return array( + return [ // single non-expanded - array(false, false, false, 'foobar', 'foobar'), - array(false, false, false, '', ''), - array(false, false, false, null, null), - array(false, false, false, false, null), - array(false, false, true, 'foobar', 'foobar'), - array(false, false, true, '', ''), - array(false, false, true, null, null), - array(false, false, true, false, null), + [false, false, false, 'foobar', 'foobar'], + [false, false, false, '', ''], + [false, false, false, null, null], + [false, false, false, false, null], + [false, false, true, 'foobar', 'foobar'], + [false, false, true, '', ''], + [false, false, true, null, null], + [false, false, true, false, null], // single expanded - array(false, true, false, 'foobar', 'foobar'), + [false, true, false, 'foobar', 'foobar'], // radios should never have an empty label - array(false, true, false, '', 'None'), - array(false, true, false, null, null), - array(false, true, false, false, null), + [false, true, false, '', 'None'], + [false, true, false, null, null], + [false, true, false, false, null], // required radios should never have a placeholder - array(false, true, true, 'foobar', null), - array(false, true, true, '', null), - array(false, true, true, null, null), - array(false, true, true, false, null), + [false, true, true, 'foobar', null], + [false, true, true, '', null], + [false, true, true, null, null], + [false, true, true, false, null], // multiple non-expanded - array(true, false, false, 'foobar', null), - array(true, false, false, '', null), - array(true, false, false, null, null), - array(true, false, false, false, null), - array(true, false, true, 'foobar', null), - array(true, false, true, '', null), - array(true, false, true, null, null), - array(true, false, true, false, null), + [true, false, false, 'foobar', null], + [true, false, false, '', null], + [true, false, false, null, null], + [true, false, false, false, null], + [true, false, true, 'foobar', null], + [true, false, true, '', null], + [true, false, true, null, null], + [true, false, true, false, null], // multiple expanded - array(true, true, false, 'foobar', null), - array(true, true, false, '', null), - array(true, true, false, null, null), - array(true, true, false, false, null), - array(true, true, true, 'foobar', null), - array(true, true, true, '', null), - array(true, true, true, null, null), - array(true, true, true, false, null), - ); + [true, true, false, 'foobar', null], + [true, true, false, '', null], + [true, true, false, null, null], + [true, true, false, false, null], + [true, true, true, 'foobar', null], + [true, true, true, '', null], + [true, true, true, null, null], + [true, true, true, false, null], + ]; } public function testPassChoicesToView() { - $choices = array('A' => 'a', 'B' => 'b', 'C' => 'c', 'D' => 'd'); - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $choices = ['A' => 'a', 'B' => 'b', 'C' => 'c', 'D' => 'd']; + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'choices' => $choices, - )) + ]) ->createView(); - $this->assertEquals(array( + $this->assertEquals([ new ChoiceView('a', 'a', 'A'), new ChoiceView('b', 'b', 'B'), new ChoiceView('c', 'c', 'C'), new ChoiceView('d', 'd', 'D'), - ), $view->vars['choices']); + ], $view->vars['choices']); } public function testPassPreferredChoicesToView() { - $choices = array('A' => 'a', 'B' => 'b', 'C' => 'c', 'D' => 'd'); - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $choices = ['A' => 'a', 'B' => 'b', 'C' => 'c', 'D' => 'd']; + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'choices' => $choices, - 'preferred_choices' => array('b', 'd'), - )) + 'preferred_choices' => ['b', 'd'], + ]) ->createView(); - $this->assertEquals(array( + $this->assertEquals([ 0 => new ChoiceView('a', 'a', 'A'), 2 => new ChoiceView('c', 'c', 'C'), - ), $view->vars['choices']); - $this->assertEquals(array( + ], $view->vars['choices']); + $this->assertEquals([ 1 => new ChoiceView('b', 'b', 'B'), 3 => new ChoiceView('d', 'd', 'D'), - ), $view->vars['preferred_choices']); + ], $view->vars['preferred_choices']); } public function testPassHierarchicalChoicesToView() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'choices' => $this->groupedChoices, - 'preferred_choices' => array('b', 'd'), - )) + 'preferred_choices' => ['b', 'd'], + ]) ->createView(); - $this->assertEquals(array( - 'Symfony' => new ChoiceGroupView('Symfony', array( + $this->assertEquals([ + 'Symfony' => new ChoiceGroupView('Symfony', [ 0 => new ChoiceView('a', 'a', 'Bernhard'), 2 => new ChoiceView('c', 'c', 'Kris'), - )), - 'Doctrine' => new ChoiceGroupView('Doctrine', array( + ]), + 'Doctrine' => new ChoiceGroupView('Doctrine', [ 4 => new ChoiceView('e', 'e', 'Roman'), - )), - ), $view->vars['choices']); - $this->assertEquals(array( - 'Symfony' => new ChoiceGroupView('Symfony', array( + ]), + ], $view->vars['choices']); + $this->assertEquals([ + 'Symfony' => new ChoiceGroupView('Symfony', [ 1 => new ChoiceView('b', 'b', 'Fabien'), - )), - 'Doctrine' => new ChoiceGroupView('Doctrine', array( + ]), + 'Doctrine' => new ChoiceGroupView('Doctrine', [ 3 => new ChoiceView('d', 'd', 'Jon'), - )), - ), $view->vars['preferred_choices']); + ]), + ], $view->vars['preferred_choices']); } public function testPassChoiceDataToView() { - $obj1 = (object) array('value' => 'a', 'label' => 'A'); - $obj2 = (object) array('value' => 'b', 'label' => 'B'); - $obj3 = (object) array('value' => 'c', 'label' => 'C'); - $obj4 = (object) array('value' => 'd', 'label' => 'D'); - $view = $this->factory->create(static::TESTED_TYPE, null, array( - 'choices' => array($obj1, $obj2, $obj3, $obj4), + $obj1 = (object) ['value' => 'a', 'label' => 'A']; + $obj2 = (object) ['value' => 'b', 'label' => 'B']; + $obj3 = (object) ['value' => 'c', 'label' => 'C']; + $obj4 = (object) ['value' => 'd', 'label' => 'D']; + $view = $this->factory->create(static::TESTED_TYPE, null, [ + 'choices' => [$obj1, $obj2, $obj3, $obj4], 'choice_label' => 'label', 'choice_value' => 'value', - )) + ]) ->createView(); - $this->assertEquals(array( + $this->assertEquals([ new ChoiceView($obj1, 'a', 'A'), new ChoiceView($obj2, 'b', 'B'), new ChoiceView($obj3, 'c', 'C'), new ChoiceView($obj4, 'd', 'D'), - ), $view->vars['choices']); + ], $view->vars['choices']); } public function testAdjustFullNameForMultipleNonExpanded() { - $view = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + $view = $this->factory->createNamed('name', static::TESTED_TYPE, null, [ 'multiple' => true, 'expanded' => false, 'choices' => $this->choices, - )) + ]) ->createView(); $this->assertSame('name[]', $view->vars['full_name']); @@ -1805,26 +1805,26 @@ class ChoiceTypeTest extends BaseTypeTest // https://github.com/symfony/symfony/issues/3298 public function testInitializeWithEmptyChoices() { - $this->assertInstanceOf('Symfony\Component\Form\FormInterface', $this->factory->createNamed('name', static::TESTED_TYPE, null, array( - 'choices' => array(), - ))); + $this->assertInstanceOf('Symfony\Component\Form\FormInterface', $this->factory->createNamed('name', static::TESTED_TYPE, null, [ + 'choices' => [], + ])); } public function testInitializeWithDefaultObjectChoice() { - $obj1 = (object) array('value' => 'a', 'label' => 'A'); - $obj2 = (object) array('value' => 'b', 'label' => 'B'); - $obj3 = (object) array('value' => 'c', 'label' => 'C'); - $obj4 = (object) array('value' => 'd', 'label' => 'D'); + $obj1 = (object) ['value' => 'a', 'label' => 'A']; + $obj2 = (object) ['value' => 'b', 'label' => 'B']; + $obj3 = (object) ['value' => 'c', 'label' => 'C']; + $obj4 = (object) ['value' => 'd', 'label' => 'D']; - $form = $this->factory->create(static::TESTED_TYPE, null, array( - 'choices' => array($obj1, $obj2, $obj3, $obj4), + $form = $this->factory->create(static::TESTED_TYPE, null, [ + 'choices' => [$obj1, $obj2, $obj3, $obj4], 'choice_label' => 'label', 'choice_value' => 'value', // Used to break because "data_class" was inferred, which needs to // remain null in every case (because it refers to the view format) 'data' => $obj3, - )); + ]); // Trigger data initialization $this->assertSame('c', $form->getViewData()); @@ -1840,12 +1840,12 @@ class ChoiceTypeTest extends BaseTypeTest public function testCustomChoiceTypeDoesNotInheritChoiceLabels() { $builder = $this->factory->createBuilder(); - $builder->add('choice', static::TESTED_TYPE, array( - 'choices' => array( + $builder->add('choice', static::TESTED_TYPE, [ + 'choices' => [ '1' => '1', '2' => '2', - ), - ) + ], + ] ); $builder->add('subChoice', 'Symfony\Component\Form\Tests\Fixtures\ChoiceSubType'); $form = $builder->getForm(); @@ -1861,11 +1861,11 @@ class ChoiceTypeTest extends BaseTypeTest */ public function testSubmitInvalidNestedValue($multiple, $expanded, $submissionData) { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'choices' => $this->choices, 'multiple' => $multiple, 'expanded' => $expanded, - )); + ]); $form->submit($submissionData); $this->assertFalse($form->isSynchronized()); @@ -1874,20 +1874,20 @@ class ChoiceTypeTest extends BaseTypeTest public function invalidNestedValueTestMatrix() { - return array( - 'non-multiple, non-expanded' => array(false, false, array(array())), - 'non-multiple, expanded' => array(false, true, array(array())), - 'multiple, non-expanded' => array(true, false, array(array())), - 'multiple, expanded' => array(true, true, array(array())), - ); + return [ + 'non-multiple, non-expanded' => [false, false, [[]]], + 'non-multiple, expanded' => [false, true, [[]]], + 'multiple, non-expanded' => [true, false, [[]]], + 'multiple, expanded' => [true, true, [[]]], + ]; } public function testInheritTranslationDomainFromParent() { $view = $this->factory - ->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, array( + ->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, [ 'translation_domain' => 'domain', - )) + ]) ->add('child', static::TESTED_TYPE) ->getForm() ->createView(); @@ -1897,9 +1897,9 @@ class ChoiceTypeTest extends BaseTypeTest public function testPassTranslationDomainToView() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'translation_domain' => 'domain', - )) + ]) ->createView(); $this->assertSame('domain', $view->vars['translation_domain']); @@ -1908,12 +1908,12 @@ class ChoiceTypeTest extends BaseTypeTest public function testPreferOwnTranslationDomain() { $view = $this->factory - ->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, array( + ->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, [ 'translation_domain' => 'parent_domain', - )) - ->add('child', static::TESTED_TYPE, array( + ]) + ->add('child', static::TESTED_TYPE, [ 'translation_domain' => 'domain', - )) + ]) ->getForm() ->createView(); @@ -1940,9 +1940,9 @@ class ChoiceTypeTest extends BaseTypeTest public function testPassLabelToView() { - $view = $this->factory->createNamed('__test___field', static::TESTED_TYPE, null, array( + $view = $this->factory->createNamed('__test___field', static::TESTED_TYPE, null, [ 'label' => 'My label', - )) + ]) ->createView(); $this->assertSame('My label', $view->vars['label']); @@ -1974,9 +1974,9 @@ class ChoiceTypeTest extends BaseTypeTest public function testPassDisabledAsOption() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'disabled' => true, - )); + ]); $this->assertTrue($form->isDisabled()); } @@ -2006,13 +2006,13 @@ class ChoiceTypeTest extends BaseTypeTest */ public function testTrimIsDisabled($multiple, $expanded) { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => $multiple, 'expanded' => $expanded, - 'choices' => array( + 'choices' => [ 'a' => '1', - ), - )); + ], + ]); $submittedData = ' 1'; @@ -2030,13 +2030,13 @@ class ChoiceTypeTest extends BaseTypeTest { $valueWhitWhiteSpace = '1 '; - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => $multiple, 'expanded' => $expanded, - 'choices' => array( + 'choices' => [ 'a' => $valueWhitWhiteSpace, - ), - )); + ], + ]); $form->submit($multiple ? (array) $valueWhitWhiteSpace : $valueWhitWhiteSpace); @@ -2046,11 +2046,11 @@ class ChoiceTypeTest extends BaseTypeTest public function provideTrimCases() { - return array( - 'Simple' => array(false, false), - 'Multiple' => array(true, false), - 'Simple expanded' => array(false, true), - 'Multiple expanded' => array(true, true), - ); + return [ + 'Simple' => [false, false], + 'Multiple' => [true, false], + 'Simple expanded' => [false, true], + 'Multiple expanded' => [true, true], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php index 9393c99d..50355a1d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php @@ -20,22 +20,22 @@ class CollectionTypeTest extends BaseTypeTest public function testContainsNoChildByDefault() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'entry_type' => TextTypeTest::TESTED_TYPE, - )); + ]); $this->assertCount(0, $form); } public function testSetDataAdjustsSize() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'entry_type' => TextTypeTest::TESTED_TYPE, - 'entry_options' => array( - 'attr' => array('maxlength' => 20), - ), - )); - $form->setData(array('foo@foo.com', 'foo@bar.com')); + 'entry_options' => [ + 'attr' => ['maxlength' => 20], + ], + ]); + $form->setData(['foo@foo.com', 'foo@bar.com']); $this->assertInstanceOf('Symfony\Component\Form\Form', $form[0]); $this->assertInstanceOf('Symfony\Component\Form\Form', $form[1]); @@ -47,7 +47,7 @@ class CollectionTypeTest extends BaseTypeTest $this->assertEquals(20, $formAttrs0['maxlength']); $this->assertEquals(20, $formAttrs1['maxlength']); - $form->setData(array('foo@baz.com')); + $form->setData(['foo@baz.com']); $this->assertInstanceOf('Symfony\Component\Form\Form', $form[0]); $this->assertArrayNotHasKey(1, $form); $this->assertCount(1, $form); @@ -58,20 +58,20 @@ class CollectionTypeTest extends BaseTypeTest public function testThrowsExceptionIfObjectIsNotTraversable() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'entry_type' => TextTypeTest::TESTED_TYPE, - )); + ]); $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Form\Exception\UnexpectedTypeException'); $form->setData(new \stdClass()); } public function testNotResizedIfSubmittedWithMissingData() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'entry_type' => TextTypeTest::TESTED_TYPE, - )); - $form->setData(array('foo@foo.com', 'bar@bar.com')); - $form->submit(array('foo@bar.com')); + ]); + $form->setData(['foo@foo.com', 'bar@bar.com']); + $form->submit(['foo@bar.com']); $this->assertTrue($form->has('0')); $this->assertTrue($form->has('1')); @@ -81,106 +81,106 @@ class CollectionTypeTest extends BaseTypeTest public function testResizedDownIfSubmittedWithMissingDataAndAllowDelete() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'entry_type' => TextTypeTest::TESTED_TYPE, 'allow_delete' => true, - )); - $form->setData(array('foo@foo.com', 'bar@bar.com')); - $form->submit(array('foo@foo.com')); + ]); + $form->setData(['foo@foo.com', 'bar@bar.com']); + $form->submit(['foo@foo.com']); $this->assertTrue($form->has('0')); $this->assertFalse($form->has('1')); $this->assertEquals('foo@foo.com', $form[0]->getData()); - $this->assertEquals(array('foo@foo.com'), $form->getData()); + $this->assertEquals(['foo@foo.com'], $form->getData()); } public function testResizedDownIfSubmittedWithEmptyDataAndDeleteEmpty() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'entry_type' => TextTypeTest::TESTED_TYPE, 'allow_delete' => true, 'delete_empty' => true, - )); + ]); - $form->setData(array('foo@foo.com', 'bar@bar.com')); - $form->submit(array('foo@foo.com', '')); + $form->setData(['foo@foo.com', 'bar@bar.com']); + $form->submit(['foo@foo.com', '']); $this->assertTrue($form->has('0')); $this->assertFalse($form->has('1')); $this->assertEquals('foo@foo.com', $form[0]->getData()); - $this->assertEquals(array('foo@foo.com'), $form->getData()); + $this->assertEquals(['foo@foo.com'], $form->getData()); } public function testResizedDownWithDeleteEmptyCallable() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'entry_type' => AuthorType::class, 'allow_delete' => true, 'delete_empty' => function (Author $obj = null) { return null === $obj || empty($obj->firstName); }, - )); + ]); - $form->setData(array(new Author('Bob'), new Author('Alice'))); - $form->submit(array(array('firstName' => 'Bob'), array('firstName' => ''))); + $form->setData([new Author('Bob'), new Author('Alice')]); + $form->submit([['firstName' => 'Bob'], ['firstName' => '']]); $this->assertTrue($form->has('0')); $this->assertFalse($form->has('1')); $this->assertEquals(new Author('Bob'), $form[0]->getData()); - $this->assertEquals(array(new Author('Bob')), $form->getData()); + $this->assertEquals([new Author('Bob')], $form->getData()); } public function testResizedDownIfSubmittedWithCompoundEmptyDataDeleteEmptyAndNoDataClass() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'entry_type' => AuthorType::class, // If the field is not required, no new Author will be created if the // form is completely empty - 'entry_options' => array('data_class' => null), + 'entry_options' => ['data_class' => null], 'allow_add' => true, 'allow_delete' => true, 'delete_empty' => function ($author) { return empty($author['firstName']); }, - )); - $form->setData(array(array('firstName' => 'first', 'lastName' => 'last'))); - $form->submit(array( - array('firstName' => 's_first', 'lastName' => 's_last'), - array('firstName' => '', 'lastName' => ''), - )); + ]); + $form->setData([['firstName' => 'first', 'lastName' => 'last']]); + $form->submit([ + ['firstName' => 's_first', 'lastName' => 's_last'], + ['firstName' => '', 'lastName' => ''], + ]); $this->assertTrue($form->has('0')); $this->assertFalse($form->has('1')); - $this->assertEquals(array('firstName' => 's_first', 'lastName' => 's_last'), $form[0]->getData()); - $this->assertEquals(array(array('firstName' => 's_first', 'lastName' => 's_last')), $form->getData()); + $this->assertEquals(['firstName' => 's_first', 'lastName' => 's_last'], $form[0]->getData()); + $this->assertEquals([['firstName' => 's_first', 'lastName' => 's_last']], $form->getData()); } public function testDontAddEmptyDataIfDeleteEmpty() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'entry_type' => TextTypeTest::TESTED_TYPE, 'allow_add' => true, 'delete_empty' => true, - )); + ]); - $form->setData(array('foo@foo.com')); - $form->submit(array('foo@foo.com', '')); + $form->setData(['foo@foo.com']); + $form->submit(['foo@foo.com', '']); $this->assertTrue($form->has('0')); $this->assertFalse($form->has('1')); $this->assertEquals('foo@foo.com', $form[0]->getData()); - $this->assertEquals(array('foo@foo.com'), $form->getData()); + $this->assertEquals(['foo@foo.com'], $form->getData()); } public function testNoDeleteEmptyIfDeleteNotAllowed() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'entry_type' => TextTypeTest::TESTED_TYPE, 'allow_delete' => false, 'delete_empty' => true, - )); + ]); - $form->setData(array('foo@foo.com')); - $form->submit(array('')); + $form->setData(['foo@foo.com']); + $form->submit(['']); $this->assertTrue($form->has('0')); $this->assertEquals('', $form[0]->getData()); @@ -188,34 +188,34 @@ class CollectionTypeTest extends BaseTypeTest public function testResizedDownIfSubmittedWithCompoundEmptyDataAndDeleteEmpty() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'entry_type' => 'Symfony\Component\Form\Tests\Fixtures\AuthorType', // If the field is not required, no new Author will be created if the // form is completely empty - 'entry_options' => array('required' => false), + 'entry_options' => ['required' => false], 'allow_add' => true, 'delete_empty' => true, - )); + ]); - $form->setData(array(new Author('first', 'last'))); - $form->submit(array( - array('firstName' => 's_first', 'lastName' => 's_last'), - array('firstName' => '', 'lastName' => ''), - )); + $form->setData([new Author('first', 'last')]); + $form->submit([ + ['firstName' => 's_first', 'lastName' => 's_last'], + ['firstName' => '', 'lastName' => ''], + ]); $this->assertTrue($form->has('0')); $this->assertFalse($form->has('1')); $this->assertEquals(new Author('s_first', 's_last'), $form[0]->getData()); - $this->assertEquals(array(new Author('s_first', 's_last')), $form->getData()); + $this->assertEquals([new Author('s_first', 's_last')], $form->getData()); } public function testNotResizedIfSubmittedWithExtraData() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'entry_type' => TextTypeTest::TESTED_TYPE, - )); - $form->setData(array('foo@bar.com')); - $form->submit(array('foo@foo.com', 'bar@bar.com')); + ]); + $form->setData(['foo@bar.com']); + $form->submit(['foo@foo.com', 'bar@bar.com']); $this->assertTrue($form->has('0')); $this->assertFalse($form->has('1')); @@ -224,27 +224,27 @@ class CollectionTypeTest extends BaseTypeTest public function testResizedUpIfSubmittedWithExtraDataAndAllowAdd() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'entry_type' => TextTypeTest::TESTED_TYPE, 'allow_add' => true, - )); - $form->setData(array('foo@bar.com')); - $form->submit(array('foo@bar.com', 'bar@bar.com')); + ]); + $form->setData(['foo@bar.com']); + $form->submit(['foo@bar.com', 'bar@bar.com']); $this->assertTrue($form->has('0')); $this->assertTrue($form->has('1')); $this->assertEquals('foo@bar.com', $form[0]->getData()); $this->assertEquals('bar@bar.com', $form[1]->getData()); - $this->assertEquals(array('foo@bar.com', 'bar@bar.com'), $form->getData()); + $this->assertEquals(['foo@bar.com', 'bar@bar.com'], $form->getData()); } public function testAllowAddButNoPrototype() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'entry_type' => FormTypeTest::TESTED_TYPE, 'allow_add' => true, 'prototype' => false, - )); + ]); $this->assertFalse($form->has('__name__')); } @@ -252,11 +252,11 @@ class CollectionTypeTest extends BaseTypeTest public function testPrototypeMultipartPropagation() { $form = $this->factory - ->create(static::TESTED_TYPE, null, array( + ->create(static::TESTED_TYPE, null, [ 'entry_type' => FileTypeTest::TESTED_TYPE, 'allow_add' => true, 'prototype' => true, - )) + ]) ; $this->assertTrue($form->createView()->vars['multipart']); @@ -264,11 +264,11 @@ class CollectionTypeTest extends BaseTypeTest public function testGetDataDoesNotContainsPrototypeNameBeforeDataAreSet() { - $form = $this->factory->create(static::TESTED_TYPE, array(), array( + $form = $this->factory->create(static::TESTED_TYPE, [], [ 'entry_type' => FileTypeTest::TESTED_TYPE, 'prototype' => true, 'allow_add' => true, - )); + ]); $data = $form->getData(); $this->assertArrayNotHasKey('__name__', $data); @@ -276,61 +276,61 @@ class CollectionTypeTest extends BaseTypeTest public function testGetDataDoesNotContainsPrototypeNameAfterDataAreSet() { - $form = $this->factory->create(static::TESTED_TYPE, array(), array( + $form = $this->factory->create(static::TESTED_TYPE, [], [ 'entry_type' => FileTypeTest::TESTED_TYPE, 'allow_add' => true, 'prototype' => true, - )); + ]); - $form->setData(array('foobar.png')); + $form->setData(['foobar.png']); $data = $form->getData(); $this->assertArrayNotHasKey('__name__', $data); } public function testPrototypeNameOption() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'entry_type' => FormTypeTest::TESTED_TYPE, 'prototype' => true, 'allow_add' => true, - )); + ]); $this->assertSame('__name__', $form->getConfig()->getAttribute('prototype')->getName(), '__name__ is the default'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'entry_type' => FormTypeTest::TESTED_TYPE, 'prototype' => true, 'allow_add' => true, 'prototype_name' => '__test__', - )); + ]); $this->assertSame('__test__', $form->getConfig()->getAttribute('prototype')->getName()); } public function testPrototypeDefaultLabel() { - $form = $this->factory->create(static::TESTED_TYPE, array(), array( + $form = $this->factory->create(static::TESTED_TYPE, [], [ 'entry_type' => FileTypeTest::TESTED_TYPE, 'allow_add' => true, 'prototype' => true, 'prototype_name' => '__test__', - )); + ]); $this->assertSame('__test__label__', $form->createView()->vars['prototype']->vars['label']); } public function testPrototypeData() { - $form = $this->factory->create(static::TESTED_TYPE, array(), array( + $form = $this->factory->create(static::TESTED_TYPE, [], [ 'allow_add' => true, 'prototype' => true, 'prototype_data' => 'foo', 'entry_type' => TextTypeTest::TESTED_TYPE, - 'entry_options' => array( + 'entry_options' => [ 'data' => 'bar', 'label' => false, - ), - )); + ], + ]); $this->assertSame('foo', $form->createView()->vars['prototype']->vars['value']); $this->assertFalse($form->createView()->vars['prototype']->vars['label']); @@ -338,25 +338,25 @@ class CollectionTypeTest extends BaseTypeTest public function testPrototypeDefaultRequired() { - $form = $this->factory->create(static::TESTED_TYPE, array(), array( + $form = $this->factory->create(static::TESTED_TYPE, [], [ 'entry_type' => FileTypeTest::TESTED_TYPE, 'allow_add' => true, 'prototype' => true, 'prototype_name' => '__test__', - )); + ]); $this->assertTrue($form->createView()->vars['prototype']->vars['required']); } public function testPrototypeSetNotRequired() { - $form = $this->factory->create(static::TESTED_TYPE, array(), array( + $form = $this->factory->create(static::TESTED_TYPE, [], [ 'entry_type' => FileTypeTest::TESTED_TYPE, 'allow_add' => true, 'prototype' => true, 'prototype_name' => '__test__', 'required' => false, - )); + ]); $this->assertFalse($form->createView()->vars['required'], 'collection is not required'); $this->assertFalse($form->createView()->vars['prototype']->vars['required'], '"prototype" should not be required'); @@ -364,16 +364,16 @@ class CollectionTypeTest extends BaseTypeTest public function testPrototypeSetNotRequiredIfParentNotRequired() { - $child = $this->factory->create(static::TESTED_TYPE, array(), array( + $child = $this->factory->create(static::TESTED_TYPE, [], [ 'entry_type' => FileTypeTest::TESTED_TYPE, 'allow_add' => true, 'prototype' => true, 'prototype_name' => '__test__', - )); + ]); - $parent = $this->factory->create(FormTypeTest::TESTED_TYPE, array(), array( + $parent = $this->factory->create(FormTypeTest::TESTED_TYPE, [], [ 'required' => false, - )); + ]); $child->setParent($parent); $this->assertFalse($parent->createView()->vars['required'], 'Parent is not required'); @@ -383,19 +383,19 @@ class CollectionTypeTest extends BaseTypeTest public function testPrototypeNotOverrideRequiredByEntryOptionsInFavorOfParent() { - $child = $this->factory->create(static::TESTED_TYPE, array(), array( + $child = $this->factory->create(static::TESTED_TYPE, [], [ 'entry_type' => FileTypeTest::TESTED_TYPE, 'allow_add' => true, 'prototype' => true, 'prototype_name' => '__test__', - 'entry_options' => array( + 'entry_options' => [ 'required' => true, - ), - )); + ], + ]); - $parent = $this->factory->create(FormTypeTest::TESTED_TYPE, array(), array( + $parent = $this->factory->create(FormTypeTest::TESTED_TYPE, [], [ 'required' => false, - )); + ]); $child->setParent($parent); @@ -406,10 +406,10 @@ class CollectionTypeTest extends BaseTypeTest public function testSubmitNull($expected = null, $norm = null, $view = null) { - parent::testSubmitNull(array(), array(), array()); + parent::testSubmitNull([], [], []); } - public function testSubmitNullUsesDefaultEmptyData($emptyData = array(), $expectedData = array()) + public function testSubmitNullUsesDefaultEmptyData($emptyData = [], $expectedData = []) { // resize form listener always set an empty array parent::testSubmitNullUsesDefaultEmptyData($emptyData, $expectedData); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php index 4886b340..96fce79f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; use Symfony\Component\Form\ChoiceList\View\ChoiceView; +use Symfony\Component\Form\Extension\Core\Type\CountryType; use Symfony\Component\Intl\Util\IntlTestHelper; class CountryTypeTest extends BaseTypeTest @@ -43,7 +44,7 @@ class CountryTypeTest extends BaseTypeTest $choices = $this->factory->create(static::TESTED_TYPE, 'country') ->createView()->vars['choices']; - $countryCodes = array(); + $countryCodes = []; foreach ($choices as $choice) { $countryCodes[] = $choice->value; @@ -61,4 +62,11 @@ class CountryTypeTest extends BaseTypeTest { parent::testSubmitNullUsesDefaultEmptyData($emptyData, $expectedData); } + + public function testInvalidChoiceValuesAreDropped() + { + $type = new CountryType(); + + $this->assertSame([], $type->loadChoicesForValues(['foo'])); + } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php index 71c374b4..ae8c960c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; use Symfony\Component\Form\ChoiceList\View\ChoiceView; +use Symfony\Component\Form\Extension\Core\Type\CurrencyType; use Symfony\Component\Intl\Util\IntlTestHelper; class CurrencyTypeTest extends BaseTypeTest @@ -44,4 +45,11 @@ class CurrencyTypeTest extends BaseTypeTest { parent::testSubmitNullUsesDefaultEmptyData($emptyData, $expectedData); } + + public function testInvalidChoiceValuesAreDropped() + { + $type = new CurrencyType(); + + $this->assertSame([], $type->loadChoicesForValues(['foo'])); + } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateIntervalTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateIntervalTypeTest.php index 9e7ceceb..6e19b9fc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateIntervalTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateIntervalTypeTest.php @@ -21,39 +21,39 @@ class DateIntervalTypeTest extends BaseTypeTest public function testSubmitDateInterval() { - $form = $this->factory->create(static::TESTED_TYPE, null, array('input' => 'dateinterval')); + $form = $this->factory->create(static::TESTED_TYPE, null, ['input' => 'dateinterval']); - $form->submit(array( + $form->submit([ 'years' => '7', 'months' => '6', 'days' => '5', - )); + ]); $this->assertDateIntervalEquals(new \DateInterval('P7Y6M5D'), $form->getData()); } public function testSubmitString() { - $form = $this->factory->create(static::TESTED_TYPE, null, array('input' => 'string')); + $form = $this->factory->create(static::TESTED_TYPE, null, ['input' => 'string']); - $form->submit(array( + $form->submit([ 'years' => '7', 'months' => '6', 'days' => '5', - )); + ]); $this->assertSame('P7Y6M5D', $form->getData()); } public function testSubmitArray() { - $form = $this->factory->create(static::TESTED_TYPE, null, array('input' => 'array')); + $form = $this->factory->create(static::TESTED_TYPE, null, ['input' => 'array']); - $input = array( + $input = [ 'years' => '7', 'months' => '6', 'days' => '5', - ); + ]; $form->submit($input); @@ -64,16 +64,16 @@ class DateIntervalTypeTest extends BaseTypeTest { $interval = new \DateInterval('P7Y5D'); - $form = $this->factory->create(static::TESTED_TYPE, $interval, array( + $form = $this->factory->create(static::TESTED_TYPE, $interval, [ 'input' => 'dateinterval', 'with_months' => false, - )); + ]); - $form->submit(array( + $form->submit([ 'years' => '7', 'months' => '6', 'days' => '5', - )); + ]); $this->assertDateIntervalEquals($interval, $form->getData()); $this->assertTrue($form->isSynchronized()); @@ -82,21 +82,21 @@ class DateIntervalTypeTest extends BaseTypeTest public function testSubmitWithTime() { $interval = new \DateInterval('P7Y6M5DT4H3M2S'); - $form = $this->factory->create(static::TESTED_TYPE, $interval, array( + $form = $this->factory->create(static::TESTED_TYPE, $interval, [ 'input' => 'dateinterval', 'with_hours' => true, 'with_minutes' => true, 'with_seconds' => true, - )); + ]); - $form->submit(array( + $form->submit([ 'years' => '7', 'months' => '6', 'days' => '5', 'hours' => '4', 'minutes' => '3', 'seconds' => '2', - )); + ]); $this->assertDateIntervalEquals($interval, $form->getData()); $this->assertTrue($form->isSynchronized()); @@ -104,34 +104,34 @@ class DateIntervalTypeTest extends BaseTypeTest public function testSubmitWithWeeks() { - $form = $this->factory->create(static::TESTED_TYPE, new \DateInterval('P0Y'), array( + $form = $this->factory->create(static::TESTED_TYPE, new \DateInterval('P0Y'), [ 'input' => 'dateinterval', 'with_years' => false, 'with_months' => false, 'with_weeks' => true, 'with_days' => false, - )); + ]); - $form->submit(array( + $form->submit([ 'weeks' => '30', - )); + ]); $this->assertDateIntervalEquals(new \DateInterval('P30W'), $form->getData()); } public function testSubmitWithInvert() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'input' => 'dateinterval', 'with_invert' => true, - )); + ]); - $form->submit(array( + $form->submit([ 'years' => '7', 'months' => '6', 'days' => '5', 'invert' => true, - )); + ]); $interval = new \DateInterval('P7Y6M5D'); $interval->invert = 1; @@ -141,10 +141,10 @@ class DateIntervalTypeTest extends BaseTypeTest public function testSubmitStringSingleText() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'input' => 'string', 'widget' => 'single_text', - )); + ]); $interval = 'P7Y6M5D'; @@ -156,13 +156,13 @@ class DateIntervalTypeTest extends BaseTypeTest public function testSubmitStringSingleTextWithSeconds() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'input' => 'string', 'widget' => 'single_text', 'with_hours' => true, 'with_minutes' => true, 'with_seconds' => true, - )); + ]); $interval = 'P7Y6M5DT4H3M2S'; @@ -174,19 +174,19 @@ class DateIntervalTypeTest extends BaseTypeTest public function testSubmitArrayInteger() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'integer', 'with_invert' => true, - )); + ]); $years = '7'; - $form->submit(array( + $form->submit([ 'years' => '7', 'months' => '6', 'days' => '5', 'invert' => true, - )); + ]); $this->assertSame($years, $form['years']->getData()); $this->assertSame($years, $form['years']->getViewData()); @@ -201,10 +201,10 @@ class DateIntervalTypeTest extends BaseTypeTest public function testPassDefaultPlaceholderToViewIfNotRequired() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => false, 'with_seconds' => true, - )) + ]) ->createView(); $this->assertSame('', $view['years']->vars['placeholder']); @@ -215,10 +215,10 @@ class DateIntervalTypeTest extends BaseTypeTest public function testPassNoPlaceholderToViewIfRequired() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => true, 'with_seconds' => true, - )) + ]) ->createView(); $this->assertNull($view['years']->vars['placeholder']); @@ -229,10 +229,10 @@ class DateIntervalTypeTest extends BaseTypeTest public function testPassPlaceholderAsString() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'placeholder' => 'Empty', 'with_seconds' => true, - )) + ]) ->createView(); $this->assertSame('Empty', $view['years']->vars['placeholder']); @@ -243,19 +243,19 @@ class DateIntervalTypeTest extends BaseTypeTest public function testPassPlaceholderAsArray() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( - 'placeholder' => array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ + 'placeholder' => [ 'years' => 'Empty years', 'months' => 'Empty months', 'days' => 'Empty days', 'hours' => 'Empty hours', 'minutes' => 'Empty minutes', 'seconds' => 'Empty seconds', - ), + ], 'with_hours' => true, 'with_minutes' => true, 'with_seconds' => true, - )) + ]) ->createView(); $this->assertSame('Empty years', $view['years']->vars['placeholder']); @@ -268,18 +268,18 @@ class DateIntervalTypeTest extends BaseTypeTest public function testPassPlaceholderAsPartialArrayAddEmptyIfNotRequired() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => false, - 'placeholder' => array( + 'placeholder' => [ 'years' => 'Empty years', 'days' => 'Empty days', 'hours' => 'Empty hours', 'seconds' => 'Empty seconds', - ), + ], 'with_hours' => true, 'with_minutes' => true, 'with_seconds' => true, - )) + ]) ->createView(); $this->assertSame('Empty years', $view['years']->vars['placeholder']); @@ -292,18 +292,18 @@ class DateIntervalTypeTest extends BaseTypeTest public function testPassPlaceholderAsPartialArrayAddNullIfRequired() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => true, - 'placeholder' => array( + 'placeholder' => [ 'years' => 'Empty years', 'days' => 'Empty days', 'hours' => 'Empty hours', 'seconds' => 'Empty seconds', - ), + ], 'with_hours' => true, 'with_minutes' => true, 'with_seconds' => true, - )) + ]) ->createView(); $this->assertSame('Empty years', $view['years']->vars['placeholder']); @@ -321,18 +321,18 @@ class DateIntervalTypeTest extends BaseTypeTest $form['years']->addError($error); - $this->assertSame(array(), iterator_to_array($form['years']->getErrors())); - $this->assertSame(array($error), iterator_to_array($form->getErrors())); + $this->assertSame([], iterator_to_array($form['years']->getErrors())); + $this->assertSame([$error], iterator_to_array($form->getErrors())); } public function testTranslationsAreDisabledForChoiceWidget() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'choice', 'with_hours' => true, 'with_minutes' => true, 'with_seconds' => true, - )); + ]); $this->assertFalse($form->get('years')->getConfig()->getOption('choice_translation_domain')); $this->assertFalse($form->get('months')->getConfig()->getOption('choice_translation_domain')); @@ -344,11 +344,11 @@ class DateIntervalTypeTest extends BaseTypeTest public function testInvertDoesNotInheritRequiredOption() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'input' => 'dateinterval', 'with_invert' => true, 'required' => true, - )); + ]); $this->assertFalse($form->get('invert')->getConfig()->getOption('required')); } @@ -358,13 +358,13 @@ class DateIntervalTypeTest extends BaseTypeTest $form = $this->factory->create( static::TESTED_TYPE, null, - array( + [ 'required' => true, 'with_invert' => true, 'with_hours' => true, 'with_minutes' => true, 'with_seconds' => true, - 'labels' => array( + 'labels' => [ 'invert' => 'form.trans.invert', 'years' => 'form.trans.years', 'months' => 'form.trans.months', @@ -372,8 +372,8 @@ class DateIntervalTypeTest extends BaseTypeTest 'hours' => 'form.trans.hours', 'minutes' => 'form.trans.minutes', 'seconds' => 'form.trans.seconds', - ), - ) + ], + ] ); $view = $form->createView(); @@ -388,15 +388,15 @@ class DateIntervalTypeTest extends BaseTypeTest public function testInvertDefaultLabel() { - $form = $this->factory->create(static::TESTED_TYPE, null, array('with_invert' => true)); + $form = $this->factory->create(static::TESTED_TYPE, null, ['with_invert' => true]); $view = $form->createView(); $this->assertSame('Negative interval', $view['invert']->vars['label']); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'with_invert' => true, - 'labels' => array('invert' => null), - )); + 'labels' => ['invert' => null], + ]); $view = $form->createView(); $this->assertSame('Negative interval', $view['invert']->vars['label']); @@ -404,22 +404,22 @@ class DateIntervalTypeTest extends BaseTypeTest public function testSubmitNull($expected = null, $norm = null, $view = null) { - parent::testSubmitNull($expected, $norm, array( + parent::testSubmitNull($expected, $norm, [ 'years' => '', 'months' => '', 'days' => '', - )); + ]); } - public function testSubmitNullUsesDefaultEmptyData($emptyData = array(), $expectedData = null) + public function testSubmitNullUsesDefaultEmptyData($emptyData = [], $expectedData = null) { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'empty_data' => $emptyData, - )); + ]); $form->submit(null); // view transformer writes back empty strings in the view data - $this->assertSame(array('years' => '', 'months' => '', 'days' => ''), $form->getViewData()); + $this->assertSame(['years' => '', 'months' => '', 'days' => ''], $form->getViewData()); $this->assertSame($expectedData, $form->getNormData()); $this->assertSame($expectedData, $form->getData()); } @@ -429,10 +429,10 @@ class DateIntervalTypeTest extends BaseTypeTest */ public function testSubmitNullUsesDateEmptyData($widget, $emptyData, $expectedData) { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => $widget, 'empty_data' => $emptyData, - )); + ]); $form->submit(null); $this->assertSame($emptyData, $form->getViewData()); @@ -444,11 +444,11 @@ class DateIntervalTypeTest extends BaseTypeTest { $expectedData = \DateInterval::createFromDateString('6 years and 4 months'); - return array( - 'Simple field' => array('single_text', 'P6Y4M0D', $expectedData), - 'Compound text field' => array('text', array('years' => '06', 'months' => '04', 'days' => '00'), $expectedData), - 'Compound integer field' => array('integer', array('years' => '6', 'months' => '4', 'days' => '0'), $expectedData), - 'Compound choice field' => array('choice', array('years' => '6', 'months' => '4', 'days' => '0'), $expectedData), - ); + return [ + 'Simple field' => ['single_text', 'P6Y4M0D', $expectedData], + 'Compound text field' => ['text', ['years' => '06', 'months' => '04', 'days' => '00'], $expectedData], + 'Compound integer field' => ['integer', ['years' => '6', 'months' => '4', 'days' => '0'], $expectedData], + 'Compound choice field' => ['choice', ['years' => '6', 'months' => '4', 'days' => '0'], $expectedData], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php index d219d9e3..e3f3b729 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php @@ -26,26 +26,26 @@ class DateTimeTypeTest extends BaseTypeTest public function testSubmitDateTime() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'date_widget' => 'choice', - 'years' => array(2010), + 'years' => [2010], 'time_widget' => 'choice', 'input' => 'datetime', - )); + ]); - $form->submit(array( - 'date' => array( + $form->submit([ + 'date' => [ 'day' => '2', 'month' => '6', 'year' => '2010', - ), - 'time' => array( + ], + 'time' => [ 'hour' => '3', 'minute' => '4', - ), - )); + ], + ]); $dateTime = new \DateTime('2010-06-02 03:04:00 UTC'); @@ -54,52 +54,52 @@ class DateTimeTypeTest extends BaseTypeTest public function testSubmitString() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'string', 'date_widget' => 'choice', - 'years' => array(2010), + 'years' => [2010], 'time_widget' => 'choice', - )); + ]); - $form->submit(array( - 'date' => array( + $form->submit([ + 'date' => [ 'day' => '2', 'month' => '6', 'year' => '2010', - ), - 'time' => array( + ], + 'time' => [ 'hour' => '3', 'minute' => '4', - ), - )); + ], + ]); $this->assertEquals('2010-06-02 03:04:00', $form->getData()); } public function testSubmitTimestamp() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'timestamp', 'date_widget' => 'choice', - 'years' => array(2010), + 'years' => [2010], 'time_widget' => 'choice', - )); + ]); - $form->submit(array( - 'date' => array( + $form->submit([ + 'date' => [ 'day' => '2', 'month' => '6', 'year' => '2010', - ), - 'time' => array( + ], + 'time' => [ 'hour' => '3', 'minute' => '4', - ), - )); + ], + ]); $dateTime = new \DateTime('2010-06-02 03:04:00 UTC'); @@ -108,28 +108,28 @@ class DateTimeTypeTest extends BaseTypeTest public function testSubmitWithoutMinutes() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'date_widget' => 'choice', - 'years' => array(2010), + 'years' => [2010], 'time_widget' => 'choice', 'input' => 'datetime', 'with_minutes' => false, - )); + ]); $form->setData(new \DateTime()); - $input = array( - 'date' => array( + $input = [ + 'date' => [ 'day' => '2', 'month' => '6', 'year' => '2010', - ), - 'time' => array( + ], + 'time' => [ 'hour' => '3', - ), - ); + ], + ]; $form->submit($input); @@ -138,30 +138,30 @@ class DateTimeTypeTest extends BaseTypeTest public function testSubmitWithSeconds() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'date_widget' => 'choice', - 'years' => array(2010), + 'years' => [2010], 'time_widget' => 'choice', 'input' => 'datetime', 'with_seconds' => true, - )); + ]); $form->setData(new \DateTime()); - $input = array( - 'date' => array( + $input = [ + 'date' => [ 'day' => '2', 'month' => '6', 'year' => '2010', - ), - 'time' => array( + ], + 'time' => [ 'hour' => '3', 'minute' => '4', 'second' => '5', - ), - ); + ], + ]; $form->submit($input); @@ -170,30 +170,30 @@ class DateTimeTypeTest extends BaseTypeTest public function testSubmitDifferentTimezones() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'America/New_York', 'view_timezone' => 'Pacific/Tahiti', 'date_widget' => 'choice', - 'years' => array(2010), + 'years' => [2010], 'time_widget' => 'choice', 'input' => 'string', 'with_seconds' => true, - )); + ]); $dateTime = new \DateTime('2010-06-02 03:04:05 Pacific/Tahiti'); - $form->submit(array( - 'date' => array( + $form->submit([ + 'date' => [ 'day' => (int) $dateTime->format('d'), 'month' => (int) $dateTime->format('m'), 'year' => (int) $dateTime->format('Y'), - ), - 'time' => array( + ], + 'time' => [ 'hour' => (int) $dateTime->format('H'), 'minute' => (int) $dateTime->format('i'), 'second' => (int) $dateTime->format('s'), - ), - )); + ], + ]); $dateTime->setTimezone(new \DateTimeZone('America/New_York')); @@ -202,12 +202,12 @@ class DateTimeTypeTest extends BaseTypeTest public function testSubmitDifferentTimezonesDateTime() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'America/New_York', 'view_timezone' => 'Pacific/Tahiti', 'widget' => 'single_text', 'input' => 'datetime', - )); + ]); $outputTime = new \DateTime('2010-06-02 03:04:00 Pacific/Tahiti'); @@ -221,12 +221,12 @@ class DateTimeTypeTest extends BaseTypeTest public function testSubmitStringSingleText() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'string', 'widget' => 'single_text', - )); + ]); $form->submit('2010-06-02T03:04:00'); @@ -236,13 +236,13 @@ class DateTimeTypeTest extends BaseTypeTest public function testSubmitStringSingleTextWithSeconds() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'string', 'widget' => 'single_text', 'with_seconds' => true, - )); + ]); $form->submit('2010-06-02T03:04:05'); @@ -252,19 +252,19 @@ class DateTimeTypeTest extends BaseTypeTest public function testSubmitDifferentPattern() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'date_format' => 'MM*yyyy*dd', 'date_widget' => 'single_text', 'time_widget' => 'single_text', 'input' => 'datetime', - )); + ]); $dateTime = new \DateTime('2010-06-02 03:04'); - $form->submit(array( + $form->submit([ 'date' => '06*2010*02', 'time' => '03:04', - )); + ]); $this->assertEquals($dateTime, $form->getData()); } @@ -278,9 +278,9 @@ class DateTimeTypeTest extends BaseTypeTest public function testSingleTextWidgetShouldUseTheRightInputType() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'single_text', - )) + ]) ->createView(); $this->assertEquals('datetime-local', $view->vars['type']); @@ -288,10 +288,10 @@ class DateTimeTypeTest extends BaseTypeTest public function testPassDefaultPlaceholderToViewIfNotRequired() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => false, 'with_seconds' => true, - )) + ]) ->createView(); $this->assertSame('', $view['date']['year']->vars['placeholder']); @@ -304,10 +304,10 @@ class DateTimeTypeTest extends BaseTypeTest public function testPassNoPlaceholderToViewIfRequired() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => true, 'with_seconds' => true, - )) + ]) ->createView(); $this->assertNull($view['date']['year']->vars['placeholder']); @@ -320,10 +320,10 @@ class DateTimeTypeTest extends BaseTypeTest public function testPassPlaceholderAsString() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'placeholder' => 'Empty', 'with_seconds' => true, - )) + ]) ->createView(); $this->assertSame('Empty', $view['date']['year']->vars['placeholder']); @@ -336,17 +336,17 @@ class DateTimeTypeTest extends BaseTypeTest public function testPassPlaceholderAsArray() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( - 'placeholder' => array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ + 'placeholder' => [ 'year' => 'Empty year', 'month' => 'Empty month', 'day' => 'Empty day', 'hour' => 'Empty hour', 'minute' => 'Empty minute', 'second' => 'Empty second', - ), + ], 'with_seconds' => true, - )) + ]) ->createView(); $this->assertSame('Empty year', $view['date']['year']->vars['placeholder']); @@ -359,16 +359,16 @@ class DateTimeTypeTest extends BaseTypeTest public function testPassPlaceholderAsPartialArrayAddEmptyIfNotRequired() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => false, - 'placeholder' => array( + 'placeholder' => [ 'year' => 'Empty year', 'day' => 'Empty day', 'hour' => 'Empty hour', 'second' => 'Empty second', - ), + ], 'with_seconds' => true, - )) + ]) ->createView(); $this->assertSame('Empty year', $view['date']['year']->vars['placeholder']); @@ -381,16 +381,16 @@ class DateTimeTypeTest extends BaseTypeTest public function testPassPlaceholderAsPartialArrayAddNullIfRequired() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => true, - 'placeholder' => array( + 'placeholder' => [ 'year' => 'Empty year', 'day' => 'Empty day', 'hour' => 'Empty hour', 'second' => 'Empty second', - ), + ], 'with_seconds' => true, - )) + ]) ->createView(); $this->assertSame('Empty year', $view['date']['year']->vars['placeholder']); @@ -403,9 +403,9 @@ class DateTimeTypeTest extends BaseTypeTest public function testPassHtml5TypeIfSingleTextAndHtml5Format() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'single_text', - )) + ]) ->createView(); $this->assertSame('datetime-local', $view->vars['type']); @@ -413,10 +413,10 @@ class DateTimeTypeTest extends BaseTypeTest public function testDontPassHtml5TypeIfHtml5NotAllowed() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'single_text', 'html5' => false, - )) + ]) ->createView(); $this->assertArrayNotHasKey('type', $view->vars); @@ -424,10 +424,10 @@ class DateTimeTypeTest extends BaseTypeTest public function testDontPassHtml5TypeIfNotHtml5Format() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'single_text', 'format' => 'yyyy-MM-dd HH:mm', - )) + ]) ->createView(); $this->assertArrayNotHasKey('type', $view->vars); @@ -435,9 +435,9 @@ class DateTimeTypeTest extends BaseTypeTest public function testDontPassHtml5TypeIfNotSingleText() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'text', - )) + ]) ->createView(); $this->assertArrayNotHasKey('type', $view->vars); @@ -450,21 +450,21 @@ class DateTimeTypeTest extends BaseTypeTest $form['date']->addError($error); - $this->assertSame(array(), iterator_to_array($form['date']->getErrors())); - $this->assertSame(array($error), iterator_to_array($form->getErrors())); + $this->assertSame([], iterator_to_array($form['date']->getErrors())); + $this->assertSame([$error], iterator_to_array($form->getErrors())); } public function testDateTypeSingleTextErrorsBubbleUp() { $error = new FormError('Invalid!'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'date_widget' => 'single_text', - )); + ]); $form['date']->addError($error); - $this->assertSame(array(), iterator_to_array($form['date']->getErrors())); - $this->assertSame(array($error), iterator_to_array($form->getErrors())); + $this->assertSame([], iterator_to_array($form['date']->getErrors())); + $this->assertSame([$error], iterator_to_array($form->getErrors())); } public function testTimeTypeChoiceErrorsBubbleUp() @@ -474,28 +474,28 @@ class DateTimeTypeTest extends BaseTypeTest $form['time']->addError($error); - $this->assertSame(array(), iterator_to_array($form['time']->getErrors())); - $this->assertSame(array($error), iterator_to_array($form->getErrors())); + $this->assertSame([], iterator_to_array($form['time']->getErrors())); + $this->assertSame([$error], iterator_to_array($form->getErrors())); } public function testTimeTypeSingleTextErrorsBubbleUp() { $error = new FormError('Invalid!'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'time_widget' => 'single_text', - )); + ]); $form['time']->addError($error); - $this->assertSame(array(), iterator_to_array($form['time']->getErrors())); - $this->assertSame(array($error), iterator_to_array($form->getErrors())); + $this->assertSame([], iterator_to_array($form['time']->getErrors())); + $this->assertSame([$error], iterator_to_array($form->getErrors())); } public function testPassDefaultChoiceTranslationDomain() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'with_seconds' => true, - )); + ]); $view = $form->createView(); @@ -509,10 +509,10 @@ class DateTimeTypeTest extends BaseTypeTest public function testPassChoiceTranslationDomainAsString() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'choice_translation_domain' => 'messages', 'with_seconds' => true, - )); + ]); $view = $form->createView(); $this->assertSame('messages', $view['date']['year']->vars['choice_translation_domain']); @@ -525,15 +525,15 @@ class DateTimeTypeTest extends BaseTypeTest public function testPassChoiceTranslationDomainAsArray() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( - 'choice_translation_domain' => array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ + 'choice_translation_domain' => [ 'year' => 'foo', 'month' => 'test', 'hour' => 'foo', 'second' => 'test', - ), + ], 'with_seconds' => true, - )); + ]); $view = $form->createView(); $this->assertSame('foo', $view['date']['year']->vars['choice_translation_domain']); @@ -546,34 +546,34 @@ class DateTimeTypeTest extends BaseTypeTest public function testSubmitNull($expected = null, $norm = null, $view = null) { - parent::testSubmitNull($expected, $norm, array( + parent::testSubmitNull($expected, $norm, [ // View data is an array of choice values array - 'date' => array('year' => '', 'month' => '', 'day' => ''), - 'time' => array('hour' => '', 'minute' => ''), - )); + 'date' => ['year' => '', 'month' => '', 'day' => ''], + 'time' => ['hour' => '', 'minute' => ''], + ]); } public function testSubmitNullWithText() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'text', - )); + ]); $form->submit(null); $this->assertNull($form->getData()); $this->assertNull($form->getNormData()); - $this->assertSame(array( + $this->assertSame([ // View data is an array of choice values array - 'date' => array('year' => '', 'month' => '', 'day' => ''), - 'time' => array('hour' => '', 'minute' => ''), - ), $form->getViewData()); + 'date' => ['year' => '', 'month' => '', 'day' => ''], + 'time' => ['hour' => '', 'minute' => ''], + ], $form->getViewData()); } public function testSubmitNullWithSingleText() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'single_text', - )); + ]); $form->submit(null); $this->assertNull($form->getData()); @@ -581,16 +581,16 @@ class DateTimeTypeTest extends BaseTypeTest $this->assertSame('', $form->getViewData()); } - public function testSubmitNullUsesDefaultEmptyData($emptyData = array(), $expectedData = null) + public function testSubmitNullUsesDefaultEmptyData($emptyData = [], $expectedData = null) { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'empty_data' => $emptyData, - )); + ]); $form->submit(null); // view transformer writes back empty strings in the view data $this->assertSame( - array('date' => array('year' => '', 'month' => '', 'day' => ''), 'time' => array('hour' => '', 'minute' => '')), + ['date' => ['year' => '', 'month' => '', 'day' => ''], 'time' => ['hour' => '', 'minute' => '']], $form->getViewData() ); $this->assertSame($expectedData, $form->getNormData()); @@ -602,10 +602,10 @@ class DateTimeTypeTest extends BaseTypeTest */ public function testSubmitNullUsesDateEmptyData($widget, $emptyData, $expectedData) { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => $widget, 'empty_data' => $emptyData, - )); + ]); $form->submit(null); $this->assertSame($emptyData, $form->getViewData()); @@ -617,10 +617,10 @@ class DateTimeTypeTest extends BaseTypeTest { $expectedData = \DateTime::createFromFormat('Y-m-d H:i', '2018-11-11 21:23'); - return array( - 'Simple field' => array('single_text', '2018-11-11T21:23:00', $expectedData), - 'Compound text field' => array('text', array('date' => array('year' => '2018', 'month' => '11', 'day' => '11'), 'time' => array('hour' => '21', 'minute' => '23')), $expectedData), - 'Compound choice field' => array('choice', array('date' => array('year' => '2018', 'month' => '11', 'day' => '11'), 'time' => array('hour' => '21', 'minute' => '23')), $expectedData), - ); + return [ + 'Simple field' => ['single_text', '2018-11-11T21:23:00', $expectedData], + 'Compound text field' => ['text', ['date' => ['year' => '2018', 'month' => '11', 'day' => '11'], 'time' => ['hour' => '21', 'minute' => '23']], $expectedData], + 'Compound choice field' => ['choice', ['date' => ['year' => '2018', 'month' => '11', 'day' => '11'], 'time' => ['hour' => '21', 'minute' => '23']], $expectedData], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php index 169d18b6..247a5d4b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php @@ -38,9 +38,9 @@ class DateTypeTest extends BaseTypeTest */ public function testInvalidWidgetOption() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'fake_widget', - )); + ]); } /** @@ -48,19 +48,19 @@ class DateTypeTest extends BaseTypeTest */ public function testInvalidInputOption() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'input' => 'fake_input', - )); + ]); } public function testSubmitFromSingleTextDateTimeWithDefaultFormat() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'widget' => 'single_text', 'input' => 'datetime', - )); + ]); $form->submit('2010-06-02'); @@ -70,13 +70,13 @@ class DateTypeTest extends BaseTypeTest public function testSubmitFromSingleTextDateTimeWithCustomFormat() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'widget' => 'single_text', 'input' => 'datetime', 'format' => 'yyyy', - )); + ]); $form->submit('2010'); @@ -91,13 +91,13 @@ class DateTypeTest extends BaseTypeTest \Locale::setDefault('de_DE'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'format' => \IntlDateFormatter::MEDIUM, 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'widget' => 'single_text', 'input' => 'datetime', - )); + ]); $form->submit('2.6.2010'); @@ -112,13 +112,13 @@ class DateTypeTest extends BaseTypeTest \Locale::setDefault('de_DE'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'format' => \IntlDateFormatter::MEDIUM, 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'widget' => 'single_text', 'input' => 'string', - )); + ]); $form->submit('2.6.2010'); @@ -133,13 +133,13 @@ class DateTypeTest extends BaseTypeTest \Locale::setDefault('de_DE'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'format' => \IntlDateFormatter::MEDIUM, 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'widget' => 'single_text', 'input' => 'timestamp', - )); + ]); $form->submit('2.6.2010'); @@ -156,21 +156,21 @@ class DateTypeTest extends BaseTypeTest \Locale::setDefault('de_DE'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'format' => \IntlDateFormatter::MEDIUM, 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'widget' => 'single_text', 'input' => 'array', - )); + ]); $form->submit('2.6.2010'); - $output = array( + $output = [ 'day' => '2', 'month' => '6', 'year' => '2010', - ); + ]; $this->assertEquals($output, $form->getData()); $this->assertEquals('02.06.2010', $form->getViewData()); @@ -178,17 +178,17 @@ class DateTypeTest extends BaseTypeTest public function testSubmitFromText() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'widget' => 'text', - )); + ]); - $text = array( + $text = [ 'day' => '2', 'month' => '6', 'year' => '2010', - ); + ]; $form->submit($text); @@ -200,18 +200,18 @@ class DateTypeTest extends BaseTypeTest public function testSubmitFromChoice() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'widget' => 'choice', - 'years' => array(2010), - )); + 'years' => [2010], + ]); - $text = array( + $text = [ 'day' => '2', 'month' => '6', 'year' => '2010', - ); + ]; $form->submit($text); @@ -223,18 +223,18 @@ class DateTypeTest extends BaseTypeTest public function testSubmitFromChoiceEmpty() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'widget' => 'choice', 'required' => false, - )); + ]); - $text = array( + $text = [ 'day' => '', 'month' => '', 'year' => '', - ); + ]; $form->submit($text); @@ -244,13 +244,13 @@ class DateTypeTest extends BaseTypeTest public function testSubmitFromInputDateTimeDifferentPattern() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'format' => 'MM*yyyy*dd', 'widget' => 'single_text', 'input' => 'datetime', - )); + ]); $form->submit('06*2010*02'); @@ -260,13 +260,13 @@ class DateTypeTest extends BaseTypeTest public function testSubmitFromInputStringDifferentPattern() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'format' => 'MM*yyyy*dd', 'widget' => 'single_text', 'input' => 'string', - )); + ]); $form->submit('06*2010*02'); @@ -276,13 +276,13 @@ class DateTypeTest extends BaseTypeTest public function testSubmitFromInputTimestampDifferentPattern() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'format' => 'MM*yyyy*dd', 'widget' => 'single_text', 'input' => 'timestamp', - )); + ]); $form->submit('06*2010*02'); @@ -294,21 +294,21 @@ class DateTypeTest extends BaseTypeTest public function testSubmitFromInputRawDifferentPattern() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'format' => 'MM*yyyy*dd', 'widget' => 'single_text', 'input' => 'array', - )); + ]); $form->submit('06*2010*02'); - $output = array( + $output = [ 'day' => '2', 'month' => '6', 'year' => '2010', - ); + ]; $this->assertEquals($output, $form->getData()); $this->assertEquals('06*2010*02', $form->getViewData()); @@ -319,9 +319,9 @@ class DateTypeTest extends BaseTypeTest */ public function testDatePatternWithFormatOption($format, $pattern) { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'format' => $format, - )) + ]) ->createView(); $this->assertEquals($pattern, $view->vars['date_pattern']); @@ -329,11 +329,11 @@ class DateTypeTest extends BaseTypeTest public function provideDateFormats() { - return array( - array('dMy', '{{ day }}{{ month }}{{ year }}'), - array('d-M-yyyy', '{{ day }}-{{ month }}-{{ year }}'), - array('M d y', '{{ month }} {{ day }} {{ year }}'), - ); + return [ + ['dMy', '{{ day }}{{ month }}{{ year }}'], + ['d-M-yyyy', '{{ day }}-{{ month }}-{{ year }}'], + ['M d y', '{{ month }} {{ day }} {{ year }}'], + ]; } /** @@ -344,11 +344,11 @@ class DateTypeTest extends BaseTypeTest */ public function testThrowExceptionIfFormatIsNoPattern() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'format' => '0', 'widget' => 'single_text', 'input' => 'string', - )); + ]); } /** @@ -357,10 +357,10 @@ class DateTypeTest extends BaseTypeTest */ public function testThrowExceptionIfFormatDoesNotContainYearMonthAndDay() { - $this->factory->create(static::TESTED_TYPE, null, array( - 'months' => array(6, 7), + $this->factory->create(static::TESTED_TYPE, null, [ + 'months' => [6, 7], 'format' => 'yy', - )); + ]); } /** @@ -369,10 +369,10 @@ class DateTypeTest extends BaseTypeTest */ public function testThrowExceptionIfFormatMissesYearMonthAndDayWithSingleTextWidget() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'single_text', 'format' => 'wrong', - )); + ]); } /** @@ -380,9 +380,9 @@ class DateTypeTest extends BaseTypeTest */ public function testThrowExceptionIfFormatIsNoConstant() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'format' => 105, - )); + ]); } /** @@ -390,9 +390,9 @@ class DateTypeTest extends BaseTypeTest */ public function testThrowExceptionIfFormatIsInvalid() { - $this->factory->create(static::TESTED_TYPE, null, array( - 'format' => array(), - )); + $this->factory->create(static::TESTED_TYPE, null, [ + 'format' => [], + ]); } /** @@ -400,9 +400,9 @@ class DateTypeTest extends BaseTypeTest */ public function testThrowExceptionIfYearsIsInvalid() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'years' => 'bad value', - )); + ]); } /** @@ -410,9 +410,9 @@ class DateTypeTest extends BaseTypeTest */ public function testThrowExceptionIfMonthsIsInvalid() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'months' => 'bad value', - )); + ]); } /** @@ -420,9 +420,9 @@ class DateTypeTest extends BaseTypeTest */ public function testThrowExceptionIfDaysIsInvalid() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'days' => 'bad value', - )); + ]); } public function testSetDataWithNegativeTimezoneOffsetStringInput() @@ -432,13 +432,13 @@ class DateTypeTest extends BaseTypeTest \Locale::setDefault('de_DE'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'format' => \IntlDateFormatter::MEDIUM, 'model_timezone' => 'UTC', 'view_timezone' => 'America/New_York', 'input' => 'string', 'widget' => 'single_text', - )); + ]); $form->setData('2010-06-02'); @@ -454,13 +454,13 @@ class DateTypeTest extends BaseTypeTest \Locale::setDefault('de_DE'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'format' => \IntlDateFormatter::MEDIUM, 'model_timezone' => 'UTC', 'view_timezone' => 'America/New_York', 'input' => 'datetime', 'widget' => 'single_text', - )); + ]); $dateTime = new \DateTime('2010-06-02 UTC'); @@ -474,31 +474,31 @@ class DateTypeTest extends BaseTypeTest public function testYearsOption() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( - 'years' => array(2010, 2011), - )); + $form = $this->factory->create(static::TESTED_TYPE, null, [ + 'years' => [2010, 2011], + ]); $view = $form->createView(); - $this->assertEquals(array( + $this->assertEquals([ new ChoiceView('2010', '2010', '2010'), new ChoiceView('2011', '2011', '2011'), - ), $view['year']->vars['choices']); + ], $view['year']->vars['choices']); } public function testMonthsOption() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( - 'months' => array(6, 7), + $form = $this->factory->create(static::TESTED_TYPE, null, [ + 'months' => [6, 7], 'format' => \IntlDateFormatter::SHORT, - )); + ]); $view = $form->createView(); - $this->assertEquals(array( + $this->assertEquals([ new ChoiceView(6, '6', '06'), new ChoiceView(7, '7', '07'), - ), $view['month']->vars['choices']); + ], $view['month']->vars['choices']); } public function testMonthsOptionShortFormat() @@ -508,17 +508,17 @@ class DateTypeTest extends BaseTypeTest \Locale::setDefault('de_AT'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( - 'months' => array(1, 4), + $form = $this->factory->create(static::TESTED_TYPE, null, [ + 'months' => [1, 4], 'format' => 'dd.MMM.yy', - )); + ]); $view = $form->createView(); - $this->assertEquals(array( + $this->assertEquals([ new ChoiceView(1, '1', 'Jän.'), new ChoiceView(4, '4', 'Apr.'), - ), $view['month']->vars['choices']); + ], $view['month']->vars['choices']); } public function testMonthsOptionLongFormat() @@ -528,16 +528,16 @@ class DateTypeTest extends BaseTypeTest \Locale::setDefault('de_AT'); - $view = $this->factory->create(static::TESTED_TYPE, null, array( - 'months' => array(1, 4), + $view = $this->factory->create(static::TESTED_TYPE, null, [ + 'months' => [1, 4], 'format' => 'dd.MMMM.yy', - )) + ]) ->createView(); - $this->assertEquals(array( + $this->assertEquals([ new ChoiceView(1, '1', 'Jänner'), new ChoiceView(4, '4', 'April'), - ), $view['month']->vars['choices']); + ], $view['month']->vars['choices']); } public function testMonthsOptionLongFormatWithDifferentTimezone() @@ -547,78 +547,78 @@ class DateTypeTest extends BaseTypeTest \Locale::setDefault('de_AT'); - $view = $this->factory->create(static::TESTED_TYPE, null, array( - 'months' => array(1, 4), + $view = $this->factory->create(static::TESTED_TYPE, null, [ + 'months' => [1, 4], 'format' => 'dd.MMMM.yy', - )) + ]) ->createView(); - $this->assertEquals(array( + $this->assertEquals([ new ChoiceView(1, '1', 'Jänner'), new ChoiceView(4, '4', 'April'), - ), $view['month']->vars['choices']); + ], $view['month']->vars['choices']); } public function testIsDayWithinRangeReturnsTrueIfWithin() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( - 'days' => array(6, 7), - )) + $view = $this->factory->create(static::TESTED_TYPE, null, [ + 'days' => [6, 7], + ]) ->createView(); - $this->assertEquals(array( + $this->assertEquals([ new ChoiceView(6, '6', '06'), new ChoiceView(7, '7', '07'), - ), $view['day']->vars['choices']); + ], $view['day']->vars['choices']); } public function testIsSynchronizedReturnsTrueIfChoiceAndCompletelyEmpty() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'widget' => 'choice', - )); + ]); - $form->submit(array( + $form->submit([ 'day' => '', 'month' => '', 'year' => '', - )); + ]); $this->assertTrue($form->isSynchronized()); } public function testIsSynchronizedReturnsTrueIfChoiceAndCompletelyFilled() { - $form = $this->factory->create(static::TESTED_TYPE, new \DateTime(), array( + $form = $this->factory->create(static::TESTED_TYPE, new \DateTime(), [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'widget' => 'choice', - )); + ]); - $form->submit(array( + $form->submit([ 'day' => '1', 'month' => '6', 'year' => '2010', - )); + ]); $this->assertTrue($form->isSynchronized()); } public function testIsSynchronizedReturnsFalseIfChoiceAndDayEmpty() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'widget' => 'choice', - )); + ]); - $form->submit(array( + $form->submit([ 'day' => '', 'month' => '6', 'year' => '2010', - )); + ]); $this->assertFalse($form->isSynchronized()); } @@ -643,9 +643,9 @@ class DateTypeTest extends BaseTypeTest \Locale::setDefault('de_AT'); - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'format' => \IntlDateFormatter::LONG, - )) + ]) ->createView(); $this->assertSame('{{ day }}{{ month }}{{ year }}', $view->vars['date_pattern']); @@ -653,9 +653,9 @@ class DateTypeTest extends BaseTypeTest public function testPassDatePatternToViewDifferentPattern() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'format' => 'MMyyyydd', - )) + ]) ->createView(); $this->assertSame('{{ month }}{{ year }}{{ day }}', $view->vars['date_pattern']); @@ -663,9 +663,9 @@ class DateTypeTest extends BaseTypeTest public function testPassDatePatternToViewDifferentPatternWithSeparators() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'format' => 'MM*yyyy*dd', - )) + ]) ->createView(); $this->assertSame('{{ month }}*{{ year }}*{{ day }}', $view->vars['date_pattern']); @@ -673,9 +673,9 @@ class DateTypeTest extends BaseTypeTest public function testDontPassDatePatternIfText() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'single_text', - )) + ]) ->createView(); $this->assertArrayNotHasKey('date_pattern', $view->vars); @@ -688,10 +688,10 @@ class DateTypeTest extends BaseTypeTest \Locale::setDefault('es_ES'); - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ // EEEE, d 'de' MMMM 'de' y 'format' => \IntlDateFormatter::FULL, - )) + ]) ->createView(); $this->assertEquals('{{ day }}{{ month }}{{ year }}', $view->vars['date_pattern']); @@ -699,9 +699,9 @@ class DateTypeTest extends BaseTypeTest public function testPassWidgetToView() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'single_text', - )) + ]) ->createView(); $this->assertSame('single_text', $view->vars['widget']); @@ -716,9 +716,9 @@ class DateTypeTest extends BaseTypeTest public function testSingleTextWidgetShouldUseTheRightInputType() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'single_text', - )) + ]) ->createView(); $this->assertEquals('date', $view->vars['type']); @@ -726,9 +726,9 @@ class DateTypeTest extends BaseTypeTest public function testPassDefaultPlaceholderToViewIfNotRequired() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => false, - )) + ]) ->createView(); $this->assertSame('', $view['year']->vars['placeholder']); @@ -738,9 +738,9 @@ class DateTypeTest extends BaseTypeTest public function testPassNoPlaceholderToViewIfRequired() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => true, - )) + ]) ->createView(); $this->assertNull($view['year']->vars['placeholder']); @@ -750,9 +750,9 @@ class DateTypeTest extends BaseTypeTest public function testPassPlaceholderAsString() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'placeholder' => 'Empty', - )) + ]) ->createView(); $this->assertSame('Empty', $view['year']->vars['placeholder']); @@ -762,13 +762,13 @@ class DateTypeTest extends BaseTypeTest public function testPassPlaceholderAsArray() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( - 'placeholder' => array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ + 'placeholder' => [ 'year' => 'Empty year', 'month' => 'Empty month', 'day' => 'Empty day', - ), - )) + ], + ]) ->createView(); $this->assertSame('Empty year', $view['year']->vars['placeholder']); @@ -778,13 +778,13 @@ class DateTypeTest extends BaseTypeTest public function testPassPlaceholderAsPartialArrayAddEmptyIfNotRequired() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => false, - 'placeholder' => array( + 'placeholder' => [ 'year' => 'Empty year', 'day' => 'Empty day', - ), - )) + ], + ]) ->createView(); $this->assertSame('Empty year', $view['year']->vars['placeholder']); @@ -794,13 +794,13 @@ class DateTypeTest extends BaseTypeTest public function testPassPlaceholderAsPartialArrayAddNullIfRequired() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => true, - 'placeholder' => array( + 'placeholder' => [ 'year' => 'Empty year', 'day' => 'Empty day', - ), - )) + ], + ]) ->createView(); $this->assertSame('Empty year', $view['year']->vars['placeholder']); @@ -810,9 +810,9 @@ class DateTypeTest extends BaseTypeTest public function testPassHtml5TypeIfSingleTextAndHtml5Format() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'single_text', - )) + ]) ->createView(); $this->assertSame('date', $view->vars['type']); @@ -820,10 +820,10 @@ class DateTypeTest extends BaseTypeTest public function testDontPassHtml5TypeIfHtml5NotAllowed() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'single_text', 'html5' => false, - )) + ]) ->createView(); $this->assertArrayNotHasKey('type', $view->vars); @@ -831,10 +831,10 @@ class DateTypeTest extends BaseTypeTest public function testDontPassHtml5TypeIfNotHtml5Format() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'single_text', 'format' => \IntlDateFormatter::MEDIUM, - )) + ]) ->createView(); $this->assertArrayNotHasKey('type', $view->vars); @@ -842,9 +842,9 @@ class DateTypeTest extends BaseTypeTest public function testDontPassHtml5TypeIfNotSingleText() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'text', - )) + ]) ->createView(); $this->assertArrayNotHasKey('type', $view->vars); @@ -852,10 +852,10 @@ class DateTypeTest extends BaseTypeTest public function provideCompoundWidgets() { - return array( - array('text'), - array('choice'), - ); + return [ + ['text'], + ['choice'], + ]; } /** @@ -864,13 +864,13 @@ class DateTypeTest extends BaseTypeTest public function testYearErrorsBubbleUp($widget) { $error = new FormError('Invalid!'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => $widget, - )); + ]); $form['year']->addError($error); - $this->assertSame(array(), iterator_to_array($form['year']->getErrors())); - $this->assertSame(array($error), iterator_to_array($form->getErrors())); + $this->assertSame([], iterator_to_array($form['year']->getErrors())); + $this->assertSame([$error], iterator_to_array($form->getErrors())); } /** @@ -879,13 +879,13 @@ class DateTypeTest extends BaseTypeTest public function testMonthErrorsBubbleUp($widget) { $error = new FormError('Invalid!'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => $widget, - )); + ]); $form['month']->addError($error); - $this->assertSame(array(), iterator_to_array($form['month']->getErrors())); - $this->assertSame(array($error), iterator_to_array($form->getErrors())); + $this->assertSame([], iterator_to_array($form['month']->getErrors())); + $this->assertSame([$error], iterator_to_array($form->getErrors())); } /** @@ -894,13 +894,13 @@ class DateTypeTest extends BaseTypeTest public function testDayErrorsBubbleUp($widget) { $error = new FormError('Invalid!'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => $widget, - )); + ]); $form['day']->addError($error); - $this->assertSame(array(), iterator_to_array($form['day']->getErrors())); - $this->assertSame(array($error), iterator_to_array($form->getErrors())); + $this->assertSame([], iterator_to_array($form['day']->getErrors())); + $this->assertSame([$error], iterator_to_array($form->getErrors())); } public function testYearsFor32BitsMachines() @@ -909,12 +909,12 @@ class DateTypeTest extends BaseTypeTest $this->markTestSkipped('PHP 32 bit is required.'); } - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'years' => range(1900, 2040), - )) + ]) ->createView(); - $listChoices = array(); + $listChoices = []; foreach (range(1902, 2037) as $y) { $listChoices[] = new ChoiceView($y, $y, $y); } @@ -934,9 +934,9 @@ class DateTypeTest extends BaseTypeTest public function testPassChoiceTranslationDomainAsString() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'choice_translation_domain' => 'messages', - )); + ]); $view = $form->createView(); $this->assertSame('messages', $view['year']->vars['choice_translation_domain']); @@ -946,12 +946,12 @@ class DateTypeTest extends BaseTypeTest public function testPassChoiceTranslationDomainAsArray() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( - 'choice_translation_domain' => array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ + 'choice_translation_domain' => [ 'year' => 'foo', 'day' => 'test', - ), - )); + ], + ]); $view = $form->createView(); $this->assertSame('foo', $view['year']->vars['choice_translation_domain']); @@ -961,14 +961,14 @@ class DateTypeTest extends BaseTypeTest public function testSubmitNull($expected = null, $norm = null, $view = null) { - parent::testSubmitNull($expected, $norm, array('year' => '', 'month' => '', 'day' => '')); + parent::testSubmitNull($expected, $norm, ['year' => '', 'month' => '', 'day' => '']); } public function testSubmitNullWithSingleText() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'single_text', - )); + ]); $form->submit(null); $this->assertNull($form->getData()); @@ -976,15 +976,15 @@ class DateTypeTest extends BaseTypeTest $this->assertSame('', $form->getViewData()); } - public function testSubmitNullUsesDefaultEmptyData($emptyData = array(), $expectedData = null) + public function testSubmitNullUsesDefaultEmptyData($emptyData = [], $expectedData = null) { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'empty_data' => $emptyData, - )); + ]); $form->submit(null); // view transformer writes back empty strings in the view data - $this->assertSame(array('year' => '', 'month' => '', 'day' => ''), $form->getViewData()); + $this->assertSame(['year' => '', 'month' => '', 'day' => ''], $form->getViewData()); $this->assertSame($expectedData, $form->getNormData()); $this->assertSame($expectedData, $form->getData()); } @@ -994,10 +994,10 @@ class DateTypeTest extends BaseTypeTest */ public function testSubmitNullUsesDateEmptyData($widget, $emptyData, $expectedData) { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => $widget, 'empty_data' => $emptyData, - )); + ]); $form->submit(null); $this->assertSame($emptyData, $form->getViewData()); @@ -1009,10 +1009,10 @@ class DateTypeTest extends BaseTypeTest { $expectedData = \DateTime::createFromFormat('Y-m-d H:i:s', '2018-11-11 00:00:00'); - return array( - 'Simple field' => array('single_text', '2018-11-11', $expectedData), - 'Compound text fields' => array('text', array('year' => '2018', 'month' => '11', 'day' => '11'), $expectedData), - 'Compound choice fields' => array('choice', array('year' => '2018', 'month' => '11', 'day' => '11'), $expectedData), - ); + return [ + 'Simple field' => ['single_text', '2018-11-11', $expectedData], + 'Compound text fields' => ['text', ['year' => '2018', 'month' => '11', 'day' => '11'], $expectedData], + 'Compound choice fields' => ['choice', ['year' => '2018', 'month' => '11', 'day' => '11'], $expectedData], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ExtendedChoiceTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ExtendedChoiceTypeTest.php index 959ae488..aa76b133 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ExtendedChoiceTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ExtendedChoiceTypeTest.php @@ -48,7 +48,7 @@ class ExtendedChoiceTypeTest extends TestCase ->getFormFactory() ; - $choices = $factory->create($type, null, array('choice_loader' => null))->createView()->vars['choices']; + $choices = $factory->create($type, null, ['choice_loader' => null])->createView()->vars['choices']; $this->assertCount(2, $choices); $this->assertSame('A', $choices[0]->label); @@ -78,10 +78,10 @@ class ExtendedChoiceTypeTest extends TestCase public function provideTestedTypes() { - yield array(CountryTypeTest::TESTED_TYPE); - yield array(CurrencyTypeTest::TESTED_TYPE); - yield array(LanguageTypeTest::TESTED_TYPE); - yield array(LocaleTypeTest::TESTED_TYPE); - yield array(TimezoneTypeTest::TESTED_TYPE); + yield [CountryTypeTest::TESTED_TYPE]; + yield [CurrencyTypeTest::TESTED_TYPE]; + yield [LanguageTypeTest::TESTED_TYPE]; + yield [LocaleTypeTest::TESTED_TYPE]; + yield [TimezoneTypeTest::TESTED_TYPE]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php index 5ba1dc5a..ea012c45 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php @@ -14,6 +14,7 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler; use Symfony\Component\Form\NativeRequestHandler; use Symfony\Component\Form\RequestHandlerInterface; +use Symfony\Component\HttpFoundation\File\File; use Symfony\Component\HttpFoundation\File\UploadedFile; class FileTypeTest extends BaseTypeTest @@ -24,9 +25,7 @@ class FileTypeTest extends BaseTypeTest public function testSetData() { $form = $this->factory->createBuilder(static::TESTED_TYPE)->getForm(); - $data = $this->getMockBuilder('Symfony\Component\HttpFoundation\File\File') - ->setConstructorArgs(array(__DIR__.'/../../../Fixtures/foo', 'foo')) - ->getMock(); + $data = new File(__DIR__.'/../../../Fixtures/foo', false); $form->setData($data); @@ -40,7 +39,7 @@ class FileTypeTest extends BaseTypeTest public function testSubmit(RequestHandlerInterface $requestHandler) { $form = $this->factory->createBuilder(static::TESTED_TYPE)->setRequestHandler($requestHandler)->getForm(); - $data = $this->createUploadedFileMock($requestHandler, __DIR__.'/../../../Fixtures/foo', 'foo.jpg'); + $data = $this->createUploadedFile($requestHandler, __DIR__.'/../../../Fixtures/foo', 'foo.jpg'); $form->submit($data); @@ -52,14 +51,14 @@ class FileTypeTest extends BaseTypeTest */ public function testSetDataMultiple(RequestHandlerInterface $requestHandler) { - $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array( + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, [ 'multiple' => true, - ))->setRequestHandler($requestHandler)->getForm(); + ])->setRequestHandler($requestHandler)->getForm(); - $data = array( - $this->createUploadedFileMock($requestHandler, __DIR__.'/../../../Fixtures/foo', 'foo.jpg'), - $this->createUploadedFileMock($requestHandler, __DIR__.'/../../../Fixtures/foo2', 'foo2.jpg'), - ); + $data = [ + $this->createUploadedFile($requestHandler, __DIR__.'/../../../Fixtures/foo', 'foo.jpg'), + $this->createUploadedFile($requestHandler, __DIR__.'/../../../Fixtures/foo2', 'foo2.jpg'), + ]; $form->setData($data); $this->assertSame($data, $form->getData()); @@ -70,14 +69,14 @@ class FileTypeTest extends BaseTypeTest */ public function testSubmitMultiple(RequestHandlerInterface $requestHandler) { - $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array( + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, [ 'multiple' => true, - ))->setRequestHandler($requestHandler)->getForm(); + ])->setRequestHandler($requestHandler)->getForm(); - $data = array( - $this->createUploadedFileMock($requestHandler, __DIR__.'/../../../Fixtures/foo', 'foo.jpg'), - $this->createUploadedFileMock($requestHandler, __DIR__.'/../../../Fixtures/foo2', 'foo2.jpg'), - ); + $data = [ + $this->createUploadedFile($requestHandler, __DIR__.'/../../../Fixtures/foo', 'foo.jpg'), + $this->createUploadedFile($requestHandler, __DIR__.'/../../../Fixtures/foo2', 'foo2.jpg'), + ]; $form->submit($data); $this->assertSame($data, $form->getData()); @@ -93,9 +92,9 @@ class FileTypeTest extends BaseTypeTest public function testDontPassValueToView(RequestHandlerInterface $requestHandler) { $form = $this->factory->createBuilder(static::TESTED_TYPE)->setRequestHandler($requestHandler)->getForm(); - $form->submit(array( - 'file' => $this->createUploadedFileMock($requestHandler, __DIR__.'/../../../Fixtures/foo', 'foo.jpg'), - )); + $form->submit([ + 'file' => $this->createUploadedFile($requestHandler, __DIR__.'/../../../Fixtures/foo', 'foo.jpg'), + ]); $this->assertEquals('', $form->createView()->vars['value']); } @@ -115,15 +114,15 @@ class FileTypeTest extends BaseTypeTest public function testSubmitNullWhenMultiple() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'multiple' => true, - )); + ]); // submitted data when an input file is uploaded without choosing any file - $form->submit(array(null)); + $form->submit([null]); - $this->assertSame(array(), $form->getData()); - $this->assertSame(array(), $form->getNormData()); - $this->assertSame(array(), $form->getViewData()); + $this->assertSame([], $form->getData()); + $this->assertSame([], $form->getNormData()); + $this->assertSame([], $form->getViewData()); } /** @@ -145,16 +144,16 @@ class FileTypeTest extends BaseTypeTest public function testMultipleSubmittedFilePathsAreDropped(RequestHandlerInterface $requestHandler) { $form = $this->factory - ->createBuilder(static::TESTED_TYPE, null, array( + ->createBuilder(static::TESTED_TYPE, null, [ 'multiple' => true, - )) + ]) ->setRequestHandler($requestHandler) ->getForm(); - $form->submit(array( + $form->submit([ 'file:///etc/passwd', - $this->createUploadedFileMock(new HttpFoundationRequestHandler(), __DIR__.'/../../../Fixtures/foo', 'foo.jpg'), - $this->createUploadedFileMock(new NativeRequestHandler(), __DIR__.'/../../../Fixtures/foo2', 'foo2.jpg'), - )); + $this->createUploadedFile(new HttpFoundationRequestHandler(), __DIR__.'/../../../Fixtures/foo', 'foo.jpg'), + $this->createUploadedFile(new NativeRequestHandler(), __DIR__.'/../../../Fixtures/foo2', 'foo2.jpg'), + ]); $this->assertCount(1, $form->getData()); } @@ -165,38 +164,38 @@ class FileTypeTest extends BaseTypeTest public function testSubmitNonArrayValueWhenMultiple(RequestHandlerInterface $requestHandler) { $form = $this->factory - ->createBuilder(static::TESTED_TYPE, null, array( + ->createBuilder(static::TESTED_TYPE, null, [ 'multiple' => true, - )) + ]) ->setRequestHandler($requestHandler) ->getForm(); $form->submit(null); - $this->assertSame(array(), $form->getData()); - $this->assertSame(array(), $form->getNormData()); - $this->assertSame(array(), $form->getViewData()); + $this->assertSame([], $form->getData()); + $this->assertSame([], $form->getNormData()); + $this->assertSame([], $form->getViewData()); } public function requestHandlerProvider() { - return array( - array(new HttpFoundationRequestHandler()), - array(new NativeRequestHandler()), - ); + return [ + [new HttpFoundationRequestHandler()], + [new NativeRequestHandler()], + ]; } - private function createUploadedFileMock(RequestHandlerInterface $requestHandler, $path, $originalName) + private function createUploadedFile(RequestHandlerInterface $requestHandler, $path, $originalName) { if ($requestHandler instanceof HttpFoundationRequestHandler) { return new UploadedFile($path, $originalName, null, 10, null, true); } - return array( + return [ 'name' => $originalName, 'error' => 0, 'type' => 'text/plain', 'tmp_name' => $path, 'size' => 10, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php index 68f30ef1..960d94eb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php @@ -60,11 +60,11 @@ class FormTypeTest extends BaseTypeTest public function testPassRequiredAsOption() { - $form = $this->factory->create(static::TESTED_TYPE, null, array('required' => false)); + $form = $this->factory->create(static::TESTED_TYPE, null, ['required' => false]); $this->assertFalse($form->isRequired()); - $form = $this->factory->create(static::TESTED_TYPE, null, array('required' => true)); + $form = $this->factory->create(static::TESTED_TYPE, null, ['required' => true]); $this->assertTrue($form->isRequired()); } @@ -72,10 +72,10 @@ class FormTypeTest extends BaseTypeTest public function testSubmittedDataIsTrimmedBeforeTransforming() { $form = $this->factory->createBuilder(static::TESTED_TYPE) - ->addViewTransformer(new FixedDataTransformer(array( + ->addViewTransformer(new FixedDataTransformer([ '' => '', 'reverse[a]' => 'a', - ))) + ])) ->setCompound(false) ->getForm(); @@ -87,11 +87,11 @@ class FormTypeTest extends BaseTypeTest public function testSubmittedDataIsNotTrimmedBeforeTransformingIfNoTrimming() { - $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array('trim' => false)) - ->addViewTransformer(new FixedDataTransformer(array( + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, ['trim' => false]) + ->addViewTransformer(new FixedDataTransformer([ '' => '', 'reverse[ a ]' => ' a ', - ))) + ])) ->setCompound(false) ->getForm(); @@ -103,7 +103,7 @@ class FormTypeTest extends BaseTypeTest public function testNonReadOnlyFormWithReadOnlyParentIsReadOnly() { - $view = $this->factory->createNamedBuilder('parent', static::TESTED_TYPE, null, array('attr' => array('readonly' => true))) + $view = $this->factory->createNamedBuilder('parent', static::TESTED_TYPE, null, ['attr' => ['readonly' => true]]) ->add('child', static::TESTED_TYPE) ->getForm() ->createView(); @@ -114,7 +114,7 @@ class FormTypeTest extends BaseTypeTest public function testReadOnlyFormWithNonReadOnlyParentIsReadOnly() { $view = $this->factory->createNamedBuilder('parent', static::TESTED_TYPE) - ->add('child', static::TESTED_TYPE, array('attr' => array('readonly' => true))) + ->add('child', static::TESTED_TYPE, ['attr' => ['readonly' => true]]) ->getForm() ->createView(); @@ -133,7 +133,7 @@ class FormTypeTest extends BaseTypeTest public function testPassMaxLengthToView() { - $view = $this->factory->create(static::TESTED_TYPE, null, array('attr' => array('maxlength' => 10))) + $view = $this->factory->create(static::TESTED_TYPE, null, ['attr' => ['maxlength' => 10]]) ->createView(); $this->assertSame(10, $view->vars['attr']['maxlength']); @@ -141,23 +141,23 @@ class FormTypeTest extends BaseTypeTest public function testDataClassMayBeNull() { - $this->assertInstanceOf('Symfony\Component\Form\FormBuilderInterface', $this->factory->createBuilder(static::TESTED_TYPE, null, array( + $this->assertInstanceOf('Symfony\Component\Form\FormBuilderInterface', $this->factory->createBuilder(static::TESTED_TYPE, null, [ 'data_class' => null, - ))); + ])); } public function testDataClassMayBeAbstractClass() { - $this->assertInstanceOf('Symfony\Component\Form\FormBuilderInterface', $this->factory->createBuilder(static::TESTED_TYPE, null, array( + $this->assertInstanceOf('Symfony\Component\Form\FormBuilderInterface', $this->factory->createBuilder(static::TESTED_TYPE, null, [ 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AbstractAuthor', - ))); + ])); } public function testDataClassMayBeInterface() { - $this->assertInstanceOf('Symfony\Component\Form\FormBuilderInterface', $this->factory->createBuilder(static::TESTED_TYPE, null, array( + $this->assertInstanceOf('Symfony\Component\Form\FormBuilderInterface', $this->factory->createBuilder(static::TESTED_TYPE, null, [ 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AuthorInterface', - ))); + ])); } /** @@ -165,22 +165,22 @@ class FormTypeTest extends BaseTypeTest */ public function testDataClassMustBeValidClassOrInterface() { - $this->factory->createBuilder(static::TESTED_TYPE, null, array( + $this->factory->createBuilder(static::TESTED_TYPE, null, [ 'data_class' => 'foobar', - )); + ]); } - public function testSubmitNullUsesDefaultEmptyData($emptyData = array(), $expectedData = array()) + public function testSubmitNullUsesDefaultEmptyData($emptyData = [], $expectedData = []) { parent::testSubmitNullUsesDefaultEmptyData($emptyData, $expectedData); } public function testSubmitWithEmptyDataCreatesObjectIfClassAvailable() { - $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array( + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, [ 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', 'required' => false, - )) + ]) ->add('firstName', TextTypeTest::TESTED_TYPE) ->add('lastName', TextTypeTest::TESTED_TYPE) ->getForm(); @@ -188,7 +188,7 @@ class FormTypeTest extends BaseTypeTest $this->assertNull($form->getData()); // partially empty, still an object is created - $form->submit(array('firstName' => 'Bernhard', 'lastName' => '')); + $form->submit(['firstName' => 'Bernhard', 'lastName' => '']); $author = new Author(); $author->firstName = 'Bernhard'; @@ -200,17 +200,17 @@ class FormTypeTest extends BaseTypeTest public function testSubmitWithDefaultDataDontCreateObject() { $defaultAuthor = new Author(); - $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array( + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, [ // data class is inferred from the passed object 'data' => $defaultAuthor, 'required' => false, - )) + ]) ->add('firstName', TextTypeTest::TESTED_TYPE) ->add('lastName', TextTypeTest::TESTED_TYPE) ->getForm(); // partially empty - $form->submit(array('firstName' => 'Bernhard', 'lastName' => '')); + $form->submit(['firstName' => 'Bernhard', 'lastName' => '']); $author = new Author(); $author->firstName = 'Bernhard'; @@ -222,50 +222,50 @@ class FormTypeTest extends BaseTypeTest public function testSubmitWithEmptyDataCreatesArrayIfDataClassIsNull() { - $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array( + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, [ 'data_class' => null, 'required' => false, - )) + ]) ->add('firstName', TextTypeTest::TESTED_TYPE) ->getForm(); $this->assertNull($form->getData()); - $form->submit(array('firstName' => 'Bernhard')); + $form->submit(['firstName' => 'Bernhard']); - $this->assertSame(array('firstName' => 'Bernhard'), $form->getData()); + $this->assertSame(['firstName' => 'Bernhard'], $form->getData()); } public function testSubmitEmptyWithEmptyDataDontCreateObjectIfNotRequired() { - $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array( + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, [ 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', 'required' => false, - )) + ]) ->add('firstName', TextTypeTest::TESTED_TYPE) ->add('lastName', TextTypeTest::TESTED_TYPE) ->getForm(); $this->assertNull($form->getData()); - $form->submit(array('firstName' => '', 'lastName' => '')); + $form->submit(['firstName' => '', 'lastName' => '']); $this->assertNull($form->getData()); } public function testSubmitEmptyWithEmptyDataCreatesObjectIfRequired() { - $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array( + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, [ 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', 'required' => true, - )) + ]) ->add('firstName', TextTypeTest::TESTED_TYPE) ->add('lastName', TextTypeTest::TESTED_TYPE) ->getForm(); $this->assertNull($form->getData()); - $form->submit(array('firstName' => '', 'lastName' => '')); + $form->submit(['firstName' => '', 'lastName' => '']); $this->assertEquals(new Author(), $form->getData()); } @@ -281,20 +281,20 @@ class FormTypeTest extends BaseTypeTest $this->assertNull($form->getData()); - $form->submit(array('firstName' => 'Bernhard')); + $form->submit(['firstName' => 'Bernhard']); - $this->assertSame(array('firstName' => 'Bernhard'), $form->getData()); + $this->assertSame(['firstName' => 'Bernhard'], $form->getData()); } public function testSubmitWithEmptyDataPassesEmptyStringToTransformerIfNotCompound() { $form = $this->factory->createBuilder(static::TESTED_TYPE) - ->addViewTransformer(new FixedDataTransformer(array( + ->addViewTransformer(new FixedDataTransformer([ // required for the initial, internal setData(null) '' => 'null', // required to test that submit(null) is converted to '' 'empty' => '', - ))) + ])) ->setCompound(false) ->getForm(); @@ -313,17 +313,17 @@ class FormTypeTest extends BaseTypeTest { $author = new Author(); - $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array( + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, [ 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', 'empty_data' => $author, - )) + ]) ->add('firstName', TextTypeTest::TESTED_TYPE) ->getForm(); $this->assertNull($form->getData()); $this->assertNull($form->getViewData()); - $form->submit(array('firstName' => 'Bernhard')); + $form->submit(['firstName' => 'Bernhard']); $this->assertSame($author, $form->getData()); $this->assertEquals('Bernhard', $author->firstName); @@ -334,7 +334,7 @@ class FormTypeTest extends BaseTypeTest */ public function testAttributesException() { - $this->factory->create(static::TESTED_TYPE, null, array('attr' => '')); + $this->factory->create(static::TESTED_TYPE, null, ['attr' => '']); } public function testNameCanBeEmptyString() @@ -349,18 +349,18 @@ class FormTypeTest extends BaseTypeTest $author = new FormTest_AuthorWithoutRefSetter(new Author()); $builder = $this->factory->createBuilder(static::TESTED_TYPE, $author); - $builder->add('reference', static::TESTED_TYPE, array( + $builder->add('reference', static::TESTED_TYPE, [ 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', - )); + ]); $builder->get('reference')->add('firstName', TextTypeTest::TESTED_TYPE); $form = $builder->getForm(); - $form->submit(array( + $form->submit([ // reference has a getter, but no setter - 'reference' => array( + 'reference' => [ 'firstName' => 'Foo', - ), - )); + ], + ]); $this->assertEquals('Foo', $author->getReference()->firstName); } @@ -372,20 +372,20 @@ class FormTypeTest extends BaseTypeTest $newReference = new Author(); $builder = $this->factory->createBuilder(static::TESTED_TYPE, $author); - $builder->add('referenceCopy', static::TESTED_TYPE, array( + $builder->add('referenceCopy', static::TESTED_TYPE, [ 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', - )); + ]); $builder->get('referenceCopy')->add('firstName', TextTypeTest::TESTED_TYPE); $form = $builder->getForm(); $form['referenceCopy']->setData($newReference); // new author object - $form->submit(array( + $form->submit([ // referenceCopy has a getter that returns a copy - 'referenceCopy' => array( + 'referenceCopy' => [ 'firstName' => 'Foo', - ), - )); + ], + ]); $this->assertEquals('Foo', $author->getReferenceCopy()->firstName); } @@ -395,19 +395,19 @@ class FormTypeTest extends BaseTypeTest $author = new FormTest_AuthorWithoutRefSetter(new Author()); $builder = $this->factory->createBuilder(static::TESTED_TYPE, $author); - $builder->add('referenceCopy', static::TESTED_TYPE, array( + $builder->add('referenceCopy', static::TESTED_TYPE, [ 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', 'by_reference' => false, - )); + ]); $builder->get('referenceCopy')->add('firstName', TextTypeTest::TESTED_TYPE); $form = $builder->getForm(); - $form->submit(array( + $form->submit([ // referenceCopy has a getter that returns a copy - 'referenceCopy' => array( + 'referenceCopy' => [ 'firstName' => 'Foo', - ), - )); + ], + ]); // firstName can only be updated if setReferenceCopy() was called $this->assertEquals('Foo', $author->getReferenceCopy()->firstName); @@ -427,9 +427,9 @@ class FormTypeTest extends BaseTypeTest )); $form = $builder->getForm(); - $form->submit(array( - 'referenceCopy' => array(), // doesn't matter actually - )); + $form->submit([ + 'referenceCopy' => [], // doesn't matter actually + ]); // firstName can only be updated if setReferenceCopy() was called $this->assertEquals('foobar', $author->getReferenceCopy()); @@ -439,7 +439,7 @@ class FormTypeTest extends BaseTypeTest { $ref1 = new Author(); $ref2 = new Author(); - $author = array('referenceCopy' => $ref1); + $author = ['referenceCopy' => $ref1]; $builder = $this->factory->createBuilder(static::TESTED_TYPE); $builder->setData($author); @@ -452,9 +452,9 @@ class FormTypeTest extends BaseTypeTest )); $form = $builder->getForm(); - $form->submit(array( - 'referenceCopy' => array(), // doesn't matter actually - )); + $form->submit([ + 'referenceCopy' => [], // doesn't matter actually + ]); // the new reference was inserted into the array $author = $form->getData(); @@ -491,28 +491,28 @@ class FormTypeTest extends BaseTypeTest public function testNoErrorBubblingIfNotCompound() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'compound' => false, - )); + ]); $this->assertFalse($form->getConfig()->getErrorBubbling()); } public function testOverrideErrorBubbling() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'compound' => false, 'error_bubbling' => true, - )); + ]); $this->assertTrue($form->getConfig()->getErrorBubbling()); } public function testPropertyPath() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'property_path' => 'foo', - )); + ]); $this->assertEquals(new PropertyPath('foo'), $form->getPropertyPath()); $this->assertTrue($form->getConfig()->getMapped()); @@ -520,9 +520,9 @@ class FormTypeTest extends BaseTypeTest public function testPropertyPathNullImpliesDefault() { - $form = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + $form = $this->factory->createNamed('name', static::TESTED_TYPE, null, [ 'property_path' => null, - )); + ]); $this->assertEquals(new PropertyPath('name'), $form->getPropertyPath()); $this->assertTrue($form->getConfig()->getMapped()); @@ -530,10 +530,10 @@ class FormTypeTest extends BaseTypeTest public function testNotMapped() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'property_path' => 'foo', 'mapped' => false, - )); + ]); $this->assertEquals(new PropertyPath('foo'), $form->getPropertyPath()); $this->assertFalse($form->getConfig()->getMapped()); @@ -550,7 +550,7 @@ class FormTypeTest extends BaseTypeTest public function testViewNotValidSubmitted() { $form = $this->factory->create(static::TESTED_TYPE); - $form->submit(array()); + $form->submit([]); $form->addError(new FormError('An error')); $this->assertFalse($form->createView()->vars['valid']); @@ -567,17 +567,17 @@ class FormTypeTest extends BaseTypeTest public function testViewSubmittedSubmitted() { $form = $this->factory->create(static::TESTED_TYPE); - $form->submit(array()); + $form->submit([]); $this->assertTrue($form->createView()->vars['submitted']); } public function testDataOptionSupersedesSetDataCalls() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'data' => 'default', 'compound' => false, - )); + ]); $form->setData('foobar'); @@ -586,9 +586,9 @@ class FormTypeTest extends BaseTypeTest public function testPassedDataSupersedesSetDataCalls() { - $form = $this->factory->create(static::TESTED_TYPE, 'default', array( + $form = $this->factory->create(static::TESTED_TYPE, 'default', [ 'compound' => false, - )); + ]); $form->setData('foobar'); @@ -597,10 +597,10 @@ class FormTypeTest extends BaseTypeTest public function testDataOptionSupersedesSetDataCallsIfNull() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'data' => null, 'compound' => false, - )); + ]); $form->setData('foobar'); @@ -610,12 +610,12 @@ class FormTypeTest extends BaseTypeTest public function testNormDataIsPassedToView() { $view = $this->factory->createBuilder(static::TESTED_TYPE) - ->addModelTransformer(new FixedDataTransformer(array( + ->addModelTransformer(new FixedDataTransformer([ 'foo' => 'bar', - ))) - ->addViewTransformer(new FixedDataTransformer(array( + ])) + ->addViewTransformer(new FixedDataTransformer([ 'bar' => 'baz', - ))) + ])) ->setData('foo') ->getForm() ->createView(); @@ -627,9 +627,9 @@ class FormTypeTest extends BaseTypeTest // https://github.com/symfony/symfony/issues/6862 public function testPassZeroLabelToView() { - $view = $this->factory->create(static::TESTED_TYPE, null, array( + $view = $this->factory->create(static::TESTED_TYPE, null, [ 'label' => '0', - )) + ]) ->createView(); $this->assertSame('0', $view->vars['label']); @@ -637,6 +637,6 @@ class FormTypeTest extends BaseTypeTest public function testSubmitNull($expected = null, $norm = null, $view = null) { - parent::testSubmitNull(array(), array(), array()); + parent::testSubmitNull([], [], []); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php index fd3c2faf..c5c7dd91 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php @@ -24,14 +24,15 @@ class IntegerTypeTest extends BaseTypeTest parent::setUp(); } - public function testSubmitCastsToInteger() + public function testSubmitRejectsFloats() { $form = $this->factory->create(static::TESTED_TYPE); $form->submit('1.678'); - $this->assertSame(1, $form->getData()); - $this->assertSame('1', $form->getViewData()); + $this->assertTrue($form->isSubmitted()); + $this->assertFalse($form->isValid()); + $this->assertFalse($form->isSynchronized()); } public function testSubmitNull($expected = null, $norm = null, $view = null) @@ -41,13 +42,54 @@ class IntegerTypeTest extends BaseTypeTest public function testSubmitNullUsesDefaultEmptyData($emptyData = '10', $expectedData = 10) { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'empty_data' => $emptyData, - )); + ]); $form->submit(null); $this->assertSame($emptyData, $form->getViewData()); $this->assertSame($expectedData, $form->getNormData()); $this->assertSame($expectedData, $form->getData()); } + + public function testSubmittedLargeIntegersAreNotCastToFloat() + { + if (4 === \PHP_INT_SIZE) { + $this->markTestSkipped('This test requires a 64bit PHP.'); + } + + $form = $this->factory->create(static::TESTED_TYPE); + $form->submit('201803221011791'); + + $this->assertSame(201803221011791, $form->getData()); + $this->assertSame('201803221011791', $form->getViewData()); + } + + public function testTooSmallIntegersAreNotValid() + { + if (4 === \PHP_INT_SIZE) { + $min = '-2147483649'; + } else { + $min = '-9223372036854775808'; + } + + $form = $this->factory->create(static::TESTED_TYPE); + $form->submit($min); + + $this->assertFalse($form->isSynchronized()); + } + + public function testTooGreatIntegersAreNotValid() + { + if (4 === \PHP_INT_SIZE) { + $max = '2147483648'; + } else { + $max = '9223372036854775808'; + } + + $form = $this->factory->create(static::TESTED_TYPE); + $form->submit($max); + + $this->assertFalse($form->isSynchronized()); + } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php index 5cf578d4..60614a97 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; use Symfony\Component\Form\ChoiceList\View\ChoiceView; +use Symfony\Component\Form\Extension\Core\Type\LanguageType; use Symfony\Component\Intl\Util\IntlTestHelper; class LanguageTypeTest extends BaseTypeTest @@ -54,4 +55,11 @@ class LanguageTypeTest extends BaseTypeTest { parent::testSubmitNullUsesDefaultEmptyData($emptyData, $expectedData); } + + public function testInvalidChoiceValuesAreDropped() + { + $type = new LanguageType(); + + $this->assertSame([], $type->loadChoicesForValues(['foo'])); + } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php index b6cf1e1b..e5b3ec9d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; use Symfony\Component\Form\ChoiceList\View\ChoiceView; +use Symfony\Component\Form\Extension\Core\Type\LocaleType; use Symfony\Component\Intl\Util\IntlTestHelper; class LocaleTypeTest extends BaseTypeTest @@ -44,4 +45,11 @@ class LocaleTypeTest extends BaseTypeTest { parent::testSubmitNullUsesDefaultEmptyData($emptyData, $expectedData); } + + public function testInvalidChoiceValuesAreDropped() + { + $type = new LocaleType(); + + $this->assertSame([], $type->loadChoicesForValues(['foo'])); + } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php index 3371a1ee..f75ea902 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php @@ -40,7 +40,7 @@ class MoneyTypeTest extends BaseTypeTest { \Locale::setDefault('en_US'); - $view = $this->factory->create(static::TESTED_TYPE, null, array('currency' => 'JPY')) + $view = $this->factory->create(static::TESTED_TYPE, null, ['currency' => 'JPY']) ->createView(); $this->assertSame('¥ {{ widget }}', $view->vars['money_pattern']); @@ -51,8 +51,8 @@ class MoneyTypeTest extends BaseTypeTest { \Locale::setDefault('de_DE'); - $view1 = $this->factory->create(static::TESTED_TYPE, null, array('currency' => 'GBP'))->createView(); - $view2 = $this->factory->create(static::TESTED_TYPE, null, array('currency' => 'EUR'))->createView(); + $view1 = $this->factory->create(static::TESTED_TYPE, null, ['currency' => 'GBP'])->createView(); + $view2 = $this->factory->create(static::TESTED_TYPE, null, ['currency' => 'EUR'])->createView(); $this->assertSame('{{ widget }} £', $view1->vars['money_pattern']); $this->assertSame('{{ widget }} €', $view2->vars['money_pattern']); @@ -65,7 +65,7 @@ class MoneyTypeTest extends BaseTypeTest public function testMoneyPatternWithoutCurrency() { - $view = $this->factory->create(static::TESTED_TYPE, null, array('currency' => false)) + $view = $this->factory->create(static::TESTED_TYPE, null, ['currency' => false]) ->createView(); $this->assertSame('{{ widget }}', $view->vars['money_pattern']); @@ -73,9 +73,9 @@ class MoneyTypeTest extends BaseTypeTest public function testSubmitNullUsesDefaultEmptyData($emptyData = '10.00', $expectedData = 10.0) { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'empty_data' => $emptyData, - )); + ]); $form->submit(null); $this->assertSame($emptyData, $form->getViewData()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php index a15d6f66..c19c82b1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php @@ -37,7 +37,7 @@ class NumberTypeTest extends BaseTypeTest public function testDefaultFormattingWithGrouping() { - $form = $this->factory->create(static::TESTED_TYPE, null, array('grouping' => true)); + $form = $this->factory->create(static::TESTED_TYPE, null, ['grouping' => true]); $form->setData('12345.67890'); $this->assertSame('12.345,679', $form->createView()->vars['value']); @@ -45,7 +45,7 @@ class NumberTypeTest extends BaseTypeTest public function testDefaultFormattingWithScale() { - $form = $this->factory->create(static::TESTED_TYPE, null, array('scale' => 2)); + $form = $this->factory->create(static::TESTED_TYPE, null, ['scale' => 2]); $form->setData('12345.67890'); $this->assertSame('12345,68', $form->createView()->vars['value']); @@ -53,7 +53,7 @@ class NumberTypeTest extends BaseTypeTest public function testDefaultFormattingWithRounding() { - $form = $this->factory->create(static::TESTED_TYPE, null, array('scale' => 0, 'rounding_mode' => \NumberFormatter::ROUND_UP)); + $form = $this->factory->create(static::TESTED_TYPE, null, ['scale' => 0, 'rounding_mode' => \NumberFormatter::ROUND_UP]); $form->setData('12345.54321'); $this->assertSame('12346', $form->createView()->vars['value']); @@ -66,9 +66,9 @@ class NumberTypeTest extends BaseTypeTest public function testSubmitNullUsesDefaultEmptyData($emptyData = '10', $expectedData = 10.0) { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'empty_data' => $emptyData, - )); + ]); $form->submit(null); $this->assertSame($emptyData, $form->getViewData()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php index c48240c6..872311b9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php @@ -33,7 +33,7 @@ class PasswordTypeTest extends BaseTypeTest public function testNotEmptyIfSubmittedAndNotAlwaysEmpty() { - $form = $this->factory->create(static::TESTED_TYPE, null, array('always_empty' => false)); + $form = $this->factory->create(static::TESTED_TYPE, null, ['always_empty' => false]); $form->submit('pAs5w0rd'); $this->assertSame('pAs5w0rd', $form->createView()->vars['value']); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php index 8021abdb..c380c059 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php @@ -26,9 +26,9 @@ class RepeatedTypeTest extends BaseTypeTest { parent::setUp(); - $this->form = $this->factory->create(static::TESTED_TYPE, null, array( + $this->form = $this->factory->create(static::TESTED_TYPE, null, [ 'type' => TextTypeTest::TESTED_TYPE, - )); + ]); } public function testSetData() @@ -41,10 +41,10 @@ class RepeatedTypeTest extends BaseTypeTest public function testSetOptions() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'type' => TextTypeTest::TESTED_TYPE, - 'options' => array('label' => 'Global'), - )); + 'options' => ['label' => 'Global'], + ]); $this->assertSame('Global', $form['first']->getConfig()->getOption('label')); $this->assertSame('Global', $form['second']->getConfig()->getOption('label')); @@ -54,12 +54,12 @@ class RepeatedTypeTest extends BaseTypeTest public function testSetOptionsPerChild() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ // the global required value cannot be overridden 'type' => TextTypeTest::TESTED_TYPE, - 'first_options' => array('label' => 'Test', 'required' => false), - 'second_options' => array('label' => 'Test2'), - )); + 'first_options' => ['label' => 'Test', 'required' => false], + 'second_options' => ['label' => 'Test2'], + ]); $this->assertSame('Test', $form['first']->getConfig()->getOption('label')); $this->assertSame('Test2', $form['second']->getConfig()->getOption('label')); @@ -69,10 +69,10 @@ class RepeatedTypeTest extends BaseTypeTest public function testSetRequired() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => false, 'type' => TextTypeTest::TESTED_TYPE, - )); + ]); $this->assertFalse($form['first']->isRequired()); $this->assertFalse($form['second']->isRequired()); @@ -83,10 +83,10 @@ class RepeatedTypeTest extends BaseTypeTest */ public function testSetInvalidOptions() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'type' => TextTypeTest::TESTED_TYPE, 'options' => 'bad value', - )); + ]); } /** @@ -94,10 +94,10 @@ class RepeatedTypeTest extends BaseTypeTest */ public function testSetInvalidFirstOptions() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'type' => TextTypeTest::TESTED_TYPE, 'first_options' => 'bad value', - )); + ]); } /** @@ -105,17 +105,17 @@ class RepeatedTypeTest extends BaseTypeTest */ public function testSetInvalidSecondOptions() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'type' => TextTypeTest::TESTED_TYPE, 'second_options' => 'bad value', - )); + ]); } public function testSetErrorBubblingToTrue() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'error_bubbling' => true, - )); + ]); $this->assertTrue($form->getConfig()->getOption('error_bubbling')); $this->assertTrue($form['first']->getConfig()->getOption('error_bubbling')); @@ -124,9 +124,9 @@ class RepeatedTypeTest extends BaseTypeTest public function testSetErrorBubblingToFalse() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'error_bubbling' => false, - )); + ]); $this->assertFalse($form->getConfig()->getOption('error_bubbling')); $this->assertFalse($form['first']->getConfig()->getOption('error_bubbling')); @@ -135,11 +135,11 @@ class RepeatedTypeTest extends BaseTypeTest public function testSetErrorBubblingIndividually() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'error_bubbling' => true, - 'options' => array('error_bubbling' => false), - 'second_options' => array('error_bubbling' => true), - )); + 'options' => ['error_bubbling' => false], + 'second_options' => ['error_bubbling' => true], + ]); $this->assertTrue($form->getConfig()->getOption('error_bubbling')); $this->assertFalse($form['first']->getConfig()->getOption('error_bubbling')); @@ -148,11 +148,11 @@ class RepeatedTypeTest extends BaseTypeTest public function testSetOptionsPerChildAndOverwrite() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'type' => TextTypeTest::TESTED_TYPE, - 'options' => array('label' => 'Label'), - 'second_options' => array('label' => 'Second label'), - )); + 'options' => ['label' => 'Label'], + 'second_options' => ['label' => 'Second label'], + ]); $this->assertSame('Label', $form['first']->getConfig()->getOption('label')); $this->assertSame('Second label', $form['second']->getConfig()->getOption('label')); @@ -162,7 +162,7 @@ class RepeatedTypeTest extends BaseTypeTest public function testSubmitUnequal() { - $input = array('first' => 'foo', 'second' => 'bar'); + $input = ['first' => 'foo', 'second' => 'bar']; $this->form->submit($input); @@ -175,7 +175,7 @@ class RepeatedTypeTest extends BaseTypeTest public function testSubmitEqual() { - $input = array('first' => 'foo', 'second' => 'foo'); + $input = ['first' => 'foo', 'second' => 'foo']; $this->form->submit($input); @@ -188,6 +188,6 @@ class RepeatedTypeTest extends BaseTypeTest public function testSubmitNull($expected = null, $norm = null, $view = null) { - parent::testSubmitNull($expected, $norm, array('first' => null, 'second' => null)); + parent::testSubmitNull($expected, $norm, ['first' => null, 'second' => null]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php index c4dba373..42853f60 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php @@ -22,9 +22,9 @@ class TextTypeTest extends BaseTypeTest public function testSubmitNullReturnsNullWithEmptyDataAsString() { - $form = $this->factory->create(static::TESTED_TYPE, 'name', array( + $form = $this->factory->create(static::TESTED_TYPE, 'name', [ 'empty_data' => '', - )); + ]); $form->submit(null); $this->assertSame('', $form->getData()); @@ -34,11 +34,11 @@ class TextTypeTest extends BaseTypeTest public function provideZeros() { - return array( - array(0, '0'), - array('0', '0'), - array('00000', '00000'), - ); + return [ + [0, '0'], + ['0', '0'], + ['00000', '00000'], + ]; } /** @@ -48,9 +48,9 @@ class TextTypeTest extends BaseTypeTest */ public function testSetDataThroughParamsWithZero($data, $dataAsString) { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'data' => $data, - )); + ]); $view = $form->createView(); $this->assertFalse($form->isEmpty()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php index a9ba7f02..b445c8c5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php @@ -20,16 +20,16 @@ class TimeTypeTest extends BaseTypeTest public function testSubmitDateTime() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'datetime', - )); + ]); - $input = array( + $input = [ 'hour' => '3', 'minute' => '4', - ); + ]; $form->submit($input); @@ -41,16 +41,16 @@ class TimeTypeTest extends BaseTypeTest public function testSubmitString() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'string', - )); + ]); - $input = array( + $input = [ 'hour' => '3', 'minute' => '4', - ); + ]; $form->submit($input); @@ -60,16 +60,16 @@ class TimeTypeTest extends BaseTypeTest public function testSubmitTimestamp() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'timestamp', - )); + ]); - $input = array( + $input = [ 'hour' => '3', 'minute' => '4', - ); + ]; $form->submit($input); @@ -81,16 +81,16 @@ class TimeTypeTest extends BaseTypeTest public function testSubmitArray() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'array', - )); + ]); - $input = array( + $input = [ 'hour' => '3', 'minute' => '4', - ); + ]; $form->submit($input); @@ -100,12 +100,12 @@ class TimeTypeTest extends BaseTypeTest public function testSubmitDatetimeSingleText() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'datetime', 'widget' => 'single_text', - )); + ]); $form->submit('03:04'); @@ -115,13 +115,13 @@ class TimeTypeTest extends BaseTypeTest public function testSubmitDatetimeSingleTextWithoutMinutes() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'datetime', 'widget' => 'single_text', 'with_minutes' => false, - )); + ]); $form->submit('03'); @@ -131,17 +131,17 @@ class TimeTypeTest extends BaseTypeTest public function testSubmitArraySingleText() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'array', 'widget' => 'single_text', - )); + ]); - $data = array( + $data = [ 'hour' => '3', 'minute' => '4', - ); + ]; $form->submit('03:04'); @@ -151,17 +151,17 @@ class TimeTypeTest extends BaseTypeTest public function testSubmitArraySingleTextWithoutMinutes() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'array', 'widget' => 'single_text', 'with_minutes' => false, - )); + ]); - $data = array( + $data = [ 'hour' => '3', - ); + ]; $form->submit('03'); @@ -171,19 +171,19 @@ class TimeTypeTest extends BaseTypeTest public function testSubmitArraySingleTextWithSeconds() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'array', 'widget' => 'single_text', 'with_seconds' => true, - )); + ]); - $data = array( + $data = [ 'hour' => '3', 'minute' => '4', 'second' => '5', - ); + ]; $form->submit('03:04:05'); @@ -193,12 +193,12 @@ class TimeTypeTest extends BaseTypeTest public function testSubmitStringSingleText() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'string', 'widget' => 'single_text', - )); + ]); $form->submit('03:04'); @@ -208,13 +208,13 @@ class TimeTypeTest extends BaseTypeTest public function testSubmitStringSingleTextWithoutMinutes() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'string', 'widget' => 'single_text', 'with_minutes' => false, - )); + ]); $form->submit('03'); @@ -224,13 +224,13 @@ class TimeTypeTest extends BaseTypeTest public function testSubmitWithSecondsAndBrowserOmissionSeconds() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'string', 'widget' => 'single_text', 'with_seconds' => true, - )); + ]); $form->submit('03:04'); @@ -240,40 +240,40 @@ class TimeTypeTest extends BaseTypeTest public function testSetDataWithoutMinutes() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'datetime', 'with_minutes' => false, - )); + ]); $form->setData(new \DateTime('03:04:05 UTC')); - $this->assertEquals(array('hour' => 3), $form->getViewData()); + $this->assertEquals(['hour' => 3], $form->getViewData()); } public function testSetDataWithSeconds() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'input' => 'datetime', 'with_seconds' => true, - )); + ]); $form->setData(new \DateTime('03:04:05 UTC')); - $this->assertEquals(array('hour' => 3, 'minute' => 4, 'second' => 5), $form->getViewData()); + $this->assertEquals(['hour' => 3, 'minute' => 4, 'second' => 5], $form->getViewData()); } public function testSetDataDifferentTimezones() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'America/New_York', 'view_timezone' => 'Asia/Hong_Kong', 'input' => 'string', 'with_seconds' => true, - )); + ]); $dateTime = new \DateTime('2013-01-01 12:04:05'); $dateTime->setTimezone(new \DateTimeZone('America/New_York')); @@ -283,23 +283,23 @@ class TimeTypeTest extends BaseTypeTest $outputTime = clone $dateTime; $outputTime->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); - $displayedData = array( + $displayedData = [ 'hour' => (int) $outputTime->format('H'), 'minute' => (int) $outputTime->format('i'), 'second' => (int) $outputTime->format('s'), - ); + ]; $this->assertEquals($displayedData, $form->getViewData()); } public function testSetDataDifferentTimezonesDateTime() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'model_timezone' => 'America/New_York', 'view_timezone' => 'Asia/Hong_Kong', 'input' => 'datetime', 'with_seconds' => true, - )); + ]); $dateTime = new \DateTime('12:04:05'); $dateTime->setTimezone(new \DateTimeZone('America/New_York')); @@ -309,11 +309,11 @@ class TimeTypeTest extends BaseTypeTest $outputTime = clone $dateTime; $outputTime->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); - $displayedData = array( + $displayedData = [ 'hour' => (int) $outputTime->format('H'), 'minute' => (int) $outputTime->format('i'), 'second' => (int) $outputTime->format('s'), - ); + ]; $this->assertEquals($dateTime, $form->getData()); $this->assertEquals($displayedData, $form->getViewData()); @@ -321,59 +321,59 @@ class TimeTypeTest extends BaseTypeTest public function testHoursOption() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( - 'hours' => array(6, 7), - )); + $form = $this->factory->create(static::TESTED_TYPE, null, [ + 'hours' => [6, 7], + ]); $view = $form->createView(); - $this->assertEquals(array( + $this->assertEquals([ new ChoiceView('6', '6', '06'), new ChoiceView('7', '7', '07'), - ), $view['hour']->vars['choices']); + ], $view['hour']->vars['choices']); } public function testIsMinuteWithinRangeReturnsTrueIfWithin() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( - 'minutes' => array(6, 7), - )); + $form = $this->factory->create(static::TESTED_TYPE, null, [ + 'minutes' => [6, 7], + ]); $view = $form->createView(); - $this->assertEquals(array( + $this->assertEquals([ new ChoiceView('6', '6', '06'), new ChoiceView('7', '7', '07'), - ), $view['minute']->vars['choices']); + ], $view['minute']->vars['choices']); } public function testIsSecondWithinRangeReturnsTrueIfWithin() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( - 'seconds' => array(6, 7), + $form = $this->factory->create(static::TESTED_TYPE, null, [ + 'seconds' => [6, 7], 'with_seconds' => true, - )); + ]); $view = $form->createView(); - $this->assertEquals(array( + $this->assertEquals([ new ChoiceView('6', '6', '06'), new ChoiceView('7', '7', '07'), - ), $view['second']->vars['choices']); + ], $view['second']->vars['choices']); } public function testIsPartiallyFilledReturnsFalseIfCompletelyEmpty() { $this->markTestIncomplete('Needs to be reimplemented using validators'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'choice', - )); + ]); - $form->submit(array( + $form->submit([ 'hour' => '', 'minute' => '', - )); + ]); $this->assertFalse($form->isPartiallyFilled()); } @@ -382,16 +382,16 @@ class TimeTypeTest extends BaseTypeTest { $this->markTestIncomplete('Needs to be reimplemented using validators'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'choice', 'with_seconds' => true, - )); + ]); - $form->submit(array( + $form->submit([ 'hour' => '', 'minute' => '', 'second' => '', - )); + ]); $this->assertFalse($form->isPartiallyFilled()); } @@ -400,14 +400,14 @@ class TimeTypeTest extends BaseTypeTest { $this->markTestIncomplete('Needs to be reimplemented using validators'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'choice', - )); + ]); - $form->submit(array( + $form->submit([ 'hour' => '0', 'minute' => '0', - )); + ]); $this->assertFalse($form->isPartiallyFilled()); } @@ -416,16 +416,16 @@ class TimeTypeTest extends BaseTypeTest { $this->markTestIncomplete('Needs to be reimplemented using validators'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'choice', 'with_seconds' => true, - )); + ]); - $form->submit(array( + $form->submit([ 'hour' => '0', 'minute' => '0', 'second' => '0', - )); + ]); $this->assertFalse($form->isPartiallyFilled()); } @@ -434,16 +434,16 @@ class TimeTypeTest extends BaseTypeTest { $this->markTestIncomplete('Needs to be reimplemented using validators'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'choice', 'with_seconds' => true, - )); + ]); - $form->submit(array( + $form->submit([ 'hour' => '', 'minute' => '0', 'second' => '0', - )); + ]); $this->assertTrue($form->isPartiallyFilled()); } @@ -452,16 +452,16 @@ class TimeTypeTest extends BaseTypeTest { $this->markTestIncomplete('Needs to be reimplemented using validators'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'choice', 'with_seconds' => true, - )); + ]); - $form->submit(array( + $form->submit([ 'hour' => '0', 'minute' => '', 'second' => '0', - )); + ]); $this->assertTrue($form->isPartiallyFilled()); } @@ -470,16 +470,16 @@ class TimeTypeTest extends BaseTypeTest { $this->markTestIncomplete('Needs to be reimplemented using validators'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'choice', 'with_seconds' => true, - )); + ]); - $form->submit(array( + $form->submit([ 'hour' => '0', 'minute' => '0', 'second' => '', - )); + ]); $this->assertTrue($form->isPartiallyFilled()); } @@ -493,9 +493,9 @@ class TimeTypeTest extends BaseTypeTest public function testSingleTextWidgetShouldUseTheRightInputType() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'single_text', - )); + ]); $view = $form->createView(); $this->assertEquals('time', $view->vars['type']); @@ -503,10 +503,10 @@ class TimeTypeTest extends BaseTypeTest public function testSingleTextWidgetWithSecondsShouldHaveRightStepAttribute() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'single_text', 'with_seconds' => true, - )); + ]); $view = $form->createView(); $this->assertArrayHasKey('step', $view->vars['attr']); @@ -515,13 +515,13 @@ class TimeTypeTest extends BaseTypeTest public function testSingleTextWidgetWithSecondsShouldNotOverrideStepAttribute() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'single_text', 'with_seconds' => true, - 'attr' => array( + 'attr' => [ 'step' => 30, - ), - )); + ], + ]); $view = $form->createView(); $this->assertArrayHasKey('step', $view->vars['attr']); @@ -530,10 +530,10 @@ class TimeTypeTest extends BaseTypeTest public function testDontPassHtml5TypeIfHtml5NotAllowed() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => 'single_text', 'html5' => false, - )); + ]); $view = $form->createView(); $this->assertArrayNotHasKey('type', $view->vars); @@ -541,10 +541,10 @@ class TimeTypeTest extends BaseTypeTest public function testPassDefaultPlaceholderToViewIfNotRequired() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => false, 'with_seconds' => true, - )); + ]); $view = $form->createView(); $this->assertSame('', $view['hour']->vars['placeholder']); @@ -554,10 +554,10 @@ class TimeTypeTest extends BaseTypeTest public function testPassNoPlaceholderToViewIfRequired() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => true, 'with_seconds' => true, - )); + ]); $view = $form->createView(); $this->assertNull($view['hour']->vars['placeholder']); @@ -567,10 +567,10 @@ class TimeTypeTest extends BaseTypeTest public function testPassPlaceholderAsString() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'placeholder' => 'Empty', 'with_seconds' => true, - )); + ]); $view = $form->createView(); $this->assertSame('Empty', $view['hour']->vars['placeholder']); @@ -580,14 +580,14 @@ class TimeTypeTest extends BaseTypeTest public function testPassPlaceholderAsArray() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( - 'placeholder' => array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ + 'placeholder' => [ 'hour' => 'Empty hour', 'minute' => 'Empty minute', 'second' => 'Empty second', - ), + ], 'with_seconds' => true, - )); + ]); $view = $form->createView(); $this->assertSame('Empty hour', $view['hour']->vars['placeholder']); @@ -597,14 +597,14 @@ class TimeTypeTest extends BaseTypeTest public function testPassPlaceholderAsPartialArrayAddEmptyIfNotRequired() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => false, - 'placeholder' => array( + 'placeholder' => [ 'hour' => 'Empty hour', 'second' => 'Empty second', - ), + ], 'with_seconds' => true, - )); + ]); $view = $form->createView(); $this->assertSame('Empty hour', $view['hour']->vars['placeholder']); @@ -614,14 +614,14 @@ class TimeTypeTest extends BaseTypeTest public function testPassPlaceholderAsPartialArrayAddNullIfRequired() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'required' => true, - 'placeholder' => array( + 'placeholder' => [ 'hour' => 'Empty hour', 'second' => 'Empty second', - ), + ], 'with_seconds' => true, - )); + ]); $view = $form->createView(); $this->assertSame('Empty hour', $view['hour']->vars['placeholder']); @@ -631,10 +631,10 @@ class TimeTypeTest extends BaseTypeTest public function provideCompoundWidgets() { - return array( - array('text'), - array('choice'), - ); + return [ + ['text'], + ['choice'], + ]; } /** @@ -643,13 +643,13 @@ class TimeTypeTest extends BaseTypeTest public function testHourErrorsBubbleUp($widget) { $error = new FormError('Invalid!'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => $widget, - )); + ]); $form['hour']->addError($error); - $this->assertSame(array(), iterator_to_array($form['hour']->getErrors())); - $this->assertSame(array($error), iterator_to_array($form->getErrors())); + $this->assertSame([], iterator_to_array($form['hour']->getErrors())); + $this->assertSame([$error], iterator_to_array($form->getErrors())); } /** @@ -658,13 +658,13 @@ class TimeTypeTest extends BaseTypeTest public function testMinuteErrorsBubbleUp($widget) { $error = new FormError('Invalid!'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => $widget, - )); + ]); $form['minute']->addError($error); - $this->assertSame(array(), iterator_to_array($form['minute']->getErrors())); - $this->assertSame(array($error), iterator_to_array($form->getErrors())); + $this->assertSame([], iterator_to_array($form['minute']->getErrors())); + $this->assertSame([$error], iterator_to_array($form->getErrors())); } /** @@ -673,14 +673,14 @@ class TimeTypeTest extends BaseTypeTest public function testSecondErrorsBubbleUp($widget) { $error = new FormError('Invalid!'); - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => $widget, 'with_seconds' => true, - )); + ]); $form['second']->addError($error); - $this->assertSame(array(), iterator_to_array($form['second']->getErrors())); - $this->assertSame(array($error), iterator_to_array($form->getErrors())); + $this->assertSame([], iterator_to_array($form['second']->getErrors())); + $this->assertSame([$error], iterator_to_array($form->getErrors())); } /** @@ -688,10 +688,10 @@ class TimeTypeTest extends BaseTypeTest */ public function testInitializeWithSecondsAndWithoutMinutes() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'with_minutes' => false, 'with_seconds' => true, - )); + ]); } /** @@ -699,9 +699,9 @@ class TimeTypeTest extends BaseTypeTest */ public function testThrowExceptionIfHoursIsInvalid() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'hours' => 'bad value', - )); + ]); } /** @@ -709,9 +709,9 @@ class TimeTypeTest extends BaseTypeTest */ public function testThrowExceptionIfMinutesIsInvalid() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'minutes' => 'bad value', - )); + ]); } /** @@ -719,9 +719,9 @@ class TimeTypeTest extends BaseTypeTest */ public function testThrowExceptionIfSecondsIsInvalid() { - $this->factory->create(static::TESTED_TYPE, null, array( + $this->factory->create(static::TESTED_TYPE, null, [ 'seconds' => 'bad value', - )); + ]); } public function testPassDefaultChoiceTranslationDomain() @@ -735,10 +735,10 @@ class TimeTypeTest extends BaseTypeTest public function testPassChoiceTranslationDomainAsString() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'choice_translation_domain' => 'messages', 'with_seconds' => true, - )); + ]); $view = $form->createView(); $this->assertSame('messages', $view['hour']->vars['choice_translation_domain']); @@ -748,13 +748,13 @@ class TimeTypeTest extends BaseTypeTest public function testPassChoiceTranslationDomainAsArray() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( - 'choice_translation_domain' => array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ + 'choice_translation_domain' => [ 'hour' => 'foo', 'second' => 'test', - ), + ], 'with_seconds' => true, - )); + ]); $view = $form->createView(); $this->assertSame('foo', $view['hour']->vars['choice_translation_domain']); @@ -764,20 +764,20 @@ class TimeTypeTest extends BaseTypeTest public function testSubmitNull($expected = null, $norm = null, $view = null) { - $view = array('hour' => '', 'minute' => ''); + $view = ['hour' => '', 'minute' => '']; parent::testSubmitNull($expected, $norm, $view); } - public function testSubmitNullUsesDefaultEmptyData($emptyData = array(), $expectedData = null) + public function testSubmitNullUsesDefaultEmptyData($emptyData = [], $expectedData = null) { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'empty_data' => $emptyData, - )); + ]); $form->submit(null); // view transformer writes back empty strings in the view data - $this->assertSame(array('hour' => '', 'minute' => ''), $form->getViewData()); + $this->assertSame(['hour' => '', 'minute' => ''], $form->getViewData()); $this->assertSame($expectedData, $form->getNormData()); $this->assertSame($expectedData, $form->getData()); } @@ -787,10 +787,10 @@ class TimeTypeTest extends BaseTypeTest */ public function testSubmitNullUsesDateEmptyData($widget, $emptyData, $expectedData) { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'widget' => $widget, 'empty_data' => $emptyData, - )); + ]); $form->submit(null); $this->assertSame($emptyData, $form->getViewData()); @@ -802,10 +802,10 @@ class TimeTypeTest extends BaseTypeTest { $expectedData = \DateTime::createFromFormat('Y-m-d H:i', '1970-01-01 21:23'); - return array( - 'Simple field' => array('single_text', '21:23', $expectedData), - 'Compound text field' => array('text', array('hour' => '21', 'minute' => '23'), $expectedData), - 'Compound choice field' => array('choice', array('hour' => '21', 'minute' => '23'), $expectedData), - ); + return [ + 'Simple field' => ['single_text', '21:23', $expectedData], + 'Compound text field' => ['text', ['hour' => '21', 'minute' => '23'], $expectedData], + 'Compound choice field' => ['choice', ['hour' => '21', 'minute' => '23'], $expectedData], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php index fa02456f..672dd1dc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php @@ -36,9 +36,9 @@ class TimezoneTypeTest extends BaseTypeTest public function testSubmitNullUsesDefaultEmptyData($emptyData = 'Africa/Kinshasa', $expectedData = 'Africa/Kinshasa') { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'empty_data' => $emptyData, - )); + ]); $form->submit(null); $this->assertSame($emptyData, $form->getViewData()); @@ -48,7 +48,7 @@ class TimezoneTypeTest extends BaseTypeTest public function testDateTimeZoneInput() { - $form = $this->factory->create(static::TESTED_TYPE, new \DateTimeZone('America/New_York'), array('input' => 'datetimezone')); + $form = $this->factory->create(static::TESTED_TYPE, new \DateTimeZone('America/New_York'), ['input' => 'datetimezone']); $this->assertSame('America/New_York', $form->createView()->vars['value']); @@ -56,18 +56,18 @@ class TimezoneTypeTest extends BaseTypeTest $this->assertEquals(new \DateTimeZone('Europe/Amsterdam'), $form->getData()); - $form = $this->factory->create(static::TESTED_TYPE, array(new \DateTimeZone('America/New_York')), array('input' => 'datetimezone', 'multiple' => true)); + $form = $this->factory->create(static::TESTED_TYPE, [new \DateTimeZone('America/New_York')], ['input' => 'datetimezone', 'multiple' => true]); - $this->assertSame(array('America/New_York'), $form->createView()->vars['value']); + $this->assertSame(['America/New_York'], $form->createView()->vars['value']); - $form->submit(array('Europe/Amsterdam', 'Europe/Paris')); + $form->submit(['Europe/Amsterdam', 'Europe/Paris']); - $this->assertEquals(array(new \DateTimeZone('Europe/Amsterdam'), new \DateTimeZone('Europe/Paris')), $form->getData()); + $this->assertEquals([new \DateTimeZone('Europe/Amsterdam'), new \DateTimeZone('Europe/Paris')], $form->getData()); } public function testFilterByRegions() { - $choices = $this->factory->create(static::TESTED_TYPE, null, array('regions' => \DateTimeZone::EUROPE)) + $choices = $this->factory->create(static::TESTED_TYPE, null, ['regions' => \DateTimeZone::EUROPE]) ->createView()->vars['choices']; $this->assertContains(new ChoiceView('Europe/Amsterdam', 'Europe/Amsterdam', 'Amsterdam'), $choices, '', false, false); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php index a72bc985..a5608557 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php @@ -27,9 +27,9 @@ class UrlTypeTest extends TextTypeTest public function testSubmitAddsNoDefaultProtocolIfAlreadyIncluded() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'default_protocol' => 'http', - )); + ]); $form->submit('ftp://www.domain.com'); @@ -39,9 +39,9 @@ class UrlTypeTest extends TextTypeTest public function testSubmitAddsNoDefaultProtocolIfEmpty() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'default_protocol' => 'http', - )); + ]); $form->submit(''); @@ -51,9 +51,9 @@ class UrlTypeTest extends TextTypeTest public function testSubmitAddsNoDefaultProtocolIfNull() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'default_protocol' => 'http', - )); + ]); $form->submit(null); @@ -63,9 +63,9 @@ class UrlTypeTest extends TextTypeTest public function testSubmitAddsNoDefaultProtocolIfSetToNull() { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'default_protocol' => null, - )); + ]); $form->submit('www.domain.com'); @@ -78,24 +78,16 @@ class UrlTypeTest extends TextTypeTest */ public function testThrowExceptionIfDefaultProtocolIsInvalid() { - $this->factory->create(static::TESTED_TYPE, null, array( - 'default_protocol' => array(), - )); - } - - public function testSubmitWithNonStringDataDoesNotBreakTheFixUrlProtocolListener() - { - $form = $this->factory->create(static::TESTED_TYPE); - $form->submit(array('domain.com', 'www.domain.com')); - - $this->assertSame(array('domain.com', 'www.domain.com'), $form->getData()); + $this->factory->create(static::TESTED_TYPE, null, [ + 'default_protocol' => [], + ]); } public function testSubmitNullUsesDefaultEmptyData($emptyData = 'empty', $expectedData = 'http://empty') { - $form = $this->factory->create(static::TESTED_TYPE, null, array( + $form = $this->factory->create(static::TESTED_TYPE, null, [ 'empty_data' => $emptyData, - )); + ]); $form->submit(null); // listener normalizes data on submit diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Csrf/EventListener/CsrfValidationListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Csrf/EventListener/CsrfValidationListenerTest.php index e9d99477..5876b092 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Csrf/EventListener/CsrfValidationListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Csrf/EventListener/CsrfValidationListenerTest.php @@ -12,9 +12,13 @@ namespace Symfony\Component\Form\Tests\Extension\Csrf\EventListener; use PHPUnit\Framework\TestCase; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper; use Symfony\Component\Form\Extension\Csrf\EventListener\CsrfValidationListener; use Symfony\Component\Form\FormBuilder; use Symfony\Component\Form\FormEvent; +use Symfony\Component\Form\FormFactoryBuilder; +use Symfony\Component\Security\Csrf\CsrfTokenManager; class CsrfValidationListenerTest extends TestCase { @@ -25,11 +29,11 @@ class CsrfValidationListenerTest extends TestCase protected function setUp() { - $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); - $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); - $this->tokenManager = $this->getMockBuilder('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface')->getMock(); - $this->form = $this->getBuilder('post') - ->setDataMapper($this->getDataMapper()) + $this->dispatcher = new EventDispatcher(); + $this->factory = (new FormFactoryBuilder())->getFormFactory(); + $this->tokenManager = new CsrfTokenManager(); + $this->form = $this->getBuilder() + ->setDataMapper(new PropertyPathMapper()) ->getForm(); } @@ -41,24 +45,9 @@ class CsrfValidationListenerTest extends TestCase $this->form = null; } - protected function getBuilder($name = 'name') + protected function getBuilder() { - return new FormBuilder($name, null, $this->dispatcher, $this->factory, array('compound' => true)); - } - - protected function getForm($name = 'name') - { - return $this->getBuilder($name)->getForm(); - } - - protected function getDataMapper() - { - return $this->getMockBuilder('Symfony\Component\Form\DataMapperInterface')->getMock(); - } - - protected function getMockForm() - { - return $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + return new FormBuilder('post', null, $this->dispatcher, $this->factory, ['compound' => true]); } // https://github.com/symfony/symfony/pull/5838 @@ -74,6 +63,16 @@ class CsrfValidationListenerTest extends TestCase $this->assertSame($data, $event->getData()); } + public function testArrayCsrfToken() + { + $event = new FormEvent($this->form, ['csrf' => []]); + + $validation = new CsrfValidationListener('csrf', $this->tokenManager, 'unknown', 'Invalid.'); + $validation->preSubmit($event); + + $this->assertNotEmpty($this->form->getErrors()); + } + public function testMaxPostSizeExceeded() { $serverParams = $this @@ -88,7 +87,7 @@ class CsrfValidationListenerTest extends TestCase ->willReturn(true) ; - $event = new FormEvent($this->form, array('csrf' => 'token')); + $event = new FormEvent($this->form, ['csrf' => 'token']); $validation = new CsrfValidationListener('csrf', $this->tokenManager, 'unknown', 'Error message', null, null, $serverParams); $validation->preSubmit($event); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php index 599a14a3..083f1c95 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php @@ -58,18 +58,18 @@ class FormTypeCsrfExtensionTest extends TypeTestCase protected function getExtensions() { - return array_merge(parent::getExtensions(), array( + return array_merge(parent::getExtensions(), [ new CsrfExtension($this->tokenManager, $this->translator), - )); + ]); } public function testCsrfProtectionByDefaultIfRootAndCompound() { $view = $this->factory - ->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + ->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'csrf_field_name' => 'csrf', 'compound' => true, - )) + ]) ->createView(); $this->assertArrayHasKey('csrf', $view); @@ -80,10 +80,10 @@ class FormTypeCsrfExtensionTest extends TypeTestCase $view = $this->factory ->createNamedBuilder('root', 'Symfony\Component\Form\Extension\Core\Type\FormType') ->add($this->factory - ->createNamedBuilder('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + ->createNamedBuilder('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'csrf_field_name' => 'csrf', 'compound' => true, - )) + ]) ) ->getForm() ->get('form') @@ -95,10 +95,10 @@ class FormTypeCsrfExtensionTest extends TypeTestCase public function testNoCsrfProtectionByDefaultIfRootButNotCompound() { $view = $this->factory - ->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + ->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'csrf_field_name' => 'csrf', 'compound' => false, - )) + ]) ->createView(); $this->assertArrayNotHasKey('csrf', $view); @@ -107,11 +107,11 @@ class FormTypeCsrfExtensionTest extends TypeTestCase public function testCsrfProtectionCanBeDisabled() { $view = $this->factory - ->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + ->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'csrf_field_name' => 'csrf', 'csrf_protection' => false, 'compound' => true, - )) + ]) ->createView(); $this->assertArrayNotHasKey('csrf', $view); @@ -125,12 +125,12 @@ class FormTypeCsrfExtensionTest extends TypeTestCase ->will($this->returnValue(new CsrfToken('TOKEN_ID', 'token'))); $view = $this->factory - ->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + ->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'csrf_field_name' => 'csrf', 'csrf_token_manager' => $this->tokenManager, 'csrf_token_id' => 'TOKEN_ID', 'compound' => true, - )) + ]) ->createView(); $this->assertEquals('token', $view['csrf']->vars['value']); @@ -144,11 +144,11 @@ class FormTypeCsrfExtensionTest extends TypeTestCase ->will($this->returnValue('token')); $view = $this->factory - ->createNamed('FORM_NAME', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + ->createNamed('FORM_NAME', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'csrf_field_name' => 'csrf', 'csrf_token_manager' => $this->tokenManager, 'compound' => true, - )) + ]) ->createView(); $this->assertEquals('token', $view['csrf']->vars['value']); @@ -162,11 +162,11 @@ class FormTypeCsrfExtensionTest extends TypeTestCase ->will($this->returnValue('token')); $view = $this->factory - ->createNamed('', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + ->createNamed('', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'csrf_field_name' => 'csrf', 'csrf_token_manager' => $this->tokenManager, 'compound' => true, - )) + ]) ->createView(); $this->assertEquals('token', $view['csrf']->vars['value']); @@ -174,10 +174,10 @@ class FormTypeCsrfExtensionTest extends TypeTestCase public function provideBoolean() { - return array( - array(true), - array(false), - ); + return [ + [true], + [false], + ]; } /** @@ -191,22 +191,22 @@ class FormTypeCsrfExtensionTest extends TypeTestCase ->will($this->returnValue($valid)); $form = $this->factory - ->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + ->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'csrf_field_name' => 'csrf', 'csrf_token_manager' => $this->tokenManager, 'csrf_token_id' => 'TOKEN_ID', 'compound' => true, - )) + ]) ->add('child', 'Symfony\Component\Form\Extension\Core\Type\TextType') ->getForm(); - $form->submit(array( + $form->submit([ 'child' => 'foobar', 'csrf' => 'token', - )); + ]); // Remove token from data - $this->assertSame(array('child' => 'foobar'), $form->getData()); + $this->assertSame(['child' => 'foobar'], $form->getData()); // Validate accordingly $this->assertSame($valid, $form->isValid()); @@ -223,21 +223,21 @@ class FormTypeCsrfExtensionTest extends TypeTestCase ->will($this->returnValue($valid)); $form = $this->factory - ->createNamedBuilder('FORM_NAME', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + ->createNamedBuilder('FORM_NAME', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'csrf_field_name' => 'csrf', 'csrf_token_manager' => $this->tokenManager, 'compound' => true, - )) + ]) ->add('child', 'Symfony\Component\Form\Extension\Core\Type\TextType') ->getForm(); - $form->submit(array( + $form->submit([ 'child' => 'foobar', 'csrf' => 'token', - )); + ]); // Remove token from data - $this->assertSame(array('child' => 'foobar'), $form->getData()); + $this->assertSame(['child' => 'foobar'], $form->getData()); // Validate accordingly $this->assertSame($valid, $form->isValid()); @@ -254,21 +254,21 @@ class FormTypeCsrfExtensionTest extends TypeTestCase ->will($this->returnValue($valid)); $form = $this->factory - ->createNamedBuilder('', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + ->createNamedBuilder('', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'csrf_field_name' => 'csrf', 'csrf_token_manager' => $this->tokenManager, 'compound' => true, - )) + ]) ->add('child', 'Symfony\Component\Form\Extension\Core\Type\TextType') ->getForm(); - $form->submit(array( + $form->submit([ 'child' => 'foobar', 'csrf' => 'token', - )); + ]); // Remove token from data - $this->assertSame(array('child' => 'foobar'), $form->getData()); + $this->assertSame(['child' => 'foobar'], $form->getData()); // Validate accordingly $this->assertSame($valid, $form->isValid()); @@ -280,22 +280,22 @@ class FormTypeCsrfExtensionTest extends TypeTestCase ->method('isTokenValid'); $form = $this->factory - ->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + ->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'csrf_field_name' => 'csrf', 'csrf_token_manager' => $this->tokenManager, 'csrf_token_id' => 'TOKEN_ID', 'compound' => true, - )) + ]) ->add('child', 'Symfony\Component\Form\Extension\Core\Type\TextType') ->getForm(); - $form->submit(array( + $form->submit([ 'child' => 'foobar', // token is missing - )); + ]); // Remove token from data - $this->assertSame(array('child' => 'foobar'), $form->getData()); + $this->assertSame(['child' => 'foobar'], $form->getData()); // Validate accordingly $this->assertFalse($form->isValid()); @@ -309,20 +309,20 @@ class FormTypeCsrfExtensionTest extends TypeTestCase $form = $this->factory ->createNamedBuilder('root', 'Symfony\Component\Form\Extension\Core\Type\FormType') ->add($this->factory - ->createNamedBuilder('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + ->createNamedBuilder('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'csrf_field_name' => 'csrf', 'csrf_token_manager' => $this->tokenManager, 'csrf_token_id' => 'TOKEN_ID', 'compound' => true, - )) + ]) ) ->getForm() ->get('form'); - $form->submit(array( + $form->submit([ 'child' => 'foobar', 'csrf' => 'token', - )); + ]); } public function testDontValidateTokenIfRootButNotCompound() @@ -331,29 +331,29 @@ class FormTypeCsrfExtensionTest extends TypeTestCase ->method('isTokenValid'); $form = $this->factory - ->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + ->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'csrf_field_name' => 'csrf', 'csrf_token_manager' => $this->tokenManager, 'csrf_token_id' => 'TOKEN_ID', 'compound' => false, - )); + ]); - $form->submit(array( + $form->submit([ 'csrf' => 'token', - )); + ]); } public function testNoCsrfProtectionOnPrototype() { $prototypeView = $this->factory - ->create('Symfony\Component\Form\Extension\Core\Type\CollectionType', null, array( + ->create('Symfony\Component\Form\Extension\Core\Type\CollectionType', null, [ 'entry_type' => __CLASS__.'_ChildType', - 'entry_options' => array( + 'entry_options' => [ 'csrf_field_name' => 'csrf', - ), + ], 'prototype' => true, 'allow_add' => true, - )) + ]) ->createView() ->vars['prototype']; @@ -374,18 +374,18 @@ class FormTypeCsrfExtensionTest extends TypeTestCase ->will($this->returnValue('[trans]Foobar[/trans]')); $form = $this->factory - ->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + ->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', null, [ 'csrf_field_name' => 'csrf', 'csrf_token_manager' => $this->tokenManager, 'csrf_message' => 'Foobar', 'csrf_token_id' => 'TOKEN_ID', 'compound' => true, - )) + ]) ->getForm(); - $form->submit(array( + $form->submit([ 'csrf' => 'token', - )); + ]); $errors = $form->getErrors(); $expected = new FormError('[trans]Foobar[/trans]'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php index 3bfef602..2ca0f95f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php @@ -84,62 +84,62 @@ class FormDataCollectorTest extends TestCase $this->dataExtractor->expects($this->at(0)) ->method('extractConfiguration') ->with($this->form) - ->will($this->returnValue(array('config' => 'foo'))); + ->will($this->returnValue(['config' => 'foo'])); $this->dataExtractor->expects($this->at(1)) ->method('extractConfiguration') ->with($this->childForm) - ->will($this->returnValue(array('config' => 'bar'))); + ->will($this->returnValue(['config' => 'bar'])); $this->dataExtractor->expects($this->at(2)) ->method('extractDefaultData') ->with($this->form) - ->will($this->returnValue(array('default_data' => 'foo'))); + ->will($this->returnValue(['default_data' => 'foo'])); $this->dataExtractor->expects($this->at(3)) ->method('extractDefaultData') ->with($this->childForm) - ->will($this->returnValue(array('default_data' => 'bar'))); + ->will($this->returnValue(['default_data' => 'bar'])); $this->dataExtractor->expects($this->at(4)) ->method('extractSubmittedData') ->with($this->form) - ->will($this->returnValue(array('submitted_data' => 'foo'))); + ->will($this->returnValue(['submitted_data' => 'foo'])); $this->dataExtractor->expects($this->at(5)) ->method('extractSubmittedData') ->with($this->childForm) - ->will($this->returnValue(array('submitted_data' => 'bar'))); + ->will($this->returnValue(['submitted_data' => 'bar'])); $this->dataCollector->collectConfiguration($this->form); $this->dataCollector->collectDefaultData($this->form); $this->dataCollector->collectSubmittedData($this->form); $this->dataCollector->buildPreliminaryFormTree($this->form); - $childFormData = array( + $childFormData = [ 'config' => 'bar', 'default_data' => 'bar', 'submitted_data' => 'bar', - 'children' => array(), - ); + 'children' => [], + ]; - $formData = array( + $formData = [ 'config' => 'foo', 'default_data' => 'foo', 'submitted_data' => 'foo', 'has_children_error' => false, - 'children' => array( + 'children' => [ 'child' => $childFormData, - ), - ); + ], + ]; - $this->assertSame(array( - 'forms' => array( + $this->assertSame([ + 'forms' => [ 'name' => $formData, - ), - 'forms_by_hash' => array( + ], + 'forms_by_hash' => [ spl_object_hash($this->form) => $formData, spl_object_hash($this->childForm) => $childFormData, - ), + ], 'nb_errors' => 0, - ), $this->dataCollector->getData()); + ], $this->dataCollector->getData()); } public function testBuildMultiplePreliminaryFormTrees() @@ -150,49 +150,49 @@ class FormDataCollectorTest extends TestCase $this->dataExtractor->expects($this->at(0)) ->method('extractConfiguration') ->with($form1) - ->will($this->returnValue(array('config' => 'foo'))); + ->will($this->returnValue(['config' => 'foo'])); $this->dataExtractor->expects($this->at(1)) ->method('extractConfiguration') ->with($form2) - ->will($this->returnValue(array('config' => 'bar'))); + ->will($this->returnValue(['config' => 'bar'])); $this->dataCollector->collectConfiguration($form1); $this->dataCollector->collectConfiguration($form2); $this->dataCollector->buildPreliminaryFormTree($form1); - $form1Data = array( + $form1Data = [ 'config' => 'foo', - 'children' => array(), - ); + 'children' => [], + ]; - $this->assertSame(array( - 'forms' => array( + $this->assertSame([ + 'forms' => [ 'form1' => $form1Data, - ), - 'forms_by_hash' => array( + ], + 'forms_by_hash' => [ spl_object_hash($form1) => $form1Data, - ), + ], 'nb_errors' => 0, - ), $this->dataCollector->getData()); + ], $this->dataCollector->getData()); $this->dataCollector->buildPreliminaryFormTree($form2); - $form2Data = array( + $form2Data = [ 'config' => 'bar', - 'children' => array(), - ); + 'children' => [], + ]; - $this->assertSame(array( - 'forms' => array( + $this->assertSame([ + 'forms' => [ 'form1' => $form1Data, 'form2' => $form2Data, - ), - 'forms_by_hash' => array( + ], + 'forms_by_hash' => [ spl_object_hash($form1) => $form1Data, spl_object_hash($form2) => $form2Data, - ), + ], 'nb_errors' => 0, - ), $this->dataCollector->getData()); + ], $this->dataCollector->getData()); } public function testBuildSamePreliminaryFormTreeMultipleTimes() @@ -200,68 +200,68 @@ class FormDataCollectorTest extends TestCase $this->dataExtractor->expects($this->at(0)) ->method('extractConfiguration') ->with($this->form) - ->will($this->returnValue(array('config' => 'foo'))); + ->will($this->returnValue(['config' => 'foo'])); $this->dataExtractor->expects($this->at(1)) ->method('extractDefaultData') ->with($this->form) - ->will($this->returnValue(array('default_data' => 'foo'))); + ->will($this->returnValue(['default_data' => 'foo'])); $this->dataCollector->collectConfiguration($this->form); $this->dataCollector->buildPreliminaryFormTree($this->form); - $formData = array( + $formData = [ 'config' => 'foo', - 'children' => array(), - ); + 'children' => [], + ]; - $this->assertSame(array( - 'forms' => array( + $this->assertSame([ + 'forms' => [ 'name' => $formData, - ), - 'forms_by_hash' => array( + ], + 'forms_by_hash' => [ spl_object_hash($this->form) => $formData, - ), + ], 'nb_errors' => 0, - ), $this->dataCollector->getData()); + ], $this->dataCollector->getData()); $this->dataCollector->collectDefaultData($this->form); $this->dataCollector->buildPreliminaryFormTree($this->form); - $formData = array( + $formData = [ 'config' => 'foo', 'default_data' => 'foo', - 'children' => array(), - ); + 'children' => [], + ]; - $this->assertSame(array( - 'forms' => array( + $this->assertSame([ + 'forms' => [ 'name' => $formData, - ), - 'forms_by_hash' => array( + ], + 'forms_by_hash' => [ spl_object_hash($this->form) => $formData, - ), + ], 'nb_errors' => 0, - ), $this->dataCollector->getData()); + ], $this->dataCollector->getData()); } public function testBuildPreliminaryFormTreeWithoutCollectingAnyData() { $this->dataCollector->buildPreliminaryFormTree($this->form); - $formData = array( - 'children' => array(), - ); + $formData = [ + 'children' => [], + ]; - $this->assertSame(array( - 'forms' => array( + $this->assertSame([ + 'forms' => [ 'name' => $formData, - ), - 'forms_by_hash' => array( + ], + 'forms_by_hash' => [ spl_object_hash($this->form) => $formData, - ), + ], 'nb_errors' => 0, - ), $this->dataCollector->getData()); + ], $this->dataCollector->getData()); } public function testBuildFinalFormTree() @@ -272,39 +272,39 @@ class FormDataCollectorTest extends TestCase $this->dataExtractor->expects($this->at(0)) ->method('extractConfiguration') ->with($this->form) - ->will($this->returnValue(array('config' => 'foo'))); + ->will($this->returnValue(['config' => 'foo'])); $this->dataExtractor->expects($this->at(1)) ->method('extractConfiguration') ->with($this->childForm) - ->will($this->returnValue(array('config' => 'bar'))); + ->will($this->returnValue(['config' => 'bar'])); $this->dataExtractor->expects($this->at(2)) ->method('extractDefaultData') ->with($this->form) - ->will($this->returnValue(array('default_data' => 'foo'))); + ->will($this->returnValue(['default_data' => 'foo'])); $this->dataExtractor->expects($this->at(3)) ->method('extractDefaultData') ->with($this->childForm) - ->will($this->returnValue(array('default_data' => 'bar'))); + ->will($this->returnValue(['default_data' => 'bar'])); $this->dataExtractor->expects($this->at(4)) ->method('extractSubmittedData') ->with($this->form) - ->will($this->returnValue(array('submitted_data' => 'foo'))); + ->will($this->returnValue(['submitted_data' => 'foo'])); $this->dataExtractor->expects($this->at(5)) ->method('extractSubmittedData') ->with($this->childForm) - ->will($this->returnValue(array('submitted_data' => 'bar'))); + ->will($this->returnValue(['submitted_data' => 'bar'])); $this->dataExtractor->expects($this->at(6)) ->method('extractViewVariables') ->with($this->view) - ->will($this->returnValue(array('view_vars' => 'foo'))); + ->will($this->returnValue(['view_vars' => 'foo'])); $this->dataExtractor->expects($this->at(7)) ->method('extractViewVariables') ->with($this->childView) - ->will($this->returnValue(array('view_vars' => 'bar'))); + ->will($this->returnValue(['view_vars' => 'bar'])); $this->dataCollector->collectConfiguration($this->form); $this->dataCollector->collectDefaultData($this->form); @@ -312,35 +312,35 @@ class FormDataCollectorTest extends TestCase $this->dataCollector->collectViewVariables($this->view); $this->dataCollector->buildFinalFormTree($this->form, $this->view); - $childFormData = array( + $childFormData = [ 'view_vars' => 'bar', 'config' => 'bar', 'default_data' => 'bar', 'submitted_data' => 'bar', - 'children' => array(), - ); + 'children' => [], + ]; - $formData = array( + $formData = [ 'view_vars' => 'foo', 'config' => 'foo', 'default_data' => 'foo', 'submitted_data' => 'foo', 'has_children_error' => false, - 'children' => array( + 'children' => [ 'child' => $childFormData, - ), - ); + ], + ]; - $this->assertSame(array( - 'forms' => array( + $this->assertSame([ + 'forms' => [ 'name' => $formData, - ), - 'forms_by_hash' => array( + ], + 'forms_by_hash' => [ spl_object_hash($this->form) => $formData, spl_object_hash($this->childForm) => $childFormData, - ), + ], 'nb_errors' => 0, - ), $this->dataCollector->getData()); + ], $this->dataCollector->getData()); } public function testSerializeWithFormAddedMultipleTimes() @@ -365,76 +365,76 @@ class FormDataCollectorTest extends TestCase $this->dataExtractor->expects($this->at(0)) ->method('extractConfiguration') ->with($form1) - ->will($this->returnValue(array('config' => 'foo'))); + ->will($this->returnValue(['config' => 'foo'])); $this->dataExtractor->expects($this->at(1)) ->method('extractConfiguration') ->with($child1) - ->will($this->returnValue(array('config' => 'bar'))); + ->will($this->returnValue(['config' => 'bar'])); $this->dataExtractor->expects($this->at(2)) ->method('extractDefaultData') ->with($form1) - ->will($this->returnValue(array('default_data' => 'foo'))); + ->will($this->returnValue(['default_data' => 'foo'])); $this->dataExtractor->expects($this->at(3)) ->method('extractDefaultData') ->with($child1) - ->will($this->returnValue(array('default_data' => 'bar'))); + ->will($this->returnValue(['default_data' => 'bar'])); $this->dataExtractor->expects($this->at(4)) ->method('extractSubmittedData') ->with($form1) - ->will($this->returnValue(array('submitted_data' => 'foo'))); + ->will($this->returnValue(['submitted_data' => 'foo'])); $this->dataExtractor->expects($this->at(5)) ->method('extractSubmittedData') ->with($child1) - ->will($this->returnValue(array('submitted_data' => 'bar'))); + ->will($this->returnValue(['submitted_data' => 'bar'])); $this->dataExtractor->expects($this->at(6)) ->method('extractViewVariables') ->with($form1View) - ->will($this->returnValue(array('view_vars' => 'foo'))); + ->will($this->returnValue(['view_vars' => 'foo'])); $this->dataExtractor->expects($this->at(7)) ->method('extractViewVariables') ->with($child1View) - ->will($this->returnValue(array('view_vars' => $child1View->vars))); + ->will($this->returnValue(['view_vars' => $child1View->vars])); $this->dataExtractor->expects($this->at(8)) ->method('extractConfiguration') ->with($form2) - ->will($this->returnValue(array('config' => 'foo'))); + ->will($this->returnValue(['config' => 'foo'])); $this->dataExtractor->expects($this->at(9)) ->method('extractConfiguration') ->with($child1) - ->will($this->returnValue(array('config' => 'bar'))); + ->will($this->returnValue(['config' => 'bar'])); $this->dataExtractor->expects($this->at(10)) ->method('extractDefaultData') ->with($form2) - ->will($this->returnValue(array('default_data' => 'foo'))); + ->will($this->returnValue(['default_data' => 'foo'])); $this->dataExtractor->expects($this->at(11)) ->method('extractDefaultData') ->with($child1) - ->will($this->returnValue(array('default_data' => 'bar'))); + ->will($this->returnValue(['default_data' => 'bar'])); $this->dataExtractor->expects($this->at(12)) ->method('extractSubmittedData') ->with($form2) - ->will($this->returnValue(array('submitted_data' => 'foo'))); + ->will($this->returnValue(['submitted_data' => 'foo'])); $this->dataExtractor->expects($this->at(13)) ->method('extractSubmittedData') ->with($child1) - ->will($this->returnValue(array('submitted_data' => 'bar'))); + ->will($this->returnValue(['submitted_data' => 'bar'])); $this->dataExtractor->expects($this->at(14)) ->method('extractViewVariables') ->with($form2View) - ->will($this->returnValue(array('view_vars' => 'foo'))); + ->will($this->returnValue(['view_vars' => 'foo'])); $this->dataExtractor->expects($this->at(15)) ->method('extractViewVariables') ->with($child1View) - ->will($this->returnValue(array('view_vars' => $child1View->vars))); + ->will($this->returnValue(['view_vars' => $child1View->vars])); $this->dataCollector->collectConfiguration($form1); $this->dataCollector->collectDefaultData($form1); @@ -460,53 +460,53 @@ class FormDataCollectorTest extends TestCase $this->dataCollector->buildPreliminaryFormTree($this->form); - $child1Data = array( - 'children' => array(), - ); + $child1Data = [ + 'children' => [], + ]; - $child2Data = array( - 'children' => array(), - ); + $child2Data = [ + 'children' => [], + ]; - $formData = array( - 'children' => array( + $formData = [ + 'children' => [ 'first' => $child1Data, 'second' => $child2Data, - ), - ); + ], + ]; - $this->assertSame(array( - 'forms' => array( + $this->assertSame([ + 'forms' => [ 'name' => $formData, - ), - 'forms_by_hash' => array( + ], + 'forms_by_hash' => [ spl_object_hash($this->form) => $formData, spl_object_hash($child1) => $child1Data, spl_object_hash($child2) => $child2Data, - ), + ], 'nb_errors' => 0, - ), $this->dataCollector->getData()); + ], $this->dataCollector->getData()); $this->dataCollector->buildFinalFormTree($this->form, $this->view); - $formData = array( - 'children' => array( + $formData = [ + 'children' => [ // "first" not present in FormView 'second' => $child2Data, - ), - ); + ], + ]; - $this->assertSame(array( - 'forms' => array( + $this->assertSame([ + 'forms' => [ 'name' => $formData, - ), - 'forms_by_hash' => array( + ], + 'forms_by_hash' => [ spl_object_hash($this->form) => $formData, spl_object_hash($child1) => $child1Data, spl_object_hash($child2) => $child2Data, - ), + ], 'nb_errors' => 0, - ), $this->dataCollector->getData()); + ], $this->dataCollector->getData()); } public function testChildViewsCanBeWithoutCorrespondingChildForms() @@ -518,11 +518,11 @@ class FormDataCollectorTest extends TestCase $this->dataExtractor->expects($this->at(0)) ->method('extractConfiguration') ->with($this->form) - ->will($this->returnValue(array('config' => 'foo'))); + ->will($this->returnValue(['config' => 'foo'])); $this->dataExtractor->expects($this->at(1)) ->method('extractConfiguration') ->with($this->childForm) - ->will($this->returnValue(array('config' => 'bar'))); + ->will($this->returnValue(['config' => 'bar'])); // explicitly call collectConfiguration(), since $this->childForm is not // contained in the form tree @@ -530,28 +530,28 @@ class FormDataCollectorTest extends TestCase $this->dataCollector->collectConfiguration($this->childForm); $this->dataCollector->buildFinalFormTree($this->form, $this->view); - $childFormData = array( + $childFormData = [ // no "config" key - 'children' => array(), - ); + 'children' => [], + ]; - $formData = array( + $formData = [ 'config' => 'foo', - 'children' => array( + 'children' => [ 'child' => $childFormData, - ), - ); + ], + ]; - $this->assertSame(array( - 'forms' => array( + $this->assertSame([ + 'forms' => [ 'name' => $formData, - ), - 'forms_by_hash' => array( + ], + 'forms_by_hash' => [ spl_object_hash($this->form) => $formData, // no child entry - ), + ], 'nb_errors' => 0, - ), $this->dataCollector->getData()); + ], $this->dataCollector->getData()); } public function testChildViewsWithoutCorrespondingChildFormsMayBeExplicitlyAssociated() @@ -566,11 +566,11 @@ class FormDataCollectorTest extends TestCase $this->dataExtractor->expects($this->at(0)) ->method('extractConfiguration') ->with($this->form) - ->will($this->returnValue(array('config' => 'foo'))); + ->will($this->returnValue(['config' => 'foo'])); $this->dataExtractor->expects($this->at(1)) ->method('extractConfiguration') ->with($this->childForm) - ->will($this->returnValue(array('config' => 'bar'))); + ->will($this->returnValue(['config' => 'bar'])); // explicitly call collectConfiguration(), since $this->childForm is not // contained in the form tree @@ -578,28 +578,28 @@ class FormDataCollectorTest extends TestCase $this->dataCollector->collectConfiguration($this->childForm); $this->dataCollector->buildFinalFormTree($this->form, $this->view); - $childFormData = array( + $childFormData = [ 'config' => 'bar', - 'children' => array(), - ); + 'children' => [], + ]; - $formData = array( + $formData = [ 'config' => 'foo', - 'children' => array( + 'children' => [ 'child' => $childFormData, - ), - ); + ], + ]; - $this->assertSame(array( - 'forms' => array( + $this->assertSame([ + 'forms' => [ 'name' => $formData, - ), - 'forms_by_hash' => array( + ], + 'forms_by_hash' => [ spl_object_hash($this->form) => $formData, spl_object_hash($this->childForm) => $childFormData, - ), + ], 'nb_errors' => 0, - ), $this->dataCollector->getData()); + ], $this->dataCollector->getData()); } public function testCollectSubmittedDataCountsErrors() @@ -611,22 +611,22 @@ class FormDataCollectorTest extends TestCase $form1->add($childForm1); $this->dataExtractor ->method('extractConfiguration') - ->will($this->returnValue(array())); + ->will($this->returnValue([])); $this->dataExtractor ->method('extractDefaultData') - ->will($this->returnValue(array())); + ->will($this->returnValue([])); $this->dataExtractor->expects($this->at(4)) ->method('extractSubmittedData') ->with($form1) - ->will($this->returnValue(array('errors' => array('foo')))); + ->will($this->returnValue(['errors' => ['foo']])); $this->dataExtractor->expects($this->at(5)) ->method('extractSubmittedData') ->with($childForm1) - ->will($this->returnValue(array('errors' => array('bar', 'bam')))); + ->will($this->returnValue(['errors' => ['bar', 'bam']])); $this->dataExtractor->expects($this->at(8)) ->method('extractSubmittedData') ->with($form2) - ->will($this->returnValue(array('errors' => array('baz')))); + ->will($this->returnValue(['errors' => ['baz']])); $this->dataCollector->collectSubmittedData($form1); @@ -653,30 +653,30 @@ class FormDataCollectorTest extends TestCase $this->dataExtractor ->method('extractConfiguration') - ->will($this->returnValue(array())); + ->will($this->returnValue([])); $this->dataExtractor ->method('extractDefaultData') - ->will($this->returnValue(array())); + ->will($this->returnValue([])); $this->dataExtractor->expects($this->at(10)) ->method('extractSubmittedData') ->with($this->form) - ->will($this->returnValue(array('errors' => array()))); + ->will($this->returnValue(['errors' => []])); $this->dataExtractor->expects($this->at(11)) ->method('extractSubmittedData') ->with($child1Form) - ->will($this->returnValue(array('errors' => array()))); + ->will($this->returnValue(['errors' => []])); $this->dataExtractor->expects($this->at(12)) ->method('extractSubmittedData') ->with($child11Form) - ->will($this->returnValue(array('errors' => array('foo')))); + ->will($this->returnValue(['errors' => ['foo']])); $this->dataExtractor->expects($this->at(13)) ->method('extractSubmittedData') ->with($child2Form) - ->will($this->returnValue(array('errors' => array()))); + ->will($this->returnValue(['errors' => []])); $this->dataExtractor->expects($this->at(14)) ->method('extractSubmittedData') ->with($child21Form) - ->will($this->returnValue(array('errors' => array()))); + ->will($this->returnValue(['errors' => []])); $this->dataCollector->collectSubmittedData($this->form); $this->dataCollector->buildPreliminaryFormTree($this->form); @@ -701,14 +701,14 @@ class FormDataCollectorTest extends TestCase $this->dataExtractor->expects($this->any()) ->method('extractConfiguration') - ->will($this->returnValue(array())); + ->will($this->returnValue([])); $this->dataExtractor->expects($this->any()) ->method('extractDefaultData') - ->will($this->returnValue(array())); + ->will($this->returnValue([])); $this->dataExtractor->expects($this->any()) ->method('extractSubmittedData') ->with($form) - ->will($this->returnValue(array('errors' => array('baz')))); + ->will($this->returnValue(['errors' => ['baz']])); $this->dataCollector->buildPreliminaryFormTree($form); $this->dataCollector->collectSubmittedData($form); @@ -716,11 +716,11 @@ class FormDataCollectorTest extends TestCase $this->dataCollector->reset(); $this->assertSame( - array( - 'forms' => array(), - 'forms_by_hash' => array(), + [ + 'forms' => [], + 'forms_by_hash' => [], 'nb_errors' => 0, - ), + ], $this->dataCollector->getData() ); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataExtractorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataExtractorTest.php index 50fdfd8a..9bbfb0f4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataExtractorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataExtractorTest.php @@ -62,14 +62,14 @@ class FormDataExtractorTest extends TestCase ->setType($type) ->getForm(); - $this->assertSame(array( + $this->assertSame([ 'id' => 'name', 'name' => 'name', 'type_class' => 'stdClass', 'synchronized' => true, - 'passed_options' => array(), - 'resolved_options' => array(), - ), $this->dataExtractor->extractConfiguration($form)); + 'passed_options' => [], + 'resolved_options' => [], + ], $this->dataExtractor->extractConfiguration($form)); } public function testExtractConfigurationSortsPassedOptions() @@ -79,11 +79,11 @@ class FormDataExtractorTest extends TestCase ->method('getInnerType') ->will($this->returnValue(new \stdClass())); - $options = array( + $options = [ 'b' => 'foo', 'a' => 'bar', 'c' => 'baz', - ); + ]; $form = $this->createBuilder('name') ->setType($type) @@ -92,18 +92,18 @@ class FormDataExtractorTest extends TestCase ->setAttribute('data_collector/passed_options', $options) ->getForm(); - $this->assertSame(array( + $this->assertSame([ 'id' => 'name', 'name' => 'name', 'type_class' => 'stdClass', 'synchronized' => true, - 'passed_options' => array( + 'passed_options' => [ 'a' => 'bar', 'b' => 'foo', 'c' => 'baz', - ), - 'resolved_options' => array(), - ), $this->dataExtractor->extractConfiguration($form)); + ], + 'resolved_options' => [], + ], $this->dataExtractor->extractConfiguration($form)); } public function testExtractConfigurationSortsResolvedOptions() @@ -113,28 +113,28 @@ class FormDataExtractorTest extends TestCase ->method('getInnerType') ->will($this->returnValue(new \stdClass())); - $options = array( + $options = [ 'b' => 'foo', 'a' => 'bar', 'c' => 'baz', - ); + ]; $form = $this->createBuilder('name', $options) ->setType($type) ->getForm(); - $this->assertSame(array( + $this->assertSame([ 'id' => 'name', 'name' => 'name', 'type_class' => 'stdClass', 'synchronized' => true, - 'passed_options' => array(), - 'resolved_options' => array( + 'passed_options' => [], + 'resolved_options' => [ 'a' => 'bar', 'b' => 'foo', 'c' => 'baz', - ), - ), $this->dataExtractor->extractConfiguration($form)); + ], + ], $this->dataExtractor->extractConfiguration($form)); } public function testExtractConfigurationBuildsIdRecursively() @@ -159,14 +159,14 @@ class FormDataExtractorTest extends TestCase $grandParent->add($parent); $parent->add($form); - $this->assertSame(array( + $this->assertSame([ 'id' => 'grandParent_parent_name', 'name' => 'name', 'type_class' => 'stdClass', 'synchronized' => true, - 'passed_options' => array(), - 'resolved_options' => array(), - ), $this->dataExtractor->extractConfiguration($form)); + 'passed_options' => [], + 'resolved_options' => [], + ], $this->dataExtractor->extractConfiguration($form)); } public function testExtractDefaultData() @@ -175,50 +175,50 @@ class FormDataExtractorTest extends TestCase $form->setData('Foobar'); - $this->assertSame(array( - 'default_data' => array( + $this->assertSame([ + 'default_data' => [ 'norm' => 'Foobar', - ), - 'submitted_data' => array(), - ), $this->dataExtractor->extractDefaultData($form)); + ], + 'submitted_data' => [], + ], $this->dataExtractor->extractDefaultData($form)); } public function testExtractDefaultDataStoresModelDataIfDifferent() { $form = $this->createBuilder('name') - ->addModelTransformer(new FixedDataTransformer(array( + ->addModelTransformer(new FixedDataTransformer([ 'Foo' => 'Bar', - ))) + ])) ->getForm(); $form->setData('Foo'); - $this->assertSame(array( - 'default_data' => array( + $this->assertSame([ + 'default_data' => [ 'norm' => 'Bar', 'model' => 'Foo', - ), - 'submitted_data' => array(), - ), $this->dataExtractor->extractDefaultData($form)); + ], + 'submitted_data' => [], + ], $this->dataExtractor->extractDefaultData($form)); } public function testExtractDefaultDataStoresViewDataIfDifferent() { $form = $this->createBuilder('name') - ->addViewTransformer(new FixedDataTransformer(array( + ->addViewTransformer(new FixedDataTransformer([ 'Foo' => 'Bar', - ))) + ])) ->getForm(); $form->setData('Foo'); - $this->assertSame(array( - 'default_data' => array( + $this->assertSame([ + 'default_data' => [ 'norm' => 'Foo', 'view' => 'Bar', - ), - 'submitted_data' => array(), - ), $this->dataExtractor->extractDefaultData($form)); + ], + 'submitted_data' => [], + ], $this->dataExtractor->extractDefaultData($form)); } public function testExtractSubmittedData() @@ -227,55 +227,55 @@ class FormDataExtractorTest extends TestCase $form->submit('Foobar'); - $this->assertSame(array( - 'submitted_data' => array( + $this->assertSame([ + 'submitted_data' => [ 'norm' => 'Foobar', - ), - 'errors' => array(), + ], + 'errors' => [], 'synchronized' => true, - ), $this->dataExtractor->extractSubmittedData($form)); + ], $this->dataExtractor->extractSubmittedData($form)); } public function testExtractSubmittedDataStoresModelDataIfDifferent() { $form = $this->createBuilder('name') - ->addModelTransformer(new FixedDataTransformer(array( + ->addModelTransformer(new FixedDataTransformer([ 'Foo' => 'Bar', '' => '', - ))) + ])) ->getForm(); $form->submit('Bar'); - $this->assertSame(array( - 'submitted_data' => array( + $this->assertSame([ + 'submitted_data' => [ 'norm' => 'Bar', 'model' => 'Foo', - ), - 'errors' => array(), + ], + 'errors' => [], 'synchronized' => true, - ), $this->dataExtractor->extractSubmittedData($form)); + ], $this->dataExtractor->extractSubmittedData($form)); } public function testExtractSubmittedDataStoresViewDataIfDifferent() { $form = $this->createBuilder('name') - ->addViewTransformer(new FixedDataTransformer(array( + ->addViewTransformer(new FixedDataTransformer([ 'Foo' => 'Bar', '' => '', - ))) + ])) ->getForm(); $form->submit('Bar'); - $this->assertSame(array( - 'submitted_data' => array( + $this->assertSame([ + 'submitted_data' => [ 'norm' => 'Foo', 'view' => 'Bar', - ), - 'errors' => array(), + ], + 'errors' => [], 'synchronized' => true, - ), $this->dataExtractor->extractSubmittedData($form)); + ], $this->dataExtractor->extractSubmittedData($form)); } public function testExtractSubmittedDataStoresErrors() @@ -285,15 +285,15 @@ class FormDataExtractorTest extends TestCase $form->submit('Foobar'); $form->addError(new FormError('Invalid!')); - $this->assertSame(array( - 'submitted_data' => array( + $this->assertSame([ + 'submitted_data' => [ 'norm' => 'Foobar', - ), - 'errors' => array( - array('message' => 'Invalid!', 'origin' => spl_object_hash($form), 'trace' => array()), - ), + ], + 'errors' => [ + ['message' => 'Invalid!', 'origin' => spl_object_hash($form), 'trace' => []], + ], 'synchronized' => true, - ), $this->dataExtractor->extractSubmittedData($form)); + ], $this->dataExtractor->extractSubmittedData($form)); } public function testExtractSubmittedDataStoresErrorOrigin() @@ -306,15 +306,15 @@ class FormDataExtractorTest extends TestCase $form->submit('Foobar'); $form->addError($error); - $this->assertSame(array( - 'submitted_data' => array( + $this->assertSame([ + 'submitted_data' => [ 'norm' => 'Foobar', - ), - 'errors' => array( - array('message' => 'Invalid!', 'origin' => spl_object_hash($form), 'trace' => array()), - ), + ], + 'errors' => [ + ['message' => 'Invalid!', 'origin' => spl_object_hash($form), 'trace' => []], + ], 'synchronized' => true, - ), $this->dataExtractor->extractSubmittedData($form)); + ], $this->dataExtractor->extractSubmittedData($form)); } public function testExtractSubmittedDataStoresErrorCause() @@ -322,10 +322,10 @@ class FormDataExtractorTest extends TestCase $form = $this->createBuilder('name')->getForm(); $exception = new \Exception(); - $violation = new ConstraintViolation('Foo', 'Foo', array(), 'Root', 'property.path', 'Invalid!', null, null, null, $exception); + $violation = new ConstraintViolation('Foo', 'Foo', [], 'Root', 'property.path', 'Invalid!', null, null, null, $exception); $form->submit('Foobar'); - $form->addError(new FormError('Invalid!', null, array(), null, $violation)); + $form->addError(new FormError('Invalid!', null, [], null, $violation)); $origin = spl_object_hash($form); $this->assertDumpMatchesFormat(<<submit('Foobar'); - $this->assertSame(array( - 'submitted_data' => array( + $this->assertSame([ + 'submitted_data' => [ 'norm' => 'Foobar', 'model' => null, - ), - 'errors' => array(), + ], + 'errors' => [], 'synchronized' => false, - ), $this->dataExtractor->extractSubmittedData($form)); + ], $this->dataExtractor->extractSubmittedData($form)); } public function testExtractViewVariables() { $view = new FormView(); - $view->vars = array( + $view->vars = [ 'b' => 'foo', 'a' => 'bar', 'c' => 'baz', 'id' => 'foo_bar', 'name' => 'bar', - ); + ]; - $this->assertSame(array( + $this->assertSame([ 'id' => 'foo_bar', 'name' => 'bar', - 'view_vars' => array( + 'view_vars' => [ 'a' => 'bar', 'b' => 'foo', 'c' => 'baz', 'id' => 'foo_bar', 'name' => 'bar', - ), - ), $this->dataExtractor->extractViewVariables($view)); + ], + ], $this->dataExtractor->extractViewVariables($view)); } /** @@ -416,7 +416,7 @@ EODUMP * * @return FormBuilder */ - private function createBuilder($name, array $options = array()) + private function createBuilder($name, array $options = []) { return new FormBuilder($name, null, $this->dispatcher, $this->factory, $options); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/Type/DataCollectorTypeExtensionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/Type/DataCollectorTypeExtensionTest.php index de635f64..35f38fc5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/Type/DataCollectorTypeExtensionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/Type/DataCollectorTypeExtensionTest.php @@ -44,6 +44,6 @@ class DataCollectorTypeExtensionTest extends TestCase ->method('addEventSubscriber') ->with($this->isInstanceOf('Symfony\Component\Form\Extension\DataCollector\EventListener\DataCollectorListener')); - $this->extension->buildForm($builder, array()); + $this->extension->buildForm($builder, []); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DependencyInjection/DependencyInjectionExtensionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DependencyInjection/DependencyInjectionExtensionTest.php index 66a7bf07..375fbfc7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DependencyInjection/DependencyInjectionExtensionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DependencyInjection/DependencyInjectionExtensionTest.php @@ -12,7 +12,8 @@ namespace Symfony\Component\Form\Tests\Extension\DependencyInjection; use PHPUnit\Framework\TestCase; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Form\AbstractTypeExtension; use Symfony\Component\Form\Extension\DependencyInjection\DependencyInjectionExtension; use Symfony\Component\Form\FormTypeGuesserChain; use Symfony\Component\Form\FormTypeGuesserInterface; @@ -21,25 +22,22 @@ class DependencyInjectionExtensionTest extends TestCase { public function testGetTypeExtensions() { - $container = $this->createContainerMock(); - $container->expects($this->never())->method('get'); + $typeExtension1 = new DummyExtension('test'); + $typeExtension2 = new DummyExtension('test'); + $typeExtension3 = new DummyExtension('other'); - $typeExtension1 = $this->createFormTypeExtensionMock('test'); - $typeExtension2 = $this->createFormTypeExtensionMock('test'); - $typeExtension3 = $this->createFormTypeExtensionMock('other'); + $extensions = [ + 'test' => new \ArrayIterator([$typeExtension1, $typeExtension2]), + 'other' => new \ArrayIterator([$typeExtension3]), + ]; - $extensions = array( - 'test' => new \ArrayIterator(array($typeExtension1, $typeExtension2)), - 'other' => new \ArrayIterator(array($typeExtension3)), - ); - - $extension = new DependencyInjectionExtension($container, $extensions, array()); + $extension = new DependencyInjectionExtension(new ContainerBuilder(), $extensions, []); $this->assertTrue($extension->hasTypeExtensions('test')); $this->assertTrue($extension->hasTypeExtensions('other')); $this->assertFalse($extension->hasTypeExtensions('unknown')); - $this->assertSame(array($typeExtension1, $typeExtension2), $extension->getTypeExtensions('test')); - $this->assertSame(array($typeExtension3), $extension->getTypeExtensions('other')); + $this->assertSame([$typeExtension1, $typeExtension2], $extension->getTypeExtensions('test')); + $this->assertSame([$typeExtension3], $extension->getTypeExtensions('other')); } /** @@ -47,14 +45,11 @@ class DependencyInjectionExtensionTest extends TestCase */ public function testThrowExceptionForInvalidExtendedType() { - $container = $this->getMockBuilder('Psr\Container\ContainerInterface')->getMock(); - $container->expects($this->never())->method('get'); + $extensions = [ + 'test' => new \ArrayIterator([new DummyExtension('unmatched')]), + ]; - $extensions = array( - 'test' => new \ArrayIterator(array($this->createFormTypeExtensionMock('unmatched'))), - ); - - $extension = new DependencyInjectionExtension($container, $extensions, array()); + $extension = new DependencyInjectionExtension(new ContainerBuilder(), $extensions, []); $extension->getTypeExtensions('test'); } @@ -65,29 +60,21 @@ class DependencyInjectionExtensionTest extends TestCase */ public function testLegacyGetTypeExtensions() { - $container = $this->createContainerMock(); + $container = new ContainerBuilder(); - $services = array( - 'extension1' => $typeExtension1 = $this->createFormTypeExtensionMock('test'), - 'extension2' => $typeExtension2 = $this->createFormTypeExtensionMock('test'), - 'extension3' => $typeExtension3 = $this->createFormTypeExtensionMock('other'), - ); + $typeExtension1 = new DummyExtension('test'); + $typeExtension2 = new DummyExtension('test'); + $typeExtension3 = new DummyExtension('other'); - $container->expects($this->any()) - ->method('get') - ->willReturnCallback(function ($id) use ($services) { - if (isset($services[$id])) { - return $services[$id]; - } + $container->set('extension1', $typeExtension1); + $container->set('extension2', $typeExtension2); + $container->set('extension3', $typeExtension3); - throw new ServiceNotFoundException($id); - }); - - $extension = new DependencyInjectionExtension($container, array(), array('test' => array('extension1', 'extension2'), 'other' => array('extension3')), array()); + $extension = new DependencyInjectionExtension($container, [], ['test' => ['extension1', 'extension2'], 'other' => ['extension3']], []); $this->assertTrue($extension->hasTypeExtensions('test')); $this->assertFalse($extension->hasTypeExtensions('unknown')); - $this->assertSame(array($typeExtension1, $typeExtension2), $extension->getTypeExtensions('test')); + $this->assertSame([$typeExtension1, $typeExtension2], $extension->getTypeExtensions('test')); } /** @@ -97,16 +84,12 @@ class DependencyInjectionExtensionTest extends TestCase */ public function testLegacyThrowExceptionForInvalidExtendedType() { - $formTypeExtension = $this->createFormTypeExtensionMock('unmatched'); + $formTypeExtension = new DummyExtension('unmatched'); - $container = $this->createContainerMock(); + $container = new ContainerBuilder(); + $container->set('extension', $formTypeExtension); - $container->expects($this->any()) - ->method('get') - ->with('extension') - ->willReturn($formTypeExtension); - - $extension = new DependencyInjectionExtension($container, array(), array('test' => array('extension')), array()); + $extension = new DependencyInjectionExtension($container, [], ['test' => ['extension']], []); $extensions = $extension->getTypeExtensions('test'); @@ -116,16 +99,14 @@ class DependencyInjectionExtensionTest extends TestCase public function testGetTypeGuesser() { - $container = $this->createContainerMock(); - $extension = new DependencyInjectionExtension($container, array(), array($this->getMockBuilder(FormTypeGuesserInterface::class)->getMock())); + $extension = new DependencyInjectionExtension(new ContainerBuilder(), [], [$this->getMockBuilder(FormTypeGuesserInterface::class)->getMock()]); $this->assertInstanceOf(FormTypeGuesserChain::class, $extension->getTypeGuesser()); } public function testGetTypeGuesserReturnsNullWhenNoTypeGuessersHaveBeenConfigured() { - $container = $this->createContainerMock(); - $extension = new DependencyInjectionExtension($container, array(), array()); + $extension = new DependencyInjectionExtension(new ContainerBuilder(), [], []); $this->assertNull($extension->getTypeGuesser()); } @@ -135,13 +116,10 @@ class DependencyInjectionExtensionTest extends TestCase */ public function testLegacyGetTypeGuesser() { - $container = $this->createContainerMock(); - $container - ->expects($this->once()) - ->method('get') - ->with('foo') - ->willReturn($this->getMockBuilder(FormTypeGuesserInterface::class)->getMock()); - $extension = new DependencyInjectionExtension($container, array(), array(), array('foo')); + $container = new ContainerBuilder(); + $container->set('foo', new DummyTypeGuesser()); + + $extension = new DependencyInjectionExtension($container, [], [], ['foo']); $this->assertInstanceOf(FormTypeGuesserChain::class, $extension->getTypeGuesser()); } @@ -151,24 +129,42 @@ class DependencyInjectionExtensionTest extends TestCase */ public function testLegacyGetTypeGuesserReturnsNullWhenNoTypeGuessersHaveBeenConfigured() { - $container = $this->createContainerMock(); - $extension = new DependencyInjectionExtension($container, array(), array(), array()); + $extension = new DependencyInjectionExtension(new ContainerBuilder(), [], [], []); $this->assertNull($extension->getTypeGuesser()); } +} - private function createContainerMock() +class DummyExtension extends AbstractTypeExtension +{ + private $extendedType; + + public function __construct($extendedType) { - return $this->getMockBuilder('Psr\Container\ContainerInterface') - ->setMethods(array('get', 'has')) - ->getMock(); + $this->extendedType = $extendedType; } - private function createFormTypeExtensionMock($extendedType) + public function getExtendedType() + { + return $this->extendedType; + } +} + +class DummyTypeGuesser implements FormTypeGuesserInterface +{ + public function guessType($class, $property) + { + } + + public function guessRequired($class, $property) + { + } + + public function guessMaxLength($class, $property) + { + } + + public function guessPattern($class, $property) { - $extension = $this->getMockBuilder('Symfony\Component\Form\FormTypeExtensionInterface')->getMock(); - $extension->expects($this->any())->method('getExtendedType')->willReturn($extendedType); - - return $extension; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/HttpFoundation/HttpFoundationRequestHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/HttpFoundation/HttpFoundationRequestHandlerTest.php index e694e405..2b134511 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/HttpFoundation/HttpFoundationRequestHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/HttpFoundation/HttpFoundationRequestHandlerTest.php @@ -26,7 +26,7 @@ class HttpFoundationRequestHandlerTest extends AbstractRequestHandlerTest */ public function testRequestShouldNotBeNull() { - $this->requestHandler->handleRequest($this->getMockForm('name', 'GET')); + $this->requestHandler->handleRequest($this->createForm('name', 'GET')); } /** @@ -34,12 +34,12 @@ class HttpFoundationRequestHandlerTest extends AbstractRequestHandlerTest */ public function testRequestShouldBeInstanceOfRequest() { - $this->requestHandler->handleRequest($this->getMockForm('name', 'GET'), new \stdClass()); + $this->requestHandler->handleRequest($this->createForm('name', 'GET'), new \stdClass()); } - protected function setRequestData($method, $data, $files = array()) + protected function setRequestData($method, $data, $files = []) { - $this->request = Request::create('http://localhost', $method, $data, array(), $files); + $this->request = Request::create('http://localhost', $method, $data, [], $files); } protected function getRequestHandler() @@ -47,7 +47,7 @@ class HttpFoundationRequestHandlerTest extends AbstractRequestHandlerTest return new HttpFoundationRequestHandler($this->serverParams); } - protected function getMockFile($suffix = '') + protected function getUploadedFile($suffix = '') { return new UploadedFile(__DIR__.'/../../Fixtures/foo'.$suffix, 'foo'.$suffix); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorPerformanceTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorPerformanceTest.php index 9e957d55..64b49d7e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorPerformanceTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorPerformanceTest.php @@ -22,9 +22,9 @@ class FormValidatorPerformanceTest extends FormPerformanceTestCase { protected function getExtensions() { - return array( + return [ new ValidatorExtension(Validation::createValidator()), - ); + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php index 1d277f6f..7581f769 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php @@ -11,18 +11,26 @@ namespace Symfony\Component\Form\Tests\Extension\Validator\Constraints; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\Form\CallbackTransformer; use Symfony\Component\Form\Exception\TransformationFailedException; +use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper; use Symfony\Component\Form\Extension\Validator\Constraints\Form; use Symfony\Component\Form\Extension\Validator\Constraints\FormValidator; use Symfony\Component\Form\FormBuilder; +use Symfony\Component\Form\FormFactoryBuilder; +use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\SubmitButtonBuilder; +use Symfony\Component\Translation\IdentityTranslator; use Symfony\Component\Validator\Constraints\GroupSequence; use Symfony\Component\Validator\Constraints\NotBlank; use Symfony\Component\Validator\Constraints\NotNull; use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\Context\ExecutionContext; use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; +use Symfony\Component\Validator\Validation; /** * @author Bernhard Schussek @@ -30,45 +38,33 @@ use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; class FormValidatorTest extends ConstraintValidatorTestCase { /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var EventDispatcherInterface */ private $dispatcher; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var FormFactoryInterface */ private $factory; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $serverParams; - protected function setUp() { - $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); - $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); - $this->serverParams = $this->getMockBuilder('Symfony\Component\Form\Extension\Validator\Util\ServerParams')->setMethods(array('getNormalizedIniPostMaxSize', 'getContentLength'))->getMock(); + $this->dispatcher = new EventDispatcher(); + $this->factory = (new FormFactoryBuilder())->getFormFactory(); parent::setUp(); $this->constraint = new Form(); } - protected function createValidator() - { - return new FormValidator($this->serverParams); - } - public function testValidate() { - $object = $this->getMockBuilder('\stdClass')->getMock(); - $options = array('validation_groups' => array('group1', 'group2')); - $form = $this->getBuilder('name', '\stdClass', $options) - ->setData($object) - ->getForm(); + $object = new \stdClass(); + $options = ['validation_groups' => ['group1', 'group2']]; + $form = $this->getCompoundForm($object, $options); + $form->submit([]); - $this->expectValidateAt(0, 'data', $object, array('group1', 'group2')); + $this->expectValidateAt(0, 'data', $object, ['group1', 'group2']); $this->validator->validate($form, new Form()); @@ -77,20 +73,19 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testValidateConstraints() { - $object = $this->getMockBuilder('\stdClass')->getMock(); - $constraint1 = new NotNull(array('groups' => array('group1', 'group2'))); - $constraint2 = new NotBlank(array('groups' => 'group2')); + $object = new \stdClass(); + $constraint1 = new NotNull(['groups' => ['group1', 'group2']]); + $constraint2 = new NotBlank(['groups' => 'group2']); - $options = array( - 'validation_groups' => array('group1', 'group2'), - 'constraints' => array($constraint1, $constraint2), - ); - $form = $this->getBuilder('name', '\stdClass', $options) - ->setData($object) - ->getForm(); + $options = [ + 'validation_groups' => ['group1', 'group2'], + 'constraints' => [$constraint1, $constraint2], + ]; + $form = $this->getCompoundForm($object, $options); + $form->submit([]); // First default constraints - $this->expectValidateAt(0, 'data', $object, array('group1', 'group2')); + $this->expectValidateAt(0, 'data', $object, ['group1', 'group2']); // Then custom constraints $this->expectValidateValueAt(1, 'data', $object, $constraint1, 'group1'); @@ -103,22 +98,21 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testValidateChildIfValidConstraint() { - $object = $this->getMockBuilder('\stdClass')->getMock(); + $object = new \stdClass(); $parent = $this->getBuilder('parent') ->setCompound(true) - ->setDataMapper($this->getDataMapper()) + ->setDataMapper(new PropertyPathMapper()) ->getForm(); - $options = array( - 'validation_groups' => array('group1', 'group2'), - 'constraints' => array(new Valid()), - ); - $form = $this->getBuilder('name', '\stdClass', $options)->getForm(); + $options = [ + 'validation_groups' => ['group1', 'group2'], + 'constraints' => [new Valid()], + ]; + $form = $this->getCompoundForm($object, $options); $parent->add($form); + $parent->submit([]); - $form->setData($object); - - $this->expectValidateAt(0, 'data', $object, array('group1', 'group2')); + $this->expectValidateAt(0, 'data', $object, ['group1', 'group2']); $this->validator->validate($form, new Form()); @@ -127,13 +121,13 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testDontValidateIfParentWithoutValidConstraint() { - $object = $this->getMockBuilder('\stdClass')->getMock(); + $object = new \stdClass(); $parent = $this->getBuilder('parent', null) ->setCompound(true) - ->setDataMapper($this->getDataMapper()) + ->setDataMapper(new PropertyPathMapper()) ->getForm(); - $options = array('validation_groups' => array('group1', 'group2')); + $options = ['validation_groups' => ['group1', 'group2']]; $form = $this->getBuilder('name', '\stdClass', $options)->getForm(); $parent->add($form); @@ -149,10 +143,10 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testMissingConstraintIndex() { $object = new \stdClass(); - $form = new FormBuilder('name', '\stdClass', $this->dispatcher, $this->factory); - $form = $form->setData($object)->getForm(); + $form = $this->getCompoundForm($object); + $form->submit([]); - $this->expectValidateAt(0, 'data', $object, array('Default')); + $this->expectValidateAt(0, 'data', $object, ['Default']); $this->validator->validate($form, new Form()); @@ -161,22 +155,21 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testValidateConstraintsOptionEvenIfNoValidConstraint() { - $object = $this->getMockBuilder('\stdClass')->getMock(); - $constraint1 = new NotNull(array('groups' => array('group1', 'group2'))); - $constraint2 = new NotBlank(array('groups' => 'group2')); + $object = new \stdClass(); + $constraint1 = new NotNull(['groups' => ['group1', 'group2']]); + $constraint2 = new NotBlank(['groups' => 'group2']); $parent = $this->getBuilder('parent', null) ->setCompound(true) - ->setDataMapper($this->getDataMapper()) - ->getForm(); - $options = array( - 'validation_groups' => array('group1', 'group2'), - 'constraints' => array($constraint1, $constraint2), - ); - $form = $this->getBuilder('name', '\stdClass', $options) - ->setData($object) + ->setDataMapper(new PropertyPathMapper()) ->getForm(); + $options = [ + 'validation_groups' => ['group1', 'group2'], + 'constraints' => [$constraint1, $constraint2], + ]; + $form = $this->getCompoundForm($object, $options); $parent->add($form); + $parent->submit([]); $this->expectValidateValueAt(0, 'data', $object, $constraint1, 'group1'); $this->expectValidateValueAt(1, 'data', $object, $constraint2, 'group2'); @@ -188,11 +181,11 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testDontValidateIfNoValidationGroups() { - $object = $this->getMockBuilder('\stdClass')->getMock(); + $object = new \stdClass(); - $form = $this->getBuilder('name', '\stdClass', array( - 'validation_groups' => array(), - )) + $form = $this->getBuilder('name', '\stdClass', [ + 'validation_groups' => [], + ]) ->setData($object) ->getForm(); @@ -207,20 +200,18 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testDontValidateConstraintsIfNoValidationGroups() { - $object = $this->getMockBuilder('\stdClass')->getMock(); - $constraint1 = $this->getMockBuilder('Symfony\Component\Validator\Constraint')->getMock(); - $constraint2 = $this->getMockBuilder('Symfony\Component\Validator\Constraint')->getMock(); + $object = new \stdClass(); - $options = array( - 'validation_groups' => array(), - 'constraints' => array($constraint1, $constraint2), - ); + $options = [ + 'validation_groups' => [], + 'constraints' => [new NotBlank(), new NotNull()], + ]; $form = $this->getBuilder('name', '\stdClass', $options) ->setData($object) ->getForm(); // Launch transformer - $form->submit(array()); + $form->submit('foo'); $this->expectNoValidate(); @@ -231,15 +222,15 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testDontValidateIfNotSynchronized() { - $object = $this->getMockBuilder('\stdClass')->getMock(); + $object = new \stdClass(); - $form = $this->getBuilder('name', '\stdClass', array( + $form = $this->getBuilder('name', '\stdClass', [ 'invalid_message' => 'invalid_message_key', // Invalid message parameters must be supported, because the // invalid message can be a translation key // see https://github.com/symfony/symfony/issues/5144 - 'invalid_message_parameters' => array('{{ foo }}' => 'bar'), - )) + 'invalid_message_parameters' => ['{{ foo }}' => 'bar'], + ]) ->setData($object) ->addViewTransformer(new CallbackTransformer( function ($data) { return $data; }, @@ -265,16 +256,16 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testAddInvalidErrorEvenIfNoValidationGroups() { - $object = $this->getMockBuilder('\stdClass')->getMock(); + $object = new \stdClass(); - $form = $this->getBuilder('name', '\stdClass', array( + $form = $this->getBuilder('name', '\stdClass', [ 'invalid_message' => 'invalid_message_key', // Invalid message parameters must be supported, because the // invalid message can be a translation key // see https://github.com/symfony/symfony/issues/5144 - 'invalid_message_parameters' => array('{{ foo }}' => 'bar'), - 'validation_groups' => array(), - )) + 'invalid_message_parameters' => ['{{ foo }}' => 'bar'], + 'validation_groups' => [], + ]) ->setData($object) ->addViewTransformer(new CallbackTransformer( function ($data) { return $data; }, @@ -300,15 +291,13 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testDontValidateConstraintsIfNotSynchronized() { - $object = $this->getMockBuilder('\stdClass')->getMock(); - $constraint1 = $this->getMockBuilder('Symfony\Component\Validator\Constraint')->getMock(); - $constraint2 = $this->getMockBuilder('Symfony\Component\Validator\Constraint')->getMock(); + $object = new \stdClass(); - $options = array( + $options = [ 'invalid_message' => 'invalid_message_key', - 'validation_groups' => array('group1', 'group2'), - 'constraints' => array($constraint1, $constraint2), - ); + 'validation_groups' => ['group1', 'group2'], + 'constraints' => [new NotBlank(), new NotBlank()], + ]; $form = $this->getBuilder('name', '\stdClass', $options) ->setData($object) ->addViewTransformer(new CallbackTransformer( @@ -335,7 +324,8 @@ class FormValidatorTest extends ConstraintValidatorTestCase // https://github.com/symfony/symfony/issues/4359 public function testDontMarkInvalidIfAnyChildIsNotSynchronized() { - $object = $this->getMockBuilder('\stdClass')->getMock(); + $object = new \stdClass(); + $object->child = 'bar'; $failingTransformer = new CallbackTransformer( function ($data) { return $data; }, @@ -346,7 +336,7 @@ class FormValidatorTest extends ConstraintValidatorTestCase ->setData($object) ->addViewTransformer($failingTransformer) ->setCompound(true) - ->setDataMapper($this->getDataMapper()) + ->setDataMapper(new PropertyPathMapper()) ->add( $this->getBuilder('child') ->addViewTransformer($failingTransformer) @@ -354,7 +344,7 @@ class FormValidatorTest extends ConstraintValidatorTestCase ->getForm(); // Launch transformer - $form->submit(array('child' => 'foo')); + $form->submit(['child' => 'foo']); $this->expectNoValidate(); @@ -365,14 +355,13 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testHandleGroupSequenceValidationGroups() { - $object = $this->getMockBuilder('\stdClass')->getMock(); - $options = array('validation_groups' => new GroupSequence(array('group1', 'group2'))); - $form = $this->getBuilder('name', '\stdClass', $options) - ->setData($object) - ->getForm(); + $object = new \stdClass(); + $options = ['validation_groups' => new GroupSequence(['group1', 'group2'])]; + $form = $this->getCompoundForm($object, $options); + $form->submit([]); - $this->expectValidateAt(0, 'data', $object, new GroupSequence(array('group1', 'group2'))); - $this->expectValidateAt(1, 'data', $object, new GroupSequence(array('group1', 'group2'))); + $this->expectValidateAt(0, 'data', $object, new GroupSequence(['group1', 'group2'])); + $this->expectValidateAt(1, 'data', $object, new GroupSequence(['group1', 'group2'])); $this->validator->validate($form, new Form()); @@ -381,13 +370,12 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testHandleCallbackValidationGroups() { - $object = $this->getMockBuilder('\stdClass')->getMock(); - $options = array('validation_groups' => array($this, 'getValidationGroups')); - $form = $this->getBuilder('name', '\stdClass', $options) - ->setData($object) - ->getForm(); + $object = new \stdClass(); + $options = ['validation_groups' => [$this, 'getValidationGroups']]; + $form = $this->getCompoundForm($object, $options); + $form->submit([]); - $this->expectValidateAt(0, 'data', $object, array('group1', 'group2')); + $this->expectValidateAt(0, 'data', $object, ['group1', 'group2']); $this->validator->validate($form, new Form()); @@ -396,13 +384,12 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testDontExecuteFunctionNames() { - $object = $this->getMockBuilder('\stdClass')->getMock(); - $options = array('validation_groups' => 'header'); - $form = $this->getBuilder('name', '\stdClass', $options) - ->setData($object) - ->getForm(); + $object = new \stdClass(); + $options = ['validation_groups' => 'header']; + $form = $this->getCompoundForm($object, $options); + $form->submit([]); - $this->expectValidateAt(0, 'data', $object, array('header')); + $this->expectValidateAt(0, 'data', $object, ['header']); $this->validator->validate($form, new Form()); @@ -411,15 +398,14 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testHandleClosureValidationGroups() { - $object = $this->getMockBuilder('\stdClass')->getMock(); - $options = array('validation_groups' => function (FormInterface $form) { - return array('group1', 'group2'); - }); - $form = $this->getBuilder('name', '\stdClass', $options) - ->setData($object) - ->getForm(); + $object = new \stdClass(); + $options = ['validation_groups' => function (FormInterface $form) { + return ['group1', 'group2']; + }]; + $form = $this->getCompoundForm($object, $options); + $form->submit([]); - $this->expectValidateAt(0, 'data', $object, array('group1', 'group2')); + $this->expectValidateAt(0, 'data', $object, ['group1', 'group2']); $this->validator->validate($form, new Form()); @@ -428,25 +414,25 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testUseValidationGroupOfClickedButton() { - $object = $this->getMockBuilder('\stdClass')->getMock(); + $object = new \stdClass(); $parent = $this->getBuilder('parent') ->setCompound(true) - ->setDataMapper($this->getDataMapper()) + ->setDataMapper(new PropertyPathMapper()) ->getForm(); - $form = $this->getForm('name', '\stdClass', array( + $form = $this->getForm('name', '\stdClass', [ 'validation_groups' => 'form_group', - 'constraints' => array(new Valid()), - )); + 'constraints' => [new Valid()], + ]); $parent->add($form); - $parent->add($this->getSubmitButton('submit', array( + $parent->add($this->getSubmitButton('submit', [ 'validation_groups' => 'button_group', - ))); + ])); - $parent->submit(array('name' => $object, 'submit' => '')); + $parent->submit(['name' => $object, 'submit' => '']); - $this->expectValidateAt(0, 'data', $object, array('button_group')); + $this->expectValidateAt(0, 'data', $object, ['button_group']); $this->validator->validate($form, new Form()); @@ -455,25 +441,25 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testDontUseValidationGroupOfUnclickedButton() { - $object = $this->getMockBuilder('\stdClass')->getMock(); + $object = new \stdClass(); $parent = $this->getBuilder('parent') ->setCompound(true) - ->setDataMapper($this->getDataMapper()) + ->setDataMapper(new PropertyPathMapper()) ->getForm(); - $form = $this->getForm('name', '\stdClass', array( + $form = $this->getCompoundForm($object, [ 'validation_groups' => 'form_group', - 'constraints' => array(new Valid()), - )); + 'constraints' => [new Valid()], + ]); $parent->add($form); - $parent->add($this->getSubmitButton('submit', array( + $parent->add($this->getSubmitButton('submit', [ 'validation_groups' => 'button_group', - ))); + ])); - $form->setData($object); + $parent->submit([]); - $this->expectValidateAt(0, 'data', $object, array('form_group')); + $this->expectValidateAt(0, 'data', $object, ['form_group']); $this->validator->validate($form, new Form()); @@ -482,20 +468,19 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testUseInheritedValidationGroup() { - $object = $this->getMockBuilder('\stdClass')->getMock(); + $object = new \stdClass(); - $parentOptions = array('validation_groups' => 'group'); + $parentOptions = ['validation_groups' => 'group']; $parent = $this->getBuilder('parent', null, $parentOptions) ->setCompound(true) - ->setDataMapper($this->getDataMapper()) + ->setDataMapper(new PropertyPathMapper()) ->getForm(); - $formOptions = array('constraints' => array(new Valid())); - $form = $this->getBuilder('name', '\stdClass', $formOptions)->getForm(); + $formOptions = ['constraints' => [new Valid()]]; + $form = $this->getCompoundForm($object, $formOptions); $parent->add($form); + $parent->submit([]); - $form->setData($object); - - $this->expectValidateAt(0, 'data', $object, array('group')); + $this->expectValidateAt(0, 'data', $object, ['group']); $this->validator->validate($form, new Form()); @@ -504,20 +489,19 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testUseInheritedCallbackValidationGroup() { - $object = $this->getMockBuilder('\stdClass')->getMock(); + $object = new \stdClass(); - $parentOptions = array('validation_groups' => array($this, 'getValidationGroups')); + $parentOptions = ['validation_groups' => [$this, 'getValidationGroups']]; $parent = $this->getBuilder('parent', null, $parentOptions) ->setCompound(true) - ->setDataMapper($this->getDataMapper()) + ->setDataMapper(new PropertyPathMapper()) ->getForm(); - $formOptions = array('constraints' => array(new Valid())); - $form = $this->getBuilder('name', '\stdClass', $formOptions)->getForm(); + $formOptions = ['constraints' => [new Valid()]]; + $form = $this->getCompoundForm($object, $formOptions); $parent->add($form); + $parent->submit([]); - $form->setData($object); - - $this->expectValidateAt(0, 'data', $object, array('group1', 'group2')); + $this->expectValidateAt(0, 'data', $object, ['group1', 'group2']); $this->validator->validate($form, new Form()); @@ -526,24 +510,23 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testUseInheritedClosureValidationGroup() { - $object = $this->getMockBuilder('\stdClass')->getMock(); + $object = new \stdClass(); - $parentOptions = array( - 'validation_groups' => function (FormInterface $form) { - return array('group1', 'group2'); + $parentOptions = [ + 'validation_groups' => function () { + return ['group1', 'group2']; }, - ); + ]; $parent = $this->getBuilder('parent', null, $parentOptions) ->setCompound(true) - ->setDataMapper($this->getDataMapper()) + ->setDataMapper(new PropertyPathMapper()) ->getForm(); - $formOptions = array('constraints' => array(new Valid())); - $form = $this->getBuilder('name', '\stdClass', $formOptions)->getForm(); + $formOptions = ['constraints' => [new Valid()]]; + $form = $this->getCompoundForm($object, $formOptions); $parent->add($form); + $parent->submit([]); - $form->setData($object); - - $this->expectValidateAt(0, 'data', $object, array('group1', 'group2')); + $this->expectValidateAt(0, 'data', $object, ['group1', 'group2']); $this->validator->validate($form, new Form()); @@ -552,12 +535,11 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testAppendPropertyPath() { - $object = $this->getMockBuilder('\stdClass')->getMock(); - $form = $this->getBuilder('name', '\stdClass') - ->setData($object) - ->getForm(); + $object = new \stdClass(); + $form = $this->getCompoundForm($object); + $form->submit([]); - $this->expectValidateAt(0, 'data', $object, array('Default')); + $this->expectValidateAt(0, 'data', $object, ['Default']); $this->validator->validate($form, new Form()); @@ -579,13 +561,13 @@ class FormValidatorTest extends ConstraintValidatorTestCase public function testViolationIfExtraData() { - $form = $this->getBuilder('parent', null, array('extra_fields_message' => 'Extra!')) + $form = $this->getBuilder('parent', null, ['extra_fields_message' => 'Extra!']) ->setCompound(true) - ->setDataMapper($this->getDataMapper()) + ->setDataMapper(new PropertyPathMapper()) ->add($this->getBuilder('child')) ->getForm(); - $form->submit(array('foo' => 'bar')); + $form->submit(['foo' => 'bar']); $this->expectNoValidate(); @@ -593,20 +575,20 @@ class FormValidatorTest extends ConstraintValidatorTestCase $this->buildViolation('Extra!') ->setParameter('{{ extra_fields }}', '"foo"') - ->setInvalidValue(array('foo' => 'bar')) + ->setInvalidValue(['foo' => 'bar']) ->setCode(Form::NO_SUCH_FIELD_ERROR) ->assertRaised(); } public function testViolationFormatIfMultipleExtraFields() { - $form = $this->getBuilder('parent', null, array('extra_fields_message' => 'Extra!')) + $form = $this->getBuilder('parent', null, ['extra_fields_message' => 'Extra!']) ->setCompound(true) - ->setDataMapper($this->getDataMapper()) + ->setDataMapper(new PropertyPathMapper()) ->add($this->getBuilder('child')) ->getForm(); - $form->submit(array('foo' => 'bar', 'baz' => 'qux', 'quux' => 'quuz')); + $form->submit(['foo' => 'bar', 'baz' => 'qux', 'quux' => 'quuz']); $this->expectNoValidate(); @@ -614,29 +596,28 @@ class FormValidatorTest extends ConstraintValidatorTestCase $this->buildViolation('Extra!') ->setParameter('{{ extra_fields }}', '"foo", "baz", "quux"') - ->setInvalidValue(array('foo' => 'bar', 'baz' => 'qux', 'quux' => 'quuz')) + ->setInvalidValue(['foo' => 'bar', 'baz' => 'qux', 'quux' => 'quuz']) ->setCode(Form::NO_SUCH_FIELD_ERROR) ->assertRaised(); } public function testNoViolationIfAllowExtraData() { - $context = $this->getMockExecutionContext(); - $form = $this - ->getBuilder('parent', null, array('allow_extra_fields' => true)) + ->getBuilder('parent', null, ['allow_extra_fields' => true]) ->setCompound(true) - ->setDataMapper($this->getDataMapper()) + ->setDataMapper(new PropertyPathMapper()) ->add($this->getBuilder('child')) ->getForm(); - $form->submit(array('foo' => 'bar')); + $context = new ExecutionContext(Validation::createValidator(), $form, new IdentityTranslator()); - $context->expects($this->never()) - ->method('addViolation'); + $form->submit(['foo' => 'bar']); $this->validator->initialize($context); $this->validator->validate($form, new Form()); + + $this->assertCount(0, $context->getViolations()); } /** @@ -646,25 +627,33 @@ class FormValidatorTest extends ConstraintValidatorTestCase */ public function getValidationGroups(FormInterface $form) { - return array('group1', 'group2'); + return ['group1', 'group2']; } - private function getMockExecutionContext() + public function testCauseForNotAllowedExtraFieldsIsTheFormConstraint() { - $context = $this->getMockBuilder('Symfony\Component\Validator\Context\ExecutionContextInterface')->getMock(); - $validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ValidatorInterface')->getMock(); - $contextualValidator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ContextualValidatorInterface')->getMock(); + $form = $this + ->getBuilder('form', null, ['constraints' => [new NotBlank(['groups' => ['foo']])]]) + ->setCompound(true) + ->setDataMapper(new PropertyPathMapper()) + ->getForm(); + $form->submit([ + 'extra_data' => 'foo', + ]); - $validator->expects($this->any()) - ->method('inContext') - ->with($context) - ->will($this->returnValue($contextualValidator)); + $context = new ExecutionContext(Validation::createValidator(), $form, new IdentityTranslator()); + $constraint = new Form(); - $context->expects($this->any()) - ->method('getValidator') - ->will($this->returnValue($validator)); + $this->validator->initialize($context); + $this->validator->validate($form, $constraint); - return $context; + $this->assertCount(1, $context->getViolations()); + $this->assertSame($constraint, $context->getViolations()->get(0)->getConstraint()); + } + + protected function createValidator() + { + return new FormValidator(); } /** @@ -674,33 +663,34 @@ class FormValidatorTest extends ConstraintValidatorTestCase * * @return FormBuilder */ - private function getBuilder($name = 'name', $dataClass = null, array $options = array()) + private function getBuilder($name = 'name', $dataClass = null, array $options = []) { - $options = array_replace(array( - 'constraints' => array(), - 'invalid_message_parameters' => array(), - ), $options); + $options = array_replace([ + 'constraints' => [], + 'invalid_message_parameters' => [], + ], $options); return new FormBuilder($name, $dataClass, $this->dispatcher, $this->factory, $options); } - private function getForm($name = 'name', $dataClass = null, array $options = array()) + private function getForm($name = 'name', $dataClass = null, array $options = []) { return $this->getBuilder($name, $dataClass, $options)->getForm(); } - private function getSubmitButton($name = 'name', array $options = array()) + private function getCompoundForm($data, array $options = []) + { + return $this->getBuilder('name', \get_class($data), $options) + ->setData($data) + ->setCompound(true) + ->setDataMapper(new PropertyPathMapper()) + ->getForm(); + } + + private function getSubmitButton($name = 'name', array $options = []) { $builder = new SubmitButtonBuilder($name, $options); return $builder->getForm(); } - - /** - * @return \PHPUnit_Framework_MockObject_MockObject - */ - private function getDataMapper() - { - return $this->getMockBuilder('Symfony\Component\Form\DataMapperInterface')->getMock(); - } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php index ae161819..76bc07b2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php @@ -12,36 +12,41 @@ namespace Symfony\Component\Form\Tests\Extension\Validator\EventListener; use PHPUnit\Framework\TestCase; -use Symfony\Component\Form\Extension\Validator\Constraints\Form; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper; +use Symfony\Component\Form\Extension\Validator\Constraints\Form as FormConstraint; use Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener; +use Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationMapper; +use Symfony\Component\Form\Form; use Symfony\Component\Form\FormBuilder; +use Symfony\Component\Form\FormConfigBuilder; use Symfony\Component\Form\FormEvent; -use Symfony\Component\PropertyAccess\PropertyPath; +use Symfony\Component\Form\FormFactoryBuilder; +use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\Validator\ConstraintViolation; -use Symfony\Component\Validator\ConstraintViolationList; +use Symfony\Component\Validator\ConstraintViolationInterface; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Validation; +use Symfony\Component\Validator\Validator\ValidatorInterface; class ValidationListenerTest extends TestCase { /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var EventDispatcherInterface */ private $dispatcher; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var FormFactoryInterface */ private $factory; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var ValidatorInterface */ private $validator; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - private $violationMapper; - /** * @var ValidationListener */ @@ -55,116 +60,128 @@ class ValidationListenerTest extends TestCase protected function setUp() { - $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); - $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); - $this->validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ValidatorInterface')->getMock(); - $this->violationMapper = $this->getMockBuilder('Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationMapperInterface')->getMock(); - $this->listener = new ValidationListener($this->validator, $this->violationMapper); + $this->dispatcher = new EventDispatcher(); + $this->factory = (new FormFactoryBuilder())->getFormFactory(); + $this->validator = Validation::createValidator(); + $this->listener = new ValidationListener($this->validator, new ViolationMapper()); $this->message = 'Message'; $this->messageTemplate = 'Message template'; - $this->params = array('foo' => 'bar'); + $this->params = ['foo' => 'bar']; } - private function getConstraintViolation($code = null) + private function createForm($name = '', $compound = false) { - return new ConstraintViolation($this->message, $this->messageTemplate, $this->params, null, 'prop.path', null, null, $code, new Form()); - } + $config = new FormBuilder($name, null, new EventDispatcher(), (new FormFactoryBuilder())->getFormFactory()); + $config->setCompound($compound); - private function getBuilder($name = 'name', $propertyPath = null, $dataClass = null) - { - $builder = new FormBuilder($name, $dataClass, $this->dispatcher, $this->factory); - $builder->setPropertyPath(new PropertyPath($propertyPath ?: $name)); - $builder->setAttribute('error_mapping', array()); - $builder->setErrorBubbling(false); - $builder->setMapped(true); + if ($compound) { + $config->setDataMapper(new PropertyPathMapper()); + } - return $builder; - } - - private function getForm($name = 'name', $propertyPath = null, $dataClass = null) - { - return $this->getBuilder($name, $propertyPath, $dataClass)->getForm(); - } - - private function getMockForm() - { - return $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + return new Form($config); } // More specific mapping tests can be found in ViolationMapperTest public function testMapViolation() { - $violation = $this->getConstraintViolation(); - $form = $this->getForm('street'); + $violation = new ConstraintViolation($this->message, $this->messageTemplate, $this->params, null, 'data', null, null, null, new FormConstraint()); + $form = new Form(new FormConfigBuilder('street', null, new EventDispatcher())); + $form->submit(null); - $this->validator->expects($this->once()) - ->method('validate') - ->will($this->returnValue(array($violation))); + $validator = new DummyValidator($violation); + $listener = new ValidationListener($validator, new ViolationMapper()); + $listener->validateForm(new FormEvent($form, null)); - $this->violationMapper->expects($this->once()) - ->method('mapViolation') - ->with($violation, $form, false); - - $this->listener->validateForm(new FormEvent($form, null)); + $this->assertCount(1, $form->getErrors()); + $this->assertSame($violation, $form->getErrors()[0]->getCause()); } public function testMapViolationAllowsNonSyncIfInvalid() { - $violation = $this->getConstraintViolation(Form::NOT_SYNCHRONIZED_ERROR); - $form = $this->getForm('street'); + $violation = new ConstraintViolation($this->message, $this->messageTemplate, $this->params, null, 'data', null, null, FormConstraint::NOT_SYNCHRONIZED_ERROR, new FormConstraint()); + $form = new SubmittedNotSynchronizedForm(new FormConfigBuilder('street', null, new EventDispatcher())); - $this->validator->expects($this->once()) - ->method('validate') - ->will($this->returnValue(array($violation))); + $validator = new DummyValidator($violation); + $listener = new ValidationListener($validator, new ViolationMapper()); + $listener->validateForm(new FormEvent($form, null)); - $this->violationMapper->expects($this->once()) - ->method('mapViolation') - // pass true now - ->with($violation, $form, true); - - $this->listener->validateForm(new FormEvent($form, null)); + $this->assertCount(1, $form->getErrors()); + $this->assertSame($violation, $form->getErrors()[0]->getCause()); } public function testValidateIgnoresNonRoot() { - $form = $this->getMockForm(); - $form->expects($this->once()) - ->method('isRoot') - ->will($this->returnValue(false)); + $childForm = $this->createForm('child'); - $this->validator->expects($this->never()) - ->method('validate'); + $form = $this->createForm('', true); + $form->add($childForm); - $this->violationMapper->expects($this->never()) - ->method('mapViolation'); + $form->submit(['child' => null]); - $this->listener->validateForm(new FormEvent($form, null)); + $this->listener->validateForm(new FormEvent($childForm, null)); + + $this->assertTrue($childForm->isValid()); } public function testValidateWithEmptyViolationList() { - $form = $this->getMockForm(); - $form->expects($this->once()) - ->method('isRoot') - ->will($this->returnValue(true)); - - $this->validator - ->expects($this->once()) - ->method('validate') - ->will($this->returnValue(new ConstraintViolationList())); - - $this->violationMapper - ->expects($this->never()) - ->method('mapViolation'); + $form = $this->createForm(); + $form->submit(null); $this->listener->validateForm(new FormEvent($form, null)); - } - public function testValidatorInterface() - { - $validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ValidatorInterface')->getMock(); - - $listener = new ValidationListener($validator, $this->violationMapper); - $this->assertAttributeSame($validator, 'validator', $listener); + $this->assertTrue($form->isValid()); + } +} + +class SubmittedNotSynchronizedForm extends Form +{ + public function isSubmitted() + { + return true; + } + + public function isSynchronized() + { + return false; + } +} + +class DummyValidator implements ValidatorInterface +{ + private $violation; + + public function __construct(ConstraintViolationInterface $violation) + { + $this->violation = $violation; + } + + public function getMetadataFor($value) + { + } + + public function hasMetadataFor($value) + { + } + + public function validate($value, $constraints = null, $groups = null) + { + return [$this->violation]; + } + + public function validateProperty($object, $propertyName, $groups = null) + { + } + + public function validatePropertyValue($objectOrClass, $propertyName, $value, $groups = null) + { + } + + public function startContext() + { + } + + public function inContext(ExecutionContextInterface $context) + { } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php index e83aaaa3..b90098b4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php @@ -29,57 +29,57 @@ abstract class BaseValidatorExtensionTest extends TypeTestCase public function testValidationGroupsTransformedToArray() { - $form = $this->createForm(array( + $form = $this->createForm([ 'validation_groups' => 'group', - )); + ]); - $this->assertEquals(array('group'), $form->getConfig()->getOption('validation_groups')); + $this->assertEquals(['group'], $form->getConfig()->getOption('validation_groups')); } public function testValidationGroupsCanBeSetToArray() { - $form = $this->createForm(array( - 'validation_groups' => array('group1', 'group2'), - )); + $form = $this->createForm([ + 'validation_groups' => ['group1', 'group2'], + ]); - $this->assertEquals(array('group1', 'group2'), $form->getConfig()->getOption('validation_groups')); + $this->assertEquals(['group1', 'group2'], $form->getConfig()->getOption('validation_groups')); } public function testValidationGroupsCanBeSetToFalse() { - $form = $this->createForm(array( + $form = $this->createForm([ 'validation_groups' => false, - )); + ]); - $this->assertEquals(array(), $form->getConfig()->getOption('validation_groups')); + $this->assertEquals([], $form->getConfig()->getOption('validation_groups')); } public function testValidationGroupsCanBeSetToCallback() { - $form = $this->createForm(array( - 'validation_groups' => array($this, 'testValidationGroupsCanBeSetToCallback'), - )); + $form = $this->createForm([ + 'validation_groups' => [$this, 'testValidationGroupsCanBeSetToCallback'], + ]); $this->assertInternalType('callable', $form->getConfig()->getOption('validation_groups')); } public function testValidationGroupsCanBeSetToClosure() { - $form = $this->createForm(array( + $form = $this->createForm([ 'validation_groups' => function (FormInterface $form) { }, - )); + ]); $this->assertInternalType('callable', $form->getConfig()->getOption('validation_groups')); } public function testValidationGroupsCanBeSetToGroupSequence() { - $form = $this->createForm(array( - 'validation_groups' => new GroupSequence(array('group1', 'group2')), - )); + $form = $this->createForm([ + 'validation_groups' => new GroupSequence(['group1', 'group2']), + ]); $this->assertInstanceOf('Symfony\Component\Validator\Constraints\GroupSequence', $form->getConfig()->getOption('validation_groups')); } - abstract protected function createForm(array $options = array()); + abstract protected function createForm(array $options = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/FormTypeValidatorExtensionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/FormTypeValidatorExtensionTest.php index 449a133e..53d29a19 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/FormTypeValidatorExtensionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/FormTypeValidatorExtensionTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Form\Tests\Extension\Validator\Type; -use Symfony\Component\Form\Extension\Validator\Type\FormTypeValidatorExtension; use Symfony\Component\Form\Extension\Validator\ValidatorExtension; use Symfony\Component\Form\Forms; use Symfony\Component\Form\Test\Traits\ValidatorExtensionTrait; @@ -33,9 +32,9 @@ class FormTypeValidatorExtensionTest extends BaseValidatorExtensionTest $builder = $this->factory->createBuilder( FormTypeTest::TESTED_TYPE, null, - array( + [ 'validation_groups' => 'group', - ) + ] ); $builder->add('firstName', FormTypeTest::TESTED_TYPE); $form = $builder->getForm(); @@ -46,22 +45,14 @@ class FormTypeValidatorExtensionTest extends BaseValidatorExtensionTest ->will($this->returnValue(new ConstraintViolationList())); // specific data is irrelevant - $form->submit(array()); + $form->submit([]); } public function testValidConstraint() { - $form = $this->createForm(array('constraints' => $valid = new Valid())); + $form = $this->createForm(['constraints' => $valid = new Valid()]); - $this->assertSame(array($valid), $form->getConfig()->getOption('constraints')); - } - - public function testValidatorInterface() - { - $validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ValidatorInterface')->getMock(); - - $formTypeValidatorExtension = new FormTypeValidatorExtension($validator); - $this->assertAttributeSame($validator, 'validator', $formTypeValidatorExtension); + $this->assertSame([$valid], $form->getConfig()->getOption('constraints')); } public function testGroupSequenceWithConstraintsOption() @@ -69,21 +60,21 @@ class FormTypeValidatorExtensionTest extends BaseValidatorExtensionTest $form = Forms::createFormFactoryBuilder() ->addExtension(new ValidatorExtension(Validation::createValidator())) ->getFormFactory() - ->create(FormTypeTest::TESTED_TYPE, null, (array('validation_groups' => new GroupSequence(array('First', 'Second'))))) - ->add('field', TextTypeTest::TESTED_TYPE, array( - 'constraints' => array( - new Length(array('min' => 10, 'groups' => array('First'))), - new Email(array('groups' => array('Second'))), - ), - )) + ->create(FormTypeTest::TESTED_TYPE, null, (['validation_groups' => new GroupSequence(['First', 'Second'])])) + ->add('field', TextTypeTest::TESTED_TYPE, [ + 'constraints' => [ + new Length(['min' => 10, 'groups' => ['First']]), + new Email(['groups' => ['Second']]), + ], + ]) ; - $form->submit(array('field' => 'wrong')); + $form->submit(['field' => 'wrong']); $this->assertCount(1, $form->getErrors(true)); } - protected function createForm(array $options = array()) + protected function createForm(array $options = []) { return $this->factory->create(FormTypeTest::TESTED_TYPE, null, $options); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/SubmitTypeValidatorExtensionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/SubmitTypeValidatorExtensionTest.php index 015b9582..c347c89b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/SubmitTypeValidatorExtensionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/SubmitTypeValidatorExtensionTest.php @@ -17,7 +17,7 @@ class SubmitTypeValidatorExtensionTest extends BaseValidatorExtensionTest { use ValidatorExtensionTrait; - protected function createForm(array $options = array()) + protected function createForm(array $options = []) { return $this->factory->create('Symfony\Component\Form\Extension\Core\Type\SubmitType', null, $options); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/UploadValidatorExtensionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/UploadValidatorExtensionTest.php index 7d4178bc..c4d8e8d9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/UploadValidatorExtensionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/UploadValidatorExtensionTest.php @@ -15,23 +15,17 @@ use Symfony\Component\Form\Extension\Validator\Type\UploadValidatorExtension; use Symfony\Component\Form\Test\TypeTestCase; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; +use Symfony\Component\Translation\TranslatorInterface; class UploadValidatorExtensionTest extends TypeTestCase { public function testPostMaxSizeTranslation() { - $translator = $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock(); - - $translator->expects($this->any()) - ->method('trans') - ->with($this->equalTo('old max {{ max }}!')) - ->willReturn('translated max {{ max }}!'); - - $extension = new UploadValidatorExtension($translator); + $extension = new UploadValidatorExtension(new DummyTranslator()); $resolver = new OptionsResolver(); $resolver->setDefault('post_max_size_message', 'old max {{ max }}!'); - $resolver->setDefault('upload_max_size_message', function (Options $options, $message) { + $resolver->setDefault('upload_max_size_message', function (Options $options) { return function () use ($options) { return $options['post_max_size_message']; }; @@ -43,3 +37,25 @@ class UploadValidatorExtensionTest extends TypeTestCase $this->assertEquals('translated max {{ max }}!', \call_user_func($options['upload_max_size_message'])); } } + +class DummyTranslator implements TranslatorInterface +{ + public function trans($id, array $parameters = [], $domain = null, $locale = null) + { + return 'translated max {{ max }}!'; + } + + public function transChoice($id, $number, array $parameters = [], $domain = null, $locale = null) + { + return 'translated max {{ max }}!'; + } + + public function setLocale($locale) + { + } + + public function getLocale() + { + return 'en'; + } +} diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Util/ServerParamsTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Util/ServerParamsTest.php index c3ee7303..04987624 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Util/ServerParamsTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Util/ServerParamsTest.php @@ -14,6 +14,7 @@ namespace Symfony\Component\Form\Tests\Extension\Validator\Util; use PHPUnit\Framework\TestCase; use Symfony\Component\Form\Extension\Validator\Util\ServerParams; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; class ServerParamsTest extends TestCase { @@ -31,9 +32,9 @@ class ServerParamsTest extends TestCase public function testGetContentLengthFromRequest() { - $request = Request::create('http://foo', 'GET', array(), array(), array(), array('CONTENT_LENGTH' => 1024)); - $requestStack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->setMethods(array('getCurrentRequest'))->getMock(); - $requestStack->expects($this->once())->method('getCurrentRequest')->will($this->returnValue($request)); + $request = Request::create('http://foo', 'GET', [], [], [], ['CONTENT_LENGTH' => 1024]); + $requestStack = new RequestStack(); + $requestStack->push($request); $serverParams = new ServerParams($requestStack); $this->assertEquals(1024, $serverParams->getContentLength()); @@ -42,31 +43,44 @@ class ServerParamsTest extends TestCase /** @dataProvider getGetPostMaxSizeTestData */ public function testGetPostMaxSize($size, $bytes) { - $serverParams = $this->getMockBuilder('Symfony\Component\Form\Extension\Validator\Util\ServerParams')->setMethods(array('getNormalizedIniPostMaxSize'))->getMock(); - $serverParams - ->expects($this->any()) - ->method('getNormalizedIniPostMaxSize') - ->will($this->returnValue(strtoupper($size))); + $serverParams = new DummyServerParams($size); $this->assertEquals($bytes, $serverParams->getPostMaxSize()); } public function getGetPostMaxSizeTestData() { - return array( - array('2k', 2048), - array('2 k', 2048), - array('8m', 8 * 1024 * 1024), - array('+2 k', 2048), - array('+2???k', 2048), - array('0x10', 16), - array('0xf', 15), - array('010', 8), - array('+0x10 k', 16 * 1024), - array('1g', 1024 * 1024 * 1024), - array('-1', -1), - array('0', 0), - array('2mk', 2048), // the unit must be the last char, so in this case 'k', not 'm' - ); + return [ + ['2k', 2048], + ['2 k', 2048], + ['8m', 8 * 1024 * 1024], + ['+2 k', 2048], + ['+2???k', 2048], + ['0x10', 16], + ['0xf', 15], + ['010', 8], + ['+0x10 k', 16 * 1024], + ['1g', 1024 * 1024 * 1024], + ['-1', -1], + ['0', 0], + ['2mk', 2048], // the unit must be the last char, so in this case 'k', not 'm' + ]; + } +} + +class DummyServerParams extends ServerParams +{ + private $size; + + public function __construct($size) + { + parent::__construct(); + + $this->size = $size; + } + + public function getNormalizedIniPostMaxSize() + { + return $this->size; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorExtensionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorExtensionTest.php index a2b4e2ef..136086a5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorExtensionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorExtensionTest.php @@ -12,37 +12,118 @@ namespace Symfony\Component\Form\Tests\Extension\Validator; use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Validator\Constraints\Form as FormConstraint; use Symfony\Component\Form\Extension\Validator\ValidatorExtension; +use Symfony\Component\Form\Extension\Validator\ValidatorTypeGuesser; +use Symfony\Component\Form\Form; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Form\FormFactoryBuilder; +use Symfony\Component\OptionsResolver\OptionsResolver; +use Symfony\Component\Validator\Constraints\NotBlank; +use Symfony\Component\Validator\Mapping\CascadingStrategy; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory; +use Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader; +use Symfony\Component\Validator\Mapping\TraversalStrategy; +use Symfony\Component\Validator\Tests\Fixtures\FakeMetadataFactory; +use Symfony\Component\Validator\Validation; class ValidatorExtensionTest extends TestCase { public function test2Dot5ValidationApi() { - $validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\RecursiveValidator') - ->disableOriginalConstructor() - ->getMock(); - $metadata = $this->getMockBuilder('Symfony\Component\Validator\Mapping\ClassMetadata') - ->setMethods(array('addConstraint', 'addPropertyConstraint')) - ->disableOriginalConstructor() - ->getMock(); + $metadata = new ClassMetadata(Form::class); - $validator->expects($this->once()) - ->method('getMetadataFor') - ->with($this->identicalTo('Symfony\Component\Form\Form')) - ->will($this->returnValue($metadata)); + $metadataFactory = new FakeMetadataFactory(); + $metadataFactory->addMetadata($metadata); - // Verify that the constraints are added - $metadata->expects($this->once()) - ->method('addConstraint') - ->with($this->isInstanceOf('Symfony\Component\Form\Extension\Validator\Constraints\Form')); - - $metadata->expects($this->once()) - ->method('addPropertyConstraint') - ->with('children', $this->isInstanceOf('Symfony\Component\Validator\Constraints\Valid')); + $validator = Validation::createValidatorBuilder() + ->setMetadataFactory($metadataFactory) + ->getValidator(); $extension = new ValidatorExtension($validator); - $guesser = $extension->loadTypeGuesser(); - $this->assertInstanceOf('Symfony\Component\Form\Extension\Validator\ValidatorTypeGuesser', $guesser); + $this->assertInstanceOf(ValidatorTypeGuesser::class, $extension->loadTypeGuesser()); + + $this->assertCount(1, $metadata->getConstraints()); + $this->assertInstanceOf(FormConstraint::class, $metadata->getConstraints()[0]); + + $this->assertSame(CascadingStrategy::CASCADE, $metadata->getPropertyMetadata('children')[0]->cascadingStrategy); + $this->assertSame(TraversalStrategy::IMPLICIT, $metadata->getPropertyMetadata('children')[0]->traversalStrategy); + } + + public function testDataConstraintsInvalidateFormEvenIfFieldIsNotSubmitted() + { + $form = $this->createForm(FooType::class); + $form->submit(['baz' => 'foobar'], false); + + $this->assertTrue($form->isSubmitted()); + $this->assertFalse($form->isValid()); + $this->assertFalse($form->get('bar')->isSubmitted()); + $this->assertCount(1, $form->get('bar')->getErrors()); + } + + public function testFieldConstraintsDoNotInvalidateFormIfFieldIsNotSubmitted() + { + $form = $this->createForm(FooType::class); + $form->submit(['bar' => 'foobar'], false); + + $this->assertTrue($form->isSubmitted()); + $this->assertTrue($form->isValid()); + } + + public function testFieldConstraintsInvalidateFormIfFieldIsSubmitted() + { + $form = $this->createForm(FooType::class); + $form->submit(['bar' => 'foobar', 'baz' => ''], false); + + $this->assertTrue($form->isSubmitted()); + $this->assertFalse($form->isValid()); + $this->assertTrue($form->get('bar')->isSubmitted()); + $this->assertTrue($form->get('bar')->isValid()); + $this->assertTrue($form->get('baz')->isSubmitted()); + $this->assertFalse($form->get('baz')->isValid()); + } + + private function createForm($type) + { + $validator = Validation::createValidatorBuilder() + ->setMetadataFactory(new LazyLoadingMetadataFactory(new StaticMethodLoader())) + ->getValidator(); + $formFactoryBuilder = new FormFactoryBuilder(); + $formFactoryBuilder->addExtension(new ValidatorExtension($validator)); + $formFactory = $formFactoryBuilder->getFormFactory(); + + return $formFactory->create($type); + } +} + +class Foo +{ + public $bar; + public $baz; + + public static function loadValidatorMetadata(ClassMetadata $metadata) + { + $metadata->addPropertyConstraint('bar', new NotBlank()); + } +} + +class FooType extends AbstractType +{ + public function buildForm(FormBuilderInterface $builder, array $options) + { + $builder + ->add('bar') + ->add('baz', null, [ + 'constraints' => [new NotBlank()], + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefault('data_class', Foo::class); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php index 1a743cdf..878bbfad 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php @@ -23,6 +23,8 @@ use Symfony\Component\Validator\Constraints\NotNull; use Symfony\Component\Validator\Constraints\Range; use Symfony\Component\Validator\Constraints\Type; use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; +use Symfony\Component\Validator\Tests\Fixtures\FakeMetadataFactory; /** * @author franek @@ -45,30 +47,27 @@ class ValidatorTypeGuesserTest extends TestCase private $metadata; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var MetadataFactoryInterface */ private $metadataFactory; protected function setUp() { $this->metadata = new ClassMetadata(self::TEST_CLASS); - $this->metadataFactory = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface')->getMock(); - $this->metadataFactory->expects($this->any()) - ->method('getMetadataFor') - ->with(self::TEST_CLASS) - ->will($this->returnValue($this->metadata)); + $this->metadataFactory = new FakeMetadataFactory(); + $this->metadataFactory->addMetadata($this->metadata); $this->guesser = new ValidatorTypeGuesser($this->metadataFactory); } public function guessRequiredProvider() { - return array( - array(new NotNull(), new ValueGuess(true, Guess::HIGH_CONFIDENCE)), - array(new NotBlank(), new ValueGuess(true, Guess::HIGH_CONFIDENCE)), - array(new IsTrue(), new ValueGuess(true, Guess::HIGH_CONFIDENCE)), - array(new Length(10), new ValueGuess(false, Guess::LOW_CONFIDENCE)), - array(new Range(array('min' => 1, 'max' => 20)), new ValueGuess(false, Guess::LOW_CONFIDENCE)), - ); + return [ + [new NotNull(), new ValueGuess(true, Guess::HIGH_CONFIDENCE)], + [new NotBlank(), new ValueGuess(true, Guess::HIGH_CONFIDENCE)], + [new IsTrue(), new ValueGuess(true, Guess::HIGH_CONFIDENCE)], + [new Length(10), new ValueGuess(false, Guess::LOW_CONFIDENCE)], + [new Range(['min' => 1, 'max' => 20]), new ValueGuess(false, Guess::LOW_CONFIDENCE)], + ]; } /** @@ -92,7 +91,7 @@ class ValidatorTypeGuesserTest extends TestCase public function testGuessMaxLengthForConstraintWithMaxValue() { - $constraint = new Length(array('max' => '2')); + $constraint = new Length(['max' => '2']); $result = $this->guesser->guessMaxLengthForConstraint($constraint); $this->assertInstanceOf('Symfony\Component\Form\Guess\ValueGuess', $result); @@ -102,7 +101,7 @@ class ValidatorTypeGuesserTest extends TestCase public function testGuessMaxLengthForConstraintWithMinValue() { - $constraint = new Length(array('min' => '2')); + $constraint = new Length(['min' => '2']); $result = $this->guesser->guessMaxLengthForConstraint($constraint); $this->assertNull($result); @@ -110,12 +109,12 @@ class ValidatorTypeGuesserTest extends TestCase public function maxLengthTypeProvider() { - return array( - array('double'), - array('float'), - array('numeric'), - array('real'), - ); + return [ + ['double'], + ['float'], + ['numeric'], + ['real'], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php index 66e2daff..2fa3e928 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php @@ -12,8 +12,11 @@ namespace Symfony\Component\Form\Tests\Extension\Validator\ViolationMapper; use PHPUnit\Framework\TestCase; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\Form\CallbackTransformer; use Symfony\Component\Form\Exception\TransformationFailedException; +use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper; use Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationMapper; use Symfony\Component\Form\Form; use Symfony\Component\Form\FormConfigBuilder; @@ -34,7 +37,7 @@ class ViolationMapperTest extends TestCase const LEVEL_2 = 3; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var EventDispatcherInterface */ private $dispatcher; @@ -60,23 +63,23 @@ class ViolationMapperTest extends TestCase protected function setUp() { - $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $this->dispatcher = new EventDispatcher(); $this->mapper = new ViolationMapper(); $this->message = 'Message'; $this->messageTemplate = 'Message template'; - $this->params = array('foo' => 'bar'); + $this->params = ['foo' => 'bar']; } - protected function getForm($name = 'name', $propertyPath = null, $dataClass = null, $errorMapping = array(), $inheritData = false, $synchronized = true) + protected function getForm($name = 'name', $propertyPath = null, $dataClass = null, $errorMapping = [], $inheritData = false, $synchronized = true) { - $config = new FormConfigBuilder($name, $dataClass, $this->dispatcher, array( + $config = new FormConfigBuilder($name, $dataClass, $this->dispatcher, [ 'error_mapping' => $errorMapping, - )); + ]); $config->setMapped(true); $config->setInheritData($inheritData); $config->setPropertyPath($propertyPath); $config->setCompound(true); - $config->setDataMapper($this->getDataMapper()); + $config->setDataMapper(new PropertyPathMapper()); if (!$synchronized) { $config->addViewTransformer(new CallbackTransformer( @@ -88,14 +91,6 @@ class ViolationMapperTest extends TestCase return new Form($config); } - /** - * @return \PHPUnit_Framework_MockObject_MockObject - */ - private function getDataMapper() - { - return $this->getMockBuilder('Symfony\Component\Form\DataMapperInterface')->getMock(); - } - /** * @param $propertyPath * @@ -121,54 +116,54 @@ class ViolationMapperTest extends TestCase { $violation = $this->getConstraintViolation('children[address].data.foo'); $parent = $this->getForm('parent'); - $child = $this->getForm('address', 'address', null, array(), true); + $child = $this->getForm('address', 'address', null, [], true); $grandChild = $this->getForm('street'); $parent->add($child); $child->add($grandChild); - $parent->submit(array()); + $parent->submit([]); $this->mapper->mapViolation($violation, $parent); $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); - $this->assertEquals(array($this->getFormError($violation, $child)), iterator_to_array($child->getErrors()), $child->getName().' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation, $child)], iterator_to_array($child->getErrors()), $child->getName().' should have an error, but has none'); $this->assertCount(0, $grandChild->getErrors(), $grandChild->getName().' should not have an error, but has one'); } public function testFollowDotRules() { $violation = $this->getConstraintViolation('data.foo'); - $parent = $this->getForm('parent', null, null, array( + $parent = $this->getForm('parent', null, null, [ 'foo' => 'address', - )); - $child = $this->getForm('address', null, null, array( + ]); + $child = $this->getForm('address', null, null, [ '.' => 'street', - )); - $grandChild = $this->getForm('street', null, null, array( + ]); + $grandChild = $this->getForm('street', null, null, [ '.' => 'name', - )); + ]); $grandGrandChild = $this->getForm('name'); $parent->add($child); $child->add($grandChild); $grandChild->add($grandGrandChild); - $parent->submit(array()); + $parent->submit([]); $this->mapper->mapViolation($violation, $parent); $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); $this->assertCount(0, $child->getErrors(), $child->getName().' should not have an error, but has one'); $this->assertCount(0, $grandChild->getErrors(), $grandChild->getName().' should not have an error, but has one'); - $this->assertEquals(array($this->getFormError($violation, $grandGrandChild)), iterator_to_array($grandGrandChild->getErrors()), $grandGrandChild->getName().' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation, $grandGrandChild)], iterator_to_array($grandGrandChild->getErrors()), $grandGrandChild->getName().' should have an error, but has none'); } public function testAbortMappingIfNotSynchronized() { $violation = $this->getConstraintViolation('children[address].data.street'); $parent = $this->getForm('parent'); - $child = $this->getForm('address', 'address', null, array(), false, false); + $child = $this->getForm('address', 'address', null, [], false, false); // even though "street" is synchronized, it should not have any errors // due to its parent not being synchronized $grandChild = $this->getForm('street', 'street'); @@ -177,7 +172,7 @@ class ViolationMapperTest extends TestCase $child->add($grandChild); // invoke the transformer and mark the form unsynchronized - $parent->submit(array()); + $parent->submit([]); $this->mapper->mapViolation($violation, $parent); @@ -190,9 +185,9 @@ class ViolationMapperTest extends TestCase { $violation = $this->getConstraintViolation('data.address'); $parent = $this->getForm('parent'); - $child = $this->getForm('address', 'address', null, array( + $child = $this->getForm('address', 'address', null, [ '.' => 'street', - ), false, false); + ], false, false); // even though "street" is synchronized, it should not have any errors // due to its parent not being synchronized $grandChild = $this->getForm('street'); @@ -201,7 +196,7 @@ class ViolationMapperTest extends TestCase $child->add($grandChild); // invoke the transformer and mark the form unsynchronized - $parent->submit(array()); + $parent->submit([]); $this->mapper->mapViolation($violation, $parent); @@ -210,7 +205,7 @@ class ViolationMapperTest extends TestCase $this->assertCount(0, $grandChild->getErrors(), $grandChild->getName().' should not have an error, but has one'); } - public function testAbortMappingIfNotSubmitted() + public function testMappingIfNotSubmitted() { $violation = $this->getConstraintViolation('children[address].data.street'); $parent = $this->getForm('parent'); @@ -221,8 +216,8 @@ class ViolationMapperTest extends TestCase $child->add($grandChild); // Disable automatic submission of missing fields - $parent->submit(array(), false); - $child->submit(array(), false); + $parent->submit([], false); + $child->submit([], false); // $grandChild is not submitted @@ -230,24 +225,24 @@ class ViolationMapperTest extends TestCase $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); $this->assertCount(0, $child->getErrors(), $child->getName().' should not have an error, but has one'); - $this->assertCount(0, $grandChild->getErrors(), $grandChild->getName().' should not have an error, but has one'); + $this->assertCount(1, $grandChild->getErrors(), $grandChild->getName().' should have one error'); } - public function testAbortDotRuleMappingIfNotSubmitted() + public function testDotRuleMappingIfNotSubmitted() { $violation = $this->getConstraintViolation('data.address'); $parent = $this->getForm('parent'); - $child = $this->getForm('address', 'address', null, array( + $child = $this->getForm('address', 'address', null, [ '.' => 'street', - )); + ]); $grandChild = $this->getForm('street'); $parent->add($child); $child->add($grandChild); // Disable automatic submission of missing fields - $parent->submit(array(), false); - $child->submit(array(), false); + $parent->submit([], false); + $child->submit([], false); // $grandChild is not submitted @@ -255,533 +250,533 @@ class ViolationMapperTest extends TestCase $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); $this->assertCount(0, $child->getErrors(), $child->getName().' should not have an error, but has one'); - $this->assertCount(0, $grandChild->getErrors(), $grandChild->getName().' should not have an error, but has one'); + $this->assertCount(1, $grandChild->getErrors(), $grandChild->getName().' should have one error'); } public function provideDefaultTests() { // The mapping must be deterministic! If a child has the property path "[street]", // "data[street]" should be mapped, but "data.street" should not! - return array( + return [ // mapping target, child name, its property path, grand child name, its property path, violation path - array(self::LEVEL_0, 'address', 'address', 'street', 'street', ''), - array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data'), + [self::LEVEL_0, 'address', 'address', 'street', 'street', ''], + [self::LEVEL_0, 'address', 'address', 'street', 'street', 'data'], - array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', 'street', 'children[address].data'), - array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].data.street'), - array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].data.street.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', 'street', 'children[address].data[street]'), - array(self::LEVEL_1, 'address', 'address', 'street', 'street', 'children[address].data[street].prop'), - array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'data.address.street'), - array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'data.address.street.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', 'street', 'data.address[street]'), - array(self::LEVEL_1, 'address', 'address', 'street', 'street', 'data.address[street].prop'), - array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address].street'), - array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address].street.prop'), - array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address][street]'), - array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address][street].prop'), + [self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', 'address', 'street', 'street', 'children[address].data'], + [self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].data.street'], + [self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].data.street.prop'], + [self::LEVEL_1, 'address', 'address', 'street', 'street', 'children[address].data[street]'], + [self::LEVEL_1, 'address', 'address', 'street', 'street', 'children[address].data[street].prop'], + [self::LEVEL_2, 'address', 'address', 'street', 'street', 'data.address.street'], + [self::LEVEL_2, 'address', 'address', 'street', 'street', 'data.address.street.prop'], + [self::LEVEL_1, 'address', 'address', 'street', 'street', 'data.address[street]'], + [self::LEVEL_1, 'address', 'address', 'street', 'street', 'data.address[street].prop'], + [self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address].street'], + [self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address].street.prop'], + [self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address][street]'], + [self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address][street].prop'], - array(self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', '[street]', 'children[address].data'), - array(self::LEVEL_1, 'address', 'address', 'street', '[street]', 'children[address].data.street'), - array(self::LEVEL_1, 'address', 'address', 'street', '[street]', 'children[address].data.street.prop'), - array(self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address].data[street]'), - array(self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address].data[street].prop'), - array(self::LEVEL_1, 'address', 'address', 'street', '[street]', 'data.address.street'), - array(self::LEVEL_1, 'address', 'address', 'street', '[street]', 'data.address.street.prop'), - array(self::LEVEL_2, 'address', 'address', 'street', '[street]', 'data.address[street]'), - array(self::LEVEL_2, 'address', 'address', 'street', '[street]', 'data.address[street].prop'), - array(self::LEVEL_0, 'address', 'address', 'street', '[street]', 'data[address].street'), - array(self::LEVEL_0, 'address', 'address', 'street', '[street]', 'data[address].street.prop'), - array(self::LEVEL_0, 'address', 'address', 'street', '[street]', 'data[address][street]'), - array(self::LEVEL_0, 'address', 'address', 'street', '[street]', 'data[address][street].prop'), + [self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', 'address', 'street', '[street]', 'children[address].data'], + [self::LEVEL_1, 'address', 'address', 'street', '[street]', 'children[address].data.street'], + [self::LEVEL_1, 'address', 'address', 'street', '[street]', 'children[address].data.street.prop'], + [self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address].data[street]'], + [self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address].data[street].prop'], + [self::LEVEL_1, 'address', 'address', 'street', '[street]', 'data.address.street'], + [self::LEVEL_1, 'address', 'address', 'street', '[street]', 'data.address.street.prop'], + [self::LEVEL_2, 'address', 'address', 'street', '[street]', 'data.address[street]'], + [self::LEVEL_2, 'address', 'address', 'street', '[street]', 'data.address[street].prop'], + [self::LEVEL_0, 'address', 'address', 'street', '[street]', 'data[address].street'], + [self::LEVEL_0, 'address', 'address', 'street', '[street]', 'data[address].street.prop'], + [self::LEVEL_0, 'address', 'address', 'street', '[street]', 'data[address][street]'], + [self::LEVEL_0, 'address', 'address', 'street', '[street]', 'data[address][street].prop'], - array(self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'street', 'children[address].data'), - array(self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address].data.street'), - array(self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address].data.street.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'street', 'children[address].data[street]'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'street', 'children[address].data[street].prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'street', 'data.address.street'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'street', 'data.address.street.prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'street', 'data.address[street]'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'street', 'data.address[street].prop'), - array(self::LEVEL_2, 'address', '[address]', 'street', 'street', 'data[address].street'), - array(self::LEVEL_2, 'address', '[address]', 'street', 'street', 'data[address].street.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'street', 'data[address][street]'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'street', 'data[address][street].prop'), + [self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', 'street', 'children[address].data'], + [self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address].data.street'], + [self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address].data.street.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', 'street', 'children[address].data[street]'], + [self::LEVEL_1, 'address', '[address]', 'street', 'street', 'children[address].data[street].prop'], + [self::LEVEL_0, 'address', '[address]', 'street', 'street', 'data.address.street'], + [self::LEVEL_0, 'address', '[address]', 'street', 'street', 'data.address.street.prop'], + [self::LEVEL_0, 'address', '[address]', 'street', 'street', 'data.address[street]'], + [self::LEVEL_0, 'address', '[address]', 'street', 'street', 'data.address[street].prop'], + [self::LEVEL_2, 'address', '[address]', 'street', 'street', 'data[address].street'], + [self::LEVEL_2, 'address', '[address]', 'street', 'street', 'data[address].street.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', 'street', 'data[address][street]'], + [self::LEVEL_1, 'address', '[address]', 'street', 'street', 'data[address][street].prop'], - array(self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[street]', 'children[address].data'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[street]', 'children[address].data.street'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[street]', 'children[address].data.street.prop'), - array(self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address].data[street]'), - array(self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address].data[street].prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[street]', 'data.address.street'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[street]', 'data.address.street.prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[street]', 'data.address[street]'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[street]', 'data.address[street].prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[street]', 'data[address].street'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[street]', 'data[address].street.prop'), - array(self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'data[address][street]'), - array(self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'data[address][street].prop'), + [self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', '[street]', 'children[address].data'], + [self::LEVEL_1, 'address', '[address]', 'street', '[street]', 'children[address].data.street'], + [self::LEVEL_1, 'address', '[address]', 'street', '[street]', 'children[address].data.street.prop'], + [self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address].data[street]'], + [self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address].data[street].prop'], + [self::LEVEL_0, 'address', '[address]', 'street', '[street]', 'data.address.street'], + [self::LEVEL_0, 'address', '[address]', 'street', '[street]', 'data.address.street.prop'], + [self::LEVEL_0, 'address', '[address]', 'street', '[street]', 'data.address[street]'], + [self::LEVEL_0, 'address', '[address]', 'street', '[street]', 'data.address[street].prop'], + [self::LEVEL_1, 'address', '[address]', 'street', '[street]', 'data[address].street'], + [self::LEVEL_1, 'address', '[address]', 'street', '[street]', 'data[address].street.prop'], + [self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'data[address][street]'], + [self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'data[address][street].prop'], - array(self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', 'person.address', 'street', 'street', 'children[address].data'), - array(self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'children[address].data.street'), - array(self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'children[address].data.street.prop'), - array(self::LEVEL_1, 'address', 'person.address', 'street', 'street', 'children[address].data[street]'), - array(self::LEVEL_1, 'address', 'person.address', 'street', 'street', 'children[address].data[street].prop'), - array(self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'data.person.address.street'), - array(self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'data.person.address.street.prop'), - array(self::LEVEL_1, 'address', 'person.address', 'street', 'street', 'data.person.address[street]'), - array(self::LEVEL_1, 'address', 'person.address', 'street', 'street', 'data.person.address[street].prop'), - array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data.person[address].street'), - array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data.person[address].street.prop'), - array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data.person[address][street]'), - array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data.person[address][street].prop'), - array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person].address.street'), - array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person].address.street.prop'), - array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person].address[street]'), - array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person].address[street].prop'), - array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person][address].street'), - array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person][address].street.prop'), - array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person][address][street]'), - array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person][address][street].prop'), + [self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', 'person.address', 'street', 'street', 'children[address].data'], + [self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'children[address].data.street'], + [self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'children[address].data.street.prop'], + [self::LEVEL_1, 'address', 'person.address', 'street', 'street', 'children[address].data[street]'], + [self::LEVEL_1, 'address', 'person.address', 'street', 'street', 'children[address].data[street].prop'], + [self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'data.person.address.street'], + [self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'data.person.address.street.prop'], + [self::LEVEL_1, 'address', 'person.address', 'street', 'street', 'data.person.address[street]'], + [self::LEVEL_1, 'address', 'person.address', 'street', 'street', 'data.person.address[street].prop'], + [self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data.person[address].street'], + [self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data.person[address].street.prop'], + [self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data.person[address][street]'], + [self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data.person[address][street].prop'], + [self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person].address.street'], + [self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person].address.street.prop'], + [self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person].address[street]'], + [self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person].address[street].prop'], + [self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person][address].street'], + [self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person][address].street.prop'], + [self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person][address][street]'], + [self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person][address][street].prop'], - array(self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', 'person.address', 'street', '[street]', 'children[address].data'), - array(self::LEVEL_1, 'address', 'person.address', 'street', '[street]', 'children[address].data.street'), - array(self::LEVEL_1, 'address', 'person.address', 'street', '[street]', 'children[address].data.street.prop'), - array(self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'children[address].data[street]'), - array(self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'children[address].data[street].prop'), - array(self::LEVEL_1, 'address', 'person.address', 'street', '[street]', 'data.person.address.street'), - array(self::LEVEL_1, 'address', 'person.address', 'street', '[street]', 'data.person.address.street.prop'), - array(self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'data.person.address[street]'), - array(self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'data.person.address[street].prop'), - array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data.person[address].street'), - array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data.person[address].street.prop'), - array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data.person[address][street]'), - array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data.person[address][street].prop'), - array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person].address.street'), - array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person].address.street.prop'), - array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person].address[street]'), - array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person].address[street].prop'), - array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person][address].street'), - array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person][address].street.prop'), - array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person][address][street]'), - array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person][address][street].prop'), + [self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', 'person.address', 'street', '[street]', 'children[address].data'], + [self::LEVEL_1, 'address', 'person.address', 'street', '[street]', 'children[address].data.street'], + [self::LEVEL_1, 'address', 'person.address', 'street', '[street]', 'children[address].data.street.prop'], + [self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'children[address].data[street]'], + [self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'children[address].data[street].prop'], + [self::LEVEL_1, 'address', 'person.address', 'street', '[street]', 'data.person.address.street'], + [self::LEVEL_1, 'address', 'person.address', 'street', '[street]', 'data.person.address.street.prop'], + [self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'data.person.address[street]'], + [self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'data.person.address[street].prop'], + [self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data.person[address].street'], + [self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data.person[address].street.prop'], + [self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data.person[address][street]'], + [self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data.person[address][street].prop'], + [self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person].address.street'], + [self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person].address.street.prop'], + [self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person].address[street]'], + [self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person].address[street].prop'], + [self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person][address].street'], + [self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person][address].street.prop'], + [self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person][address][street]'], + [self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person][address][street].prop'], - array(self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', 'person[address]', 'street', 'street', 'children[address].data'), - array(self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'children[address].data.street'), - array(self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'children[address].data.street.prop'), - array(self::LEVEL_1, 'address', 'person[address]', 'street', 'street', 'children[address].data[street]'), - array(self::LEVEL_1, 'address', 'person[address]', 'street', 'street', 'children[address].data[street].prop'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data.person.address.street'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data.person.address.street.prop'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data.person.address[street]'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data.person.address[street].prop'), - array(self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'data.person[address].street'), - array(self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'data.person[address].street.prop'), - array(self::LEVEL_1, 'address', 'person[address]', 'street', 'street', 'data.person[address][street]'), - array(self::LEVEL_1, 'address', 'person[address]', 'street', 'street', 'data.person[address][street].prop'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person].address.street'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person].address.street.prop'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person].address[street]'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person].address[street].prop'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person][address].street'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person][address].street.prop'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person][address][street]'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person][address][street].prop'), + [self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', 'person[address]', 'street', 'street', 'children[address].data'], + [self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'children[address].data.street'], + [self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'children[address].data.street.prop'], + [self::LEVEL_1, 'address', 'person[address]', 'street', 'street', 'children[address].data[street]'], + [self::LEVEL_1, 'address', 'person[address]', 'street', 'street', 'children[address].data[street].prop'], + [self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data.person.address.street'], + [self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data.person.address.street.prop'], + [self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data.person.address[street]'], + [self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data.person.address[street].prop'], + [self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'data.person[address].street'], + [self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'data.person[address].street.prop'], + [self::LEVEL_1, 'address', 'person[address]', 'street', 'street', 'data.person[address][street]'], + [self::LEVEL_1, 'address', 'person[address]', 'street', 'street', 'data.person[address][street].prop'], + [self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person].address.street'], + [self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person].address.street.prop'], + [self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person].address[street]'], + [self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person].address[street].prop'], + [self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person][address].street'], + [self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person][address].street.prop'], + [self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person][address][street]'], + [self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person][address][street].prop'], - array(self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', 'person[address]', 'street', '[street]', 'children[address].data'), - array(self::LEVEL_1, 'address', 'person[address]', 'street', '[street]', 'children[address].data.street'), - array(self::LEVEL_1, 'address', 'person[address]', 'street', '[street]', 'children[address].data.street.prop'), - array(self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'children[address].data[street]'), - array(self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'children[address].data[street].prop'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data.person.address.street'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data.person.address.street.prop'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data.person.address[street]'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data.person.address[street].prop'), - array(self::LEVEL_1, 'address', 'person[address]', 'street', '[street]', 'data.person[address].street'), - array(self::LEVEL_1, 'address', 'person[address]', 'street', '[street]', 'data.person[address].street.prop'), - array(self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'data.person[address][street]'), - array(self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'data.person[address][street].prop'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person].address.street'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person].address.street.prop'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person].address[street]'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person].address[street].prop'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person][address].street'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person][address].street.prop'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person][address][street]'), - array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person][address][street].prop'), + [self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', 'person[address]', 'street', '[street]', 'children[address].data'], + [self::LEVEL_1, 'address', 'person[address]', 'street', '[street]', 'children[address].data.street'], + [self::LEVEL_1, 'address', 'person[address]', 'street', '[street]', 'children[address].data.street.prop'], + [self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'children[address].data[street]'], + [self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'children[address].data[street].prop'], + [self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data.person.address.street'], + [self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data.person.address.street.prop'], + [self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data.person.address[street]'], + [self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data.person.address[street].prop'], + [self::LEVEL_1, 'address', 'person[address]', 'street', '[street]', 'data.person[address].street'], + [self::LEVEL_1, 'address', 'person[address]', 'street', '[street]', 'data.person[address].street.prop'], + [self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'data.person[address][street]'], + [self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'data.person[address][street].prop'], + [self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person].address.street'], + [self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person].address.street.prop'], + [self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person].address[street]'], + [self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person].address[street].prop'], + [self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person][address].street'], + [self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person][address].street.prop'], + [self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person][address][street]'], + [self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person][address][street].prop'], - array(self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', '[person].address', 'street', 'street', 'children[address].data'), - array(self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'children[address].data.street'), - array(self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'children[address].data.street.prop'), - array(self::LEVEL_1, 'address', '[person].address', 'street', 'street', 'children[address].data[street]'), - array(self::LEVEL_1, 'address', '[person].address', 'street', 'street', 'children[address].data[street].prop'), - array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person.address.street'), - array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person.address.street.prop'), - array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person.address[street]'), - array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person.address[street].prop'), - array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person[address].street'), - array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person[address].street.prop'), - array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person[address][street]'), - array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person[address][street].prop'), - array(self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'data[person].address.street'), - array(self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'data[person].address.street.prop'), - array(self::LEVEL_1, 'address', '[person].address', 'street', 'street', 'data[person].address[street]'), - array(self::LEVEL_1, 'address', '[person].address', 'street', 'street', 'data[person].address[street].prop'), - array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data[person][address].street'), - array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data[person][address].street.prop'), - array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data[person][address][street]'), - array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data[person][address][street].prop'), + [self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', '[person].address', 'street', 'street', 'children[address].data'], + [self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'children[address].data.street'], + [self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'children[address].data.street.prop'], + [self::LEVEL_1, 'address', '[person].address', 'street', 'street', 'children[address].data[street]'], + [self::LEVEL_1, 'address', '[person].address', 'street', 'street', 'children[address].data[street].prop'], + [self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person.address.street'], + [self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person.address.street.prop'], + [self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person.address[street]'], + [self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person.address[street].prop'], + [self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person[address].street'], + [self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person[address].street.prop'], + [self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person[address][street]'], + [self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person[address][street].prop'], + [self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'data[person].address.street'], + [self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'data[person].address.street.prop'], + [self::LEVEL_1, 'address', '[person].address', 'street', 'street', 'data[person].address[street]'], + [self::LEVEL_1, 'address', '[person].address', 'street', 'street', 'data[person].address[street].prop'], + [self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data[person][address].street'], + [self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data[person][address].street.prop'], + [self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data[person][address][street]'], + [self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data[person][address][street].prop'], - array(self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', '[person].address', 'street', '[street]', 'children[address].data'), - array(self::LEVEL_1, 'address', '[person].address', 'street', '[street]', 'children[address].data.street'), - array(self::LEVEL_1, 'address', '[person].address', 'street', '[street]', 'children[address].data.street.prop'), - array(self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'children[address].data[street]'), - array(self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'children[address].data[street].prop'), - array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person.address.street'), - array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person.address.street.prop'), - array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person.address[street]'), - array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person.address[street].prop'), - array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person[address].street'), - array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person[address].street.prop'), - array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person[address][street]'), - array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person[address][street].prop'), - array(self::LEVEL_1, 'address', '[person].address', 'street', '[street]', 'data[person].address.street'), - array(self::LEVEL_1, 'address', '[person].address', 'street', '[street]', 'data[person].address.street.prop'), - array(self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'data[person].address[street]'), - array(self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'data[person].address[street].prop'), - array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data[person][address].street'), - array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data[person][address].street.prop'), - array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data[person][address][street]'), - array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data[person][address][street].prop'), + [self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', '[person].address', 'street', '[street]', 'children[address].data'], + [self::LEVEL_1, 'address', '[person].address', 'street', '[street]', 'children[address].data.street'], + [self::LEVEL_1, 'address', '[person].address', 'street', '[street]', 'children[address].data.street.prop'], + [self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'children[address].data[street]'], + [self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'children[address].data[street].prop'], + [self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person.address.street'], + [self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person.address.street.prop'], + [self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person.address[street]'], + [self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person.address[street].prop'], + [self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person[address].street'], + [self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person[address].street.prop'], + [self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person[address][street]'], + [self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person[address][street].prop'], + [self::LEVEL_1, 'address', '[person].address', 'street', '[street]', 'data[person].address.street'], + [self::LEVEL_1, 'address', '[person].address', 'street', '[street]', 'data[person].address.street.prop'], + [self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'data[person].address[street]'], + [self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'data[person].address[street].prop'], + [self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data[person][address].street'], + [self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data[person][address].street.prop'], + [self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data[person][address][street]'], + [self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data[person][address][street].prop'], - array(self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'children[address]'), - array(self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'children[address].data'), - array(self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'children[address].data.street'), - array(self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'children[address].data.street.prop'), - array(self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'children[address].data[street]'), - array(self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'children[address].data[street].prop'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person.address.street'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person.address.street.prop'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person.address[street]'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person.address[street].prop'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person[address].street'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person[address].street.prop'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person[address][street]'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person[address][street].prop'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data[person].address.street'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data[person].address.street.prop'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data[person].address[street]'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data[person].address[street].prop'), - array(self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'data[person][address].street'), - array(self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'data[person][address].street.prop'), - array(self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'data[person][address][street]'), - array(self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'data[person][address][street].prop'), + [self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'children[address]'], + [self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'children[address].data'], + [self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'children[address].data.street'], + [self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'children[address].data.street.prop'], + [self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'children[address].data[street]'], + [self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'children[address].data[street].prop'], + [self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person.address.street'], + [self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person.address.street.prop'], + [self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person.address[street]'], + [self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person.address[street].prop'], + [self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person[address].street'], + [self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person[address].street.prop'], + [self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person[address][street]'], + [self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person[address][street].prop'], + [self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data[person].address.street'], + [self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data[person].address.street.prop'], + [self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data[person].address[street]'], + [self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data[person].address[street].prop'], + [self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'data[person][address].street'], + [self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'data[person][address].street.prop'], + [self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'data[person][address][street]'], + [self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'data[person][address][street].prop'], - array(self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', '[person][address]', 'street', '[street]', 'children[address].data'), - array(self::LEVEL_1, 'address', '[person][address]', 'street', '[street]', 'children[address].data.street'), - array(self::LEVEL_1, 'address', '[person][address]', 'street', '[street]', 'children[address].data.street.prop'), - array(self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'children[address].data[street]'), - array(self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'children[address].data[street].prop'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person.address.street'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person.address.street.prop'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person.address[street]'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person.address[street].prop'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person[address].street'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person[address].street.prop'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person[address][street]'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person[address][street].prop'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data[person].address.street'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data[person].address.street.prop'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data[person].address[street]'), - array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data[person].address[street].prop'), - array(self::LEVEL_1, 'address', '[person][address]', 'street', '[street]', 'data[person][address].street'), - array(self::LEVEL_1, 'address', '[person][address]', 'street', '[street]', 'data[person][address].street.prop'), - array(self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'data[person][address][street]'), - array(self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'data[person][address][street].prop'), + [self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', '[person][address]', 'street', '[street]', 'children[address].data'], + [self::LEVEL_1, 'address', '[person][address]', 'street', '[street]', 'children[address].data.street'], + [self::LEVEL_1, 'address', '[person][address]', 'street', '[street]', 'children[address].data.street.prop'], + [self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'children[address].data[street]'], + [self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'children[address].data[street].prop'], + [self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person.address.street'], + [self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person.address.street.prop'], + [self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person.address[street]'], + [self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person.address[street].prop'], + [self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person[address].street'], + [self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person[address].street.prop'], + [self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person[address][street]'], + [self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person[address][street].prop'], + [self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data[person].address.street'], + [self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data[person].address.street.prop'], + [self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data[person].address[street]'], + [self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data[person].address[street].prop'], + [self::LEVEL_1, 'address', '[person][address]', 'street', '[street]', 'data[person][address].street'], + [self::LEVEL_1, 'address', '[person][address]', 'street', '[street]', 'data[person][address].street.prop'], + [self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'data[person][address][street]'], + [self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'data[person][address][street].prop'], - array(self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data.office'), - array(self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'children[address].data.office.street'), - array(self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'children[address].data.office.street.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data.office[street]'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data.office[street].prop'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data[office]'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data[office].street'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data[office].street.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data[office][street]'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data[office][street].prop'), - array(self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'data.address.office.street'), - array(self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'data.address.office.street.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address.office[street]'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address.office[street].prop'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address[office].street'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address[office].street.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address[office][street]'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address[office][street].prop'), - array(self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address].office.street'), - array(self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address].office.street.prop'), - array(self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address].office[street]'), - array(self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address].office[street].prop'), - array(self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address][office].street'), - array(self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address][office].street.prop'), - array(self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address][office][street]'), - array(self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address][office][street].prop'), + [self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data.office'], + [self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'children[address].data.office.street'], + [self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'children[address].data.office.street.prop'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data.office[street]'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data.office[street].prop'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data[office]'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data[office].street'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data[office].street.prop'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data[office][street]'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data[office][street].prop'], + [self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'data.address.office.street'], + [self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'data.address.office.street.prop'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address.office[street]'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address.office[street].prop'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address[office].street'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address[office].street.prop'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address[office][street]'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address[office][street].prop'], + [self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address].office.street'], + [self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address].office.street.prop'], + [self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address].office[street]'], + [self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address].office[street].prop'], + [self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address][office].street'], + [self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address][office].street.prop'], + [self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address][office][street]'], + [self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address][office][street].prop'], - array(self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data.office'), - array(self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'children[address].data.office.street'), - array(self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'children[address].data.office.street.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data.office[street]'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data.office[street].prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data[office]'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data[office].street'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data[office].street.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data[office][street]'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data[office][street].prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address.office.street'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address.office.street.prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address.office[street]'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address.office[street].prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address[office].street'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address[office].street.prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address[office][street]'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address[office][street].prop'), - array(self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'data[address].office.street'), - array(self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'data[address].office.street.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address].office[street]'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address].office[street].prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address][office].street'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address][office].street.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address][office][street]'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address][office][street].prop'), + [self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data.office'], + [self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'children[address].data.office.street'], + [self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'children[address].data.office.street.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data.office[street]'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data.office[street].prop'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data[office]'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data[office].street'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data[office].street.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data[office][street]'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data[office][street].prop'], + [self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address.office.street'], + [self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address.office.street.prop'], + [self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address.office[street]'], + [self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address.office[street].prop'], + [self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address[office].street'], + [self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address[office].street.prop'], + [self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address[office][street]'], + [self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address[office][street].prop'], + [self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'data[address].office.street'], + [self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'data[address].office.street.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address].office[street]'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address].office[street].prop'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address][office].street'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address][office].street.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address][office][street]'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address][office][street].prop'], - array(self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data.office'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data.office.street'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data.office.street.prop'), - array(self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'children[address].data.office[street]'), - array(self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'children[address].data.office[street].prop'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data[office]'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data[office].street'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data[office].street.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data[office][street]'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data[office][street].prop'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address.office.street'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address.office.street.prop'), - array(self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'data.address.office[street]'), - array(self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'data.address.office[street].prop'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address[office].street'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address[office].street.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address[office][street]'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address[office][street].prop'), - array(self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address].office.street'), - array(self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address].office.street.prop'), - array(self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address].office[street]'), - array(self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address].office[street].prop'), - array(self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address][office].street'), - array(self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address][office].street.prop'), - array(self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address][office][street]'), - array(self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address][office][street].prop'), + [self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data'], + [self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data.office'], + [self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data.office.street'], + [self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data.office.street.prop'], + [self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'children[address].data.office[street]'], + [self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'children[address].data.office[street].prop'], + [self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data[office]'], + [self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data[office].street'], + [self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data[office].street.prop'], + [self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data[office][street]'], + [self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data[office][street].prop'], + [self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address.office.street'], + [self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address.office.street.prop'], + [self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'data.address.office[street]'], + [self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'data.address.office[street].prop'], + [self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address[office].street'], + [self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address[office].street.prop'], + [self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address[office][street]'], + [self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address[office][street].prop'], + [self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address].office.street'], + [self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address].office.street.prop'], + [self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address].office[street]'], + [self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address].office[street].prop'], + [self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address][office].street'], + [self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address][office].street.prop'], + [self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address][office][street]'], + [self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address][office][street].prop'], - array(self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data.office.street'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data.office.street.prop'), - array(self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'children[address].data.office[street]'), - array(self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'children[address].data.office[street].prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data[office]'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data[office].street'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data[office].street.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data[office][street]'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data[office][street].prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address.office.street'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address.office.street.prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address.office[street]'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address.office[street].prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address[office].street'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address[office].street.prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address[office][street]'), - array(self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address[office][street].prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address].office.street'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address].office.street.prop'), - array(self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'data[address].office[street]'), - array(self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'data[address].office[street].prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address][office].street'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address][office].street.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address][office][street]'), - array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address][office][street].prop'), + [self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data.office.street'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data.office.street.prop'], + [self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'children[address].data.office[street]'], + [self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'children[address].data.office[street].prop'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data[office]'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data[office].street'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data[office].street.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data[office][street]'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data[office][street].prop'], + [self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address.office.street'], + [self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address.office.street.prop'], + [self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address.office[street]'], + [self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address.office[street].prop'], + [self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address[office].street'], + [self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address[office].street.prop'], + [self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address[office][street]'], + [self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address[office][street].prop'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address].office.street'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address].office.street.prop'], + [self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'data[address].office[street]'], + [self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'data[address].office[street].prop'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address][office].street'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address][office].street.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address][office][street]'], + [self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address][office][street].prop'], - array(self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data.office'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data.office.street'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data.office.street.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data.office[street]'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data.office[street].prop'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data[office]'), - array(self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'children[address].data[office].street'), - array(self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'children[address].data[office].street.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data[office][street]'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data[office][street].prop'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address.office.street'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address.office.street.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address.office[street]'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address.office[street].prop'), - array(self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'data.address[office].street'), - array(self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'data.address[office].street.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address[office][street]'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address[office][street].prop'), - array(self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address].office.street'), - array(self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address].office.street.prop'), - array(self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address].office[street]'), - array(self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address].office[street].prop'), - array(self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address][office].street'), - array(self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address][office].street.prop'), - array(self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address][office][street]'), - array(self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address][office][street].prop'), + [self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data'], + [self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data.office'], + [self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data.office.street'], + [self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data.office.street.prop'], + [self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data.office[street]'], + [self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data.office[street].prop'], + [self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data[office]'], + [self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'children[address].data[office].street'], + [self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'children[address].data[office].street.prop'], + [self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data[office][street]'], + [self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data[office][street].prop'], + [self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address.office.street'], + [self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address.office.street.prop'], + [self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address.office[street]'], + [self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address.office[street].prop'], + [self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'data.address[office].street'], + [self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'data.address[office].street.prop'], + [self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address[office][street]'], + [self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address[office][street].prop'], + [self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address].office.street'], + [self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address].office.street.prop'], + [self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address].office[street]'], + [self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address].office[street].prop'], + [self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address][office].street'], + [self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address][office].street.prop'], + [self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address][office][street]'], + [self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address][office][street].prop'], - array(self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data.office'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data.office.street'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data.office.street.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data.office[street]'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data.office[street].prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data[office]'), - array(self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'children[address].data[office].street'), - array(self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'children[address].data[office].street.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data[office][street]'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data[office][street].prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address.office.street'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address.office.street.prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address.office[street]'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address.office[street].prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address[office].street'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address[office].street.prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address[office][street]'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address[office][street].prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address].office.street'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address].office.street.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address].office[street]'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address].office[street].prop'), - array(self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'data[address][office].street'), - array(self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'data[address][office].street.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address][office][street]'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address][office][street].prop'), + [self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data.office'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data.office.street'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data.office.street.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data.office[street]'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data.office[street].prop'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data[office]'], + [self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'children[address].data[office].street'], + [self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'children[address].data[office].street.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data[office][street]'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data[office][street].prop'], + [self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address.office.street'], + [self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address.office.street.prop'], + [self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address.office[street]'], + [self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address.office[street].prop'], + [self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address[office].street'], + [self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address[office].street.prop'], + [self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address[office][street]'], + [self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address[office][street].prop'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address].office.street'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address].office.street.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address].office[street]'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address].office[street].prop'], + [self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'data[address][office].street'], + [self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'data[address][office].street.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address][office][street]'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address][office][street].prop'], - array(self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data.office'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data.office.street'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data.office.street.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data.office[street]'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data.office[street].prop'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data[office]'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data[office].street'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data[office].street.prop'), - array(self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'children[address].data[office][street]'), - array(self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'children[address].data[office][street].prop'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address.office.street'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address.office.street.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address.office[street]'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address.office[street].prop'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address[office].street'), - array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address[office].street.prop'), - array(self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'data.address[office][street]'), - array(self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'data.address[office][street].prop'), - array(self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address].office.street'), - array(self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address].office.street.prop'), - array(self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address].office[street]'), - array(self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address].office[street].prop'), - array(self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address][office].street'), - array(self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address][office].street.prop'), - array(self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address][office][street]'), - array(self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address][office][street].prop'), + [self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data'], + [self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data.office'], + [self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data.office.street'], + [self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data.office.street.prop'], + [self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data.office[street]'], + [self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data.office[street].prop'], + [self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data[office]'], + [self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data[office].street'], + [self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data[office].street.prop'], + [self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'children[address].data[office][street]'], + [self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'children[address].data[office][street].prop'], + [self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address.office.street'], + [self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address.office.street.prop'], + [self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address.office[street]'], + [self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address.office[street].prop'], + [self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address[office].street'], + [self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address[office].street.prop'], + [self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'data.address[office][street]'], + [self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'data.address[office][street].prop'], + [self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address].office.street'], + [self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address].office.street.prop'], + [self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address].office[street]'], + [self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address].office[street].prop'], + [self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address][office].street'], + [self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address][office].street.prop'], + [self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address][office][street]'], + [self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address][office][street].prop'], - array(self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data.office'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data.office.street'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data.office.street.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data.office[street]'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data.office[street].prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data[office]'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data[office].street'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data[office].street.prop'), - array(self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'children[address].data[office][street]'), - array(self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'children[address].data[office][street].prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address.office.street'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address.office.street.prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address.office[street]'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address.office[street].prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address[office].street'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address[office].street.prop'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address[office][street]'), - array(self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address[office][street].prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address].office.street'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address].office.street.prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address].office[street]'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address].office[street].prop'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address][office].street'), - array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address][office].street.prop'), - array(self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'data[address][office][street]'), - array(self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'data[address][office][street].prop'), + [self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data.office'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data.office.street'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data.office.street.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data.office[street]'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data.office[street].prop'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data[office]'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data[office].street'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data[office].street.prop'], + [self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'children[address].data[office][street]'], + [self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'children[address].data[office][street].prop'], + [self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address.office.street'], + [self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address.office.street.prop'], + [self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address.office[street]'], + [self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address.office[street].prop'], + [self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address[office].street'], + [self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address[office].street.prop'], + [self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address[office][street]'], + [self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address[office][street].prop'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address].office.street'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address].office.street.prop'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address].office[street]'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address].office[street].prop'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address][office].street'], + [self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address][office].street.prop'], + [self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'data[address][office][street]'], + [self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'data[address][office][street].prop'], // Edge cases which must not occur - array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address][street]'), - array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address][street].prop'), - array(self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address][street]'), - array(self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address][street].prop'), - array(self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address][street]'), - array(self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address][street].prop'), - array(self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address][street]'), - array(self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address][street].prop'), + [self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address][street]'], + [self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address][street].prop'], + [self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address][street]'], + [self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address][street].prop'], + [self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address][street]'], + [self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address][street].prop'], + [self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address][street]'], + [self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address][street].prop'], - array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'children[person].children[address].children[street]'), - array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'children[person].children[address].data.street'), - array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'children[person].data.address.street'), - array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data.address.street'), + [self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'children[person].children[address].children[street]'], + [self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'children[person].children[address].data.street'], + [self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'children[person].data.address.street'], + [self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data.address.street'], - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].children[office].children[street]'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].children[office].data.street'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data.street'), - array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address.street'), - ); + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].children[office].children[street]'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].children[office].data.street'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data.street'], + [self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address.street'], + ]; } /** @@ -797,446 +792,446 @@ class ViolationMapperTest extends TestCase $parent->add($child); $child->add($grandChild); - $parent->submit(array()); + $parent->submit([]); $this->mapper->mapViolation($violation, $parent); if (self::LEVEL_0 === $target) { - $this->assertEquals(array($this->getFormError($violation, $parent)), iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation, $parent)], iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none'); $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); } elseif (self::LEVEL_1 === $target) { $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); - $this->assertEquals(array($this->getFormError($violation, $child)), iterator_to_array($child->getErrors()), $childName.' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation, $child)], iterator_to_array($child->getErrors()), $childName.' should have an error, but has none'); $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); } else { $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); - $this->assertEquals(array($this->getFormError($violation, $grandChild)), iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation, $grandChild)], iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none'); } } public function provideCustomDataErrorTests() { - return array( + return [ // mapping target, error mapping, child name, its property path, grand child name, its property path, violation path - array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo'), - array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo.prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo]'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo].prop'), + [self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo'], + [self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo.prop'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo]'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo].prop'], - array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address'), - array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address.prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address]'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address].prop'), + [self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address'], + [self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address.prop'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address]'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address].prop'], - array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo'), - array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo.prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo]'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo].prop'), + [self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo'], + [self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo.prop'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo]'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo].prop'], - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address.prop'), - array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address]'), - array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address].prop'), + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address.prop'], + [self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address]'], + [self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address].prop'], - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo.prop'), - array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo]'), - array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo].prop'), + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo.prop'], + [self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo]'], + [self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo].prop'], - array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address'), - array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address.prop'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address]'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address].prop'), + [self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address'], + [self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address.prop'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address]'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address].prop'], - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo'), - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo.prop'), - array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo]'), - array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo].prop'), + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo'], + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo.prop'], + [self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo]'], + [self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo].prop'], - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address'), - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address.prop'), - array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address]'), - array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address].prop'), + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address'], + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address.prop'], + [self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address]'], + [self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address].prop'], - array(self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo.street'), - array(self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo.street.prop'), - array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo[street]'), - array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo[street].prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo].street'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo].street.prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo][street]'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo][street].prop'), + [self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo.street'], + [self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo.street.prop'], + [self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo[street]'], + [self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo[street].prop'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo].street'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo].street.prop'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo][street]'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo][street].prop'], - array(self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address.street'), - array(self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address.street.prop'), - array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address[street]'), - array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address[street].prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address].street'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address].street.prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address][street]'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address][street].prop'), + [self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address.street'], + [self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address.street.prop'], + [self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address[street]'], + [self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address[street].prop'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address].street'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address].street.prop'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address][street]'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address][street].prop'], - array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.foo.street'), - array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.foo.street.prop'), - array(self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.foo[street]'), - array(self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.foo[street].prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[foo].street'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[foo].street.prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[foo][street]'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[foo][street].prop'), + [self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.foo.street'], + [self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.foo.street.prop'], + [self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.foo[street]'], + [self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.foo[street].prop'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[foo].street'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[foo].street.prop'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[foo][street]'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[foo][street].prop'], - array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.address.street'), - array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.address.street.prop'), - array(self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.address[street]'), - array(self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.address[street].prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[address].street'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[address].street.prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[address][street]'), - array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[address][street].prop'), + [self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.address.street'], + [self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.address.street.prop'], + [self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.address[street]'], + [self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.address[street].prop'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[address].street'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[address].street.prop'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[address][street]'], + [self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[address][street].prop'], - array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street'), - array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street.prop'), - array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street]'), - array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street].prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street.prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street]'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street].prop'), + [self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street'], + [self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street.prop'], + [self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street]'], + [self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street].prop'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street.prop'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street]'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street].prop'], - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address.street'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address.street.prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address[street]'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address[street].prop'), - array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address].street'), - array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address].street.prop'), - array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address][street]'), - array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address][street].prop'), + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address.street'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address.street.prop'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address[street]'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address[street].prop'], + [self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address].street'], + [self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address].street.prop'], + [self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address][street]'], + [self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address][street].prop'], - array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.foo.street'), - array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.foo.street.prop'), - array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.foo[street]'), - array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.foo[street].prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[foo].street'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[foo].street.prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[foo][street]'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[foo][street].prop'), + [self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.foo.street'], + [self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.foo.street.prop'], + [self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.foo[street]'], + [self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.foo[street].prop'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[foo].street'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[foo].street.prop'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[foo][street]'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[foo][street].prop'], - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.address.street'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.address.street.prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.address[street]'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.address[street].prop'), - array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[address].street'), - array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[address].street.prop'), - array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[address][street]'), - array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[address][street].prop'), + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.address.street'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.address.street.prop'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.address[street]'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.address[street].prop'], + [self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[address].street'], + [self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[address].street.prop'], + [self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[address][street]'], + [self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[address][street].prop'], - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo.street'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo.street.prop'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo[street]'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo[street].prop'), - array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo].street'), - array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo].street.prop'), - array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo][street]'), - array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo][street].prop'), + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo.street'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo.street.prop'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo[street]'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo[street].prop'], + [self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo].street'], + [self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo].street.prop'], + [self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo][street]'], + [self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo][street].prop'], - array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address.street'), - array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address.street.prop'), - array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address[street]'), - array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address[street].prop'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address].street'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address].street.prop'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address][street]'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address][street].prop'), + [self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address.street'], + [self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address.street.prop'], + [self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address[street]'], + [self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address[street].prop'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address].street'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address].street.prop'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address][street]'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address][street].prop'], - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.street'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.street.prop'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[street]'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[street].prop'), - array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].street'), - array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].street.prop'), - array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][street]'), - array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][street].prop'), + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.street'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.street.prop'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[street]'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[street].prop'], + [self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].street'], + [self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].street.prop'], + [self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][street]'], + [self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][street].prop'], - array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.address.street'), - array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.address.street.prop'), - array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.address[street]'), - array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.address[street].prop'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[address].street'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[address].street.prop'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[address][street]'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[address][street].prop'), + [self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.address.street'], + [self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.address.street.prop'], + [self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.address[street]'], + [self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.address[street].prop'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[address].street'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[address].street.prop'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[address][street]'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[address][street].prop'], - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street'), - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street.prop'), - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street]'), - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street].prop'), - array(self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street'), - array(self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street.prop'), - array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street]'), - array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street].prop'), + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street'], + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street.prop'], + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street]'], + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street].prop'], + [self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street'], + [self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street.prop'], + [self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street]'], + [self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street].prop'], - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address.street'), - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address.street.prop'), - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address[street]'), - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address[street].prop'), - array(self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address].street'), - array(self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address].street.prop'), - array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address][street]'), - array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address][street].prop'), + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address.street'], + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address.street.prop'], + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address[street]'], + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address[street].prop'], + [self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address].street'], + [self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address].street.prop'], + [self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address][street]'], + [self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address][street].prop'], - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.foo.street'), - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.foo.street.prop'), - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.foo[street]'), - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.foo[street].prop'), - array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[foo].street'), - array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[foo].street.prop'), - array(self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[foo][street]'), - array(self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[foo][street].prop'), + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.foo.street'], + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.foo.street.prop'], + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.foo[street]'], + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.foo[street].prop'], + [self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[foo].street'], + [self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[foo].street.prop'], + [self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[foo][street]'], + [self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[foo][street].prop'], - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.address.street'), - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.address.street.prop'), - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.address[street]'), - array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.address[street].prop'), - array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[address].street'), - array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[address].street.prop'), - array(self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[address][street]'), - array(self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[address][street].prop'), + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.address.street'], + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.address.street.prop'], + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.address[street]'], + [self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.address[street].prop'], + [self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[address].street'], + [self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[address].street.prop'], + [self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[address][street]'], + [self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[address][street].prop'], - array(self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar'), - array(self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.prop'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar]'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].prop'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.prop'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar]'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].prop'), + [self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar'], + [self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.prop'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar]'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].prop'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.prop'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar]'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].prop'], - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.prop'), - array(self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar]'), - array(self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].prop'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.prop'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar]'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].prop'), + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.prop'], + [self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar]'], + [self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].prop'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.prop'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar]'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].prop'], - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.prop'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar]'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].prop'), - array(self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar'), - array(self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.prop'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar]'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].prop'), + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.prop'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar]'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].prop'], + [self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar'], + [self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.prop'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar]'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].prop'], - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.prop'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar]'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].prop'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.prop'), - array(self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar]'), - array(self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].prop'), + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.prop'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar]'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].prop'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.prop'], + [self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar]'], + [self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].prop'], - array(self::LEVEL_2, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street'), - array(self::LEVEL_2, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street.prop'), - array(self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street]'), - array(self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street].prop'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street.prop'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street]'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street].prop'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street.prop'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street]'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street].prop'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street.prop'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street]'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street].prop'), + [self::LEVEL_2, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street'], + [self::LEVEL_2, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street.prop'], + [self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street]'], + [self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street].prop'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street.prop'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street]'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street].prop'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street.prop'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street]'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street].prop'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street.prop'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street]'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street].prop'], - array(self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street'), - array(self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street.prop'), - array(self::LEVEL_2, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street]'), - array(self::LEVEL_2, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street].prop'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street.prop'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street]'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street].prop'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street.prop'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street]'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street].prop'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street.prop'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street]'), - array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street].prop'), + [self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street'], + [self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street.prop'], + [self::LEVEL_2, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street]'], + [self::LEVEL_2, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street].prop'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street.prop'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street]'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street].prop'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street.prop'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street]'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street].prop'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street.prop'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street]'], + [self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street].prop'], - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street.prop'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street]'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street].prop'), - array(self::LEVEL_2, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street'), - array(self::LEVEL_2, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street.prop'), - array(self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street]'), - array(self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street].prop'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street.prop'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street]'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street].prop'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street.prop'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street]'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street].prop'), + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street.prop'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street]'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street].prop'], + [self::LEVEL_2, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street'], + [self::LEVEL_2, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street.prop'], + [self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street]'], + [self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street].prop'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street.prop'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street]'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street].prop'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street.prop'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street]'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street].prop'], - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street.prop'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street]'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street].prop'), - array(self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street'), - array(self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street.prop'), - array(self::LEVEL_2, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street]'), - array(self::LEVEL_2, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street].prop'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street.prop'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street]'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street].prop'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street.prop'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street]'), - array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street].prop'), + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street.prop'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street]'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street].prop'], + [self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street'], + [self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street.prop'], + [self::LEVEL_2, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street]'], + [self::LEVEL_2, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street].prop'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street.prop'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street]'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street].prop'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street.prop'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street]'], + [self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street].prop'], - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street.prop'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street]'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street].prop'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street.prop'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street]'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street].prop'), - array(self::LEVEL_2, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street'), - array(self::LEVEL_2, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street.prop'), - array(self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street]'), - array(self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street].prop'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street.prop'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street]'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street].prop'), + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street.prop'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street]'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street].prop'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street.prop'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street]'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street].prop'], + [self::LEVEL_2, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street'], + [self::LEVEL_2, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street.prop'], + [self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street]'], + [self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street].prop'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street.prop'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street]'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street].prop'], - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street.prop'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street]'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street].prop'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street.prop'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street]'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street].prop'), - array(self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street'), - array(self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street.prop'), - array(self::LEVEL_2, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street]'), - array(self::LEVEL_2, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street].prop'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street.prop'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street]'), - array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street].prop'), + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street.prop'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street]'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street].prop'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street.prop'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street]'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street].prop'], + [self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street'], + [self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street.prop'], + [self::LEVEL_2, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street]'], + [self::LEVEL_2, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street].prop'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street.prop'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street]'], + [self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street].prop'], - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street.prop'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street]'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street].prop'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street.prop'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street]'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street].prop'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street.prop'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street]'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street].prop'), - array(self::LEVEL_2, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street'), - array(self::LEVEL_2, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street.prop'), - array(self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street]'), - array(self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street].prop'), + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street.prop'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street]'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street].prop'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street.prop'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street]'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street].prop'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street.prop'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street]'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street].prop'], + [self::LEVEL_2, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street'], + [self::LEVEL_2, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street.prop'], + [self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street]'], + [self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street].prop'], - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street.prop'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street]'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street].prop'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street.prop'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street]'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street].prop'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street.prop'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street]'), - array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street].prop'), - array(self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street'), - array(self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street.prop'), - array(self::LEVEL_2, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street]'), - array(self::LEVEL_2, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street].prop'), + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street.prop'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street]'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street].prop'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street.prop'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street]'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street].prop'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street.prop'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street]'], + [self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street].prop'], + [self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street'], + [self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street.prop'], + [self::LEVEL_2, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street]'], + [self::LEVEL_2, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street].prop'], - array(self::LEVEL_2, 'foo', 'address.street', 'address', 'address', 'street', 'street', 'data.foo'), - array(self::LEVEL_2, 'foo', 'address.street', 'address', 'address', 'street', 'street', 'data.foo.prop'), - array(self::LEVEL_2, '[foo]', 'address.street', 'address', 'address', 'street', 'street', 'data[foo]'), - array(self::LEVEL_2, '[foo]', 'address.street', 'address', 'address', 'street', 'street', 'data[foo].prop'), + [self::LEVEL_2, 'foo', 'address.street', 'address', 'address', 'street', 'street', 'data.foo'], + [self::LEVEL_2, 'foo', 'address.street', 'address', 'address', 'street', 'street', 'data.foo.prop'], + [self::LEVEL_2, '[foo]', 'address.street', 'address', 'address', 'street', 'street', 'data[foo]'], + [self::LEVEL_2, '[foo]', 'address.street', 'address', 'address', 'street', 'street', 'data[foo].prop'], - array(self::LEVEL_2, 'foo', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo'), - array(self::LEVEL_2, 'foo', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo.prop'), - array(self::LEVEL_2, '[foo]', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo]'), - array(self::LEVEL_2, '[foo]', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo].prop'), + [self::LEVEL_2, 'foo', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo'], + [self::LEVEL_2, 'foo', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo.prop'], + [self::LEVEL_2, '[foo]', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo]'], + [self::LEVEL_2, '[foo]', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo].prop'], - array(self::LEVEL_2, 'foo', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo'), - array(self::LEVEL_2, 'foo', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo.prop'), - array(self::LEVEL_2, '[foo]', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo]'), - array(self::LEVEL_2, '[foo]', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo].prop'), + [self::LEVEL_2, 'foo', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo'], + [self::LEVEL_2, 'foo', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo.prop'], + [self::LEVEL_2, '[foo]', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo]'], + [self::LEVEL_2, '[foo]', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo].prop'], - array(self::LEVEL_2, 'foo.bar', 'address.street', 'address', 'address', 'street', 'street', 'data.foo.bar'), - array(self::LEVEL_2, 'foo.bar', 'address.street', 'address', 'address', 'street', 'street', 'data.foo.bar.prop'), - array(self::LEVEL_2, 'foo[bar]', 'address.street', 'address', 'address', 'street', 'street', 'data.foo[bar]'), - array(self::LEVEL_2, 'foo[bar]', 'address.street', 'address', 'address', 'street', 'street', 'data.foo[bar].prop'), - array(self::LEVEL_2, '[foo].bar', 'address.street', 'address', 'address', 'street', 'street', 'data[foo].bar'), - array(self::LEVEL_2, '[foo].bar', 'address.street', 'address', 'address', 'street', 'street', 'data[foo].bar.prop'), - array(self::LEVEL_2, '[foo][bar]', 'address.street', 'address', 'address', 'street', 'street', 'data[foo][bar]'), - array(self::LEVEL_2, '[foo][bar]', 'address.street', 'address', 'address', 'street', 'street', 'data[foo][bar].prop'), + [self::LEVEL_2, 'foo.bar', 'address.street', 'address', 'address', 'street', 'street', 'data.foo.bar'], + [self::LEVEL_2, 'foo.bar', 'address.street', 'address', 'address', 'street', 'street', 'data.foo.bar.prop'], + [self::LEVEL_2, 'foo[bar]', 'address.street', 'address', 'address', 'street', 'street', 'data.foo[bar]'], + [self::LEVEL_2, 'foo[bar]', 'address.street', 'address', 'address', 'street', 'street', 'data.foo[bar].prop'], + [self::LEVEL_2, '[foo].bar', 'address.street', 'address', 'address', 'street', 'street', 'data[foo].bar'], + [self::LEVEL_2, '[foo].bar', 'address.street', 'address', 'address', 'street', 'street', 'data[foo].bar.prop'], + [self::LEVEL_2, '[foo][bar]', 'address.street', 'address', 'address', 'street', 'street', 'data[foo][bar]'], + [self::LEVEL_2, '[foo][bar]', 'address.street', 'address', 'address', 'street', 'street', 'data[foo][bar].prop'], - array(self::LEVEL_2, 'foo.bar', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo.bar'), - array(self::LEVEL_2, 'foo.bar', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo.bar.prop'), - array(self::LEVEL_2, 'foo[bar]', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo[bar]'), - array(self::LEVEL_2, 'foo[bar]', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo[bar].prop'), - array(self::LEVEL_2, '[foo].bar', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo].bar'), - array(self::LEVEL_2, '[foo].bar', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo].bar.prop'), - array(self::LEVEL_2, '[foo][bar]', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo][bar]'), - array(self::LEVEL_2, '[foo][bar]', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo][bar].prop'), + [self::LEVEL_2, 'foo.bar', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo.bar'], + [self::LEVEL_2, 'foo.bar', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo.bar.prop'], + [self::LEVEL_2, 'foo[bar]', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo[bar]'], + [self::LEVEL_2, 'foo[bar]', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo[bar].prop'], + [self::LEVEL_2, '[foo].bar', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo].bar'], + [self::LEVEL_2, '[foo].bar', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo].bar.prop'], + [self::LEVEL_2, '[foo][bar]', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo][bar]'], + [self::LEVEL_2, '[foo][bar]', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo][bar].prop'], - array(self::LEVEL_2, 'foo.bar', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo.bar'), - array(self::LEVEL_2, 'foo.bar', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo.bar.prop'), - array(self::LEVEL_2, 'foo[bar]', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo[bar]'), - array(self::LEVEL_2, 'foo[bar]', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo[bar].prop'), - array(self::LEVEL_2, '[foo].bar', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo].bar'), - array(self::LEVEL_2, '[foo].bar', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo].bar.prop'), - array(self::LEVEL_2, '[foo][bar]', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo][bar]'), - array(self::LEVEL_2, '[foo][bar]', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo][bar].prop'), + [self::LEVEL_2, 'foo.bar', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo.bar'], + [self::LEVEL_2, 'foo.bar', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo.bar.prop'], + [self::LEVEL_2, 'foo[bar]', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo[bar]'], + [self::LEVEL_2, 'foo[bar]', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo[bar].prop'], + [self::LEVEL_2, '[foo].bar', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo].bar'], + [self::LEVEL_2, '[foo].bar', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo].bar.prop'], + [self::LEVEL_2, '[foo][bar]', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo][bar]'], + [self::LEVEL_2, '[foo][bar]', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo][bar].prop'], // Edge cases - array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street'), - array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street.prop'), - array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street]'), - array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street].prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street.prop'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street]'), - array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street].prop'), + [self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street'], + [self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street.prop'], + [self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street]'], + [self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street].prop'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street.prop'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street]'], + [self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street].prop'], - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo.street'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo.street.prop'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo[street]'), - array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo[street].prop'), - array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo].street'), - array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo].street.prop'), - array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo][street]'), - array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo][street].prop'), - ); + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo.street'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo.street.prop'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo[street]'], + [self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo[street].prop'], + [self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo].street'], + [self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo].street.prop'], + [self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo][street]'], + [self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo][street].prop'], + ]; } /** @@ -1245,7 +1240,7 @@ class ViolationMapperTest extends TestCase public function testCustomDataErrorMapping($target, $mapFrom, $mapTo, $childName, $childPath, $grandChildName, $grandChildPath, $violationPath) { $violation = $this->getConstraintViolation($violationPath); - $parent = $this->getForm('parent', null, null, array($mapFrom => $mapTo)); + $parent = $this->getForm('parent', null, null, [$mapFrom => $mapTo]); $child = $this->getForm($childName, $childPath); $grandChild = $this->getForm($grandChildName, $grandChildPath); @@ -1267,7 +1262,7 @@ class ViolationMapperTest extends TestCase $parent->add($distraction); } - $parent->submit(array()); + $parent->submit([]); $this->mapper->mapViolation($violation, $parent); @@ -1276,17 +1271,17 @@ class ViolationMapperTest extends TestCase } if (self::LEVEL_0 === $target) { - $this->assertEquals(array($this->getFormError($violation, $parent)), iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation, $parent)], iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none'); $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); } elseif (self::LEVEL_1 === $target) { $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); - $this->assertEquals(array($this->getFormError($violation, $child)), iterator_to_array($child->getErrors()), $childName.' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation, $child)], iterator_to_array($child->getErrors()), $childName.' should have an error, but has none'); $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); } else { $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); - $this->assertEquals(array($this->getFormError($violation, $grandChild)), iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation, $grandChild)], iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none'); } } @@ -1298,145 +1293,145 @@ class ViolationMapperTest extends TestCase // 1) the error actually maps to an existing child and // 2) the property path of that child (relative to the form providing // the mapping) matches the left side of the mapping - return array( + return [ // mapping target, map from, map to, child name, its property path, grand child name, its property path, violation path - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].children[street].data'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].children[street].data.prop'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data.street'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data.street.prop'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data[street]'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data[street].prop'), + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].children[street].data'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].children[street].data.prop'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data.street'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data.street.prop'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data[street]'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data[street].prop'], - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street].data'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street].data.prop'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street.prop'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street]'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street].prop'), + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street].data'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street].data.prop'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street.prop'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street]'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street].prop'], // Property path of the erroneous field and mapping must match exactly - array(self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].children[street].data'), - array(self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].children[street].data.prop'), - array(self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data.street'), - array(self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data.street.prop'), - array(self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data[street]'), - array(self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data[street].prop'), + [self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].children[street].data'], + [self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].children[street].data.prop'], + [self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data.street'], + [self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data.street.prop'], + [self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data[street]'], + [self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data[street].prop'], - array(self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].children[street].data'), - array(self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].children[street].data.prop'), - array(self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data.street'), - array(self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data.street.prop'), - array(self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data[street]'), - array(self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data[street].prop'), + [self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].children[street].data'], + [self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].children[street].data.prop'], + [self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data.street'], + [self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data.street.prop'], + [self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data[street]'], + [self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data[street].prop'], - array(self::LEVEL_1, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].children[street].data'), - array(self::LEVEL_1, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].children[street].data.prop'), - array(self::LEVEL_2, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data.street'), - array(self::LEVEL_2, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data.street.prop'), - array(self::LEVEL_1, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data[street]'), - array(self::LEVEL_1, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data[street].prop'), + [self::LEVEL_1, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].children[street].data'], + [self::LEVEL_1, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].children[street].data.prop'], + [self::LEVEL_2, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data.street'], + [self::LEVEL_2, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data.street.prop'], + [self::LEVEL_1, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data[street]'], + [self::LEVEL_1, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data[street].prop'], - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].children[street].data'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].children[street].data.prop'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].data.street'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].data.street.prop'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].data[street]'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].data[street].prop'), + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].children[street].data'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].children[street].data.prop'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].data.street'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].data.street.prop'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].data[street]'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].data[street].prop'], - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street].data'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street.prop'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street]'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street].prop'), + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street].data'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street.prop'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street]'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street].prop'], - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].children[street].data'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].children[street].data.prop'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].data.street'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].data.street.prop'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].data[street]'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].data[street].prop'), + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].children[street].data'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].children[street].data.prop'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].data.street'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].data.street.prop'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].data[street]'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].data[street].prop'], - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street].data'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street].data.prop'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street.prop'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street]'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street].prop'), + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street].data'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street].data.prop'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street.prop'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street]'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street].prop'], - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].children[street].data'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].children[street].data.prop'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].data.street'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].data.street.prop'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].data[street]'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].data[street].prop'), + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].children[street].data'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].children[street].data.prop'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].data.street'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].data.street.prop'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].data[street]'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].data[street].prop'], - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street].data'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street].data.prop'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street'), - array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street.prop'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street]'), - array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street].prop'), + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street].data'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street].data.prop'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street'], + [self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street.prop'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street]'], + [self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street].prop'], // Map to a nested child - array(self::LEVEL_2, 'foo', 'address.street', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo]'), - array(self::LEVEL_2, 'foo', 'address.street', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo]'), - array(self::LEVEL_2, 'foo', 'address.street', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo]'), - array(self::LEVEL_2, 'foo', 'address.street', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo]'), + [self::LEVEL_2, 'foo', 'address.street', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo]'], + [self::LEVEL_2, 'foo', 'address.street', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo]'], + [self::LEVEL_2, 'foo', 'address.street', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo]'], + [self::LEVEL_2, 'foo', 'address.street', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo]'], // Map from a nested child - array(self::LEVEL_1B, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street]'), - array(self::LEVEL_1B, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street'), - array(self::LEVEL_1, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street]'), - array(self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street]'), - array(self::LEVEL_1B, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street'), - array(self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street]'), - array(self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street]'), - array(self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street'), - array(self::LEVEL_1, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street]'), - array(self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street]'), - array(self::LEVEL_1, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street'), - array(self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street]'), + [self::LEVEL_1B, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street]'], + [self::LEVEL_1B, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street'], + [self::LEVEL_1, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street]'], + [self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street]'], + [self::LEVEL_1B, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street'], + [self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street]'], + [self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street]'], + [self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street'], + [self::LEVEL_1, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street]'], + [self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street]'], + [self::LEVEL_1, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street'], + [self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street]'], - array(self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street]'), - array(self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street'), - array(self::LEVEL_1B, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street]'), - array(self::LEVEL_1B, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street]'), - array(self::LEVEL_1, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street'), - array(self::LEVEL_1B, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street]'), - array(self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street]'), - array(self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street'), - array(self::LEVEL_1, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street]'), - array(self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street]'), - array(self::LEVEL_1, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street'), - array(self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street]'), + [self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street]'], + [self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street'], + [self::LEVEL_1B, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street]'], + [self::LEVEL_1B, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street]'], + [self::LEVEL_1, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street'], + [self::LEVEL_1B, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street]'], + [self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street]'], + [self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street'], + [self::LEVEL_1, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street]'], + [self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street]'], + [self::LEVEL_1, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street'], + [self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street]'], - array(self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street]'), - array(self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street'), - array(self::LEVEL_1, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street]'), - array(self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street]'), - array(self::LEVEL_1, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street'), - array(self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street]'), - array(self::LEVEL_1B, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street]'), - array(self::LEVEL_1B, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street'), - array(self::LEVEL_1, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street]'), - array(self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street]'), - array(self::LEVEL_1B, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street'), - array(self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street]'), + [self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street]'], + [self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street'], + [self::LEVEL_1, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street]'], + [self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street]'], + [self::LEVEL_1, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street'], + [self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street]'], + [self::LEVEL_1B, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street]'], + [self::LEVEL_1B, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street'], + [self::LEVEL_1, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street]'], + [self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street]'], + [self::LEVEL_1B, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street'], + [self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street]'], - array(self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street]'), - array(self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street'), - array(self::LEVEL_1, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street]'), - array(self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street]'), - array(self::LEVEL_1, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street'), - array(self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street]'), - array(self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street]'), - array(self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street'), - array(self::LEVEL_1B, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street]'), - array(self::LEVEL_1B, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street]'), - array(self::LEVEL_1, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street'), - array(self::LEVEL_1B, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street]'), - ); + [self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street]'], + [self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street'], + [self::LEVEL_1, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street]'], + [self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street]'], + [self::LEVEL_1, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street'], + [self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street]'], + [self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street]'], + [self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street'], + [self::LEVEL_1B, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street]'], + [self::LEVEL_1B, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street]'], + [self::LEVEL_1, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street'], + [self::LEVEL_1B, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street]'], + ]; } /** @@ -1445,7 +1440,7 @@ class ViolationMapperTest extends TestCase public function testCustomFormErrorMapping($target, $mapFrom, $mapTo, $errorName, $errorPath, $childName, $childPath, $grandChildName, $grandChildPath, $violationPath) { $violation = $this->getConstraintViolation($violationPath); - $parent = $this->getForm('parent', null, null, array($mapFrom => $mapTo)); + $parent = $this->getForm('parent', null, null, [$mapFrom => $mapTo]); $child = $this->getForm($childName, $childPath); $grandChild = $this->getForm($grandChildName, $grandChildPath); $errorChild = $this->getForm($errorName, $errorPath); @@ -1454,22 +1449,22 @@ class ViolationMapperTest extends TestCase $parent->add($errorChild); $child->add($grandChild); - $parent->submit(array()); + $parent->submit([]); $this->mapper->mapViolation($violation, $parent); if (self::LEVEL_0 === $target) { $this->assertCount(0, $errorChild->getErrors(), $errorName.' should not have an error, but has one'); - $this->assertEquals(array($this->getFormError($violation, $parent)), iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation, $parent)], iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none'); $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); } elseif (self::LEVEL_1 === $target) { $this->assertCount(0, $errorChild->getErrors(), $errorName.' should not have an error, but has one'); $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); - $this->assertEquals(array($this->getFormError($violation, $child)), iterator_to_array($child->getErrors()), $childName.' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation, $child)], iterator_to_array($child->getErrors()), $childName.' should have an error, but has none'); $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); } elseif (self::LEVEL_1B === $target) { - $this->assertEquals(array($this->getFormError($violation, $errorChild)), iterator_to_array($errorChild->getErrors()), $errorName.' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation, $errorChild)], iterator_to_array($errorChild->getErrors()), $errorName.' should have an error, but has none'); $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); @@ -1477,33 +1472,33 @@ class ViolationMapperTest extends TestCase $this->assertCount(0, $errorChild->getErrors(), $errorName.' should not have an error, but has one'); $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); - $this->assertEquals(array($this->getFormError($violation, $grandChild)), iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation, $grandChild)], iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none'); } } public function provideErrorTestsForFormInheritingParentData() { - return array( + return [ // mapping target, child name, its property path, grand child name, its property path, violation path - array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].children[street].data'), - array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].children[street].data.prop'), - array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].data.street'), - array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].data.street.prop'), - array(self::LEVEL_1, 'address', 'address', 'street', 'street', 'children[address].data[street]'), - array(self::LEVEL_1, 'address', 'address', 'street', 'street', 'children[address].data[street].prop'), - array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'data.street'), - array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'data.street.prop'), - array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[street]'), - array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[street].prop'), - array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data.address.street'), - array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data.address.street.prop'), - array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data.address[street]'), - array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data.address[street].prop'), - array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address].street'), - array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address].street.prop'), - array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address][street]'), - array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address][street].prop'), - ); + [self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].children[street].data'], + [self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].children[street].data.prop'], + [self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].data.street'], + [self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].data.street.prop'], + [self::LEVEL_1, 'address', 'address', 'street', 'street', 'children[address].data[street]'], + [self::LEVEL_1, 'address', 'address', 'street', 'street', 'children[address].data[street].prop'], + [self::LEVEL_2, 'address', 'address', 'street', 'street', 'data.street'], + [self::LEVEL_2, 'address', 'address', 'street', 'street', 'data.street.prop'], + [self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[street]'], + [self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[street].prop'], + [self::LEVEL_0, 'address', 'address', 'street', 'street', 'data.address.street'], + [self::LEVEL_0, 'address', 'address', 'street', 'street', 'data.address.street.prop'], + [self::LEVEL_0, 'address', 'address', 'street', 'street', 'data.address[street]'], + [self::LEVEL_0, 'address', 'address', 'street', 'street', 'data.address[street].prop'], + [self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address].street'], + [self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address].street.prop'], + [self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address][street]'], + [self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address][street].prop'], + ]; } /** @@ -1513,28 +1508,28 @@ class ViolationMapperTest extends TestCase { $violation = $this->getConstraintViolation($violationPath); $parent = $this->getForm('parent'); - $child = $this->getForm($childName, $childPath, null, array(), true); + $child = $this->getForm($childName, $childPath, null, [], true); $grandChild = $this->getForm($grandChildName, $grandChildPath); $parent->add($child); $child->add($grandChild); - $parent->submit(array()); + $parent->submit([]); $this->mapper->mapViolation($violation, $parent); if (self::LEVEL_0 === $target) { - $this->assertEquals(array($this->getFormError($violation, $parent)), iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation, $parent)], iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none'); $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); } elseif (self::LEVEL_1 === $target) { $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); - $this->assertEquals(array($this->getFormError($violation, $child)), iterator_to_array($child->getErrors()), $childName.' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation, $child)], iterator_to_array($child->getErrors()), $childName.' should have an error, but has none'); $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); } else { $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); - $this->assertEquals(array($this->getFormError($violation, $grandChild)), iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation, $grandChild)], iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none'); } } @@ -1543,8 +1538,8 @@ class ViolationMapperTest extends TestCase $parent = $this->getForm('parent'); $child1 = $this->getForm('subform1', 'address'); $child2 = $this->getForm('subform2', 'address'); - $child3 = $this->getForm('subform3', null, null, array(), true); - $child4 = $this->getForm('subform4', null, null, array(), true); + $child3 = $this->getForm('subform3', null, null, [], true); + $child4 = $this->getForm('subform4', null, null, [], true); $grandChild1 = $this->getForm('street'); $grandChild2 = $this->getForm('street', '[sub_address1_street]'); $grandChild3 = $this->getForm('street', '[sub_address2_street]'); @@ -1557,7 +1552,7 @@ class ViolationMapperTest extends TestCase $child3->add($grandChild2); $child4->add($grandChild3); - $parent->submit(array()); + $parent->submit([]); $violation1 = $this->getConstraintViolation('data.address[street]'); $violation2 = $this->getConstraintViolation('data[sub_address1_street]'); @@ -1571,8 +1566,8 @@ class ViolationMapperTest extends TestCase $this->assertCount(0, $child2->getErrors(), $child2->getName().' should not have an error, but has one'); $this->assertCount(0, $child3->getErrors(), $child3->getName().' should not have an error, but has one'); $this->assertCount(0, $child4->getErrors(), $child4->getName().' should not have an error, but has one'); - $this->assertEquals(array($this->getFormError($violation1, $grandChild1)), iterator_to_array($grandChild1->getErrors()), $grandChild1->getName().' should have an error, but has none'); - $this->assertEquals(array($this->getFormError($violation2, $grandChild2)), iterator_to_array($grandChild2->getErrors()), $grandChild2->getName().' should have an error, but has none'); - $this->assertEquals(array($this->getFormError($violation3, $grandChild3)), iterator_to_array($grandChild3->getErrors()), $grandChild3->getName().' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation1, $grandChild1)], iterator_to_array($grandChild1->getErrors()), $grandChild1->getName().' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation2, $grandChild2)], iterator_to_array($grandChild2->getErrors()), $grandChild2->getName().' should have an error, but has none'); + $this->assertEquals([$this->getFormError($violation3, $grandChild3)], iterator_to_array($grandChild3->getErrors()), $grandChild3->getName().' should have an error, but has none'); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php index 2e1c9f67..7a6602d2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php @@ -21,67 +21,67 @@ class ViolationPathTest extends TestCase { public function providePaths() { - return array( - array('children[address]', array( - array('address', true, true), - )), - array('children[address].children[street]', array( - array('address', true, true), - array('street', true, true), - )), - array('children[address][street]', array( - array('address', true, true), - array('street', true, true), - ), 'children[address].children[street]'), - array('children[address].data', array( - array('address', true, true), - ), 'children[address]'), - array('children[address].data.street', array( - array('address', true, true), - array('street', false, false), - )), - array('children[address].data[street]', array( - array('address', true, true), - array('street', false, true), - )), - array('children[address].children[street].data.name', array( - array('address', true, true), - array('street', true, true), - array('name', false, false), - )), - array('children[address].children[street].data[name]', array( - array('address', true, true), - array('street', true, true), - array('name', false, true), - )), - array('data.address', array( - array('address', false, false), - )), - array('data[address]', array( - array('address', false, true), - )), - array('data.address.street', array( - array('address', false, false), - array('street', false, false), - )), - array('data[address].street', array( - array('address', false, true), - array('street', false, false), - )), - array('data.address[street]', array( - array('address', false, false), - array('street', false, true), - )), - array('data[address][street]', array( - array('address', false, true), - array('street', false, true), - )), + return [ + ['children[address]', [ + ['address', true, true], + ]], + ['children[address].children[street]', [ + ['address', true, true], + ['street', true, true], + ]], + ['children[address][street]', [ + ['address', true, true], + ['street', true, true], + ], 'children[address].children[street]'], + ['children[address].data', [ + ['address', true, true], + ], 'children[address]'], + ['children[address].data.street', [ + ['address', true, true], + ['street', false, false], + ]], + ['children[address].data[street]', [ + ['address', true, true], + ['street', false, true], + ]], + ['children[address].children[street].data.name', [ + ['address', true, true], + ['street', true, true], + ['name', false, false], + ]], + ['children[address].children[street].data[name]', [ + ['address', true, true], + ['street', true, true], + ['name', false, true], + ]], + ['data.address', [ + ['address', false, false], + ]], + ['data[address]', [ + ['address', false, true], + ]], + ['data.address.street', [ + ['address', false, false], + ['street', false, false], + ]], + ['data[address].street', [ + ['address', false, true], + ['street', false, false], + ]], + ['data.address[street]', [ + ['address', false, false], + ['street', false, true], + ]], + ['data[address][street]', [ + ['address', false, true], + ['street', false, true], + ]], // A few invalid examples - array('data', array(), ''), - array('children', array(), ''), - array('children.address', array(), ''), - array('children.address[street]', array(), ''), - ); + ['data', [], ''], + ['children', [], ''], + ['children.address', [], ''], + ['children.address[street]', [], ''], + ]; } /** @@ -109,17 +109,17 @@ class ViolationPathTest extends TestCase public function provideParents() { - return array( - array('children[address]', null), - array('children[address].children[street]', 'children[address]'), - array('children[address].data.street', 'children[address]'), - array('children[address].data[street]', 'children[address]'), - array('data.address', null), - array('data.address.street', 'data.address'), - array('data.address[street]', 'data.address'), - array('data[address].street', 'data[address]'), - array('data[address][street]', 'data[address]'), - ); + return [ + ['children[address]', null], + ['children[address].children[street]', 'children[address]'], + ['children[address].data.street', 'children[address]'], + ['children[address].data[street]', 'children[address]'], + ['data.address', null], + ['data.address.street', 'data.address'], + ['data.address[street]', 'data.address'], + ['data[address].street', 'data[address]'], + ['data[address][street]', 'data[address]'], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/AuthorType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/AuthorType.php index 504f812d..84c98898 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/AuthorType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/AuthorType.php @@ -18,8 +18,8 @@ class AuthorType extends AbstractType public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', - )); + ]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/ChoiceSubType.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/ChoiceSubType.php index dbd8843d..580e2157 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/ChoiceSubType.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/ChoiceSubType.php @@ -24,12 +24,12 @@ class ChoiceSubType extends AbstractType */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array('expanded' => true)); + $resolver->setDefaults(['expanded' => true]); $resolver->setNormalizer('choices', function () { - return array( + return [ 'attr1' => 'Attribute 1', 'attr2' => 'Attribute 2', - ); + ]; }); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/ChoiceTypeExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/ChoiceTypeExtension.php index db4166ff..766b4692 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/ChoiceTypeExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/ChoiceTypeExtension.php @@ -29,10 +29,10 @@ class ChoiceTypeExtension extends AbstractTypeExtension */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefault('choices', array( + $resolver->setDefault('choices', [ 'A' => 'a', 'B' => 'b', - )); + ]); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/CustomArrayObject.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/CustomArrayObject.php index 91b27730..00672401 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/CustomArrayObject.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/CustomArrayObject.php @@ -21,12 +21,12 @@ class CustomArrayObject implements \ArrayAccess, \IteratorAggregate, \Countable, public function __construct(array $array = null) { - $this->array = $array ?: array(); + $this->array = $array ?: []; } public function offsetExists($offset) { - return array_key_exists($offset, $this->array); + return \array_key_exists($offset, $this->array); } public function offsetGet($offset) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/default_option_with_normalizer.txt b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/default_option_with_normalizer.txt index 391c3e69..1824c46a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/default_option_with_normalizer.txt +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/default_option_with_normalizer.txt @@ -15,10 +15,9 @@ Symfony\Component\Form\Extension\Core\Type\ChoiceType (choice_translation_domain ---------------- --------------------%s Allowed values - %s ---------------- --------------------%s - Normalizer Closure%s{%w - parameters: 2 %s + Normalizer Closure%s{%A file: "%s%eExtension%eCore%eType%eChoiceType.php"%w - line: "%s to %s" %s + line: %s } %s ---------------- --------------------%s diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/overridden_option_with_default_closures.txt b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/overridden_option_with_default_closures.txt index 846d6f38..780a4e5c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/overridden_option_with_default_closures.txt +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/overridden_option_with_default_closures.txt @@ -8,15 +8,13 @@ Symfony\Component\Form\Tests\Console\Descriptor\FooType (empty_data) Default Value: null %s %s Closure(s): [ %s - Closure%s{%w - parameters: 1 %s + Closure%s{%A file: "%s%eExtension%eCore%eType%eFormType.php"%w - line: "%s to %s" %s + line: %s }, %s - Closure%s{%w - parameters: 2 %s + Closure%s{%A file: "%s%eTests%eConsole%eDescriptor%eAbstractDescriptorTest.php"%w - line: "%s to %s" %s + line: %s } %s ] %s ---------------- ----------------------%s diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/required_option_with_allowed_values.txt b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/required_option_with_allowed_values.txt index 8cc88a55..ca203a28 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/required_option_with_allowed_values.txt +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/required_option_with_allowed_values.txt @@ -16,10 +16,9 @@ Symfony\Component\Form\Tests\Console\Descriptor\FooType (foo) "baz" %s ] %s ---------------- --------------------%s - Normalizer Closure%s{%w - parameters: 2 %s + Normalizer Closure%s{%A file: "%s%eTests%eConsole%eDescriptor%eAbstractDescriptorTest.php"%w - line: "%s to %s" %s + line: %s } %s ---------------- --------------------%s diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_1.json b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_1.json index 6aba3b60..e9c1a0f4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_1.json +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_1.json @@ -29,6 +29,7 @@ "parent": { "Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType": [ "action", + "allow_file_upload", "attr", "auto_initialize", "block_name", diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_1.txt b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_1.txt index 874dede7..92759b1b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_1.txt +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_1.txt @@ -8,16 +8,17 @@ Symfony\Component\Form\Extension\Core\Type\ChoiceType (Block prefix: "choice") choice_attr FormType FormType FormTypeCsrfExtension choice_label -------------------- ------------------------- ----------------------- choice_loader compound action csrf_field_name - choice_name data_class attr csrf_message - choice_translation_domain empty_data auto_initialize csrf_protection - choice_value error_bubbling block_name csrf_token_id - choices trim by_reference csrf_token_manager - choices_as_values data - expanded disabled - group_by inherit_data - multiple label - placeholder label_attr - preferred_choices label_format + choice_name data_class allow_file_upload csrf_message + choice_translation_domain empty_data attr csrf_protection + choice_value error_bubbling auto_initialize csrf_token_id + choices trim block_name csrf_token_manager + choices_as_values by_reference + expanded data + group_by disabled + multiple inherit_data + placeholder label + preferred_choices label_attr + label_format mapped method post_max_size_message diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_2.json b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_2.json index bdefb5c9..6c18e716 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_2.json +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_2.json @@ -4,6 +4,7 @@ "options": { "own": [ "action", + "allow_file_upload", "attr", "auto_initialize", "block_name", diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_2.txt b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_2.txt index 72b13dfe..24dfb07e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_2.txt +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_2.txt @@ -6,6 +6,7 @@ Symfony\Component\Form\Extension\Core\Type\FormType (Block prefix: "form") Options ------------------------- action + allow_file_upload attr auto_initialize block_name diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FixedDataTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FixedDataTransformer.php index e768b1d7..29391160 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FixedDataTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FixedDataTransformer.php @@ -25,7 +25,7 @@ class FixedDataTransformer implements DataTransformerInterface public function transform($value) { - if (!array_key_exists($value, $this->mapping)) { + if (!\array_key_exists($value, $this->mapping)) { throw new TransformationFailedException(sprintf('No mapping for value "%s"', $value)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FixedFilterListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FixedFilterListener.php index 5a85ea8d..7ca0187c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FixedFilterListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FixedFilterListener.php @@ -21,11 +21,11 @@ class FixedFilterListener implements EventSubscriberInterface public function __construct(array $mapping) { - $this->mapping = array_merge(array( - 'preSubmit' => array(), - 'onSubmit' => array(), - 'preSetData' => array(), - ), $mapping); + $this->mapping = array_merge([ + 'preSubmit' => [], + 'onSubmit' => [], + 'preSetData' => [], + ], $mapping); } public function preSubmit(FormEvent $event) @@ -57,10 +57,10 @@ class FixedFilterListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( + return [ FormEvents::PRE_SUBMIT => 'preSubmit', FormEvents::SUBMIT => 'onSubmit', FormEvents::PRE_SET_DATA => 'preSetData', - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooTypeBarExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooTypeBarExtension.php index 8d72132f..7eda1554 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooTypeBarExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooTypeBarExtension.php @@ -23,9 +23,9 @@ class FooTypeBarExtension extends AbstractTypeExtension public function getAllowedOptionValues() { - return array( - 'a_or_b' => array('c'), - ); + return [ + 'a_or_b' => ['c'], + ]; } public function getExtendedType() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/LazyChoiceTypeExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/LazyChoiceTypeExtension.php index 133b8829..a6750182 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/LazyChoiceTypeExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/LazyChoiceTypeExtension.php @@ -31,10 +31,10 @@ class LazyChoiceTypeExtension extends AbstractTypeExtension public function configureOptions(OptionsResolver $resolver) { $resolver->setDefault('choice_loader', new CallbackChoiceLoader(function () { - return array( + return [ 'Lazy A' => 'lazy_a', 'Lazy B' => 'lazy_b', - ); + ]; })); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/TestExtension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/TestExtension.php index bdbc5a9c..6e548d61 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/TestExtension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/TestExtension.php @@ -18,9 +18,9 @@ use Symfony\Component\Form\FormTypeInterface; class TestExtension implements FormExtensionInterface { - private $types = array(); + private $types = []; - private $extensions = array(); + private $extensions = []; private $guesser; @@ -49,7 +49,7 @@ class TestExtension implements FormExtensionInterface $type = $extension->getExtendedType(); if (!isset($this->extensions[$type])) { - $this->extensions[$type] = array(); + $this->extensions[$type] = []; } $this->extensions[$type][] = $extension; @@ -57,7 +57,7 @@ class TestExtension implements FormExtensionInterface public function getTypeExtensions($name) { - return isset($this->extensions[$name]) ? $this->extensions[$name] : array(); + return isset($this->extensions[$name]) ? $this->extensions[$name] : []; } public function hasTypeExtensions($name) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormBuilderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormBuilderTest.php index 2ecd19f5..ecab2bb5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormBuilderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormBuilderTest.php @@ -68,7 +68,7 @@ class FormBuilderTest extends TestCase public function testAddIsFluent() { - $builder = $this->builder->add('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', array('bar' => 'baz')); + $builder = $this->builder->add('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', ['bar' => 'baz']); $this->assertSame($builder, $this->builder); } @@ -115,7 +115,7 @@ class FormBuilderTest extends TestCase $children = $this->builder->all(); - $this->assertSame(array('foo', 'bar', 'baz'), array_keys($children)); + $this->assertSame(['foo', 'bar', 'baz'], array_keys($children)); } public function testAddFormType() @@ -151,7 +151,7 @@ class FormBuilderTest extends TestCase { $this->factory->expects($this->once()) ->method('createNamedBuilder') - ->with('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array()) + ->with('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, []) ; $this->builder->create('foo'); @@ -181,7 +181,7 @@ class FormBuilderTest extends TestCase { $expectedType = 'Symfony\Component\Form\Extension\Core\Type\TextType'; $expectedName = 'foo'; - $expectedOptions = array('bar' => 'baz'); + $expectedOptions = ['bar' => 'baz']; $this->factory->expects($this->once()) ->method('createNamedBuilder') @@ -197,7 +197,7 @@ class FormBuilderTest extends TestCase public function testGetGuessedType() { $expectedName = 'foo'; - $expectedOptions = array('bar' => 'baz'); + $expectedOptions = ['bar' => 'baz']; $this->factory->expects($this->once()) ->method('createBuilderForProperty') diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormConfigTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormConfigTest.php index bb922bf3..db32fb1a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormConfigTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormConfigTest.php @@ -21,48 +21,48 @@ class FormConfigTest extends TestCase { public function getHtml4Ids() { - return array( - array('z0'), - array('A0'), - array('A9'), - array('Z0'), - array('#', 'Symfony\Component\Form\Exception\InvalidArgumentException'), - array('a#', 'Symfony\Component\Form\Exception\InvalidArgumentException'), - array('a$', 'Symfony\Component\Form\Exception\InvalidArgumentException'), - array('a%', 'Symfony\Component\Form\Exception\InvalidArgumentException'), - array('a ', 'Symfony\Component\Form\Exception\InvalidArgumentException'), - array("a\t", 'Symfony\Component\Form\Exception\InvalidArgumentException'), - array("a\n", 'Symfony\Component\Form\Exception\InvalidArgumentException'), - array('a-'), - array('a_'), - array('a:'), + return [ + ['z0'], + ['A0'], + ['A9'], + ['Z0'], + ['#', 'Symfony\Component\Form\Exception\InvalidArgumentException'], + ['a#', 'Symfony\Component\Form\Exception\InvalidArgumentException'], + ['a$', 'Symfony\Component\Form\Exception\InvalidArgumentException'], + ['a%', 'Symfony\Component\Form\Exception\InvalidArgumentException'], + ['a ', 'Symfony\Component\Form\Exception\InvalidArgumentException'], + ["a\t", 'Symfony\Component\Form\Exception\InvalidArgumentException'], + ["a\n", 'Symfony\Component\Form\Exception\InvalidArgumentException'], + ['a-'], + ['a_'], + ['a:'], // Periods are allowed by the HTML4 spec, but disallowed by us // because they break the generated property paths - array('a.', 'Symfony\Component\Form\Exception\InvalidArgumentException'), + ['a.', 'Symfony\Component\Form\Exception\InvalidArgumentException'], // Contrary to the HTML4 spec, we allow names starting with a // number, otherwise naming fields by collection indices is not // possible. // For root forms, leading digits will be stripped from the // "id" attribute to produce valid HTML4. - array('0'), - array('9'), + ['0'], + ['9'], // Contrary to the HTML4 spec, we allow names starting with an // underscore, since this is already a widely used practice in // Symfony. // For root forms, leading underscores will be stripped from the // "id" attribute to produce valid HTML4. - array('_'), + ['_'], // Integers are allowed - array(0), - array(123), + [0], + [123], // NULL is allowed - array(null), + [null], // Other types are not - array(1.23, 'Symfony\Component\Form\Exception\UnexpectedTypeException'), - array(5., 'Symfony\Component\Form\Exception\UnexpectedTypeException'), - array(true, 'Symfony\Component\Form\Exception\UnexpectedTypeException'), - array(new \stdClass(), 'Symfony\Component\Form\Exception\UnexpectedTypeException'), - ); + [1.23, 'Symfony\Component\Form\Exception\UnexpectedTypeException'], + [5., 'Symfony\Component\Form\Exception\UnexpectedTypeException'], + [true, 'Symfony\Component\Form\Exception\UnexpectedTypeException'], + [new \stdClass(), 'Symfony\Component\Form\Exception\UnexpectedTypeException'], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormErrorIteratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormErrorIteratorTest.php index 04eddd1c..4ed30414 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormErrorIteratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormErrorIteratorTest.php @@ -34,17 +34,17 @@ class FormErrorIteratorTest extends TestCase null, new EventDispatcher(), $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(), - array() + [] ); $form = $formBuilder->getForm(); - $cause = new ConstraintViolation('Error 1!', null, array(), null, '', null, null, 'code1'); - $form->addError(new FormError('Error 1!', null, array(), null, $cause)); - $cause = new ConstraintViolation('Error 2!', null, array(), null, '', null, null, 'code1'); - $form->addError(new FormError('Error 2!', null, array(), null, $cause)); - $cause = new ConstraintViolation('Error 3!', null, array(), null, '', null, null, 'code2'); - $form->addError(new FormError('Error 3!', null, array(), null, $cause)); + $cause = new ConstraintViolation('Error 1!', null, [], null, '', null, null, 'code1'); + $form->addError(new FormError('Error 1!', null, [], null, $cause)); + $cause = new ConstraintViolation('Error 2!', null, [], null, '', null, null, 'code1'); + $form->addError(new FormError('Error 2!', null, [], null, $cause)); + $cause = new ConstraintViolation('Error 3!', null, [], null, '', null, null, 'code2'); + $form->addError(new FormError('Error 3!', null, [], null, $cause)); $formErrors = $form->getErrors(); $specificFormErrors = $formErrors->findByCodes($code); @@ -54,10 +54,10 @@ class FormErrorIteratorTest extends TestCase public function findByCodesProvider() { - return array( - array('code1', 2), - array(array('code1', 'code2'), 3), - array('code3', 0), - ); + return [ + ['code1', 2], + [['code1', 'code2'], 3], + ['code3', 0], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormFactoryTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormFactoryTest.php index ce65e05b..27a5ca6e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormFactoryTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormFactoryTest.php @@ -58,16 +58,16 @@ class FormFactoryTest extends TestCase $this->registry->expects($this->any()) ->method('getTypeGuesser') - ->will($this->returnValue(new FormTypeGuesserChain(array( + ->will($this->returnValue(new FormTypeGuesserChain([ $this->guesser1, $this->guesser2, - )))); + ]))); } public function testCreateNamedBuilderWithTypeName() { - $options = array('a' => '1', 'b' => '2'); - $resolvedOptions = array('a' => '2', 'b' => '3'); + $options = ['a' => '1', 'b' => '2']; + $resolvedOptions = ['a' => '2', 'b' => '3']; $resolvedType = $this->getMockResolvedType(); $this->registry->expects($this->once()) @@ -93,9 +93,9 @@ class FormFactoryTest extends TestCase public function testCreateNamedBuilderFillsDataOption() { - $givenOptions = array('a' => '1', 'b' => '2'); - $expectedOptions = array_merge($givenOptions, array('data' => 'DATA')); - $resolvedOptions = array('a' => '2', 'b' => '3', 'data' => 'DATA'); + $givenOptions = ['a' => '1', 'b' => '2']; + $expectedOptions = array_merge($givenOptions, ['data' => 'DATA']); + $resolvedOptions = ['a' => '2', 'b' => '3', 'data' => 'DATA']; $resolvedType = $this->getMockResolvedType(); $this->registry->expects($this->once()) @@ -121,8 +121,8 @@ class FormFactoryTest extends TestCase public function testCreateNamedBuilderDoesNotOverrideExistingDataOption() { - $options = array('a' => '1', 'b' => '2', 'data' => 'CUSTOM'); - $resolvedOptions = array('a' => '2', 'b' => '3', 'data' => 'CUSTOM'); + $options = ['a' => '1', 'b' => '2', 'data' => 'CUSTOM']; + $resolvedOptions = ['a' => '2', 'b' => '3', 'data' => 'CUSTOM']; $resolvedType = $this->getMockResolvedType(); $this->registry->expects($this->once()) @@ -166,8 +166,8 @@ class FormFactoryTest extends TestCase public function testCreateUsesBlockPrefixIfTypeGivenAsString() { - $options = array('a' => '1', 'b' => '2'); - $resolvedOptions = array('a' => '2', 'b' => '3'); + $options = ['a' => '1', 'b' => '2']; + $resolvedOptions = ['a' => '2', 'b' => '3']; // the interface does not have the method, so use the real class $resolvedType = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormType') @@ -205,8 +205,8 @@ class FormFactoryTest extends TestCase public function testCreateNamed() { - $options = array('a' => '1', 'b' => '2'); - $resolvedOptions = array('a' => '2', 'b' => '3'); + $options = ['a' => '1', 'b' => '2']; + $resolvedOptions = ['a' => '2', 'b' => '3']; $resolvedType = $this->getMockResolvedType(); $this->registry->expects($this->once()) @@ -238,13 +238,13 @@ class FormFactoryTest extends TestCase { $registry = $this->getMockBuilder('Symfony\Component\Form\FormRegistryInterface')->getMock(); $factory = $this->getMockBuilder('Symfony\Component\Form\FormFactory') - ->setMethods(array('createNamedBuilder')) - ->setConstructorArgs(array($registry)) + ->setMethods(['createNamedBuilder']) + ->setConstructorArgs([$registry]) ->getMock(); $factory->expects($this->once()) ->method('createNamedBuilder') - ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array()) + ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, []) ->will($this->returnValue('builderInstance')); $this->builder = $factory->createBuilderForProperty('Application\Author', 'firstName'); @@ -259,7 +259,7 @@ class FormFactoryTest extends TestCase ->with('Application\Author', 'firstName') ->will($this->returnValue(new TypeGuess( 'Symfony\Component\Form\Extension\Core\Type\TextType', - array('attr' => array('maxlength' => 10)), + ['attr' => ['maxlength' => 10]], Guess::MEDIUM_CONFIDENCE ))); @@ -268,15 +268,15 @@ class FormFactoryTest extends TestCase ->with('Application\Author', 'firstName') ->will($this->returnValue(new TypeGuess( 'Symfony\Component\Form\Extension\Core\Type\PasswordType', - array('attr' => array('maxlength' => 7)), + ['attr' => ['maxlength' => 7]], Guess::HIGH_CONFIDENCE ))); - $factory = $this->getMockFactory(array('createNamedBuilder')); + $factory = $this->getMockFactory(['createNamedBuilder']); $factory->expects($this->once()) ->method('createNamedBuilder') - ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\PasswordType', null, array('attr' => array('maxlength' => 7))) + ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\PasswordType', null, ['attr' => ['maxlength' => 7]]) ->will($this->returnValue('builderInstance')); $this->builder = $factory->createBuilderForProperty('Application\Author', 'firstName'); @@ -291,7 +291,7 @@ class FormFactoryTest extends TestCase ->with('Application\Author', 'firstName') ->will($this->returnValue(null)); - $factory = $this->getMockFactory(array('createNamedBuilder')); + $factory = $this->getMockFactory(['createNamedBuilder']); $factory->expects($this->once()) ->method('createNamedBuilder') @@ -310,22 +310,22 @@ class FormFactoryTest extends TestCase ->with('Application\Author', 'firstName') ->will($this->returnValue(new TypeGuess( 'Symfony\Component\Form\Extension\Core\Type\TextType', - array('attr' => array('class' => 'foo', 'maxlength' => 10)), + ['attr' => ['class' => 'foo', 'maxlength' => 10]], Guess::MEDIUM_CONFIDENCE ))); - $factory = $this->getMockFactory(array('createNamedBuilder')); + $factory = $this->getMockFactory(['createNamedBuilder']); $factory->expects($this->once()) ->method('createNamedBuilder') - ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array('attr' => array('class' => 'foo', 'maxlength' => 11))) + ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, ['attr' => ['class' => 'foo', 'maxlength' => 11]]) ->will($this->returnValue('builderInstance')); $this->builder = $factory->createBuilderForProperty( 'Application\Author', 'firstName', null, - array('attr' => array('maxlength' => 11)) + ['attr' => ['maxlength' => 11]] ); $this->assertEquals('builderInstance', $this->builder); @@ -349,11 +349,11 @@ class FormFactoryTest extends TestCase Guess::HIGH_CONFIDENCE ))); - $factory = $this->getMockFactory(array('createNamedBuilder')); + $factory = $this->getMockFactory(['createNamedBuilder']); $factory->expects($this->once()) ->method('createNamedBuilder') - ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array('attr' => array('maxlength' => 20))) + ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, ['attr' => ['maxlength' => 20]]) ->will($this->returnValue('builderInstance')); $this->builder = $factory->createBuilderForProperty( @@ -382,18 +382,18 @@ class FormFactoryTest extends TestCase Guess::HIGH_CONFIDENCE ))); - $factory = $this->getMockFactory(array('createNamedBuilder')); + $factory = $this->getMockFactory(['createNamedBuilder']); $factory->expects($this->once()) ->method('createNamedBuilder') - ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array('attr' => array('maxlength' => 20, 'pattern' => '.{5,}', 'class' => 'tinymce'))) + ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, ['attr' => ['maxlength' => 20, 'pattern' => '.{5,}', 'class' => 'tinymce']]) ->will($this->returnValue('builderInstance')); $this->builder = $factory->createBuilderForProperty( 'Application\Author', 'firstName', null, - array('attr' => array('class' => 'tinymce')) + ['attr' => ['class' => 'tinymce']] ); $this->assertEquals('builderInstance', $this->builder); @@ -417,11 +417,11 @@ class FormFactoryTest extends TestCase Guess::HIGH_CONFIDENCE ))); - $factory = $this->getMockFactory(array('createNamedBuilder')); + $factory = $this->getMockFactory(['createNamedBuilder']); $factory->expects($this->once()) ->method('createNamedBuilder') - ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array('required' => false)) + ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, ['required' => false]) ->will($this->returnValue('builderInstance')); $this->builder = $factory->createBuilderForProperty( @@ -450,11 +450,11 @@ class FormFactoryTest extends TestCase Guess::HIGH_CONFIDENCE ))); - $factory = $this->getMockFactory(array('createNamedBuilder')); + $factory = $this->getMockFactory(['createNamedBuilder']); $factory->expects($this->once()) ->method('createNamedBuilder') - ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array('attr' => array('pattern' => '[a-zA-Z]'))) + ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, ['attr' => ['pattern' => '[a-zA-Z]']]) ->will($this->returnValue('builderInstance')); $this->builder = $factory->createBuilderForProperty( @@ -465,11 +465,11 @@ class FormFactoryTest extends TestCase $this->assertEquals('builderInstance', $this->builder); } - private function getMockFactory(array $methods = array()) + private function getMockFactory(array $methods = []) { return $this->getMockBuilder('Symfony\Component\Form\FormFactory') ->setMethods($methods) - ->setConstructorArgs(array($this->registry)) + ->setConstructorArgs([$this->registry]) ->getMock(); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormRegistryTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormRegistryTest.php index ca38c7a8..e4dee5da 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormRegistryTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormRegistryTest.php @@ -68,10 +68,10 @@ class FormRegistryTest extends TestCase $this->guesser2 = $this->getMockBuilder('Symfony\Component\Form\FormTypeGuesserInterface')->getMock(); $this->extension1 = new TestExtension($this->guesser1); $this->extension2 = new TestExtension($this->guesser2); - $this->registry = new FormRegistry(array( + $this->registry = new FormRegistry([ $this->extension1, $this->extension2, - ), $this->resolvedTypeFactory); + ], $this->resolvedTypeFactory); } public function testGetTypeFromExtension() @@ -123,7 +123,7 @@ class FormRegistryTest extends TestCase $type = new FooType(); $ext1 = new FooTypeBarExtension(); $ext2 = new FooTypeBazExtension(); - $resolvedType = new ResolvedFormType($type, array($ext1, $ext2)); + $resolvedType = new ResolvedFormType($type, [$ext1, $ext2]); $this->extension2->addType($type); $this->extension1->addTypeExtension($ext1); @@ -131,7 +131,7 @@ class FormRegistryTest extends TestCase $this->resolvedTypeFactory->expects($this->once()) ->method('createResolvedType') - ->with($type, array($ext1, $ext2)) + ->with($type, [$ext1, $ext2]) ->willReturn($resolvedType); $this->assertSame($resolvedType, $this->registry->getType(\get_class($type))); @@ -154,7 +154,7 @@ class FormRegistryTest extends TestCase $this->resolvedTypeFactory->expects($this->at(1)) ->method('createResolvedType') - ->with($type, array(), $parentResolvedType) + ->with($type, [], $parentResolvedType) ->willReturn($resolvedType); $this->assertSame($resolvedType, $this->registry->getType(\get_class($type))); @@ -230,12 +230,12 @@ class FormRegistryTest extends TestCase public function testGetTypeGuesser() { - $expectedGuesser = new FormTypeGuesserChain(array($this->guesser1, $this->guesser2)); + $expectedGuesser = new FormTypeGuesserChain([$this->guesser1, $this->guesser2]); $this->assertEquals($expectedGuesser, $this->registry->getTypeGuesser()); $registry = new FormRegistry( - array($this->getMockBuilder('Symfony\Component\Form\FormExtensionInterface')->getMock()), + [$this->getMockBuilder('Symfony\Component\Form\FormExtensionInterface')->getMock()], $this->resolvedTypeFactory ); @@ -244,7 +244,7 @@ class FormRegistryTest extends TestCase public function testGetExtensions() { - $expectedExtensions = array($this->extension1, $this->extension2); + $expectedExtensions = [$this->extension1, $this->extension2]; $this->assertEquals($expectedExtensions, $this->registry->getExtensions()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Guess/GuessTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Guess/GuessTest.php index 8f7e1d02..eea423bb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Guess/GuessTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Guess/GuessTest.php @@ -26,7 +26,7 @@ class GuessTest extends TestCase $guess2 = new TestGuess(Guess::LOW_CONFIDENCE); $guess3 = new TestGuess(Guess::HIGH_CONFIDENCE); - $this->assertSame($guess3, Guess::getBestGuess(array($guess1, $guess2, $guess3))); + $this->assertSame($guess3, Guess::getBestGuess([$guess1, $guess2, $guess3])); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/NativeRequestHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/NativeRequestHandlerTest.php index aba41728..25a47166 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/NativeRequestHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/NativeRequestHandlerTest.php @@ -29,22 +29,22 @@ class NativeRequestHandlerTest extends AbstractRequestHandlerTest { parent::setUp(); - $_GET = array(); - $_POST = array(); - $_FILES = array(); - $_SERVER = array( + $_GET = []; + $_POST = []; + $_FILES = []; + $_SERVER = [ // PHPUnit needs this entry 'SCRIPT_NAME' => self::$serverBackup['SCRIPT_NAME'], - ); + ]; } protected function tearDown() { parent::tearDown(); - $_GET = array(); - $_POST = array(); - $_FILES = array(); + $_GET = []; + $_POST = []; + $_FILES = []; $_SERVER = self::$serverBackup; } @@ -53,152 +53,200 @@ class NativeRequestHandlerTest extends AbstractRequestHandlerTest */ public function testRequestShouldBeNull() { - $this->requestHandler->handleRequest($this->getMockForm('name', 'GET'), 'request'); + $this->requestHandler->handleRequest($this->createForm('name', 'GET'), 'request'); } public function testMethodOverrideHeaderTakesPrecedenceIfPost() { - $form = $this->getMockForm('param1', 'PUT'); + $form = $this->createForm('param1', 'PUT'); - $this->setRequestData('POST', array( + $this->setRequestData('POST', [ 'param1' => 'DATA', - )); + ]); $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] = 'PUT'; - $form->expects($this->once()) - ->method('submit') - ->with('DATA'); - $this->requestHandler->handleRequest($form, $this->request); + + $this->assertTrue($form->isSubmitted()); + $this->assertSame('DATA', $form->getData()); } public function testConvertEmptyUploadedFilesToNull() { - $form = $this->getMockForm('param1', 'POST', false); + $form = $this->createForm('param1', 'POST', false); - $this->setRequestData('POST', array(), array('param1' => array( + $this->setRequestData('POST', [], ['param1' => [ 'name' => '', 'type' => '', 'tmp_name' => '', 'error' => UPLOAD_ERR_NO_FILE, 'size' => 0, - ))); - - $form->expects($this->once()) - ->method('submit') - ->with($this->identicalTo(null)); + ]]); $this->requestHandler->handleRequest($form, $this->request); + + $this->assertTrue($form->isSubmitted()); + $this->assertNull($form->getData()); } public function testFixBuggyFilesArray() { - $form = $this->getMockForm('param1', 'POST', false); + $form = $this->createForm('param1', 'POST', true); + $fieldForm = $this->createBuilder('field', false, ['allow_file_upload' => true])->getForm(); + $form->add($fieldForm); - $this->setRequestData('POST', array(), array('param1' => array( - 'name' => array( + $this->setRequestData('POST', [], ['param1' => [ + 'name' => [ 'field' => 'upload.txt', - ), - 'type' => array( + ], + 'type' => [ 'field' => 'text/plain', - ), - 'tmp_name' => array( + ], + 'tmp_name' => [ 'field' => 'owfdskjasdfsa', - ), - 'error' => array( + ], + 'error' => [ 'field' => UPLOAD_ERR_OK, - ), - 'size' => array( + ], + 'size' => [ 'field' => 100, - ), - ))); - - $form->expects($this->once()) - ->method('submit') - ->with(array( - 'field' => array( - 'name' => 'upload.txt', - 'type' => 'text/plain', - 'tmp_name' => 'owfdskjasdfsa', - 'error' => UPLOAD_ERR_OK, - 'size' => 100, - ), - )); + ], + ]]); $this->requestHandler->handleRequest($form, $this->request); + + $this->assertTrue($form->isSubmitted()); + $this->assertEquals([ + 'name' => 'upload.txt', + 'type' => 'text/plain', + 'tmp_name' => 'owfdskjasdfsa', + 'error' => UPLOAD_ERR_OK, + 'size' => 100, + ], $fieldForm->getData()); } public function testFixBuggyNestedFilesArray() { - $form = $this->getMockForm('param1', 'POST'); + $form = $this->createForm('param1', 'POST', true); + $fieldForm = $this->createForm('field', null, true); + $form->add($fieldForm); + $subfieldForm = $this->createBuilder('subfield', false, ['allow_file_upload' => true])->getForm(); + $fieldForm->add($subfieldForm); - $this->setRequestData('POST', array(), array('param1' => array( - 'name' => array( - 'field' => array('subfield' => 'upload.txt'), - ), - 'type' => array( - 'field' => array('subfield' => 'text/plain'), - ), - 'tmp_name' => array( - 'field' => array('subfield' => 'owfdskjasdfsa'), - ), - 'error' => array( - 'field' => array('subfield' => UPLOAD_ERR_OK), - ), - 'size' => array( - 'field' => array('subfield' => 100), - ), - ))); - - $form->expects($this->once()) - ->method('submit') - ->with(array( - 'field' => array( - 'subfield' => array( - 'name' => 'upload.txt', - 'type' => 'text/plain', - 'tmp_name' => 'owfdskjasdfsa', - 'error' => UPLOAD_ERR_OK, - 'size' => 100, - ), - ), - )); + $this->setRequestData('POST', [], ['param1' => [ + 'name' => [ + 'field' => ['subfield' => 'upload.txt'], + ], + 'type' => [ + 'field' => ['subfield' => 'text/plain'], + ], + 'tmp_name' => [ + 'field' => ['subfield' => 'owfdskjasdfsa'], + ], + 'error' => [ + 'field' => ['subfield' => UPLOAD_ERR_OK], + ], + 'size' => [ + 'field' => ['subfield' => 100], + ], + ]]); $this->requestHandler->handleRequest($form, $this->request); + + $this->assertTrue($subfieldForm->isSubmitted()); + $this->assertEquals([ + 'name' => 'upload.txt', + 'type' => 'text/plain', + 'tmp_name' => 'owfdskjasdfsa', + 'error' => UPLOAD_ERR_OK, + 'size' => 100, + ], $subfieldForm->getData()); } public function testMethodOverrideHeaderIgnoredIfNotPost() { - $form = $this->getMockForm('param1', 'POST'); + $form = $this->createForm('param1', 'POST'); - $this->setRequestData('GET', array( + $this->setRequestData('GET', [ 'param1' => 'DATA', - )); + ]); $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] = 'PUT'; - $form->expects($this->never()) - ->method('submit'); - $this->requestHandler->handleRequest($form, $this->request); + + $this->assertFalse($form->isSubmitted()); } - protected function setRequestData($method, $data, $files = array()) + public function testFormIgnoresMethodFieldIfRequestMethodIsMatched() + { + $form = $this->createForm('foo', 'PUT', true); + $form->add($this->createForm('bar')); + + $this->setRequestData('PUT', [ + 'foo' => [ + '_method' => 'PUT', + 'bar' => 'baz', + ], + ]); + + $this->requestHandler->handleRequest($form, $this->request); + + $this->assertSame([], $form->getExtraData()); + } + + public function testFormDoesNotIgnoreMethodFieldIfRequestMethodIsNotMatched() + { + $form = $this->createForm('foo', 'PUT', true); + $form->add($this->createForm('bar')); + + $this->setRequestData('PUT', [ + 'foo' => [ + '_method' => 'DELETE', + 'bar' => 'baz', + ], + ]); + + $this->requestHandler->handleRequest($form, $this->request); + + $this->assertSame(['_method' => 'DELETE'], $form->getExtraData()); + } + + public function testMethodSubFormIsSubmitted() + { + $form = $this->createForm('foo', 'PUT', true); + $form->add($this->createForm('_method')); + $form->add($this->createForm('bar')); + + $this->setRequestData('PUT', [ + 'foo' => [ + '_method' => 'PUT', + 'bar' => 'baz', + ], + ]); + + $this->requestHandler->handleRequest($form, $this->request); + + $this->assertTrue($form->get('_method')->isSubmitted()); + $this->assertSame('PUT', $form->get('_method')->getData()); + } + + protected function setRequestData($method, $data, $files = []) { if ('GET' === $method) { $_GET = $data; - $_FILES = array(); + $_FILES = []; } else { $_POST = $data; $_FILES = $files; } - $_SERVER = array( + $_SERVER = [ 'REQUEST_METHOD' => $method, // PHPUnit needs this entry 'SCRIPT_NAME' => self::$serverBackup['SCRIPT_NAME'], - ); + ]; } protected function getRequestHandler() @@ -206,25 +254,25 @@ class NativeRequestHandlerTest extends AbstractRequestHandlerTest return new NativeRequestHandler($this->serverParams); } - protected function getMockFile($suffix = '') + protected function getUploadedFile($suffix = '') { - return array( + return [ 'name' => 'upload'.$suffix.'.txt', 'type' => 'text/plain', 'tmp_name' => 'owfdskjasdfsa'.$suffix, 'error' => UPLOAD_ERR_OK, 'size' => 100, - ); + ]; } protected function getInvalidFile() { - return array( + return [ 'name' => 'upload.txt', 'type' => 'text/plain', 'tmp_name' => 'owfdskjasdfsa', 'error' => '0', 'size' => '100', - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php index ca9ec142..32bb8bb7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php @@ -12,7 +12,8 @@ namespace Symfony\Component\Form\Tests; use PHPUnit\Framework\TestCase; -use Symfony\Component\Form\FormBuilder; +use Symfony\Component\Form\Form; +use Symfony\Component\Form\FormConfigInterface; use Symfony\Component\Form\FormTypeExtensionInterface; use Symfony\Component\Form\FormTypeInterface; use Symfony\Component\Form\ResolvedFormType; @@ -78,7 +79,7 @@ class ResolvedFormTypeTest extends TestCase $this->extension1 = $this->getMockFormTypeExtension(); $this->extension2 = $this->getMockFormTypeExtension(); $this->parentResolvedType = new ResolvedFormType($this->parentType); - $this->resolvedType = new ResolvedFormType($this->type, array($this->extension1, $this->extension2), $this->parentResolvedType); + $this->resolvedType = new ResolvedFormType($this->type, [$this->extension1, $this->extension2], $this->parentResolvedType); } public function testGetOptionsResolver() @@ -91,7 +92,7 @@ class ResolvedFormTypeTest extends TestCase ++$i; - $resolver->setDefaults(array($option => $default)); + $resolver->setDefaults([$option => $default]); }; }; @@ -114,8 +115,8 @@ class ResolvedFormTypeTest extends TestCase ->method('configureOptions') ->will($this->returnCallback($assertIndexAndAddOption(3, 'd', 'd_default'))); - $givenOptions = array('a' => 'a_custom', 'c' => 'c_custom'); - $resolvedOptions = array('a' => 'a_custom', 'b' => 'b_default', 'c' => 'c_custom', 'd' => 'd_default'); + $givenOptions = ['a' => 'a_custom', 'c' => 'c_custom']; + $resolvedOptions = ['a' => 'a_custom', 'b' => 'b_default', 'c' => 'c_custom', 'd' => 'd_default']; $resolver = $this->resolvedType->getOptionsResolver(); @@ -124,13 +125,13 @@ class ResolvedFormTypeTest extends TestCase public function testCreateBuilder() { - $givenOptions = array('a' => 'a_custom', 'c' => 'c_custom'); - $resolvedOptions = array('a' => 'a_custom', 'b' => 'b_default', 'c' => 'c_custom', 'd' => 'd_default'); + $givenOptions = ['a' => 'a_custom', 'c' => 'c_custom']; + $resolvedOptions = ['a' => 'a_custom', 'b' => 'b_default', 'c' => 'c_custom', 'd' => 'd_default']; $optionsResolver = $this->getMockBuilder('Symfony\Component\OptionsResolver\OptionsResolver')->getMock(); $this->resolvedType = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormType') - ->setConstructorArgs(array($this->type, array($this->extension1, $this->extension2), $this->parentResolvedType)) - ->setMethods(array('getOptionsResolver')) + ->setConstructorArgs([$this->type, [$this->extension1, $this->extension2], $this->parentResolvedType]) + ->setMethods(['getOptionsResolver']) ->getMock(); $this->resolvedType->expects($this->once()) @@ -152,13 +153,13 @@ class ResolvedFormTypeTest extends TestCase public function testCreateBuilderWithDataClassOption() { - $givenOptions = array('data_class' => 'Foo'); - $resolvedOptions = array('data_class' => '\stdClass'); + $givenOptions = ['data_class' => 'Foo']; + $resolvedOptions = ['data_class' => '\stdClass']; $optionsResolver = $this->getMockBuilder('Symfony\Component\OptionsResolver\OptionsResolver')->getMock(); $this->resolvedType = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormType') - ->setConstructorArgs(array($this->type, array($this->extension1, $this->extension2), $this->parentResolvedType)) - ->setMethods(array('getOptionsResolver')) + ->setConstructorArgs([$this->type, [$this->extension1, $this->extension2], $this->parentResolvedType]) + ->setMethods(['getOptionsResolver']) ->getMock(); $this->resolvedType->expects($this->once()) @@ -190,7 +191,7 @@ class ResolvedFormTypeTest extends TestCase }; }; - $options = array('a' => 'Foo', 'b' => 'Bar'); + $options = ['a' => 'Foo', 'b' => 'Bar']; $builder = $this->getMockBuilder('Symfony\Component\Form\Test\FormBuilderInterface')->getMock(); // First the form is built for the super type @@ -221,7 +222,7 @@ class ResolvedFormTypeTest extends TestCase public function testCreateView() { - $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $form = new Form($this->getMockBuilder(FormConfigInterface::class)->getMock()); $view = $this->resolvedType->createView($form); @@ -231,7 +232,7 @@ class ResolvedFormTypeTest extends TestCase public function testCreateViewWithParent() { - $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $form = new Form($this->getMockBuilder(FormConfigInterface::class)->getMock()); $parentView = $this->getMockBuilder('Symfony\Component\Form\FormView')->getMock(); $view = $this->resolvedType->createView($form, $parentView); @@ -242,8 +243,8 @@ class ResolvedFormTypeTest extends TestCase public function testBuildView() { - $options = array('a' => '1', 'b' => '2'); - $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $options = ['a' => '1', 'b' => '2']; + $form = new Form($this->getMockBuilder(FormConfigInterface::class)->getMock()); $view = $this->getMockBuilder('Symfony\Component\Form\FormView')->getMock(); $i = 0; @@ -284,8 +285,8 @@ class ResolvedFormTypeTest extends TestCase public function testFinishView() { - $options = array('a' => '1', 'b' => '2'); - $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $options = ['a' => '1', 'b' => '2']; + $form = new Form($this->getMockBuilder(FormConfigInterface::class)->getMock()); $view = $this->getMockBuilder('Symfony\Component\Form\FormView')->getMock(); $i = 0; @@ -347,14 +348,14 @@ class ResolvedFormTypeTest extends TestCase public function provideTypeClassBlockPrefixTuples() { - return array( - array(__NAMESPACE__.'\Fixtures\FooType', 'foo'), - array(__NAMESPACE__.'\Fixtures\Foo', 'foo'), - array(__NAMESPACE__.'\Fixtures\Type', 'type'), - array(__NAMESPACE__.'\Fixtures\FooBarHTMLType', 'foo_bar_html'), - array(__NAMESPACE__.'\Fixtures\Foo1Bar2Type', 'foo1_bar2'), - array(__NAMESPACE__.'\Fixtures\FBooType', 'f_boo'), - ); + return [ + [__NAMESPACE__.'\Fixtures\FooType', 'foo'], + [__NAMESPACE__.'\Fixtures\Foo', 'foo'], + [__NAMESPACE__.'\Fixtures\Type', 'type'], + [__NAMESPACE__.'\Fixtures\FooBarHTMLType', 'foo_bar_html'], + [__NAMESPACE__.'\Fixtures\Foo1Bar2Type', 'foo1_bar2'], + [__NAMESPACE__.'\Fixtures\FBooType', 'f_boo'], + ]; } /** @@ -362,7 +363,7 @@ class ResolvedFormTypeTest extends TestCase */ private function getMockFormType($typeClass = 'Symfony\Component\Form\AbstractType') { - return $this->getMockBuilder($typeClass)->setMethods(array('getBlockPrefix', 'configureOptions', 'finishView', 'buildView', 'buildForm'))->getMock(); + return $this->getMockBuilder($typeClass)->setMethods(['getBlockPrefix', 'configureOptions', 'finishView', 'buildView', 'buildForm'])->getMock(); } /** @@ -370,7 +371,7 @@ class ResolvedFormTypeTest extends TestCase */ private function getMockFormTypeExtension() { - return $this->getMockBuilder('Symfony\Component\Form\AbstractTypeExtension')->setMethods(array('getExtendedType', 'configureOptions', 'finishView', 'buildView', 'buildForm'))->getMock(); + return $this->getMockBuilder('Symfony\Component\Form\AbstractTypeExtension')->setMethods(['getExtendedType', 'configureOptions', 'finishView', 'buildView', 'buildForm'])->getMock(); } /** @@ -380,15 +381,4 @@ class ResolvedFormTypeTest extends TestCase { return $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); } - - /** - * @param string $name - * @param array $options - * - * @return FormBuilder - */ - protected function getBuilder($name = 'name', array $options = array()) - { - return new FormBuilder($name, null, $this->dispatcher, $this->factory, $options); - } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/SimpleFormTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/SimpleFormTest.php index 30d8b792..214ff3be 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/SimpleFormTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/SimpleFormTest.php @@ -43,7 +43,7 @@ class SimpleFormTest_Traversable implements \IteratorAggregate public function __construct($count) { - $this->iterator = new \ArrayIterator($count > 0 ? array_fill(0, $count, 'Foo') : array()); + $this->iterator = new \ArrayIterator($count > 0 ? array_fill(0, $count, 'Foo') : []); } public function getIterator() @@ -56,12 +56,12 @@ class SimpleFormTest extends AbstractFormTest { public function testDataIsInitializedToConfiguredValue() { - $model = new FixedDataTransformer(array( + $model = new FixedDataTransformer([ 'default' => 'foo', - )); - $view = new FixedDataTransformer(array( + ]); + $view = new FixedDataTransformer([ 'foo' => 'bar', - )); + ]); $config = new FormConfigBuilder('name', null, $this->dispatcher); $config->addViewTransformer($view); @@ -80,12 +80,12 @@ class SimpleFormTest extends AbstractFormTest */ public function testDataTransformationFailure() { - $model = new FixedDataTransformer(array( + $model = new FixedDataTransformer([ 'default' => 'foo', - )); - $view = new FixedDataTransformer(array( + ]); + $view = new FixedDataTransformer([ 'foo' => 'bar', - )); + ]); $config = new FormConfigBuilder('name', null, $this->dispatcher); $config->addViewTransformer($view); @@ -100,7 +100,7 @@ class SimpleFormTest extends AbstractFormTest public function testDataIsInitializedFromSubmit() { $mock = $this->getMockBuilder('\stdClass') - ->setMethods(array('preSetData', 'preSubmit')) + ->setMethods(['preSetData', 'preSubmit']) ->getMock(); $mock->expects($this->at(0)) ->method('preSetData'); @@ -108,8 +108,8 @@ class SimpleFormTest extends AbstractFormTest ->method('preSubmit'); $config = new FormConfigBuilder('name', null, $this->dispatcher); - $config->addEventListener(FormEvents::PRE_SET_DATA, array($mock, 'preSetData')); - $config->addEventListener(FormEvents::PRE_SUBMIT, array($mock, 'preSubmit')); + $config->addEventListener(FormEvents::PRE_SET_DATA, [$mock, 'preSetData']); + $config->addEventListener(FormEvents::PRE_SUBMIT, [$mock, 'preSubmit']); $form = new Form($config); // no call to setData() or similar where the object would be @@ -122,7 +122,7 @@ class SimpleFormTest extends AbstractFormTest public function testFalseIsConvertedToNull() { $mock = $this->getMockBuilder('\stdClass') - ->setMethods(array('preSubmit')) + ->setMethods(['preSubmit']) ->getMock(); $mock->expects($this->once()) ->method('preSubmit') @@ -131,7 +131,7 @@ class SimpleFormTest extends AbstractFormTest })); $config = new FormConfigBuilder('name', null, $this->dispatcher); - $config->addEventListener(FormEvents::PRE_SUBMIT, array($mock, 'preSubmit')); + $config->addEventListener(FormEvents::PRE_SUBMIT, [$mock, 'preSubmit']); $form = new Form($config); $form->submit(false); @@ -145,8 +145,8 @@ class SimpleFormTest extends AbstractFormTest */ public function testSubmitThrowsExceptionIfAlreadySubmitted() { - $this->form->submit(array()); - $this->form->submit(array()); + $this->form->submit([]); + $this->form->submit([]); } public function testSubmitIsIgnoredIfDisabled() @@ -207,25 +207,25 @@ class SimpleFormTest extends AbstractFormTest public function getDisabledStates() { - return array( + return [ // parent, button, result - array(true, true, true), - array(true, false, true), - array(false, true, true), - array(false, false, false), - ); + [true, true, true], + [true, false, true], + [false, true, true], + [false, false, false], + ]; } public function testGetRootReturnsRootOfParent() { - $parent = $this->getMockForm(); - $parent->expects($this->once()) - ->method('getRoot') - ->will($this->returnValue('ROOT')); + $root = $this->createForm(); + + $parent = $this->createForm(); + $parent->setParent($root); $this->form->setParent($parent); - $this->assertEquals('ROOT', $this->form->getRoot()); + $this->assertSame($root, $this->form->getRoot()); } public function testGetRootReturnsSelfIfNoParent() @@ -235,7 +235,7 @@ class SimpleFormTest extends AbstractFormTest public function testEmptyIfEmptyArray() { - $this->form->setData(array()); + $this->form->setData([]); $this->assertTrue($this->form->isEmpty()); } @@ -348,7 +348,7 @@ class SimpleFormTest extends AbstractFormTest */ public function testSetParentThrowsExceptionIfAlreadySubmitted() { - $this->form->submit(array()); + $this->form->submit([]); $this->form->setParent($this->getBuilder('parent')->getForm()); } @@ -370,7 +370,7 @@ class SimpleFormTest extends AbstractFormTest */ public function testSetDataThrowsExceptionIfAlreadySubmitted() { - $this->form->submit(array()); + $this->form->submit([]); $this->form->setData(null); } @@ -397,19 +397,19 @@ class SimpleFormTest extends AbstractFormTest { // use real event dispatcher now $form = $this->getBuilder('name', new EventDispatcher()) - ->addEventSubscriber(new FixedFilterListener(array( - 'preSetData' => array( + ->addEventSubscriber(new FixedFilterListener([ + 'preSetData' => [ 'app' => 'filtered', - ), - ))) - ->addModelTransformer(new FixedDataTransformer(array( + ], + ])) + ->addModelTransformer(new FixedDataTransformer([ '' => '', 'filtered' => 'norm', - ))) - ->addViewTransformer(new FixedDataTransformer(array( + ])) + ->addViewTransformer(new FixedDataTransformer([ '' => '', 'norm' => 'client', - ))) + ])) ->getForm(); $form->setData('app'); @@ -422,14 +422,14 @@ class SimpleFormTest extends AbstractFormTest public function testSetDataExecutesViewTransformersInOrder() { $form = $this->getBuilder() - ->addViewTransformer(new FixedDataTransformer(array( + ->addViewTransformer(new FixedDataTransformer([ '' => '', 'first' => 'second', - ))) - ->addViewTransformer(new FixedDataTransformer(array( + ])) + ->addViewTransformer(new FixedDataTransformer([ '' => '', 'second' => 'third', - ))) + ])) ->getForm(); $form->setData('first'); @@ -440,14 +440,14 @@ class SimpleFormTest extends AbstractFormTest public function testSetDataExecutesModelTransformersInReverseOrder() { $form = $this->getBuilder() - ->addModelTransformer(new FixedDataTransformer(array( + ->addModelTransformer(new FixedDataTransformer([ '' => '', 'second' => 'third', - ))) - ->addModelTransformer(new FixedDataTransformer(array( + ])) + ->addModelTransformer(new FixedDataTransformer([ '' => '', 'first' => 'second', - ))) + ])) ->getForm(); $form->setData('first'); @@ -477,10 +477,10 @@ class SimpleFormTest extends AbstractFormTest public function testSetDataConvertsScalarToStringIfOnlyModelTransformer() { $form = $this->getBuilder() - ->addModelTransformer(new FixedDataTransformer(array( + ->addModelTransformer(new FixedDataTransformer([ '' => '', 1 => 23, - ))) + ])) ->getForm(); $form->setData(1); @@ -548,25 +548,25 @@ class SimpleFormTest extends AbstractFormTest { // use real event dispatcher now $form = $this->getBuilder('name', new EventDispatcher()) - ->addEventSubscriber(new FixedFilterListener(array( - 'preSubmit' => array( + ->addEventSubscriber(new FixedFilterListener([ + 'preSubmit' => [ 'client' => 'filteredclient', - ), - 'onSubmit' => array( + ], + 'onSubmit' => [ 'norm' => 'filterednorm', - ), - ))) - ->addViewTransformer(new FixedDataTransformer(array( + ], + ])) + ->addViewTransformer(new FixedDataTransformer([ '' => '', // direction is reversed! 'norm' => 'filteredclient', 'filterednorm' => 'cleanedclient', - ))) - ->addModelTransformer(new FixedDataTransformer(array( + ])) + ->addModelTransformer(new FixedDataTransformer([ '' => '', // direction is reversed! 'app' => 'filterednorm', - ))) + ])) ->getForm(); $form->submit('client'); @@ -579,14 +579,14 @@ class SimpleFormTest extends AbstractFormTest public function testSubmitExecutesViewTransformersInReverseOrder() { $form = $this->getBuilder() - ->addViewTransformer(new FixedDataTransformer(array( + ->addViewTransformer(new FixedDataTransformer([ '' => '', 'third' => 'second', - ))) - ->addViewTransformer(new FixedDataTransformer(array( + ])) + ->addViewTransformer(new FixedDataTransformer([ '' => '', 'second' => 'first', - ))) + ])) ->getForm(); $form->submit('first'); @@ -597,14 +597,14 @@ class SimpleFormTest extends AbstractFormTest public function testSubmitExecutesModelTransformersInOrder() { $form = $this->getBuilder() - ->addModelTransformer(new FixedDataTransformer(array( + ->addModelTransformer(new FixedDataTransformer([ '' => '', 'second' => 'first', - ))) - ->addModelTransformer(new FixedDataTransformer(array( + ])) + ->addModelTransformer(new FixedDataTransformer([ '' => '', 'third' => 'second', - ))) + ])) ->getForm(); $form->submit('first'); @@ -629,7 +629,7 @@ class SimpleFormTest extends AbstractFormTest $transformer = $this->getDataTransformer(); $transformer->expects($this->once()) ->method('reverseTransform') - ->will($this->throwException(new TransformationFailedException())); + ->willThrowException(new TransformationFailedException()); $form = $this->getBuilder() ->addViewTransformer($transformer) @@ -645,7 +645,7 @@ class SimpleFormTest extends AbstractFormTest $transformer = $this->getDataTransformer(); $transformer->expects($this->once()) ->method('reverseTransform') - ->will($this->throwException(new TransformationFailedException())); + ->willThrowException(new TransformationFailedException()); $form = $this->getBuilder() ->addModelTransformer($transformer) @@ -660,11 +660,11 @@ class SimpleFormTest extends AbstractFormTest { $form = $this->getBuilder() ->setEmptyData('foo') - ->addViewTransformer(new FixedDataTransformer(array( + ->addViewTransformer(new FixedDataTransformer([ '' => '', // direction is reversed! 'bar' => 'foo', - ))) + ])) ->getForm(); $form->submit(''); @@ -682,11 +682,11 @@ class SimpleFormTest extends AbstractFormTest return 'foo'; }) - ->addViewTransformer(new FixedDataTransformer(array( + ->addViewTransformer(new FixedDataTransformer([ '' => '', // direction is reversed! 'bar' => 'foo', - ))) + ])) ->getForm(); $form->submit(''); @@ -720,12 +720,13 @@ class SimpleFormTest extends AbstractFormTest { $type = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormTypeInterface')->getMock(); $view = $this->getMockBuilder('Symfony\Component\Form\FormView')->getMock(); - $parentForm = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $parentType = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormTypeInterface')->getMock(); + $parentForm = $this->getBuilder()->setType($parentType)->getForm(); $parentView = $this->getMockBuilder('Symfony\Component\Form\FormView')->getMock(); $form = $this->getBuilder()->setType($type)->getForm(); $form->setParent($parentForm); - $parentForm->expects($this->once()) + $parentType->expects($this->once()) ->method('createView') ->will($this->returnValue($parentView)); @@ -853,10 +854,10 @@ class SimpleFormTest extends AbstractFormTest { $object = new \stdClass(); $config = new FormConfigBuilder('name', null, $this->dispatcher); - $config->addViewTransformer(new FixedDataTransformer(array( + $config->addViewTransformer(new FixedDataTransformer([ '' => '', 'foo' => $object, - ))); + ])); $form = new Form($config); $form->setData('foo'); @@ -868,10 +869,10 @@ class SimpleFormTest extends AbstractFormTest { $arrayAccess = $this->getMockBuilder('\ArrayAccess')->getMock(); $config = new FormConfigBuilder('name', null, $this->dispatcher); - $config->addViewTransformer(new FixedDataTransformer(array( + $config->addViewTransformer(new FixedDataTransformer([ '' => '', 'foo' => $arrayAccess, - ))); + ])); $form = new Form($config); $form->setData('foo'); @@ -885,10 +886,10 @@ class SimpleFormTest extends AbstractFormTest public function testViewDataMustBeObjectIfDataClassIsSet() { $config = new FormConfigBuilder('name', 'stdClass', $this->dispatcher); - $config->addViewTransformer(new FixedDataTransformer(array( + $config->addViewTransformer(new FixedDataTransformer([ '' => '', - 'foo' => array('bar' => 'baz'), - ))); + 'foo' => ['bar' => 'baz'], + ])); $form = new Form($config); $form->setData('foo'); @@ -954,12 +955,12 @@ class SimpleFormTest extends AbstractFormTest ->setCompound(true) ->setDataMapper($this->getDataMapper()) ->setData('foo') - ->addModelTransformer(new FixedDataTransformer(array( + ->addModelTransformer(new FixedDataTransformer([ 'foo' => 'norm[foo]', - ))) - ->addViewTransformer(new FixedDataTransformer(array( + ])) + ->addViewTransformer(new FixedDataTransformer([ 'norm[foo]' => 'view[foo]', - ))) + ])) ->add($child) ->getForm(); @@ -1046,7 +1047,7 @@ class SimpleFormTest extends AbstractFormTest public function testInitializeSetsDefaultData() { $config = $this->getBuilder()->setData('DEFAULT')->getFormConfig(); - $form = $this->getMockBuilder('Symfony\Component\Form\Form')->setMethods(array('setData'))->setConstructorArgs(array($config))->getMock(); + $form = $this->getMockBuilder('Symfony\Component\Form\Form')->setMethods(['setData'])->setConstructorArgs([$config])->getMock(); $form->expects($this->once()) ->method('setData') diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Util/OrderedHashMapTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Util/OrderedHashMapTest.php index 8ce3f8fc..01e76d87 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Util/OrderedHashMapTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Util/OrderedHashMapTest.php @@ -43,7 +43,7 @@ class OrderedHashMapTest extends TestCase $map['first'] = 1; $map['second'] = 2; - $this->assertSame(array('first' => 1, 'second' => 2), iterator_to_array($map)); + $this->assertSame(['first' => 1, 'second' => 2], iterator_to_array($map)); } public function testInsertNullKeys() @@ -53,7 +53,7 @@ class OrderedHashMapTest extends TestCase $map['foo'] = 2; $map[] = 3; - $this->assertSame(array(0 => 1, 'foo' => 2, 1 => 3), iterator_to_array($map)); + $this->assertSame([0 => 1, 'foo' => 2, 1 => 3], iterator_to_array($map)); } public function testInsertLooselyEqualKeys() @@ -62,7 +62,7 @@ class OrderedHashMapTest extends TestCase $map['1 as a string'] = '1 as a string'; $map[1] = 1; - $this->assertSame(array('1 as a string' => '1 as a string', 1 => 1), iterator_to_array($map)); + $this->assertSame(['1 as a string' => '1 as a string', 1 => 1], iterator_to_array($map)); } /** @@ -83,7 +83,7 @@ class OrderedHashMapTest extends TestCase $map['second'] = 2; $map['first'] = 1; - $this->assertSame(array('first' => 1, 'second' => 2), iterator_to_array($map)); + $this->assertSame(['first' => 1, 'second' => 2], iterator_to_array($map)); } public function testIsset() @@ -117,7 +117,7 @@ class OrderedHashMapTest extends TestCase unset($map['first']); - $this->assertSame(array('second' => 2), iterator_to_array($map)); + $this->assertSame(['second' => 2], iterator_to_array($map)); } public function testUnsetFromLooselyEqualKeysHashMap() @@ -128,7 +128,7 @@ class OrderedHashMapTest extends TestCase unset($map[1]); - $this->assertSame(array('1 as a string' => '1 as a string'), iterator_to_array($map)); + $this->assertSame(['1 as a string' => '1 as a string'], iterator_to_array($map)); } public function testUnsetNonExistingSucceeds() @@ -138,7 +138,7 @@ class OrderedHashMapTest extends TestCase unset($map['first']); - $this->assertSame(array('second' => 2), iterator_to_array($map)); + $this->assertSame(['second' => 2], iterator_to_array($map)); } public function testEmptyIteration() @@ -154,7 +154,7 @@ class OrderedHashMapTest extends TestCase public function testIterationSupportsInsertion() { - $map = new OrderedHashMap(array('first' => 1)); + $map = new OrderedHashMap(['first' => 1]); $it = $map->getIterator(); $it->rewind(); @@ -185,7 +185,7 @@ class OrderedHashMapTest extends TestCase public function testIterationSupportsDeletionAndInsertion() { - $map = new OrderedHashMap(array('first' => 1, 'removed' => 2)); + $map = new OrderedHashMap(['first' => 1, 'removed' => 2]); $it = $map->getIterator(); $it->rewind(); @@ -217,7 +217,7 @@ class OrderedHashMapTest extends TestCase public function testIterationSupportsDeletionOfCurrentElement() { - $map = new OrderedHashMap(array('removed' => 1, 'next' => 2)); + $map = new OrderedHashMap(['removed' => 1, 'next' => 2]); $it = $map->getIterator(); $it->rewind(); @@ -247,7 +247,7 @@ class OrderedHashMapTest extends TestCase public function testIterationIgnoresReplacementOfCurrentElement() { - $map = new OrderedHashMap(array('replaced' => 1, 'next' => 2)); + $map = new OrderedHashMap(['replaced' => 1, 'next' => 2]); $it = $map->getIterator(); $it->rewind(); @@ -277,7 +277,7 @@ class OrderedHashMapTest extends TestCase public function testIterationSupportsDeletionOfCurrentAndLastElement() { - $map = new OrderedHashMap(array('removed' => 1)); + $map = new OrderedHashMap(['removed' => 1]); $it = $map->getIterator(); $it->rewind(); @@ -301,7 +301,7 @@ class OrderedHashMapTest extends TestCase public function testIterationIgnoresReplacementOfCurrentAndLastElement() { - $map = new OrderedHashMap(array('replaced' => 1)); + $map = new OrderedHashMap(['replaced' => 1]); $it = $map->getIterator(); $it->rewind(); @@ -325,7 +325,7 @@ class OrderedHashMapTest extends TestCase public function testIterationSupportsDeletionOfPreviousElement() { - $map = new OrderedHashMap(array('removed' => 1, 'next' => 2, 'onemore' => 3)); + $map = new OrderedHashMap(['removed' => 1, 'next' => 2, 'onemore' => 3]); $it = $map->getIterator(); $it->rewind(); @@ -361,7 +361,7 @@ class OrderedHashMapTest extends TestCase public function testIterationIgnoresReplacementOfPreviousElement() { - $map = new OrderedHashMap(array('replaced' => 1, 'next' => 2, 'onemore' => 3)); + $map = new OrderedHashMap(['replaced' => 1, 'next' => 2, 'onemore' => 3]); $it = $map->getIterator(); $it->rewind(); @@ -397,7 +397,7 @@ class OrderedHashMapTest extends TestCase public function testIterationSupportsDeletionOfMultiplePreviousElements() { - $map = new OrderedHashMap(array('removed' => 1, 'alsoremoved' => 2, 'next' => 3, 'onemore' => 4)); + $map = new OrderedHashMap(['removed' => 1, 'alsoremoved' => 2, 'next' => 3, 'onemore' => 4]); $it = $map->getIterator(); $it->rewind(); @@ -439,7 +439,7 @@ class OrderedHashMapTest extends TestCase public function testParallelIteration() { - $map = new OrderedHashMap(array('first' => 1, 'second' => 2)); + $map = new OrderedHashMap(['first' => 1, 'second' => 2]); $it1 = $map->getIterator(); $it2 = $map->getIterator(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php index 86c68ba3..755b842e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php @@ -42,38 +42,38 @@ class StringUtilTest extends TestCase public function spaceProvider() { - return array( + return [ // separators - array('0020'), - array('00A0'), - array('1680'), -// array('180E'), - array('2000'), - array('2001'), - array('2002'), - array('2003'), - array('2004'), - array('2005'), - array('2006'), - array('2007'), - array('2008'), - array('2009'), - array('200A'), - array('2028'), - array('2029'), - array('202F'), - array('205F'), - array('3000'), + ['0020'], + ['00A0'], + ['1680'], +// ['180E'], + ['2000'], + ['2001'], + ['2002'], + ['2003'], + ['2004'], + ['2005'], + ['2006'], + ['2007'], + ['2008'], + ['2009'], + ['200A'], + ['2028'], + ['2029'], + ['202F'], + ['205F'], + ['3000'], // controls - array('0009'), - array('000A'), - array('000B'), - array('000C'), - array('000D'), - array('0085'), + ['0009'], + ['000A'], + ['000B'], + ['000C'], + ['000D'], + ['0085'], // zero width space -// array('200B'), - ); +// ['200B'], + ]; } /** @@ -88,18 +88,18 @@ class StringUtilTest extends TestCase public function fqcnToBlockPrefixProvider() { - return array( - array('TYPE', 'type'), - array('\Type', 'type'), - array('\UserType', 'user'), - array('UserType', 'user'), - array('Vendor\Name\Space\Type', 'type'), - array('Vendor\Name\Space\UserForm', 'user_form'), - array('Vendor\Name\Space\UserType', 'user'), - array('Vendor\Name\Space\usertype', 'user'), - array('Symfony\Component\Form\Form', 'form'), - array('Vendor\Name\Space\BarTypeBazType', 'bar_type_baz'), - array('FooBarBazType', 'foo_bar_baz'), - ); + return [ + ['TYPE', 'type'], + ['\Type', 'type'], + ['\UserType', 'user'], + ['UserType', 'user'], + ['Vendor\Name\Space\Type', 'type'], + ['Vendor\Name\Space\UserForm', 'user_form'], + ['Vendor\Name\Space\UserType', 'user'], + ['Vendor\Name\Space\usertype', 'user'], + ['Symfony\Component\Form\Form', 'form'], + ['Vendor\Name\Space\BarTypeBazType', 'bar_type_baz'], + ['FooBarBazType', 'foo_bar_baz'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/FormUtil.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/FormUtil.php index 53053f9d..fed96de4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/FormUtil.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/FormUtil.php @@ -36,7 +36,7 @@ class FormUtil */ public static function isEmpty($data) { - // Should not do a check for array() === $data!!! + // Should not do a check for [] === $data!!! // This method is used in occurrences where arrays are // not considered to be empty, ever. return null === $data || '' === $data; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OptionsResolverWrapper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OptionsResolverWrapper.php index 94a4fc11..a7c26475 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OptionsResolverWrapper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OptionsResolverWrapper.php @@ -22,7 +22,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; */ class OptionsResolverWrapper extends OptionsResolver { - private $undefined = array(); + private $undefined = []; public function setNormalizer($option, \Closure $normalizer) { @@ -79,7 +79,7 @@ class OptionsResolverWrapper extends OptionsResolver return $this; } - public function resolve(array $options = array()) + public function resolve(array $options = []) { throw new AccessException('Resolve options is not supported.'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OrderedHashMap.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OrderedHashMap.php index 26e45a46..19ec4fc7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OrderedHashMap.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OrderedHashMap.php @@ -71,28 +71,28 @@ class OrderedHashMap implements \ArrayAccess, \IteratorAggregate, \Countable * * @var array */ - private $elements = array(); + private $elements = []; /** * The keys of the map in the order in which they were inserted or changed. * * @var array */ - private $orderedKeys = array(); + private $orderedKeys = []; /** * References to the cursors of all open iterators. * * @var array */ - private $managedCursors = array(); + private $managedCursors = []; /** * Creates a new map. * * @param array $elements The elements to insert initially */ - public function __construct(array $elements = array()) + public function __construct(array $elements = []) { $this->elements = $elements; $this->orderedKeys = array_keys($elements); @@ -125,7 +125,7 @@ class OrderedHashMap implements \ArrayAccess, \IteratorAggregate, \Countable { if (null === $key || !isset($this->elements[$key])) { if (null === $key) { - $key = array() === $this->orderedKeys + $key = [] === $this->orderedKeys // If the array is empty, use 0 as key ? 0 // Imitate PHP behavior of generating a key that equals diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php index 93a7caa5..c34bf2e3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php @@ -120,7 +120,7 @@ class OrderedHashMapIterator implements \Iterator return null; } - $array = array($this->key => null); + $array = [$this->key => null]; return key($array); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/StringUtil.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/StringUtil.php index ee71ae7a..241a6681 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/StringUtil.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Form/Util/StringUtil.php @@ -51,7 +51,7 @@ class StringUtil { // Non-greedy ("+?") to match "type" suffix, if present if (preg_match('~([^\\\\]+?)(type)?$~i', $fqcn, $matches)) { - return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), $matches[1])); + return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], $matches[1])); } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/AcceptHeader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/AcceptHeader.php index d1740266..968b71f5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/AcceptHeader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/AcceptHeader.php @@ -24,7 +24,7 @@ class AcceptHeader /** * @var AcceptHeaderItem[] */ - private $items = array(); + private $items = []; /** * @var bool diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/AcceptHeaderItem.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/AcceptHeaderItem.php index c9506574..f6e89687 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/AcceptHeaderItem.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/AcceptHeaderItem.php @@ -21,13 +21,13 @@ class AcceptHeaderItem private $value; private $quality = 1.0; private $index = 0; - private $attributes = array(); + private $attributes = []; /** * @param string $value * @param array $attributes */ - public function __construct($value, array $attributes = array()) + public function __construct($value, array $attributes = []) { $this->value = $value; foreach ($attributes as $name => $value) { @@ -46,7 +46,7 @@ class AcceptHeaderItem { $bits = preg_split('/\s*(?:;*("[^"]+");*|;*(\'[^\']+\');*|;+)\s*/', $itemValue, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); $value = array_shift($bits); - $attributes = array(); + $attributes = []; $lastNullAttribute = null; foreach ($bits as $bit) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php index 97023278..cf648dfe 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php @@ -44,7 +44,7 @@ class BinaryFileResponse extends Response * @param bool $autoEtag Whether the ETag header should be automatically set * @param bool $autoLastModified Whether the Last-Modified header should be automatically set */ - public function __construct($file, $status = 200, $headers = array(), $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true) + public function __construct($file, $status = 200, $headers = [], $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true) { parent::__construct(null, $status, $headers); @@ -66,7 +66,7 @@ class BinaryFileResponse extends Response * * @return static */ - public static function create($file = null, $status = 200, $headers = array(), $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true) + public static function create($file = null, $status = 200, $headers = [], $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true) { return new static($file, $status, $headers, $public, $contentDisposition, $autoEtag, $autoLastModified); } @@ -239,7 +239,7 @@ class BinaryFileResponse extends Response if (!$request->headers->has('If-Range') || $this->hasValidIfRangeHeader($request->headers->get('If-Range'))) { $range = $request->headers->get('Range'); - list($start, $end) = explode('-', substr($range, 6), 2) + array(0); + list($start, $end) = explode('-', substr($range, 6), 2) + [0]; $end = ('' === $end) ? $fileSize - 1 : (int) $end; @@ -305,7 +305,7 @@ class BinaryFileResponse extends Response fclose($out); fclose($file); - if ($this->deleteFileAfterSend) { + if ($this->deleteFileAfterSend && file_exists($this->file->getPathname())) { unlink($this->file->getPathname()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Cookie.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Cookie.php index c38aa409..e61619aa 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Cookie.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Cookie.php @@ -41,7 +41,7 @@ class Cookie */ public static function fromString($cookie, $decode = false) { - $data = array( + $data = [ 'expires' => 0, 'path' => '/', 'domain' => null, @@ -49,7 +49,7 @@ class Cookie 'httponly' => false, 'raw' => !$decode, 'samesite' => null, - ); + ]; foreach (explode(';', $cookie) as $part) { if (false === strpos($part, '=')) { $key = trim($part); @@ -128,7 +128,7 @@ class Cookie $sameSite = strtolower($sameSite); } - if (!\in_array($sameSite, array(self::SAMESITE_LAX, self::SAMESITE_STRICT, null), true)) { + if (!\in_array($sameSite, [self::SAMESITE_LAX, self::SAMESITE_STRICT, null], true)) { throw new \InvalidArgumentException('The "sameSite" parameter value is not valid.'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ExpressionRequestMatcher.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ExpressionRequestMatcher.php index e9c8441c..26bed7d3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ExpressionRequestMatcher.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ExpressionRequestMatcher.php @@ -35,13 +35,13 @@ class ExpressionRequestMatcher extends RequestMatcher throw new \LogicException('Unable to match the request as the expression language is not available.'); } - return $this->language->evaluate($this->expression, array( + return $this->language->evaluate($this->expression, [ 'request' => $request, 'method' => $request->getMethod(), 'path' => rawurldecode($request->getPathInfo()), 'host' => $request->getHost(), 'ip' => $request->getClientIp(), 'attributes' => $request->attributes->all(), - )) && parent::matches($request); + ]) && parent::matches($request); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php index 263fb321..80f4d47f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php @@ -37,7 +37,7 @@ class ExtensionGuesser implements ExtensionGuesserInterface * * @var array */ - protected $guessers = array(); + protected $guessers = []; /** * Returns the singleton instance. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php index 77bf51b1..d5acb340 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php @@ -20,11 +20,11 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface * A map of mime types and their default extensions. * * This list has been placed under the public domain by the Apache HTTPD project. - * This list has been updated from upstream on 2013-04-23. + * This list has been updated from upstream on 2019-01-14. * - * @see http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types + * @see https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types */ - protected $defaultExtensions = array( + protected $defaultExtensions = [ 'application/andrew-inset' => 'ez', 'application/applixware' => 'aw', 'application/atom+xml' => 'atom', @@ -618,7 +618,7 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface 'audio/adpcm' => 'adp', 'audio/basic' => 'au', 'audio/midi' => 'mid', - 'audio/mp4' => 'mp4a', + 'audio/mp4' => 'm4a', 'audio/mpeg' => 'mpga', 'audio/ogg' => 'oga', 'audio/s3m' => 's3m', @@ -653,6 +653,11 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface 'chemical/x-cml' => 'cml', 'chemical/x-csml' => 'csml', 'chemical/x-xyz' => 'xyz', + 'font/collection' => 'ttc', + 'font/otf' => 'otf', + 'font/ttf' => 'ttf', + 'font/woff' => 'woff', + 'font/woff2' => 'woff2', 'image/bmp' => 'bmp', 'image/x-ms-bmp' => 'bmp', 'image/cgm' => 'cgm', @@ -669,8 +674,8 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface 'image/tiff' => 'tiff', 'image/vnd.adobe.photoshop' => 'psd', 'image/vnd.dece.graphic' => 'uvi', - 'image/vnd.dvb.subtitle' => 'sub', 'image/vnd.djvu' => 'djvu', + 'image/vnd.dvb.subtitle' => 'sub', 'image/vnd.dwg' => 'dwg', 'image/vnd.dxf' => 'dxf', 'image/vnd.fastbidsheet' => 'fbs', @@ -732,8 +737,8 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface 'text/vcard' => 'vcard', 'text/vnd.curl' => 'curl', 'text/vnd.curl.dcurl' => 'dcurl', - 'text/vnd.curl.scurl' => 'scurl', 'text/vnd.curl.mcurl' => 'mcurl', + 'text/vnd.curl.scurl' => 'scurl', 'text/vnd.dvb.subtitle' => 'sub', 'text/vnd.fly' => 'fly', 'text/vnd.fmi.flexstor' => 'flx', @@ -747,10 +752,10 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface 'text/x-asm' => 's', 'text/x-c' => 'c', 'text/x-fortran' => 'f', - 'text/x-pascal' => 'p', 'text/x-java-source' => 'java', - 'text/x-opml' => 'opml', 'text/x-nfo' => 'nfo', + 'text/x-opml' => 'opml', + 'text/x-pascal' => 'p', 'text/x-setext' => 'etx', 'text/x-sfv' => 'sfv', 'text/x-uuencode' => 'uu', @@ -796,7 +801,7 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface 'video/x-sgi-movie' => 'movie', 'video/x-smv' => 'smv', 'x-conference/x-cooltalk' => 'ice', - ); + ]; /** * {@inheritdoc} diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php index dae47a7c..95d1ee26 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php @@ -51,7 +51,7 @@ class MimeTypeGuesser implements MimeTypeGuesserInterface * * @var array */ - protected $guessers = array(); + protected $guessers = []; /** * Returns the singleton instance. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/UploadedFile.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/UploadedFile.php index de6ce75c..a44c664b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/UploadedFile.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/UploadedFile.php @@ -249,7 +249,7 @@ class UploadedFile extends File */ public function getErrorMessage() { - static $errors = array( + static $errors = [ UPLOAD_ERR_INI_SIZE => 'The file "%s" exceeds your upload_max_filesize ini directive (limit is %d KiB).', UPLOAD_ERR_FORM_SIZE => 'The file "%s" exceeds the upload limit defined in your form.', UPLOAD_ERR_PARTIAL => 'The file "%s" was only partially uploaded.', @@ -257,7 +257,7 @@ class UploadedFile extends File UPLOAD_ERR_CANT_WRITE => 'The file "%s" could not be written on disk.', UPLOAD_ERR_NO_TMP_DIR => 'File could not be uploaded: missing temporary directory.', UPLOAD_ERR_EXTENSION => 'File upload was stopped by a PHP extension.', - ); + ]; $errorCode = $this->error; $maxFilesize = UPLOAD_ERR_INI_SIZE === $errorCode ? self::getMaxFilesize() / 1024 : 0; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/FileBag.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/FileBag.php index c135ad64..ca849b3d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/FileBag.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/FileBag.php @@ -21,12 +21,12 @@ use Symfony\Component\HttpFoundation\File\UploadedFile; */ class FileBag extends ParameterBag { - private static $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type'); + private static $fileKeys = ['error', 'name', 'size', 'tmp_name', 'type']; /** * @param array $parameters An array of HTTP files */ - public function __construct(array $parameters = array()) + public function __construct(array $parameters = []) { $this->replace($parameters); } @@ -34,9 +34,9 @@ class FileBag extends ParameterBag /** * {@inheritdoc} */ - public function replace(array $files = array()) + public function replace(array $files = []) { - $this->parameters = array(); + $this->parameters = []; $this->add($files); } @@ -55,7 +55,7 @@ class FileBag extends ParameterBag /** * {@inheritdoc} */ - public function add(array $files = array()) + public function add(array $files = []) { foreach ($files as $key => $file) { $this->set($key, $file); @@ -87,7 +87,7 @@ class FileBag extends ParameterBag $file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['size'], $file['error']); } } else { - $file = array_map(array($this, 'convertFileInformation'), $file); + $file = array_map([$this, 'convertFileInformation'], $file); if (array_keys($keys) === $keys) { $file = array_filter($file); } @@ -130,13 +130,13 @@ class FileBag extends ParameterBag } foreach ($data['name'] as $key => $name) { - $files[$key] = $this->fixPhpFilesArray(array( + $files[$key] = $this->fixPhpFilesArray([ 'error' => $data['error'][$key], 'name' => $name, 'type' => $data['type'][$key], 'tmp_name' => $data['tmp_name'][$key], 'size' => $data['size'][$key], - )); + ]); } return $files; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/HeaderBag.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/HeaderBag.php index 5445e80c..9798173e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/HeaderBag.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/HeaderBag.php @@ -18,13 +18,13 @@ namespace Symfony\Component\HttpFoundation; */ class HeaderBag implements \IteratorAggregate, \Countable { - protected $headers = array(); - protected $cacheControl = array(); + protected $headers = []; + protected $cacheControl = []; /** * @param array $headers An array of HTTP headers */ - public function __construct(array $headers = array()) + public function __construct(array $headers = []) { foreach ($headers as $key => $values) { $this->set($key, $values); @@ -80,9 +80,9 @@ class HeaderBag implements \IteratorAggregate, \Countable * * @param array $headers An array of HTTP headers */ - public function replace(array $headers = array()) + public function replace(array $headers = []) { - $this->headers = array(); + $this->headers = []; $this->add($headers); } @@ -101,9 +101,9 @@ class HeaderBag implements \IteratorAggregate, \Countable /** * Returns a header value by name. * - * @param string $key The header name - * @param string|string[]|null $default The default value - * @param bool $first Whether to return the first value or all header values + * @param string $key The header name + * @param string|null $default The default value + * @param bool $first Whether to return the first value or all header values * * @return string|string[]|null The first header value or default value if $first is true, an array of values otherwise */ @@ -112,12 +112,12 @@ class HeaderBag implements \IteratorAggregate, \Countable $key = str_replace('_', '-', strtolower($key)); $headers = $this->all(); - if (!array_key_exists($key, $headers)) { + if (!\array_key_exists($key, $headers)) { if (null === $default) { - return $first ? null : array(); + return $first ? null : []; } - return $first ? $default : array($default); + return $first ? $default : [$default]; } if ($first) { @@ -148,7 +148,7 @@ class HeaderBag implements \IteratorAggregate, \Countable } } else { if (true === $replace || !isset($this->headers[$key])) { - $this->headers[$key] = array($values); + $this->headers[$key] = [$values]; } else { $this->headers[$key][] = $values; } @@ -168,7 +168,7 @@ class HeaderBag implements \IteratorAggregate, \Countable */ public function has($key) { - return array_key_exists(str_replace('_', '-', strtolower($key)), $this->all()); + return \array_key_exists(str_replace('_', '-', strtolower($key)), $this->all()); } /** @@ -196,7 +196,7 @@ class HeaderBag implements \IteratorAggregate, \Countable unset($this->headers[$key]); if ('cache-control' === $key) { - $this->cacheControl = array(); + $this->cacheControl = []; } } @@ -245,7 +245,7 @@ class HeaderBag implements \IteratorAggregate, \Countable */ public function hasCacheControlDirective($key) { - return array_key_exists($key, $this->cacheControl); + return \array_key_exists($key, $this->cacheControl); } /** @@ -257,7 +257,7 @@ class HeaderBag implements \IteratorAggregate, \Countable */ public function getCacheControlDirective($key) { - return array_key_exists($key, $this->cacheControl) ? $this->cacheControl[$key] : null; + return \array_key_exists($key, $this->cacheControl) ? $this->cacheControl[$key] : null; } /** @@ -294,7 +294,7 @@ class HeaderBag implements \IteratorAggregate, \Countable protected function getCacheControlHeader() { - $parts = array(); + $parts = []; ksort($this->cacheControl); foreach ($this->cacheControl as $key => $value) { if (true === $value) { @@ -320,7 +320,7 @@ class HeaderBag implements \IteratorAggregate, \Countable */ protected function parseCacheControl($header) { - $cacheControl = array(); + $cacheControl = []; preg_match_all('#([a-zA-Z][a-zA-Z_-]*)\s*(?:=(?:"([^"]*)"|([^ \t",;]*)))?#', $header, $matches, PREG_SET_ORDER); foreach ($matches as $match) { $cacheControl[strtolower($match[1])] = isset($match[3]) ? $match[3] : (isset($match[2]) ? $match[2] : true); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/IpUtils.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/IpUtils.php index a1bfa908..67d13e57 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/IpUtils.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/IpUtils.php @@ -18,7 +18,7 @@ namespace Symfony\Component\HttpFoundation; */ class IpUtils { - private static $checkedIps = array(); + private static $checkedIps = []; /** * This class should not be instantiated. @@ -38,7 +38,7 @@ class IpUtils public static function checkIp($requestIp, $ips) { if (!\is_array($ips)) { - $ips = array($ips); + $ips = [$ips]; } $method = substr_count($requestIp, ':') > 1 ? 'checkIp6' : 'checkIp4'; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/JsonResponse.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/JsonResponse.php index d741ce09..6fb32ee4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/JsonResponse.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/JsonResponse.php @@ -39,7 +39,7 @@ class JsonResponse extends Response * @param array $headers An array of response headers * @param bool $json If the data is already a JSON string */ - public function __construct($data = null, $status = 200, $headers = array(), $json = false) + public function __construct($data = null, $status = 200, $headers = [], $json = false) { parent::__construct('', $status, $headers); @@ -64,7 +64,7 @@ class JsonResponse extends Response * * @return static */ - public static function create($data = null, $status = 200, $headers = array()) + public static function create($data = null, $status = 200, $headers = []) { return new static($data, $status, $headers); } @@ -72,7 +72,7 @@ class JsonResponse extends Response /** * Make easier the creation of JsonResponse from raw json. */ - public static function fromJsonString($data = null, $status = 200, $headers = array()) + public static function fromJsonString($data = null, $status = 200, $headers = []) { return new static($data, $status, $headers, true); } @@ -94,11 +94,11 @@ class JsonResponse extends Response // JsonpCallbackValidator is released under the MIT License. See https://github.com/willdurand/JsonpCallbackValidator/blob/v1.1.0/LICENSE for details. // (c) William Durand $pattern = '/^[$_\p{L}][$_\p{L}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*(?:\[(?:"(?:\\\.|[^"\\\])*"|\'(?:\\\.|[^\'\\\])*\'|\d+)\])*?$/u'; - $reserved = array( + $reserved = [ 'break', 'do', 'instanceof', 'typeof', 'case', 'else', 'new', 'var', 'catch', 'finally', 'return', 'void', 'continue', 'for', 'switch', 'while', 'debugger', 'function', 'this', 'with', 'default', 'if', 'throw', 'delete', 'in', 'try', 'class', 'enum', 'extends', 'super', 'const', 'export', 'import', 'implements', 'let', 'private', 'public', 'yield', 'interface', 'package', 'protected', 'static', 'null', 'true', 'false', - ); + ]; $parts = explode('.', $callback); foreach ($parts as $part) { if (!preg_match($pattern, $part) || \in_array($part, $reserved, true)) { @@ -137,7 +137,7 @@ class JsonResponse extends Response * * @throws \InvalidArgumentException */ - public function setData($data = array()) + public function setData($data = []) { if (\defined('HHVM_VERSION')) { // HHVM does not trigger any warnings and let exceptions diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ParameterBag.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ParameterBag.php index 19d7ee91..f05e4a21 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ParameterBag.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ParameterBag.php @@ -26,7 +26,7 @@ class ParameterBag implements \IteratorAggregate, \Countable /** * @param array $parameters An array of parameters */ - public function __construct(array $parameters = array()) + public function __construct(array $parameters = []) { $this->parameters = $parameters; } @@ -56,7 +56,7 @@ class ParameterBag implements \IteratorAggregate, \Countable * * @param array $parameters An array of parameters */ - public function replace(array $parameters = array()) + public function replace(array $parameters = []) { $this->parameters = $parameters; } @@ -66,7 +66,7 @@ class ParameterBag implements \IteratorAggregate, \Countable * * @param array $parameters An array of parameters */ - public function add(array $parameters = array()) + public function add(array $parameters = []) { $this->parameters = array_replace($this->parameters, $parameters); } @@ -81,7 +81,7 @@ class ParameterBag implements \IteratorAggregate, \Countable */ public function get($key, $default = null) { - return array_key_exists($key, $this->parameters) ? $this->parameters[$key] : $default; + return \array_key_exists($key, $this->parameters) ? $this->parameters[$key] : $default; } /** @@ -104,7 +104,7 @@ class ParameterBag implements \IteratorAggregate, \Countable */ public function has($key) { - return array_key_exists($key, $this->parameters); + return \array_key_exists($key, $this->parameters); } /** @@ -154,7 +154,7 @@ class ParameterBag implements \IteratorAggregate, \Countable public function getDigits($key, $default = '') { // we need to remove - and + because they're allowed in the filter - return str_replace(array('-', '+'), '', $this->filter($key, $default, FILTER_SANITIZE_NUMBER_INT)); + return str_replace(['-', '+'], '', $this->filter($key, $default, FILTER_SANITIZE_NUMBER_INT)); } /** @@ -195,13 +195,13 @@ class ParameterBag implements \IteratorAggregate, \Countable * * @return mixed */ - public function filter($key, $default = null, $filter = FILTER_DEFAULT, $options = array()) + public function filter($key, $default = null, $filter = FILTER_DEFAULT, $options = []) { $value = $this->get($key, $default); // Always turn $options into an array - this allows filter_var option shortcuts. if (!\is_array($options) && $options) { - $options = array('flags' => $options); + $options = ['flags' => $options]; } // Add a convenience check for arrays. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RedirectResponse.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RedirectResponse.php index 01681dcd..5e1dfe58 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RedirectResponse.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RedirectResponse.php @@ -32,7 +32,7 @@ class RedirectResponse extends Response * * @see http://tools.ietf.org/html/rfc2616#section-10.3 */ - public function __construct($url, $status = 302, $headers = array()) + public function __construct($url, $status = 302, $headers = []) { parent::__construct('', $status, $headers); @@ -42,7 +42,7 @@ class RedirectResponse extends Response throw new \InvalidArgumentException(sprintf('The HTTP status code is not a redirect ("%s" given).', $status)); } - if (301 == $status && !array_key_exists('cache-control', $headers)) { + if (301 == $status && !\array_key_exists('cache-control', $headers)) { $this->headers->remove('cache-control'); } } @@ -56,7 +56,7 @@ class RedirectResponse extends Response * * @return static */ - public static function create($url = '', $status = 302, $headers = array()) + public static function create($url = '', $status = 302, $headers = []) { return new static($url, $status, $headers); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Request.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Request.php index 89611660..f6ff0f50 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Request.php @@ -61,17 +61,17 @@ class Request /** * @var string[] */ - protected static $trustedProxies = array(); + protected static $trustedProxies = []; /** * @var string[] */ - protected static $trustedHostPatterns = array(); + protected static $trustedHostPatterns = []; /** * @var string[] */ - protected static $trustedHosts = array(); + protected static $trustedHosts = []; /** * Names for headers that can be trusted when @@ -84,13 +84,13 @@ class Request * * @deprecated since version 3.3, to be removed in 4.0 */ - protected static $trustedHeaders = array( + protected static $trustedHeaders = [ self::HEADER_FORWARDED => 'FORWARDED', self::HEADER_CLIENT_IP => 'X_FORWARDED_FOR', self::HEADER_CLIENT_HOST => 'X_FORWARDED_HOST', self::HEADER_CLIENT_PROTO => 'X_FORWARDED_PROTO', self::HEADER_CLIENT_PORT => 'X_FORWARDED_PORT', - ); + ]; protected static $httpMethodParameterOverride = false; @@ -226,20 +226,20 @@ class Request private static $trustedHeaderSet = -1; /** @deprecated since version 3.3, to be removed in 4.0 */ - private static $trustedHeaderNames = array( + private static $trustedHeaderNames = [ self::HEADER_FORWARDED => 'FORWARDED', self::HEADER_CLIENT_IP => 'X_FORWARDED_FOR', self::HEADER_CLIENT_HOST => 'X_FORWARDED_HOST', self::HEADER_CLIENT_PROTO => 'X_FORWARDED_PROTO', self::HEADER_CLIENT_PORT => 'X_FORWARDED_PORT', - ); + ]; - private static $forwardedParams = array( + private static $forwardedParams = [ self::HEADER_X_FORWARDED_FOR => 'for', self::HEADER_X_FORWARDED_HOST => 'host', self::HEADER_X_FORWARDED_PROTO => 'proto', self::HEADER_X_FORWARDED_PORT => 'host', - ); + ]; /** * @param array $query The GET parameters @@ -250,7 +250,7 @@ class Request * @param array $server The SERVER parameters * @param string|resource|null $content The raw body data */ - public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) + public function __construct(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null) { $this->initialize($query, $request, $attributes, $cookies, $files, $server, $content); } @@ -268,7 +268,7 @@ class Request * @param array $server The SERVER parameters * @param string|resource|null $content The raw body data */ - public function initialize(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) + public function initialize(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null) { $this->request = new ParameterBag($request); $this->query = new ParameterBag($query); @@ -303,18 +303,18 @@ class Request // HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH fields. $server = $_SERVER; if ('cli-server' === \PHP_SAPI) { - if (array_key_exists('HTTP_CONTENT_LENGTH', $_SERVER)) { + if (\array_key_exists('HTTP_CONTENT_LENGTH', $_SERVER)) { $server['CONTENT_LENGTH'] = $_SERVER['HTTP_CONTENT_LENGTH']; } - if (array_key_exists('HTTP_CONTENT_TYPE', $_SERVER)) { + if (\array_key_exists('HTTP_CONTENT_TYPE', $_SERVER)) { $server['CONTENT_TYPE'] = $_SERVER['HTTP_CONTENT_TYPE']; } } - $request = self::createRequestFromFactory($_GET, $_POST, array(), $_COOKIE, $_FILES, $server); + $request = self::createRequestFromFactory($_GET, $_POST, [], $_COOKIE, $_FILES, $server); if (0 === strpos($request->headers->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded') - && \in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), array('PUT', 'DELETE', 'PATCH')) + && \in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), ['PUT', 'DELETE', 'PATCH']) ) { parse_str($request->getContent(), $data); $request->request = new ParameterBag($data); @@ -339,9 +339,9 @@ class Request * * @return static */ - public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null) + public static function create($uri, $method = 'GET', $parameters = [], $cookies = [], $files = [], $server = [], $content = null) { - $server = array_replace(array( + $server = array_replace([ 'SERVER_NAME' => 'localhost', 'SERVER_PORT' => 80, 'HTTP_HOST' => 'localhost', @@ -354,7 +354,7 @@ class Request 'SCRIPT_FILENAME' => '', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'REQUEST_TIME' => time(), - ), $server); + ], $server); $server['PATH_INFO'] = ''; $server['REQUEST_METHOD'] = strtoupper($method); @@ -402,10 +402,10 @@ class Request // no break case 'PATCH': $request = $parameters; - $query = array(); + $query = []; break; default: - $request = array(); + $request = []; $query = $parameters; break; } @@ -428,7 +428,7 @@ class Request $server['REQUEST_URI'] = $components['path'].('' !== $queryString ? '?'.$queryString : ''); $server['QUERY_STRING'] = $queryString; - return self::createRequestFromFactory($query, $request, array(), $cookies, $files, $server, $content); + return self::createRequestFromFactory($query, $request, [], $cookies, $files, $server, $content); } /** @@ -532,7 +532,7 @@ class Request } $cookieHeader = ''; - $cookies = array(); + $cookies = []; foreach ($this->cookies as $k => $v) { $cookies[] = $k.'='.$v; @@ -566,19 +566,19 @@ class Request foreach ($this->headers->all() as $key => $value) { $key = strtoupper(str_replace('-', '_', $key)); - if (\in_array($key, array('CONTENT_TYPE', 'CONTENT_LENGTH'))) { + if (\in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH'])) { $_SERVER[$key] = implode(', ', $value); } else { $_SERVER['HTTP_'.$key] = implode(', ', $value); } } - $request = array('g' => $_GET, 'p' => $_POST, 'c' => $_COOKIE); + $request = ['g' => $_GET, 'p' => $_POST, 'c' => $_COOKIE]; $requestOrder = ini_get('request_order') ?: ini_get('variables_order'); $requestOrder = preg_replace('#[^cgp]#', '', strtolower($requestOrder)) ?: 'gp'; - $_REQUEST = array(); + $_REQUEST = []; foreach (str_split($requestOrder) as $order) { $_REQUEST = array_merge($_REQUEST, $request[$order]); } @@ -644,7 +644,7 @@ class Request return sprintf('{%s}i', $hostPattern); }, $hostPatterns); // we need to reset trusted hosts on trusted host patterns change - self::$trustedHosts = array(); + self::$trustedHosts = []; } /** @@ -691,7 +691,7 @@ class Request $key = self::HEADER_CLIENT_PROTO; } elseif ('client_port' === $key) { $key = self::HEADER_CLIENT_PORT; - } elseif (!array_key_exists($key, self::$trustedHeaders)) { + } elseif (!\array_key_exists($key, self::$trustedHeaders)) { throw new \InvalidArgumentException(sprintf('Unable to set the trusted header name for key "%s".', $key)); } @@ -722,7 +722,7 @@ class Request @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the Request::getTrustedHeaderSet() method instead.', __METHOD__), E_USER_DEPRECATED); } - if (!array_key_exists($key, self::$trustedHeaders)) { + if (!\array_key_exists($key, self::$trustedHeaders)) { throw new \InvalidArgumentException(sprintf('Unable to get the trusted header name for key "%s".', $key)); } @@ -745,8 +745,8 @@ class Request return ''; } - $parts = array(); - $order = array(); + $parts = []; + $order = []; foreach (explode('&', $qs) as $param) { if ('' === $param || '=' === $param[0]) { @@ -893,10 +893,10 @@ class Request $ip = $this->server->get('REMOTE_ADDR'); if (!$this->isFromTrustedProxy()) { - return array($ip); + return [$ip]; } - return $this->getTrustedValues(self::HEADER_CLIENT_IP, $ip) ?: array($ip); + return $this->getTrustedValues(self::HEADER_CLIENT_IP, $ip) ?: [$ip]; } /** @@ -1242,7 +1242,7 @@ class Request public function isSecure() { if ($this->isFromTrustedProxy() && $proto = $this->getTrustedValues(self::HEADER_CLIENT_PROTO)) { - return \in_array(strtolower($proto[0]), array('https', 'on', 'ssl', '1'), true); + return \in_array(strtolower($proto[0]), ['https', 'on', 'ssl', '1'], true); } $https = $this->server->get('HTTPS'); @@ -1405,7 +1405,7 @@ class Request static::initializeFormats(); } - return isset(static::$formats[$format]) ? static::$formats[$format] : array(); + return isset(static::$formats[$format]) ? static::$formats[$format] : []; } /** @@ -1448,7 +1448,7 @@ class Request static::initializeFormats(); } - static::$formats[$format] = \is_array($mimeTypes) ? $mimeTypes : array($mimeTypes); + static::$formats[$format] = \is_array($mimeTypes) ? $mimeTypes : [$mimeTypes]; } /** @@ -1565,10 +1565,10 @@ class Request // then setting $andCacheable to false should be deprecated in 4.1 @trigger_error('Checking only for cacheable HTTP methods with Symfony\Component\HttpFoundation\Request::isMethodSafe() is deprecated since Symfony 3.2 and will throw an exception in 4.0. Disable checking only for cacheable methods by calling the method with `false` as first argument or use the Request::isMethodCacheable() instead.', E_USER_DEPRECATED); - return \in_array($this->getMethod(), array('GET', 'HEAD')); + return \in_array($this->getMethod(), ['GET', 'HEAD']); } - return \in_array($this->getMethod(), array('GET', 'HEAD', 'OPTIONS', 'TRACE')); + return \in_array($this->getMethod(), ['GET', 'HEAD', 'OPTIONS', 'TRACE']); } /** @@ -1578,7 +1578,7 @@ class Request */ public function isMethodIdempotent() { - return \in_array($this->getMethod(), array('HEAD', 'GET', 'PUT', 'DELETE', 'TRACE', 'OPTIONS', 'PURGE')); + return \in_array($this->getMethod(), ['HEAD', 'GET', 'PUT', 'DELETE', 'TRACE', 'OPTIONS', 'PURGE']); } /** @@ -1590,7 +1590,7 @@ class Request */ public function isMethodCacheable() { - return \in_array($this->getMethod(), array('GET', 'HEAD')); + return \in_array($this->getMethod(), ['GET', 'HEAD']); } /** @@ -1704,7 +1704,7 @@ class Request return $locales[0]; } - $extendedPreferredLanguages = array(); + $extendedPreferredLanguages = []; foreach ($preferredLanguages as $language) { $extendedPreferredLanguages[] = $language; if (false !== $position = strpos($language, '_')) { @@ -1732,7 +1732,7 @@ class Request } $languages = AcceptHeader::fromString($this->headers->get('Accept-Language'))->all(); - $this->languages = array(); + $this->languages = []; foreach ($languages as $lang => $acceptHeaderItem) { if (false !== strpos($lang, '-')) { $codes = explode('-', $lang); @@ -1837,15 +1837,23 @@ class Request } elseif ($this->server->has('REQUEST_URI')) { $requestUri = $this->server->get('REQUEST_URI'); - // HTTP proxy reqs setup request URI with scheme and host [and port] + the URL path, only use URL path - $uriComponents = parse_url($requestUri); + if ('' !== $requestUri && '/' === $requestUri[0]) { + // To only use path and query remove the fragment. + if (false !== $pos = strpos($requestUri, '#')) { + $requestUri = substr($requestUri, 0, $pos); + } + } else { + // HTTP proxy reqs setup request URI with scheme and host [and port] + the URL path, + // only use URL path. + $uriComponents = parse_url($requestUri); - if (isset($uriComponents['path'])) { - $requestUri = $uriComponents['path']; - } + if (isset($uriComponents['path'])) { + $requestUri = $uriComponents['path']; + } - if (isset($uriComponents['query'])) { - $requestUri .= '?'.$uriComponents['query']; + if (isset($uriComponents['query'])) { + $requestUri .= '?'.$uriComponents['query']; + } } } elseif ($this->server->has('ORIG_PATH_INFO')) { // IIS 5.0, PHP as CGI @@ -1994,19 +2002,19 @@ class Request */ protected static function initializeFormats() { - static::$formats = array( - 'html' => array('text/html', 'application/xhtml+xml'), - 'txt' => array('text/plain'), - 'js' => array('application/javascript', 'application/x-javascript', 'text/javascript'), - 'css' => array('text/css'), - 'json' => array('application/json', 'application/x-json'), - 'jsonld' => array('application/ld+json'), - 'xml' => array('text/xml', 'application/xml', 'application/x-xml'), - 'rdf' => array('application/rdf+xml'), - 'atom' => array('application/atom+xml'), - 'rss' => array('application/rss+xml'), - 'form' => array('application/x-www-form-urlencoded'), - ); + static::$formats = [ + 'html' => ['text/html', 'application/xhtml+xml'], + 'txt' => ['text/plain'], + 'js' => ['application/javascript', 'application/x-javascript', 'text/javascript'], + 'css' => ['text/css'], + 'json' => ['application/json', 'application/x-json'], + 'jsonld' => ['application/ld+json'], + 'xml' => ['text/xml', 'application/xml', 'application/x-xml'], + 'rdf' => ['application/rdf+xml'], + 'atom' => ['application/atom+xml'], + 'rss' => ['application/rss+xml'], + 'form' => ['application/x-www-form-urlencoded'], + ]; } /** @@ -2051,7 +2059,7 @@ class Request return false; } - private static function createRequestFromFactory(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) + private static function createRequestFromFactory(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null) { if (self::$requestFactory) { $request = \call_user_func(self::$requestFactory, $query, $request, $attributes, $cookies, $files, $server, $content); @@ -2081,8 +2089,8 @@ class Request private function getTrustedValues($type, $ip = null) { - $clientValues = array(); - $forwardedValues = array(); + $clientValues = []; + $forwardedValues = []; if (self::$trustedHeaders[$type] && $this->headers->has(self::$trustedHeaders[$type])) { foreach (explode(',', $this->headers->get(self::$trustedHeaders[$type])) as $v) { @@ -2092,7 +2100,7 @@ class Request if (self::$trustedHeaders[self::HEADER_FORWARDED] && $this->headers->has(self::$trustedHeaders[self::HEADER_FORWARDED])) { $forwardedValues = $this->headers->get(self::$trustedHeaders[self::HEADER_FORWARDED]); - $forwardedValues = preg_match_all(sprintf('{(?:%s)="?([a-zA-Z0-9\.:_\-/\[\]]*+)}', self::$forwardedParams[$type]), $forwardedValues, $matches) ? $matches[1] : array(); + $forwardedValues = preg_match_all(sprintf('{(?:%s)="?([a-zA-Z0-9\.:_\-/\[\]]*+)}', self::$forwardedParams[$type]), $forwardedValues, $matches) ? $matches[1] : []; if (self::HEADER_CLIENT_PORT === $type) { foreach ($forwardedValues as $k => $v) { if (']' === substr($v, -1) || false === $v = strrchr($v, ':')) { @@ -2117,7 +2125,7 @@ class Request } if (!$this->isForwardedValid) { - return null !== $ip ? array('0.0.0.0', $ip) : array(); + return null !== $ip ? ['0.0.0.0', $ip] : []; } $this->isForwardedValid = false; @@ -2127,7 +2135,7 @@ class Request private function normalizeAndFilterClientIps(array $clientIps, $ip) { if (!$clientIps) { - return array(); + return []; } $clientIps[] = $ip; // Complete the IP chain with the IP the request actually came from $firstTrustedIp = null; @@ -2163,6 +2171,6 @@ class Request } // Now the IP chain contains only untrusted proxies and the client IP - return $clientIps ? array_reverse($clientIps) : array($firstTrustedIp); + return $clientIps ? array_reverse($clientIps) : [$firstTrustedIp]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RequestMatcher.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RequestMatcher.php index 6b4cef14..cadf70c5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RequestMatcher.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RequestMatcher.php @@ -31,22 +31,22 @@ class RequestMatcher implements RequestMatcherInterface /** * @var string[] */ - private $methods = array(); + private $methods = []; /** * @var string[] */ - private $ips = array(); + private $ips = []; /** * @var array */ - private $attributes = array(); + private $attributes = []; /** * @var string[] */ - private $schemes = array(); + private $schemes = []; /** * @param string|null $path @@ -56,7 +56,7 @@ class RequestMatcher implements RequestMatcherInterface * @param array $attributes * @param string|string[]|null $schemes */ - public function __construct($path = null, $host = null, $methods = null, $ips = null, array $attributes = array(), $schemes = null) + public function __construct($path = null, $host = null, $methods = null, $ips = null, array $attributes = [], $schemes = null) { $this->matchPath($path); $this->matchHost($host); @@ -76,7 +76,7 @@ class RequestMatcher implements RequestMatcherInterface */ public function matchScheme($scheme) { - $this->schemes = null !== $scheme ? array_map('strtolower', (array) $scheme) : array(); + $this->schemes = null !== $scheme ? array_map('strtolower', (array) $scheme) : []; } /** @@ -116,7 +116,7 @@ class RequestMatcher implements RequestMatcherInterface */ public function matchIps($ips) { - $this->ips = null !== $ips ? (array) $ips : array(); + $this->ips = null !== $ips ? (array) $ips : []; } /** @@ -126,7 +126,7 @@ class RequestMatcher implements RequestMatcherInterface */ public function matchMethod($method) { - $this->methods = null !== $method ? array_map('strtoupper', (array) $method) : array(); + $this->methods = null !== $method ? array_map('strtoupper', (array) $method) : []; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RequestStack.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RequestStack.php index 40123f66..885d78a5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RequestStack.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RequestStack.php @@ -21,7 +21,7 @@ class RequestStack /** * @var Request[] */ - private $requests = array(); + private $requests = []; /** * Pushes a Request on the stack. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Response.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Response.php index f267d1e0..4d63219b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Response.php @@ -128,7 +128,7 @@ class Response * * @var array */ - public static $statusTexts = array( + public static $statusTexts = [ 100 => 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', // RFC2518 @@ -191,7 +191,7 @@ class Response 508 => 'Loop Detected', // RFC5842 510 => 'Not Extended', // RFC2774 511 => 'Network Authentication Required', // RFC6585 - ); + ]; /** * @param mixed $content The response content, see setContent() @@ -200,7 +200,7 @@ class Response * * @throws \InvalidArgumentException When the HTTP status code is not valid */ - public function __construct($content = '', $status = 200, $headers = array()) + public function __construct($content = '', $status = 200, $headers = []) { $this->headers = new ResponseHeaderBag($headers); $this->setContent($content); @@ -222,7 +222,7 @@ class Response * * @return static */ - public static function create($content = '', $status = 200, $headers = array()) + public static function create($content = '', $status = 200, $headers = []) { return new static($content, $status, $headers); } @@ -375,7 +375,7 @@ class Response if (\function_exists('fastcgi_finish_request')) { fastcgi_finish_request(); - } elseif (!\in_array(\PHP_SAPI, array('cli', 'phpdbg'), true)) { + } elseif (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { static::closeOutputBuffers(0, true); } @@ -395,7 +395,7 @@ class Response */ public function setContent($content) { - if (null !== $content && !\is_string($content) && !is_numeric($content) && !\is_callable(array($content, '__toString'))) { + if (null !== $content && !\is_string($content) && !is_numeric($content) && !\is_callable([$content, '__toString'])) { throw new \UnexpectedValueException(sprintf('The Response content must be a string or object implementing __toString(), "%s" given.', \gettype($content))); } @@ -542,7 +542,7 @@ class Response */ public function isCacheable() { - if (!\in_array($this->statusCode, array(200, 203, 300, 301, 302, 404, 410))) { + if (!\in_array($this->statusCode, [200, 203, 300, 301, 302, 404, 410])) { return false; } @@ -974,7 +974,7 @@ class Response */ public function setCache(array $options) { - if ($diff = array_diff(array_keys($options), array('etag', 'last_modified', 'max_age', 's_maxage', 'private', 'public', 'immutable'))) { + if ($diff = array_diff(array_keys($options), ['etag', 'last_modified', 'max_age', 's_maxage', 'private', 'public', 'immutable'])) { throw new \InvalidArgumentException(sprintf('Response does not support the following options: "%s".', implode('", "', $diff))); } @@ -1035,7 +1035,7 @@ class Response $this->setContent(null); // remove headers that MUST NOT be included with 304 Not Modified responses - foreach (array('Allow', 'Content-Encoding', 'Content-Language', 'Content-Length', 'Content-MD5', 'Content-Type', 'Last-Modified') as $header) { + foreach (['Allow', 'Content-Encoding', 'Content-Language', 'Content-Length', 'Content-MD5', 'Content-Type', 'Last-Modified'] as $header) { $this->headers->remove($header); } @@ -1064,10 +1064,10 @@ class Response public function getVary() { if (!$vary = $this->headers->get('Vary', null, false)) { - return array(); + return []; } - $ret = array(); + $ret = []; foreach ($vary as $item) { $ret = array_merge($ret, preg_split('/[\s,]+/', $item)); } @@ -1249,7 +1249,7 @@ class Response */ public function isRedirect($location = null) { - return \in_array($this->statusCode, array(201, 301, 302, 303, 307, 308)) && (null === $location ?: $location == $this->headers->get('Location')); + return \in_array($this->statusCode, [201, 301, 302, 303, 307, 308]) && (null === $location ?: $location == $this->headers->get('Location')); } /** @@ -1261,7 +1261,7 @@ class Response */ public function isEmpty() { - return \in_array($this->statusCode, array(204, 304)); + return \in_array($this->statusCode, [204, 304]); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php index 00cff7af..1dc8dc2c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php @@ -24,11 +24,11 @@ class ResponseHeaderBag extends HeaderBag const DISPOSITION_ATTACHMENT = 'attachment'; const DISPOSITION_INLINE = 'inline'; - protected $computedCacheControl = array(); - protected $cookies = array(); - protected $headerNames = array(); + protected $computedCacheControl = []; + protected $cookies = []; + protected $headerNames = []; - public function __construct(array $headers = array()) + public function __construct(array $headers = []) { parent::__construct($headers); @@ -49,7 +49,7 @@ class ResponseHeaderBag extends HeaderBag */ public function allPreserveCase() { - $headers = array(); + $headers = []; foreach ($this->all() as $name => $value) { $headers[isset($this->headerNames[$name]) ? $this->headerNames[$name] : $name] = $value; } @@ -70,9 +70,9 @@ class ResponseHeaderBag extends HeaderBag /** * {@inheritdoc} */ - public function replace(array $headers = array()) + public function replace(array $headers = []) { - $this->headerNames = array(); + $this->headerNames = []; parent::replace($headers); @@ -107,7 +107,7 @@ class ResponseHeaderBag extends HeaderBag if ('set-cookie' === $uniqueKey) { if ($replace) { - $this->cookies = array(); + $this->cookies = []; } foreach ((array) $values as $cookie) { $this->setCookie(Cookie::fromString($cookie)); @@ -122,9 +122,9 @@ class ResponseHeaderBag extends HeaderBag parent::set($key, $values, $replace); // ensure the cache-control header has sensible defaults - if (\in_array($uniqueKey, array('cache-control', 'etag', 'last-modified', 'expires'), true)) { + if (\in_array($uniqueKey, ['cache-control', 'etag', 'last-modified', 'expires'], true)) { $computed = $this->computeCacheControlValue(); - $this->headers['cache-control'] = array($computed); + $this->headers['cache-control'] = [$computed]; $this->headerNames['cache-control'] = 'Cache-Control'; $this->computedCacheControl = $this->parseCacheControl($computed); } @@ -139,7 +139,7 @@ class ResponseHeaderBag extends HeaderBag unset($this->headerNames[$uniqueKey]); if ('set-cookie' === $uniqueKey) { - $this->cookies = array(); + $this->cookies = []; return; } @@ -147,7 +147,7 @@ class ResponseHeaderBag extends HeaderBag parent::remove($key); if ('cache-control' === $uniqueKey) { - $this->computedCacheControl = array(); + $this->computedCacheControl = []; } if ('date' === $uniqueKey) { @@ -160,7 +160,7 @@ class ResponseHeaderBag extends HeaderBag */ public function hasCacheControlDirective($key) { - return array_key_exists($key, $this->computedCacheControl); + return \array_key_exists($key, $this->computedCacheControl); } /** @@ -168,7 +168,7 @@ class ResponseHeaderBag extends HeaderBag */ public function getCacheControlDirective($key) { - return array_key_exists($key, $this->computedCacheControl) ? $this->computedCacheControl[$key] : null; + return \array_key_exists($key, $this->computedCacheControl) ? $this->computedCacheControl[$key] : null; } public function setCookie(Cookie $cookie) @@ -216,15 +216,15 @@ class ResponseHeaderBag extends HeaderBag */ public function getCookies($format = self::COOKIES_FLAT) { - if (!\in_array($format, array(self::COOKIES_FLAT, self::COOKIES_ARRAY))) { - throw new \InvalidArgumentException(sprintf('Format "%s" invalid (%s).', $format, implode(', ', array(self::COOKIES_FLAT, self::COOKIES_ARRAY)))); + if (!\in_array($format, [self::COOKIES_FLAT, self::COOKIES_ARRAY])) { + throw new \InvalidArgumentException(sprintf('Format "%s" invalid (%s).', $format, implode(', ', [self::COOKIES_FLAT, self::COOKIES_ARRAY]))); } if (self::COOKIES_ARRAY === $format) { return $this->cookies; } - $flattenedCookies = array(); + $flattenedCookies = []; foreach ($this->cookies as $path) { foreach ($path as $cookies) { foreach ($cookies as $cookie) { @@ -267,7 +267,7 @@ class ResponseHeaderBag extends HeaderBag */ public function makeDisposition($disposition, $filename, $filenameFallback = '') { - if (!\in_array($disposition, array(self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE))) { + if (!\in_array($disposition, [self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE])) { throw new \InvalidArgumentException(sprintf('The disposition must be either "%s" or "%s".', self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ServerBag.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ServerBag.php index d8ab561a..90da49fa 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ServerBag.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ServerBag.php @@ -27,8 +27,8 @@ class ServerBag extends ParameterBag */ public function getHeaders() { - $headers = array(); - $contentHeaders = array('CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true); + $headers = []; + $contentHeaders = ['CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true]; foreach ($this->parameters as $key => $value) { if (0 === strpos($key, 'HTTP_')) { $headers[substr($key, 5)] = $value; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php index fc5fb141..07118e89 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php @@ -19,7 +19,7 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta private $name = 'attributes'; private $storageKey; - protected $attributes = array(); + protected $attributes = []; /** * @param string $storageKey The key used to store attributes in the session @@ -63,7 +63,7 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta */ public function has($name) { - return array_key_exists($name, $this->attributes); + return \array_key_exists($name, $this->attributes); } /** @@ -71,7 +71,7 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta */ public function get($name, $default = null) { - return array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; + return \array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; } /** @@ -95,7 +95,7 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta */ public function replace(array $attributes) { - $this->attributes = array(); + $this->attributes = []; foreach ($attributes as $key => $value) { $this->set($key, $value); } @@ -107,7 +107,7 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta public function remove($name) { $retval = null; - if (array_key_exists($name, $this->attributes)) { + if (\array_key_exists($name, $this->attributes)) { $retval = $this->attributes[$name]; unset($this->attributes[$name]); } @@ -121,7 +121,7 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta public function clear() { $return = $this->attributes; - $this->attributes = array(); + $this->attributes = []; return $return; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php index 2f1e01a9..bbf2e39c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php @@ -44,7 +44,7 @@ class NamespacedAttributeBag extends AttributeBag return false; } - return array_key_exists($name, $attributes); + return \array_key_exists($name, $attributes); } /** @@ -60,7 +60,7 @@ class NamespacedAttributeBag extends AttributeBag return $default; } - return array_key_exists($name, $attributes) ? $attributes[$name] : $default; + return \array_key_exists($name, $attributes) ? $attributes[$name] : $default; } /** @@ -81,7 +81,7 @@ class NamespacedAttributeBag extends AttributeBag $retval = null; $attributes = &$this->resolveAttributePath($name); $name = $this->resolveKey($name); - if (null !== $attributes && array_key_exists($name, $attributes)) { + if (null !== $attributes && \array_key_exists($name, $attributes)) { $retval = $attributes[$name]; unset($attributes[$name]); } @@ -115,7 +115,7 @@ class NamespacedAttributeBag extends AttributeBag return $array; } - $array[$parts[0]] = array(); + $array[$parts[0]] = []; return $array; } @@ -123,14 +123,14 @@ class NamespacedAttributeBag extends AttributeBag unset($parts[\count($parts) - 1]); foreach ($parts as $part) { - if (null !== $array && !array_key_exists($part, $array)) { + if (null !== $array && !\array_key_exists($part, $array)) { if (!$writeContext) { $null = null; return $null; } - $array[$part] = array(); + $array[$part] = []; } $array = &$array[$part]; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php index 77521c24..451c4a5a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php @@ -19,7 +19,7 @@ namespace Symfony\Component\HttpFoundation\Session\Flash; class AutoExpireFlashBag implements FlashBagInterface { private $name = 'flashes'; - private $flashes = array('display' => array(), 'new' => array()); + private $flashes = ['display' => [], 'new' => []]; private $storageKey; /** @@ -53,8 +53,8 @@ class AutoExpireFlashBag implements FlashBagInterface // The logic: messages from the last request will be stored in new, so we move them to previous // This request we will show what is in 'display'. What is placed into 'new' this time round will // be moved to display next time round. - $this->flashes['display'] = array_key_exists('new', $this->flashes) ? $this->flashes['new'] : array(); - $this->flashes['new'] = array(); + $this->flashes['display'] = \array_key_exists('new', $this->flashes) ? $this->flashes['new'] : []; + $this->flashes['new'] = []; } /** @@ -68,7 +68,7 @@ class AutoExpireFlashBag implements FlashBagInterface /** * {@inheritdoc} */ - public function peek($type, array $default = array()) + public function peek($type, array $default = []) { return $this->has($type) ? $this->flashes['display'][$type] : $default; } @@ -78,13 +78,13 @@ class AutoExpireFlashBag implements FlashBagInterface */ public function peekAll() { - return array_key_exists('display', $this->flashes) ? (array) $this->flashes['display'] : array(); + return \array_key_exists('display', $this->flashes) ? (array) $this->flashes['display'] : []; } /** * {@inheritdoc} */ - public function get($type, array $default = array()) + public function get($type, array $default = []) { $return = $default; @@ -106,7 +106,7 @@ class AutoExpireFlashBag implements FlashBagInterface public function all() { $return = $this->flashes['display']; - $this->flashes['display'] = array(); + $this->flashes['display'] = []; return $return; } @@ -132,7 +132,7 @@ class AutoExpireFlashBag implements FlashBagInterface */ public function has($type) { - return array_key_exists($type, $this->flashes['display']) && $this->flashes['display'][$type]; + return \array_key_exists($type, $this->flashes['display']) && $this->flashes['display'][$type]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php index 12fb740c..f5d984af 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php @@ -19,7 +19,7 @@ namespace Symfony\Component\HttpFoundation\Session\Flash; class FlashBag implements FlashBagInterface { private $name = 'flashes'; - private $flashes = array(); + private $flashes = []; private $storageKey; /** @@ -62,7 +62,7 @@ class FlashBag implements FlashBagInterface /** * {@inheritdoc} */ - public function peek($type, array $default = array()) + public function peek($type, array $default = []) { return $this->has($type) ? $this->flashes[$type] : $default; } @@ -78,7 +78,7 @@ class FlashBag implements FlashBagInterface /** * {@inheritdoc} */ - public function get($type, array $default = array()) + public function get($type, array $default = []) { if (!$this->has($type)) { return $default; @@ -97,7 +97,7 @@ class FlashBag implements FlashBagInterface public function all() { $return = $this->peekAll(); - $this->flashes = array(); + $this->flashes = []; return $return; } @@ -123,7 +123,7 @@ class FlashBag implements FlashBagInterface */ public function has($type) { - return array_key_exists($type, $this->flashes) && $this->flashes[$type]; + return \array_key_exists($type, $this->flashes) && $this->flashes[$type]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php index f53c9dae..2bd1d62b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php @@ -44,7 +44,7 @@ interface FlashBagInterface extends SessionBagInterface * * @return array */ - public function peek($type, array $default = array()); + public function peek($type, array $default = []); /** * Gets all flash messages. @@ -61,7 +61,7 @@ interface FlashBagInterface extends SessionBagInterface * * @return array */ - public function get($type, array $default = array()); + public function get($type, array $default = []); /** * Gets and clears flashes from the stack. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php index 33499068..867ceba9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php @@ -28,7 +28,7 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable private $flashName; private $attributeName; - private $data = array(); + private $data = []; private $usageIndex = 0; /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php index 0d119498..eb09c0b5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php @@ -113,7 +113,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess } if (null === $this->igbinaryEmptyData) { // see https://github.com/igbinary/igbinary/issues/146 - $this->igbinaryEmptyData = \function_exists('igbinary_serialize') ? igbinary_serialize(array()) : ''; + $this->igbinaryEmptyData = \function_exists('igbinary_serialize') ? igbinary_serialize([]) : ''; } if ('' === $data || $this->igbinaryEmptyData === $data) { return $this->destroy($sessionId); @@ -138,7 +138,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess $sessionCookie = sprintf(' %s=', urlencode($this->sessionName)); $sessionCookieWithId = sprintf('%s%s;', $sessionCookie, urlencode($sessionId)); $sessionCookieFound = false; - $otherCookies = array(); + $otherCookies = []; foreach (headers_list() as $h) { if (0 !== stripos($h, 'Set-Cookie:')) { continue; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php index 1b12c921..3abc33ca 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php @@ -44,9 +44,9 @@ class MemcacheSessionHandler implements \SessionHandlerInterface * * @throws \InvalidArgumentException When unsupported options are passed */ - public function __construct(\Memcache $memcache, array $options = array()) + public function __construct(\Memcache $memcache, array $options = []) { - if ($diff = array_diff(array_keys($options), array('prefix', 'expiretime'))) { + if ($diff = array_diff(array_keys($options), ['prefix', 'expiretime'])) { throw new \InvalidArgumentException(sprintf('The following options are not supported "%s"', implode(', ', $diff))); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php index 61a7afd9..1db590b3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php @@ -45,11 +45,11 @@ class MemcachedSessionHandler extends AbstractSessionHandler * * @throws \InvalidArgumentException When unsupported options are passed */ - public function __construct(\Memcached $memcached, array $options = array()) + public function __construct(\Memcached $memcached, array $options = []) { $this->memcached = $memcached; - if ($diff = array_diff(array_keys($options), array('prefix', 'expiretime'))) { + if ($diff = array_diff(array_keys($options), ['prefix', 'expiretime'])) { throw new \InvalidArgumentException(sprintf('The following options are not supported "%s"', implode(', ', $diff))); } @@ -62,7 +62,7 @@ class MemcachedSessionHandler extends AbstractSessionHandler */ public function close() { - return true; + return $this->memcached->quit(); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php index 7d3fa218..3b5ccaa8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -83,12 +83,12 @@ class MongoDbSessionHandler extends AbstractSessionHandler $this->mongo = $mongo; - $this->options = array_merge(array( + $this->options = array_merge([ 'id_field' => '_id', 'data_field' => 'data', 'time_field' => 'time', 'expiry_field' => 'expires_at', - ), $options); + ], $options); } /** @@ -106,9 +106,9 @@ class MongoDbSessionHandler extends AbstractSessionHandler { $methodName = $this->mongo instanceof \MongoDB\Client ? 'deleteOne' : 'remove'; - $this->getCollection()->$methodName(array( + $this->getCollection()->$methodName([ $this->options['id_field'] => $sessionId, - )); + ]); return true; } @@ -120,9 +120,9 @@ class MongoDbSessionHandler extends AbstractSessionHandler { $methodName = $this->mongo instanceof \MongoDB\Client ? 'deleteMany' : 'remove'; - $this->getCollection()->$methodName(array( - $this->options['expiry_field'] => array('$lt' => $this->createDateTime()), - )); + $this->getCollection()->$methodName([ + $this->options['expiry_field'] => ['$lt' => $this->createDateTime()], + ]); return true; } @@ -134,12 +134,12 @@ class MongoDbSessionHandler extends AbstractSessionHandler { $expiry = $this->createDateTime(time() + (int) ini_get('session.gc_maxlifetime')); - $fields = array( + $fields = [ $this->options['time_field'] => $this->createDateTime(), $this->options['expiry_field'] => $expiry, - ); + ]; - $options = array('upsert' => true); + $options = ['upsert' => true]; if ($this->mongo instanceof \MongoDB\Client) { $fields[$this->options['data_field']] = new \MongoDB\BSON\Binary($data, \MongoDB\BSON\Binary::TYPE_OLD_BINARY); @@ -151,8 +151,8 @@ class MongoDbSessionHandler extends AbstractSessionHandler $methodName = $this->mongo instanceof \MongoDB\Client ? 'updateOne' : 'update'; $this->getCollection()->$methodName( - array($this->options['id_field'] => $sessionId), - array('$set' => $fields), + [$this->options['id_field'] => $sessionId], + ['$set' => $fields], $options ); @@ -168,18 +168,18 @@ class MongoDbSessionHandler extends AbstractSessionHandler if ($this->mongo instanceof \MongoDB\Client) { $methodName = 'updateOne'; - $options = array(); + $options = []; } else { $methodName = 'update'; - $options = array('multiple' => false); + $options = ['multiple' => false]; } $this->getCollection()->$methodName( - array($this->options['id_field'] => $sessionId), - array('$set' => array( + [$this->options['id_field'] => $sessionId], + ['$set' => [ $this->options['time_field'] => $this->createDateTime(), $this->options['expiry_field'] => $expiry, - )), + ]], $options ); @@ -191,10 +191,10 @@ class MongoDbSessionHandler extends AbstractSessionHandler */ protected function doRead($sessionId) { - $dbData = $this->getCollection()->findOne(array( + $dbData = $this->getCollection()->findOne([ $this->options['id_field'] => $sessionId, - $this->options['expiry_field'] => array('$gte' => $this->createDateTime()), - )); + $this->options['expiry_field'] => ['$gte' => $this->createDateTime()], + ]); if (null === $dbData) { return ''; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php index 8c0c42fd..bc088e77 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php @@ -118,7 +118,7 @@ class PdoSessionHandler extends AbstractSessionHandler /** * @var array Connection options when lazy-connect */ - private $connectionOptions = array(); + private $connectionOptions = []; /** * @var int The strategy for locking, see constants @@ -130,7 +130,7 @@ class PdoSessionHandler extends AbstractSessionHandler * * @var \PDOStatement[] An array of statements to release advisory locks */ - private $unlockStatements = array(); + private $unlockStatements = []; /** * @var bool True when the current session exists but expired according to session.gc_maxlifetime @@ -161,7 +161,7 @@ class PdoSessionHandler extends AbstractSessionHandler * * db_time_col: The column where to store the timestamp [default: sess_time] * * db_username: The username when lazy-connect [default: ''] * * db_password: The password when lazy-connect [default: ''] - * * db_connection_options: An array of driver-specific connection options [default: array()] + * * db_connection_options: An array of driver-specific connection options [default: []] * * lock_mode: The strategy for locking, see constants [default: LOCK_TRANSACTIONAL] * * @param \PDO|string|null $pdoOrDsn A \PDO instance or DSN string or URL string or null @@ -169,7 +169,7 @@ class PdoSessionHandler extends AbstractSessionHandler * * @throws \InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION */ - public function __construct($pdoOrDsn = null, array $options = array()) + public function __construct($pdoOrDsn = null, array $options = []) { if ($pdoOrDsn instanceof \PDO) { if (\PDO::ERRMODE_EXCEPTION !== $pdoOrDsn->getAttribute(\PDO::ATTR_ERRMODE)) { @@ -468,13 +468,13 @@ class PdoSessionHandler extends AbstractSessionHandler throw new \InvalidArgumentException('URLs without scheme are not supported to configure the PdoSessionHandler'); } - $driverAliasMap = array( + $driverAliasMap = [ 'mssql' => 'sqlsrv', 'mysql2' => 'mysql', // Amazon RDS, for some weird reason 'postgres' => 'pgsql', 'postgresql' => 'pgsql', 'sqlite3' => 'sqlite', - ); + ]; $driver = isset($driverAliasMap[$params['scheme']]) ? $driverAliasMap[$params['scheme']] : $params['scheme']; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php index 6f59af48..a62f108b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php @@ -39,7 +39,7 @@ class MetadataBag implements SessionBagInterface /** * @var array */ - protected $meta = array(self::CREATED => 0, self::UPDATED => 0, self::LIFETIME => 0); + protected $meta = [self::CREATED => 0, self::UPDATED => 0, self::LIFETIME => 0]; /** * Unix timestamp. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php index 027f4eff..c1e7523c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php @@ -50,7 +50,7 @@ class MockArraySessionStorage implements SessionStorageInterface /** * @var array */ - protected $data = array(); + protected $data = []; /** * @var MetadataBag @@ -60,7 +60,7 @@ class MockArraySessionStorage implements SessionStorageInterface /** * @var array|SessionBagInterface[] */ - protected $bags = array(); + protected $bags = []; /** * @param string $name Session name @@ -170,7 +170,7 @@ class MockArraySessionStorage implements SessionStorageInterface } // clear out the session - $this->data = array(); + $this->data = []; // reconnect the bags to the session $this->loadSession(); @@ -242,11 +242,11 @@ class MockArraySessionStorage implements SessionStorageInterface protected function loadSession() { - $bags = array_merge($this->bags, array($this->metadataBag)); + $bags = array_merge($this->bags, [$this->metadataBag]); foreach ($bags as $bag) { $key = $bag->getStorageKey(); - $this->data[$key] = isset($this->data[$key]) ? $this->data[$key] : array(); + $this->data[$key] = isset($this->data[$key]) ? $this->data[$key] : []; $bag->initialize($this->data[$key]); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php index 14f42700..9bbd1baf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php @@ -98,7 +98,7 @@ class MockFileSessionStorage extends MockArraySessionStorage unset($data[$key]); } } - if (array($key = $this->metadataBag->getStorageKey()) === array_keys($data)) { + if ([$key = $this->metadataBag->getStorageKey()] === array_keys($data)) { unset($data[$key]); } @@ -145,7 +145,7 @@ class MockFileSessionStorage extends MockArraySessionStorage private function read() { $filePath = $this->getFilePath(); - $this->data = is_readable($filePath) && is_file($filePath) ? unserialize(file_get_contents($filePath)) : array(); + $this->data = is_readable($filePath) && is_file($filePath) ? unserialize(file_get_contents($filePath)) : []; $this->loadSession(); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php index a18f812d..c4dbe758 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php @@ -26,7 +26,7 @@ class NativeSessionStorage implements SessionStorageInterface /** * @var SessionBagInterface[] */ - protected $bags = array(); + protected $bags = []; /** * @var bool @@ -98,14 +98,14 @@ class NativeSessionStorage implements SessionStorageInterface * @param \SessionHandlerInterface|null $handler * @param MetadataBag $metaBag MetadataBag */ - public function __construct(array $options = array(), $handler = null, MetadataBag $metaBag = null) + public function __construct(array $options = [], $handler = null, MetadataBag $metaBag = null) { - $options += array( + $options += [ 'cache_limiter' => '', 'cache_expire' => 0, 'use_cookies' => 1, 'lazy_write' => 1, - ); + ]; session_register_shutdown(); @@ -226,7 +226,7 @@ class NativeSessionStorage implements SessionStorageInterface unset($_SESSION[$key]); } } - if (array($key = $this->metadataBag->getStorageKey()) === array_keys($_SESSION)) { + if ([$key = $this->metadataBag->getStorageKey()] === array_keys($_SESSION)) { unset($_SESSION[$key]); } @@ -262,7 +262,7 @@ class NativeSessionStorage implements SessionStorageInterface } // clear out the session - $_SESSION = array(); + $_SESSION = []; // reconnect the bags to the session $this->loadSession(); @@ -331,7 +331,7 @@ class NativeSessionStorage implements SessionStorageInterface * For convenience we omit 'session.' from the beginning of the keys. * Explicitly ignores other ini keys. * - * @param array $options Session ini directives array(key => value) + * @param array $options Session ini directives [key => value] * * @see http://php.net/session.configuration */ @@ -341,7 +341,7 @@ class NativeSessionStorage implements SessionStorageInterface return; } - $validOptions = array_flip(array( + $validOptions = array_flip([ 'cache_expire', 'cache_limiter', 'cookie_domain', 'cookie_httponly', 'cookie_lifetime', 'cookie_path', 'cookie_secure', 'entropy_file', 'entropy_length', 'gc_divisor', @@ -352,7 +352,7 @@ class NativeSessionStorage implements SessionStorageInterface 'upload_progress.cleanup', 'upload_progress.prefix', 'upload_progress.name', 'upload_progress.freq', 'upload_progress.min_freq', 'url_rewriter.tags', 'sid_length', 'sid_bits_per_character', 'trans_sid_hosts', 'trans_sid_tags', - )); + ]); foreach ($options as $key => $value) { if (isset($validOptions[$key])) { @@ -422,11 +422,11 @@ class NativeSessionStorage implements SessionStorageInterface $session = &$_SESSION; } - $bags = array_merge($this->bags, array($this->metadataBag)); + $bags = array_merge($this->bags, [$this->metadataBag]); foreach ($bags as $bag) { $key = $bag->getStorageKey(); - $session[$key] = isset($session[$key]) ? $session[$key] : array(); + $session[$key] = isset($session[$key]) ? $session[$key] : []; $bag->initialize($session[$key]); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/StreamedResponse.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/StreamedResponse.php index 3a55d5d2..8bc5fc91 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/StreamedResponse.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/StreamedResponse.php @@ -35,7 +35,7 @@ class StreamedResponse extends Response * @param int $status The response status code * @param array $headers An array of response headers */ - public function __construct(callable $callback = null, $status = 200, $headers = array()) + public function __construct(callable $callback = null, $status = 200, $headers = []) { parent::__construct(null, $status, $headers); @@ -55,7 +55,7 @@ class StreamedResponse extends Response * * @return static */ - public static function create($callback = null, $status = 200, $headers = array()) + public static function create($callback = null, $status = 200, $headers = []) { return new static($callback, $status, $headers); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php index cb43bb35..a40a7621 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php @@ -28,24 +28,24 @@ class AcceptHeaderItemTest extends TestCase public function provideFromStringData() { - return array( - array( + return [ + [ 'text/html', - 'text/html', array(), - ), - array( + 'text/html', [], + ], + [ '"this;should,not=matter"', - 'this;should,not=matter', array(), - ), - array( + 'this;should,not=matter', [], + ], + [ "text/plain; charset=utf-8;param=\"this;should,not=matter\";\tfootnotes=true", - 'text/plain', array('charset' => 'utf-8', 'param' => 'this;should,not=matter', 'footnotes' => 'true'), - ), - array( + 'text/plain', ['charset' => 'utf-8', 'param' => 'this;should,not=matter', 'footnotes' => 'true'], + ], + [ '"this;should,not=matter";charset=utf-8', - 'this;should,not=matter', array('charset' => 'utf-8'), - ), - ); + 'this;should,not=matter', ['charset' => 'utf-8'], + ], + ]; } /** @@ -59,21 +59,21 @@ class AcceptHeaderItemTest extends TestCase public function provideToStringData() { - return array( - array( - 'text/html', array(), + return [ + [ + 'text/html', [], 'text/html', - ), - array( - 'text/plain', array('charset' => 'utf-8', 'param' => 'this;should,not=matter', 'footnotes' => 'true'), + ], + [ + 'text/plain', ['charset' => 'utf-8', 'param' => 'this;should,not=matter', 'footnotes' => 'true'], 'text/plain;charset=utf-8;param="this;should,not=matter";footnotes=true', - ), - ); + ], + ]; } public function testValue() { - $item = new AcceptHeaderItem('value', array()); + $item = new AcceptHeaderItem('value', []); $this->assertEquals('value', $item->getValue()); $item->setValue('new value'); @@ -85,7 +85,7 @@ class AcceptHeaderItemTest extends TestCase public function testQuality() { - $item = new AcceptHeaderItem('value', array()); + $item = new AcceptHeaderItem('value', []); $this->assertEquals(1.0, $item->getQuality()); $item->setQuality(0.5); @@ -98,14 +98,14 @@ class AcceptHeaderItemTest extends TestCase public function testAttribute() { - $item = new AcceptHeaderItem('value', array()); - $this->assertEquals(array(), $item->getAttributes()); + $item = new AcceptHeaderItem('value', []); + $this->assertEquals([], $item->getAttributes()); $this->assertFalse($item->hasAttribute('test')); $this->assertNull($item->getAttribute('test')); $this->assertEquals('default', $item->getAttribute('test', 'default')); $item->setAttribute('test', 'value'); - $this->assertEquals(array('test' => 'value'), $item->getAttributes()); + $this->assertEquals(['test' => 'value'], $item->getAttributes()); $this->assertTrue($item->hasAttribute('test')); $this->assertEquals('value', $item->getAttribute('test')); $this->assertEquals('value', $item->getAttribute('test', 'default')); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php index 9929eac2..31998696 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php @@ -39,13 +39,13 @@ class AcceptHeaderTest extends TestCase public function provideFromStringData() { - return array( - array('', array()), - array('gzip', array(new AcceptHeaderItem('gzip'))), - array('gzip,deflate,sdch', array(new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch'))), - array("gzip, deflate\t,sdch", array(new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch'))), - array('"this;should,not=matter"', array(new AcceptHeaderItem('this;should,not=matter'))), - ); + return [ + ['', []], + ['gzip', [new AcceptHeaderItem('gzip')]], + ['gzip,deflate,sdch', [new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch')]], + ["gzip, deflate\t,sdch", [new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch')]], + ['"this;should,not=matter"', [new AcceptHeaderItem('this;should,not=matter')]], + ]; } /** @@ -59,12 +59,12 @@ class AcceptHeaderTest extends TestCase public function provideToStringData() { - return array( - array(array(), ''), - array(array(new AcceptHeaderItem('gzip')), 'gzip'), - array(array(new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch')), 'gzip,deflate,sdch'), - array(array(new AcceptHeaderItem('this;should,not=matter')), 'this;should,not=matter'), - ); + return [ + [[], ''], + [[new AcceptHeaderItem('gzip')], 'gzip'], + [[new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch')], 'gzip,deflate,sdch'], + [[new AcceptHeaderItem('this;should,not=matter')], 'this;should,not=matter'], + ]; } /** @@ -78,9 +78,9 @@ class AcceptHeaderTest extends TestCase public function provideFilterData() { - return array( - array('fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4', '/fr.*/', array('fr-FR', 'fr')), - ); + return [ + ['fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4', '/fr.*/', ['fr-FR', 'fr']], + ]; } /** @@ -94,10 +94,10 @@ class AcceptHeaderTest extends TestCase public function provideSortingData() { - return array( - 'quality has priority' => array('*;q=0.3,ISO-8859-1,utf-8;q=0.7', array('ISO-8859-1', 'utf-8', '*')), - 'order matters when q is equal' => array('*;q=0.3,ISO-8859-1;q=0.7,utf-8;q=0.7', array('ISO-8859-1', 'utf-8', '*')), - 'order matters when q is equal2' => array('*;q=0.3,utf-8;q=0.7,ISO-8859-1;q=0.7', array('utf-8', 'ISO-8859-1', '*')), - ); + return [ + 'quality has priority' => ['*;q=0.3,ISO-8859-1,utf-8;q=0.7', ['ISO-8859-1', 'utf-8', '*']], + 'order matters when q is equal' => ['*;q=0.3,ISO-8859-1;q=0.7,utf-8;q=0.7', ['ISO-8859-1', 'utf-8', '*']], + 'order matters when q is equal2' => ['*;q=0.3,utf-8;q=0.7,ISO-8859-1;q=0.7', ['utf-8', 'ISO-8859-1', '*']], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php index 157ab90e..6fa3b889 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php @@ -31,63 +31,63 @@ class ApacheRequestTest extends TestCase public function provideServerVars() { - return array( - array( - array( + return [ + [ + [ 'REQUEST_URI' => '/foo/app_dev.php/bar', 'SCRIPT_NAME' => '/foo/app_dev.php', 'PATH_INFO' => '/bar', - ), + ], '/foo/app_dev.php/bar', '/foo/app_dev.php', '/bar', - ), - array( - array( + ], + [ + [ 'REQUEST_URI' => '/foo/bar', 'SCRIPT_NAME' => '/foo/app_dev.php', - ), + ], '/foo/bar', '/foo', '/bar', - ), - array( - array( + ], + [ + [ 'REQUEST_URI' => '/app_dev.php/foo/bar', 'SCRIPT_NAME' => '/app_dev.php', 'PATH_INFO' => '/foo/bar', - ), + ], '/app_dev.php/foo/bar', '/app_dev.php', '/foo/bar', - ), - array( - array( + ], + [ + [ 'REQUEST_URI' => '/foo/bar', 'SCRIPT_NAME' => '/app_dev.php', - ), + ], '/foo/bar', '', '/foo/bar', - ), - array( - array( + ], + [ + [ 'REQUEST_URI' => '/app_dev.php', 'SCRIPT_NAME' => '/app_dev.php', - ), + ], '/app_dev.php', '/app_dev.php', '/', - ), - array( - array( + ], + [ + [ 'REQUEST_URI' => '/', 'SCRIPT_NAME' => '/app_dev.php', - ), + ], '/', '', '/', - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php index d21791f0..c89f20d0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php @@ -22,14 +22,14 @@ class BinaryFileResponseTest extends ResponseTestCase public function testConstruction() { $file = __DIR__.'/../README.md'; - $response = new BinaryFileResponse($file, 404, array('X-Header' => 'Foo'), true, null, true, true); + $response = new BinaryFileResponse($file, 404, ['X-Header' => 'Foo'], true, null, true, true); $this->assertEquals(404, $response->getStatusCode()); $this->assertEquals('Foo', $response->headers->get('X-Header')); $this->assertTrue($response->headers->has('ETag')); $this->assertTrue($response->headers->has('Last-Modified')); $this->assertFalse($response->headers->has('Content-Disposition')); - $response = BinaryFileResponse::create($file, 404, array(), true, ResponseHeaderBag::DISPOSITION_INLINE); + $response = BinaryFileResponse::create($file, 404, [], true, ResponseHeaderBag::DISPOSITION_INLINE); $this->assertEquals(404, $response->getStatusCode()); $this->assertFalse($response->headers->has('ETag')); $this->assertEquals('inline; filename="README.md"', $response->headers->get('Content-Disposition')); @@ -39,7 +39,7 @@ class BinaryFileResponseTest extends ResponseTestCase { touch(sys_get_temp_dir().'/fööö.html'); - $response = new BinaryFileResponse(sys_get_temp_dir().'/fööö.html', 200, array(), true, 'attachment'); + $response = new BinaryFileResponse(sys_get_temp_dir().'/fööö.html', 200, [], true, 'attachment'); @unlink(sys_get_temp_dir().'/fööö.html'); @@ -85,7 +85,7 @@ class BinaryFileResponseTest extends ResponseTestCase */ public function testRequests($requestRange, $offset, $length, $responseRange) { - $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream'))->setAutoEtag(); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream'])->setAutoEtag(); // do a request to get the ETag $request = Request::create('/'); @@ -117,7 +117,7 @@ class BinaryFileResponseTest extends ResponseTestCase */ public function testRequestsWithoutEtag($requestRange, $offset, $length, $responseRange) { - $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream')); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream']); // do a request to get the LastModified $request = Request::create('/'); @@ -145,19 +145,19 @@ class BinaryFileResponseTest extends ResponseTestCase public function provideRanges() { - return array( - array('bytes=1-4', 1, 4, 'bytes 1-4/35'), - array('bytes=-5', 30, 5, 'bytes 30-34/35'), - array('bytes=30-', 30, 5, 'bytes 30-34/35'), - array('bytes=30-30', 30, 1, 'bytes 30-30/35'), - array('bytes=30-34', 30, 5, 'bytes 30-34/35'), - ); + return [ + ['bytes=1-4', 1, 4, 'bytes 1-4/35'], + ['bytes=-5', 30, 5, 'bytes 30-34/35'], + ['bytes=30-', 30, 5, 'bytes 30-34/35'], + ['bytes=30-30', 30, 1, 'bytes 30-30/35'], + ['bytes=30-34', 30, 5, 'bytes 30-34/35'], + ]; } public function testRangeRequestsWithoutLastModifiedDate() { // prevent auto last modified - $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream'), true, null, false, false); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream'], true, null, false, false); // prepare a request for a range of the testing file $request = Request::create('/'); @@ -178,7 +178,7 @@ class BinaryFileResponseTest extends ResponseTestCase */ public function testFullFileRequests($requestRange) { - $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream'))->setAutoEtag(); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream'])->setAutoEtag(); // prepare a request for a range of the testing file $request = Request::create('/'); @@ -198,14 +198,14 @@ class BinaryFileResponseTest extends ResponseTestCase public function provideFullFileRanges() { - return array( - array('bytes=0-'), - array('bytes=0-34'), - array('bytes=-35'), + return [ + ['bytes=0-'], + ['bytes=0-34'], + ['bytes=-35'], // Syntactical invalid range-request should also return the full resource - array('bytes=20-10'), - array('bytes=50-40'), - ); + ['bytes=20-10'], + ['bytes=50-40'], + ]; } public function testUnpreparedResponseSendsFullFile() @@ -226,7 +226,7 @@ class BinaryFileResponseTest extends ResponseTestCase */ public function testInvalidRequests($requestRange) { - $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream'))->setAutoEtag(); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream'])->setAutoEtag(); // prepare a request for a range of the testing file $request = Request::create('/'); @@ -242,10 +242,10 @@ class BinaryFileResponseTest extends ResponseTestCase public function provideInvalidRanges() { - return array( - array('bytes=-40'), - array('bytes=30-40'), - ); + return [ + ['bytes=-40'], + ['bytes=30-40'], + ]; } /** @@ -257,7 +257,7 @@ class BinaryFileResponseTest extends ResponseTestCase $request->headers->set('X-Sendfile-Type', 'X-Sendfile'); BinaryFileResponse::trustXSendfileTypeHeader(); - $response = BinaryFileResponse::create($file, 200, array('Content-Type' => 'application/octet-stream')); + $response = BinaryFileResponse::create($file, 200, ['Content-Type' => 'application/octet-stream']); $response->prepare($request); $this->expectOutputString(''); @@ -268,10 +268,10 @@ class BinaryFileResponseTest extends ResponseTestCase public function provideXSendfileFiles() { - return array( - array(__DIR__.'/../README.md'), - array('file://'.__DIR__.'/../README.md'), - ); + return [ + [__DIR__.'/../README.md'], + ['file://'.__DIR__.'/../README.md'], + ]; } /** @@ -286,7 +286,7 @@ class BinaryFileResponseTest extends ResponseTestCase $file = new FakeFile($realpath, __DIR__.'/File/Fixtures/test'); BinaryFileResponse::trustXSendfileTypeHeader(); - $response = new BinaryFileResponse($file, 200, array('Content-Type' => 'application/octet-stream')); + $response = new BinaryFileResponse($file, 200, ['Content-Type' => 'application/octet-stream']); $reflection = new \ReflectionObject($response); $property = $reflection->getProperty('file'); $property->setAccessible(true); @@ -305,7 +305,7 @@ class BinaryFileResponseTest extends ResponseTestCase $realPath = realpath($path); $this->assertFileExists($realPath); - $response = new BinaryFileResponse($realPath, 200, array('Content-Type' => 'application/octet-stream')); + $response = new BinaryFileResponse($realPath, 200, ['Content-Type' => 'application/octet-stream']); $response->deleteFileAfterSend(true); $response->prepare($request); @@ -317,7 +317,7 @@ class BinaryFileResponseTest extends ResponseTestCase public function testAcceptRangeOnUnsafeMethods() { $request = Request::create('/', 'POST'); - $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream')); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream']); $response->prepare($request); $this->assertEquals('none', $response->headers->get('Accept-Ranges')); @@ -326,7 +326,7 @@ class BinaryFileResponseTest extends ResponseTestCase public function testAcceptRangeNotOverriden() { $request = Request::create('/', 'POST'); - $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream')); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream']); $response->headers->set('Accept-Ranges', 'foo'); $response->prepare($request); @@ -335,16 +335,16 @@ class BinaryFileResponseTest extends ResponseTestCase public function getSampleXAccelMappings() { - return array( - array('/var/www/var/www/files/foo.txt', '/var/www/=/files/', '/files/var/www/files/foo.txt'), - array('/home/foo/bar.txt', '/var/www/=/files/,/home/foo/=/baz/', '/baz/bar.txt'), - ); + return [ + ['/var/www/var/www/files/foo.txt', '/var/www/=/files/', '/files/var/www/files/foo.txt'], + ['/home/foo/bar.txt', '/var/www/=/files/,/home/foo/=/baz/', '/baz/bar.txt'], + ]; } public function testStream() { $request = Request::create('/'); - $response = new BinaryFileResponse(new Stream(__DIR__.'/../README.md'), 200, array('Content-Type' => 'text/plain')); + $response = new BinaryFileResponse(new Stream(__DIR__.'/../README.md'), 200, ['Content-Type' => 'text/plain']); $response->prepare($request); $this->assertNull($response->headers->get('Content-Length')); @@ -352,7 +352,7 @@ class BinaryFileResponseTest extends ResponseTestCase protected function provideResponse() { - return new BinaryFileResponse(__DIR__.'/../README.md', 200, array('Content-Type' => 'application/octet-stream')); + return new BinaryFileResponse(__DIR__.'/../README.md', 200, ['Content-Type' => 'application/octet-stream']); } public static function tearDownAfterClass() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php index 14c45c9a..aaf2edb3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php @@ -26,17 +26,17 @@ class CookieTest extends TestCase { public function invalidNames() { - return array( - array(''), - array(',MyName'), - array(';MyName'), - array(' MyName'), - array("\tMyName"), - array("\rMyName"), - array("\nMyName"), - array("\013MyName"), - array("\014MyName"), - ); + return [ + [''], + [',MyName'], + [';MyName'], + [' MyName'], + ["\tMyName"], + ["\rMyName"], + ["\nMyName"], + ["\013MyName"], + ["\014MyName"], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php index 1152e46c..2afdade6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php @@ -55,15 +55,15 @@ class ExpressionRequestMatcherTest extends TestCase public function provideExpressions() { - return array( - array('request.getMethod() == method', true), - array('request.getPathInfo() == path', true), - array('request.getHost() == host', true), - array('request.getClientIp() == ip', true), - array('request.attributes.all() == attributes', true), - array('request.getMethod() == method && request.getPathInfo() == path && request.getHost() == host && request.getClientIp() == ip && request.attributes.all() == attributes', true), - array('request.getMethod() != method', false), - array('request.getMethod() != method && request.getPathInfo() == path && request.getHost() == host && request.getClientIp() == ip && request.attributes.all() == attributes', false), - ); + return [ + ['request.getMethod() == method', true], + ['request.getPathInfo() == path', true], + ['request.getHost() == host', true], + ['request.getClientIp() == ip', true], + ['request.attributes.all() == attributes', true], + ['request.getMethod() == method && request.getPathInfo() == path && request.getHost() == host && request.getClientIp() == ip && request.attributes.all() == attributes', true], + ['request.getMethod() != method', false], + ['request.getMethod() != method && request.getPathInfo() == path && request.getHost() == host && request.getClientIp() == ip && request.attributes.all() == attributes', false], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php index dbd9c44b..fb82dae7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php @@ -110,14 +110,14 @@ class FileTest extends TestCase public function getFilenameFixtures() { - return array( - array('original.gif', 'original.gif'), - array('..\\..\\original.gif', 'original.gif'), - array('../../original.gif', 'original.gif'), - array('файлfile.gif', 'файлfile.gif'), - array('..\\..\\файлfile.gif', 'файлfile.gif'), - array('../../файлfile.gif', 'файлfile.gif'), - ); + return [ + ['original.gif', 'original.gif'], + ['..\\..\\original.gif', 'original.gif'], + ['../../original.gif', 'original.gif'], + ['файлfile.gif', 'файлfile.gif'], + ['..\\..\\файлfile.gif', 'файлfile.gif'], + ['../../файлfile.gif', 'файлfile.gif'], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php index 1a88d483..9c02b478 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php @@ -249,13 +249,13 @@ class UploadedFileTest extends TestCase public function uploadedFileErrorProvider() { - return array( - array(UPLOAD_ERR_INI_SIZE), - array(UPLOAD_ERR_FORM_SIZE), - array(UPLOAD_ERR_PARTIAL), - array(UPLOAD_ERR_NO_TMP_DIR), - array(UPLOAD_ERR_EXTENSION), - ); + return [ + [UPLOAD_ERR_INI_SIZE], + [UPLOAD_ERR_FORM_SIZE], + [UPLOAD_ERR_PARTIAL], + [UPLOAD_ERR_NO_TMP_DIR], + [UPLOAD_ERR_EXTENSION], + ]; } public function testIsInvalidIfNotHttpUpload() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php index b1bbba0d..0b6d6604 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php @@ -28,7 +28,7 @@ class FileBagTest extends TestCase */ public function testFileMustBeAnArrayOrUploadedFile() { - new FileBag(array('file' => 'foo')); + new FileBag(['file' => 'foo']); } public function testShouldConvertsUploadedFiles() @@ -36,54 +36,54 @@ class FileBagTest extends TestCase $tmpFile = $this->createTempFile(); $file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain', 100, 0); - $bag = new FileBag(array('file' => array( + $bag = new FileBag(['file' => [ 'name' => basename($tmpFile), 'type' => 'text/plain', 'tmp_name' => $tmpFile, 'error' => 0, 'size' => 100, - ))); + ]]); $this->assertEquals($file, $bag->get('file')); } public function testShouldSetEmptyUploadedFilesToNull() { - $bag = new FileBag(array('file' => array( + $bag = new FileBag(['file' => [ 'name' => '', 'type' => '', 'tmp_name' => '', 'error' => UPLOAD_ERR_NO_FILE, 'size' => 0, - ))); + ]]); $this->assertNull($bag->get('file')); } public function testShouldRemoveEmptyUploadedFilesForMultiUpload() { - $bag = new FileBag(array('files' => array( - 'name' => array(''), - 'type' => array(''), - 'tmp_name' => array(''), - 'error' => array(UPLOAD_ERR_NO_FILE), - 'size' => array(0), - ))); + $bag = new FileBag(['files' => [ + 'name' => [''], + 'type' => [''], + 'tmp_name' => [''], + 'error' => [UPLOAD_ERR_NO_FILE], + 'size' => [0], + ]]); - $this->assertSame(array(), $bag->get('files')); + $this->assertSame([], $bag->get('files')); } public function testShouldNotRemoveEmptyUploadedFilesForAssociativeArray() { - $bag = new FileBag(array('files' => array( - 'name' => array('file1' => ''), - 'type' => array('file1' => ''), - 'tmp_name' => array('file1' => ''), - 'error' => array('file1' => UPLOAD_ERR_NO_FILE), - 'size' => array('file1' => 0), - ))); + $bag = new FileBag(['files' => [ + 'name' => ['file1' => ''], + 'type' => ['file1' => ''], + 'tmp_name' => ['file1' => ''], + 'error' => ['file1' => UPLOAD_ERR_NO_FILE], + 'size' => ['file1' => 0], + ]]); - $this->assertSame(array('file1' => null), $bag->get('files')); + $this->assertSame(['file1' => null], $bag->get('files')); } public function testShouldConvertUploadedFilesWithPhpBug() @@ -91,25 +91,25 @@ class FileBagTest extends TestCase $tmpFile = $this->createTempFile(); $file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain', 100, 0); - $bag = new FileBag(array( - 'child' => array( - 'name' => array( + $bag = new FileBag([ + 'child' => [ + 'name' => [ 'file' => basename($tmpFile), - ), - 'type' => array( + ], + 'type' => [ 'file' => 'text/plain', - ), - 'tmp_name' => array( + ], + 'tmp_name' => [ 'file' => $tmpFile, - ), - 'error' => array( + ], + 'error' => [ 'file' => 0, - ), - 'size' => array( + ], + 'size' => [ 'file' => 100, - ), - ), - )); + ], + ], + ]); $files = $bag->all(); $this->assertEquals($file, $files['child']['file']); @@ -120,25 +120,25 @@ class FileBagTest extends TestCase $tmpFile = $this->createTempFile(); $file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain', 100, 0); - $bag = new FileBag(array( - 'child' => array( - 'name' => array( - 'sub' => array('file' => basename($tmpFile)), - ), - 'type' => array( - 'sub' => array('file' => 'text/plain'), - ), - 'tmp_name' => array( - 'sub' => array('file' => $tmpFile), - ), - 'error' => array( - 'sub' => array('file' => 0), - ), - 'size' => array( - 'sub' => array('file' => 100), - ), - ), - )); + $bag = new FileBag([ + 'child' => [ + 'name' => [ + 'sub' => ['file' => basename($tmpFile)], + ], + 'type' => [ + 'sub' => ['file' => 'text/plain'], + ], + 'tmp_name' => [ + 'sub' => ['file' => $tmpFile], + ], + 'error' => [ + 'sub' => ['file' => 0], + ], + 'size' => [ + 'sub' => ['file' => 100], + ], + ], + ]); $files = $bag->all(); $this->assertEquals($file, $files['child']['sub']['file']); @@ -148,7 +148,7 @@ class FileBagTest extends TestCase { $tmpFile = $this->createTempFile(); $file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain', 100, 0); - $bag = new FileBag(array('image' => array('file' => $file))); + $bag = new FileBag(['image' => ['file' => $file]]); $files = $bag->all(); $this->assertEquals($file, $files['image']['file']); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php index c5a437f9..6c4915f2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php @@ -18,7 +18,7 @@ class HeaderBagTest extends TestCase { public function testConstructor() { - $bag = new HeaderBag(array('foo' => 'bar')); + $bag = new HeaderBag(['foo' => 'bar']); $this->assertTrue($bag->has('foo')); } @@ -30,20 +30,20 @@ class HeaderBagTest extends TestCase public function testToStringNotNull() { - $bag = new HeaderBag(array('foo' => 'bar')); + $bag = new HeaderBag(['foo' => 'bar']); $this->assertEquals("Foo: bar\r\n", $bag->__toString()); } public function testKeys() { - $bag = new HeaderBag(array('foo' => 'bar')); + $bag = new HeaderBag(['foo' => 'bar']); $keys = $bag->keys(); $this->assertEquals('foo', $keys[0]); } public function testGetDate() { - $bag = new HeaderBag(array('foo' => 'Tue, 4 Sep 2012 20:00:00 +0200')); + $bag = new HeaderBag(['foo' => 'Tue, 4 Sep 2012 20:00:00 +0200']); $headerDate = $bag->getDate('foo'); $this->assertInstanceOf('DateTime', $headerDate); } @@ -53,7 +53,7 @@ class HeaderBagTest extends TestCase */ public function testGetDateException() { - $bag = new HeaderBag(array('foo' => 'Tue')); + $bag = new HeaderBag(['foo' => 'Tue']); $headerDate = $bag->getDate('foo'); } @@ -67,50 +67,50 @@ class HeaderBagTest extends TestCase public function testAll() { - $bag = new HeaderBag(array('foo' => 'bar')); - $this->assertEquals(array('foo' => array('bar')), $bag->all(), '->all() gets all the input'); + $bag = new HeaderBag(['foo' => 'bar']); + $this->assertEquals(['foo' => ['bar']], $bag->all(), '->all() gets all the input'); - $bag = new HeaderBag(array('FOO' => 'BAR')); - $this->assertEquals(array('foo' => array('BAR')), $bag->all(), '->all() gets all the input key are lower case'); + $bag = new HeaderBag(['FOO' => 'BAR']); + $this->assertEquals(['foo' => ['BAR']], $bag->all(), '->all() gets all the input key are lower case'); } public function testReplace() { - $bag = new HeaderBag(array('foo' => 'bar')); + $bag = new HeaderBag(['foo' => 'bar']); - $bag->replace(array('NOPE' => 'BAR')); - $this->assertEquals(array('nope' => array('BAR')), $bag->all(), '->replace() replaces the input with the argument'); + $bag->replace(['NOPE' => 'BAR']); + $this->assertEquals(['nope' => ['BAR']], $bag->all(), '->replace() replaces the input with the argument'); $this->assertFalse($bag->has('foo'), '->replace() overrides previously set the input'); } public function testGet() { - $bag = new HeaderBag(array('foo' => 'bar', 'fuzz' => 'bizz')); + $bag = new HeaderBag(['foo' => 'bar', 'fuzz' => 'bizz']); $this->assertEquals('bar', $bag->get('foo'), '->get return current value'); $this->assertEquals('bar', $bag->get('FoO'), '->get key in case insensitive'); - $this->assertEquals(array('bar'), $bag->get('foo', 'nope', false), '->get return the value as array'); + $this->assertEquals(['bar'], $bag->get('foo', 'nope', false), '->get return the value as array'); // defaults $this->assertNull($bag->get('none'), '->get unknown values returns null'); $this->assertEquals('default', $bag->get('none', 'default'), '->get unknown values returns default'); - $this->assertEquals(array('default'), $bag->get('none', 'default', false), '->get unknown values returns default as array'); + $this->assertEquals(['default'], $bag->get('none', 'default', false), '->get unknown values returns default as array'); $bag->set('foo', 'bor', false); $this->assertEquals('bar', $bag->get('foo'), '->get return first value'); - $this->assertEquals(array('bar', 'bor'), $bag->get('foo', 'nope', false), '->get return all values as array'); + $this->assertEquals(['bar', 'bor'], $bag->get('foo', 'nope', false), '->get return all values as array'); } public function testSetAssociativeArray() { $bag = new HeaderBag(); - $bag->set('foo', array('bad-assoc-index' => 'value')); + $bag->set('foo', ['bad-assoc-index' => 'value']); $this->assertSame('value', $bag->get('foo')); - $this->assertEquals(array('value'), $bag->get('foo', 'nope', false), 'assoc indices of multi-valued headers are ignored'); + $this->assertEquals(['value'], $bag->get('foo', 'nope', false), 'assoc indices of multi-valued headers are ignored'); } public function testContains() { - $bag = new HeaderBag(array('foo' => 'bar', 'fuzz' => 'bizz')); + $bag = new HeaderBag(['foo' => 'bar', 'fuzz' => 'bizz']); $this->assertTrue($bag->contains('foo', 'bar'), '->contains first value'); $this->assertTrue($bag->contains('fuzz', 'bizz'), '->contains second value'); $this->assertFalse($bag->contains('nope', 'nope'), '->contains unknown value'); @@ -143,7 +143,7 @@ class HeaderBagTest extends TestCase public function testCacheControlDirectiveParsing() { - $bag = new HeaderBag(array('cache-control' => 'public, max-age=10')); + $bag = new HeaderBag(['cache-control' => 'public, max-age=10']); $this->assertTrue($bag->hasCacheControlDirective('public')); $this->assertTrue($bag->getCacheControlDirective('public')); @@ -156,15 +156,15 @@ class HeaderBagTest extends TestCase public function testCacheControlDirectiveParsingQuotedZero() { - $bag = new HeaderBag(array('cache-control' => 'max-age="0"')); + $bag = new HeaderBag(['cache-control' => 'max-age="0"']); $this->assertTrue($bag->hasCacheControlDirective('max-age')); $this->assertEquals(0, $bag->getCacheControlDirective('max-age')); } public function testCacheControlDirectiveOverrideWithReplace() { - $bag = new HeaderBag(array('cache-control' => 'private, max-age=100')); - $bag->replace(array('cache-control' => 'public, max-age=10')); + $bag = new HeaderBag(['cache-control' => 'private, max-age=100']); + $bag->replace(['cache-control' => 'public, max-age=10']); $this->assertTrue($bag->hasCacheControlDirective('public')); $this->assertTrue($bag->getCacheControlDirective('public')); @@ -174,7 +174,7 @@ class HeaderBagTest extends TestCase public function testCacheControlClone() { - $headers = array('foo' => 'bar'); + $headers = ['foo' => 'bar']; $bag1 = new HeaderBag($headers); $bag2 = new HeaderBag($bag1->all()); @@ -183,13 +183,13 @@ class HeaderBagTest extends TestCase public function testGetIterator() { - $headers = array('foo' => 'bar', 'hello' => 'world', 'third' => 'charm'); + $headers = ['foo' => 'bar', 'hello' => 'world', 'third' => 'charm']; $headerBag = new HeaderBag($headers); $i = 0; foreach ($headerBag as $key => $val) { ++$i; - $this->assertEquals(array($headers[$key]), $val); + $this->assertEquals([$headers[$key]], $val); } $this->assertEquals(\count($headers), $i); @@ -197,7 +197,7 @@ class HeaderBagTest extends TestCase public function testCount() { - $headers = array('foo' => 'bar', 'HELLO' => 'WORLD'); + $headers = ['foo' => 'bar', 'HELLO' => 'WORLD']; $headerBag = new HeaderBag($headers); $this->assertCount(\count($headers), $headerBag); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php index 232a2040..c7f76b5d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php @@ -26,20 +26,20 @@ class IpUtilsTest extends TestCase public function getIpv4Data() { - return array( - array(true, '192.168.1.1', '192.168.1.1'), - array(true, '192.168.1.1', '192.168.1.1/1'), - array(true, '192.168.1.1', '192.168.1.0/24'), - array(false, '192.168.1.1', '1.2.3.4/1'), - array(false, '192.168.1.1', '192.168.1.1/33'), // invalid subnet - array(true, '192.168.1.1', array('1.2.3.4/1', '192.168.1.0/24')), - array(true, '192.168.1.1', array('192.168.1.0/24', '1.2.3.4/1')), - array(false, '192.168.1.1', array('1.2.3.4/1', '4.3.2.1/1')), - array(true, '1.2.3.4', '0.0.0.0/0'), - array(true, '1.2.3.4', '192.168.1.0/0'), - array(false, '1.2.3.4', '256.256.256/0'), // invalid CIDR notation - array(false, 'an_invalid_ip', '192.168.1.0/24'), - ); + return [ + [true, '192.168.1.1', '192.168.1.1'], + [true, '192.168.1.1', '192.168.1.1/1'], + [true, '192.168.1.1', '192.168.1.0/24'], + [false, '192.168.1.1', '1.2.3.4/1'], + [false, '192.168.1.1', '192.168.1.1/33'], // invalid subnet + [true, '192.168.1.1', ['1.2.3.4/1', '192.168.1.0/24']], + [true, '192.168.1.1', ['192.168.1.0/24', '1.2.3.4/1']], + [false, '192.168.1.1', ['1.2.3.4/1', '4.3.2.1/1']], + [true, '1.2.3.4', '0.0.0.0/0'], + [true, '1.2.3.4', '192.168.1.0/0'], + [false, '1.2.3.4', '256.256.256/0'], // invalid CIDR notation + [false, 'an_invalid_ip', '192.168.1.0/24'], + ]; } /** @@ -56,20 +56,20 @@ class IpUtilsTest extends TestCase public function getIpv6Data() { - return array( - array(true, '2a01:198:603:0:396e:4789:8e99:890f', '2a01:198:603:0::/65'), - array(false, '2a00:198:603:0:396e:4789:8e99:890f', '2a01:198:603:0::/65'), - array(false, '2a01:198:603:0:396e:4789:8e99:890f', '::1'), - array(true, '0:0:0:0:0:0:0:1', '::1'), - array(false, '0:0:603:0:396e:4789:8e99:0001', '::1'), - array(true, '0:0:603:0:396e:4789:8e99:0001', '::/0'), - array(true, '0:0:603:0:396e:4789:8e99:0001', '2a01:198:603:0::/0'), - array(true, '2a01:198:603:0:396e:4789:8e99:890f', array('::1', '2a01:198:603:0::/65')), - array(true, '2a01:198:603:0:396e:4789:8e99:890f', array('2a01:198:603:0::/65', '::1')), - array(false, '2a01:198:603:0:396e:4789:8e99:890f', array('::1', '1a01:198:603:0::/65')), - array(false, '}__test|O:21:"JDatabaseDriverMysqli":3:{s:2', '::1'), - array(false, '2a01:198:603:0:396e:4789:8e99:890f', 'unknown'), - ); + return [ + [true, '2a01:198:603:0:396e:4789:8e99:890f', '2a01:198:603:0::/65'], + [false, '2a00:198:603:0:396e:4789:8e99:890f', '2a01:198:603:0::/65'], + [false, '2a01:198:603:0:396e:4789:8e99:890f', '::1'], + [true, '0:0:0:0:0:0:0:1', '::1'], + [false, '0:0:603:0:396e:4789:8e99:0001', '::1'], + [true, '0:0:603:0:396e:4789:8e99:0001', '::/0'], + [true, '0:0:603:0:396e:4789:8e99:0001', '2a01:198:603:0::/0'], + [true, '2a01:198:603:0:396e:4789:8e99:890f', ['::1', '2a01:198:603:0::/65']], + [true, '2a01:198:603:0:396e:4789:8e99:890f', ['2a01:198:603:0::/65', '::1']], + [false, '2a01:198:603:0:396e:4789:8e99:890f', ['::1', '1a01:198:603:0::/65']], + [false, '}__test|O:21:"JDatabaseDriverMysqli":3:{s:2', '::1'], + [false, '2a01:198:603:0:396e:4789:8e99:890f', 'unknown'], + ]; } /** @@ -95,10 +95,10 @@ class IpUtilsTest extends TestCase public function invalidIpAddressData() { - return array( - 'invalid proxy wildcard' => array('192.168.20.13', '*'), - 'invalid proxy missing netmask' => array('192.168.20.13', '0.0.0.0'), - 'invalid request IP with invalid proxy wildcard' => array('0.0.0.0', '*'), - ); + return [ + 'invalid proxy wildcard' => ['192.168.20.13', '*'], + 'invalid proxy missing netmask' => ['192.168.20.13', '0.0.0.0'], + 'invalid request IP with invalid proxy wildcard' => ['0.0.0.0', '*'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php index 6687fde5..5425896d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php @@ -33,13 +33,13 @@ class JsonResponseTest extends TestCase public function testConstructorWithArrayCreatesJsonArray() { - $response = new JsonResponse(array(0, 1, 2, 3)); + $response = new JsonResponse([0, 1, 2, 3]); $this->assertSame('[0,1,2,3]', $response->getContent()); } public function testConstructorWithAssocArrayCreatesJsonObject() { - $response = new JsonResponse(array('foo' => 'bar')); + $response = new JsonResponse(['foo' => 'bar']); $this->assertSame('{"foo":"bar"}', $response->getContent()); } @@ -60,7 +60,7 @@ class JsonResponseTest extends TestCase public function testConstructorWithCustomStatus() { - $response = new JsonResponse(array(), 202); + $response = new JsonResponse([], 202); $this->assertSame(202, $response->getStatusCode()); } @@ -72,35 +72,35 @@ class JsonResponseTest extends TestCase public function testConstructorWithCustomHeaders() { - $response = new JsonResponse(array(), 200, array('ETag' => 'foo')); + $response = new JsonResponse([], 200, ['ETag' => 'foo']); $this->assertSame('application/json', $response->headers->get('Content-Type')); $this->assertSame('foo', $response->headers->get('ETag')); } public function testConstructorWithCustomContentType() { - $headers = array('Content-Type' => 'application/vnd.acme.blog-v1+json'); + $headers = ['Content-Type' => 'application/vnd.acme.blog-v1+json']; - $response = new JsonResponse(array(), 200, $headers); + $response = new JsonResponse([], 200, $headers); $this->assertSame('application/vnd.acme.blog-v1+json', $response->headers->get('Content-Type')); } public function testSetJson() { - $response = new JsonResponse('1', 200, array(), true); + $response = new JsonResponse('1', 200, [], true); $this->assertEquals('1', $response->getContent()); - $response = new JsonResponse('[1]', 200, array(), true); + $response = new JsonResponse('[1]', 200, [], true); $this->assertEquals('[1]', $response->getContent()); - $response = new JsonResponse(null, 200, array()); + $response = new JsonResponse(null, 200, []); $response->setJson('true'); $this->assertEquals('true', $response->getContent()); } public function testCreate() { - $response = JsonResponse::create(array('foo' => 'bar'), 204); + $response = JsonResponse::create(['foo' => 'bar'], 204); $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response); $this->assertEquals('{"foo":"bar"}', $response->getContent()); @@ -116,14 +116,14 @@ class JsonResponseTest extends TestCase public function testStaticCreateJsonArray() { - $response = JsonResponse::create(array(0, 1, 2, 3)); + $response = JsonResponse::create([0, 1, 2, 3]); $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response); $this->assertSame('[0,1,2,3]', $response->getContent()); } public function testStaticCreateJsonObject() { - $response = JsonResponse::create(array('foo' => 'bar')); + $response = JsonResponse::create(['foo' => 'bar']); $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response); $this->assertSame('{"foo":"bar"}', $response->getContent()); } @@ -149,7 +149,7 @@ class JsonResponseTest extends TestCase public function testStaticCreateWithCustomStatus() { - $response = JsonResponse::create(array(), 202); + $response = JsonResponse::create([], 202); $this->assertSame(202, $response->getStatusCode()); } @@ -161,22 +161,22 @@ class JsonResponseTest extends TestCase public function testStaticCreateWithCustomHeaders() { - $response = JsonResponse::create(array(), 200, array('ETag' => 'foo')); + $response = JsonResponse::create([], 200, ['ETag' => 'foo']); $this->assertSame('application/json', $response->headers->get('Content-Type')); $this->assertSame('foo', $response->headers->get('ETag')); } public function testStaticCreateWithCustomContentType() { - $headers = array('Content-Type' => 'application/vnd.acme.blog-v1+json'); + $headers = ['Content-Type' => 'application/vnd.acme.blog-v1+json']; - $response = JsonResponse::create(array(), 200, $headers); + $response = JsonResponse::create([], 200, $headers); $this->assertSame('application/vnd.acme.blog-v1+json', $response->headers->get('Content-Type')); } public function testSetCallback() { - $response = JsonResponse::create(array('foo' => 'bar'))->setCallback('callback'); + $response = JsonResponse::create(['foo' => 'bar'])->setCallback('callback'); $this->assertEquals('/**/callback({"foo":"bar"});', $response->getContent()); $this->assertEquals('text/javascript', $response->headers->get('Content-Type')); @@ -199,7 +199,7 @@ class JsonResponseTest extends TestCase public function testSetEncodingOptions() { $response = new JsonResponse(); - $response->setData(array(array(1, 2, 3))); + $response->setData([[1, 2, 3]]); $this->assertEquals('[[1,2,3]]', $response->getContent()); @@ -248,7 +248,7 @@ class JsonResponseTest extends TestCase public function testSetComplexCallback() { - $response = JsonResponse::create(array('foo' => 'bar')); + $response = JsonResponse::create(['foo' => 'bar']); $response->setCallback('ಠ_ಠ["foo"].bar[0]'); $this->assertEquals('/**/ಠ_ಠ["foo"].bar[0]({"foo":"bar"});', $response->getContent()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php index dccfd4f3..d2a5c991 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php @@ -23,44 +23,44 @@ class ParameterBagTest extends TestCase public function testAll() { - $bag = new ParameterBag(array('foo' => 'bar')); - $this->assertEquals(array('foo' => 'bar'), $bag->all(), '->all() gets all the input'); + $bag = new ParameterBag(['foo' => 'bar']); + $this->assertEquals(['foo' => 'bar'], $bag->all(), '->all() gets all the input'); } public function testKeys() { - $bag = new ParameterBag(array('foo' => 'bar')); - $this->assertEquals(array('foo'), $bag->keys()); + $bag = new ParameterBag(['foo' => 'bar']); + $this->assertEquals(['foo'], $bag->keys()); } public function testAdd() { - $bag = new ParameterBag(array('foo' => 'bar')); - $bag->add(array('bar' => 'bas')); - $this->assertEquals(array('foo' => 'bar', 'bar' => 'bas'), $bag->all()); + $bag = new ParameterBag(['foo' => 'bar']); + $bag->add(['bar' => 'bas']); + $this->assertEquals(['foo' => 'bar', 'bar' => 'bas'], $bag->all()); } public function testRemove() { - $bag = new ParameterBag(array('foo' => 'bar')); - $bag->add(array('bar' => 'bas')); - $this->assertEquals(array('foo' => 'bar', 'bar' => 'bas'), $bag->all()); + $bag = new ParameterBag(['foo' => 'bar']); + $bag->add(['bar' => 'bas']); + $this->assertEquals(['foo' => 'bar', 'bar' => 'bas'], $bag->all()); $bag->remove('bar'); - $this->assertEquals(array('foo' => 'bar'), $bag->all()); + $this->assertEquals(['foo' => 'bar'], $bag->all()); } public function testReplace() { - $bag = new ParameterBag(array('foo' => 'bar')); + $bag = new ParameterBag(['foo' => 'bar']); - $bag->replace(array('FOO' => 'BAR')); - $this->assertEquals(array('FOO' => 'BAR'), $bag->all(), '->replace() replaces the input with the argument'); + $bag->replace(['FOO' => 'BAR']); + $this->assertEquals(['FOO' => 'BAR'], $bag->all(), '->replace() replaces the input with the argument'); $this->assertFalse($bag->has('foo'), '->replace() overrides previously set the input'); } public function testGet() { - $bag = new ParameterBag(array('foo' => 'bar', 'null' => null)); + $bag = new ParameterBag(['foo' => 'bar', 'null' => null]); $this->assertEquals('bar', $bag->get('foo'), '->get() gets the value of a parameter'); $this->assertEquals('default', $bag->get('unknown', 'default'), '->get() returns second argument as default if a parameter is not defined'); @@ -69,14 +69,14 @@ class ParameterBagTest extends TestCase public function testGetDoesNotUseDeepByDefault() { - $bag = new ParameterBag(array('foo' => array('bar' => 'moo'))); + $bag = new ParameterBag(['foo' => ['bar' => 'moo']]); $this->assertNull($bag->get('foo[bar]')); } public function testSet() { - $bag = new ParameterBag(array()); + $bag = new ParameterBag([]); $bag->set('foo', 'bar'); $this->assertEquals('bar', $bag->get('foo'), '->set() sets the value of parameter'); @@ -87,7 +87,7 @@ class ParameterBagTest extends TestCase public function testHas() { - $bag = new ParameterBag(array('foo' => 'bar')); + $bag = new ParameterBag(['foo' => 'bar']); $this->assertTrue($bag->has('foo'), '->has() returns true if a parameter is defined'); $this->assertFalse($bag->has('unknown'), '->has() return false if a parameter is not defined'); @@ -95,7 +95,7 @@ class ParameterBagTest extends TestCase public function testGetAlpha() { - $bag = new ParameterBag(array('word' => 'foo_BAR_012')); + $bag = new ParameterBag(['word' => 'foo_BAR_012']); $this->assertEquals('fooBAR', $bag->getAlpha('word'), '->getAlpha() gets only alphabetic characters'); $this->assertEquals('', $bag->getAlpha('unknown'), '->getAlpha() returns empty string if a parameter is not defined'); @@ -103,7 +103,7 @@ class ParameterBagTest extends TestCase public function testGetAlnum() { - $bag = new ParameterBag(array('word' => 'foo_BAR_012')); + $bag = new ParameterBag(['word' => 'foo_BAR_012']); $this->assertEquals('fooBAR012', $bag->getAlnum('word'), '->getAlnum() gets only alphanumeric characters'); $this->assertEquals('', $bag->getAlnum('unknown'), '->getAlnum() returns empty string if a parameter is not defined'); @@ -111,7 +111,7 @@ class ParameterBagTest extends TestCase public function testGetDigits() { - $bag = new ParameterBag(array('word' => 'foo_BAR_012')); + $bag = new ParameterBag(['word' => 'foo_BAR_012']); $this->assertEquals('012', $bag->getDigits('word'), '->getDigits() gets only digits as string'); $this->assertEquals('', $bag->getDigits('unknown'), '->getDigits() returns empty string if a parameter is not defined'); @@ -119,7 +119,7 @@ class ParameterBagTest extends TestCase public function testGetInt() { - $bag = new ParameterBag(array('digits' => '0123')); + $bag = new ParameterBag(['digits' => '0123']); $this->assertEquals(123, $bag->getInt('digits'), '->getInt() gets a value of parameter as integer'); $this->assertEquals(0, $bag->getInt('unknown'), '->getInt() returns zero if a parameter is not defined'); @@ -127,14 +127,14 @@ class ParameterBagTest extends TestCase public function testFilter() { - $bag = new ParameterBag(array( + $bag = new ParameterBag([ 'digits' => '0123ab', 'email' => 'example@example.com', 'url' => 'http://example.com/foo', 'dec' => '256', 'hex' => '0x100', - 'array' => array('bang'), - )); + 'array' => ['bang'], + ]); $this->assertEmpty($bag->filter('nokey'), '->filter() should return empty by default if no key is found'); @@ -142,27 +142,27 @@ class ParameterBagTest extends TestCase $this->assertEquals('example@example.com', $bag->filter('email', '', FILTER_VALIDATE_EMAIL), '->filter() gets a value of parameter as email'); - $this->assertEquals('http://example.com/foo', $bag->filter('url', '', FILTER_VALIDATE_URL, array('flags' => FILTER_FLAG_PATH_REQUIRED)), '->filter() gets a value of parameter as URL with a path'); + $this->assertEquals('http://example.com/foo', $bag->filter('url', '', FILTER_VALIDATE_URL, ['flags' => FILTER_FLAG_PATH_REQUIRED]), '->filter() gets a value of parameter as URL with a path'); // This test is repeated for code-coverage $this->assertEquals('http://example.com/foo', $bag->filter('url', '', FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED), '->filter() gets a value of parameter as URL with a path'); - $this->assertFalse($bag->filter('dec', '', FILTER_VALIDATE_INT, array( + $this->assertFalse($bag->filter('dec', '', FILTER_VALIDATE_INT, [ 'flags' => FILTER_FLAG_ALLOW_HEX, - 'options' => array('min_range' => 1, 'max_range' => 0xff), - )), '->filter() gets a value of parameter as integer between boundaries'); + 'options' => ['min_range' => 1, 'max_range' => 0xff], + ]), '->filter() gets a value of parameter as integer between boundaries'); - $this->assertFalse($bag->filter('hex', '', FILTER_VALIDATE_INT, array( + $this->assertFalse($bag->filter('hex', '', FILTER_VALIDATE_INT, [ 'flags' => FILTER_FLAG_ALLOW_HEX, - 'options' => array('min_range' => 1, 'max_range' => 0xff), - )), '->filter() gets a value of parameter as integer between boundaries'); + 'options' => ['min_range' => 1, 'max_range' => 0xff], + ]), '->filter() gets a value of parameter as integer between boundaries'); - $this->assertEquals(array('bang'), $bag->filter('array', ''), '->filter() gets a value of parameter as an array'); + $this->assertEquals(['bang'], $bag->filter('array', ''), '->filter() gets a value of parameter as an array'); } public function testGetIterator() { - $parameters = array('foo' => 'bar', 'hello' => 'world'); + $parameters = ['foo' => 'bar', 'hello' => 'world']; $bag = new ParameterBag($parameters); $i = 0; @@ -176,7 +176,7 @@ class ParameterBagTest extends TestCase public function testCount() { - $parameters = array('foo' => 'bar', 'hello' => 'world'); + $parameters = ['foo' => 'bar', 'hello' => 'world']; $bag = new ParameterBag($parameters); $this->assertCount(\count($parameters), $bag); @@ -184,7 +184,7 @@ class ParameterBagTest extends TestCase public function testGetBoolean() { - $parameters = array('string_true' => 'true', 'string_false' => 'false'); + $parameters = ['string_true' => 'true', 'string_false' => 'false']; $bag = new ParameterBag($parameters); $this->assertTrue($bag->getBoolean('string_true'), '->getBoolean() gets the string true as boolean true'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php index d389e83d..64c3e73e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php @@ -22,7 +22,7 @@ class RedirectResponseTest extends TestCase $this->assertEquals(1, preg_match( '##', - preg_replace(array('/\s+/', '/\'/'), array(' ', '"'), $response->getContent()) + preg_replace(['/\s+/', '/\'/'], [' ', '"'], $response->getContent()) )); } @@ -87,7 +87,7 @@ class RedirectResponseTest extends TestCase $response = new RedirectResponse('foo.bar', 301); $this->assertFalse($response->headers->hasCacheControlDirective('no-cache')); - $response = new RedirectResponse('foo.bar', 301, array('cache-control' => 'max-age=86400')); + $response = new RedirectResponse('foo.bar', 301, ['cache-control' => 'max-age=86400']); $this->assertFalse($response->headers->hasCacheControlDirective('no-cache')); $this->assertTrue($response->headers->hasCacheControlDirective('max-age')); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php index 10d764a7..7fb6925b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php @@ -34,20 +34,20 @@ class RequestMatcherTest extends TestCase public function getMethodData() { - return array( - array('get', 'get', true), - array('get', array('get', 'post'), true), - array('get', 'post', false), - array('get', 'GET', true), - array('get', array('GET', 'POST'), true), - array('get', 'POST', false), - ); + return [ + ['get', 'get', true], + ['get', ['get', 'post'], true], + ['get', 'post', false], + ['get', 'GET', true], + ['get', ['GET', 'POST'], true], + ['get', 'POST', false], + ]; } public function testScheme() { $httpRequest = $request = $request = Request::create(''); - $httpsRequest = $request = $request = Request::create('', 'get', array(), array(), array(), array('HTTPS' => 'on')); + $httpsRequest = $request = $request = Request::create('', 'get', [], [], [], ['HTTPS' => 'on']); $matcher = new RequestMatcher(); $matcher->matchScheme('https'); @@ -69,7 +69,7 @@ class RequestMatcherTest extends TestCase public function testHost($pattern, $isMatch) { $matcher = new RequestMatcher(); - $request = Request::create('', 'get', array(), array(), array(), array('HTTP_HOST' => 'foo.example.com')); + $request = Request::create('', 'get', [], [], [], ['HTTP_HOST' => 'foo.example.com']); $matcher->matchHost($pattern); $this->assertSame($isMatch, $matcher->matches($request)); @@ -80,16 +80,16 @@ class RequestMatcherTest extends TestCase public function getHostData() { - return array( - array('.*\.example\.com', true), - array('\.example\.com$', true), - array('^.*\.example\.com$', true), - array('.*\.sensio\.com', false), - array('.*\.example\.COM', true), - array('\.example\.COM$', true), - array('^.*\.example\.COM$', true), - array('.*\.sensio\.COM', false), - ); + return [ + ['.*\.example\.com', true], + ['\.example\.com$', true], + ['^.*\.example\.com$', true], + ['.*\.sensio\.com', false], + ['.*\.example\.COM', true], + ['\.example\.COM$', true], + ['^.*\.example\.COM$', true], + ['.*\.sensio\.COM', false], + ]; } public function testPath() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php index 539bb69c..d266e1f6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -21,24 +21,24 @@ class RequestTest extends TestCase { protected function tearDown() { - Request::setTrustedProxies(array(), -1); - Request::setTrustedHosts(array()); + Request::setTrustedProxies([], -1); + Request::setTrustedHosts([]); } public function testInitialize() { $request = new Request(); - $request->initialize(array('foo' => 'bar')); + $request->initialize(['foo' => 'bar']); $this->assertEquals('bar', $request->query->get('foo'), '->initialize() takes an array of query parameters as its first argument'); - $request->initialize(array(), array('foo' => 'bar')); + $request->initialize([], ['foo' => 'bar']); $this->assertEquals('bar', $request->request->get('foo'), '->initialize() takes an array of request parameters as its second argument'); - $request->initialize(array(), array(), array('foo' => 'bar')); + $request->initialize([], [], ['foo' => 'bar']); $this->assertEquals('bar', $request->attributes->get('foo'), '->initialize() takes an array of attributes as its third argument'); - $request->initialize(array(), array(), array(), array(), array(), array('HTTP_FOO' => 'bar')); + $request->initialize([], [], [], [], [], ['HTTP_FOO' => 'bar']); $this->assertEquals('bar', $request->headers->get('FOO'), '->initialize() takes an array of HTTP headers as its sixth argument'); } @@ -101,7 +101,7 @@ class RequestTest extends TestCase $this->assertEquals('test.com', $request->getHttpHost()); $this->assertFalse($request->isSecure()); - $request = Request::create('http://test.com/foo', 'GET', array('bar' => 'baz')); + $request = Request::create('http://test.com/foo', 'GET', ['bar' => 'baz']); $this->assertEquals('http://test.com/foo?bar=baz', $request->getUri()); $this->assertEquals('/foo', $request->getPathInfo()); $this->assertEquals('bar=baz', $request->getQueryString()); @@ -109,7 +109,7 @@ class RequestTest extends TestCase $this->assertEquals('test.com', $request->getHttpHost()); $this->assertFalse($request->isSecure()); - $request = Request::create('http://test.com/foo?bar=foo', 'GET', array('bar' => 'baz')); + $request = Request::create('http://test.com/foo?bar=foo', 'GET', ['bar' => 'baz']); $this->assertEquals('http://test.com/foo?bar=baz', $request->getUri()); $this->assertEquals('/foo', $request->getPathInfo()); $this->assertEquals('bar=baz', $request->getQueryString()); @@ -166,7 +166,7 @@ class RequestTest extends TestCase $this->assertTrue($request->isSecure()); $json = '{"jsonrpc":"2.0","method":"echo","id":7,"params":["Hello World"]}'; - $request = Request::create('http://example.com/jsonrpc', 'POST', array(), array(), array(), array(), $json); + $request = Request::create('http://example.com/jsonrpc', 'POST', [], [], [], [], $json); $this->assertEquals($json, $request->getContent()); $this->assertFalse($request->isSecure()); @@ -216,16 +216,16 @@ class RequestTest extends TestCase $request = Request::create('http://test.com/?foo'); $this->assertEquals('/?foo', $request->getRequestUri()); - $this->assertEquals(array('foo' => ''), $request->query->all()); + $this->assertEquals(['foo' => ''], $request->query->all()); // assume rewrite rule: (.*) --> app/app.php; app/ is a symlink to a symfony web/ directory - $request = Request::create('http://test.com/apparthotel-1234', 'GET', array(), array(), array(), - array( + $request = Request::create('http://test.com/apparthotel-1234', 'GET', [], [], [], + [ 'DOCUMENT_ROOT' => '/var/www/www.test.com', 'SCRIPT_FILENAME' => '/var/www/www.test.com/app/app.php', 'SCRIPT_NAME' => '/app/app.php', 'PHP_SELF' => '/app/app.php/apparthotel-1234', - )); + ]); $this->assertEquals('http://test.com/apparthotel-1234', $request->getUri()); $this->assertEquals('/apparthotel-1234', $request->getPathInfo()); $this->assertEquals('', $request->getQueryString()); @@ -258,7 +258,7 @@ class RequestTest extends TestCase $this->assertEquals(8080, $request->getPort()); $this->assertFalse($request->isSecure()); - $request = Request::create('http://test.com/foo?bar=foo', 'GET', array('bar' => 'baz')); + $request = Request::create('http://test.com/foo?bar=foo', 'GET', ['bar' => 'baz']); $request->server->set('REQUEST_URI', 'http://test.com/foo?bar=foo'); $this->assertEquals('http://test.com/foo?bar=baz', $request->getUri()); $this->assertEquals('/foo', $request->getPathInfo()); @@ -283,10 +283,59 @@ class RequestTest extends TestCase $this->assertEquals('http://test.com/foo', $request->getUri()); } + /** + * @dataProvider getRequestUriData + */ + public function testGetRequestUri($serverRequestUri, $expected, $message) + { + $request = new Request(); + $request->server->add([ + 'REQUEST_URI' => $serverRequestUri, + + // For having http://test.com + 'SERVER_NAME' => 'test.com', + 'SERVER_PORT' => 80, + ]); + + $this->assertSame($expected, $request->getRequestUri(), $message); + $this->assertSame($expected, $request->server->get('REQUEST_URI'), 'Normalize the request URI.'); + } + + public function getRequestUriData() + { + $message = 'Do not modify the path.'; + yield ['/foo', '/foo', $message]; + yield ['//bar/foo', '//bar/foo', $message]; + yield ['///bar/foo', '///bar/foo', $message]; + + $message = 'Handle when the scheme, host are on REQUEST_URI.'; + yield ['http://test.com/foo?bar=baz', '/foo?bar=baz', $message]; + + $message = 'Handle when the scheme, host and port are on REQUEST_URI.'; + yield ['http://test.com:80/foo', '/foo', $message]; + yield ['https://test.com:8080/foo', '/foo', $message]; + yield ['https://test.com:443/foo', '/foo', $message]; + + $message = 'Fragment should not be included in the URI'; + yield ['http://test.com/foo#bar', '/foo', $message]; + yield ['/foo#bar', '/foo', $message]; + } + + public function testGetRequestUriWithoutRequiredHeader() + { + $expected = ''; + + $request = new Request(); + + $message = 'Fallback to empty URI when headers are missing.'; + $this->assertSame($expected, $request->getRequestUri(), $message); + $this->assertSame($expected, $request->server->get('REQUEST_URI'), 'Normalize the request URI.'); + } + public function testCreateCheckPrecedence() { // server is used by default - $request = Request::create('/', 'DELETE', array(), array(), array(), array( + $request = Request::create('/', 'DELETE', [], [], [], [ 'HTTP_HOST' => 'example.com', 'HTTPS' => 'on', 'SERVER_PORT' => 443, @@ -294,7 +343,7 @@ class RequestTest extends TestCase 'PHP_AUTH_PW' => 'pa$$', 'QUERY_STRING' => 'foo=bar', 'CONTENT_TYPE' => 'application/json', - )); + ]); $this->assertEquals('example.com', $request->getHost()); $this->assertEquals(443, $request->getPort()); $this->assertTrue($request->isSecure()); @@ -304,11 +353,11 @@ class RequestTest extends TestCase $this->assertEquals('application/json', $request->headers->get('CONTENT_TYPE')); // URI has precedence over server - $request = Request::create('http://thomas:pokemon@example.net:8080/?foo=bar', 'GET', array(), array(), array(), array( + $request = Request::create('http://thomas:pokemon@example.net:8080/?foo=bar', 'GET', [], [], [], [ 'HTTP_HOST' => 'example.com', 'HTTPS' => 'on', 'SERVER_PORT' => 443, - )); + ]); $this->assertEquals('example.net', $request->getHost()); $this->assertEquals(8080, $request->getPort()); $this->assertFalse($request->isSecure()); @@ -319,7 +368,7 @@ class RequestTest extends TestCase public function testDuplicate() { - $request = new Request(array('foo' => 'bar'), array('foo' => 'bar'), array('foo' => 'bar'), array(), array(), array('HTTP_FOO' => 'bar')); + $request = new Request(['foo' => 'bar'], ['foo' => 'bar'], ['foo' => 'bar'], [], [], ['HTTP_FOO' => 'bar']); $dup = $request->duplicate(); $this->assertEquals($request->query->all(), $dup->query->all(), '->duplicate() duplicates a request an copy the current query parameters'); @@ -327,17 +376,17 @@ class RequestTest extends TestCase $this->assertEquals($request->attributes->all(), $dup->attributes->all(), '->duplicate() duplicates a request an copy the current attributes'); $this->assertEquals($request->headers->all(), $dup->headers->all(), '->duplicate() duplicates a request an copy the current HTTP headers'); - $dup = $request->duplicate(array('foo' => 'foobar'), array('foo' => 'foobar'), array('foo' => 'foobar'), array(), array(), array('HTTP_FOO' => 'foobar')); + $dup = $request->duplicate(['foo' => 'foobar'], ['foo' => 'foobar'], ['foo' => 'foobar'], [], [], ['HTTP_FOO' => 'foobar']); - $this->assertEquals(array('foo' => 'foobar'), $dup->query->all(), '->duplicate() overrides the query parameters if provided'); - $this->assertEquals(array('foo' => 'foobar'), $dup->request->all(), '->duplicate() overrides the request parameters if provided'); - $this->assertEquals(array('foo' => 'foobar'), $dup->attributes->all(), '->duplicate() overrides the attributes if provided'); - $this->assertEquals(array('foo' => array('foobar')), $dup->headers->all(), '->duplicate() overrides the HTTP header if provided'); + $this->assertEquals(['foo' => 'foobar'], $dup->query->all(), '->duplicate() overrides the query parameters if provided'); + $this->assertEquals(['foo' => 'foobar'], $dup->request->all(), '->duplicate() overrides the request parameters if provided'); + $this->assertEquals(['foo' => 'foobar'], $dup->attributes->all(), '->duplicate() overrides the attributes if provided'); + $this->assertEquals(['foo' => ['foobar']], $dup->headers->all(), '->duplicate() overrides the HTTP header if provided'); } public function testDuplicateWithFormat() { - $request = new Request(array(), array(), array('_format' => 'json')); + $request = new Request([], [], ['_format' => 'json']); $dup = $request->duplicate(); $this->assertEquals('json', $dup->getRequestFormat()); @@ -372,7 +421,7 @@ class RequestTest extends TestCase public function getFormatToMimeTypeMapProviderWithAdditionalNullFormat() { return array_merge( - array(array(null, array(null, 'unexistent-mime-type'))), + [[null, [null, 'unexistent-mime-type']]], $this->getFormatToMimeTypeMapProvider() ); } @@ -407,7 +456,7 @@ class RequestTest extends TestCase { $request = new Request(); $this->assertNull($request->getMimeType('foo')); - $this->assertEquals(array(), Request::getMimeTypes('foo')); + $this->assertEquals([], Request::getMimeTypes('foo')); } public function testGetFormatWithCustomMimeType() @@ -419,21 +468,21 @@ class RequestTest extends TestCase public function getFormatToMimeTypeMapProvider() { - return array( - array('txt', array('text/plain')), - array('js', array('application/javascript', 'application/x-javascript', 'text/javascript')), - array('css', array('text/css')), - array('json', array('application/json', 'application/x-json')), - array('jsonld', array('application/ld+json')), - array('xml', array('text/xml', 'application/xml', 'application/x-xml')), - array('rdf', array('application/rdf+xml')), - array('atom', array('application/atom+xml')), - ); + return [ + ['txt', ['text/plain']], + ['js', ['application/javascript', 'application/x-javascript', 'text/javascript']], + ['css', ['text/css']], + ['json', ['application/json', 'application/x-json']], + ['jsonld', ['application/ld+json']], + ['xml', ['text/xml', 'application/xml', 'application/x-xml']], + ['rdf', ['application/rdf+xml']], + ['atom', ['application/atom+xml']], + ]; } public function testGetUri() { - $server = array(); + $server = []; // Standard Request on non default PORT // http://host:8080/index.php/path/info?query=string @@ -452,7 +501,7 @@ class RequestTest extends TestCase $request = new Request(); - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host:8080/index.php/path/info?query=string', $request->getUri(), '->getUri() with non default port'); @@ -461,7 +510,7 @@ class RequestTest extends TestCase $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '80'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host/index.php/path/info?query=string', $request->getUri(), '->getUri() with default port'); @@ -470,7 +519,7 @@ class RequestTest extends TestCase $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '80'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername/index.php/path/info?query=string', $request->getUri(), '->getUri() with default port without HOST_HEADER'); @@ -478,7 +527,7 @@ class RequestTest extends TestCase // RewriteCond %{REQUEST_FILENAME} !-f // RewriteRule ^(.*)$ index.php [QSA,L] // http://host:8080/path/info?query=string - $server = array(); + $server = []; $server['HTTP_HOST'] = 'host:8080'; $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '8080'; @@ -492,7 +541,7 @@ class RequestTest extends TestCase $server['PHP_SELF'] = '/index.php'; $server['SCRIPT_FILENAME'] = '/some/where/index.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host:8080/path/info?query=string', $request->getUri(), '->getUri() with rewrite'); // Use std port number @@ -501,7 +550,7 @@ class RequestTest extends TestCase $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '80'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host/path/info?query=string', $request->getUri(), '->getUri() with rewrite and default port'); @@ -510,13 +559,13 @@ class RequestTest extends TestCase $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '80'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername/path/info?query=string', $request->getUri(), '->getUri() with rewrite, default port without HOST_HEADER'); // With encoded characters - $server = array( + $server = [ 'HTTP_HOST' => 'host:8080', 'SERVER_NAME' => 'servername', 'SERVER_PORT' => '8080', @@ -526,9 +575,9 @@ class RequestTest extends TestCase 'PATH_TRANSLATED' => 'redirect:/index.php/foo bar/in+fo', 'PHP_SELF' => '/ba se/index_dev.php/path/info', 'SCRIPT_FILENAME' => '/some/where/ba se/index_dev.php', - ); + ]; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals( 'http://host:8080/ba%20se/index_dev.php/foo%20bar/in+fo?query=string', @@ -538,11 +587,11 @@ class RequestTest extends TestCase // with user info $server['PHP_AUTH_USER'] = 'fabien'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host:8080/ba%20se/index_dev.php/foo%20bar/in+fo?query=string', $request->getUri()); $server['PHP_AUTH_PW'] = 'symfony'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host:8080/ba%20se/index_dev.php/foo%20bar/in+fo?query=string', $request->getUri()); } @@ -560,7 +609,7 @@ class RequestTest extends TestCase $request = Request::create('https://test.com:90/foo?bar=baz'); $this->assertEquals('https://test.com:90/some/path', $request->getUriForPath('/some/path')); - $server = array(); + $server = []; // Standard Request on non default PORT // http://host:8080/index.php/path/info?query=string @@ -579,7 +628,7 @@ class RequestTest extends TestCase $request = new Request(); - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host:8080/index.php/some/path', $request->getUriForPath('/some/path'), '->getUriForPath() with non default port'); @@ -588,7 +637,7 @@ class RequestTest extends TestCase $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '80'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host/index.php/some/path', $request->getUriForPath('/some/path'), '->getUriForPath() with default port'); @@ -597,7 +646,7 @@ class RequestTest extends TestCase $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '80'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername/index.php/some/path', $request->getUriForPath('/some/path'), '->getUriForPath() with default port without HOST_HEADER'); @@ -605,7 +654,7 @@ class RequestTest extends TestCase // RewriteCond %{REQUEST_FILENAME} !-f // RewriteRule ^(.*)$ index.php [QSA,L] // http://host:8080/path/info?query=string - $server = array(); + $server = []; $server['HTTP_HOST'] = 'host:8080'; $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '8080'; @@ -619,7 +668,7 @@ class RequestTest extends TestCase $server['PHP_SELF'] = '/index.php'; $server['SCRIPT_FILENAME'] = '/some/where/index.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host:8080/some/path', $request->getUriForPath('/some/path'), '->getUri() with rewrite'); // Use std port number @@ -628,7 +677,7 @@ class RequestTest extends TestCase $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '80'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host/some/path', $request->getUriForPath('/some/path'), '->getUriForPath() with rewrite and default port'); @@ -637,7 +686,7 @@ class RequestTest extends TestCase $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '80'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername/some/path', $request->getUriForPath('/some/path'), '->getUriForPath() with rewrite, default port without HOST_HEADER'); $this->assertEquals('servername', $request->getHttpHost()); @@ -645,11 +694,11 @@ class RequestTest extends TestCase // with user info $server['PHP_AUTH_USER'] = 'fabien'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername/some/path', $request->getUriForPath('/some/path')); $server['PHP_AUTH_PW'] = 'symfony'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername/some/path', $request->getUriForPath('/some/path')); } @@ -663,30 +712,30 @@ class RequestTest extends TestCase public function getRelativeUriForPathData() { - return array( - array('me.png', '/foo', '/me.png'), - array('../me.png', '/foo/bar', '/me.png'), - array('me.png', '/foo/bar', '/foo/me.png'), - array('../baz/me.png', '/foo/bar/b', '/foo/baz/me.png'), - array('../../fooz/baz/me.png', '/foo/bar/b', '/fooz/baz/me.png'), - array('baz/me.png', '/foo/bar/b', 'baz/me.png'), - ); + return [ + ['me.png', '/foo', '/me.png'], + ['../me.png', '/foo/bar', '/me.png'], + ['me.png', '/foo/bar', '/foo/me.png'], + ['../baz/me.png', '/foo/bar/b', '/foo/baz/me.png'], + ['../../fooz/baz/me.png', '/foo/bar/b', '/fooz/baz/me.png'], + ['baz/me.png', '/foo/bar/b', 'baz/me.png'], + ]; } public function testGetUserInfo() { $request = new Request(); - $server = array('PHP_AUTH_USER' => 'fabien'); - $request->initialize(array(), array(), array(), array(), array(), $server); + $server = ['PHP_AUTH_USER' => 'fabien']; + $request->initialize([], [], [], [], [], $server); $this->assertEquals('fabien', $request->getUserInfo()); $server['PHP_AUTH_USER'] = '0'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('0', $request->getUserInfo()); $server['PHP_AUTH_PW'] = '0'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('0:0', $request->getUserInfo()); } @@ -694,22 +743,22 @@ class RequestTest extends TestCase { $request = new Request(); - $server = array(); + $server = []; $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '90'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername:90', $request->getSchemeAndHttpHost()); $server['PHP_AUTH_USER'] = 'fabien'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername:90', $request->getSchemeAndHttpHost()); $server['PHP_AUTH_USER'] = '0'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername:90', $request->getSchemeAndHttpHost()); $server['PHP_AUTH_PW'] = '0'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername:90', $request->getSchemeAndHttpHost()); } @@ -726,29 +775,29 @@ class RequestTest extends TestCase public function getQueryStringNormalizationData() { - return array( - array('foo', 'foo', 'works with valueless parameters'), - array('foo=', 'foo=', 'includes a dangling equal sign'), - array('bar=&foo=bar', 'bar=&foo=bar', '->works with empty parameters'), - array('foo=bar&bar=', 'bar=&foo=bar', 'sorts keys alphabetically'), + return [ + ['foo', 'foo', 'works with valueless parameters'], + ['foo=', 'foo=', 'includes a dangling equal sign'], + ['bar=&foo=bar', 'bar=&foo=bar', '->works with empty parameters'], + ['foo=bar&bar=', 'bar=&foo=bar', 'sorts keys alphabetically'], // GET parameters, that are submitted from a HTML form, encode spaces as "+" by default (as defined in enctype application/x-www-form-urlencoded). // PHP also converts "+" to spaces when filling the global _GET or when using the function parse_str. - array('him=John%20Doe&her=Jane+Doe', 'her=Jane%20Doe&him=John%20Doe', 'normalizes spaces in both encodings "%20" and "+"'), + ['baz=Foo%20Baz&bar=Foo+Bar', 'bar=Foo%20Bar&baz=Foo%20Baz', 'normalizes spaces in both encodings "%20" and "+"'], - array('foo[]=1&foo[]=2', 'foo%5B%5D=1&foo%5B%5D=2', 'allows array notation'), - array('foo=1&foo=2', 'foo=1&foo=2', 'allows repeated parameters'), - array('pa%3Dram=foo%26bar%3Dbaz&test=test', 'pa%3Dram=foo%26bar%3Dbaz&test=test', 'works with encoded delimiters'), - array('0', '0', 'allows "0"'), - array('Jane Doe&John%20Doe', 'Jane%20Doe&John%20Doe', 'normalizes encoding in keys'), - array('her=Jane Doe&him=John%20Doe', 'her=Jane%20Doe&him=John%20Doe', 'normalizes encoding in values'), - array('foo=bar&&&test&&', 'foo=bar&test', 'removes unneeded delimiters'), - array('formula=e=m*c^2', 'formula=e%3Dm%2Ac%5E2', 'correctly treats only the first "=" as delimiter and the next as value'), + ['foo[]=1&foo[]=2', 'foo%5B%5D=1&foo%5B%5D=2', 'allows array notation'], + ['foo=1&foo=2', 'foo=1&foo=2', 'allows repeated parameters'], + ['pa%3Dram=foo%26bar%3Dbaz&test=test', 'pa%3Dram=foo%26bar%3Dbaz&test=test', 'works with encoded delimiters'], + ['0', '0', 'allows "0"'], + ['Foo Bar&Foo%20Baz', 'Foo%20Bar&Foo%20Baz', 'normalizes encoding in keys'], + ['bar=Foo Bar&baz=Foo%20Baz', 'bar=Foo%20Bar&baz=Foo%20Baz', 'normalizes encoding in values'], + ['foo=bar&&&test&&', 'foo=bar&test', 'removes unneeded delimiters'], + ['formula=e=m*c^2', 'formula=e%3Dm%2Ac%5E2', 'correctly treats only the first "=" as delimiter and the next as value'], // Ignore pairs with empty key, even if there was a value, e.g. "=value", as such nameless values cannot be retrieved anyway. // PHP also does not include them when building _GET. - array('foo=bar&=a=b&=x=y', 'foo=bar', 'removes params with empty key'), - ); + ['foo=bar&=a=b&=x=y', 'foo=bar', 'removes params with empty key'], + ]; } public function testGetQueryStringReturnsNull() @@ -765,74 +814,74 @@ class RequestTest extends TestCase { $request = new Request(); - $request->initialize(array('foo' => 'bar')); + $request->initialize(['foo' => 'bar']); $this->assertEquals('', $request->getHost(), '->getHost() return empty string if not initialized'); - $request->initialize(array(), array(), array(), array(), array(), array('HTTP_HOST' => 'www.example.com')); + $request->initialize([], [], [], [], [], ['HTTP_HOST' => 'www.example.com']); $this->assertEquals('www.example.com', $request->getHost(), '->getHost() from Host Header'); // Host header with port number - $request->initialize(array(), array(), array(), array(), array(), array('HTTP_HOST' => 'www.example.com:8080')); + $request->initialize([], [], [], [], [], ['HTTP_HOST' => 'www.example.com:8080']); $this->assertEquals('www.example.com', $request->getHost(), '->getHost() from Host Header with port number'); // Server values - $request->initialize(array(), array(), array(), array(), array(), array('SERVER_NAME' => 'www.example.com')); + $request->initialize([], [], [], [], [], ['SERVER_NAME' => 'www.example.com']); $this->assertEquals('www.example.com', $request->getHost(), '->getHost() from server name'); - $request->initialize(array(), array(), array(), array(), array(), array('SERVER_NAME' => 'www.example.com', 'HTTP_HOST' => 'www.host.com')); + $request->initialize([], [], [], [], [], ['SERVER_NAME' => 'www.example.com', 'HTTP_HOST' => 'www.host.com']); $this->assertEquals('www.host.com', $request->getHost(), '->getHost() value from Host header has priority over SERVER_NAME '); } public function testGetPort() { - $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + $request = Request::create('http://example.com', 'GET', [], [], [], [ 'HTTP_X_FORWARDED_PROTO' => 'https', 'HTTP_X_FORWARDED_PORT' => '443', - )); + ]); $port = $request->getPort(); $this->assertEquals(80, $port, 'Without trusted proxies FORWARDED_PROTO and FORWARDED_PORT are ignored.'); - Request::setTrustedProxies(array('1.1.1.1'), Request::HEADER_X_FORWARDED_ALL); - $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + Request::setTrustedProxies(['1.1.1.1'], Request::HEADER_X_FORWARDED_ALL); + $request = Request::create('http://example.com', 'GET', [], [], [], [ 'HTTP_X_FORWARDED_PROTO' => 'https', 'HTTP_X_FORWARDED_PORT' => '8443', - )); + ]); $this->assertEquals(80, $request->getPort(), 'With PROTO and PORT on untrusted connection server value takes precedence.'); $request->server->set('REMOTE_ADDR', '1.1.1.1'); $this->assertEquals(8443, $request->getPort(), 'With PROTO and PORT set PORT takes precedence.'); - $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + $request = Request::create('http://example.com', 'GET', [], [], [], [ 'HTTP_X_FORWARDED_PROTO' => 'https', - )); + ]); $this->assertEquals(80, $request->getPort(), 'With only PROTO set getPort() ignores trusted headers on untrusted connection.'); $request->server->set('REMOTE_ADDR', '1.1.1.1'); $this->assertEquals(443, $request->getPort(), 'With only PROTO set getPort() defaults to 443.'); - $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + $request = Request::create('http://example.com', 'GET', [], [], [], [ 'HTTP_X_FORWARDED_PROTO' => 'http', - )); + ]); $this->assertEquals(80, $request->getPort(), 'If X_FORWARDED_PROTO is set to HTTP getPort() ignores trusted headers on untrusted connection.'); $request->server->set('REMOTE_ADDR', '1.1.1.1'); $this->assertEquals(80, $request->getPort(), 'If X_FORWARDED_PROTO is set to HTTP getPort() returns port of the original request.'); - $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + $request = Request::create('http://example.com', 'GET', [], [], [], [ 'HTTP_X_FORWARDED_PROTO' => 'On', - )); + ]); $this->assertEquals(80, $request->getPort(), 'With only PROTO set and value is On, getPort() ignores trusted headers on untrusted connection.'); $request->server->set('REMOTE_ADDR', '1.1.1.1'); $this->assertEquals(443, $request->getPort(), 'With only PROTO set and value is On, getPort() defaults to 443.'); - $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + $request = Request::create('http://example.com', 'GET', [], [], [], [ 'HTTP_X_FORWARDED_PROTO' => '1', - )); + ]); $this->assertEquals(80, $request->getPort(), 'With only PROTO set and value is 1, getPort() ignores trusted headers on untrusted connection.'); $request->server->set('REMOTE_ADDR', '1.1.1.1'); $this->assertEquals(443, $request->getPort(), 'With only PROTO set and value is 1, getPort() defaults to 443.'); - $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + $request = Request::create('http://example.com', 'GET', [], [], [], [ 'HTTP_X_FORWARDED_PROTO' => 'something-else', - )); + ]); $port = $request->getPort(); $this->assertEquals(80, $port, 'With only PROTO set and value is not recognized, getPort() defaults to 80.'); } @@ -843,7 +892,7 @@ class RequestTest extends TestCase public function testGetHostWithFakeHttpHostValue() { $request = new Request(); - $request->initialize(array(), array(), array(), array(), array(), array('HTTP_HOST' => 'www.host.com?query=string')); + $request->initialize([], [], [], [], [], ['HTTP_HOST' => 'www.host.com?query=string']); $request->getHost(); } @@ -903,7 +952,7 @@ class RequestTest extends TestCase $request = new Request(); $request->setMethod('POST'); - $request->query->set('_method', array('delete', 'patch')); + $request->query->set('_method', ['delete', 'patch']); $this->assertSame('POST', $request->getMethod(), '->getMethod() returns the request method if invalid type is defined in query'); } @@ -940,69 +989,69 @@ class RequestTest extends TestCase public function getClientIpsForwardedProvider() { // $expected $remoteAddr $httpForwarded $trustedProxies - return array( - array(array('127.0.0.1'), '127.0.0.1', 'for="_gazonk"', null), - array(array('127.0.0.1'), '127.0.0.1', 'for="_gazonk"', array('127.0.0.1')), - array(array('88.88.88.88'), '127.0.0.1', 'for="88.88.88.88:80"', array('127.0.0.1')), - array(array('192.0.2.60'), '::1', 'for=192.0.2.60;proto=http;by=203.0.113.43', array('::1')), - array(array('2620:0:1cfe:face:b00c::3', '192.0.2.43'), '::1', 'for=192.0.2.43, for=2620:0:1cfe:face:b00c::3', array('::1')), - array(array('2001:db8:cafe::17'), '::1', 'for="[2001:db8:cafe::17]:4711', array('::1')), - ); + return [ + [['127.0.0.1'], '127.0.0.1', 'for="_gazonk"', null], + [['127.0.0.1'], '127.0.0.1', 'for="_gazonk"', ['127.0.0.1']], + [['88.88.88.88'], '127.0.0.1', 'for="88.88.88.88:80"', ['127.0.0.1']], + [['192.0.2.60'], '::1', 'for=192.0.2.60;proto=http;by=203.0.113.43', ['::1']], + [['2620:0:1cfe:face:b00c::3', '192.0.2.43'], '::1', 'for=192.0.2.43, for=2620:0:1cfe:face:b00c::3', ['::1']], + [['2001:db8:cafe::17'], '::1', 'for="[2001:db8:cafe::17]:4711', ['::1']], + ]; } public function getClientIpsProvider() { // $expected $remoteAddr $httpForwardedFor $trustedProxies - return array( + return [ // simple IPv4 - array(array('88.88.88.88'), '88.88.88.88', null, null), + [['88.88.88.88'], '88.88.88.88', null, null], // trust the IPv4 remote addr - array(array('88.88.88.88'), '88.88.88.88', null, array('88.88.88.88')), + [['88.88.88.88'], '88.88.88.88', null, ['88.88.88.88']], // simple IPv6 - array(array('::1'), '::1', null, null), + [['::1'], '::1', null, null], // trust the IPv6 remote addr - array(array('::1'), '::1', null, array('::1')), + [['::1'], '::1', null, ['::1']], // forwarded for with remote IPv4 addr not trusted - array(array('127.0.0.1'), '127.0.0.1', '88.88.88.88', null), + [['127.0.0.1'], '127.0.0.1', '88.88.88.88', null], // forwarded for with remote IPv4 addr trusted + comma - array(array('88.88.88.88'), '127.0.0.1', '88.88.88.88,', array('127.0.0.1')), + [['88.88.88.88'], '127.0.0.1', '88.88.88.88,', ['127.0.0.1']], // forwarded for with remote IPv4 and all FF addrs trusted - array(array('88.88.88.88'), '127.0.0.1', '88.88.88.88', array('127.0.0.1', '88.88.88.88')), + [['88.88.88.88'], '127.0.0.1', '88.88.88.88', ['127.0.0.1', '88.88.88.88']], // forwarded for with remote IPv4 range trusted - array(array('88.88.88.88'), '123.45.67.89', '88.88.88.88', array('123.45.67.0/24')), + [['88.88.88.88'], '123.45.67.89', '88.88.88.88', ['123.45.67.0/24']], // forwarded for with remote IPv6 addr not trusted - array(array('1620:0:1cfe:face:b00c::3'), '1620:0:1cfe:face:b00c::3', '2620:0:1cfe:face:b00c::3', null), + [['1620:0:1cfe:face:b00c::3'], '1620:0:1cfe:face:b00c::3', '2620:0:1cfe:face:b00c::3', null], // forwarded for with remote IPv6 addr trusted - array(array('2620:0:1cfe:face:b00c::3'), '1620:0:1cfe:face:b00c::3', '2620:0:1cfe:face:b00c::3', array('1620:0:1cfe:face:b00c::3')), + [['2620:0:1cfe:face:b00c::3'], '1620:0:1cfe:face:b00c::3', '2620:0:1cfe:face:b00c::3', ['1620:0:1cfe:face:b00c::3']], // forwarded for with remote IPv6 range trusted - array(array('88.88.88.88'), '2a01:198:603:0:396e:4789:8e99:890f', '88.88.88.88', array('2a01:198:603:0::/65')), + [['88.88.88.88'], '2a01:198:603:0:396e:4789:8e99:890f', '88.88.88.88', ['2a01:198:603:0::/65']], // multiple forwarded for with remote IPv4 addr trusted - array(array('88.88.88.88', '87.65.43.21', '127.0.0.1'), '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', array('123.45.67.89')), + [['88.88.88.88', '87.65.43.21', '127.0.0.1'], '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', ['123.45.67.89']], // multiple forwarded for with remote IPv4 addr and some reverse proxies trusted - array(array('87.65.43.21', '127.0.0.1'), '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', array('123.45.67.89', '88.88.88.88')), + [['87.65.43.21', '127.0.0.1'], '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', ['123.45.67.89', '88.88.88.88']], // multiple forwarded for with remote IPv4 addr and some reverse proxies trusted but in the middle - array(array('88.88.88.88', '127.0.0.1'), '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', array('123.45.67.89', '87.65.43.21')), + [['88.88.88.88', '127.0.0.1'], '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', ['123.45.67.89', '87.65.43.21']], // multiple forwarded for with remote IPv4 addr and all reverse proxies trusted - array(array('127.0.0.1'), '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', array('123.45.67.89', '87.65.43.21', '88.88.88.88', '127.0.0.1')), + [['127.0.0.1'], '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', ['123.45.67.89', '87.65.43.21', '88.88.88.88', '127.0.0.1']], // multiple forwarded for with remote IPv6 addr trusted - array(array('2620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3'), '1620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3,2620:0:1cfe:face:b00c::3', array('1620:0:1cfe:face:b00c::3')), + [['2620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3'], '1620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3,2620:0:1cfe:face:b00c::3', ['1620:0:1cfe:face:b00c::3']], // multiple forwarded for with remote IPv6 addr and some reverse proxies trusted - array(array('3620:0:1cfe:face:b00c::3'), '1620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3,2620:0:1cfe:face:b00c::3', array('1620:0:1cfe:face:b00c::3', '2620:0:1cfe:face:b00c::3')), + [['3620:0:1cfe:face:b00c::3'], '1620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3,2620:0:1cfe:face:b00c::3', ['1620:0:1cfe:face:b00c::3', '2620:0:1cfe:face:b00c::3']], // multiple forwarded for with remote IPv4 addr and some reverse proxies trusted but in the middle - array(array('2620:0:1cfe:face:b00c::3', '4620:0:1cfe:face:b00c::3'), '1620:0:1cfe:face:b00c::3', '4620:0:1cfe:face:b00c::3,3620:0:1cfe:face:b00c::3,2620:0:1cfe:face:b00c::3', array('1620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3')), + [['2620:0:1cfe:face:b00c::3', '4620:0:1cfe:face:b00c::3'], '1620:0:1cfe:face:b00c::3', '4620:0:1cfe:face:b00c::3,3620:0:1cfe:face:b00c::3,2620:0:1cfe:face:b00c::3', ['1620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3']], // client IP with port - array(array('88.88.88.88'), '127.0.0.1', '88.88.88.88:12345, 127.0.0.1', array('127.0.0.1')), + [['88.88.88.88'], '127.0.0.1', '88.88.88.88:12345, 127.0.0.1', ['127.0.0.1']], // invalid forwarded IP is ignored - array(array('88.88.88.88'), '127.0.0.1', 'unknown,88.88.88.88', array('127.0.0.1')), - array(array('88.88.88.88'), '127.0.0.1', '}__test|O:21:"JDatabaseDriverMysqli":3:{s:2,88.88.88.88', array('127.0.0.1')), - ); + [['88.88.88.88'], '127.0.0.1', 'unknown,88.88.88.88', ['127.0.0.1']], + [['88.88.88.88'], '127.0.0.1', '}__test|O:21:"JDatabaseDriverMysqli":3:{s:2,88.88.88.88', ['127.0.0.1']], + ]; } /** @@ -1013,15 +1062,15 @@ class RequestTest extends TestCase { $request = new Request(); - $server = array( + $server = [ 'REMOTE_ADDR' => '88.88.88.88', 'HTTP_FORWARDED' => $httpForwarded, 'HTTP_X_FORWARDED_FOR' => $httpXForwardedFor, - ); + ]; - Request::setTrustedProxies(array('88.88.88.88'), Request::HEADER_X_FORWARDED_ALL | Request::HEADER_FORWARDED); + Request::setTrustedProxies(['88.88.88.88'], Request::HEADER_X_FORWARDED_ALL | Request::HEADER_FORWARDED); - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $request->getClientIps(); } @@ -1033,15 +1082,15 @@ class RequestTest extends TestCase { $request = new Request(); - $server = array( + $server = [ 'REMOTE_ADDR' => '88.88.88.88', 'HTTP_FORWARDED' => $httpForwarded, 'HTTP_X_FORWARDED_FOR' => $httpXForwardedFor, - ); + ]; - Request::setTrustedProxies(array('88.88.88.88'), Request::HEADER_X_FORWARDED_FOR); + Request::setTrustedProxies(['88.88.88.88'], Request::HEADER_X_FORWARDED_FOR); - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertSame(array_reverse(explode(',', $httpXForwardedFor)), $request->getClientIps()); } @@ -1049,13 +1098,13 @@ class RequestTest extends TestCase public function getClientIpsWithConflictingHeadersProvider() { // $httpForwarded $httpXForwardedFor - return array( - array('for=87.65.43.21', '192.0.2.60'), - array('for=87.65.43.21, for=192.0.2.60', '192.0.2.60'), - array('for=192.0.2.60', '192.0.2.60,87.65.43.21'), - array('for="::face", for=192.0.2.60', '192.0.2.60,192.0.2.43'), - array('for=87.65.43.21, for=192.0.2.60', '192.0.2.60,87.65.43.21'), - ); + return [ + ['for=87.65.43.21', '192.0.2.60'], + ['for=87.65.43.21, for=192.0.2.60', '192.0.2.60'], + ['for=192.0.2.60', '192.0.2.60,87.65.43.21'], + ['for="::face", for=192.0.2.60', '192.0.2.60,192.0.2.43'], + ['for=87.65.43.21, for=192.0.2.60', '192.0.2.60,87.65.43.21'], + ]; } /** @@ -1065,15 +1114,15 @@ class RequestTest extends TestCase { $request = new Request(); - $server = array( + $server = [ 'REMOTE_ADDR' => '88.88.88.88', 'HTTP_FORWARDED' => $httpForwarded, 'HTTP_X_FORWARDED_FOR' => $httpXForwardedFor, - ); + ]; - Request::setTrustedProxies(array('88.88.88.88'), -1); + Request::setTrustedProxies(['88.88.88.88'], -1); - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $clientIps = $request->getClientIps(); @@ -1083,14 +1132,14 @@ class RequestTest extends TestCase public function getClientIpsWithAgreeingHeadersProvider() { // $httpForwarded $httpXForwardedFor - return array( - array('for="192.0.2.60"', '192.0.2.60', array('192.0.2.60')), - array('for=192.0.2.60, for=87.65.43.21', '192.0.2.60,87.65.43.21', array('87.65.43.21', '192.0.2.60')), - array('for="[::face]", for=192.0.2.60', '::face,192.0.2.60', array('192.0.2.60', '::face')), - array('for="192.0.2.60:80"', '192.0.2.60', array('192.0.2.60')), - array('for=192.0.2.60;proto=http;by=203.0.113.43', '192.0.2.60', array('192.0.2.60')), - array('for="[2001:db8:cafe::17]:4711"', '2001:db8:cafe::17', array('2001:db8:cafe::17')), - ); + return [ + ['for="192.0.2.60"', '192.0.2.60', ['192.0.2.60']], + ['for=192.0.2.60, for=87.65.43.21', '192.0.2.60,87.65.43.21', ['87.65.43.21', '192.0.2.60']], + ['for="[::face]", for=192.0.2.60', '::face,192.0.2.60', ['192.0.2.60', '::face']], + ['for="192.0.2.60:80"', '192.0.2.60', ['192.0.2.60']], + ['for=192.0.2.60;proto=http;by=203.0.113.43', '192.0.2.60', ['192.0.2.60']], + ['for="[2001:db8:cafe::17]:4711"', '2001:db8:cafe::17', ['2001:db8:cafe::17']], + ]; } public function testGetContentWorksTwiceInDefaultMode() @@ -1111,7 +1160,7 @@ class RequestTest extends TestCase public function testGetContentReturnsResourceWhenContentSetInConstructor() { - $req = new Request(array(), array(), array(), array(), array(), array(), 'MyContent'); + $req = new Request([], [], [], [], [], [], 'MyContent'); $resource = $req->getContent(true); $this->assertInternalType('resource', $resource); @@ -1124,7 +1173,7 @@ class RequestTest extends TestCase fwrite($resource, 'My other content'); rewind($resource); - $req = new Request(array(), array(), array(), array(), array(), array(), $resource); + $req = new Request([], [], [], [], [], [], $resource); $this->assertEquals('My other content', stream_get_contents($req->getContent(true))); $this->assertEquals('My other content', $req->getContent()); } @@ -1146,10 +1195,10 @@ class RequestTest extends TestCase public function getContentCantBeCalledTwiceWithResourcesProvider() { - return array( - 'Resource then fetch' => array(true, false), - 'Resource then resource' => array(true, true), - ); + return [ + 'Resource then fetch' => [true, false], + 'Resource then resource' => [true, true], + ]; } /** @@ -1175,24 +1224,24 @@ class RequestTest extends TestCase public function getContentCanBeCalledTwiceWithResourcesProvider() { - return array( - 'Fetch then fetch' => array(false, false), - 'Fetch then resource' => array(false, true), - 'Resource then fetch' => array(true, false), - 'Resource then resource' => array(true, true), - ); + return [ + 'Fetch then fetch' => [false, false], + 'Fetch then resource' => [false, true], + 'Resource then fetch' => [true, false], + 'Resource then resource' => [true, true], + ]; } public function provideOverloadedMethods() { - return array( - array('PUT'), - array('DELETE'), - array('PATCH'), - array('put'), - array('delete'), - array('patch'), - ); + return [ + ['PUT'], + ['DELETE'], + ['PATCH'], + ['put'], + ['delete'], + ['patch'], + ]; } /** @@ -1205,14 +1254,14 @@ class RequestTest extends TestCase $_GET['foo1'] = 'bar1'; $_POST['foo2'] = 'bar2'; $_COOKIE['foo3'] = 'bar3'; - $_FILES['foo4'] = array('bar4'); + $_FILES['foo4'] = ['bar4']; $_SERVER['foo5'] = 'bar5'; $request = Request::createFromGlobals(); $this->assertEquals('bar1', $request->query->get('foo1'), '::fromGlobals() uses values from $_GET'); $this->assertEquals('bar2', $request->request->get('foo2'), '::fromGlobals() uses values from $_POST'); $this->assertEquals('bar3', $request->cookies->get('foo3'), '::fromGlobals() uses values from $_COOKIE'); - $this->assertEquals(array('bar4'), $request->files->get('foo4'), '::fromGlobals() uses values from $_FILES'); + $this->assertEquals(['bar4'], $request->files->get('foo4'), '::fromGlobals() uses values from $_FILES'); $this->assertEquals('bar5', $request->server->get('foo5'), '::fromGlobals() uses values from $_SERVER'); unset($_GET['foo1'], $_POST['foo2'], $_COOKIE['foo3'], $_FILES['foo4'], $_SERVER['foo5']); @@ -1242,25 +1291,25 @@ class RequestTest extends TestCase public function testOverrideGlobals() { $request = new Request(); - $request->initialize(array('foo' => 'bar')); + $request->initialize(['foo' => 'bar']); // as the Request::overrideGlobals really work, it erase $_SERVER, so we must backup it $server = $_SERVER; $request->overrideGlobals(); - $this->assertEquals(array('foo' => 'bar'), $_GET); + $this->assertEquals(['foo' => 'bar'], $_GET); - $request->initialize(array(), array('foo' => 'bar')); + $request->initialize([], ['foo' => 'bar']); $request->overrideGlobals(); - $this->assertEquals(array('foo' => 'bar'), $_POST); + $this->assertEquals(['foo' => 'bar'], $_POST); $this->assertArrayNotHasKey('HTTP_X_FORWARDED_PROTO', $_SERVER); $request->headers->set('X_FORWARDED_PROTO', 'https'); - Request::setTrustedProxies(array('1.1.1.1'), Request::HEADER_X_FORWARDED_ALL); + Request::setTrustedProxies(['1.1.1.1'], Request::HEADER_X_FORWARDED_ALL); $this->assertFalse($request->isSecure()); $request->server->set('REMOTE_ADDR', '1.1.1.1'); $this->assertTrue($request->isSecure()); @@ -1277,12 +1326,12 @@ class RequestTest extends TestCase $this->assertArrayHasKey('CONTENT_TYPE', $_SERVER); $this->assertArrayHasKey('CONTENT_LENGTH', $_SERVER); - $request->initialize(array('foo' => 'bar', 'baz' => 'foo')); + $request->initialize(['foo' => 'bar', 'baz' => 'foo']); $request->query->remove('baz'); $request->overrideGlobals(); - $this->assertEquals(array('foo' => 'bar'), $_GET); + $this->assertEquals(['foo' => 'bar'], $_GET); $this->assertEquals('foo=bar', $_SERVER['QUERY_STRING']); $this->assertEquals('foo=bar', $request->server->get('QUERY_STRING')); @@ -1295,23 +1344,23 @@ class RequestTest extends TestCase $request = new Request(); $this->assertEquals('', $request->getScriptName()); - $server = array(); + $server = []; $server['SCRIPT_NAME'] = '/index.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('/index.php', $request->getScriptName()); - $server = array(); + $server = []; $server['ORIG_SCRIPT_NAME'] = '/frontend.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('/frontend.php', $request->getScriptName()); - $server = array(); + $server = []; $server['SCRIPT_NAME'] = '/index.php'; $server['ORIG_SCRIPT_NAME'] = '/frontend.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('/index.php', $request->getScriptName()); } @@ -1321,29 +1370,29 @@ class RequestTest extends TestCase $request = new Request(); $this->assertEquals('', $request->getBasePath()); - $server = array(); + $server = []; $server['SCRIPT_FILENAME'] = '/some/where/index.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('', $request->getBasePath()); - $server = array(); + $server = []; $server['SCRIPT_FILENAME'] = '/some/where/index.php'; $server['SCRIPT_NAME'] = '/index.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('', $request->getBasePath()); - $server = array(); + $server = []; $server['SCRIPT_FILENAME'] = '/some/where/index.php'; $server['PHP_SELF'] = '/index.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('', $request->getBasePath()); - $server = array(); + $server = []; $server['SCRIPT_FILENAME'] = '/some/where/index.php'; $server['ORIG_SCRIPT_NAME'] = '/index.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('', $request->getBasePath()); } @@ -1353,21 +1402,21 @@ class RequestTest extends TestCase $request = new Request(); $this->assertEquals('/', $request->getPathInfo()); - $server = array(); + $server = []; $server['REQUEST_URI'] = '/path/info'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('/path/info', $request->getPathInfo()); - $server = array(); + $server = []; $server['REQUEST_URI'] = '/path%20test/info'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('/path%20test/info', $request->getPathInfo()); - $server = array(); + $server = []; $server['REQUEST_URI'] = '?a=b'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('/', $request->getPathInfo()); } @@ -1395,27 +1444,27 @@ class RequestTest extends TestCase { $request = new Request(); $this->assertNull($request->getPreferredLanguage()); - $this->assertNull($request->getPreferredLanguage(array())); - $this->assertEquals('fr', $request->getPreferredLanguage(array('fr'))); - $this->assertEquals('fr', $request->getPreferredLanguage(array('fr', 'en'))); - $this->assertEquals('en', $request->getPreferredLanguage(array('en', 'fr'))); - $this->assertEquals('fr-ch', $request->getPreferredLanguage(array('fr-ch', 'fr-fr'))); + $this->assertNull($request->getPreferredLanguage([])); + $this->assertEquals('fr', $request->getPreferredLanguage(['fr'])); + $this->assertEquals('fr', $request->getPreferredLanguage(['fr', 'en'])); + $this->assertEquals('en', $request->getPreferredLanguage(['en', 'fr'])); + $this->assertEquals('fr-ch', $request->getPreferredLanguage(['fr-ch', 'fr-fr'])); $request = new Request(); $request->headers->set('Accept-language', 'zh, en-us; q=0.8, en; q=0.6'); - $this->assertEquals('en', $request->getPreferredLanguage(array('en', 'en-us'))); + $this->assertEquals('en', $request->getPreferredLanguage(['en', 'en-us'])); $request = new Request(); $request->headers->set('Accept-language', 'zh, en-us; q=0.8, en; q=0.6'); - $this->assertEquals('en', $request->getPreferredLanguage(array('fr', 'en'))); + $this->assertEquals('en', $request->getPreferredLanguage(['fr', 'en'])); $request = new Request(); $request->headers->set('Accept-language', 'zh, en-us; q=0.8'); - $this->assertEquals('en', $request->getPreferredLanguage(array('fr', 'en'))); + $this->assertEquals('en', $request->getPreferredLanguage(['fr', 'en'])); $request = new Request(); $request->headers->set('Accept-language', 'zh, en-us; q=0.8, fr-fr; q=0.6, fr; q=0.5'); - $this->assertEquals('en', $request->getPreferredLanguage(array('fr', 'en'))); + $this->assertEquals('en', $request->getPreferredLanguage(['fr', 'en'])); } public function testIsXmlHttpRequest() @@ -1453,72 +1502,72 @@ class RequestTest extends TestCase public function testGetCharsets() { $request = new Request(); - $this->assertEquals(array(), $request->getCharsets()); + $this->assertEquals([], $request->getCharsets()); $request->headers->set('Accept-Charset', 'ISO-8859-1, US-ASCII, UTF-8; q=0.8, ISO-10646-UCS-2; q=0.6'); - $this->assertEquals(array(), $request->getCharsets()); // testing caching + $this->assertEquals([], $request->getCharsets()); // testing caching $request = new Request(); $request->headers->set('Accept-Charset', 'ISO-8859-1, US-ASCII, UTF-8; q=0.8, ISO-10646-UCS-2; q=0.6'); - $this->assertEquals(array('ISO-8859-1', 'US-ASCII', 'UTF-8', 'ISO-10646-UCS-2'), $request->getCharsets()); + $this->assertEquals(['ISO-8859-1', 'US-ASCII', 'UTF-8', 'ISO-10646-UCS-2'], $request->getCharsets()); $request = new Request(); $request->headers->set('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'); - $this->assertEquals(array('ISO-8859-1', 'utf-8', '*'), $request->getCharsets()); + $this->assertEquals(['ISO-8859-1', 'utf-8', '*'], $request->getCharsets()); } public function testGetEncodings() { $request = new Request(); - $this->assertEquals(array(), $request->getEncodings()); + $this->assertEquals([], $request->getEncodings()); $request->headers->set('Accept-Encoding', 'gzip,deflate,sdch'); - $this->assertEquals(array(), $request->getEncodings()); // testing caching + $this->assertEquals([], $request->getEncodings()); // testing caching $request = new Request(); $request->headers->set('Accept-Encoding', 'gzip,deflate,sdch'); - $this->assertEquals(array('gzip', 'deflate', 'sdch'), $request->getEncodings()); + $this->assertEquals(['gzip', 'deflate', 'sdch'], $request->getEncodings()); $request = new Request(); $request->headers->set('Accept-Encoding', 'gzip;q=0.4,deflate;q=0.9,compress;q=0.7'); - $this->assertEquals(array('deflate', 'compress', 'gzip'), $request->getEncodings()); + $this->assertEquals(['deflate', 'compress', 'gzip'], $request->getEncodings()); } public function testGetAcceptableContentTypes() { $request = new Request(); - $this->assertEquals(array(), $request->getAcceptableContentTypes()); + $this->assertEquals([], $request->getAcceptableContentTypes()); $request->headers->set('Accept', 'application/vnd.wap.wmlscriptc, text/vnd.wap.wml, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/html, multipart/mixed, */*'); - $this->assertEquals(array(), $request->getAcceptableContentTypes()); // testing caching + $this->assertEquals([], $request->getAcceptableContentTypes()); // testing caching $request = new Request(); $request->headers->set('Accept', 'application/vnd.wap.wmlscriptc, text/vnd.wap.wml, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/html, multipart/mixed, */*'); - $this->assertEquals(array('application/vnd.wap.wmlscriptc', 'text/vnd.wap.wml', 'application/vnd.wap.xhtml+xml', 'application/xhtml+xml', 'text/html', 'multipart/mixed', '*/*'), $request->getAcceptableContentTypes()); + $this->assertEquals(['application/vnd.wap.wmlscriptc', 'text/vnd.wap.wml', 'application/vnd.wap.xhtml+xml', 'application/xhtml+xml', 'text/html', 'multipart/mixed', '*/*'], $request->getAcceptableContentTypes()); } public function testGetLanguages() { $request = new Request(); - $this->assertEquals(array(), $request->getLanguages()); + $this->assertEquals([], $request->getLanguages()); $request = new Request(); $request->headers->set('Accept-language', 'zh, en-us; q=0.8, en; q=0.6'); - $this->assertEquals(array('zh', 'en_US', 'en'), $request->getLanguages()); - $this->assertEquals(array('zh', 'en_US', 'en'), $request->getLanguages()); + $this->assertEquals(['zh', 'en_US', 'en'], $request->getLanguages()); + $this->assertEquals(['zh', 'en_US', 'en'], $request->getLanguages()); $request = new Request(); $request->headers->set('Accept-language', 'zh, en-us; q=0.6, en; q=0.8'); - $this->assertEquals(array('zh', 'en', 'en_US'), $request->getLanguages()); // Test out of order qvalues + $this->assertEquals(['zh', 'en', 'en_US'], $request->getLanguages()); // Test out of order qvalues $request = new Request(); $request->headers->set('Accept-language', 'zh, en, en-us'); - $this->assertEquals(array('zh', 'en', 'en_US'), $request->getLanguages()); // Test equal weighting without qvalues + $this->assertEquals(['zh', 'en', 'en_US'], $request->getLanguages()); // Test equal weighting without qvalues $request = new Request(); $request->headers->set('Accept-language', 'zh; q=0.6, en, en-us; q=0.6'); - $this->assertEquals(array('en', 'zh', 'en_US'), $request->getLanguages()); // Test equal weighting with qvalues + $this->assertEquals(['en', 'zh', 'en_US'], $request->getLanguages()); // Test equal weighting with qvalues $request = new Request(); $request->headers->set('Accept-language', 'zh, i-cherokee; q=0.6'); - $this->assertEquals(array('zh', 'cherokee'), $request->getLanguages()); + $this->assertEquals(['zh', 'cherokee'], $request->getLanguages()); } public function testGetRequestFormat() @@ -1538,7 +1587,7 @@ class RequestTest extends TestCase $this->assertNull($request->setRequestFormat('foo')); $this->assertEquals('foo', $request->getRequestFormat(null)); - $request = new Request(array('_format' => 'foo')); + $request = new Request(['_format' => 'foo']); $this->assertEquals('html', $request->getRequestFormat()); } @@ -1615,7 +1664,7 @@ class RequestTest extends TestCase */ public function testGetBaseUrl($uri, $server, $expectedBaseUrl, $expectedPathInfo) { - $request = Request::create($uri, 'GET', array(), array(), array(), $server); + $request = Request::create($uri, 'GET', [], [], [], $server); $this->assertSame($expectedBaseUrl, $request->getBaseUrl(), 'baseUrl'); $this->assertSame($expectedPathInfo, $request->getPathInfo(), 'pathInfo'); @@ -1623,78 +1672,78 @@ class RequestTest extends TestCase public function getBaseUrlData() { - return array( - array( + return [ + [ '/fruit/strawberry/1234index.php/blah', - array( + [ 'SCRIPT_FILENAME' => 'E:/Sites/cc-new/public_html/fruit/index.php', 'SCRIPT_NAME' => '/fruit/index.php', 'PHP_SELF' => '/fruit/index.php', - ), + ], '/fruit', '/strawberry/1234index.php/blah', - ), - array( + ], + [ '/fruit/strawberry/1234index.php/blah', - array( + [ 'SCRIPT_FILENAME' => 'E:/Sites/cc-new/public_html/index.php', 'SCRIPT_NAME' => '/index.php', 'PHP_SELF' => '/index.php', - ), + ], '', '/fruit/strawberry/1234index.php/blah', - ), - array( + ], + [ '/foo%20bar/', - array( + [ 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo bar/app.php', 'SCRIPT_NAME' => '/foo bar/app.php', 'PHP_SELF' => '/foo bar/app.php', - ), + ], '/foo%20bar', '/', - ), - array( + ], + [ '/foo%20bar/home', - array( + [ 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo bar/app.php', 'SCRIPT_NAME' => '/foo bar/app.php', 'PHP_SELF' => '/foo bar/app.php', - ), + ], '/foo%20bar', '/home', - ), - array( + ], + [ '/foo%20bar/app.php/home', - array( + [ 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo bar/app.php', 'SCRIPT_NAME' => '/foo bar/app.php', 'PHP_SELF' => '/foo bar/app.php', - ), + ], '/foo%20bar/app.php', '/home', - ), - array( + ], + [ '/foo%20bar/app.php/home%3Dbaz', - array( + [ 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo bar/app.php', 'SCRIPT_NAME' => '/foo bar/app.php', 'PHP_SELF' => '/foo bar/app.php', - ), + ], '/foo%20bar/app.php', '/home%3Dbaz', - ), - array( + ], + [ '/foo/bar+baz', - array( + [ 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo/app.php', 'SCRIPT_NAME' => '/foo/app.php', 'PHP_SELF' => '/foo/app.php', - ), + ], '/foo', '/bar+baz', - ), - ); + ], + ]; } /** @@ -1712,16 +1761,16 @@ class RequestTest extends TestCase public function urlencodedStringPrefixData() { - return array( - array('foo', 'foo', 'foo'), - array('fo%6f', 'foo', 'fo%6f'), - array('foo/bar', 'foo', 'foo'), - array('fo%6f/bar', 'foo', 'fo%6f'), - array('f%6f%6f/bar', 'foo', 'f%6f%6f'), - array('%66%6F%6F/bar', 'foo', '%66%6F%6F'), - array('fo+o/bar', 'fo+o', 'fo+o'), - array('fo%2Bo/bar', 'fo+o', 'fo%2Bo'), - ); + return [ + ['foo', 'foo', 'foo'], + ['fo%6f', 'foo', 'fo%6f'], + ['foo/bar', 'foo', 'foo'], + ['fo%6f/bar', 'foo', 'fo%6f'], + ['f%6f%6f/bar', 'foo', 'f%6f%6f'], + ['%66%6F%6F/bar', 'foo', '%66%6F%6F'], + ['fo+o/bar', 'fo+o', 'fo+o'], + ['fo%2Bo/bar', 'fo+o', 'fo%2Bo'], + ]; } private function disableHttpMethodParameterOverride() @@ -1736,7 +1785,7 @@ class RequestTest extends TestCase { $request = new Request(); - $server = array('REMOTE_ADDR' => $remoteAddr); + $server = ['REMOTE_ADDR' => $remoteAddr]; if (null !== $httpForwardedFor) { $server['HTTP_X_FORWARDED_FOR'] = $httpForwardedFor; } @@ -1745,7 +1794,7 @@ class RequestTest extends TestCase Request::setTrustedProxies($trustedProxies, Request::HEADER_X_FORWARDED_ALL); } - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); return $request; } @@ -1754,7 +1803,7 @@ class RequestTest extends TestCase { $request = new Request(); - $server = array('REMOTE_ADDR' => $remoteAddr); + $server = ['REMOTE_ADDR' => $remoteAddr]; if (null !== $httpForwarded) { $server['HTTP_FORWARDED'] = $httpForwarded; @@ -1764,7 +1813,7 @@ class RequestTest extends TestCase Request::setTrustedProxies($trustedProxies, Request::HEADER_FORWARDED); } - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); return $request; } @@ -1785,35 +1834,35 @@ class RequestTest extends TestCase $this->assertFalse($request->isSecure()); // disabling proxy trusting - Request::setTrustedProxies(array(), Request::HEADER_X_FORWARDED_ALL); + Request::setTrustedProxies([], Request::HEADER_X_FORWARDED_ALL); $this->assertEquals('3.3.3.3', $request->getClientIp()); $this->assertEquals('example.com', $request->getHost()); $this->assertEquals(80, $request->getPort()); $this->assertFalse($request->isSecure()); // request is forwarded by a non-trusted proxy - Request::setTrustedProxies(array('2.2.2.2'), Request::HEADER_X_FORWARDED_ALL); + Request::setTrustedProxies(['2.2.2.2'], Request::HEADER_X_FORWARDED_ALL); $this->assertEquals('3.3.3.3', $request->getClientIp()); $this->assertEquals('example.com', $request->getHost()); $this->assertEquals(80, $request->getPort()); $this->assertFalse($request->isSecure()); // trusted proxy via setTrustedProxies() - Request::setTrustedProxies(array('3.3.3.3', '2.2.2.2'), Request::HEADER_X_FORWARDED_ALL); + Request::setTrustedProxies(['3.3.3.3', '2.2.2.2'], Request::HEADER_X_FORWARDED_ALL); $this->assertEquals('1.1.1.1', $request->getClientIp()); $this->assertEquals('foo.example.com', $request->getHost()); $this->assertEquals(443, $request->getPort()); $this->assertTrue($request->isSecure()); // trusted proxy via setTrustedProxies() - Request::setTrustedProxies(array('3.3.3.4', '2.2.2.2'), Request::HEADER_X_FORWARDED_ALL); + Request::setTrustedProxies(['3.3.3.4', '2.2.2.2'], Request::HEADER_X_FORWARDED_ALL); $this->assertEquals('3.3.3.3', $request->getClientIp()); $this->assertEquals('example.com', $request->getHost()); $this->assertEquals(80, $request->getPort()); $this->assertFalse($request->isSecure()); // check various X_FORWARDED_PROTO header values - Request::setTrustedProxies(array('3.3.3.3', '2.2.2.2'), Request::HEADER_X_FORWARDED_ALL); + Request::setTrustedProxies(['3.3.3.3', '2.2.2.2'], Request::HEADER_X_FORWARDED_ALL); $request->headers->set('X_FORWARDED_PROTO', 'ssl'); $this->assertTrue($request->isSecure()); @@ -1838,7 +1887,7 @@ class RequestTest extends TestCase $request->headers->set('X_MY_PROTO', 'http'); $request->headers->set('X_MY_PORT', 81); - Request::setTrustedProxies(array('3.3.3.3', '2.2.2.2'), Request::HEADER_X_FORWARDED_ALL); + Request::setTrustedProxies(['3.3.3.3', '2.2.2.2'], Request::HEADER_X_FORWARDED_ALL); // custom header names Request::setTrustedHeaderName(Request::HEADER_CLIENT_IP, 'X_MY_FOR'); @@ -1881,35 +1930,35 @@ class RequestTest extends TestCase $this->assertFalse($request->isSecure()); // disabling proxy trusting - Request::setTrustedProxies(array(), Request::HEADER_FORWARDED); + Request::setTrustedProxies([], Request::HEADER_FORWARDED); $this->assertEquals('3.3.3.3', $request->getClientIp()); $this->assertEquals('example.com', $request->getHost()); $this->assertEquals(80, $request->getPort()); $this->assertFalse($request->isSecure()); // request is forwarded by a non-trusted proxy - Request::setTrustedProxies(array('2.2.2.2'), Request::HEADER_FORWARDED); + Request::setTrustedProxies(['2.2.2.2'], Request::HEADER_FORWARDED); $this->assertEquals('3.3.3.3', $request->getClientIp()); $this->assertEquals('example.com', $request->getHost()); $this->assertEquals(80, $request->getPort()); $this->assertFalse($request->isSecure()); // trusted proxy via setTrustedProxies() - Request::setTrustedProxies(array('3.3.3.3', '2.2.2.2'), Request::HEADER_FORWARDED); + Request::setTrustedProxies(['3.3.3.3', '2.2.2.2'], Request::HEADER_FORWARDED); $this->assertEquals('1.1.1.1', $request->getClientIp()); $this->assertEquals('foo.example.com', $request->getHost()); $this->assertEquals(8080, $request->getPort()); $this->assertTrue($request->isSecure()); // trusted proxy via setTrustedProxies() - Request::setTrustedProxies(array('3.3.3.4', '2.2.2.2'), Request::HEADER_FORWARDED); + Request::setTrustedProxies(['3.3.3.4', '2.2.2.2'], Request::HEADER_FORWARDED); $this->assertEquals('3.3.3.3', $request->getClientIp()); $this->assertEquals('example.com', $request->getHost()); $this->assertEquals(80, $request->getPort()); $this->assertFalse($request->isSecure()); // check various X_FORWARDED_PROTO header values - Request::setTrustedProxies(array('3.3.3.3', '2.2.2.2'), Request::HEADER_FORWARDED); + Request::setTrustedProxies(['3.3.3.3', '2.2.2.2'], Request::HEADER_FORWARDED); $request->headers->set('FORWARDED', 'proto=ssl'); $this->assertTrue($request->isSecure()); @@ -1949,37 +1998,37 @@ class RequestTest extends TestCase $this->assertEquals($expectedRequestUri, $request->getRequestUri(), '->getRequestUri() is correct'); $subRequestUri = '/bar/foo'; - $subRequest = Request::create($subRequestUri, 'get', array(), array(), array(), $request->server->all()); + $subRequest = Request::create($subRequestUri, 'get', [], [], [], $request->server->all()); $this->assertEquals($subRequestUri, $subRequest->getRequestUri(), '->getRequestUri() is correct in sub request'); } public function iisRequestUriProvider() { - return array( - array( - array(), - array( + return [ + [ + [], + [ 'IIS_WasUrlRewritten' => '1', 'UNENCODED_URL' => '/foo/bar', - ), + ], '/foo/bar', - ), - array( - array(), - array( + ], + [ + [], + [ 'ORIG_PATH_INFO' => '/foo/bar', - ), + ], '/foo/bar', - ), - array( - array(), - array( + ], + [ + [], + [ 'ORIG_PATH_INFO' => '/foo/bar', 'QUERY_STRING' => 'foo=bar', - ), + ], '/foo/bar?foo=bar', - ), - ); + ], + ]; } public function testTrustedHosts() @@ -1992,7 +2041,7 @@ class RequestTest extends TestCase $this->assertEquals('evil.com', $request->getHost()); // add a trusted domain and all its subdomains - Request::setTrustedHosts(array('^([a-z]{9}\.)?trusted\.com$')); + Request::setTrustedHosts(['^([a-z]{9}\.)?trusted\.com$']); // untrusted host $request->headers->set('host', 'evil.com'); @@ -2024,7 +2073,7 @@ class RequestTest extends TestCase public function testSetTrustedHostsDoesNotBreakOnSpecialCharacters() { - Request::setTrustedHosts(array('localhost(\.local){0,1}#,example.com', 'localhost')); + Request::setTrustedHosts(['localhost(\.local){0,1}#,example.com', 'localhost']); $request = Request::create('/'); $request->headers->set('host', 'localhost'); @@ -2033,7 +2082,7 @@ class RequestTest extends TestCase public function testFactory() { - Request::setFactory(function (array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) { + Request::setFactory(function (array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null) { return new NewRequest(); }); @@ -2082,23 +2131,23 @@ class RequestTest extends TestCase public function getHostValidities() { - return array( - array('.a', false), - array('a..', false), - array('a.', true), - array("\xE9", false), - array('[::1]', true), - array('[::1]:80', true, '[::1]', 80), - array(str_repeat('.', 101), false), - ); + return [ + ['.a', false], + ['a..', false], + ['a.', true], + ["\xE9", false], + ['[::1]', true], + ['[::1]:80', true, '[::1]', 80], + [str_repeat('.', 101), false], + ]; } public function getLongHostNames() { - return array( - array('a'.str_repeat('.a', 40000)), - array(str_repeat(':', 101)), - ); + return [ + ['a'.str_repeat('.a', 40000)], + [str_repeat(':', 101)], + ]; } /** @@ -2113,18 +2162,18 @@ class RequestTest extends TestCase public function methodIdempotentProvider() { - return array( - array('HEAD', true), - array('GET', true), - array('POST', false), - array('PUT', true), - array('PATCH', false), - array('DELETE', true), - array('PURGE', true), - array('OPTIONS', true), - array('TRACE', true), - array('CONNECT', false), - ); + return [ + ['HEAD', true], + ['GET', true], + ['POST', false], + ['PUT', true], + ['PATCH', false], + ['DELETE', true], + ['PURGE', true], + ['OPTIONS', true], + ['TRACE', true], + ['CONNECT', false], + ]; } /** @@ -2139,18 +2188,18 @@ class RequestTest extends TestCase public function methodSafeProvider() { - return array( - array('HEAD', true), - array('GET', true), - array('POST', false), - array('PUT', false), - array('PATCH', false), - array('DELETE', false), - array('PURGE', false), - array('OPTIONS', true), - array('TRACE', true), - array('CONNECT', false), - ); + return [ + ['HEAD', true], + ['GET', true], + ['POST', false], + ['PUT', false], + ['PATCH', false], + ['DELETE', false], + ['PURGE', false], + ['OPTIONS', true], + ['TRACE', true], + ['CONNECT', false], + ]; } /** @@ -2176,18 +2225,18 @@ class RequestTest extends TestCase public function methodCacheableProvider() { - return array( - array('HEAD', true), - array('GET', true), - array('POST', false), - array('PUT', false), - array('PATCH', false), - array('DELETE', false), - array('PURGE', false), - array('OPTIONS', false), - array('TRACE', false), - array('CONNECT', false), - ); + return [ + ['HEAD', true], + ['GET', true], + ['POST', false], + ['PUT', false], + ['PATCH', false], + ['DELETE', false], + ['PURGE', false], + ['OPTIONS', false], + ['TRACE', false], + ['CONNECT', false], + ]; } /** @@ -2195,7 +2244,7 @@ class RequestTest extends TestCase */ public function testGetTrustedHeaderName() { - Request::setTrustedProxies(array('8.8.8.8'), Request::HEADER_X_FORWARDED_ALL); + Request::setTrustedProxies(['8.8.8.8'], Request::HEADER_X_FORWARDED_ALL); $this->assertNull(Request::getTrustedHeaderName(Request::HEADER_FORWARDED)); $this->assertSame('X_FORWARDED_FOR', Request::getTrustedHeaderName(Request::HEADER_CLIENT_IP)); @@ -2203,7 +2252,7 @@ class RequestTest extends TestCase $this->assertSame('X_FORWARDED_PORT', Request::getTrustedHeaderName(Request::HEADER_CLIENT_PORT)); $this->assertSame('X_FORWARDED_PROTO', Request::getTrustedHeaderName(Request::HEADER_CLIENT_PROTO)); - Request::setTrustedProxies(array('8.8.8.8'), Request::HEADER_FORWARDED); + Request::setTrustedProxies(['8.8.8.8'], Request::HEADER_FORWARDED); $this->assertSame('FORWARDED', Request::getTrustedHeaderName(Request::HEADER_FORWARDED)); $this->assertNull(Request::getTrustedHeaderName(Request::HEADER_CLIENT_IP)); @@ -2217,7 +2266,7 @@ class RequestTest extends TestCase Request::setTrustedHeaderName(Request::HEADER_CLIENT_PORT, 'D'); Request::setTrustedHeaderName(Request::HEADER_CLIENT_PROTO, 'E'); - Request::setTrustedProxies(array('8.8.8.8'), Request::HEADER_FORWARDED); + Request::setTrustedProxies(['8.8.8.8'], Request::HEADER_FORWARDED); $this->assertSame('A', Request::getTrustedHeaderName(Request::HEADER_FORWARDED)); $this->assertNull(Request::getTrustedHeaderName(Request::HEADER_CLIENT_IP)); @@ -2225,7 +2274,7 @@ class RequestTest extends TestCase $this->assertNull(Request::getTrustedHeaderName(Request::HEADER_CLIENT_PORT)); $this->assertNull(Request::getTrustedHeaderName(Request::HEADER_CLIENT_PROTO)); - Request::setTrustedProxies(array('8.8.8.8'), Request::HEADER_X_FORWARDED_ALL); + Request::setTrustedProxies(['8.8.8.8'], Request::HEADER_X_FORWARDED_ALL); $this->assertNull(Request::getTrustedHeaderName(Request::HEADER_FORWARDED)); $this->assertSame('B', Request::getTrustedHeaderName(Request::HEADER_CLIENT_IP)); @@ -2233,7 +2282,7 @@ class RequestTest extends TestCase $this->assertSame('D', Request::getTrustedHeaderName(Request::HEADER_CLIENT_PORT)); $this->assertSame('E', Request::getTrustedHeaderName(Request::HEADER_CLIENT_PROTO)); - Request::setTrustedProxies(array('8.8.8.8'), Request::HEADER_FORWARDED); + Request::setTrustedProxies(['8.8.8.8'], Request::HEADER_FORWARDED); $this->assertSame('A', Request::getTrustedHeaderName(Request::HEADER_FORWARDED)); @@ -2251,7 +2300,7 @@ class RequestTest extends TestCase public function testProtocolVersion($serverProtocol, $trustedProxy, $via, $expected) { if ($trustedProxy) { - Request::setTrustedProxies(array('1.1.1.1'), -1); + Request::setTrustedProxies(['1.1.1.1'], -1); } $request = new Request(); @@ -2264,41 +2313,41 @@ class RequestTest extends TestCase public function protocolVersionProvider() { - return array( - 'untrusted without via' => array('HTTP/2.0', false, '', 'HTTP/2.0'), - 'untrusted with via' => array('HTTP/2.0', false, '1.0 fred, 1.1 nowhere.com (Apache/1.1)', 'HTTP/2.0'), - 'trusted without via' => array('HTTP/2.0', true, '', 'HTTP/2.0'), - 'trusted with via' => array('HTTP/2.0', true, '1.0 fred, 1.1 nowhere.com (Apache/1.1)', 'HTTP/1.0'), - 'trusted with via and protocol name' => array('HTTP/2.0', true, 'HTTP/1.0 fred, HTTP/1.1 nowhere.com (Apache/1.1)', 'HTTP/1.0'), - 'trusted with broken via' => array('HTTP/2.0', true, 'HTTP/1^0 foo', 'HTTP/2.0'), - 'trusted with partially-broken via' => array('HTTP/2.0', true, '1.0 fred, foo', 'HTTP/1.0'), - ); + return [ + 'untrusted without via' => ['HTTP/2.0', false, '', 'HTTP/2.0'], + 'untrusted with via' => ['HTTP/2.0', false, '1.0 fred, 1.1 nowhere.com (Apache/1.1)', 'HTTP/2.0'], + 'trusted without via' => ['HTTP/2.0', true, '', 'HTTP/2.0'], + 'trusted with via' => ['HTTP/2.0', true, '1.0 fred, 1.1 nowhere.com (Apache/1.1)', 'HTTP/1.0'], + 'trusted with via and protocol name' => ['HTTP/2.0', true, 'HTTP/1.0 fred, HTTP/1.1 nowhere.com (Apache/1.1)', 'HTTP/1.0'], + 'trusted with broken via' => ['HTTP/2.0', true, 'HTTP/1^0 foo', 'HTTP/2.0'], + 'trusted with partially-broken via' => ['HTTP/2.0', true, '1.0 fred, foo', 'HTTP/1.0'], + ]; } public function nonstandardRequestsData() { - return array( - array('', '', '/', 'http://host:8080/', ''), - array('/', '', '/', 'http://host:8080/', ''), + return [ + ['', '', '/', 'http://host:8080/', ''], + ['/', '', '/', 'http://host:8080/', ''], - array('hello/app.php/x', '', '/x', 'http://host:8080/hello/app.php/x', '/hello', '/hello/app.php'), - array('/hello/app.php/x', '', '/x', 'http://host:8080/hello/app.php/x', '/hello', '/hello/app.php'), + ['hello/app.php/x', '', '/x', 'http://host:8080/hello/app.php/x', '/hello', '/hello/app.php'], + ['/hello/app.php/x', '', '/x', 'http://host:8080/hello/app.php/x', '/hello', '/hello/app.php'], - array('', 'a=b', '/', 'http://host:8080/?a=b'), - array('?a=b', 'a=b', '/', 'http://host:8080/?a=b'), - array('/?a=b', 'a=b', '/', 'http://host:8080/?a=b'), + ['', 'a=b', '/', 'http://host:8080/?a=b'], + ['?a=b', 'a=b', '/', 'http://host:8080/?a=b'], + ['/?a=b', 'a=b', '/', 'http://host:8080/?a=b'], - array('x', 'a=b', '/x', 'http://host:8080/x?a=b'), - array('x?a=b', 'a=b', '/x', 'http://host:8080/x?a=b'), - array('/x?a=b', 'a=b', '/x', 'http://host:8080/x?a=b'), + ['x', 'a=b', '/x', 'http://host:8080/x?a=b'], + ['x?a=b', 'a=b', '/x', 'http://host:8080/x?a=b'], + ['/x?a=b', 'a=b', '/x', 'http://host:8080/x?a=b'], - array('hello/x', '', '/x', 'http://host:8080/hello/x', '/hello'), - array('/hello/x', '', '/x', 'http://host:8080/hello/x', '/hello'), + ['hello/x', '', '/x', 'http://host:8080/hello/x', '/hello'], + ['/hello/x', '', '/x', 'http://host:8080/hello/x', '/hello'], - array('hello/app.php/x', 'a=b', '/x', 'http://host:8080/hello/app.php/x?a=b', '/hello', '/hello/app.php'), - array('hello/app.php/x?a=b', 'a=b', '/x', 'http://host:8080/hello/app.php/x?a=b', '/hello', '/hello/app.php'), - array('/hello/app.php/x?a=b', 'a=b', '/x', 'http://host:8080/hello/app.php/x?a=b', '/hello', '/hello/app.php'), - ); + ['hello/app.php/x', 'a=b', '/x', 'http://host:8080/hello/app.php/x?a=b', '/hello', '/hello/app.php'], + ['hello/app.php/x?a=b', 'a=b', '/x', 'http://host:8080/hello/app.php/x?a=b', '/hello', '/hello/app.php'], + ['/hello/app.php/x?a=b', 'a=b', '/x', 'http://host:8080/hello/app.php/x?a=b', '/hello', '/hello/app.php'], + ]; } /** @@ -2310,16 +2359,16 @@ class RequestTest extends TestCase $expectedBaseUrl = $expectedBasePath; } - $server = array( + $server = [ 'HTTP_HOST' => 'host:8080', 'SERVER_PORT' => '8080', 'QUERY_STRING' => $queryString, 'PHP_SELF' => '/hello/app.php', 'SCRIPT_FILENAME' => '/some/path/app.php', 'REQUEST_URI' => $requestUri, - ); + ]; - $request = new Request(array(), array(), array(), array(), array(), $server); + $request = new Request([], [], [], [], [], $server); $this->assertEquals($expectedPathInfo, $request->getPathInfo()); $this->assertEquals($expectedUri, $request->getUri()); @@ -2332,7 +2381,7 @@ class RequestTest extends TestCase public function testTrustedHost() { - Request::setTrustedProxies(array('1.1.1.1'), -1); + Request::setTrustedProxies(['1.1.1.1'], -1); $request = Request::create('/'); $request->server->set('REMOTE_ADDR', '1.1.1.1'); @@ -2354,7 +2403,7 @@ class RequestTest extends TestCase public function testTrustedPort() { - Request::setTrustedProxies(array('1.1.1.1'), -1); + Request::setTrustedProxies(['1.1.1.1'], -1); $request = Request::create('/'); $request->server->set('REMOTE_ADDR', '1.1.1.1'); @@ -2384,7 +2433,7 @@ class RequestContentProxy extends Request { public function getContent($asResource = false) { - return http_build_query(array('_method' => 'PUT', 'content' => 'mycontent'), '', '&'); + return http_build_query(['_method' => 'PUT', 'content' => 'mycontent'], '', '&'); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php index 22f25e97..3d3e696c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php @@ -22,10 +22,10 @@ class ResponseFunctionalTest extends TestCase public static function setUpBeforeClass() { - $spec = array( - 1 => array('file', '/dev/null', 'w'), - 2 => array('file', '/dev/null', 'w'), - ); + $spec = [ + 1 => ['file', '/dev/null', 'w'], + 2 => ['file', '/dev/null', 'w'], + ]; if (!self::$server = @proc_open('exec php -S localhost:8054', $spec, $pipes, __DIR__.'/Fixtures/response-functional')) { self::markTestSkipped('PHP server unable to start.'); } @@ -52,7 +52,7 @@ class ResponseFunctionalTest extends TestCase public function provideCookie() { foreach (glob(__DIR__.'/Fixtures/response-functional/*.php') as $file) { - yield array(pathinfo($file, PATHINFO_FILENAME)); + yield [pathinfo($file, PATHINFO_FILENAME)]; } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php index 06e2d41d..93aacf24 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php @@ -22,7 +22,7 @@ class ResponseHeaderBagTest extends TestCase { public function testAllPreserveCase() { - $headers = array( + $headers = [ 'fOo' => 'BAR', 'ETag' => 'xyzzy', 'Content-MD5' => 'Q2hlY2sgSW50ZWdyaXR5IQ==', @@ -30,7 +30,7 @@ class ResponseHeaderBagTest extends TestCase 'WWW-Authenticate' => 'Basic realm="WallyWorld"', 'X-UA-Compatible' => 'IE=edge,chrome=1', 'X-XSS-Protection' => '1; mode=block', - ); + ]; $bag = new ResponseHeaderBag($headers); $allPreservedCase = $bag->allPreserveCase(); @@ -42,45 +42,45 @@ class ResponseHeaderBagTest extends TestCase public function testCacheControlHeader() { - $bag = new ResponseHeaderBag(array()); + $bag = new ResponseHeaderBag([]); $this->assertEquals('no-cache, private', $bag->get('Cache-Control')); $this->assertTrue($bag->hasCacheControlDirective('no-cache')); - $bag = new ResponseHeaderBag(array('Cache-Control' => 'public')); + $bag = new ResponseHeaderBag(['Cache-Control' => 'public']); $this->assertEquals('public', $bag->get('Cache-Control')); $this->assertTrue($bag->hasCacheControlDirective('public')); - $bag = new ResponseHeaderBag(array('ETag' => 'abcde')); + $bag = new ResponseHeaderBag(['ETag' => 'abcde']); $this->assertEquals('private, must-revalidate', $bag->get('Cache-Control')); $this->assertTrue($bag->hasCacheControlDirective('private')); $this->assertTrue($bag->hasCacheControlDirective('must-revalidate')); $this->assertFalse($bag->hasCacheControlDirective('max-age')); - $bag = new ResponseHeaderBag(array('Expires' => 'Wed, 16 Feb 2011 14:17:43 GMT')); + $bag = new ResponseHeaderBag(['Expires' => 'Wed, 16 Feb 2011 14:17:43 GMT']); $this->assertEquals('private, must-revalidate', $bag->get('Cache-Control')); - $bag = new ResponseHeaderBag(array( + $bag = new ResponseHeaderBag([ 'Expires' => 'Wed, 16 Feb 2011 14:17:43 GMT', 'Cache-Control' => 'max-age=3600', - )); + ]); $this->assertEquals('max-age=3600, private', $bag->get('Cache-Control')); - $bag = new ResponseHeaderBag(array('Last-Modified' => 'abcde')); + $bag = new ResponseHeaderBag(['Last-Modified' => 'abcde']); $this->assertEquals('private, must-revalidate', $bag->get('Cache-Control')); - $bag = new ResponseHeaderBag(array('Etag' => 'abcde', 'Last-Modified' => 'abcde')); + $bag = new ResponseHeaderBag(['Etag' => 'abcde', 'Last-Modified' => 'abcde']); $this->assertEquals('private, must-revalidate', $bag->get('Cache-Control')); - $bag = new ResponseHeaderBag(array('cache-control' => 'max-age=100')); + $bag = new ResponseHeaderBag(['cache-control' => 'max-age=100']); $this->assertEquals('max-age=100, private', $bag->get('Cache-Control')); - $bag = new ResponseHeaderBag(array('cache-control' => 's-maxage=100')); + $bag = new ResponseHeaderBag(['cache-control' => 's-maxage=100']); $this->assertEquals('s-maxage=100', $bag->get('Cache-Control')); - $bag = new ResponseHeaderBag(array('cache-control' => 'private, max-age=100')); + $bag = new ResponseHeaderBag(['cache-control' => 'private, max-age=100']); $this->assertEquals('max-age=100, private', $bag->get('Cache-Control')); - $bag = new ResponseHeaderBag(array('cache-control' => 'public, max-age=100')); + $bag = new ResponseHeaderBag(['cache-control' => 'public, max-age=100']); $this->assertEquals('max-age=100, public', $bag->get('Cache-Control')); $bag = new ResponseHeaderBag(); @@ -88,7 +88,7 @@ class ResponseHeaderBagTest extends TestCase $this->assertEquals('private, must-revalidate', $bag->get('Cache-Control')); $bag = new ResponseHeaderBag(); - $bag->set('Cache-Control', array('public', 'must-revalidate')); + $bag->set('Cache-Control', ['public', 'must-revalidate']); $this->assertCount(1, $bag->get('Cache-Control', null, false)); $this->assertEquals('must-revalidate, public', $bag->get('Cache-Control')); @@ -101,7 +101,7 @@ class ResponseHeaderBagTest extends TestCase public function testCacheControlClone() { - $headers = array('foo' => 'bar'); + $headers = ['foo' => 'bar']; $bag1 = new ResponseHeaderBag($headers); $bag2 = new ResponseHeaderBag($bag1->allPreserveCase()); $this->assertEquals($bag1->allPreserveCase(), $bag2->allPreserveCase()); @@ -109,7 +109,7 @@ class ResponseHeaderBagTest extends TestCase public function testToStringIncludesCookieHeaders() { - $bag = new ResponseHeaderBag(array()); + $bag = new ResponseHeaderBag([]); $bag->setCookie(new Cookie('foo', 'bar')); $this->assertSetCookieHeader('foo=bar; path=/; httponly', $bag); @@ -121,7 +121,7 @@ class ResponseHeaderBagTest extends TestCase public function testClearCookieSecureNotHttpOnly() { - $bag = new ResponseHeaderBag(array()); + $bag = new ResponseHeaderBag([]); $bag->clearCookie('foo', '/', null, true, false); @@ -130,23 +130,23 @@ class ResponseHeaderBagTest extends TestCase public function testReplace() { - $bag = new ResponseHeaderBag(array()); + $bag = new ResponseHeaderBag([]); $this->assertEquals('no-cache, private', $bag->get('Cache-Control')); $this->assertTrue($bag->hasCacheControlDirective('no-cache')); - $bag->replace(array('Cache-Control' => 'public')); + $bag->replace(['Cache-Control' => 'public']); $this->assertEquals('public', $bag->get('Cache-Control')); $this->assertTrue($bag->hasCacheControlDirective('public')); } public function testReplaceWithRemove() { - $bag = new ResponseHeaderBag(array()); + $bag = new ResponseHeaderBag([]); $this->assertEquals('no-cache, private', $bag->get('Cache-Control')); $this->assertTrue($bag->hasCacheControlDirective('no-cache')); $bag->remove('Cache-Control'); - $bag->replace(array()); + $bag->replace([]); $this->assertEquals('no-cache, private', $bag->get('Cache-Control')); $this->assertTrue($bag->hasCacheControlDirective('no-cache')); } @@ -161,12 +161,12 @@ class ResponseHeaderBagTest extends TestCase $this->assertCount(4, $bag->getCookies()); $this->assertEquals('foo=bar; path=/path/foo; domain=foo.bar; httponly', $bag->get('set-cookie')); - $this->assertEquals(array( + $this->assertEquals([ 'foo=bar; path=/path/foo; domain=foo.bar; httponly', 'foo=bar; path=/path/bar; domain=foo.bar; httponly', 'foo=bar; path=/path/bar; domain=bar.foo; httponly', 'foo=bar; path=/; httponly', - ), $bag->get('set-cookie', null, false)); + ], $bag->get('set-cookie', null, false)); $this->assertSetCookieHeader('foo=bar; path=/path/foo; domain=foo.bar; httponly', $bag); $this->assertSetCookieHeader('foo=bar; path=/path/bar; domain=foo.bar; httponly', $bag); @@ -228,16 +228,16 @@ class ResponseHeaderBagTest extends TestCase { $bag = new ResponseHeaderBag(); $bag->set('set-cookie', 'foo=bar'); - $this->assertEquals(array(new Cookie('foo', 'bar', 0, '/', null, false, false, true)), $bag->getCookies()); + $this->assertEquals([new Cookie('foo', 'bar', 0, '/', null, false, false, true)], $bag->getCookies()); $bag->set('set-cookie', 'foo2=bar2', false); - $this->assertEquals(array( + $this->assertEquals([ new Cookie('foo', 'bar', 0, '/', null, false, false, true), new Cookie('foo2', 'bar2', 0, '/', null, false, false, true), - ), $bag->getCookies()); + ], $bag->getCookies()); $bag->remove('set-cookie'); - $this->assertEquals(array(), $bag->getCookies()); + $this->assertEquals([], $bag->getCookies()); } /** @@ -280,20 +280,20 @@ class ResponseHeaderBagTest extends TestCase (string) $headers; $allHeaders = $headers->allPreserveCase(); - $this->assertEquals(array('http://www.symfony.com'), $allHeaders['Location']); - $this->assertEquals(array('text/html'), $allHeaders['Content-type']); + $this->assertEquals(['http://www.symfony.com'], $allHeaders['Location']); + $this->assertEquals(['text/html'], $allHeaders['Content-type']); } public function provideMakeDisposition() { - return array( - array('attachment', 'foo.html', 'foo.html', 'attachment; filename="foo.html"'), - array('attachment', 'foo.html', '', 'attachment; filename="foo.html"'), - array('attachment', 'foo bar.html', '', 'attachment; filename="foo bar.html"'), - array('attachment', 'foo "bar".html', '', 'attachment; filename="foo \\"bar\\".html"'), - array('attachment', 'foo%20bar.html', 'foo bar.html', 'attachment; filename="foo bar.html"; filename*=utf-8\'\'foo%2520bar.html'), - array('attachment', 'föö.html', 'foo.html', 'attachment; filename="foo.html"; filename*=utf-8\'\'f%C3%B6%C3%B6.html'), - ); + return [ + ['attachment', 'foo.html', 'foo.html', 'attachment; filename="foo.html"'], + ['attachment', 'foo.html', '', 'attachment; filename="foo.html"'], + ['attachment', 'foo bar.html', '', 'attachment; filename="foo bar.html"'], + ['attachment', 'foo "bar".html', '', 'attachment; filename="foo \\"bar\\".html"'], + ['attachment', 'foo%20bar.html', 'foo bar.html', 'attachment; filename="foo bar.html"; filename*=utf-8\'\'foo%2520bar.html'], + ['attachment', 'föö.html', 'foo.html', 'attachment; filename="foo.html"; filename*=utf-8\'\'f%C3%B6%C3%B6.html'], + ]; } /** @@ -309,14 +309,14 @@ class ResponseHeaderBagTest extends TestCase public function provideMakeDispositionFail() { - return array( - array('attachment', 'foo%20bar.html'), - array('attachment', 'foo/bar.html'), - array('attachment', '/foo.html'), - array('attachment', 'foo\bar.html'), - array('attachment', '\foo.html'), - array('attachment', 'föö.html'), - ); + return [ + ['attachment', 'foo%20bar.html'], + ['attachment', 'foo/bar.html'], + ['attachment', '/foo.html'], + ['attachment', 'foo\bar.html'], + ['attachment', '\foo.html'], + ['attachment', 'föö.html'], + ]; } public function testDateHeaderAddedOnCreation() @@ -332,7 +332,7 @@ class ResponseHeaderBagTest extends TestCase public function testDateHeaderCanBeSetOnCreation() { $someDate = 'Thu, 23 Mar 2017 09:15:12 GMT'; - $bag = new ResponseHeaderBag(array('Date' => $someDate)); + $bag = new ResponseHeaderBag(['Date' => $someDate]); $this->assertEquals($someDate, $bag->get('Date')); } @@ -340,7 +340,7 @@ class ResponseHeaderBagTest extends TestCase public function testDateHeaderWillBeRecreatedWhenRemoved() { $someDate = 'Thu, 23 Mar 2017 09:15:12 GMT'; - $bag = new ResponseHeaderBag(array('Date' => $someDate)); + $bag = new ResponseHeaderBag(['Date' => $someDate]); $bag->remove('Date'); // a (new) Date header is still present @@ -351,7 +351,7 @@ class ResponseHeaderBagTest extends TestCase public function testDateHeaderWillBeRecreatedWhenHeadersAreReplaced() { $bag = new ResponseHeaderBag(); - $bag->replace(array()); + $bag->replace([]); $this->assertTrue($bag->has('Date')); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php index 43fa9b70..68634f6d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php @@ -21,7 +21,7 @@ class ResponseTest extends ResponseTestCase { public function testCreate() { - $response = Response::create('foo', 301, array('Foo' => 'bar')); + $response = Response::create('foo', 301, ['Foo' => 'bar']); $this->assertInstanceOf('Symfony\Component\HttpFoundation\Response', $response); $this->assertEquals(301, $response->getStatusCode()); @@ -253,10 +253,10 @@ class ResponseTest extends ResponseTestCase public function testIsValidateable() { - $response = new Response('', 200, array('Last-Modified' => $this->createDateTimeOneHourAgo()->format(DATE_RFC2822))); + $response = new Response('', 200, ['Last-Modified' => $this->createDateTimeOneHourAgo()->format(DATE_RFC2822)]); $this->assertTrue($response->isValidateable(), '->isValidateable() returns true if Last-Modified is present'); - $response = new Response('', 200, array('ETag' => '"12345"')); + $response = new Response('', 200, ['ETag' => '"12345"']); $this->assertTrue($response->isValidateable(), '->isValidateable() returns true if ETag is present'); $response = new Response(); @@ -266,7 +266,7 @@ class ResponseTest extends ResponseTestCase public function testGetDate() { $oneHourAgo = $this->createDateTimeOneHourAgo(); - $response = new Response('', 200, array('Date' => $oneHourAgo->format(DATE_RFC2822))); + $response = new Response('', 200, ['Date' => $oneHourAgo->format(DATE_RFC2822)]); $date = $response->getDate(); $this->assertEquals($oneHourAgo->getTimestamp(), $date->getTimestamp(), '->getDate() returns the Date header if present'); @@ -274,7 +274,7 @@ class ResponseTest extends ResponseTestCase $date = $response->getDate(); $this->assertEquals(time(), $date->getTimestamp(), '->getDate() returns the current Date if no Date header present'); - $response = new Response('', 200, array('Date' => $this->createDateTimeOneHourAgo()->format(DATE_RFC2822))); + $response = new Response('', 200, ['Date' => $this->createDateTimeOneHourAgo()->format(DATE_RFC2822)]); $now = $this->createDateTimeNow(); $response->headers->set('Date', $now->format(DATE_RFC2822)); $date = $response->getDate(); @@ -414,21 +414,21 @@ class ResponseTest extends ResponseTestCase public function testGetVary() { $response = new Response(); - $this->assertEquals(array(), $response->getVary(), '->getVary() returns an empty array if no Vary header is present'); + $this->assertEquals([], $response->getVary(), '->getVary() returns an empty array if no Vary header is present'); $response = new Response(); $response->headers->set('Vary', 'Accept-Language'); - $this->assertEquals(array('Accept-Language'), $response->getVary(), '->getVary() parses a single header name value'); + $this->assertEquals(['Accept-Language'], $response->getVary(), '->getVary() parses a single header name value'); $response = new Response(); $response->headers->set('Vary', 'Accept-Language User-Agent X-Foo'); - $this->assertEquals(array('Accept-Language', 'User-Agent', 'X-Foo'), $response->getVary(), '->getVary() parses multiple header name values separated by spaces'); + $this->assertEquals(['Accept-Language', 'User-Agent', 'X-Foo'], $response->getVary(), '->getVary() parses multiple header name values separated by spaces'); $response = new Response(); $response->headers->set('Vary', 'Accept-Language,User-Agent, X-Foo'); - $this->assertEquals(array('Accept-Language', 'User-Agent', 'X-Foo'), $response->getVary(), '->getVary() parses multiple header name values separated by commas'); + $this->assertEquals(['Accept-Language', 'User-Agent', 'X-Foo'], $response->getVary(), '->getVary() parses multiple header name values separated by commas'); - $vary = array('Accept-Language', 'User-Agent', 'X-foo'); + $vary = ['Accept-Language', 'User-Agent', 'X-foo']; $response = new Response(); $response->headers->set('Vary', $vary); @@ -443,18 +443,18 @@ class ResponseTest extends ResponseTestCase { $response = new Response(); $response->setVary('Accept-Language'); - $this->assertEquals(array('Accept-Language'), $response->getVary()); + $this->assertEquals(['Accept-Language'], $response->getVary()); $response->setVary('Accept-Language, User-Agent'); - $this->assertEquals(array('Accept-Language', 'User-Agent'), $response->getVary(), '->setVary() replace the vary header by default'); + $this->assertEquals(['Accept-Language', 'User-Agent'], $response->getVary(), '->setVary() replace the vary header by default'); $response->setVary('X-Foo', false); - $this->assertEquals(array('Accept-Language', 'User-Agent', 'X-Foo'), $response->getVary(), '->setVary() doesn\'t wipe out earlier Vary headers if replace is set to false'); + $this->assertEquals(['Accept-Language', 'User-Agent', 'X-Foo'], $response->getVary(), '->setVary() doesn\'t wipe out earlier Vary headers if replace is set to false'); } public function testDefaultContentType() { - $headerMock = $this->getMockBuilder('Symfony\Component\HttpFoundation\ResponseHeaderBag')->setMethods(array('set'))->getMock(); + $headerMock = $this->getMockBuilder('Symfony\Component\HttpFoundation\ResponseHeaderBag')->setMethods(['set'])->getMock(); $headerMock->expects($this->at(0)) ->method('set') ->with('Content-Type', 'text/html'); @@ -576,55 +576,55 @@ class ResponseTest extends ResponseTestCase public function testSetCache() { $response = new Response(); - //array('etag', 'last_modified', 'max_age', 's_maxage', 'private', 'public') + // ['etag', 'last_modified', 'max_age', 's_maxage', 'private', 'public'] try { - $response->setCache(array('wrong option' => 'value')); + $response->setCache(['wrong option' => 'value']); $this->fail('->setCache() throws an InvalidArgumentException if an option is not supported'); } catch (\Exception $e) { $this->assertInstanceOf('InvalidArgumentException', $e, '->setCache() throws an InvalidArgumentException if an option is not supported'); $this->assertContains('"wrong option"', $e->getMessage()); } - $options = array('etag' => '"whatever"'); + $options = ['etag' => '"whatever"']; $response->setCache($options); $this->assertEquals($response->getEtag(), '"whatever"'); $now = $this->createDateTimeNow(); - $options = array('last_modified' => $now); + $options = ['last_modified' => $now]; $response->setCache($options); $this->assertEquals($response->getLastModified()->getTimestamp(), $now->getTimestamp()); - $options = array('max_age' => 100); + $options = ['max_age' => 100]; $response->setCache($options); $this->assertEquals($response->getMaxAge(), 100); - $options = array('s_maxage' => 200); + $options = ['s_maxage' => 200]; $response->setCache($options); $this->assertEquals($response->getMaxAge(), 200); $this->assertTrue($response->headers->hasCacheControlDirective('public')); $this->assertFalse($response->headers->hasCacheControlDirective('private')); - $response->setCache(array('public' => true)); + $response->setCache(['public' => true]); $this->assertTrue($response->headers->hasCacheControlDirective('public')); $this->assertFalse($response->headers->hasCacheControlDirective('private')); - $response->setCache(array('public' => false)); + $response->setCache(['public' => false]); $this->assertFalse($response->headers->hasCacheControlDirective('public')); $this->assertTrue($response->headers->hasCacheControlDirective('private')); - $response->setCache(array('private' => true)); + $response->setCache(['private' => true]); $this->assertFalse($response->headers->hasCacheControlDirective('public')); $this->assertTrue($response->headers->hasCacheControlDirective('private')); - $response->setCache(array('private' => false)); + $response->setCache(['private' => false]); $this->assertTrue($response->headers->hasCacheControlDirective('public')); $this->assertFalse($response->headers->hasCacheControlDirective('private')); - $response->setCache(array('immutable' => true)); + $response->setCache(['immutable' => true]); $this->assertTrue($response->headers->hasCacheControlDirective('immutable')); - $response->setCache(array('immutable' => false)); + $response->setCache(['immutable' => false]); $this->assertFalse($response->headers->hasCacheControlDirective('immutable')); } @@ -725,14 +725,14 @@ class ResponseTest extends ResponseTestCase public function getStatusCodeFixtures() { - return array( - array('200', null, 'OK'), - array('200', false, ''), - array('200', 'foo', 'foo'), - array('199', null, 'unknown status'), - array('199', false, ''), - array('199', 'foo', 'foo'), - ); + return [ + ['200', null, 'OK'], + ['200', false, ''], + ['200', 'foo', 'foo'], + ['199', null, 'unknown status'], + ['199', false, ''], + ['199', 'foo', 'foo'], + ]; } public function testIsInformational() @@ -746,7 +746,7 @@ class ResponseTest extends ResponseTestCase public function testIsRedirectRedirection() { - foreach (array(301, 302, 303, 307) as $code) { + foreach ([301, 302, 303, 307] as $code) { $response = new Response('', $code); $this->assertTrue($response->isRedirection()); $this->assertTrue($response->isRedirect()); @@ -764,7 +764,7 @@ class ResponseTest extends ResponseTestCase $this->assertFalse($response->isRedirection()); $this->assertFalse($response->isRedirect()); - $response = new Response('', 301, array('Location' => '/good-uri')); + $response = new Response('', 301, ['Location' => '/good-uri']); $this->assertFalse($response->isRedirect('/bad-uri')); $this->assertTrue($response->isRedirect('/good-uri')); } @@ -780,7 +780,7 @@ class ResponseTest extends ResponseTestCase public function testIsEmpty() { - foreach (array(204, 304) as $code) { + foreach ([204, 304] as $code) { $response = new Response('', $code); $this->assertTrue($response->isEmpty()); } @@ -829,7 +829,7 @@ class ResponseTest extends ResponseTestCase public function testSetEtag() { - $response = new Response('', 200, array('ETag' => '"12345"')); + $response = new Response('', 200, ['ETag' => '"12345"']); $response->setEtag(); $this->assertNull($response->headers->get('Etag'), '->setEtag() removes Etags when call with null'); @@ -859,7 +859,7 @@ class ResponseTest extends ResponseTestCase { $response = new Response(); - $setters = array( + $setters = [ 'setProtocolVersion' => '1.0', 'setCharset' => 'UTF-8', 'setPublic' => null, @@ -870,7 +870,7 @@ class ResponseTest extends ResponseTestCase 'setSharedMaxAge' => 1, 'setTtl' => 1, 'setClientTtl' => 1, - ); + ]; foreach ($setters as $setter => $arg) { $this->assertEquals($response, $response->{$setter}($arg)); @@ -889,20 +889,20 @@ class ResponseTest extends ResponseTestCase public function validContentProvider() { - return array( - 'obj' => array(new StringableObject()), - 'string' => array('Foo'), - 'int' => array(2), - ); + return [ + 'obj' => [new StringableObject()], + 'string' => ['Foo'], + 'int' => [2], + ]; } public function invalidContentProvider() { - return array( - 'obj' => array(new \stdClass()), - 'array' => array(array()), - 'bool' => array(true, '1'), - ); + return [ + 'obj' => [new \stdClass()], + 'array' => [[]], + 'bool' => [true, '1'], + ]; } protected function createDateTimeOneHourAgo() @@ -942,19 +942,19 @@ class ResponseTest extends ResponseTestCase $ianaHttpStatusCodes = new \DOMDocument(); - libxml_set_streams_context(stream_context_create(array( - 'http' => array( + libxml_set_streams_context(stream_context_create([ + 'http' => [ 'method' => 'GET', 'timeout' => 30, - ), - ))); + ], + ])); $ianaHttpStatusCodes->load('https://www.iana.org/assignments/http-status-codes/http-status-codes.xml'); if (!$ianaHttpStatusCodes->relaxNGValidate(__DIR__.'/schema/http-status-codes.rng')) { self::fail('Invalid IANA\'s HTTP status code list.'); } - $ianaCodesReasonPhrases = array(); + $ianaCodesReasonPhrases = []; $xpath = new \DOMXPath($ianaHttpStatusCodes); $xpath->registerNamespace('ns', 'http://www.iana.org/assignments'); @@ -964,16 +964,16 @@ class ResponseTest extends ResponseTestCase $value = $xpath->query('.//ns:value', $record)->item(0)->nodeValue; $description = $xpath->query('.//ns:description', $record)->item(0)->nodeValue; - if (\in_array($description, array('Unassigned', '(Unused)'), true)) { + if (\in_array($description, ['Unassigned', '(Unused)'], true)) { continue; } if (preg_match('/^([0-9]+)\s*\-\s*([0-9]+)$/', $value, $matches)) { for ($value = $matches[1]; $value <= $matches[2]; ++$value) { - $ianaCodesReasonPhrases[] = array($value, $description); + $ianaCodesReasonPhrases[] = [$value, $description]; } } else { - $ianaCodesReasonPhrases[] = array($value, $description); + $ianaCodesReasonPhrases[] = [$value, $description]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ServerBagTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ServerBagTest.php index f8becec5..0663b118 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ServerBagTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ServerBagTest.php @@ -23,7 +23,7 @@ class ServerBagTest extends TestCase { public function testShouldExtractHeadersFromServerArray() { - $server = array( + $server = [ 'SOME_SERVER_VARIABLE' => 'value', 'SOME_SERVER_VARIABLE2' => 'value', 'ROOT' => 'value', @@ -32,45 +32,45 @@ class ServerBagTest extends TestCase 'HTTP_ETAG' => 'asdf', 'PHP_AUTH_USER' => 'foo', 'PHP_AUTH_PW' => 'bar', - ); + ]; $bag = new ServerBag($server); - $this->assertEquals(array( + $this->assertEquals([ 'CONTENT_TYPE' => 'text/html', 'CONTENT_LENGTH' => '0', 'ETAG' => 'asdf', 'AUTHORIZATION' => 'Basic '.base64_encode('foo:bar'), 'PHP_AUTH_USER' => 'foo', 'PHP_AUTH_PW' => 'bar', - ), $bag->getHeaders()); + ], $bag->getHeaders()); } public function testHttpPasswordIsOptional() { - $bag = new ServerBag(array('PHP_AUTH_USER' => 'foo')); + $bag = new ServerBag(['PHP_AUTH_USER' => 'foo']); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => 'Basic '.base64_encode('foo:'), 'PHP_AUTH_USER' => 'foo', 'PHP_AUTH_PW' => '', - ), $bag->getHeaders()); + ], $bag->getHeaders()); } public function testHttpBasicAuthWithPhpCgi() { - $bag = new ServerBag(array('HTTP_AUTHORIZATION' => 'Basic '.base64_encode('foo:bar'))); + $bag = new ServerBag(['HTTP_AUTHORIZATION' => 'Basic '.base64_encode('foo:bar')]); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => 'Basic '.base64_encode('foo:bar'), 'PHP_AUTH_USER' => 'foo', 'PHP_AUTH_PW' => 'bar', - ), $bag->getHeaders()); + ], $bag->getHeaders()); } public function testHttpBasicAuthWithPhpCgiBogus() { - $bag = new ServerBag(array('HTTP_AUTHORIZATION' => 'Basic_'.base64_encode('foo:bar'))); + $bag = new ServerBag(['HTTP_AUTHORIZATION' => 'Basic_'.base64_encode('foo:bar')]); // Username and passwords should not be set as the header is bogus $headers = $bag->getHeaders(); @@ -80,41 +80,41 @@ class ServerBagTest extends TestCase public function testHttpBasicAuthWithPhpCgiRedirect() { - $bag = new ServerBag(array('REDIRECT_HTTP_AUTHORIZATION' => 'Basic '.base64_encode('username:pass:word'))); + $bag = new ServerBag(['REDIRECT_HTTP_AUTHORIZATION' => 'Basic '.base64_encode('username:pass:word')]); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => 'Basic '.base64_encode('username:pass:word'), 'PHP_AUTH_USER' => 'username', 'PHP_AUTH_PW' => 'pass:word', - ), $bag->getHeaders()); + ], $bag->getHeaders()); } public function testHttpBasicAuthWithPhpCgiEmptyPassword() { - $bag = new ServerBag(array('HTTP_AUTHORIZATION' => 'Basic '.base64_encode('foo:'))); + $bag = new ServerBag(['HTTP_AUTHORIZATION' => 'Basic '.base64_encode('foo:')]); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => 'Basic '.base64_encode('foo:'), 'PHP_AUTH_USER' => 'foo', 'PHP_AUTH_PW' => '', - ), $bag->getHeaders()); + ], $bag->getHeaders()); } public function testHttpDigestAuthWithPhpCgi() { $digest = 'Digest username="foo", realm="acme", nonce="'.md5('secret').'", uri="/protected, qop="auth"'; - $bag = new ServerBag(array('HTTP_AUTHORIZATION' => $digest)); + $bag = new ServerBag(['HTTP_AUTHORIZATION' => $digest]); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => $digest, 'PHP_AUTH_DIGEST' => $digest, - ), $bag->getHeaders()); + ], $bag->getHeaders()); } public function testHttpDigestAuthWithPhpCgiBogus() { $digest = 'Digest_username="foo", realm="acme", nonce="'.md5('secret').'", uri="/protected, qop="auth"'; - $bag = new ServerBag(array('HTTP_AUTHORIZATION' => $digest)); + $bag = new ServerBag(['HTTP_AUTHORIZATION' => $digest]); // Username and passwords should not be set as the header is bogus $headers = $bag->getHeaders(); @@ -125,32 +125,32 @@ class ServerBagTest extends TestCase public function testHttpDigestAuthWithPhpCgiRedirect() { $digest = 'Digest username="foo", realm="acme", nonce="'.md5('secret').'", uri="/protected, qop="auth"'; - $bag = new ServerBag(array('REDIRECT_HTTP_AUTHORIZATION' => $digest)); + $bag = new ServerBag(['REDIRECT_HTTP_AUTHORIZATION' => $digest]); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => $digest, 'PHP_AUTH_DIGEST' => $digest, - ), $bag->getHeaders()); + ], $bag->getHeaders()); } public function testOAuthBearerAuth() { $headerContent = 'Bearer L-yLEOr9zhmUYRkzN1jwwxwQ-PBNiKDc8dgfB4hTfvo'; - $bag = new ServerBag(array('HTTP_AUTHORIZATION' => $headerContent)); + $bag = new ServerBag(['HTTP_AUTHORIZATION' => $headerContent]); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => $headerContent, - ), $bag->getHeaders()); + ], $bag->getHeaders()); } public function testOAuthBearerAuthWithRedirect() { $headerContent = 'Bearer L-yLEOr9zhmUYRkzN1jwwxwQ-PBNiKDc8dgfB4hTfvo'; - $bag = new ServerBag(array('REDIRECT_HTTP_AUTHORIZATION' => $headerContent)); + $bag = new ServerBag(['REDIRECT_HTTP_AUTHORIZATION' => $headerContent]); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => $headerContent, - ), $bag->getHeaders()); + ], $bag->getHeaders()); } /** @@ -159,12 +159,12 @@ class ServerBagTest extends TestCase public function testItDoesNotOverwriteTheAuthorizationHeaderIfItIsAlreadySet() { $headerContent = 'Bearer L-yLEOr9zhmUYRkzN1jwwxwQ-PBNiKDc8dgfB4hTfvo'; - $bag = new ServerBag(array('PHP_AUTH_USER' => 'foo', 'HTTP_AUTHORIZATION' => $headerContent)); + $bag = new ServerBag(['PHP_AUTH_USER' => 'foo', 'HTTP_AUTHORIZATION' => $headerContent]); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => $headerContent, 'PHP_AUTH_USER' => 'foo', 'PHP_AUTH_PW' => '', - ), $bag->getHeaders()); + ], $bag->getHeaders()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php index 43644e23..3f2f7b3c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php @@ -21,7 +21,7 @@ use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; */ class AttributeBagTest extends TestCase { - private $array = array(); + private $array = []; /** * @var AttributeBag @@ -30,21 +30,21 @@ class AttributeBagTest extends TestCase protected function setUp() { - $this->array = array( + $this->array = [ 'hello' => 'world', 'always' => 'be happy', 'user.login' => 'drak', - 'csrf.token' => array( + 'csrf.token' => [ 'a' => '1234', 'b' => '4321', - ), - 'category' => array( - 'fishing' => array( + ], + 'category' => [ + 'fishing' => [ 'first' => 'cod', 'second' => 'sole', - ), - ), - ); + ], + ], + ]; $this->bag = new AttributeBag('_sf2'); $this->bag->initialize($this->array); } @@ -52,7 +52,7 @@ class AttributeBagTest extends TestCase protected function tearDown() { $this->bag = null; - $this->array = array(); + $this->array = []; } public function testInitialize() @@ -60,7 +60,7 @@ class AttributeBagTest extends TestCase $bag = new AttributeBag(); $bag->initialize($this->array); $this->assertEquals($this->array, $bag->all()); - $array = array('should' => 'change'); + $array = ['should' => 'change']; $bag->initialize($array); $this->assertEquals($array, $bag->all()); } @@ -122,7 +122,7 @@ class AttributeBagTest extends TestCase public function testReplace() { - $array = array(); + $array = []; $array['name'] = 'jack'; $array['foo.bar'] = 'beep'; $this->bag->replace($array); @@ -150,22 +150,22 @@ class AttributeBagTest extends TestCase public function testClear() { $this->bag->clear(); - $this->assertEquals(array(), $this->bag->all()); + $this->assertEquals([], $this->bag->all()); } public function attributesProvider() { - return array( - array('hello', 'world', true), - array('always', 'be happy', true), - array('user.login', 'drak', true), - array('csrf.token', array('a' => '1234', 'b' => '4321'), true), - array('category', array('fishing' => array('first' => 'cod', 'second' => 'sole')), true), - array('user2.login', null, false), - array('never', null, false), - array('bye', null, false), - array('bye/for/now', null, false), - ); + return [ + ['hello', 'world', true], + ['always', 'be happy', true], + ['user.login', 'drak', true], + ['csrf.token', ['a' => '1234', 'b' => '4321'], true], + ['category', ['fishing' => ['first' => 'cod', 'second' => 'sole']], true], + ['user2.login', null, false], + ['never', null, false], + ['bye', null, false], + ['bye/for/now', null, false], + ]; } public function testGetIterator() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php index ec4cd5ad..6b4bb17d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php @@ -21,7 +21,7 @@ use Symfony\Component\HttpFoundation\Session\Attribute\NamespacedAttributeBag; */ class NamespacedAttributeBagTest extends TestCase { - private $array = array(); + private $array = []; /** * @var NamespacedAttributeBag @@ -30,21 +30,21 @@ class NamespacedAttributeBagTest extends TestCase protected function setUp() { - $this->array = array( + $this->array = [ 'hello' => 'world', 'always' => 'be happy', 'user.login' => 'drak', - 'csrf.token' => array( + 'csrf.token' => [ 'a' => '1234', 'b' => '4321', - ), - 'category' => array( - 'fishing' => array( + ], + 'category' => [ + 'fishing' => [ 'first' => 'cod', 'second' => 'sole', - ), - ), - ); + ], + ], + ]; $this->bag = new NamespacedAttributeBag('_sf2', '/'); $this->bag->initialize($this->array); } @@ -52,7 +52,7 @@ class NamespacedAttributeBagTest extends TestCase protected function tearDown() { $this->bag = null; - $this->array = array(); + $this->array = []; } public function testInitialize() @@ -60,7 +60,7 @@ class NamespacedAttributeBagTest extends TestCase $bag = new NamespacedAttributeBag(); $bag->initialize($this->array); $this->assertEquals($this->array, $this->bag->all()); - $array = array('should' => 'not stick'); + $array = ['should' => 'not stick']; $bag->initialize($array); // should have remained the same @@ -139,7 +139,7 @@ class NamespacedAttributeBagTest extends TestCase public function testReplace() { - $array = array(); + $array = []; $array['name'] = 'jack'; $array['foo.bar'] = 'beep'; $this->bag->replace($array); @@ -177,28 +177,28 @@ class NamespacedAttributeBagTest extends TestCase public function testClear() { $this->bag->clear(); - $this->assertEquals(array(), $this->bag->all()); + $this->assertEquals([], $this->bag->all()); } public function attributesProvider() { - return array( - array('hello', 'world', true), - array('always', 'be happy', true), - array('user.login', 'drak', true), - array('csrf.token', array('a' => '1234', 'b' => '4321'), true), - array('csrf.token/a', '1234', true), - array('csrf.token/b', '4321', true), - array('category', array('fishing' => array('first' => 'cod', 'second' => 'sole')), true), - array('category/fishing', array('first' => 'cod', 'second' => 'sole'), true), - array('category/fishing/missing/first', null, false), - array('category/fishing/first', 'cod', true), - array('category/fishing/second', 'sole', true), - array('category/fishing/missing/second', null, false), - array('user2.login', null, false), - array('never', null, false), - array('bye', null, false), - array('bye/for/now', null, false), - ); + return [ + ['hello', 'world', true], + ['always', 'be happy', true], + ['user.login', 'drak', true], + ['csrf.token', ['a' => '1234', 'b' => '4321'], true], + ['csrf.token/a', '1234', true], + ['csrf.token/b', '4321', true], + ['category', ['fishing' => ['first' => 'cod', 'second' => 'sole']], true], + ['category/fishing', ['first' => 'cod', 'second' => 'sole'], true], + ['category/fishing/missing/first', null, false], + ['category/fishing/first', 'cod', true], + ['category/fishing/second', 'sole', true], + ['category/fishing/missing/second', null, false], + ['user2.login', null, false], + ['never', null, false], + ['bye', null, false], + ['bye/for/now', null, false], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php index fa8626ab..b4e2c3a5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php @@ -26,13 +26,13 @@ class AutoExpireFlashBagTest extends TestCase */ private $bag; - protected $array = array(); + protected $array = []; protected function setUp() { parent::setUp(); $this->bag = new FlashBag(); - $this->array = array('new' => array('notice' => array('A previous flash message'))); + $this->array = ['new' => ['notice' => ['A previous flash message']]]; $this->bag->initialize($this->array); } @@ -45,16 +45,16 @@ class AutoExpireFlashBagTest extends TestCase public function testInitialize() { $bag = new FlashBag(); - $array = array('new' => array('notice' => array('A previous flash message'))); + $array = ['new' => ['notice' => ['A previous flash message']]]; $bag->initialize($array); - $this->assertEquals(array('A previous flash message'), $bag->peek('notice')); - $array = array('new' => array( - 'notice' => array('Something else'), - 'error' => array('a'), - )); + $this->assertEquals(['A previous flash message'], $bag->peek('notice')); + $array = ['new' => [ + 'notice' => ['Something else'], + 'error' => ['a'], + ]]; $bag->initialize($array); - $this->assertEquals(array('Something else'), $bag->peek('notice')); - $this->assertEquals(array('a'), $bag->peek('error')); + $this->assertEquals(['Something else'], $bag->peek('notice')); + $this->assertEquals(['a'], $bag->peek('error')); } public function testGetStorageKey() @@ -73,16 +73,16 @@ class AutoExpireFlashBagTest extends TestCase public function testPeek() { - $this->assertEquals(array(), $this->bag->peek('non_existing')); - $this->assertEquals(array('default'), $this->bag->peek('non_existing', array('default'))); - $this->assertEquals(array('A previous flash message'), $this->bag->peek('notice')); - $this->assertEquals(array('A previous flash message'), $this->bag->peek('notice')); + $this->assertEquals([], $this->bag->peek('non_existing')); + $this->assertEquals(['default'], $this->bag->peek('non_existing', ['default'])); + $this->assertEquals(['A previous flash message'], $this->bag->peek('notice')); + $this->assertEquals(['A previous flash message'], $this->bag->peek('notice')); } public function testSet() { $this->bag->set('notice', 'Foo'); - $this->assertEquals(array('A previous flash message'), $this->bag->peek('notice')); + $this->assertEquals(['A previous flash message'], $this->bag->peek('notice')); } public function testHas() @@ -93,43 +93,43 @@ class AutoExpireFlashBagTest extends TestCase public function testKeys() { - $this->assertEquals(array('notice'), $this->bag->keys()); + $this->assertEquals(['notice'], $this->bag->keys()); } public function testPeekAll() { - $array = array( - 'new' => array( + $array = [ + 'new' => [ 'notice' => 'Foo', 'error' => 'Bar', - ), - ); + ], + ]; $this->bag->initialize($array); - $this->assertEquals(array( + $this->assertEquals([ 'notice' => 'Foo', 'error' => 'Bar', - ), $this->bag->peekAll() + ], $this->bag->peekAll() ); - $this->assertEquals(array( + $this->assertEquals([ 'notice' => 'Foo', 'error' => 'Bar', - ), $this->bag->peekAll() + ], $this->bag->peekAll() ); } public function testGet() { - $this->assertEquals(array(), $this->bag->get('non_existing')); - $this->assertEquals(array('default'), $this->bag->get('non_existing', array('default'))); - $this->assertEquals(array('A previous flash message'), $this->bag->get('notice')); - $this->assertEquals(array(), $this->bag->get('notice')); + $this->assertEquals([], $this->bag->get('non_existing')); + $this->assertEquals(['default'], $this->bag->get('non_existing', ['default'])); + $this->assertEquals(['A previous flash message'], $this->bag->get('notice')); + $this->assertEquals([], $this->bag->get('notice')); } public function testSetAll() { - $this->bag->setAll(array('a' => 'first', 'b' => 'second')); + $this->bag->setAll(['a' => 'first', 'b' => 'second']); $this->assertFalse($this->bag->has('a')); $this->assertFalse($this->bag->has('b')); } @@ -138,17 +138,17 @@ class AutoExpireFlashBagTest extends TestCase { $this->bag->set('notice', 'Foo'); $this->bag->set('error', 'Bar'); - $this->assertEquals(array( - 'notice' => array('A previous flash message'), - ), $this->bag->all() + $this->assertEquals([ + 'notice' => ['A previous flash message'], + ], $this->bag->all() ); - $this->assertEquals(array(), $this->bag->all()); + $this->assertEquals([], $this->bag->all()); } public function testClear() { - $this->assertEquals(array('notice' => array('A previous flash message')), $this->bag->clear()); + $this->assertEquals(['notice' => ['A previous flash message']], $this->bag->clear()); } public function testDoNotRemoveTheNewFlashesWhenDisplayingTheExistingOnes() @@ -156,6 +156,6 @@ class AutoExpireFlashBagTest extends TestCase $this->bag->add('success', 'Something'); $this->bag->all(); - $this->assertEquals(array('new' => array('success' => array('Something')), 'display' => array()), $this->array); + $this->assertEquals(['new' => ['success' => ['Something']], 'display' => []], $this->array); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php index 905a1f75..6d8619e0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php @@ -26,13 +26,13 @@ class FlashBagTest extends TestCase */ private $bag; - protected $array = array(); + protected $array = []; protected function setUp() { parent::setUp(); $this->bag = new FlashBag(); - $this->array = array('notice' => array('A previous flash message')); + $this->array = ['notice' => ['A previous flash message']]; $this->bag->initialize($this->array); } @@ -47,7 +47,7 @@ class FlashBagTest extends TestCase $bag = new FlashBag(); $bag->initialize($this->array); $this->assertEquals($this->array, $bag->peekAll()); - $array = array('should' => array('change')); + $array = ['should' => ['change']]; $bag->initialize($array); $this->assertEquals($array, $bag->peekAll()); } @@ -68,49 +68,49 @@ class FlashBagTest extends TestCase public function testPeek() { - $this->assertEquals(array(), $this->bag->peek('non_existing')); - $this->assertEquals(array('default'), $this->bag->peek('not_existing', array('default'))); - $this->assertEquals(array('A previous flash message'), $this->bag->peek('notice')); - $this->assertEquals(array('A previous flash message'), $this->bag->peek('notice')); + $this->assertEquals([], $this->bag->peek('non_existing')); + $this->assertEquals(['default'], $this->bag->peek('not_existing', ['default'])); + $this->assertEquals(['A previous flash message'], $this->bag->peek('notice')); + $this->assertEquals(['A previous flash message'], $this->bag->peek('notice')); } public function testAdd() { - $tab = array('bar' => 'baz'); + $tab = ['bar' => 'baz']; $this->bag->add('string_message', 'lorem'); $this->bag->add('object_message', new \stdClass()); $this->bag->add('array_message', $tab); - $this->assertEquals(array('lorem'), $this->bag->get('string_message')); - $this->assertEquals(array(new \stdClass()), $this->bag->get('object_message')); - $this->assertEquals(array($tab), $this->bag->get('array_message')); + $this->assertEquals(['lorem'], $this->bag->get('string_message')); + $this->assertEquals([new \stdClass()], $this->bag->get('object_message')); + $this->assertEquals([$tab], $this->bag->get('array_message')); } public function testGet() { - $this->assertEquals(array(), $this->bag->get('non_existing')); - $this->assertEquals(array('default'), $this->bag->get('not_existing', array('default'))); - $this->assertEquals(array('A previous flash message'), $this->bag->get('notice')); - $this->assertEquals(array(), $this->bag->get('notice')); + $this->assertEquals([], $this->bag->get('non_existing')); + $this->assertEquals(['default'], $this->bag->get('not_existing', ['default'])); + $this->assertEquals(['A previous flash message'], $this->bag->get('notice')); + $this->assertEquals([], $this->bag->get('notice')); } public function testAll() { $this->bag->set('notice', 'Foo'); $this->bag->set('error', 'Bar'); - $this->assertEquals(array( - 'notice' => array('Foo'), - 'error' => array('Bar'), ), $this->bag->all() + $this->assertEquals([ + 'notice' => ['Foo'], + 'error' => ['Bar'], ], $this->bag->all() ); - $this->assertEquals(array(), $this->bag->all()); + $this->assertEquals([], $this->bag->all()); } public function testSet() { $this->bag->set('notice', 'Foo'); $this->bag->set('notice', 'Bar'); - $this->assertEquals(array('Bar'), $this->bag->peek('notice')); + $this->assertEquals(['Bar'], $this->bag->peek('notice')); } public function testHas() @@ -121,7 +121,7 @@ class FlashBagTest extends TestCase public function testKeys() { - $this->assertEquals(array('notice'), $this->bag->keys()); + $this->assertEquals(['notice'], $this->bag->keys()); } public function testSetAll() @@ -130,28 +130,28 @@ class FlashBagTest extends TestCase $this->bag->add('another_flash', 'Bar'); $this->assertTrue($this->bag->has('one_flash')); $this->assertTrue($this->bag->has('another_flash')); - $this->bag->setAll(array('unique_flash' => 'FooBar')); + $this->bag->setAll(['unique_flash' => 'FooBar']); $this->assertFalse($this->bag->has('one_flash')); $this->assertFalse($this->bag->has('another_flash')); - $this->assertSame(array('unique_flash' => 'FooBar'), $this->bag->all()); - $this->assertSame(array(), $this->bag->all()); + $this->assertSame(['unique_flash' => 'FooBar'], $this->bag->all()); + $this->assertSame([], $this->bag->all()); } public function testPeekAll() { $this->bag->set('notice', 'Foo'); $this->bag->set('error', 'Bar'); - $this->assertEquals(array( - 'notice' => array('Foo'), - 'error' => array('Bar'), - ), $this->bag->peekAll() + $this->assertEquals([ + 'notice' => ['Foo'], + 'error' => ['Bar'], + ], $this->bag->peekAll() ); $this->assertTrue($this->bag->has('notice')); $this->assertTrue($this->bag->has('error')); - $this->assertEquals(array( - 'notice' => array('Foo'), - 'error' => array('Bar'), - ), $this->bag->peekAll() + $this->assertEquals([ + 'notice' => ['Foo'], + 'error' => ['Bar'], + ], $this->bag->peekAll() ); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php index 63351e57..afa00fc7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php @@ -127,10 +127,10 @@ class SessionTest extends TestCase public function testReplace() { - $this->session->replace(array('happiness' => 'be good', 'symfony' => 'awesome')); - $this->assertEquals(array('happiness' => 'be good', 'symfony' => 'awesome'), $this->session->all()); - $this->session->replace(array()); - $this->assertEquals(array(), $this->session->all()); + $this->session->replace(['happiness' => 'be good', 'symfony' => 'awesome']); + $this->assertEquals(['happiness' => 'be good', 'symfony' => 'awesome'], $this->session->all()); + $this->session->replace([]); + $this->assertEquals([], $this->session->all()); } /** @@ -150,16 +150,16 @@ class SessionTest extends TestCase $this->session->set('hi', 'fabien'); $this->session->set($key, $value); $this->session->clear(); - $this->assertEquals(array(), $this->session->all()); + $this->assertEquals([], $this->session->all()); } public function setProvider() { - return array( - array('foo', 'bar', array('foo' => 'bar')), - array('foo.bar', 'too much beer', array('foo.bar' => 'too much beer')), - array('great', 'symfony is great', array('great' => 'symfony is great')), - ); + return [ + ['foo', 'bar', ['foo' => 'bar']], + ['foo.bar', 'too much beer', ['foo.bar' => 'too much beer']], + ['great', 'symfony is great', ['great' => 'symfony is great']], + ]; } /** @@ -170,14 +170,14 @@ class SessionTest extends TestCase $this->session->set('hi.world', 'have a nice day'); $this->session->set($key, $value); $this->session->remove($key); - $this->assertEquals(array('hi.world' => 'have a nice day'), $this->session->all()); + $this->assertEquals(['hi.world' => 'have a nice day'], $this->session->all()); } public function testInvalidate() { $this->session->set('invalidate', 123); $this->session->invalidate(); - $this->assertEquals(array(), $this->session->all()); + $this->assertEquals([], $this->session->all()); } public function testMigrate() @@ -216,7 +216,7 @@ class SessionTest extends TestCase public function testGetIterator() { - $attributes = array('hello' => 'world', 'symfony' => 'rocks'); + $attributes = ['hello' => 'world', 'symfony' => 'rocks']; foreach ($attributes as $key => $val) { $this->session->set($key, $val); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php index 3ac081e3..98bc67bc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php @@ -22,10 +22,10 @@ class AbstractSessionHandlerTest extends TestCase public static function setUpBeforeClass() { - $spec = array( - 1 => array('file', '/dev/null', 'w'), - 2 => array('file', '/dev/null', 'w'), - ); + $spec = [ + 1 => ['file', '/dev/null', 'w'], + 2 => ['file', '/dev/null', 'w'], + ]; if (!self::$server = @proc_open('exec php -S localhost:8053', $spec, $pipes, __DIR__.'/Fixtures')) { self::markTestSkipped('PHP server unable to start.'); } @@ -45,7 +45,7 @@ class AbstractSessionHandlerTest extends TestCase */ public function testSession($fixture) { - $context = array('http' => array('header' => "Cookie: sid=123abc\r\n")); + $context = ['http' => ['header' => "Cookie: sid=123abc\r\n"]]; $context = stream_context_create($context); $result = file_get_contents(sprintf('http://localhost:8053/%s.php', $fixture), false, $context); @@ -55,7 +55,7 @@ class AbstractSessionHandlerTest extends TestCase public function provideSession() { foreach (glob(__DIR__.'/Fixtures/*.php') as $file) { - yield array(pathinfo($file, PATHINFO_FILENAME)); + yield [pathinfo($file, PATHINFO_FILENAME)]; } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php index d3d31762..68daa4e5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php @@ -41,7 +41,7 @@ class MemcacheSessionHandlerTest extends TestCase $this->memcache = $this->getMockBuilder('Memcache')->getMock(); $this->storage = new MemcacheSessionHandler( $this->memcache, - array('prefix' => self::PREFIX, 'expiretime' => self::TTL) + ['prefix' => self::PREFIX, 'expiretime' => self::TTL] ); } @@ -117,12 +117,12 @@ class MemcacheSessionHandlerTest extends TestCase public function getOptionFixtures() { - return array( - array(array('prefix' => 'session'), true), - array(array('expiretime' => 100), true), - array(array('prefix' => 'session', 'expiretime' => 200), true), - array(array('expiretime' => 100, 'foo' => 'bar'), false), - ); + return [ + [['prefix' => 'session'], true], + [['expiretime' => 100], true], + [['prefix' => 'session', 'expiretime' => 200], true], + [['expiretime' => 100, 'foo' => 'bar'], false], + ]; } public function testGetConnection() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php index 2a114801..81333734 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php @@ -45,7 +45,7 @@ class MemcachedSessionHandlerTest extends TestCase $this->memcached = $this->getMockBuilder('Memcached')->getMock(); $this->storage = new MemcachedSessionHandler( $this->memcached, - array('prefix' => self::PREFIX, 'expiretime' => self::TTL) + ['prefix' => self::PREFIX, 'expiretime' => self::TTL] ); } @@ -63,6 +63,12 @@ class MemcachedSessionHandlerTest extends TestCase public function testCloseSession() { + $this->memcached + ->expects($this->once()) + ->method('quit') + ->will($this->returnValue(true)) + ; + $this->assertTrue($this->storage->close()); } @@ -121,12 +127,12 @@ class MemcachedSessionHandlerTest extends TestCase public function getOptionFixtures() { - return array( - array(array('prefix' => 'session'), true), - array(array('expiretime' => 100), true), - array(array('prefix' => 'session', 'expiretime' => 200), true), - array(array('expiretime' => 100, 'foo' => 'bar'), false), - ); + return [ + [['prefix' => 'session'], true], + [['expiretime' => 100], true], + [['prefix' => 'session', 'expiretime' => 200], true], + [['expiretime' => 100, 'foo' => 'bar'], false], + ]; } public function testGetConnection() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php index 186fc0a2..6f2742ca 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php @@ -50,14 +50,14 @@ class MongoDbSessionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); - $this->options = array( + $this->options = [ 'id_field' => '_id', 'data_field' => 'data', 'time_field' => 'time', 'expiry_field' => 'expires_at', 'database' => 'sf2-test', 'collection' => 'session-test', - ); + ]; $this->storage = new MongoDbSessionHandler($this->mongo, $this->options); } @@ -75,7 +75,7 @@ class MongoDbSessionHandlerTest extends TestCase */ public function testConstructorShouldThrowExceptionForMissingOptions() { - new MongoDbSessionHandler($this->mongo, array()); + new MongoDbSessionHandler($this->mongo, []); } public function testOpenMethodAlwaysReturnTrue() @@ -118,9 +118,9 @@ class MongoDbSessionHandlerTest extends TestCase $this->assertGreaterThanOrEqual($criteria[$this->options['expiry_field']]['$gte']->sec, $testTimeout); } - $fields = array( + $fields = [ $this->options['id_field'] => 'foo', - ); + ]; if (phpversion('mongodb')) { $fields[$this->options['data_field']] = new \MongoDB\BSON\Binary('bar', \MongoDB\BSON\Binary::TYPE_OLD_BINARY); @@ -145,19 +145,19 @@ class MongoDbSessionHandlerTest extends TestCase ->with($this->options['database'], $this->options['collection']) ->will($this->returnValue($collection)); - $data = array(); + $data = []; $methodName = phpversion('mongodb') ? 'updateOne' : 'update'; $collection->expects($this->once()) ->method($methodName) ->will($this->returnCallback(function ($criteria, $updateData, $options) use (&$data) { - $this->assertEquals(array($this->options['id_field'] => 'foo'), $criteria); + $this->assertEquals([$this->options['id_field'] => 'foo'], $criteria); if (phpversion('mongodb')) { - $this->assertEquals(array('upsert' => true), $options); + $this->assertEquals(['upsert' => true], $options); } else { - $this->assertEquals(array('upsert' => true, 'multiple' => false), $options); + $this->assertEquals(['upsert' => true, 'multiple' => false], $options); } $data = $updateData['$set']; @@ -181,14 +181,14 @@ class MongoDbSessionHandlerTest extends TestCase public function testWriteWhenUsingExpiresField() { - $this->options = array( + $this->options = [ 'id_field' => '_id', 'data_field' => 'data', 'time_field' => 'time', 'database' => 'sf2-test', 'collection' => 'session-test', 'expiry_field' => 'expiresAt', - ); + ]; $this->storage = new MongoDbSessionHandler($this->mongo, $this->options); @@ -199,19 +199,19 @@ class MongoDbSessionHandlerTest extends TestCase ->with($this->options['database'], $this->options['collection']) ->will($this->returnValue($collection)); - $data = array(); + $data = []; $methodName = phpversion('mongodb') ? 'updateOne' : 'update'; $collection->expects($this->once()) ->method($methodName) ->will($this->returnCallback(function ($criteria, $updateData, $options) use (&$data) { - $this->assertEquals(array($this->options['id_field'] => 'foo'), $criteria); + $this->assertEquals([$this->options['id_field'] => 'foo'], $criteria); if (phpversion('mongodb')) { - $this->assertEquals(array('upsert' => true), $options); + $this->assertEquals(['upsert' => true], $options); } else { - $this->assertEquals(array('upsert' => true, 'multiple' => false), $options); + $this->assertEquals(['upsert' => true, 'multiple' => false], $options); } $data = $updateData['$set']; @@ -239,7 +239,7 @@ class MongoDbSessionHandlerTest extends TestCase ->with($this->options['database'], $this->options['collection']) ->will($this->returnValue($collection)); - $data = array(); + $data = []; $methodName = phpversion('mongodb') ? 'updateOne' : 'update'; @@ -272,7 +272,7 @@ class MongoDbSessionHandlerTest extends TestCase $collection->expects($this->once()) ->method($methodName) - ->with(array($this->options['id_field'] => 'foo')); + ->with([$this->options['id_field'] => 'foo']); $this->assertTrue($this->storage->destroy('foo')); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php index a6264e51..dc827d8a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php @@ -27,7 +27,7 @@ class NativeFileSessionHandlerTest extends TestCase { public function testConstruct() { - $storage = new NativeSessionStorage(array('name' => 'TESTING'), new NativeFileSessionHandler(sys_get_temp_dir())); + $storage = new NativeSessionStorage(['name' => 'TESTING'], new NativeFileSessionHandler(sys_get_temp_dir())); $this->assertEquals('files', $storage->getSaveHandler()->getSaveHandlerName()); $this->assertEquals('user', ini_get('session.save_handler')); @@ -52,11 +52,11 @@ class NativeFileSessionHandlerTest extends TestCase { $base = sys_get_temp_dir(); - return array( - array("$base/foo", "$base/foo", "$base/foo"), - array("5;$base/foo", "5;$base/foo", "$base/foo"), - array("5;0600;$base/foo", "5;0600;$base/foo", "$base/foo"), - ); + return [ + ["$base/foo", "$base/foo", "$base/foo"], + ["5;$base/foo", "5;$base/foo", "$base/foo"], + ["5;0600;$base/foo", "5;0600;$base/foo", "$base/foo"], + ]; } /** @@ -70,7 +70,7 @@ class NativeFileSessionHandlerTest extends TestCase public function testConstructDefault() { $path = ini_get('session.save_path'); - $storage = new NativeSessionStorage(array('name' => 'TESTING'), new NativeFileSessionHandler()); + $storage = new NativeSessionStorage(['name' => 'TESTING'], new NativeFileSessionHandler()); $this->assertEquals($path, ini_get('session.save_path')); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php index 9a2212b8..0d246e1a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php @@ -54,6 +54,6 @@ class NullSessionHandlerTest extends TestCase public function getStorage() { - return new NativeSessionStorage(array(), new NullSessionHandler()); + return new NativeSessionStorage([], new NullSessionHandler()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php index 853e96d2..90107847 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php @@ -64,7 +64,7 @@ class PdoSessionHandlerTest extends TestCase */ public function testInexistentTable() { - $storage = new PdoSessionHandler($this->getMemorySqlitePdo(), array('db_table' => 'inexistent_table')); + $storage = new PdoSessionHandler($this->getMemorySqlitePdo(), ['db_table' => 'inexistent_table']); $storage->open('', 'sid'); $storage->read('id'); $storage->write('id', 'data'); @@ -147,7 +147,7 @@ class PdoSessionHandlerTest extends TestCase $stream = $this->createStream($content); $pdo->prepareResult->expects($this->once())->method('fetchAll') - ->will($this->returnValue(array(array($stream, 42, time())))); + ->will($this->returnValue([[$stream, 42, time()]])); $storage = new PdoSessionHandler($pdo); $result = $storage->read('foo'); @@ -178,7 +178,7 @@ class PdoSessionHandlerTest extends TestCase $selectStmt->expects($this->atLeast(2))->method('fetchAll') ->will($this->returnCallback(function () use (&$exception, $stream) { - return $exception ? array(array($stream, 42, time())) : array(); + return $exception ? [[$stream, 42, time()]] : []; })); $insertStmt->expects($this->once())->method('execute') @@ -344,19 +344,19 @@ class PdoSessionHandlerTest extends TestCase public function provideUrlDsnPairs() { - yield array('mysql://localhost/test', 'mysql:host=localhost;dbname=test;'); - yield array('mysql://localhost:56/test', 'mysql:host=localhost;port=56;dbname=test;'); - yield array('mysql2://root:pwd@localhost/test', 'mysql:host=localhost;dbname=test;', 'root', 'pwd'); - yield array('postgres://localhost/test', 'pgsql:host=localhost;dbname=test;'); - yield array('postgresql://localhost:5634/test', 'pgsql:host=localhost;port=5634;dbname=test;'); - yield array('postgres://root:pwd@localhost/test', 'pgsql:host=localhost;dbname=test;', 'root', 'pwd'); - yield 'sqlite relative path' => array('sqlite://localhost/tmp/test', 'sqlite:tmp/test'); - yield 'sqlite absolute path' => array('sqlite://localhost//tmp/test', 'sqlite:/tmp/test'); - yield 'sqlite relative path without host' => array('sqlite:///tmp/test', 'sqlite:tmp/test'); - yield 'sqlite absolute path without host' => array('sqlite3:////tmp/test', 'sqlite:/tmp/test'); - yield array('sqlite://localhost/:memory:', 'sqlite::memory:'); - yield array('mssql://localhost/test', 'sqlsrv:server=localhost;Database=test'); - yield array('mssql://localhost:56/test', 'sqlsrv:server=localhost,56;Database=test'); + yield ['mysql://localhost/test', 'mysql:host=localhost;dbname=test;']; + yield ['mysql://localhost:56/test', 'mysql:host=localhost;port=56;dbname=test;']; + yield ['mysql2://root:pwd@localhost/test', 'mysql:host=localhost;dbname=test;', 'root', 'pwd']; + yield ['postgres://localhost/test', 'pgsql:host=localhost;dbname=test;']; + yield ['postgresql://localhost:5634/test', 'pgsql:host=localhost;port=5634;dbname=test;']; + yield ['postgres://root:pwd@localhost/test', 'pgsql:host=localhost;dbname=test;', 'root', 'pwd']; + yield 'sqlite relative path' => ['sqlite://localhost/tmp/test', 'sqlite:tmp/test']; + yield 'sqlite absolute path' => ['sqlite://localhost//tmp/test', 'sqlite:/tmp/test']; + yield 'sqlite relative path without host' => ['sqlite:///tmp/test', 'sqlite:tmp/test']; + yield 'sqlite absolute path without host' => ['sqlite3:////tmp/test', 'sqlite:/tmp/test']; + yield ['sqlite://localhost/:memory:', 'sqlite::memory:']; + yield ['mssql://localhost/test', 'sqlsrv:server=localhost;Database=test']; + yield ['mssql://localhost:56/test', 'sqlsrv:server=localhost,56;Database=test']; } private function createStream($content) @@ -394,7 +394,7 @@ class MockPdo extends \PDO return parent::getAttribute($attribute); } - public function prepare($statement, $driverOptions = array()) + public function prepare($statement, $driverOptions = []) { return \is_callable($this->prepareResult) ? \call_user_func($this->prepareResult, $statement, $driverOptions) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/StrictSessionHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/StrictSessionHandlerTest.php index b02c41ae..6a0d1687 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/StrictSessionHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/StrictSessionHandlerTest.php @@ -84,7 +84,7 @@ class StrictSessionHandlerTest extends TestCase { $handler = $this->getMockBuilder('SessionHandlerInterface')->getMock(); $handler->expects($this->exactly(2))->method('read') - ->withConsecutive(array('id1'), array('id2')) + ->withConsecutive(['id1'], ['id2']) ->will($this->onConsecutiveCalls('data1', 'data2')); $proxy = new StrictSessionHandler($handler); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php index 69cf6163..2c4758b9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php @@ -26,26 +26,26 @@ class MetadataBagTest extends TestCase */ protected $bag; - protected $array = array(); + protected $array = []; protected function setUp() { parent::setUp(); $this->bag = new MetadataBag(); - $this->array = array(MetadataBag::CREATED => 1234567, MetadataBag::UPDATED => 12345678, MetadataBag::LIFETIME => 0); + $this->array = [MetadataBag::CREATED => 1234567, MetadataBag::UPDATED => 12345678, MetadataBag::LIFETIME => 0]; $this->bag->initialize($this->array); } protected function tearDown() { - $this->array = array(); + $this->array = []; $this->bag = null; parent::tearDown(); } public function testInitialize() { - $sessionMetadata = array(); + $sessionMetadata = []; $bag1 = new MetadataBag(); $bag1->initialize($sessionMetadata); @@ -82,7 +82,7 @@ class MetadataBagTest extends TestCase public function testGetLifetime() { $bag = new MetadataBag(); - $array = array(MetadataBag::CREATED => 1234567, MetadataBag::UPDATED => 12345678, MetadataBag::LIFETIME => 1000); + $array = [MetadataBag::CREATED => 1234567, MetadataBag::UPDATED => 12345678, MetadataBag::LIFETIME => 1000]; $bag->initialize($array); $this->assertEquals(1000, $bag->getLifetime()); } @@ -111,11 +111,11 @@ class MetadataBagTest extends TestCase $timeStamp = time(); $created = $timeStamp - 15; - $sessionMetadata = array( + $sessionMetadata = [ MetadataBag::CREATED => $created, MetadataBag::UPDATED => $created, MetadataBag::LIFETIME => 1000, - ); + ]; $bag->initialize($sessionMetadata); $this->assertEquals($created, $sessionMetadata[MetadataBag::UPDATED]); @@ -127,11 +127,11 @@ class MetadataBagTest extends TestCase $timeStamp = time(); $created = $timeStamp - 45; - $sessionMetadata = array( + $sessionMetadata = [ MetadataBag::CREATED => $created, MetadataBag::UPDATED => $created, MetadataBag::LIFETIME => 1000, - ); + ]; $bag->initialize($sessionMetadata); $this->assertEquals($timeStamp, $sessionMetadata[MetadataBag::UPDATED]); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php index 893e120c..2e3024ef 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php @@ -45,10 +45,10 @@ class MockArraySessionStorageTest extends TestCase $this->attributes = new AttributeBag(); $this->flashes = new FlashBag(); - $this->data = array( - $this->attributes->getStorageKey() => array('foo' => 'bar'), - $this->flashes->getStorageKey() => array('notice' => 'hello'), - ); + $this->data = [ + $this->attributes->getStorageKey() => ['foo' => 'bar'], + $this->flashes->getStorageKey() => ['notice' => 'hello'], + ]; $this->storage = new MockArraySessionStorage(); $this->storage->registerBag($this->flashes); @@ -80,14 +80,14 @@ class MockArraySessionStorageTest extends TestCase $id = $this->storage->getId(); $this->storage->regenerate(); $this->assertNotEquals($id, $this->storage->getId()); - $this->assertEquals(array('foo' => 'bar'), $this->storage->getBag('attributes')->all()); - $this->assertEquals(array('notice' => 'hello'), $this->storage->getBag('flashes')->peekAll()); + $this->assertEquals(['foo' => 'bar'], $this->storage->getBag('attributes')->all()); + $this->assertEquals(['notice' => 'hello'], $this->storage->getBag('flashes')->peekAll()); $id = $this->storage->getId(); $this->storage->regenerate(true); $this->assertNotEquals($id, $this->storage->getId()); - $this->assertEquals(array('foo' => 'bar'), $this->storage->getBag('attributes')->all()); - $this->assertEquals(array('notice' => 'hello'), $this->storage->getBag('flashes')->peekAll()); + $this->assertEquals(['foo' => 'bar'], $this->storage->getBag('attributes')->all()); + $this->assertEquals(['notice' => 'hello'], $this->storage->getBag('flashes')->peekAll()); } public function testGetId() @@ -101,8 +101,8 @@ class MockArraySessionStorageTest extends TestCase { $this->storage->clear(); - $this->assertSame(array(), $this->storage->getBag('attributes')->all()); - $this->assertSame(array(), $this->storage->getBag('flashes')->peekAll()); + $this->assertSame([], $this->storage->getBag('attributes')->all()); + $this->assertSame([], $this->storage->getBag('flashes')->peekAll()); } public function testClearStartsSession() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php index 16957981..9e2692dc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php @@ -91,7 +91,7 @@ class MockFileSessionStorageTest extends TestCase $storage->start(); $this->assertEquals('108', $storage->getBag('attributes')->get('new')); $this->assertTrue($storage->getBag('flashes')->has('newkey')); - $this->assertEquals(array('test'), $storage->getBag('flashes')->peek('newkey')); + $this->assertEquals(['test'], $storage->getBag('flashes')->peek('newkey')); } public function testMultipleInstances() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php index 52da2947..7cc2eb79 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php @@ -56,7 +56,7 @@ class NativeSessionStorageTest extends TestCase /** * @return NativeSessionStorage */ - protected function getStorage(array $options = array()) + protected function getStorage(array $options = []) { $storage = new NativeSessionStorage($options); $storage->registerBag(new AttributeBag()); @@ -157,28 +157,30 @@ class NativeSessionStorageTest extends TestCase { $this->iniSet('session.cache_limiter', 'nocache'); - $storage = new NativeSessionStorage(array('cache_limiter' => 'public')); + $storage = new NativeSessionStorage(['cache_limiter' => 'public']); $this->assertEquals('public', ini_get('session.cache_limiter')); } public function testCookieOptions() { - $options = array( + $options = [ 'cookie_lifetime' => 123456, 'cookie_path' => '/my/cookie/path', 'cookie_domain' => 'symfony.example.com', 'cookie_secure' => true, 'cookie_httponly' => false, - ); + ]; $this->getStorage($options); $temp = session_get_cookie_params(); - $gco = array(); + $gco = []; foreach ($temp as $key => $value) { $gco['cookie_'.$key] = $value; } + unset($gco['cookie_samesite']); + $this->assertEquals($options, $gco); } @@ -188,10 +190,10 @@ class NativeSessionStorageTest extends TestCase $this->markTestSkipped('HHVM is not handled in this test case.'); } - $options = array( + $options = [ 'url_rewriter.tags' => 'a=href', 'cache_expire' => '200', - ); + ]; $this->getStorage($options); @@ -272,9 +274,9 @@ class NativeSessionStorageTest extends TestCase public function testSetSessionOptionsOnceSessionStartedIsIgnored() { session_start(); - $this->getStorage(array( + $this->getStorage([ 'name' => 'something-else', - )); + ]); // Assert no exception has been thrown by `getStorage()` $this->addToAssertionCount(1); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php index 7cb63c5a..752be618 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php @@ -87,10 +87,10 @@ class PhpBridgeSessionStorageTest extends TestCase $_SESSION['drak'] = 'loves symfony'; $storage->getBag('attributes')->set('symfony', 'greatness'); $key = $storage->getBag('attributes')->getStorageKey(); - $this->assertEquals($_SESSION[$key], array('symfony' => 'greatness')); + $this->assertEquals($_SESSION[$key], ['symfony' => 'greatness']); $this->assertEquals($_SESSION['drak'], 'loves symfony'); $storage->clear(); - $this->assertEquals($_SESSION[$key], array()); + $this->assertEquals($_SESSION[$key], []); $this->assertEquals($_SESSION['drak'], 'loves symfony'); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php index 0b48250e..0459a8ce 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php @@ -127,7 +127,7 @@ class SessionHandlerProxyTest extends TestCase */ public function testValidateId() { - $mock = $this->getMockBuilder(array('SessionHandlerInterface', 'SessionUpdateTimestampHandlerInterface'))->getMock(); + $mock = $this->getMockBuilder(['SessionHandlerInterface', 'SessionUpdateTimestampHandlerInterface'])->getMock(); $mock->expects($this->once()) ->method('validateId'); @@ -142,7 +142,7 @@ class SessionHandlerProxyTest extends TestCase */ public function testUpdateTimestamp() { - $mock = $this->getMockBuilder(array('SessionHandlerInterface', 'SessionUpdateTimestampHandlerInterface'))->getMock(); + $mock = $this->getMockBuilder(['SessionHandlerInterface', 'SessionUpdateTimestampHandlerInterface'])->getMock(); $mock->expects($this->once()) ->method('updateTimestamp'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php index 699222e3..62dfc9bc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php @@ -19,7 +19,7 @@ class StreamedResponseTest extends TestCase { public function testConstructor() { - $response = new StreamedResponse(function () { echo 'foo'; }, 404, array('Content-Type' => 'text/plain')); + $response = new StreamedResponse(function () { echo 'foo'; }, 404, ['Content-Type' => 'text/plain']); $this->assertEquals(404, $response->getStatusCode()); $this->assertEquals('text/plain', $response->headers->get('Content-Type')); @@ -51,7 +51,7 @@ class StreamedResponseTest extends TestCase public function testPrepareWithHeadRequest() { - $response = new StreamedResponse(function () { echo 'foo'; }, 200, array('Content-Length' => '123')); + $response = new StreamedResponse(function () { echo 'foo'; }, 200, ['Content-Length' => '123']); $request = Request::create('/', 'HEAD'); $response->prepare($request); @@ -61,7 +61,7 @@ class StreamedResponseTest extends TestCase public function testPrepareWithCacheHeaders() { - $response = new StreamedResponse(function () { echo 'foo'; }, 200, array('Cache-Control' => 'max-age=600, public')); + $response = new StreamedResponse(function () { echo 'foo'; }, 200, ['Cache-Control' => 'max-age=600, public']); $request = Request::create('/', 'GET'); $response->prepare($request); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Bundle/Bundle.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Bundle/Bundle.php index f42895a7..62b86ca7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Bundle/Bundle.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Bundle/Bundle.php @@ -166,7 +166,7 @@ abstract class Bundle implements BundleInterface } $class = $ns.'\\'.$file->getBasename('.php'); if ($this->container) { - $commandIds = $this->container->hasParameter('console.command.ids') ? $this->container->getParameter('console.command.ids') : array(); + $commandIds = $this->container->hasParameter('console.command.ids') ? $this->container->getParameter('console.command.ids') : []; $alias = 'console.command.'.strtolower(str_replace('\\', '_', $class)); if (isset($commandIds[$alias]) || $this->container->has($alias)) { continue; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php index 8ee4275b..f82ada5c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php @@ -27,7 +27,7 @@ class ChainCacheClearer implements CacheClearerInterface * * @param array $clearers The initial clearers */ - public function __construct($clearers = array()) + public function __construct($clearers = []) { $this->clearers = $clearers; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheClearer/Psr6CacheClearer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheClearer/Psr6CacheClearer.php index d413d2c9..42add5a6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheClearer/Psr6CacheClearer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheClearer/Psr6CacheClearer.php @@ -18,9 +18,9 @@ use Psr\Cache\CacheItemPoolInterface; */ class Psr6CacheClearer implements CacheClearerInterface { - private $pools = array(); + private $pools = []; - public function __construct(array $pools = array()) + public function __construct(array $pools = []) { $this->pools = $pools; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php index ca3911ed..eca4e6ae 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php @@ -20,11 +20,11 @@ namespace Symfony\Component\HttpKernel\CacheWarmer; */ class CacheWarmerAggregate implements CacheWarmerInterface { - protected $warmers = array(); + protected $warmers = []; protected $optionalsEnabled = false; private $triggerDeprecation = false; - public function __construct($warmers = array()) + public function __construct($warmers = []) { foreach ($warmers as $warmer) { $this->add($warmer); @@ -70,7 +70,7 @@ class CacheWarmerAggregate implements CacheWarmerInterface { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0, inject the list of clearers as a constructor argument instead.', __METHOD__), E_USER_DEPRECATED); - $this->warmers = array(); + $this->warmers = []; foreach ($warmers as $warmer) { $this->add($warmer); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Client.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Client.php index 324710bb..958c4c81 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Client.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Client.php @@ -39,7 +39,7 @@ class Client extends BaseClient * @param History $history A History instance to store the browser history * @param CookieJar $cookieJar A CookieJar instance to store the cookies */ - public function __construct(HttpKernelInterface $kernel, array $server = array(), History $history = null, CookieJar $cookieJar = null) + public function __construct(HttpKernelInterface $kernel, array $server = [], History $history = null, CookieJar $cookieJar = null) { // These class properties must be set before calling the parent constructor, as it may depend on it. $this->kernel = $kernel; @@ -159,7 +159,7 @@ EOF; */ protected function filterFiles(array $files) { - $filtered = array(); + $filtered = []; foreach ($files as $key => $value) { if (\is_array($value)) { $filtered[$key] = $this->filterFiles($value); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Config/EnvParametersResource.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Config/EnvParametersResource.php index f8d2a72b..26869ced 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Config/EnvParametersResource.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Config/EnvParametersResource.php @@ -54,7 +54,7 @@ class EnvParametersResource implements SelfCheckingResourceInterface, \Serializa */ public function getResource() { - return array('prefix' => $this->prefix, 'variables' => $this->variables); + return ['prefix' => $this->prefix, 'variables' => $this->variables]; } /** @@ -65,15 +65,21 @@ class EnvParametersResource implements SelfCheckingResourceInterface, \Serializa return $this->findVariables() === $this->variables; } + /** + * @internal + */ public function serialize() { - return serialize(array('prefix' => $this->prefix, 'variables' => $this->variables)); + return serialize(['prefix' => $this->prefix, 'variables' => $this->variables]); } + /** + * @internal + */ public function unserialize($serialized) { if (\PHP_VERSION_ID >= 70000) { - $unserialized = unserialize($serialized, array('allowed_classes' => false)); + $unserialized = unserialize($serialized, ['allowed_classes' => false]); } else { $unserialized = unserialize($serialized); } @@ -84,7 +90,7 @@ class EnvParametersResource implements SelfCheckingResourceInterface, \Serializa private function findVariables() { - $variables = array(); + $variables = []; foreach ($_SERVER as $key => $value) { if (0 === strpos($key, $this->prefix)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Config/FileLocator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Config/FileLocator.php index c047ba3d..fd5c8a32 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Config/FileLocator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Config/FileLocator.php @@ -29,7 +29,7 @@ class FileLocator extends BaseFileLocator * @param string|null $path The path the global resource directory * @param array $paths An array of paths where to look for resources */ - public function __construct(KernelInterface $kernel, $path = null, array $paths = array()) + public function __construct(KernelInterface $kernel, $path = null, array $paths = []) { $this->kernel = $kernel; if (null !== $path) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php index fc316920..fc6f969a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php @@ -34,7 +34,7 @@ final class ArgumentResolver implements ArgumentResolverInterface */ private $argumentValueResolvers; - public function __construct(ArgumentMetadataFactoryInterface $argumentMetadataFactory = null, $argumentValueResolvers = array()) + public function __construct(ArgumentMetadataFactoryInterface $argumentMetadataFactory = null, $argumentValueResolvers = []) { $this->argumentMetadataFactory = $argumentMetadataFactory ?: new ArgumentMetadataFactory(); $this->argumentValueResolvers = $argumentValueResolvers ?: self::getDefaultArgumentValueResolvers(); @@ -45,7 +45,7 @@ final class ArgumentResolver implements ArgumentResolverInterface */ public function getArguments(Request $request, $controller) { - $arguments = array(); + $arguments = []; foreach ($this->argumentMetadataFactory->createArgumentMetadata($controller) as $metadata) { foreach ($this->argumentValueResolvers as $resolver) { @@ -83,12 +83,12 @@ final class ArgumentResolver implements ArgumentResolverInterface public static function getDefaultArgumentValueResolvers() { - return array( + return [ new RequestAttributeValueResolver(), new RequestValueResolver(), new SessionValueResolver(), new DefaultValueResolver(), new VariadicValueResolver(), - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ContainerControllerResolver.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ContainerControllerResolver.php index bc53e94b..b08877da 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ContainerControllerResolver.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ContainerControllerResolver.php @@ -77,7 +77,7 @@ class ContainerControllerResolver extends ControllerResolver $service = $this->container->get($controller); if (null !== $method) { - return array($service, $method); + return [$service, $method]; } if (!method_exists($service, '__invoke')) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerReference.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerReference.php index fae4e7fa..e1e9c813 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerReference.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerReference.php @@ -27,15 +27,15 @@ use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface; class ControllerReference { public $controller; - public $attributes = array(); - public $query = array(); + public $attributes = []; + public $query = []; /** * @param string $controller The controller name * @param array $attributes An array of parameters to add to the Request attributes * @param array $query An array of parameters to add to the Request query string */ - public function __construct($controller, array $attributes = array(), array $query = array()) + public function __construct($controller, array $attributes = [], array $query = []) { $this->controller = $controller; $this->attributes = $attributes; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php index 6d898e78..e657f614 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php @@ -129,9 +129,9 @@ class ControllerResolver implements ArgumentResolverInterface, ControllerResolve @trigger_error(sprintf('The "%s()" method is deprecated as of 3.1 and will be removed in 4.0. Implement the %s and inject it in the HttpKernel instead.', __METHOD__, ArgumentResolverInterface::class), E_USER_DEPRECATED); $attributes = $request->attributes->all(); - $arguments = array(); + $arguments = []; foreach ($parameters as $param) { - if (array_key_exists($param->name, $attributes)) { + if (\array_key_exists($param->name, $attributes)) { if ($this->supportsVariadic && $param->isVariadic() && \is_array($attributes[$param->name])) { $arguments = array_merge($arguments, array_values($attributes[$param->name])); } else { @@ -180,7 +180,7 @@ class ControllerResolver implements ArgumentResolverInterface, ControllerResolve throw new \InvalidArgumentException(sprintf('Class "%s" does not exist.', $class)); } - return array($this->instantiateController($class), $method); + return [$this->instantiateController($class), $method]; } /** @@ -216,7 +216,7 @@ class ControllerResolver implements ArgumentResolverInterface, ControllerResolve } if (2 !== \count($callable)) { - return 'Invalid format for controller, expected array(controller, method) or controller::method.'; + return 'Invalid format for controller, expected [controller, method] or controller::method.'; } list($controller, $method) = $callable; @@ -233,7 +233,7 @@ class ControllerResolver implements ArgumentResolverInterface, ControllerResolve $collection = get_class_methods($controller); - $alternatives = array(); + $alternatives = []; foreach ($collection as $item) { $lev = levenshtein($method, $item); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php index b46be7e8..fa48d0cc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php @@ -47,7 +47,7 @@ final class ArgumentMetadataFactory implements ArgumentMetadataFactoryInterface */ public function createArgumentMetadata($controller) { - $arguments = array(); + $arguments = []; if (\is_array($controller)) { $reflection = new \ReflectionMethod($controller[0], $controller[1]); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php index abfd939f..626c1cc6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php @@ -54,7 +54,7 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte */ public function collect(Request $request, Response $response, \Exception $exception = null) { - $this->data = array( + $this->data = [ 'app_name' => $this->name, 'app_version' => $this->version, 'token' => $response->headers->get('X-Debug-Token'), @@ -70,9 +70,9 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte 'xdebug_enabled' => \extension_loaded('xdebug'), 'apcu_enabled' => \extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN), 'zend_opcache_enabled' => \extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN), - 'bundles' => array(), + 'bundles' => [], 'sapi_name' => \PHP_SAPI, - ); + ]; if (isset($this->kernel)) { foreach ($this->kernel->getBundles() as $name => $bundle) { @@ -98,7 +98,7 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte */ public function reset() { - $this->data = array(); + $this->data = []; } public function lateCollect() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php index 6d1a822e..4346e0ec 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php @@ -28,7 +28,7 @@ use Symfony\Component\VarDumper\Cloner\VarCloner; */ abstract class DataCollector implements DataCollectorInterface, \Serializable { - protected $data = array(); + protected $data = []; /** * @var ValueExporter @@ -42,12 +42,15 @@ abstract class DataCollector implements DataCollectorInterface, \Serializable public function serialize() { - return serialize($this->data); + $trace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 2); + $isCalledFromOverridingMethod = isset($trace[1]['function'], $trace[1]['object']) && 'serialize' === $trace[1]['function'] && $this === $trace[1]['object']; + + return $isCalledFromOverridingMethod ? $this->data : serialize($this->data); } public function unserialize($data) { - $this->data = unserialize($data); + $this->data = \is_array($data) ? $data : unserialize($data); } /** @@ -111,7 +114,7 @@ abstract class DataCollector implements DataCollectorInterface, \Serializable */ protected function getCasters() { - return array( + return [ '*' => function ($v, array $a, Stub $s, $isNested) { if (!$v instanceof Stub) { foreach ($a as $k => $v) { @@ -123,6 +126,6 @@ abstract class DataCollector implements DataCollectorInterface, \Serializable return $a; }, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php index 7e2430c4..4266b22f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php @@ -49,12 +49,12 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface $this->dumperIsInjected = null !== $dumper; // All clones share these properties by reference: - $this->rootRefs = array( + $this->rootRefs = [ &$this->data, &$this->dataCount, &$this->isCollected, &$this->clonesCount, - ); + ]; } public function __clone() @@ -103,7 +103,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface if ($src) { $src = explode("\n", $src); - $fileExcerpt = array(); + $fileExcerpt = []; for ($i = max($line - 3, 1), $max = min($line + 3, \count($src)); $i <= $max; ++$i) { $fileExcerpt[] = ''.$this->htmlEncode($src[$i - 1]).''; @@ -153,7 +153,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface ) { if ($response->headers->has('Content-Type') && false !== strpos($response->headers->get('Content-Type'), 'html')) { $this->dumper = new HtmlDumper('php://output', $this->charset); - $this->dumper->setDisplayOptions(array('fileLinkFormat' => $this->fileLinkFormat)); + $this->dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); } else { $this->dumper = new CliDumper('php://output', $this->charset); } @@ -169,7 +169,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface if ($this->stopwatch) { $this->stopwatch->reset(); } - $this->data = array(); + $this->data = []; $this->dataCount = 0; $this->isCollected = true; $this->clonesCount = 0; @@ -185,7 +185,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface $this->data[] = $this->fileLinkFormat; $this->data[] = $this->charset; $ser = serialize($this->data); - $this->data = array(); + $this->data = []; $this->dataCount = 0; $this->isCollected = true; if (!$this->dumperIsInjected) { @@ -197,7 +197,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface public function unserialize($data) { - parent::unserialize($data); + $this->data = unserialize($data); $charset = array_pop($this->data); $fileLinkFormat = array_pop($this->data); $this->dataCount = \count($this->data); @@ -215,11 +215,11 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface if ('html' === $format) { $dumper = new HtmlDumper($data, $this->charset); - $dumper->setDisplayOptions(array('fileLinkFormat' => $this->fileLinkFormat)); + $dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); } else { throw new \InvalidArgumentException(sprintf('Invalid dump format: %s', $format)); } - $dumps = array(); + $dumps = []; foreach ($this->data as $dump) { $dumper->dump($dump['data']->withMaxDepth($maxDepthLimit)->withMaxItemsPerDepth($maxItemsPerDepth)); @@ -250,9 +250,9 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface --$i; } - if (!\in_array(\PHP_SAPI, array('cli', 'phpdbg'), true) && stripos($h[$i], 'html')) { + if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && stripos($h[$i], 'html')) { $this->dumper = new HtmlDumper('php://output', $this->charset); - $this->dumper->setDisplayOptions(array('fileLinkFormat' => $this->fileLinkFormat)); + $this->dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); } else { $this->dumper = new CliDumper('php://output', $this->charset); } @@ -262,7 +262,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface $this->doDump($dump['data'], $dump['name'], $dump['file'], $dump['line']); } - $this->data = array(); + $this->data = []; $this->dataCount = 0; } } @@ -276,7 +276,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface $s = $this->style('meta', '%s'); $f = strip_tags($this->style('', $file)); $name = strip_tags($this->style('', $name)); - if ($fmt && $link = \is_string($fmt) ? strtr($fmt, array('%f' => $file, '%l' => $line)) : $fmt->format($file, $line)) { + if ($fmt && $link = \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : $fmt->format($file, $line)) { $name = sprintf(''.$s.'', strip_tags($this->style('', $link)), $f, $name); } else { $name = sprintf(''.$s.'', $f, $name); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php index 81076fd7..78e9e291 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php @@ -38,15 +38,15 @@ class EventDataCollector extends DataCollector implements LateDataCollectorInter */ public function collect(Request $request, Response $response, \Exception $exception = null) { - $this->data = array( - 'called_listeners' => array(), - 'not_called_listeners' => array(), - ); + $this->data = [ + 'called_listeners' => [], + 'not_called_listeners' => [], + ]; } public function reset() { - $this->data = array(); + $this->data = []; if ($this->dispatcher instanceof TraceableEventDispatcherInterface) { if (!method_exists($this->dispatcher, 'reset')) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php index 7a25f149..c76e7f45 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php @@ -28,9 +28,9 @@ class ExceptionDataCollector extends DataCollector public function collect(Request $request, Response $response, \Exception $exception = null) { if (null !== $exception) { - $this->data = array( + $this->data = [ 'exception' => FlattenException::create($exception), - ); + ]; } } @@ -39,7 +39,7 @@ class ExceptionDataCollector extends DataCollector */ public function reset() { - $this->data = array(); + $this->data = []; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php index 97b8a862..1d95b8b5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php @@ -55,7 +55,7 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte if ($this->logger && method_exists($this->logger, 'clear')) { $this->logger->clear(); } - $this->data = array(); + $this->data = []; } /** @@ -79,12 +79,12 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte */ public function getLogs() { - return isset($this->data['logs']) ? $this->data['logs'] : array(); + return isset($this->data['logs']) ? $this->data['logs'] : []; } public function getPriorities() { - return isset($this->data['priorities']) ? $this->data['priorities'] : array(); + return isset($this->data['priorities']) ? $this->data['priorities'] : []; } public function countErrors() @@ -109,7 +109,7 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte public function getCompilerLogs() { - return isset($this->data['compiler_logs']) ? $this->data['compiler_logs'] : array(); + return isset($this->data['compiler_logs']) ? $this->data['compiler_logs'] : []; } /** @@ -123,13 +123,13 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte private function getContainerDeprecationLogs() { if (null === $this->containerPathPrefix || !file_exists($file = $this->containerPathPrefix.'Deprecations.log')) { - return array(); + return []; } $bootTime = filemtime($file); - $logs = array(); + $logs = []; foreach (unserialize(file_get_contents($file)) as $log) { - $log['context'] = array('exception' => new SilencedErrorContext($log['type'], $log['file'], $log['line'], $log['trace'], $log['count'])); + $log['context'] = ['exception' => new SilencedErrorContext($log['type'], $log['file'], $log['line'], $log['trace'], $log['count'])]; $log['timestamp'] = $bootTime; $log['priority'] = 100; $log['priorityName'] = 'DEBUG'; @@ -145,17 +145,17 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte private function getContainerCompilerLogs() { if (null === $this->containerPathPrefix || !file_exists($file = $this->containerPathPrefix.'Compiler.log')) { - return array(); + return []; } - $logs = array(); + $logs = []; foreach (file($file, FILE_IGNORE_NEW_LINES) as $log) { $log = explode(': ', $log, 2); if (!isset($log[1]) || !preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)++$/', $log[0])) { - $log = array('Unknown Compiler Pass', implode(': ', $log)); + $log = ['Unknown Compiler Pass', implode(': ', $log)]; } - $logs[$log[0]][] = array('message' => $log[1]); + $logs[$log[0]][] = ['message' => $log[1]]; } return $logs; @@ -163,8 +163,8 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte private function sanitizeLogs($logs) { - $sanitizedLogs = array(); - $silencedLogs = array(); + $sanitizedLogs = []; + $silencedLogs = []; foreach ($logs as $log) { if (!$this->isSilencedOrDeprecationErrorLog($log)) { @@ -183,10 +183,10 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte $silencedLogs[$h] = true; if (!isset($sanitizedLogs[$message])) { - $sanitizedLogs[$message] = $log + array( + $sanitizedLogs[$message] = $log + [ 'errorCount' => 0, 'scream' => true, - ); + ]; } $sanitizedLogs[$message]['errorCount'] += $exception->count; @@ -198,10 +198,10 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte if (isset($sanitizedLogs[$errorId])) { ++$sanitizedLogs[$errorId]['errorCount']; } else { - $log += array( + $log += [ 'errorCount' => 1, 'scream' => false, - ); + ]; $sanitizedLogs[$errorId] = $log; } @@ -222,7 +222,7 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte return true; } - if ($exception instanceof \ErrorException && \in_array($exception->getSeverity(), array(E_DEPRECATED, E_USER_DEPRECATED), true)) { + if ($exception instanceof \ErrorException && \in_array($exception->getSeverity(), [E_DEPRECATED, E_USER_DEPRECATED], true)) { return true; } @@ -231,23 +231,23 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte private function computeErrorsCount(array $containerDeprecationLogs) { - $silencedLogs = array(); - $count = array( + $silencedLogs = []; + $count = [ 'error_count' => $this->logger->countErrors(), 'deprecation_count' => 0, 'warning_count' => 0, 'scream_count' => 0, - 'priorities' => array(), - ); + 'priorities' => [], + ]; foreach ($this->logger->getLogs() as $log) { if (isset($count['priorities'][$log['priority']])) { ++$count['priorities'][$log['priority']]['count']; } else { - $count['priorities'][$log['priority']] = array( + $count['priorities'][$log['priority']] = [ 'count' => 1, 'name' => $log['priorityName'], - ); + ]; } if ('WARNING' === $log['priorityName']) { ++$count['warning_count']; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php index 310b2f91..7a6e1c06 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php @@ -39,10 +39,10 @@ class MemoryDataCollector extends DataCollector implements LateDataCollectorInte */ public function reset() { - $this->data = array( + $this->data = [ 'memory' => 0, 'memory_limit' => $this->convertToBytes(ini_get('memory_limit')), - ); + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php index 10492e44..671865aa 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php @@ -38,7 +38,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter public function collect(Request $request, Response $response, \Exception $exception = null) { // attributes are serialized and as they can be anything, they need to be converted to strings. - $attributes = array(); + $attributes = []; $route = ''; foreach ($request->attributes->all() as $key => $value) { if ('_route' === $key) { @@ -57,10 +57,10 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter $content = false; } - $sessionMetadata = array(); - $sessionAttributes = array(); + $sessionMetadata = []; + $sessionAttributes = []; $session = null; - $flashes = array(); + $flashes = []; if ($request->hasSession()) { $session = $request->getSession(); if ($session->isStarted()) { @@ -74,12 +74,12 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter $statusCode = $response->getStatusCode(); - $responseCookies = array(); + $responseCookies = []; foreach ($response->headers->getCookies() as $cookie) { $responseCookies[$cookie->getName()] = $cookie; } - $this->data = array( + $this->data = [ 'method' => $request->getMethod(), 'format' => $request->getRequestFormat(), 'content' => $content, @@ -101,7 +101,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter 'path_info' => $request->getPathInfo(), 'controller' => 'n/a', 'locale' => $request->getLocale(), - ); + ]; if (isset($this->data['request_headers']['php-auth-pw'])) { $this->data['request_headers']['php-auth-pw'] = '******'; @@ -138,14 +138,14 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter if ($response->isRedirect()) { $response->headers->setCookie(new Cookie( 'sf_redirect', - json_encode(array( + json_encode([ 'token' => $response->headers->get('x-debug-token'), 'route' => $request->attributes->get('_route', 'n/a'), 'method' => $request->getMethod(), 'controller' => $this->parseController($request->attributes->get('_controller')), 'status_code' => $statusCode, 'status_text' => Response::$statusTexts[(int) $statusCode], - )) + ]) )); } @@ -159,7 +159,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter public function reset() { - $this->data = array(); + $this->data = []; $this->controllers = new \SplObjectStorage(); } @@ -284,7 +284,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter */ public function getRouteParams() { - return isset($this->data['request_attributes']['_route_params']) ? $this->data['request_attributes']['_route_params']->getValue() : array(); + return isset($this->data['request_attributes']['_route_params']) ? $this->data['request_attributes']['_route_params']->getValue() : []; } /** @@ -327,10 +327,10 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter public static function getSubscribedEvents() { - return array( + return [ KernelEvents::CONTROLLER => 'onKernelController', KernelEvents::RESPONSE => 'onKernelResponse', - ); + ]; } /** @@ -358,21 +358,21 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter try { $r = new \ReflectionMethod($controller[0], $controller[1]); - return array( + return [ 'class' => \is_object($controller[0]) ? \get_class($controller[0]) : $controller[0], 'method' => $controller[1], 'file' => $r->getFileName(), 'line' => $r->getStartLine(), - ); + ]; } catch (\ReflectionException $e) { if (\is_callable($controller)) { // using __call or __callStatic - return array( + return [ 'class' => \is_object($controller[0]) ? \get_class($controller[0]) : $controller[0], 'method' => $controller[1], 'file' => 'n/a', 'line' => 'n/a', - ); + ]; } } } @@ -380,12 +380,12 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter if ($controller instanceof \Closure) { $r = new \ReflectionFunction($controller); - $controller = array( + $controller = [ 'class' => $r->getName(), 'method' => null, 'file' => $r->getFileName(), 'line' => $r->getStartLine(), - ); + ]; if (false !== strpos($r->name, '{closure}')) { return $controller; @@ -404,12 +404,12 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter if (\is_object($controller)) { $r = new \ReflectionClass($controller); - return array( + return [ 'class' => $r->getName(), 'method' => null, 'file' => $r->getFileName(), 'line' => $r->getStartLine(), - ); + ]; } return \is_string($controller) ? $controller : 'n/a'; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php index 481747b3..432dc361 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php @@ -54,11 +54,11 @@ class RouterDataCollector extends DataCollector { $this->controllers = new \SplObjectStorage(); - $this->data = array( + $this->data = [ 'redirect' => false, 'url' => null, 'route' => null, - ); + ]; } protected function guessRoute(Request $request, $controller) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php index e489d775..99149ab0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php @@ -43,11 +43,11 @@ class TimeDataCollector extends DataCollector implements LateDataCollectorInterf $startTime = $request->server->get('REQUEST_TIME_FLOAT'); } - $this->data = array( + $this->data = [ 'token' => $response->headers->get('X-Debug-Token'), 'start_time' => $startTime * 1000, - 'events' => array(), - ); + 'events' => [], + ]; } /** @@ -55,7 +55,7 @@ class TimeDataCollector extends DataCollector implements LateDataCollectorInterf */ public function reset() { - $this->data = array(); + $this->data = []; if (null !== $this->stopwatch) { $this->stopwatch->reset(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php index e30b3a50..36570b4d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php @@ -50,7 +50,7 @@ class ValueExporter $indent = str_repeat(' ', $depth); - $a = array(); + $a = []; foreach ($value as $k => $v) { if (\is_array($v)) { $deep = true; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/FileLinkFormatter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/FileLinkFormatter.php index b3c2595b..af65f7ec 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/FileLinkFormatter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/FileLinkFormatter.php @@ -36,7 +36,7 @@ class FileLinkFormatter implements \Serializable $fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); if ($fileLinkFormat && !\is_array($fileLinkFormat)) { $i = strpos($f = $fileLinkFormat, '&', max(strrpos($f, '%f'), strrpos($f, '%l'))) ?: \strlen($f); - $fileLinkFormat = array(substr($f, 0, $i)) + preg_split('/&([^>]++)>/', substr($f, $i), -1, PREG_SPLIT_DELIM_CAPTURE); + $fileLinkFormat = [substr($f, 0, $i)] + preg_split('/&([^>]++)>/', substr($f, $i), -1, PREG_SPLIT_DELIM_CAPTURE); } $this->fileLinkFormat = $fileLinkFormat; @@ -55,21 +55,27 @@ class FileLinkFormatter implements \Serializable } } - return strtr($fmt[0], array('%f' => $file, '%l' => $line)); + return strtr($fmt[0], ['%f' => $file, '%l' => $line]); } return false; } + /** + * @internal + */ public function serialize() { return serialize($this->getFileLinkFormat()); } + /** + * @internal + */ public function unserialize($serialized) { if (\PHP_VERSION_ID >= 70000) { - $this->fileLinkFormat = unserialize($serialized, array('allowed_classes' => false)); + $this->fileLinkFormat = unserialize($serialized, ['allowed_classes' => false]); } else { $this->fileLinkFormat = unserialize($serialized); } @@ -99,10 +105,10 @@ class FileLinkFormatter implements \Serializable return; } - return array( + return [ $request->getSchemeAndHttpHost().$request->getBasePath().$this->urlFormat, $this->baseDir.\DIRECTORY_SEPARATOR, '', - ); + ]; } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/AddAnnotatedClassesToCachePass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/AddAnnotatedClassesToCachePass.php index 645e8f30..8bb03bd0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/AddAnnotatedClassesToCachePass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/AddAnnotatedClassesToCachePass.php @@ -36,8 +36,8 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface */ public function process(ContainerBuilder $container) { - $classes = array(); - $annotatedClasses = array(); + $classes = []; + $annotatedClasses = []; foreach ($container->getExtensions() as $extension) { if ($extension instanceof Extension) { if (\PHP_VERSION_ID < 70000) { @@ -63,11 +63,11 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface * @param array $patterns The class patterns to expand * @param array $classes The existing classes to match against the patterns * - * @return array A list of classes derivated from the patterns + * @return array A list of classes derived from the patterns */ private function expandClasses(array $patterns, array $classes) { - $expanded = array(); + $expanded = []; // Explicit classes declared in the patterns are returned directly foreach ($patterns as $key => $pattern) { @@ -93,7 +93,7 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface private function getClassesInComposerClassMaps() { - $classes = array(); + $classes = []; foreach (spl_autoload_functions() as $function) { if (!\is_array($function)) { @@ -114,14 +114,14 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface private function patternsToRegexps($patterns) { - $regexps = array(); + $regexps = []; foreach ($patterns as $pattern) { // Escape user input $regex = preg_quote(ltrim($pattern, '\\')); // Wildcards * and ** - $regex = strtr($regex, array('\\*\\*' => '.*?', '\\*' => '[^\\\\]*?')); + $regex = strtr($regex, ['\\*\\*' => '.*?', '\\*' => '[^\\\\]*?']); // If this class does not end by a slash, anchor the end if ('\\' !== substr($regex, -1)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php index a382c15d..ec69392e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php @@ -20,8 +20,8 @@ use Symfony\Component\DependencyInjection\Extension\Extension as BaseExtension; */ abstract class Extension extends BaseExtension { - private $classes = array(); - private $annotatedClasses = array(); + private $classes = []; + private $annotatedClasses = []; /** * Gets the classes to cache. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php index 06a39c8b..a15fbaa1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php @@ -45,7 +45,7 @@ class FragmentRendererPass implements CompilerPassInterface } $definition = $container->getDefinition($this->handlerService); - $renderers = array(); + $renderers = []; foreach ($container->findTaggedServiceIds($this->rendererTag, true) as $id => $tags) { $def = $container->getDefinition($id); $class = $container->getParameterBag()->resolveValue($def->getClass()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php index 00b05959..1722ef58 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php @@ -26,8 +26,8 @@ class LazyLoadingFragmentHandler extends FragmentHandler /** * @deprecated since version 3.3, to be removed in 4.0 */ - private $rendererIds = array(); - private $initialized = array(); + private $rendererIds = []; + private $initialized = []; /** * @param ContainerInterface $container A container @@ -38,7 +38,7 @@ class LazyLoadingFragmentHandler extends FragmentHandler { $this->container = $container; - parent::__construct($requestStack, array(), $debug); + parent::__construct($requestStack, [], $debug); } /** @@ -59,7 +59,7 @@ class LazyLoadingFragmentHandler extends FragmentHandler /** * {@inheritdoc} */ - public function render($uri, $renderer = 'inline', array $options = array()) + public function render($uri, $renderer = 'inline', array $options = []) { // BC 3.x, to be removed in 4.0 if (isset($this->rendererIds[$renderer])) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php index 1dbf7f7b..83e1b758 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php @@ -32,7 +32,7 @@ class MergeExtensionConfigurationPass extends BaseMergeExtensionConfigurationPas { foreach ($this->extensions as $extension) { if (!\count($container->getExtensionConfig($extension))) { - $container->loadFromExtension($extension, array()); + $container->loadFromExtension($extension, []); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php index cb05f6fb..d021c6ee 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php @@ -47,7 +47,7 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface } $parameterBag = $container->getParameterBag(); - $controllers = array(); + $controllers = []; foreach ($container->findTaggedServiceIds($this->controllerTag, true) as $id => $tags) { $def = $container->getDefinition($id); @@ -70,14 +70,14 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface $isContainerAware = $r->implementsInterface(ContainerAwareInterface::class) || is_subclass_of($class, AbstractController::class); // get regular public methods - $methods = array(); - $arguments = array(); + $methods = []; + $arguments = []; foreach ($r->getMethods(\ReflectionMethod::IS_PUBLIC) as $r) { if ('setContainer' === $r->name && $isContainerAware) { continue; } if (!$r->isConstructor() && !$r->isDestructor() && !$r->isAbstract()) { - $methods[strtolower($r->name)] = array($r, $r->getParameters()); + $methods[strtolower($r->name)] = [$r, $r->getParameters()]; } } @@ -87,7 +87,7 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface $autowire = true; continue; } - foreach (array('action', 'argument', 'id') as $k) { + foreach (['action', 'argument', 'id'] as $k) { if (!isset($attributes[$k][0])) { throw new InvalidArgumentException(sprintf('Missing "%s" attribute on tag "%s" %s for service "%s".', $k, $this->controllerTag, json_encode($attributes, JSON_UNESCAPED_UNICODE), $id)); } @@ -117,7 +117,7 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface /** @var \ReflectionMethod $r */ // create a per-method map of argument-names to service/type-references - $args = array(); + $args = []; foreach ($parameters as $p) { /** @var \ReflectionParameter $p */ $type = $target = ProxyHelper::getTypeHint($r, $p, true); @@ -141,7 +141,7 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface continue; } - $binding->setValues(array($bindingValue, $bindingId, true)); + $binding->setValues([$bindingValue, $bindingId, true]); $args[$p->name] = $bindingValue; continue; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php index 29433a6d..28136be6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php @@ -39,7 +39,7 @@ class ResettableServicePass implements CompilerPassInterface return; } - $services = $methods = array(); + $services = $methods = []; foreach ($container->findTaggedServiceIds($this->tagName, true) as $id => $tags) { $services[$id] = new Reference($id, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php index 41187d41..aee5d6f8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php @@ -26,7 +26,7 @@ use Symfony\Component\HttpKernel\KernelEvents; */ abstract class AbstractSessionListener implements EventSubscriberInterface { - private $sessionUsageStack = array(); + private $sessionUsageStack = []; public function onKernelRequest(GetResponseEvent $event) { @@ -74,12 +74,12 @@ abstract class AbstractSessionListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( - KernelEvents::REQUEST => array('onKernelRequest', 128), + return [ + KernelEvents::REQUEST => ['onKernelRequest', 128], // low priority to come after regular response listeners, same as SaveSessionListener - KernelEvents::RESPONSE => array('onKernelResponse', -1000), - KernelEvents::FINISH_REQUEST => array('onFinishRequest'), - ); + KernelEvents::RESPONSE => ['onKernelResponse', -1000], + KernelEvents::FINISH_REQUEST => ['onFinishRequest'], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/AbstractTestSessionListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/AbstractTestSessionListener.php index cb5da50b..714b315a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/AbstractTestSessionListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/AbstractTestSessionListener.php @@ -85,10 +85,10 @@ abstract class AbstractTestSessionListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( - KernelEvents::REQUEST => array('onKernelRequest', 192), - KernelEvents::RESPONSE => array('onKernelResponse', -128), - ); + return [ + KernelEvents::REQUEST => ['onKernelRequest', 192], + KernelEvents::RESPONSE => ['onKernelResponse', -128], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php index 5ec52841..68d806af 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php @@ -45,6 +45,6 @@ class AddRequestFormatsListener implements EventSubscriberInterface */ public static function getSubscribedEvents() { - return array(KernelEvents::REQUEST => array('onKernelRequest', 1)); + return [KernelEvents::REQUEST => ['onKernelRequest', 1]]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php index 04137c74..77f9e2f6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php @@ -145,10 +145,10 @@ class DebugHandlersListener implements EventSubscriberInterface public static function getSubscribedEvents() { - $events = array(KernelEvents::REQUEST => array('configure', 2048)); + $events = [KernelEvents::REQUEST => ['configure', 2048]]; if ('cli' === \PHP_SAPI && \defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) { - $events[ConsoleEvents::COMMAND] = array('configure', 2048); + $events[ConsoleEvents::COMMAND] = ['configure', 2048]; } return $events; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php index de19e131..2f47d106 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php @@ -46,10 +46,10 @@ class DumpListener implements EventSubscriberInterface public static function getSubscribedEvents() { if (!class_exists(ConsoleEvents::class)) { - return array(); + return []; } // Register early to have a working dump() as early as possible - return array(ConsoleEvents::COMMAND => array('configure', 1024)); + return [ConsoleEvents::COMMAND => ['configure', 1024]]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php index 71de6043..e7e36d18 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php @@ -56,13 +56,12 @@ class ExceptionListener implements EventSubscriberInterface } catch (\Exception $e) { $this->logException($e, sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', \get_class($e), $e->getMessage(), $e->getFile(), $e->getLine())); - $wrapper = $e; - - while ($prev = $wrapper->getPrevious()) { + $prev = $e; + do { if ($exception === $wrapper = $prev) { throw $e; } - } + } while ($prev = $wrapper->getPrevious()); $prev = new \ReflectionProperty($wrapper instanceof \Exception ? \Exception::class : \Error::class, 'previous'); $prev->setAccessible(true); @@ -84,9 +83,9 @@ class ExceptionListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( - KernelEvents::EXCEPTION => array('onKernelException', -128), - ); + return [ + KernelEvents::EXCEPTION => ['onKernelException', -128], + ]; } /** @@ -99,9 +98,9 @@ class ExceptionListener implements EventSubscriberInterface { if (null !== $this->logger) { if (!$exception instanceof HttpExceptionInterface || $exception->getStatusCode() >= 500) { - $this->logger->critical($message, array('exception' => $exception)); + $this->logger->critical($message, ['exception' => $exception]); } else { - $this->logger->error($message, array('exception' => $exception)); + $this->logger->error($message, ['exception' => $exception]); } } } @@ -116,11 +115,11 @@ class ExceptionListener implements EventSubscriberInterface */ protected function duplicateRequest(\Exception $exception, Request $request) { - $attributes = array( + $attributes = [ '_controller' => $this->controller, 'exception' => FlattenException::create($exception), 'logger' => $this->logger instanceof DebugLoggerInterface ? $this->logger : null, - ); + ]; $request = $request->duplicate(null, null, $attributes); $request->setMethod('GET'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php index 574d7c05..1333120e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php @@ -70,7 +70,7 @@ class FragmentListener implements EventSubscriberInterface parse_str($request->query->get('_path', ''), $attributes); $request->attributes->add($attributes); - $request->attributes->set('_route_params', array_replace($request->attributes->get('_route_params', array()), $attributes)); + $request->attributes->set('_route_params', array_replace($request->attributes->get('_route_params', []), $attributes)); $request->query->remove('_path'); } @@ -92,8 +92,8 @@ class FragmentListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( - KernelEvents::REQUEST => array(array('onKernelRequest', 48)), - ); + return [ + KernelEvents::REQUEST => [['onKernelRequest', 48]], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php index ed0236ef..c7e32dbb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php @@ -74,10 +74,10 @@ class LocaleListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( + return [ // must be registered after the Router to have access to the _locale - KernelEvents::REQUEST => array(array('onKernelRequest', 16)), - KernelEvents::FINISH_REQUEST => array(array('onKernelFinishRequest', 0)), - ); + KernelEvents::REQUEST => [['onKernelRequest', 16]], + KernelEvents::FINISH_REQUEST => [['onKernelFinishRequest', 0]], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php index 2e54a92f..5304b809 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php @@ -119,10 +119,10 @@ class ProfilerListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( - KernelEvents::RESPONSE => array('onKernelResponse', -100), + return [ + KernelEvents::RESPONSE => ['onKernelResponse', -100], KernelEvents::EXCEPTION => 'onKernelException', - KernelEvents::TERMINATE => array('onKernelTerminate', -1024), - ); + KernelEvents::TERMINATE => ['onKernelTerminate', -1024], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ResponseListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ResponseListener.php index f2478452..43527b7f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ResponseListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ResponseListener.php @@ -49,8 +49,8 @@ class ResponseListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( + return [ KernelEvents::RESPONSE => 'onKernelResponse', - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php index ab5c86cd..378327b5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php @@ -118,12 +118,12 @@ class RouterListener implements EventSubscriberInterface } if (null !== $this->logger) { - $this->logger->info('Matched route "{route}".', array( + $this->logger->info('Matched route "{route}".', [ 'route' => isset($parameters['_route']) ? $parameters['_route'] : 'n/a', 'route_parameters' => $parameters, 'request_uri' => $request->getUri(), 'method' => $request->getMethod(), - )); + ]); } $request->attributes->add($parameters); @@ -157,11 +157,11 @@ class RouterListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( - KernelEvents::REQUEST => array(array('onKernelRequest', 32)), - KernelEvents::FINISH_REQUEST => array(array('onKernelFinishRequest', 0)), - KernelEvents::EXCEPTION => array('onKernelException', -64), - ); + return [ + KernelEvents::REQUEST => [['onKernelRequest', 32]], + KernelEvents::FINISH_REQUEST => [['onKernelFinishRequest', 0]], + KernelEvents::EXCEPTION => ['onKernelException', -64], + ]; } private function createWelcomeResponse() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/SaveSessionListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/SaveSessionListener.php index 36809b59..5901200a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/SaveSessionListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/SaveSessionListener.php @@ -58,9 +58,9 @@ class SaveSessionListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( + return [ // low priority but higher than StreamedResponseListener - KernelEvents::RESPONSE => array(array('onKernelResponse', -1000)), - ); + KernelEvents::RESPONSE => [['onKernelResponse', -1000]], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php index 2c616b91..895176a9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php @@ -42,8 +42,8 @@ class StreamedResponseListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( - KernelEvents::RESPONSE => array('onKernelResponse', -1024), - ); + return [ + KernelEvents::RESPONSE => ['onKernelResponse', -1024], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/SurrogateListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/SurrogateListener.php index 63435338..0fddddde 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/SurrogateListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/SurrogateListener.php @@ -58,8 +58,8 @@ class SurrogateListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( + return [ KernelEvents::RESPONSE => 'onKernelResponse', - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/TranslatorListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/TranslatorListener.php index 2a5fc712..0f506061 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/TranslatorListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/TranslatorListener.php @@ -51,11 +51,11 @@ class TranslatorListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( + return [ // must be registered after the Locale listener - KernelEvents::REQUEST => array(array('onKernelRequest', 10)), - KernelEvents::FINISH_REQUEST => array(array('onKernelFinishRequest', 0)), - ); + KernelEvents::REQUEST => [['onKernelRequest', 10]], + KernelEvents::FINISH_REQUEST => [['onKernelFinishRequest', 0]], + ]; } private function setLocale(Request $request) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ValidateRequestListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ValidateRequestListener.php index a33853f7..2e921869 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ValidateRequestListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ValidateRequestListener.php @@ -44,10 +44,10 @@ class ValidateRequestListener implements EventSubscriberInterface */ public static function getSubscribedEvents() { - return array( - KernelEvents::REQUEST => array( - array('onKernelRequest', 256), - ), - ); + return [ + KernelEvents::REQUEST => [ + ['onKernelRequest', 256], + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php index 39418842..05fe7c4a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php @@ -24,6 +24,6 @@ class AccessDeniedHttpException extends HttpException */ public function __construct($message = null, \Exception $previous = null, $code = 0) { - parent::__construct(403, $message, $previous, array(), $code); + parent::__construct(403, $message, $previous, [], $code); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/BadRequestHttpException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/BadRequestHttpException.php index c28d8373..683ef1a9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/BadRequestHttpException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/BadRequestHttpException.php @@ -23,6 +23,6 @@ class BadRequestHttpException extends HttpException */ public function __construct($message = null, \Exception $previous = null, $code = 0) { - parent::__construct(400, $message, $previous, array(), $code); + parent::__construct(400, $message, $previous, [], $code); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/ConflictHttpException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/ConflictHttpException.php index 79f24f2e..aaf258a0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/ConflictHttpException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/ConflictHttpException.php @@ -23,6 +23,6 @@ class ConflictHttpException extends HttpException */ public function __construct($message = null, \Exception $previous = null, $code = 0) { - parent::__construct(409, $message, $previous, array(), $code); + parent::__construct(409, $message, $previous, [], $code); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/GoneHttpException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/GoneHttpException.php index 84e6915d..f855ba02 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/GoneHttpException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/GoneHttpException.php @@ -23,6 +23,6 @@ class GoneHttpException extends HttpException */ public function __construct($message = null, \Exception $previous = null, $code = 0) { - parent::__construct(410, $message, $previous, array(), $code); + parent::__construct(410, $message, $previous, [], $code); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/HttpException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/HttpException.php index e8e37605..809d29e6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/HttpException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/HttpException.php @@ -21,7 +21,7 @@ class HttpException extends \RuntimeException implements HttpExceptionInterface private $statusCode; private $headers; - public function __construct($statusCode, $message = null, \Exception $previous = null, array $headers = array(), $code = 0) + public function __construct($statusCode, $message = null, \Exception $previous = null, array $headers = [], $code = 0) { $this->statusCode = $statusCode; $this->headers = $headers; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/LengthRequiredHttpException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/LengthRequiredHttpException.php index 645efe87..8ad08f42 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/LengthRequiredHttpException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/LengthRequiredHttpException.php @@ -23,6 +23,6 @@ class LengthRequiredHttpException extends HttpException */ public function __construct($message = null, \Exception $previous = null, $code = 0) { - parent::__construct(411, $message, $previous, array(), $code); + parent::__construct(411, $message, $previous, [], $code); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php index e308a5fe..f256ef86 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php @@ -24,7 +24,7 @@ class MethodNotAllowedHttpException extends HttpException */ public function __construct(array $allow, $message = null, \Exception $previous = null, $code = 0) { - $headers = array('Allow' => strtoupper(implode(', ', $allow))); + $headers = ['Allow' => strtoupper(implode(', ', $allow))]; parent::__construct(405, $message, $previous, $headers, $code); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/NotAcceptableHttpException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/NotAcceptableHttpException.php index 097a13fd..a48bbe70 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/NotAcceptableHttpException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/NotAcceptableHttpException.php @@ -23,6 +23,6 @@ class NotAcceptableHttpException extends HttpException */ public function __construct($message = null, \Exception $previous = null, $code = 0) { - parent::__construct(406, $message, $previous, array(), $code); + parent::__construct(406, $message, $previous, [], $code); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.php index 878173cc..01a5bd08 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.php @@ -23,6 +23,6 @@ class NotFoundHttpException extends HttpException */ public function __construct($message = null, \Exception $previous = null, $code = 0) { - parent::__construct(404, $message, $previous, array(), $code); + parent::__construct(404, $message, $previous, [], $code); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/PreconditionFailedHttpException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/PreconditionFailedHttpException.php index 9f13a624..3cf33f98 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/PreconditionFailedHttpException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/PreconditionFailedHttpException.php @@ -23,6 +23,6 @@ class PreconditionFailedHttpException extends HttpException */ public function __construct($message = null, \Exception $previous = null, $code = 0) { - parent::__construct(412, $message, $previous, array(), $code); + parent::__construct(412, $message, $previous, [], $code); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/PreconditionRequiredHttpException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/PreconditionRequiredHttpException.php index 9d0a36d7..a2512c5c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/PreconditionRequiredHttpException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/PreconditionRequiredHttpException.php @@ -25,6 +25,6 @@ class PreconditionRequiredHttpException extends HttpException */ public function __construct($message = null, \Exception $previous = null, $code = 0) { - parent::__construct(428, $message, $previous, array(), $code); + parent::__construct(428, $message, $previous, [], $code); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/ServiceUnavailableHttpException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/ServiceUnavailableHttpException.php index b2767c3f..52ce7513 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/ServiceUnavailableHttpException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/ServiceUnavailableHttpException.php @@ -24,9 +24,9 @@ class ServiceUnavailableHttpException extends HttpException */ public function __construct($retryAfter = null, $message = null, \Exception $previous = null, $code = 0) { - $headers = array(); + $headers = []; if ($retryAfter) { - $headers = array('Retry-After' => $retryAfter); + $headers = ['Retry-After' => $retryAfter]; } parent::__construct(503, $message, $previous, $headers, $code); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/TooManyRequestsHttpException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/TooManyRequestsHttpException.php index 7d8a8033..d313f7ea 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/TooManyRequestsHttpException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/TooManyRequestsHttpException.php @@ -26,9 +26,9 @@ class TooManyRequestsHttpException extends HttpException */ public function __construct($retryAfter = null, $message = null, \Exception $previous = null, $code = 0) { - $headers = array(); + $headers = []; if ($retryAfter) { - $headers = array('Retry-After' => $retryAfter); + $headers = ['Retry-After' => $retryAfter]; } parent::__construct(429, $message, $previous, $headers, $code); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php index 05ac875c..d945df2b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php @@ -24,7 +24,7 @@ class UnauthorizedHttpException extends HttpException */ public function __construct($challenge, $message = null, \Exception $previous = null, $code = 0) { - $headers = array('WWW-Authenticate' => $challenge); + $headers = ['WWW-Authenticate' => $challenge]; parent::__construct(401, $message, $previous, $headers, $code); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnprocessableEntityHttpException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnprocessableEntityHttpException.php index 01b8b846..2263a312 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnprocessableEntityHttpException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnprocessableEntityHttpException.php @@ -23,6 +23,6 @@ class UnprocessableEntityHttpException extends HttpException */ public function __construct($message = null, \Exception $previous = null, $code = 0) { - parent::__construct(422, $message, $previous, array(), $code); + parent::__construct(422, $message, $previous, [], $code); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnsupportedMediaTypeHttpException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnsupportedMediaTypeHttpException.php index 6913504e..75f844ab 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnsupportedMediaTypeHttpException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnsupportedMediaTypeHttpException.php @@ -23,6 +23,6 @@ class UnsupportedMediaTypeHttpException extends HttpException */ public function __construct($message = null, \Exception $previous = null, $code = 0) { - parent::__construct(415, $message, $previous, array(), $code); + parent::__construct(415, $message, $previous, [], $code); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/AbstractSurrogateFragmentRenderer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/AbstractSurrogateFragmentRenderer.php index 3c8934ff..430486e5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/AbstractSurrogateFragmentRenderer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/AbstractSurrogateFragmentRenderer.php @@ -59,7 +59,7 @@ abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmentRendere * * @see Symfony\Component\HttpKernel\HttpCache\SurrogateInterface */ - public function render($uri, Request $request, array $options = array()) + public function render($uri, Request $request, array $options = []) { if (!$this->surrogate || !$this->surrogate->hasSurrogateCapability($request)) { if ($uri instanceof ControllerReference && $this->containsNonScalars($uri->attributes)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php index f11db73d..f40da001 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php @@ -29,7 +29,7 @@ use Symfony\Component\HttpKernel\Controller\ControllerReference; class FragmentHandler { private $debug; - private $renderers = array(); + private $renderers = []; private $requestStack; /** @@ -37,7 +37,7 @@ class FragmentHandler * @param FragmentRendererInterface[] $renderers An array of FragmentRendererInterface instances * @param bool $debug Whether the debug mode is enabled or not */ - public function __construct(RequestStack $requestStack, array $renderers = array(), $debug = false) + public function __construct(RequestStack $requestStack, array $renderers = [], $debug = false) { $this->requestStack = $requestStack; foreach ($renderers as $renderer) { @@ -70,7 +70,7 @@ class FragmentHandler * @throws \InvalidArgumentException when the renderer does not exist * @throws \LogicException when no master request is being handled */ - public function render($uri, $renderer = 'inline', array $options = array()) + public function render($uri, $renderer = 'inline', array $options = []) { if (!isset($options['ignore_errors'])) { $options['ignore_errors'] = !$this->debug; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php index bcf4e994..8e454a01 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php @@ -31,7 +31,7 @@ interface FragmentRendererInterface * * @return Response A Response instance */ - public function render($uri, Request $request, array $options = array()); + public function render($uri, Request $request, array $options = []); /** * Gets the name of the strategy. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php index f7150c19..a0abc058 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php @@ -81,7 +81,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer * * id: An optional hx:include tag id attribute * * attributes: An optional array of hx:include tag attributes */ - public function render($uri, Request $request, array $options = array()) + public function render($uri, Request $request, array $options = []) { if ($uri instanceof ControllerReference) { if (null === $this->signer) { @@ -102,7 +102,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer $content = $template; } - $attributes = isset($options['attributes']) && \is_array($options['attributes']) ? $options['attributes'] : array(); + $attributes = isset($options['attributes']) && \is_array($options['attributes']) ? $options['attributes'] : []; if (isset($options['id']) && $options['id']) { $attributes['id'] = $options['id']; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php index 13fc3356..ce88bd45 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php @@ -43,7 +43,7 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer * * * alt: an alternative URI to render in case of an error */ - public function render($uri, Request $request, array $options = array()) + public function render($uri, Request $request, array $options = []) { $reference = null; if ($uri instanceof ControllerReference) { @@ -54,10 +54,10 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer // want that as we want to preserve objects (so we manually set Request attributes // below instead) $attributes = $reference->attributes; - $reference->attributes = array(); + $reference->attributes = []; // The request format and locale might have been overridden by the user - foreach (array('_format', '_locale') as $key) { + foreach (['_format', '_locale'] as $key) { if (isset($attributes[$key])) { $reference->attributes[$key] = $attributes[$key]; } @@ -80,7 +80,7 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer return SubRequestHandler::handle($this->kernel, $subRequest, HttpKernelInterface::SUB_REQUEST, false); } catch (\Exception $e) { // we dispatch the exception event to trigger the logging - // the response that comes back is simply ignored + // the response that comes back is ignored if (isset($options['ignore_errors']) && $options['ignore_errors'] && $this->dispatcher) { $event = new GetResponseForExceptionEvent($this->kernel, $request, HttpKernelInterface::SUB_REQUEST, $e); @@ -113,7 +113,7 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer unset($server['HTTP_IF_MODIFIED_SINCE']); unset($server['HTTP_IF_NONE_MATCH']); - $subRequest = Request::create($uri, 'get', array(), $cookies, array(), $server); + $subRequest = Request::create($uri, 'get', [], $cookies, [], $server); if ($request->headers->has('Surrogate-Capability')) { $subRequest->headers->set('Surrogate-Capability', $request->headers->get('Surrogate-Capability')); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/AbstractSurrogate.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/AbstractSurrogate.php index 3b2d5f26..8918a305 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/AbstractSurrogate.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/AbstractSurrogate.php @@ -24,16 +24,16 @@ use Symfony\Component\HttpKernel\HttpKernelInterface; abstract class AbstractSurrogate implements SurrogateInterface { protected $contentTypes; - protected $phpEscapeMap = array( - array('', '', '', ''), - ); + protected $phpEscapeMap = [ + ['', '', '', ''], + ]; /** * @param array $contentTypes An array of content-type that should be parsed for Surrogate information * (default: text/html, text/xml, application/xhtml+xml, and application/xml) */ - public function __construct(array $contentTypes = array('text/html', 'text/xml', 'application/xhtml+xml', 'application/xml')) + public function __construct(array $contentTypes = ['text/html', 'text/xml', 'application/xhtml+xml', 'application/xml']) { $this->contentTypes = $contentTypes; } @@ -90,7 +90,7 @@ abstract class AbstractSurrogate implements SurrogateInterface */ public function handle(HttpCache $cache, $uri, $alt, $ignoreErrors) { - $subRequest = Request::create($uri, Request::METHOD_GET, array(), $cache->getRequest()->cookies->all(), array(), $cache->getRequest()->server->all()); + $subRequest = Request::create($uri, Request::METHOD_GET, [], $cache->getRequest()->cookies->all(), [], $cache->getRequest()->server->all()); try { $response = $cache->handle($subRequest, HttpKernelInterface::SUB_REQUEST, true); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Esi.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Esi.php index 69134c71..dc62990b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Esi.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Esi.php @@ -85,7 +85,7 @@ class Esi extends AbstractSurrogate $i = 1; while (isset($chunks[$i])) { - $options = array(); + $options = []; preg_match_all('/(src|onerror|alt)="([^"]*?)"/', $chunks[$i], $matches, PREG_SET_ORDER); foreach ($matches as $set) { $options[$set[1]] = $set[2]; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php index ebc5ba68..daaa928f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -32,8 +32,8 @@ class HttpCache implements HttpKernelInterface, TerminableInterface private $request; private $surrogate; private $surrogateCacheStrategy; - private $options = array(); - private $traces = array(); + private $options = []; + private $traces = []; /** * Constructor. @@ -70,24 +70,24 @@ class HttpCache implements HttpKernelInterface, TerminableInterface * This setting is overridden by the stale-if-error HTTP Cache-Control extension * (see RFC 5861). */ - public function __construct(HttpKernelInterface $kernel, StoreInterface $store, SurrogateInterface $surrogate = null, array $options = array()) + public function __construct(HttpKernelInterface $kernel, StoreInterface $store, SurrogateInterface $surrogate = null, array $options = []) { $this->store = $store; $this->kernel = $kernel; $this->surrogate = $surrogate; // needed in case there is a fatal error because the backend is too slow to respond - register_shutdown_function(array($this->store, 'cleanup')); + register_shutdown_function([$this->store, 'cleanup']); - $this->options = array_merge(array( + $this->options = array_merge([ 'debug' => false, 'default_ttl' => 0, - 'private_headers' => array('Authorization', 'Cookie'), + 'private_headers' => ['Authorization', 'Cookie'], 'allow_reload' => false, 'allow_revalidate' => false, 'stale_while_revalidate' => 2, 'stale_if_error' => 60, - ), $options); + ], $options); } /** @@ -117,7 +117,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface */ public function getLog() { - $log = array(); + $log = []; foreach ($this->traces as $request => $traces) { $log[] = sprintf('%s: %s', $request, implode(', ', $traces)); } @@ -164,7 +164,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface { // FIXME: catch exceptions and implement a 500 error page here? -> in Varnish, there is a built-in error page mechanism if (HttpKernelInterface::MASTER_REQUEST === $type) { - $this->traces = array(); + $this->traces = []; // Keep a clone of the original request for surrogates so they can access it. // We must clone here to get a separate instance because the application will modify the request during // the application flow (we know it always does because we do ourselves by setting REMOTE_ADDR to 127.0.0.1 @@ -175,7 +175,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface } } - $this->traces[$this->getTraceKey($request)] = array(); + $this->traces[$this->getTraceKey($request)] = []; if (!$request->isMethodSafe(false)) { $response = $this->invalidate($request, $catch); @@ -260,9 +260,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface $this->store->invalidate($request); // As per the RFC, invalidate Location and Content-Location URLs if present - foreach (array('Location', 'Content-Location') as $header) { + foreach (['Location', 'Content-Location'] as $header) { if ($uri = $response->headers->get($header)) { - $subRequest = Request::create($uri, 'get', array(), array(), array(), $request->server->all()); + $subRequest = Request::create($uri, 'get', [], [], [], $request->server->all()); $this->store->invalidate($subRequest); } @@ -357,7 +357,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface // Add our cached etag validator to the environment. // We keep the etags from the client to handle the case when the client // has a different private valid entry which is not cached here. - $cachedEtags = $entry->getEtag() ? array($entry->getEtag()) : array(); + $cachedEtags = $entry->getEtag() ? [$entry->getEtag()] : []; $requestEtags = $request->getETags(); if ($etags = array_unique(array_merge($cachedEtags, $requestEtags))) { $subRequest->headers->set('if_none_match', implode(', ', $etags)); @@ -377,7 +377,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface $entry = clone $entry; $entry->headers->remove('Date'); - foreach (array('Date', 'Expires', 'Cache-Control', 'ETag', 'Last-Modified') as $name) { + foreach (['Date', 'Expires', 'Cache-Control', 'ETag', 'Last-Modified'] as $name) { if ($response->headers->has($name)) { $entry->headers->set($name, $response->headers->get($name)); } @@ -448,7 +448,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface $response = SubRequestHandler::handle($this->kernel, $request, HttpKernelInterface::MASTER_REQUEST, $catch); // we don't implement the stale-if-error on Requests, which is nonetheless part of the RFC - if (null !== $entry && \in_array($response->getStatusCode(), array(500, 502, 503, 504))) { + if (null !== $entry && \in_array($response->getStatusCode(), [500, 502, 503, 504])) { if (null === $age = $entry->headers->getCacheControlDirective('stale-if-error')) { $age = $this->options['stale_if_error']; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php index 672cc893..862bac55 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php @@ -5,10 +5,6 @@ * * (c) Fabien Potencier * - * This code is partially based on the Rack-Cache library by Ryan Tomayko, - * which is released under the MIT license. - * (based on commit 02d2b48d75bcb63cf1c0c7149c077ad256542801) - * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ @@ -28,30 +24,69 @@ use Symfony\Component\HttpFoundation\Response; */ class ResponseCacheStrategy implements ResponseCacheStrategyInterface { - private $cacheable = true; + /** + * Cache-Control headers that are sent to the final response if they appear in ANY of the responses. + */ + private static $overrideDirectives = ['private', 'no-cache', 'no-store', 'no-transform', 'must-revalidate', 'proxy-revalidate']; + + /** + * Cache-Control headers that are sent to the final response if they appear in ALL of the responses. + */ + private static $inheritDirectives = ['public', 'immutable']; + private $embeddedResponses = 0; - private $ttls = array(); - private $maxAges = array(); private $isNotCacheableResponseEmbedded = false; + private $age = 0; + private $flagDirectives = [ + 'no-cache' => null, + 'no-store' => null, + 'no-transform' => null, + 'must-revalidate' => null, + 'proxy-revalidate' => null, + 'public' => null, + 'private' => null, + 'immutable' => null, + ]; + private $ageDirectives = [ + 'max-age' => null, + 's-maxage' => null, + 'expires' => null, + ]; /** * {@inheritdoc} */ public function add(Response $response) { - if (!$response->isFresh() || !$response->isCacheable()) { - $this->cacheable = false; - } else { - $maxAge = $response->getMaxAge(); - $this->ttls[] = $response->getTtl(); - $this->maxAges[] = $maxAge; + ++$this->embeddedResponses; - if (null === $maxAge) { - $this->isNotCacheableResponseEmbedded = true; + foreach (self::$overrideDirectives as $directive) { + if ($response->headers->hasCacheControlDirective($directive)) { + $this->flagDirectives[$directive] = true; } } - ++$this->embeddedResponses; + foreach (self::$inheritDirectives as $directive) { + if (false !== $this->flagDirectives[$directive]) { + $this->flagDirectives[$directive] = $response->headers->hasCacheControlDirective($directive); + } + } + + $age = $response->getAge(); + $this->age = max($this->age, $age); + + if ($this->willMakeFinalResponseUncacheable($response)) { + $this->isNotCacheableResponseEmbedded = true; + + return; + } + + $this->storeRelativeAgeDirective('max-age', $response->headers->getCacheControlDirective('max-age'), $age); + $this->storeRelativeAgeDirective('s-maxage', $response->headers->getCacheControlDirective('s-maxage') ?: $response->headers->getCacheControlDirective('max-age'), $age); + + $expires = $response->getExpires(); + $expires = null !== $expires ? $expires->format('U') - $response->getDate()->format('U') : null; + $this->storeRelativeAgeDirective('expires', $expires >= 0 ? $expires : null, 0); } /** @@ -64,33 +99,124 @@ class ResponseCacheStrategy implements ResponseCacheStrategyInterface return; } - // Remove validation related headers in order to avoid browsers using - // their own cache, because some of the response content comes from - // at least one embedded response (which likely has a different caching strategy). - if ($response->isValidateable()) { - $response->setEtag(null); - $response->setLastModified(null); - } + // Remove validation related headers of the master response, + // because some of the response content comes from at least + // one embedded response (which likely has a different caching strategy). + $response->setEtag(null); + $response->setLastModified(null); - if (!$response->isFresh() || !$response->isCacheable()) { - $this->cacheable = false; - } + $this->add($response); - if (!$this->cacheable) { - $response->headers->set('Cache-Control', 'no-cache, must-revalidate'); + $response->headers->set('Age', $this->age); + + if ($this->isNotCacheableResponseEmbedded) { + $response->setExpires($response->getDate()); + + if ($this->flagDirectives['no-store']) { + $response->headers->set('Cache-Control', 'no-cache, no-store, must-revalidate'); + } else { + $response->headers->set('Cache-Control', 'no-cache, must-revalidate'); + } return; } - $this->ttls[] = $response->getTtl(); - $this->maxAges[] = $response->getMaxAge(); + $flags = array_filter($this->flagDirectives); - if ($this->isNotCacheableResponseEmbedded) { - $response->headers->removeCacheControlDirective('s-maxage'); - } elseif (null !== $maxAge = min($this->maxAges)) { - $response->setSharedMaxAge($maxAge); - $response->headers->set('Age', $maxAge - min($this->ttls)); + if (isset($flags['must-revalidate'])) { + $flags['no-cache'] = true; + } + + $response->headers->set('Cache-Control', implode(', ', array_keys($flags))); + + $maxAge = null; + $sMaxage = null; + + if (\is_numeric($this->ageDirectives['max-age'])) { + $maxAge = $this->ageDirectives['max-age'] + $this->age; + $response->headers->addCacheControlDirective('max-age', $maxAge); + } + + if (\is_numeric($this->ageDirectives['s-maxage'])) { + $sMaxage = $this->ageDirectives['s-maxage'] + $this->age; + + if ($maxAge !== $sMaxage) { + $response->headers->addCacheControlDirective('s-maxage', $sMaxage); + } + } + + if (\is_numeric($this->ageDirectives['expires'])) { + $date = clone $response->getDate(); + $date->modify('+'.($this->ageDirectives['expires'] + $this->age).' seconds'); + $response->setExpires($date); + } + } + + /** + * RFC2616, Section 13.4. + * + * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.4 + * + * @return bool + */ + private function willMakeFinalResponseUncacheable(Response $response) + { + // RFC2616: A response received with a status code of 200, 203, 300, 301 or 410 + // MAY be stored by a cache […] unless a cache-control directive prohibits caching. + if ($response->headers->hasCacheControlDirective('no-cache') + || $response->headers->getCacheControlDirective('no-store') + ) { + return true; + } + + // Last-Modified and Etag headers cannot be merged, they render the response uncacheable + // by default (except if the response also has max-age etc.). + if (\in_array($response->getStatusCode(), [200, 203, 300, 301, 410]) + && null === $response->getLastModified() + && null === $response->getEtag() + ) { + return false; + } + + // RFC2616: A response received with any other status code (e.g. status codes 302 and 307) + // MUST NOT be returned in a reply to a subsequent request unless there are + // cache-control directives or another header(s) that explicitly allow it. + $cacheControl = ['max-age', 's-maxage', 'must-revalidate', 'proxy-revalidate', 'public', 'private']; + foreach ($cacheControl as $key) { + if ($response->headers->hasCacheControlDirective($key)) { + return false; + } + } + + if ($response->headers->has('Expires')) { + return false; + } + + return true; + } + + /** + * Store lowest max-age/s-maxage/expires for the final response. + * + * The response might have been stored in cache a while ago. To keep things comparable, + * we have to subtract the age so that the value is normalized for an age of 0. + * + * If the value is lower than the currently stored value, we update the value, to keep a rolling + * minimal value of each instruction. If the value is NULL, the directive will not be set on the final response. + * + * @param string $directive + * @param int|null $value + * @param int $age + */ + private function storeRelativeAgeDirective($directive, $value, $age) + { + if (null === $value) { + $this->ageDirectives[$directive] = false; + } + + if (false !== $this->ageDirectives[$directive]) { + $value = $value - $age; + $this->ageDirectives[$directive] = null !== $this->ageDirectives[$directive] ? min($this->ageDirectives[$directive], $value) : $value; } - $response->setMaxAge(0); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Ssi.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Ssi.php index 58df1760..eaaa230b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Ssi.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Ssi.php @@ -70,7 +70,7 @@ class Ssi extends AbstractSurrogate $i = 1; while (isset($chunks[$i])) { - $options = array(); + $options = []; preg_match_all('/(virtual)="([^"]*?)"/', $chunks[$i], $matches, PREG_SET_ORDER); foreach ($matches as $set) { $options[$set[1]] = $set[2]; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php index 990091d0..ffd4f01a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php @@ -40,7 +40,7 @@ class Store implements StoreInterface throw new \RuntimeException(sprintf('Unable to create the store directory (%s).', $this->root)); } $this->keyCache = new \SplObjectStorage(); - $this->locks = array(); + $this->locks = []; } /** @@ -54,7 +54,7 @@ class Store implements StoreInterface fclose($lock); } - $this->locks = array(); + $this->locks = []; } /** @@ -192,11 +192,11 @@ class Store implements StoreInterface } // read existing cache entries, remove non-varying, and add this one to the list - $entries = array(); + $entries = []; $vary = $response->headers->get('vary'); foreach ($this->getMetadata($key) as $entry) { if (!isset($entry[1]['vary'][0])) { - $entry[1]['vary'] = array(''); + $entry[1]['vary'] = ['']; } if ($entry[1]['vary'][0] != $vary || !$this->requestsMatch($vary, $entry[0], $storedEnv)) { @@ -207,7 +207,7 @@ class Store implements StoreInterface $headers = $this->persistResponse($response); unset($headers['age']); - array_unshift($entries, array($storedEnv, $headers)); + array_unshift($entries, [$storedEnv, $headers]); if (false === $this->save($key, serialize($entries))) { throw new \RuntimeException('Unable to store the metadata.'); @@ -236,13 +236,13 @@ class Store implements StoreInterface $modified = false; $key = $this->getCacheKey($request); - $entries = array(); + $entries = []; foreach ($this->getMetadata($key) as $entry) { $response = $this->restoreResponse($entry[1]); if ($response->isFresh()) { $response->expire(); $modified = true; - $entries[] = array($entry[0], $this->persistResponse($response)); + $entries[] = [$entry[0], $this->persistResponse($response)]; } else { $entries[] = $entry; } @@ -293,7 +293,7 @@ class Store implements StoreInterface private function getMetadata($key) { if (!$entries = $this->load($key)) { - return array(); + return []; } return unserialize($entries); @@ -464,7 +464,7 @@ class Store implements StoreInterface private function persistResponse(Response $response) { $headers = $response->headers->all(); - $headers['X-Status'] = array($response->getStatusCode()); + $headers['X-Status'] = [$response->getStatusCode()]; return $headers; } @@ -483,7 +483,7 @@ class Store implements StoreInterface unset($headers['X-Status']); if (null !== $body) { - $headers['X-Body-File'] = array($body); + $headers['X-Body-File'] = [$body]; } return new Response($body, $status, $headers); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/SubRequestHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/SubRequestHandler.php index 9649072c..a701b235 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/SubRequestHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/SubRequestHandler.php @@ -33,22 +33,22 @@ class SubRequestHandler $trustedHeaderSet = Request::getTrustedHeaderSet(); if (\method_exists(Request::class, 'getTrustedHeaderName')) { Request::setTrustedProxies($trustedProxies, -1); - $trustedHeaders = array( + $trustedHeaders = [ Request::HEADER_FORWARDED => Request::getTrustedHeaderName(Request::HEADER_FORWARDED, false), Request::HEADER_X_FORWARDED_FOR => Request::getTrustedHeaderName(Request::HEADER_X_FORWARDED_FOR, false), Request::HEADER_X_FORWARDED_HOST => Request::getTrustedHeaderName(Request::HEADER_X_FORWARDED_HOST, false), Request::HEADER_X_FORWARDED_PROTO => Request::getTrustedHeaderName(Request::HEADER_X_FORWARDED_PROTO, false), Request::HEADER_X_FORWARDED_PORT => Request::getTrustedHeaderName(Request::HEADER_X_FORWARDED_PORT, false), - ); + ]; Request::setTrustedProxies($trustedProxies, $trustedHeaderSet); } else { - $trustedHeaders = array( + $trustedHeaders = [ Request::HEADER_FORWARDED => 'FORWARDED', Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR', Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST', Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO', Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT', - ); + ]; } // remove untrusted values @@ -63,8 +63,8 @@ class SubRequestHandler } // compute trusted values, taking any trusted proxies into account - $trustedIps = array(); - $trustedValues = array(); + $trustedIps = []; + $trustedValues = []; foreach (array_reverse($request->getClientIps()) as $ip) { $trustedIps[] = $ip; $trustedValues[] = sprintf('for="%s"', $ip); @@ -95,7 +95,7 @@ class SubRequestHandler // ensure 127.0.0.1 is set as trusted proxy if (!IpUtils::checkIp('127.0.0.1', $trustedProxies)) { - Request::setTrustedProxies(array_merge($trustedProxies, array('127.0.0.1')), Request::getTrustedHeaderSet()); + Request::setTrustedProxies(array_merge($trustedProxies, ['127.0.0.1']), Request::getTrustedHeaderSet()); } try { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php index 36c67309..1e19923e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php @@ -263,6 +263,9 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface } } + /** + * Returns a human-readable string for the specified variable. + */ private function varToString($var) { if (\is_object($var)) { @@ -270,7 +273,7 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface } if (\is_array($var)) { - $a = array(); + $a = []; foreach ($var as $k => $v) { $a[] = sprintf('%s => %s', $k, $this->varToString($v)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php index bfc961f5..1a985a4c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php @@ -50,7 +50,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl /** * @var BundleInterface[] */ - protected $bundles = array(); + protected $bundles = []; protected $bundleMap; protected $container; @@ -67,11 +67,11 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '3.4.19'; - const VERSION_ID = 30419; + const VERSION = '3.4.23'; + const VERSION_ID = 30423; const MAJOR_VERSION = 3; const MINOR_VERSION = 4; - const RELEASE_VERSION = 19; + const RELEASE_VERSION = 23; const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '11/2020'; @@ -271,7 +271,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl $overridePath = substr($path, 9); $resourceBundle = null; $bundles = $this->getBundle($bundleName, false, true); - $files = array(); + $files = []; foreach ($bundles as $bundle) { if ($isResource && file_exists($file = $dir.'/'.$bundle->getName().$overridePath)) { @@ -395,7 +395,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl @trigger_error(__METHOD__.'() is deprecated since Symfony 3.3, to be removed in 4.0.', E_USER_DEPRECATED); } - $this->loadClassCache = array($name, $extension); + $this->loadClassCache = [$name, $extension]; } /** @@ -481,9 +481,9 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl protected function initializeBundles() { // init bundles - $this->bundles = array(); - $topMostBundles = array(); - $directChildren = array(); + $this->bundles = []; + $topMostBundles = []; + $directChildren = []; foreach ($this->registerBundles() as $bundle) { $name = $bundle->getName(); @@ -515,10 +515,10 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl } // inheritance - $this->bundleMap = array(); + $this->bundleMap = []; foreach ($topMostBundles as $name => $bundle) { - $bundleMap = array($bundle); - $hierarchy = array($name); + $bundleMap = [$bundle]; + $hierarchy = [$name]; while (isset($directChildren[$name])) { $name = $directChildren[$name]; @@ -598,7 +598,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl } if ($this->debug) { - $collectedLogs = array(); + $collectedLogs = []; $previousHandler = \defined('PHPUNIT_COMPOSER_INSTALL'); $previousHandler = $previousHandler ?: set_error_handler(function ($type, $message, $file, $line) use (&$collectedLogs, &$previousHandler) { if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) { @@ -620,14 +620,14 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl } } - $collectedLogs[$message] = array( + $collectedLogs[$message] = [ 'type' => $type, 'message' => $message, 'file' => $file, 'line' => $line, 'trace' => $backtrace, 'count' => 1, - ); + ]; }); } @@ -664,7 +664,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl // Because concurrent requests might still be using them, // old container files are not removed immediately, // but on a next dump of the container. - static $legacyContainers = array(); + static $legacyContainers = []; $oldContainerDir = \dirname($oldContainer->getFileName()); $legacyContainers[$oldContainerDir.'.legacy'] = true; foreach (glob(\dirname($oldContainerDir).\DIRECTORY_SEPARATOR.'*.legacy') as $legacyContainer) { @@ -688,20 +688,20 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ protected function getKernelParameters() { - $bundles = array(); - $bundlesMetadata = array(); + $bundles = []; + $bundlesMetadata = []; foreach ($this->bundles as $name => $bundle) { $bundles[$name] = \get_class($bundle); - $bundlesMetadata[$name] = array( + $bundlesMetadata[$name] = [ 'parent' => $bundle->getParent(), 'path' => $bundle->getPath(), 'namespace' => $bundle->getNamespace(), - ); + ]; } return array_merge( - array( + [ 'kernel.root_dir' => realpath($this->rootDir) ?: $this->rootDir, 'kernel.project_dir' => realpath($this->getProjectDir()) ?: $this->getProjectDir(), 'kernel.environment' => $this->environment, @@ -713,7 +713,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl 'kernel.bundles_metadata' => $bundlesMetadata, 'kernel.charset' => $this->getCharset(), 'kernel.container_class' => $this->getContainerClass(), - ), + ], $this->getEnvParameters(false) ); } @@ -733,7 +733,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl @trigger_error(sprintf('The "%s()" method is deprecated as of 3.3 and will be removed in 4.0. Use the %%env()%% syntax to get the value of any environment variable from configuration files instead.', __METHOD__), E_USER_DEPRECATED); } - $parameters = array(); + $parameters = []; foreach ($_SERVER as $key => $value) { if (0 === strpos($key, 'SYMFONY__')) { @trigger_error(sprintf('The support of special environment variables that start with SYMFONY__ (such as "%s") is deprecated as of 3.3 and will be removed in 4.0. Use the %%env()%% syntax instead to get the value of environment variables in configuration files.', $key), E_USER_DEPRECATED); @@ -753,7 +753,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ protected function buildContainer() { - foreach (array('cache' => $this->warmupDir ?: $this->getCacheDir(), 'logs' => $this->getLogDir()) as $name => $dir) { + foreach (['cache' => $this->warmupDir ?: $this->getCacheDir(), 'logs' => $this->getLogDir()] as $name => $dir) { if (!is_dir($dir)) { if (false === @mkdir($dir, 0777, true) && !is_dir($dir)) { throw new \RuntimeException(sprintf("Unable to create the %s directory (%s)\n", $name, $dir)); @@ -782,7 +782,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ protected function prepareContainer(ContainerBuilder $container) { - $extensions = array(); + $extensions = []; foreach ($this->bundles as $bundle) { if ($extension = $bundle->getContainerExtension()) { $container->registerExtension($extension); @@ -844,7 +844,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl $dumper->setProxyDumper(new ProxyDumper()); } - $content = $dumper->dump(array( + $content = $dumper->dump([ 'class' => $class, 'base_class' => $baseClass, 'file' => $cache->getPath(), @@ -852,7 +852,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl 'debug' => $this->debug, 'inline_class_loader_parameter' => \PHP_VERSION_ID >= 70000 && !$this->loadClassCache && !class_exists(ClassCollectionLoader::class, false) ? 'container.dumper.inline_class_loader' : null, 'build_time' => $container->hasParameter('kernel.container_build_time') ? $container->getParameter('kernel.container_build_time') : time(), - )); + ]); $rootCode = array_pop($content); $dir = \dirname($cache->getPath()).'/'; @@ -862,7 +862,10 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl $fs->dumpFile($dir.$file, $code); @chmod($dir.$file, 0666 & ~umask()); } - @unlink(\dirname($dir.$file).'.legacy'); + $legacyFile = \dirname($dir.$file).'.legacy'; + if (file_exists($legacyFile)) { + @unlink($legacyFile); + } $cache->write($rootCode, $container->getResources()); } @@ -875,7 +878,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl protected function getContainerLoader(ContainerInterface $container) { $locator = new FileLocator($this); - $resolver = new LoaderResolver(array( + $resolver = new LoaderResolver([ new XmlFileLoader($container, $locator), new YamlFileLoader($container, $locator), new IniFileLoader($container, $locator), @@ -883,7 +886,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl new GlobFileLoader($container, $locator), new DirectoryLoader($container, $locator), new ClosureLoader($container), - )); + ]); return new DelegatingLoader($resolver); } @@ -927,8 +930,8 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl } // replace multiple new lines with a single newline - $rawChunk .= preg_replace(array('/\n{2,}/S'), "\n", $token[1]); - } elseif (\in_array($token[0], array(T_COMMENT, T_DOC_COMMENT))) { + $rawChunk .= preg_replace(['/\n{2,}/S'], "\n", $token[1]); + } elseif (\in_array($token[0], [T_COMMENT, T_DOC_COMMENT])) { $ignoreSpace = true; } else { $rawChunk .= $token[1]; @@ -953,13 +956,13 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl public function serialize() { - return serialize(array($this->environment, $this->debug)); + return serialize([$this->environment, $this->debug]); } public function unserialize($data) { if (\PHP_VERSION_ID >= 70000) { - list($environment, $debug) = unserialize($data, array('allowed_classes' => false)); + list($environment, $debug) = unserialize($data, ['allowed_classes' => false]); } else { list($environment, $debug) = unserialize($data); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Log/Logger.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Log/Logger.php index ca54d22f..6cfc7594 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Log/Logger.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Log/Logger.php @@ -22,7 +22,7 @@ use Psr\Log\LogLevel; */ class Logger extends AbstractLogger { - private static $levels = array( + private static $levels = [ LogLevel::DEBUG => 0, LogLevel::INFO => 1, LogLevel::NOTICE => 2, @@ -31,7 +31,7 @@ class Logger extends AbstractLogger LogLevel::CRITICAL => 5, LogLevel::ALERT => 6, LogLevel::EMERGENCY => 7, - ); + ]; private $minLevelIndex; private $formatter; @@ -57,7 +57,7 @@ class Logger extends AbstractLogger } $this->minLevelIndex = self::$levels[$minLevel]; - $this->formatter = $formatter ?: array($this, 'format'); + $this->formatter = $formatter ?: [$this, 'format']; if (false === $this->handle = \is_resource($output) ? $output : @fopen($output, 'a')) { throw new InvalidArgumentException(sprintf('Unable to open "%s".', $output)); } @@ -66,7 +66,7 @@ class Logger extends AbstractLogger /** * {@inheritdoc} */ - public function log($level, $message, array $context = array()) + public function log($level, $message, array $context = []) { if (!isset(self::$levels[$level])) { throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level)); @@ -90,7 +90,7 @@ class Logger extends AbstractLogger private function format($level, $message, array $context) { if (false !== strpos($message, '{')) { - $replacements = array(); + $replacements = []; foreach ($context as $key => $val) { if (null === $val || is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) { $replacements["{{$key}}"] = $val; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php index 8bb57cf3..810e2fe6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php @@ -54,13 +54,13 @@ class FileProfilerStorage implements ProfilerStorageInterface $file = $this->getIndexFilename(); if (!file_exists($file)) { - return array(); + return []; } $file = fopen($file, 'r'); fseek($file, 0, SEEK_END); - $result = array(); + $result = []; while (\count($result) < $limit && $line = $this->readLineFromFile($file)) { $values = str_getcsv($line); list($csvToken, $csvIp, $csvMethod, $csvUrl, $csvTime, $csvParent, $csvStatusCode) = $values; @@ -78,7 +78,7 @@ class FileProfilerStorage implements ProfilerStorageInterface continue; } - $result[$csvToken] = array( + $result[$csvToken] = [ 'token' => $csvToken, 'ip' => $csvIp, 'method' => $csvMethod, @@ -86,7 +86,7 @@ class FileProfilerStorage implements ProfilerStorageInterface 'time' => $csvTime, 'parent' => $csvParent, 'status_code' => $csvStatusCode, - ); + ]; } fclose($file); @@ -151,7 +151,7 @@ class FileProfilerStorage implements ProfilerStorageInterface }, $profile->getChildren())); // Store profile - $data = array( + $data = [ 'token' => $profileToken, 'parent' => $parentToken, 'children' => $childrenToken, @@ -161,7 +161,7 @@ class FileProfilerStorage implements ProfilerStorageInterface 'url' => $profile->getUrl(), 'time' => $profile->getTime(), 'status_code' => $profile->getStatusCode(), - ); + ]; if (false === file_put_contents($file, serialize($data))) { return false; @@ -173,7 +173,7 @@ class FileProfilerStorage implements ProfilerStorageInterface return false; } - fputcsv($file, array( + fputcsv($file, [ $profile->getToken(), $profile->getIp(), $profile->getMethod(), @@ -181,7 +181,7 @@ class FileProfilerStorage implements ProfilerStorageInterface $profile->getTime(), $profile->getParentToken(), $profile->getStatusCode(), - )); + ]); fclose($file); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/Profile.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/Profile.php index 9216f09e..c4490bc7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/Profile.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/Profile.php @@ -25,7 +25,7 @@ class Profile /** * @var DataCollectorInterface[] */ - private $collectors = array(); + private $collectors = []; private $ip; private $method; @@ -41,7 +41,7 @@ class Profile /** * @var Profile[] */ - private $children = array(); + private $children = []; /** * @param string $token The token @@ -74,7 +74,7 @@ class Profile /** * Sets the parent token. */ - public function setParent(Profile $parent) + public function setParent(self $parent) { $this->parent = $parent; } @@ -204,7 +204,7 @@ class Profile */ public function setChildren(array $children) { - $this->children = array(); + $this->children = []; foreach ($children as $child) { $this->addChild($child); } @@ -213,7 +213,7 @@ class Profile /** * Adds the child token. */ - public function addChild(Profile $child) + public function addChild(self $child) { $this->children[] = $child; $child->setParent($this); @@ -254,7 +254,7 @@ class Profile */ public function setCollectors(array $collectors) { - $this->collectors = array(); + $this->collectors = []; foreach ($collectors as $collector) { $this->addCollector($collector); } @@ -282,6 +282,6 @@ class Profile public function __sleep() { - return array('token', 'parent', 'children', 'collectors', 'ip', 'method', 'url', 'time', 'statusCode'); + return ['token', 'parent', 'children', 'collectors', 'ip', 'method', 'url', 'time', 'statusCode']; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/Profiler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/Profiler.php index f252da47..edf6cb83 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/Profiler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/Profiler.php @@ -30,7 +30,7 @@ class Profiler /** * @var DataCollectorInterface[] */ - private $collectors = array(); + private $collectors = []; private $logger; private $initiallyEnabled = true; @@ -103,7 +103,7 @@ class Profiler } if (!($ret = $this->storage->write($profile)) && null !== $this->logger) { - $this->logger->warning('Unable to store the profiler information.', array('configured_storage' => \get_class($this->storage))); + $this->logger->warning('Unable to store the profiler information.', ['configured_storage' => \get_class($this->storage)]); } return $ret; @@ -198,9 +198,9 @@ class Profiler * * @param DataCollectorInterface[] $collectors An array of collectors */ - public function set(array $collectors = array()) + public function set(array $collectors = []) { - $this->collectors = array(); + $this->collectors = []; foreach ($collectors as $collector) { $this->add($collector); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheClearer/ChainCacheClearerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheClearer/ChainCacheClearerTest.php index ec2ecff9..a7093dfc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheClearer/ChainCacheClearerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheClearer/ChainCacheClearerTest.php @@ -35,7 +35,7 @@ class ChainCacheClearerTest extends TestCase ->expects($this->once()) ->method('clear'); - $chainClearer = new ChainCacheClearer(array($clearer)); + $chainClearer = new ChainCacheClearer([$clearer]); $chainClearer->clear(self::$cacheDir); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheClearer/Psr6CacheClearerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheClearer/Psr6CacheClearerTest.php index b3bed4e8..297ede6a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheClearer/Psr6CacheClearerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheClearer/Psr6CacheClearerTest.php @@ -24,7 +24,7 @@ class Psr6CacheClearerTest extends TestCase ->expects($this->once()) ->method('clear'); - (new Psr6CacheClearer(array('pool' => $pool)))->clear(''); + (new Psr6CacheClearer(['pool' => $pool]))->clear(''); } public function testClearPool() @@ -34,7 +34,7 @@ class Psr6CacheClearerTest extends TestCase ->expects($this->once()) ->method('clear'); - (new Psr6CacheClearer(array('pool' => $pool)))->clearPool('pool'); + (new Psr6CacheClearer(['pool' => $pool]))->clearPool('pool'); } /** @@ -62,7 +62,7 @@ class Psr6CacheClearerTest extends TestCase ->expects($this->once()) ->method('clear'); - $clearer = new Psr6CacheClearer(array('pool1' => $pool1)); + $clearer = new Psr6CacheClearer(['pool1' => $pool1]); $clearer->addPool($pool2); $clearer->clear(''); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php index ba159124..de15c6f3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php @@ -34,7 +34,7 @@ class CacheWarmerAggregateTest extends TestCase $warmer ->expects($this->once()) ->method('warmUp'); - $aggregate = new CacheWarmerAggregate(array($warmer)); + $aggregate = new CacheWarmerAggregate([$warmer]); $aggregate->warmUp(self::$cacheDir); } @@ -62,7 +62,7 @@ class CacheWarmerAggregateTest extends TestCase ->expects($this->once()) ->method('warmUp'); $aggregate = new CacheWarmerAggregate(); - $aggregate->setWarmers(array($warmer)); + $aggregate->setWarmers([$warmer]); $aggregate->warmUp(self::$cacheDir); } @@ -76,7 +76,7 @@ class CacheWarmerAggregateTest extends TestCase ->expects($this->once()) ->method('warmUp'); - $aggregate = new CacheWarmerAggregate(array($warmer)); + $aggregate = new CacheWarmerAggregate([$warmer]); $aggregate->enableOptionalWarmers(); $aggregate->warmUp(self::$cacheDir); } @@ -92,7 +92,7 @@ class CacheWarmerAggregateTest extends TestCase ->expects($this->never()) ->method('warmUp'); - $aggregate = new CacheWarmerAggregate(array($warmer)); + $aggregate = new CacheWarmerAggregate([$warmer]); $aggregate->warmUp(self::$cacheDir); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/ClientTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/ClientTest.php index 5af27308..ac1c55ad 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/ClientTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/ClientTest.php @@ -70,7 +70,7 @@ class ClientTest extends TestCase $response->headers->setCookie($cookie2 = new Cookie('foo1', 'bar1', \DateTime::createFromFormat('j-M-Y H:i:s T', '15-Feb-2009 20:00:00 GMT')->format('U'), '/foo', 'http://example.com', true, true)); $domResponse = $m->invoke($client, $response); $this->assertSame((string) $cookie1, $domResponse->getHeader('Set-Cookie')); - $this->assertSame(array((string) $cookie1, (string) $cookie2), $domResponse->getHeader('Set-Cookie', false)); + $this->assertSame([(string) $cookie1, (string) $cookie2], $domResponse->getHeader('Set-Cookie', false)); } public function testFilterResponseSupportsStreamedResponses() @@ -99,14 +99,14 @@ class ClientTest extends TestCase $kernel = new TestHttpKernel(); $client = new Client($kernel); - $files = array( - array('tmp_name' => $source, 'name' => 'original', 'type' => 'mime/original', 'size' => 1, 'error' => UPLOAD_ERR_OK), + $files = [ + ['tmp_name' => $source, 'name' => 'original', 'type' => 'mime/original', 'size' => 1, 'error' => UPLOAD_ERR_OK], new UploadedFile($source, 'original', 'mime/original', 1, UPLOAD_ERR_OK, true), - ); + ]; $file = null; foreach ($files as $file) { - $client->request('POST', '/', array(), array('foo' => $file)); + $client->request('POST', '/', [], ['foo' => $file]); $files = $client->getRequest()->files->all(); @@ -131,9 +131,9 @@ class ClientTest extends TestCase $kernel = new TestHttpKernel(); $client = new Client($kernel); - $file = array('tmp_name' => '', 'name' => '', 'type' => '', 'size' => 0, 'error' => UPLOAD_ERR_NO_FILE); + $file = ['tmp_name' => '', 'name' => '', 'type' => '', 'size' => 0, 'error' => UPLOAD_ERR_NO_FILE]; - $client->request('POST', '/', array(), array('foo' => $file)); + $client->request('POST', '/', [], ['foo' => $file]); $files = $client->getRequest()->files->all(); @@ -150,8 +150,8 @@ class ClientTest extends TestCase $file = $this ->getMockBuilder('Symfony\Component\HttpFoundation\File\UploadedFile') - ->setConstructorArgs(array($source, 'original', 'mime/original', 123, UPLOAD_ERR_OK, true)) - ->setMethods(array('getSize')) + ->setConstructorArgs([$source, 'original', 'mime/original', 123, UPLOAD_ERR_OK, true]) + ->setMethods(['getSize']) ->getMock() ; @@ -160,7 +160,7 @@ class ClientTest extends TestCase ->will($this->returnValue(INF)) ; - $client->request('POST', '/', array(), array($file)); + $client->request('POST', '/', [], [$file]); $files = $client->getRequest()->files->all(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Config/EnvParametersResourceTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Config/EnvParametersResourceTest.php index 986e05d8..a1bf5295 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Config/EnvParametersResourceTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Config/EnvParametersResourceTest.php @@ -25,10 +25,10 @@ class EnvParametersResourceTest extends TestCase protected function setUp() { - $this->initialEnv = array( + $this->initialEnv = [ $this->prefix.'1' => 'foo', $this->prefix.'2' => 'bar', - ); + ]; foreach ($this->initialEnv as $key => $value) { $_SERVER[$key] = $value; @@ -49,7 +49,7 @@ class EnvParametersResourceTest extends TestCase public function testGetResource() { $this->assertSame( - array('prefix' => $this->prefix, 'variables' => $this->initialEnv), + ['prefix' => $this->prefix, 'variables' => $this->initialEnv], $this->resource->getResource(), '->getResource() returns the resource' ); @@ -58,7 +58,7 @@ class EnvParametersResourceTest extends TestCase public function testToString() { $this->assertSame( - serialize(array('prefix' => $this->prefix, 'variables' => $this->initialEnv)), + serialize(['prefix' => $this->prefix, 'variables' => $this->initialEnv]), (string) $this->resource ); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php index f6a36896..2c43e5b1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php @@ -21,86 +21,86 @@ class ServiceValueResolverTest extends TestCase { public function testDoNotSupportWhenControllerDoNotExists() { - $resolver = new ServiceValueResolver(new ServiceLocator(array())); + $resolver = new ServiceValueResolver(new ServiceLocator([])); $argument = new ArgumentMetadata('dummy', DummyService::class, false, false, null); - $request = $this->requestWithAttributes(array('_controller' => 'my_controller')); + $request = $this->requestWithAttributes(['_controller' => 'my_controller']); $this->assertFalse($resolver->supports($request, $argument)); } public function testExistingController() { - $resolver = new ServiceValueResolver(new ServiceLocator(array( + $resolver = new ServiceValueResolver(new ServiceLocator([ 'App\\Controller\\Mine::method' => function () { - return new ServiceLocator(array( + return new ServiceLocator([ 'dummy' => function () { return new DummyService(); }, - )); + ]); }, - ))); + ])); - $request = $this->requestWithAttributes(array('_controller' => 'App\\Controller\\Mine::method')); + $request = $this->requestWithAttributes(['_controller' => 'App\\Controller\\Mine::method']); $argument = new ArgumentMetadata('dummy', DummyService::class, false, false, null); $this->assertTrue($resolver->supports($request, $argument)); - $this->assertYieldEquals(array(new DummyService()), $resolver->resolve($request, $argument)); + $this->assertYieldEquals([new DummyService()], $resolver->resolve($request, $argument)); } public function testExistingControllerWithATrailingBackSlash() { - $resolver = new ServiceValueResolver(new ServiceLocator(array( + $resolver = new ServiceValueResolver(new ServiceLocator([ 'App\\Controller\\Mine::method' => function () { - return new ServiceLocator(array( + return new ServiceLocator([ 'dummy' => function () { return new DummyService(); }, - )); + ]); }, - ))); + ])); - $request = $this->requestWithAttributes(array('_controller' => '\\App\\Controller\\Mine::method')); + $request = $this->requestWithAttributes(['_controller' => '\\App\\Controller\\Mine::method']); $argument = new ArgumentMetadata('dummy', DummyService::class, false, false, null); $this->assertTrue($resolver->supports($request, $argument)); - $this->assertYieldEquals(array(new DummyService()), $resolver->resolve($request, $argument)); + $this->assertYieldEquals([new DummyService()], $resolver->resolve($request, $argument)); } public function testExistingControllerWithMethodNameStartUppercase() { - $resolver = new ServiceValueResolver(new ServiceLocator(array( + $resolver = new ServiceValueResolver(new ServiceLocator([ 'App\\Controller\\Mine::method' => function () { - return new ServiceLocator(array( + return new ServiceLocator([ 'dummy' => function () { return new DummyService(); }, - )); + ]); }, - ))); - $request = $this->requestWithAttributes(array('_controller' => 'App\\Controller\\Mine::Method')); + ])); + $request = $this->requestWithAttributes(['_controller' => 'App\\Controller\\Mine::Method']); $argument = new ArgumentMetadata('dummy', DummyService::class, false, false, null); $this->assertTrue($resolver->supports($request, $argument)); - $this->assertYieldEquals(array(new DummyService()), $resolver->resolve($request, $argument)); + $this->assertYieldEquals([new DummyService()], $resolver->resolve($request, $argument)); } public function testControllerNameIsAnArray() { - $resolver = new ServiceValueResolver(new ServiceLocator(array( + $resolver = new ServiceValueResolver(new ServiceLocator([ 'App\\Controller\\Mine::method' => function () { - return new ServiceLocator(array( + return new ServiceLocator([ 'dummy' => function () { return new DummyService(); }, - )); + ]); }, - ))); + ])); - $request = $this->requestWithAttributes(array('_controller' => array('App\\Controller\\Mine', 'method'))); + $request = $this->requestWithAttributes(['_controller' => ['App\\Controller\\Mine', 'method']]); $argument = new ArgumentMetadata('dummy', DummyService::class, false, false, null); $this->assertTrue($resolver->supports($request, $argument)); - $this->assertYieldEquals(array(new DummyService()), $resolver->resolve($request, $argument)); + $this->assertYieldEquals([new DummyService()], $resolver->resolve($request, $argument)); } private function requestWithAttributes(array $attributes) @@ -116,7 +116,7 @@ class ServiceValueResolverTest extends TestCase private function assertYieldEquals(array $expected, \Generator $generator) { - $args = array(); + $args = []; foreach ($generator as $arg) { $args[] = $arg; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php index 729b90b2..8c900fb9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php @@ -40,33 +40,33 @@ class ArgumentResolverTest extends TestCase public function testDefaultState() { $this->assertEquals(self::$resolver, new ArgumentResolver()); - $this->assertNotEquals(self::$resolver, new ArgumentResolver(null, array(new RequestAttributeValueResolver()))); + $this->assertNotEquals(self::$resolver, new ArgumentResolver(null, [new RequestAttributeValueResolver()])); } public function testGetArguments() { $request = Request::create('/'); $request->attributes->set('foo', 'foo'); - $controller = array(new self(), 'controllerWithFoo'); + $controller = [new self(), 'controllerWithFoo']; - $this->assertEquals(array('foo'), self::$resolver->getArguments($request, $controller), '->getArguments() returns an array of arguments for the controller method'); + $this->assertEquals(['foo'], self::$resolver->getArguments($request, $controller), '->getArguments() returns an array of arguments for the controller method'); } public function testGetArgumentsReturnsEmptyArrayWhenNoArguments() { $request = Request::create('/'); - $controller = array(new self(), 'controllerWithoutArguments'); + $controller = [new self(), 'controllerWithoutArguments']; - $this->assertEquals(array(), self::$resolver->getArguments($request, $controller), '->getArguments() returns an empty array if the method takes no arguments'); + $this->assertEquals([], self::$resolver->getArguments($request, $controller), '->getArguments() returns an empty array if the method takes no arguments'); } public function testGetArgumentsUsesDefaultValue() { $request = Request::create('/'); $request->attributes->set('foo', 'foo'); - $controller = array(new self(), 'controllerWithFooAndDefaultBar'); + $controller = [new self(), 'controllerWithFooAndDefaultBar']; - $this->assertEquals(array('foo', null), self::$resolver->getArguments($request, $controller), '->getArguments() uses default values if present'); + $this->assertEquals(['foo', null], self::$resolver->getArguments($request, $controller), '->getArguments() uses default values if present'); } public function testGetArgumentsOverrideDefaultValueByRequestAttribute() @@ -74,9 +74,9 @@ class ArgumentResolverTest extends TestCase $request = Request::create('/'); $request->attributes->set('foo', 'foo'); $request->attributes->set('bar', 'bar'); - $controller = array(new self(), 'controllerWithFooAndDefaultBar'); + $controller = [new self(), 'controllerWithFooAndDefaultBar']; - $this->assertEquals(array('foo', 'bar'), self::$resolver->getArguments($request, $controller), '->getArguments() overrides default values if provided in the request attributes'); + $this->assertEquals(['foo', 'bar'], self::$resolver->getArguments($request, $controller), '->getArguments() overrides default values if provided in the request attributes'); } public function testGetArgumentsFromClosure() @@ -85,7 +85,7 @@ class ArgumentResolverTest extends TestCase $request->attributes->set('foo', 'foo'); $controller = function ($foo) {}; - $this->assertEquals(array('foo'), self::$resolver->getArguments($request, $controller)); + $this->assertEquals(['foo'], self::$resolver->getArguments($request, $controller)); } public function testGetArgumentsUsesDefaultValueFromClosure() @@ -94,7 +94,7 @@ class ArgumentResolverTest extends TestCase $request->attributes->set('foo', 'foo'); $controller = function ($foo, $bar = 'bar') {}; - $this->assertEquals(array('foo', 'bar'), self::$resolver->getArguments($request, $controller)); + $this->assertEquals(['foo', 'bar'], self::$resolver->getArguments($request, $controller)); } public function testGetArgumentsFromInvokableObject() @@ -103,12 +103,12 @@ class ArgumentResolverTest extends TestCase $request->attributes->set('foo', 'foo'); $controller = new self(); - $this->assertEquals(array('foo', null), self::$resolver->getArguments($request, $controller)); + $this->assertEquals(['foo', null], self::$resolver->getArguments($request, $controller)); // Test default bar overridden by request attribute $request->attributes->set('bar', 'bar'); - $this->assertEquals(array('foo', 'bar'), self::$resolver->getArguments($request, $controller)); + $this->assertEquals(['foo', 'bar'], self::$resolver->getArguments($request, $controller)); } public function testGetArgumentsFromFunctionName() @@ -118,7 +118,7 @@ class ArgumentResolverTest extends TestCase $request->attributes->set('foobar', 'foobar'); $controller = __NAMESPACE__.'\controller_function'; - $this->assertEquals(array('foo', 'foobar'), self::$resolver->getArguments($request, $controller)); + $this->assertEquals(['foo', 'foobar'], self::$resolver->getArguments($request, $controller)); } public function testGetArgumentsFailsOnUnresolvedValue() @@ -126,7 +126,7 @@ class ArgumentResolverTest extends TestCase $request = Request::create('/'); $request->attributes->set('foo', 'foo'); $request->attributes->set('foobar', 'foobar'); - $controller = array(new self(), 'controllerWithFooBarFoobar'); + $controller = [new self(), 'controllerWithFooBarFoobar']; try { self::$resolver->getArguments($request, $controller); @@ -139,17 +139,17 @@ class ArgumentResolverTest extends TestCase public function testGetArgumentsInjectsRequest() { $request = Request::create('/'); - $controller = array(new self(), 'controllerWithRequest'); + $controller = [new self(), 'controllerWithRequest']; - $this->assertEquals(array($request), self::$resolver->getArguments($request, $controller), '->getArguments() injects the request'); + $this->assertEquals([$request], self::$resolver->getArguments($request, $controller), '->getArguments() injects the request'); } public function testGetArgumentsInjectsExtendingRequest() { $request = ExtendingRequest::create('/'); - $controller = array(new self(), 'controllerWithExtendingRequest'); + $controller = [new self(), 'controllerWithExtendingRequest']; - $this->assertEquals(array($request), self::$resolver->getArguments($request, $controller), '->getArguments() injects the request when extended'); + $this->assertEquals([$request], self::$resolver->getArguments($request, $controller), '->getArguments() injects the request when extended'); } /** @@ -159,10 +159,10 @@ class ArgumentResolverTest extends TestCase { $request = Request::create('/'); $request->attributes->set('foo', 'foo'); - $request->attributes->set('bar', array('foo', 'bar')); - $controller = array(new VariadicController(), 'action'); + $request->attributes->set('bar', ['foo', 'bar']); + $controller = [new VariadicController(), 'action']; - $this->assertEquals(array('foo', 'foo', 'bar'), self::$resolver->getArguments($request, $controller)); + $this->assertEquals(['foo', 'foo', 'bar'], self::$resolver->getArguments($request, $controller)); } /** @@ -174,7 +174,7 @@ class ArgumentResolverTest extends TestCase $request = Request::create('/'); $request->attributes->set('foo', 'foo'); $request->attributes->set('bar', 'foo'); - $controller = array(new VariadicController(), 'action'); + $controller = [new VariadicController(), 'action']; self::$resolver->getArguments($request, $controller); } @@ -187,7 +187,7 @@ class ArgumentResolverTest extends TestCase { $factory = new ArgumentMetadataFactory(); $valueResolver = $this->getMockBuilder(ArgumentValueResolverInterface::class)->getMock(); - $resolver = new ArgumentResolver($factory, array($valueResolver)); + $resolver = new ArgumentResolver($factory, [$valueResolver]); $valueResolver->expects($this->any())->method('supports')->willReturn(true); $valueResolver->expects($this->any())->method('resolve')->willReturn('foo'); @@ -195,7 +195,7 @@ class ArgumentResolverTest extends TestCase $request = Request::create('/'); $request->attributes->set('foo', 'foo'); $request->attributes->set('bar', 'foo'); - $controller = array($this, 'controllerWithFooAndDefaultBar'); + $controller = [$this, 'controllerWithFooAndDefaultBar']; $resolver->getArguments($request, $controller); } @@ -205,7 +205,7 @@ class ArgumentResolverTest extends TestCase public function testIfExceptionIsThrownWhenMissingAnArgument() { $request = Request::create('/'); - $controller = array($this, 'controllerWithFoo'); + $controller = [$this, 'controllerWithFoo']; self::$resolver->getArguments($request, $controller); } @@ -219,9 +219,9 @@ class ArgumentResolverTest extends TestCase $request->attributes->set('foo', 'foo'); $request->attributes->set('bar', new \stdClass()); $request->attributes->set('mandatory', 'mandatory'); - $controller = array(new NullableController(), 'action'); + $controller = [new NullableController(), 'action']; - $this->assertEquals(array('foo', new \stdClass(), 'value', 'mandatory'), self::$resolver->getArguments($request, $controller)); + $this->assertEquals(['foo', new \stdClass(), 'value', 'mandatory'], self::$resolver->getArguments($request, $controller)); } /** @@ -231,9 +231,9 @@ class ArgumentResolverTest extends TestCase { $request = Request::create('/'); $request->attributes->set('mandatory', 'mandatory'); - $controller = array(new NullableController(), 'action'); + $controller = [new NullableController(), 'action']; - $this->assertEquals(array(null, null, 'value', 'mandatory'), self::$resolver->getArguments($request, $controller)); + $this->assertEquals([null, null, 'value', 'mandatory'], self::$resolver->getArguments($request, $controller)); } public function testGetSessionArguments() @@ -241,9 +241,9 @@ class ArgumentResolverTest extends TestCase $session = new Session(new MockArraySessionStorage()); $request = Request::create('/'); $request->setSession($session); - $controller = array($this, 'controllerWithSession'); + $controller = [$this, 'controllerWithSession']; - $this->assertEquals(array($session), self::$resolver->getArguments($request, $controller)); + $this->assertEquals([$session], self::$resolver->getArguments($request, $controller)); } public function testGetSessionArgumentsWithExtendedSession() @@ -251,9 +251,9 @@ class ArgumentResolverTest extends TestCase $session = new ExtendingSession(new MockArraySessionStorage()); $request = Request::create('/'); $request->setSession($session); - $controller = array($this, 'controllerWithExtendingSession'); + $controller = [$this, 'controllerWithExtendingSession']; - $this->assertEquals(array($session), self::$resolver->getArguments($request, $controller)); + $this->assertEquals([$session], self::$resolver->getArguments($request, $controller)); } public function testGetSessionArgumentsWithInterface() @@ -261,9 +261,9 @@ class ArgumentResolverTest extends TestCase $session = $this->getMockBuilder(SessionInterface::class)->getMock(); $request = Request::create('/'); $request->setSession($session); - $controller = array($this, 'controllerWithSessionInterface'); + $controller = [$this, 'controllerWithSessionInterface']; - $this->assertEquals(array($session), self::$resolver->getArguments($request, $controller)); + $this->assertEquals([$session], self::$resolver->getArguments($request, $controller)); } /** @@ -274,7 +274,7 @@ class ArgumentResolverTest extends TestCase $session = $this->getMockBuilder(SessionInterface::class)->getMock(); $request = Request::create('/'); $request->setSession($session); - $controller = array($this, 'controllerWithExtendingSession'); + $controller = [$this, 'controllerWithExtendingSession']; self::$resolver->getArguments($request, $controller); } @@ -287,7 +287,7 @@ class ArgumentResolverTest extends TestCase $session = new Session(new MockArraySessionStorage()); $request = Request::create('/'); $request->setSession($session); - $controller = array($this, 'controllerWithExtendingSession'); + $controller = [$this, 'controllerWithExtendingSession']; self::$resolver->getArguments($request, $controller); } @@ -298,7 +298,7 @@ class ArgumentResolverTest extends TestCase public function testGetSessionMissMatchOnNull() { $request = Request::create('/'); - $controller = array($this, 'controllerWithExtendingSession'); + $controller = [$this, 'controllerWithExtendingSession']; self::$resolver->getArguments($request, $controller); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php index 82407f56..3f130db0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php @@ -105,11 +105,11 @@ class ContainerControllerResolverTest extends ControllerResolverTest $resolver = $this->createControllerResolver(null, $container); $request = Request::create('/'); - $request->attributes->set('_controller', array(NonInstantiableController::class, 'action')); + $request->attributes->set('_controller', [NonInstantiableController::class, 'action']); $controller = $resolver->getController($request); - $this->assertSame(array(NonInstantiableController::class, 'action'), $controller); + $this->assertSame([NonInstantiableController::class, 'action'], $controller); } /** @@ -134,12 +134,12 @@ class ContainerControllerResolverTest extends ControllerResolverTest $container->expects($this->atLeastOnce()) ->method('getRemovedIds') ->with() - ->will($this->returnValue(array(ImpossibleConstructController::class => true))) + ->will($this->returnValue([ImpossibleConstructController::class => true])) ; $resolver = $this->createControllerResolver(null, $container); $request = Request::create('/'); - $request->attributes->set('_controller', array(ImpossibleConstructController::class, 'action')); + $request->attributes->set('_controller', [ImpossibleConstructController::class, 'action']); if (\PHP_VERSION_ID < 70100) { ErrorHandler::register(); @@ -172,11 +172,11 @@ class ContainerControllerResolverTest extends ControllerResolverTest $resolver = $this->createControllerResolver(null, $container); $request = Request::create('/'); - $request->attributes->set('_controller', array(NonInstantiableController::class, 'action')); + $request->attributes->set('_controller', [NonInstantiableController::class, 'action']); $controller = $resolver->getController($request); - $this->assertSame(array($service, 'action'), $controller); + $this->assertSame([$service, 'action'], $controller); } /** @@ -195,7 +195,7 @@ class ContainerControllerResolverTest extends ControllerResolverTest $container->expects($this->atLeastOnce()) ->method('getRemovedIds') ->with() - ->will($this->returnValue(array('app.my_controller' => true))) + ->will($this->returnValue(['app.my_controller' => true])) ; $resolver = $this->createControllerResolver(null, $container); @@ -251,16 +251,16 @@ class ContainerControllerResolverTest extends ControllerResolverTest public function getUndefinedControllers() { - return array( - array('foo', \LogicException::class, '/Controller not found: service "foo" does not exist\./'), - array('oof::bar', \InvalidArgumentException::class, '/Class "oof" does not exist\./'), - array('stdClass', \LogicException::class, '/Controller not found: service "stdClass" does not exist\./'), - array( + return [ + ['foo', \LogicException::class, '/Controller not found: service "foo" does not exist\./'], + ['oof::bar', \InvalidArgumentException::class, '/Class "oof" does not exist\./'], + ['stdClass', \LogicException::class, '/Controller not found: service "stdClass" does not exist\./'], + [ 'Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest::bar', \InvalidArgumentException::class, '/.?[cC]ontroller(.*?) for URI "\/" is not callable\.( Expected method(.*) Available methods)?/', - ), - ); + ], + ]; } protected function createControllerResolver(LoggerInterface $logger = null, ContainerInterface $container = null) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php index 87f598d1..728382ad 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php @@ -55,9 +55,9 @@ class ControllerResolverTest extends TestCase $resolver = $this->createControllerResolver(); $request = Request::create('/'); - $request->attributes->set('_controller', array($this, 'controllerMethod1')); + $request->attributes->set('_controller', [$this, 'controllerMethod1']); $controller = $resolver->getController($request); - $this->assertSame(array($this, 'controllerMethod1'), $controller); + $this->assertSame([$this, 'controllerMethod1'], $controller); } public function testGetControllerWithClassAndMethod() @@ -65,9 +65,9 @@ class ControllerResolverTest extends TestCase $resolver = $this->createControllerResolver(); $request = Request::create('/'); - $request->attributes->set('_controller', array('Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest', 'controllerMethod4')); + $request->attributes->set('_controller', ['Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest', 'controllerMethod4']); $controller = $resolver->getController($request); - $this->assertSame(array('Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest', 'controllerMethod4'), $controller); + $this->assertSame(['Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest', 'controllerMethod4'], $controller); } public function testGetControllerWithObjectAndMethodAsString() @@ -132,16 +132,16 @@ class ControllerResolverTest extends TestCase public function getUndefinedControllers() { - return array( - array(1, 'InvalidArgumentException', 'Unable to find controller "1".'), - array('foo', 'InvalidArgumentException', 'Unable to find controller "foo".'), - array('oof::bar', 'InvalidArgumentException', 'Class "oof" does not exist.'), - array('stdClass', 'InvalidArgumentException', 'Unable to find controller "stdClass".'), - array('Symfony\Component\HttpKernel\Tests\Controller\ControllerTest::staticsAction', 'InvalidArgumentException', 'The controller for URI "/" is not callable. Expected method "staticsAction" on class "Symfony\Component\HttpKernel\Tests\Controller\ControllerTest", did you mean "staticAction"?'), - array('Symfony\Component\HttpKernel\Tests\Controller\ControllerTest::privateAction', 'InvalidArgumentException', 'The controller for URI "/" is not callable. Method "privateAction" on class "Symfony\Component\HttpKernel\Tests\Controller\ControllerTest" should be public and non-abstract'), - array('Symfony\Component\HttpKernel\Tests\Controller\ControllerTest::protectedAction', 'InvalidArgumentException', 'The controller for URI "/" is not callable. Method "protectedAction" on class "Symfony\Component\HttpKernel\Tests\Controller\ControllerTest" should be public and non-abstract'), - array('Symfony\Component\HttpKernel\Tests\Controller\ControllerTest::undefinedAction', 'InvalidArgumentException', 'The controller for URI "/" is not callable. Expected method "undefinedAction" on class "Symfony\Component\HttpKernel\Tests\Controller\ControllerTest". Available methods: "publicAction", "staticAction"'), - ); + return [ + [1, 'InvalidArgumentException', 'Unable to find controller "1".'], + ['foo', 'InvalidArgumentException', 'Unable to find controller "foo".'], + ['oof::bar', 'InvalidArgumentException', 'Class "oof" does not exist.'], + ['stdClass', 'InvalidArgumentException', 'Unable to find controller "stdClass".'], + ['Symfony\Component\HttpKernel\Tests\Controller\ControllerTest::staticsAction', 'InvalidArgumentException', 'The controller for URI "/" is not callable. Expected method "staticsAction" on class "Symfony\Component\HttpKernel\Tests\Controller\ControllerTest", did you mean "staticAction"?'], + ['Symfony\Component\HttpKernel\Tests\Controller\ControllerTest::privateAction', 'InvalidArgumentException', 'The controller for URI "/" is not callable. Method "privateAction" on class "Symfony\Component\HttpKernel\Tests\Controller\ControllerTest" should be public and non-abstract'], + ['Symfony\Component\HttpKernel\Tests\Controller\ControllerTest::protectedAction', 'InvalidArgumentException', 'The controller for URI "/" is not callable. Method "protectedAction" on class "Symfony\Component\HttpKernel\Tests\Controller\ControllerTest" should be public and non-abstract'], + ['Symfony\Component\HttpKernel\Tests\Controller\ControllerTest::undefinedAction', 'InvalidArgumentException', 'The controller for URI "/" is not callable. Expected method "undefinedAction" on class "Symfony\Component\HttpKernel\Tests\Controller\ControllerTest". Available methods: "publicAction", "staticAction"'], + ]; } /** @@ -152,49 +152,49 @@ class ControllerResolverTest extends TestCase $resolver = $this->createControllerResolver(); $request = Request::create('/'); - $controller = array(new self(), 'testGetArguments'); - $this->assertEquals(array(), $resolver->getArguments($request, $controller), '->getArguments() returns an empty array if the method takes no arguments'); + $controller = [new self(), 'testGetArguments']; + $this->assertEquals([], $resolver->getArguments($request, $controller), '->getArguments() returns an empty array if the method takes no arguments'); $request = Request::create('/'); $request->attributes->set('foo', 'foo'); - $controller = array(new self(), 'controllerMethod1'); - $this->assertEquals(array('foo'), $resolver->getArguments($request, $controller), '->getArguments() returns an array of arguments for the controller method'); + $controller = [new self(), 'controllerMethod1']; + $this->assertEquals(['foo'], $resolver->getArguments($request, $controller), '->getArguments() returns an array of arguments for the controller method'); $request = Request::create('/'); $request->attributes->set('foo', 'foo'); - $controller = array(new self(), 'controllerMethod2'); - $this->assertEquals(array('foo', null), $resolver->getArguments($request, $controller), '->getArguments() uses default values if present'); + $controller = [new self(), 'controllerMethod2']; + $this->assertEquals(['foo', null], $resolver->getArguments($request, $controller), '->getArguments() uses default values if present'); $request->attributes->set('bar', 'bar'); - $this->assertEquals(array('foo', 'bar'), $resolver->getArguments($request, $controller), '->getArguments() overrides default values if provided in the request attributes'); + $this->assertEquals(['foo', 'bar'], $resolver->getArguments($request, $controller), '->getArguments() overrides default values if provided in the request attributes'); $request = Request::create('/'); $request->attributes->set('foo', 'foo'); $controller = function ($foo) {}; - $this->assertEquals(array('foo'), $resolver->getArguments($request, $controller)); + $this->assertEquals(['foo'], $resolver->getArguments($request, $controller)); $request = Request::create('/'); $request->attributes->set('foo', 'foo'); $controller = function ($foo, $bar = 'bar') {}; - $this->assertEquals(array('foo', 'bar'), $resolver->getArguments($request, $controller)); + $this->assertEquals(['foo', 'bar'], $resolver->getArguments($request, $controller)); $request = Request::create('/'); $request->attributes->set('foo', 'foo'); $controller = new self(); - $this->assertEquals(array('foo', null), $resolver->getArguments($request, $controller)); + $this->assertEquals(['foo', null], $resolver->getArguments($request, $controller)); $request->attributes->set('bar', 'bar'); - $this->assertEquals(array('foo', 'bar'), $resolver->getArguments($request, $controller)); + $this->assertEquals(['foo', 'bar'], $resolver->getArguments($request, $controller)); $request = Request::create('/'); $request->attributes->set('foo', 'foo'); $request->attributes->set('foobar', 'foobar'); $controller = 'Symfony\Component\HttpKernel\Tests\Controller\some_controller_function'; - $this->assertEquals(array('foo', 'foobar'), $resolver->getArguments($request, $controller)); + $this->assertEquals(['foo', 'foobar'], $resolver->getArguments($request, $controller)); $request = Request::create('/'); $request->attributes->set('foo', 'foo'); $request->attributes->set('foobar', 'foobar'); - $controller = array(new self(), 'controllerMethod3'); + $controller = [new self(), 'controllerMethod3']; try { $resolver->getArguments($request, $controller); @@ -204,8 +204,8 @@ class ControllerResolverTest extends TestCase } $request = Request::create('/'); - $controller = array(new self(), 'controllerMethod5'); - $this->assertEquals(array($request), $resolver->getArguments($request, $controller), '->getArguments() injects the request'); + $controller = [new self(), 'controllerMethod5']; + $this->assertEquals([$request], $resolver->getArguments($request, $controller), '->getArguments() injects the request'); } /** @@ -218,14 +218,14 @@ class ControllerResolverTest extends TestCase $request = Request::create('/'); $request->attributes->set('foo', 'foo'); - $request->attributes->set('bar', array('foo', 'bar')); - $controller = array(new VariadicController(), 'action'); - $this->assertEquals(array('foo', 'foo', 'bar'), $resolver->getArguments($request, $controller)); + $request->attributes->set('bar', ['foo', 'bar']); + $controller = [new VariadicController(), 'action']; + $this->assertEquals(['foo', 'foo', 'bar'], $resolver->getArguments($request, $controller)); } public function testCreateControllerCanReturnAnyCallable() { - $mock = $this->getMockBuilder('Symfony\Component\HttpKernel\Controller\ControllerResolver')->setMethods(array('createController'))->getMock(); + $mock = $this->getMockBuilder('Symfony\Component\HttpKernel\Controller\ControllerResolver')->setMethods(['createController'])->getMock(); $mock->expects($this->once())->method('createController')->will($this->returnValue('Symfony\Component\HttpKernel\Tests\Controller\some_controller_function')); $request = Request::create('/'); @@ -242,7 +242,7 @@ class ControllerResolverTest extends TestCase $resolver = new ControllerResolver(); $request = Request::create('/'); - $controller = array($this, 'controllerMethod1'); + $controller = [$this, 'controllerMethod1']; $resolver->getArguments($request, $controller); } @@ -259,8 +259,8 @@ class ControllerResolverTest extends TestCase $request->attributes->set('foo', 'foo'); $request->attributes->set('bar', new \stdClass()); $request->attributes->set('mandatory', 'mandatory'); - $controller = array(new NullableController(), 'action'); - $this->assertEquals(array('foo', new \stdClass(), 'value', 'mandatory'), $resolver->getArguments($request, $controller)); + $controller = [new NullableController(), 'action']; + $this->assertEquals(['foo', new \stdClass(), 'value', 'mandatory'], $resolver->getArguments($request, $controller)); } /** @@ -273,8 +273,8 @@ class ControllerResolverTest extends TestCase $request = Request::create('/'); $request->attributes->set('mandatory', 'mandatory'); - $controller = array(new NullableController(), 'action'); - $this->assertEquals(array(null, null, 'value', 'mandatory'), $resolver->getArguments($request, $controller)); + $controller = [new NullableController(), 'action']; + $this->assertEquals([null, null, 'value', 'mandatory'], $resolver->getArguments($request, $controller)); } protected function createControllerResolver(LoggerInterface $logger = null) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php index bf0db5ad..1c0c4648 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php @@ -33,55 +33,55 @@ class ArgumentMetadataFactoryTest extends TestCase public function testSignature1() { - $arguments = $this->factory->createArgumentMetadata(array($this, 'signature1')); + $arguments = $this->factory->createArgumentMetadata([$this, 'signature1']); - $this->assertEquals(array( + $this->assertEquals([ new ArgumentMetadata('foo', self::class, false, false, null), new ArgumentMetadata('bar', 'array', false, false, null), new ArgumentMetadata('baz', 'callable', false, false, null), - ), $arguments); + ], $arguments); } public function testSignature2() { - $arguments = $this->factory->createArgumentMetadata(array($this, 'signature2')); + $arguments = $this->factory->createArgumentMetadata([$this, 'signature2']); - $this->assertEquals(array( + $this->assertEquals([ new ArgumentMetadata('foo', self::class, false, true, null, true), new ArgumentMetadata('bar', __NAMESPACE__.'\FakeClassThatDoesNotExist', false, true, null, true), new ArgumentMetadata('baz', 'Fake\ImportedAndFake', false, true, null, true), - ), $arguments); + ], $arguments); } public function testSignature3() { - $arguments = $this->factory->createArgumentMetadata(array($this, 'signature3')); + $arguments = $this->factory->createArgumentMetadata([$this, 'signature3']); - $this->assertEquals(array( + $this->assertEquals([ new ArgumentMetadata('bar', __NAMESPACE__.'\FakeClassThatDoesNotExist', false, false, null), new ArgumentMetadata('baz', 'Fake\ImportedAndFake', false, false, null), - ), $arguments); + ], $arguments); } public function testSignature4() { - $arguments = $this->factory->createArgumentMetadata(array($this, 'signature4')); + $arguments = $this->factory->createArgumentMetadata([$this, 'signature4']); - $this->assertEquals(array( + $this->assertEquals([ new ArgumentMetadata('foo', null, false, true, 'default'), new ArgumentMetadata('bar', null, false, true, 500), - new ArgumentMetadata('baz', null, false, true, array()), - ), $arguments); + new ArgumentMetadata('baz', null, false, true, []), + ], $arguments); } public function testSignature5() { - $arguments = $this->factory->createArgumentMetadata(array($this, 'signature5')); + $arguments = $this->factory->createArgumentMetadata([$this, 'signature5']); - $this->assertEquals(array( + $this->assertEquals([ new ArgumentMetadata('foo', 'array', false, true, null, true), new ArgumentMetadata('bar', null, false, false, null), - ), $arguments); + ], $arguments); } /** @@ -89,12 +89,12 @@ class ArgumentMetadataFactoryTest extends TestCase */ public function testVariadicSignature() { - $arguments = $this->factory->createArgumentMetadata(array(new VariadicController(), 'action')); + $arguments = $this->factory->createArgumentMetadata([new VariadicController(), 'action']); - $this->assertEquals(array( + $this->assertEquals([ new ArgumentMetadata('foo', null, false, false, null), new ArgumentMetadata('bar', null, true, false, null), - ), $arguments); + ], $arguments); } /** @@ -102,13 +102,13 @@ class ArgumentMetadataFactoryTest extends TestCase */ public function testBasicTypesSignature() { - $arguments = $this->factory->createArgumentMetadata(array(new BasicTypesController(), 'action')); + $arguments = $this->factory->createArgumentMetadata([new BasicTypesController(), 'action']); - $this->assertEquals(array( + $this->assertEquals([ new ArgumentMetadata('foo', 'string', false, false, null), new ArgumentMetadata('bar', 'int', false, false, null), new ArgumentMetadata('baz', 'float', false, false, null), - ), $arguments); + ], $arguments); } /** @@ -116,14 +116,14 @@ class ArgumentMetadataFactoryTest extends TestCase */ public function testNullableTypesSignature() { - $arguments = $this->factory->createArgumentMetadata(array(new NullableController(), 'action')); + $arguments = $this->factory->createArgumentMetadata([new NullableController(), 'action']); - $this->assertEquals(array( + $this->assertEquals([ new ArgumentMetadata('foo', 'string', false, false, null, true), new ArgumentMetadata('bar', \stdClass::class, false, false, null, true), new ArgumentMetadata('baz', 'string', false, true, 'value', true), new ArgumentMetadata('mandatory', null, false, false, null, true), - ), $arguments); + ], $arguments); } private function signature1(self $foo, array $bar, callable $baz) @@ -138,7 +138,7 @@ class ArgumentMetadataFactoryTest extends TestCase { } - private function signature4($foo = 'default', $bar = 500, $baz = array()) + private function signature4($foo = 'default', $bar = 500, $baz = []) { } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php index 3f51b13c..a858eabe 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php @@ -57,7 +57,7 @@ class KernelForTest extends Kernel public function getBundles() { - return array(); + return []; } public function registerContainerConfiguration(LoaderInterface $loader) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php index 54fd39e0..ae79a3c9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php @@ -30,7 +30,7 @@ class DataCollectorTest extends TestCase public function testCloneVarExistingFilePath() { - $c = new CloneVarDataCollector(array($filePath = tempnam(sys_get_temp_dir(), 'clone_var_data_collector_'))); + $c = new CloneVarDataCollector([$filePath = tempnam(sys_get_temp_dir(), 'clone_var_data_collector_')]); $c->collect(new Request(), new Response()); $this->assertSame($filePath, $c->getData()[0]); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/DumpDataCollectorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/DumpDataCollectorTest.php index fd5ea11e..ebe50e37 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/DumpDataCollectorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/DumpDataCollectorTest.php @@ -25,7 +25,7 @@ class DumpDataCollectorTest extends TestCase { public function testDump() { - $data = new Data(array(array(123))); + $data = new Data([[123]]); $collector = new DumpDataCollector(); @@ -40,15 +40,15 @@ class DumpDataCollectorTest extends TestCase $dump[0]['data'] = preg_replace('/^.*?
     "
    123\n
    \n", 'name' => 'DumpDataCollectorTest.php', 'file' => __FILE__, 'line' => $line, 'fileExcerpt' => false, - ), - ); + ], + ]; $this->assertEquals($xDump, $dump); $this->assertStringMatchesFormat('a:3:{i:0;a:5:{s:4:"data";%c:39:"Symfony\Component\VarDumper\Cloner\Data":%a', $collector->serialize()); @@ -58,7 +58,7 @@ class DumpDataCollectorTest extends TestCase public function testCollectDefault() { - $data = new Data(array(array(123))); + $data = new Data([[123]]); $collector = new DumpDataCollector(); @@ -76,7 +76,7 @@ class DumpDataCollectorTest extends TestCase public function testCollectHtml() { - $data = new Data(array(array(123))); + $data = new Data([[123]]); $collector = new DumpDataCollector(null, 'test://%f:%l'); @@ -104,7 +104,7 @@ EOTXT; public function testFlush() { - $data = new Data(array(array(456))); + $data = new Data([[456]]); $collector = new DumpDataCollector(); $collector->dump($data); $line = __LINE__ - 1; @@ -117,7 +117,7 @@ EOTXT; public function testFlushNothingWhenDataDumperIsProvided() { - $data = new Data(array(array(456))); + $data = new Data([[456]]); $dumper = new CliDumper('php://output'); $collector = new DumpDataCollector(null, null, null, null, $dumper); @@ -125,11 +125,8 @@ EOTXT; $collector->dump($data); $line = __LINE__ - 1; $output = preg_replace("/\033\[[^m]*m/", '', ob_get_clean()); - if (\PHP_VERSION_ID >= 50400) { - $this->assertSame("DumpDataCollectorTest.php on line {$line}:\n456\n", $output); - } else { - $this->assertSame("\"DumpDataCollectorTest.php on line {$line}:\"\n456\n", $output); - } + + $this->assertSame("DumpDataCollectorTest.php on line {$line}:\n456\n", $output); ob_start(); $collector->__destruct(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php index 3dec3bd7..90151ae4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php @@ -21,24 +21,24 @@ class LoggerDataCollectorTest extends TestCase { $logger = $this ->getMockBuilder('Symfony\Component\HttpKernel\Log\DebugLoggerInterface') - ->setMethods(array('countErrors', 'getLogs', 'clear')) + ->setMethods(['countErrors', 'getLogs', 'clear']) ->getMock(); $logger->expects($this->once())->method('countErrors')->will($this->returnValue('foo')); - $logger->expects($this->exactly(2))->method('getLogs')->will($this->returnValue(array())); + $logger->expects($this->exactly(2))->method('getLogs')->will($this->returnValue([])); $c = new LoggerDataCollector($logger, __DIR__.'/'); $c->lateCollect(); $compilerLogs = $c->getCompilerLogs()->getValue('message'); - $this->assertSame(array( - array('message' => 'Removed service "Psr\Container\ContainerInterface"; reason: private alias.'), - array('message' => 'Removed service "Symfony\Component\DependencyInjection\ContainerInterface"; reason: private alias.'), - ), $compilerLogs['Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass']); + $this->assertSame([ + ['message' => 'Removed service "Psr\Container\ContainerInterface"; reason: private alias.'], + ['message' => 'Removed service "Symfony\Component\DependencyInjection\ContainerInterface"; reason: private alias.'], + ], $compilerLogs['Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass']); - $this->assertSame(array( - array('message' => 'Some custom logging message'), - array('message' => 'With ending :'), - ), $compilerLogs['Unknown Compiler Pass']); + $this->assertSame([ + ['message' => 'Some custom logging message'], + ['message' => 'With ending :'], + ], $compilerLogs['Unknown Compiler Pass']); } /** @@ -48,7 +48,7 @@ class LoggerDataCollectorTest extends TestCase { $logger = $this ->getMockBuilder('Symfony\Component\HttpKernel\Log\DebugLoggerInterface') - ->setMethods(array('countErrors', 'getLogs', 'clear')) + ->setMethods(['countErrors', 'getLogs', 'clear']) ->getMock(); $logger->expects($this->once())->method('countErrors')->will($this->returnValue($nb)); $logger->expects($this->exactly(2))->method('getLogs')->will($this->returnValue($logs)); @@ -62,7 +62,7 @@ class LoggerDataCollectorTest extends TestCase $logs = array_map(function ($v) { if (isset($v['context']['exception'])) { $e = &$v['context']['exception']; - $e = isset($e["\0*\0message"]) ? array($e["\0*\0message"], $e["\0*\0severity"]) : array($e["\0Symfony\Component\Debug\Exception\SilencedErrorContext\0severity"]); + $e = isset($e["\0*\0message"]) ? [$e["\0*\0message"], $e["\0*\0severity"]] : [$e["\0Symfony\Component\Debug\Exception\SilencedErrorContext\0severity"]]; } return $v; @@ -80,7 +80,7 @@ class LoggerDataCollectorTest extends TestCase { $logger = $this ->getMockBuilder('Symfony\Component\HttpKernel\Log\DebugLoggerInterface') - ->setMethods(array('countErrors', 'getLogs', 'clear')) + ->setMethods(['countErrors', 'getLogs', 'clear']) ->getMock(); $logger->expects($this->once())->method('clear'); @@ -90,55 +90,55 @@ class LoggerDataCollectorTest extends TestCase public function getCollectTestData() { - yield 'simple log' => array( + yield 'simple log' => [ 1, - array(array('message' => 'foo', 'context' => array(), 'priority' => 100, 'priorityName' => 'DEBUG')), - array(array('message' => 'foo', 'context' => array(), 'priority' => 100, 'priorityName' => 'DEBUG')), + [['message' => 'foo', 'context' => [], 'priority' => 100, 'priorityName' => 'DEBUG']], + [['message' => 'foo', 'context' => [], 'priority' => 100, 'priorityName' => 'DEBUG']], 0, 0, - ); + ]; - yield 'log with a context' => array( + yield 'log with a context' => [ 1, - array(array('message' => 'foo', 'context' => array('foo' => 'bar'), 'priority' => 100, 'priorityName' => 'DEBUG')), - array(array('message' => 'foo', 'context' => array('foo' => 'bar'), 'priority' => 100, 'priorityName' => 'DEBUG')), + [['message' => 'foo', 'context' => ['foo' => 'bar'], 'priority' => 100, 'priorityName' => 'DEBUG']], + [['message' => 'foo', 'context' => ['foo' => 'bar'], 'priority' => 100, 'priorityName' => 'DEBUG']], 0, 0, - ); + ]; if (!class_exists(SilencedErrorContext::class)) { return; } - yield 'logs with some deprecations' => array( + yield 'logs with some deprecations' => [ 1, - array( - array('message' => 'foo3', 'context' => array('exception' => new \ErrorException('warning', 0, E_USER_WARNING)), 'priority' => 100, 'priorityName' => 'DEBUG'), - array('message' => 'foo', 'context' => array('exception' => new \ErrorException('deprecated', 0, E_DEPRECATED)), 'priority' => 100, 'priorityName' => 'DEBUG'), - array('message' => 'foo2', 'context' => array('exception' => new \ErrorException('deprecated', 0, E_USER_DEPRECATED)), 'priority' => 100, 'priorityName' => 'DEBUG'), - ), - array( - array('message' => 'foo3', 'context' => array('exception' => array('warning', E_USER_WARNING)), 'priority' => 100, 'priorityName' => 'DEBUG'), - array('message' => 'foo', 'context' => array('exception' => array('deprecated', E_DEPRECATED)), 'priority' => 100, 'priorityName' => 'DEBUG', 'errorCount' => 1, 'scream' => false), - array('message' => 'foo2', 'context' => array('exception' => array('deprecated', E_USER_DEPRECATED)), 'priority' => 100, 'priorityName' => 'DEBUG', 'errorCount' => 1, 'scream' => false), - ), + [ + ['message' => 'foo3', 'context' => ['exception' => new \ErrorException('warning', 0, E_USER_WARNING)], 'priority' => 100, 'priorityName' => 'DEBUG'], + ['message' => 'foo', 'context' => ['exception' => new \ErrorException('deprecated', 0, E_DEPRECATED)], 'priority' => 100, 'priorityName' => 'DEBUG'], + ['message' => 'foo2', 'context' => ['exception' => new \ErrorException('deprecated', 0, E_USER_DEPRECATED)], 'priority' => 100, 'priorityName' => 'DEBUG'], + ], + [ + ['message' => 'foo3', 'context' => ['exception' => ['warning', E_USER_WARNING]], 'priority' => 100, 'priorityName' => 'DEBUG'], + ['message' => 'foo', 'context' => ['exception' => ['deprecated', E_DEPRECATED]], 'priority' => 100, 'priorityName' => 'DEBUG', 'errorCount' => 1, 'scream' => false], + ['message' => 'foo2', 'context' => ['exception' => ['deprecated', E_USER_DEPRECATED]], 'priority' => 100, 'priorityName' => 'DEBUG', 'errorCount' => 1, 'scream' => false], + ], 2, 0, - array(100 => array('count' => 3, 'name' => 'DEBUG')), - ); + [100 => ['count' => 3, 'name' => 'DEBUG']], + ]; - yield 'logs with some silent errors' => array( + yield 'logs with some silent errors' => [ 1, - array( - array('message' => 'foo3', 'context' => array('exception' => new \ErrorException('warning', 0, E_USER_WARNING)), 'priority' => 100, 'priorityName' => 'DEBUG'), - array('message' => 'foo3', 'context' => array('exception' => new SilencedErrorContext(E_USER_WARNING, __FILE__, __LINE__)), 'priority' => 100, 'priorityName' => 'DEBUG'), - ), - array( - array('message' => 'foo3', 'context' => array('exception' => array('warning', E_USER_WARNING)), 'priority' => 100, 'priorityName' => 'DEBUG'), - array('message' => 'foo3', 'context' => array('exception' => array(E_USER_WARNING)), 'priority' => 100, 'priorityName' => 'DEBUG', 'errorCount' => 1, 'scream' => true), - ), + [ + ['message' => 'foo3', 'context' => ['exception' => new \ErrorException('warning', 0, E_USER_WARNING)], 'priority' => 100, 'priorityName' => 'DEBUG'], + ['message' => 'foo3', 'context' => ['exception' => new SilencedErrorContext(E_USER_WARNING, __FILE__, __LINE__)], 'priority' => 100, 'priorityName' => 'DEBUG'], + ], + [ + ['message' => 'foo3', 'context' => ['exception' => ['warning', E_USER_WARNING]], 'priority' => 100, 'priorityName' => 'DEBUG'], + ['message' => 'foo3', 'context' => ['exception' => [E_USER_WARNING]], 'priority' => 100, 'priorityName' => 'DEBUG', 'errorCount' => 1, 'scream' => true], + ], 0, 1, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php index 1435d05e..c434ed1e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php @@ -39,21 +39,21 @@ class MemoryDataCollectorTest extends TestCase public function getBytesConversionTestData() { - return array( - array('2k', 2048), - array('2 k', 2048), - array('8m', 8 * 1024 * 1024), - array('+2 k', 2048), - array('+2???k', 2048), - array('0x10', 16), - array('0xf', 15), - array('010', 8), - array('+0x10 k', 16 * 1024), - array('1g', 1024 * 1024 * 1024), - array('1G', 1024 * 1024 * 1024), - array('-1', -1), - array('0', 0), - array('2mk', 2048), // the unit must be the last char, so in this case 'k', not 'm' - ); + return [ + ['2k', 2048], + ['2 k', 2048], + ['8m', 8 * 1024 * 1024], + ['+2 k', 2048], + ['+2???k', 2048], + ['0x10', 16], + ['0xf', 15], + ['010', 8], + ['+0x10 k', 16 * 1024], + ['1g', 1024 * 1024 * 1024], + ['1G', 1024 * 1024 * 1024], + ['-1', -1], + ['0', 0], + ['2mk', 2048], // the unit must be the last char, so in this case 'k', not 'm' + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php index cce08e27..5e97267d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php @@ -48,8 +48,8 @@ class RequestDataCollectorTest extends TestCase $this->assertInstanceOf(ParameterBag::class, $c->getResponseCookies()); $this->assertSame('html', $c->getFormat()); $this->assertEquals('foobar', $c->getRoute()); - $this->assertEquals(array('name' => 'foo'), $c->getRouteParams()); - $this->assertSame(array(), $c->getSessionAttributes()); + $this->assertEquals(['name' => 'foo'], $c->getRouteParams()); + $this->assertSame([], $c->getSessionAttributes()); $this->assertSame('en', $c->getLocale()); $this->assertContains(__FILE__, $attributes->get('resource')); $this->assertSame('stdClass', $attributes->get('object')->getType()); @@ -62,13 +62,13 @@ class RequestDataCollectorTest extends TestCase public function testCollectWithoutRouteParams() { - $request = $this->createRequest(array()); + $request = $this->createRequest([]); $c = new RequestDataCollector(); $c->collect($request, $this->createResponse()); $c->lateCollect(); - $this->assertEquals(array(), $c->getRouteParams()); + $this->assertEquals([], $c->getRouteParams()); } /** @@ -94,95 +94,95 @@ class RequestDataCollectorTest extends TestCase $r3 = new \ReflectionClass($this); // test name, callable, expected - return array( - array( + return [ + [ '"Regular" callable', - array($this, 'testControllerInspection'), - array( + [$this, 'testControllerInspection'], + [ 'class' => __NAMESPACE__.'\RequestDataCollectorTest', 'method' => 'testControllerInspection', 'file' => __FILE__, 'line' => $r1->getStartLine(), - ), - ), + ], + ], - array( + [ 'Closure', function () { return 'foo'; }, - array( + [ 'class' => __NAMESPACE__.'\{closure}', 'method' => null, 'file' => __FILE__, 'line' => __LINE__ - 5, - ), - ), + ], + ], - array( + [ 'Static callback as string', __NAMESPACE__.'\RequestDataCollectorTest::staticControllerMethod', - array( + [ 'class' => 'Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', 'method' => 'staticControllerMethod', 'file' => __FILE__, 'line' => $r2->getStartLine(), - ), - ), + ], + ], - array( + [ 'Static callable with instance', - array($this, 'staticControllerMethod'), - array( + [$this, 'staticControllerMethod'], + [ 'class' => 'Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', 'method' => 'staticControllerMethod', 'file' => __FILE__, 'line' => $r2->getStartLine(), - ), - ), + ], + ], - array( + [ 'Static callable with class name', - array('Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', 'staticControllerMethod'), - array( + ['Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', 'staticControllerMethod'], + [ 'class' => 'Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', 'method' => 'staticControllerMethod', 'file' => __FILE__, 'line' => $r2->getStartLine(), - ), - ), + ], + ], - array( + [ 'Callable with instance depending on __call()', - array($this, 'magicMethod'), - array( + [$this, 'magicMethod'], + [ 'class' => 'Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', 'method' => 'magicMethod', 'file' => 'n/a', 'line' => 'n/a', - ), - ), + ], + ], - array( + [ 'Callable with class name depending on __callStatic()', - array('Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', 'magicMethod'), - array( + ['Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', 'magicMethod'], + [ 'class' => 'Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', 'method' => 'magicMethod', 'file' => 'n/a', 'line' => 'n/a', - ), - ), + ], + ], - array( + [ 'Invokable controller', $this, - array( + [ 'class' => 'Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', 'method' => null, 'file' => __FILE__, 'line' => $r3->getStartLine(), - ), - ), - ); + ], + ], + ]; } public function testItIgnoresInvalidCallables() @@ -199,9 +199,9 @@ class RequestDataCollectorTest extends TestCase public function testItAddsRedirectedAttributesWhenRequestContainsSpecificCookie() { $request = $this->createRequest(); - $request->cookies->add(array( + $request->cookies->add([ 'sf_redirect' => '{}', - )); + ]); $kernel = $this->getMockBuilder(HttpKernelInterface::class)->getMock(); @@ -233,9 +233,9 @@ class RequestDataCollectorTest extends TestCase $request = $this->createRequest(); $request->attributes->set('_redirected', true); - $request->cookies->add(array( + $request->cookies->add([ 'sf_redirect' => '{"method": "POST"}', - )); + ]); $c->collect($request, $response = $this->createResponse()); $c->lateCollect(); @@ -246,7 +246,7 @@ class RequestDataCollectorTest extends TestCase $this->assertNull($cookie->getValue()); } - protected function createRequest($routeParams = array('name' => 'foo')) + protected function createRequest($routeParams = ['name' => 'foo']) { $request = Request::create('http://test.com/foo?bar=baz'); $request->attributes->set('foo', 'bar'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php index 3de147c7..8b8e91ae 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php @@ -31,7 +31,7 @@ class TraceableEventDispatcherTest extends TestCase $kernel->terminate($request, $response); $events = $stopwatch->getSectionEvents($response->headers->get('X-Debug-Token')); - $this->assertEquals(array( + $this->assertEquals([ '__section__', 'kernel.request', 'kernel.controller', @@ -39,13 +39,13 @@ class TraceableEventDispatcherTest extends TestCase 'controller', 'kernel.response', 'kernel.terminate', - ), array_keys($events)); + ], array_keys($events)); } public function testStopwatchCheckControllerOnRequestEvent() { $stopwatch = $this->getMockBuilder('Symfony\Component\Stopwatch\Stopwatch') - ->setMethods(array('isStarted')) + ->setMethods(['isStarted']) ->getMock(); $stopwatch->expects($this->once()) ->method('isStarted') @@ -61,7 +61,7 @@ class TraceableEventDispatcherTest extends TestCase public function testStopwatchStopControllerOnRequestEvent() { $stopwatch = $this->getMockBuilder('Symfony\Component\Stopwatch\Stopwatch') - ->setMethods(array('isStarted', 'stop', 'stopSection')) + ->setMethods(['isStarted', 'stop', 'stopSection']) ->getMock(); $stopwatch->expects($this->once()) ->method('isStarted') @@ -114,7 +114,7 @@ class TraceableEventDispatcherTest extends TestCase $controllerResolver = $this->getMockBuilder('Symfony\Component\HttpKernel\Controller\ControllerResolverInterface')->getMock(); $controllerResolver->expects($this->once())->method('getController')->will($this->returnValue($controller)); $argumentResolver = $this->getMockBuilder('Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface')->getMock(); - $argumentResolver->expects($this->once())->method('getArguments')->will($this->returnValue(array())); + $argumentResolver->expects($this->once())->method('getArguments')->will($this->returnValue([])); return new HttpKernel($dispatcher, $controllerResolver, new RequestStack(), $argumentResolver); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/AddAnnotatedClassesToCachePassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/AddAnnotatedClassesToCachePassTest.php index a2fb6afc..914b1dd8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/AddAnnotatedClassesToCachePassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/AddAnnotatedClassesToCachePassTest.php @@ -24,76 +24,76 @@ class AddAnnotatedClassesToCachePassTest extends TestCase $r->setAccessible(true); $expand = $r->getClosure($pass); - $this->assertSame('Foo', $expand(array('Foo'), array())[0]); - $this->assertSame('Foo', $expand(array('\\Foo'), array())[0]); - $this->assertSame('Foo', $expand(array('Foo'), array('\\Foo'))[0]); - $this->assertSame('Foo', $expand(array('Foo'), array('Foo'))[0]); - $this->assertSame('Foo', $expand(array('\\Foo'), array('\\Foo\\Bar'))[0]); - $this->assertSame('Foo', $expand(array('Foo'), array('\\Foo\\Bar'))[0]); - $this->assertSame('Foo', $expand(array('\\Foo'), array('\\Foo\\Bar\\Acme'))[0]); + $this->assertSame('Foo', $expand(['Foo'], [])[0]); + $this->assertSame('Foo', $expand(['\\Foo'], [])[0]); + $this->assertSame('Foo', $expand(['Foo'], ['\\Foo'])[0]); + $this->assertSame('Foo', $expand(['Foo'], ['Foo'])[0]); + $this->assertSame('Foo', $expand(['\\Foo'], ['\\Foo\\Bar'])[0]); + $this->assertSame('Foo', $expand(['Foo'], ['\\Foo\\Bar'])[0]); + $this->assertSame('Foo', $expand(['\\Foo'], ['\\Foo\\Bar\\Acme'])[0]); - $this->assertSame('Foo\\Bar', $expand(array('Foo\\'), array('\\Foo\\Bar'))[0]); - $this->assertSame('Foo\\Bar\\Acme', $expand(array('Foo\\'), array('\\Foo\\Bar\\Acme'))[0]); - $this->assertEmpty($expand(array('Foo\\'), array('\\Foo'))); + $this->assertSame('Foo\\Bar', $expand(['Foo\\'], ['\\Foo\\Bar'])[0]); + $this->assertSame('Foo\\Bar\\Acme', $expand(['Foo\\'], ['\\Foo\\Bar\\Acme'])[0]); + $this->assertEmpty($expand(['Foo\\'], ['\\Foo'])); - $this->assertSame('Acme\\Foo\\Bar', $expand(array('**\\Foo\\'), array('\\Acme\\Foo\\Bar'))[0]); - $this->assertEmpty($expand(array('**\\Foo\\'), array('\\Foo\\Bar'))); - $this->assertEmpty($expand(array('**\\Foo\\'), array('\\Acme\\Foo'))); - $this->assertEmpty($expand(array('**\\Foo\\'), array('\\Foo'))); + $this->assertSame('Acme\\Foo\\Bar', $expand(['**\\Foo\\'], ['\\Acme\\Foo\\Bar'])[0]); + $this->assertEmpty($expand(['**\\Foo\\'], ['\\Foo\\Bar'])); + $this->assertEmpty($expand(['**\\Foo\\'], ['\\Acme\\Foo'])); + $this->assertEmpty($expand(['**\\Foo\\'], ['\\Foo'])); - $this->assertSame('Acme\\Foo', $expand(array('**\\Foo'), array('\\Acme\\Foo'))[0]); - $this->assertEmpty($expand(array('**\\Foo'), array('\\Acme\\Foo\\AcmeBundle'))); - $this->assertEmpty($expand(array('**\\Foo'), array('\\Acme\\FooBar\\AcmeBundle'))); + $this->assertSame('Acme\\Foo', $expand(['**\\Foo'], ['\\Acme\\Foo'])[0]); + $this->assertEmpty($expand(['**\\Foo'], ['\\Acme\\Foo\\AcmeBundle'])); + $this->assertEmpty($expand(['**\\Foo'], ['\\Acme\\FooBar\\AcmeBundle'])); - $this->assertSame('Foo\\Acme\\Bar', $expand(array('Foo\\*\\Bar'), array('\\Foo\\Acme\\Bar'))[0]); - $this->assertEmpty($expand(array('Foo\\*\\Bar'), array('\\Foo\\Acme\\Bundle\\Bar'))); + $this->assertSame('Foo\\Acme\\Bar', $expand(['Foo\\*\\Bar'], ['\\Foo\\Acme\\Bar'])[0]); + $this->assertEmpty($expand(['Foo\\*\\Bar'], ['\\Foo\\Acme\\Bundle\\Bar'])); - $this->assertSame('Foo\\Acme\\Bar', $expand(array('Foo\\**\\Bar'), array('\\Foo\\Acme\\Bar'))[0]); - $this->assertSame('Foo\\Acme\\Bundle\\Bar', $expand(array('Foo\\**\\Bar'), array('\\Foo\\Acme\\Bundle\\Bar'))[0]); + $this->assertSame('Foo\\Acme\\Bar', $expand(['Foo\\**\\Bar'], ['\\Foo\\Acme\\Bar'])[0]); + $this->assertSame('Foo\\Acme\\Bundle\\Bar', $expand(['Foo\\**\\Bar'], ['\\Foo\\Acme\\Bundle\\Bar'])[0]); - $this->assertSame('Acme\\Bar', $expand(array('*\\Bar'), array('\\Acme\\Bar'))[0]); - $this->assertEmpty($expand(array('*\\Bar'), array('\\Bar'))); - $this->assertEmpty($expand(array('*\\Bar'), array('\\Foo\\Acme\\Bar'))); + $this->assertSame('Acme\\Bar', $expand(['*\\Bar'], ['\\Acme\\Bar'])[0]); + $this->assertEmpty($expand(['*\\Bar'], ['\\Bar'])); + $this->assertEmpty($expand(['*\\Bar'], ['\\Foo\\Acme\\Bar'])); - $this->assertSame('Foo\\Acme\\Bar', $expand(array('**\\Bar'), array('\\Foo\\Acme\\Bar'))[0]); - $this->assertSame('Foo\\Acme\\Bundle\\Bar', $expand(array('**\\Bar'), array('\\Foo\\Acme\\Bundle\\Bar'))[0]); - $this->assertEmpty($expand(array('**\\Bar'), array('\\Bar'))); + $this->assertSame('Foo\\Acme\\Bar', $expand(['**\\Bar'], ['\\Foo\\Acme\\Bar'])[0]); + $this->assertSame('Foo\\Acme\\Bundle\\Bar', $expand(['**\\Bar'], ['\\Foo\\Acme\\Bundle\\Bar'])[0]); + $this->assertEmpty($expand(['**\\Bar'], ['\\Bar'])); - $this->assertSame('Foo\\Bar', $expand(array('Foo\\*'), array('\\Foo\\Bar'))[0]); - $this->assertEmpty($expand(array('Foo\\*'), array('\\Foo\\Acme\\Bar'))); + $this->assertSame('Foo\\Bar', $expand(['Foo\\*'], ['\\Foo\\Bar'])[0]); + $this->assertEmpty($expand(['Foo\\*'], ['\\Foo\\Acme\\Bar'])); - $this->assertSame('Foo\\Bar', $expand(array('Foo\\**'), array('\\Foo\\Bar'))[0]); - $this->assertSame('Foo\\Acme\\Bar', $expand(array('Foo\\**'), array('\\Foo\\Acme\\Bar'))[0]); + $this->assertSame('Foo\\Bar', $expand(['Foo\\**'], ['\\Foo\\Bar'])[0]); + $this->assertSame('Foo\\Acme\\Bar', $expand(['Foo\\**'], ['\\Foo\\Acme\\Bar'])[0]); - $this->assertSame(array('Foo\\Bar'), $expand(array('Foo\\*'), array('Foo\\Bar', 'Foo\\BarTest'))); - $this->assertSame(array('Foo\\Bar', 'Foo\\BarTest'), $expand(array('Foo\\*', 'Foo\\*Test'), array('Foo\\Bar', 'Foo\\BarTest'))); + $this->assertSame(['Foo\\Bar'], $expand(['Foo\\*'], ['Foo\\Bar', 'Foo\\BarTest'])); + $this->assertSame(['Foo\\Bar', 'Foo\\BarTest'], $expand(['Foo\\*', 'Foo\\*Test'], ['Foo\\Bar', 'Foo\\BarTest'])); $this->assertSame( 'Acme\\FooBundle\\Controller\\DefaultController', - $expand(array('**Bundle\\Controller\\'), array('\\Acme\\FooBundle\\Controller\\DefaultController'))[0] + $expand(['**Bundle\\Controller\\'], ['\\Acme\\FooBundle\\Controller\\DefaultController'])[0] ); $this->assertSame( 'FooBundle\\Controller\\DefaultController', - $expand(array('**Bundle\\Controller\\'), array('\\FooBundle\\Controller\\DefaultController'))[0] + $expand(['**Bundle\\Controller\\'], ['\\FooBundle\\Controller\\DefaultController'])[0] ); $this->assertSame( 'Acme\\FooBundle\\Controller\\Bar\\DefaultController', - $expand(array('**Bundle\\Controller\\'), array('\\Acme\\FooBundle\\Controller\\Bar\\DefaultController'))[0] + $expand(['**Bundle\\Controller\\'], ['\\Acme\\FooBundle\\Controller\\Bar\\DefaultController'])[0] ); $this->assertSame( 'Bundle\\Controller\\Bar\\DefaultController', - $expand(array('**Bundle\\Controller\\'), array('\\Bundle\\Controller\\Bar\\DefaultController'))[0] + $expand(['**Bundle\\Controller\\'], ['\\Bundle\\Controller\\Bar\\DefaultController'])[0] ); $this->assertSame( 'Acme\\Bundle\\Controller\\Bar\\DefaultController', - $expand(array('**Bundle\\Controller\\'), array('\\Acme\\Bundle\\Controller\\Bar\\DefaultController'))[0] + $expand(['**Bundle\\Controller\\'], ['\\Acme\\Bundle\\Controller\\Bar\\DefaultController'])[0] ); - $this->assertSame('Foo\\Bar', $expand(array('Foo\\Bar'), array())[0]); - $this->assertSame('Foo\\Acme\\Bar', $expand(array('Foo\\**'), array('\\Foo\\Acme\\Bar'))[0]); + $this->assertSame('Foo\\Bar', $expand(['Foo\\Bar'], [])[0]); + $this->assertSame('Foo\\Acme\\Bar', $expand(['Foo\\**'], ['\\Foo\\Acme\\Bar'])[0]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ControllerArgumentValueResolverPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ControllerArgumentValueResolverPassTest.php index df8977de..871b7e0e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ControllerArgumentValueResolverPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ControllerArgumentValueResolverPassTest.php @@ -22,19 +22,19 @@ class ControllerArgumentValueResolverPassTest extends TestCase { public function testServicesAreOrderedAccordingToPriority() { - $services = array( - 'n3' => array(array()), - 'n1' => array(array('priority' => 200)), - 'n2' => array(array('priority' => 100)), - ); + $services = [ + 'n3' => [[]], + 'n1' => [['priority' => 200]], + 'n2' => [['priority' => 100]], + ]; - $expected = array( + $expected = [ new Reference('n1'), new Reference('n2'), new Reference('n3'), - ); + ]; - $definition = new Definition(ArgumentResolver::class, array(null, array())); + $definition = new Definition(ArgumentResolver::class, [null, []]); $container = new ContainerBuilder(); $container->setDefinition('argument_resolver', $definition); @@ -48,12 +48,12 @@ class ControllerArgumentValueResolverPassTest extends TestCase public function testReturningEmptyArrayWhenNoService() { - $definition = new Definition(ArgumentResolver::class, array(null, array())); + $definition = new Definition(ArgumentResolver::class, [null, []]); $container = new ContainerBuilder(); $container->setDefinition('argument_resolver', $definition); (new ControllerArgumentValueResolverPass())->process($container); - $this->assertEquals(array(), $definition->getArgument(1)->getValues()); + $this->assertEquals([], $definition->getArgument(1)->getValues()); } public function testNoArgumentResolver() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/FragmentRendererPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/FragmentRendererPassTest.php index e8957bb3..087c6665 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/FragmentRendererPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/FragmentRendererPassTest.php @@ -33,12 +33,12 @@ class FragmentRendererPassTest extends TestCase $builder = new ContainerBuilder(); $fragmentHandlerDefinition = $builder->register('fragment.handler'); $builder->register('my_content_renderer', 'Symfony\Component\DependencyInjection\Definition') - ->addTag('kernel.fragment_renderer', array('alias' => 'foo')); + ->addTag('kernel.fragment_renderer', ['alias' => 'foo']); $pass = new FragmentRendererPass(); $pass->process($builder); - $this->assertEquals(array(array('addRendererService', array('foo', 'my_content_renderer'))), $fragmentHandlerDefinition->getMethodCalls()); + $this->assertEquals([['addRendererService', ['foo', 'my_content_renderer']]], $fragmentHandlerDefinition->getMethodCalls()); } public function testValidContentRenderer() @@ -47,20 +47,20 @@ class FragmentRendererPassTest extends TestCase $fragmentHandlerDefinition = $builder->register('fragment.handler') ->addArgument(null); $builder->register('my_content_renderer', 'Symfony\Component\HttpKernel\Tests\DependencyInjection\RendererService') - ->addTag('kernel.fragment_renderer', array('alias' => 'foo')); + ->addTag('kernel.fragment_renderer', ['alias' => 'foo']); $pass = new FragmentRendererPass(); $pass->process($builder); $serviceLocatorDefinition = $builder->getDefinition((string) $fragmentHandlerDefinition->getArgument(0)); $this->assertSame(ServiceLocator::class, $serviceLocatorDefinition->getClass()); - $this->assertEquals(array('foo' => new ServiceClosureArgument(new Reference('my_content_renderer'))), $serviceLocatorDefinition->getArgument(0)); + $this->assertEquals(['foo' => new ServiceClosureArgument(new Reference('my_content_renderer'))], $serviceLocatorDefinition->getArgument(0)); } } class RendererService implements FragmentRendererInterface { - public function render($uri, Request $request = null, array $options = array()) + public function render($uri, Request $request = null, array $options = []) { } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/MergeExtensionConfigurationPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/MergeExtensionConfigurationPassTest.php index ae421d91..7af756e0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/MergeExtensionConfigurationPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/MergeExtensionConfigurationPassTest.php @@ -23,9 +23,9 @@ class MergeExtensionConfigurationPassTest extends TestCase $container = new ContainerBuilder(); $container->registerExtension(new LoadedExtension()); $container->registerExtension(new NotLoadedExtension()); - $container->loadFromExtension('loaded', array()); + $container->loadFromExtension('loaded', []); - $configPass = new MergeExtensionConfigurationPass(array('loaded', 'not_loaded')); + $configPass = new MergeExtensionConfigurationPass(['loaded', 'not_loaded']); $configPass->process($container); $this->assertTrue($container->hasDefinition('loaded.foo')); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php index ca121c73..6d0da5fc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php @@ -32,7 +32,7 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase public function testInvalidClass() { $container = new ContainerBuilder(); - $container->register('argument_resolver.service')->addArgument(array()); + $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', NotFound::class) ->addTag('controller.service_arguments') @@ -49,10 +49,10 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase public function testNoAction() { $container = new ContainerBuilder(); - $container->register('argument_resolver.service')->addArgument(array()); + $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', RegisterTestController::class) - ->addTag('controller.service_arguments', array('argument' => 'bar')) + ->addTag('controller.service_arguments', ['argument' => 'bar']) ; $pass = new RegisterControllerArgumentLocatorsPass(); @@ -66,10 +66,10 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase public function testNoArgument() { $container = new ContainerBuilder(); - $container->register('argument_resolver.service')->addArgument(array()); + $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', RegisterTestController::class) - ->addTag('controller.service_arguments', array('action' => 'fooAction')) + ->addTag('controller.service_arguments', ['action' => 'fooAction']) ; $pass = new RegisterControllerArgumentLocatorsPass(); @@ -83,10 +83,10 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase public function testNoService() { $container = new ContainerBuilder(); - $container->register('argument_resolver.service')->addArgument(array()); + $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', RegisterTestController::class) - ->addTag('controller.service_arguments', array('action' => 'fooAction', 'argument' => 'bar')) + ->addTag('controller.service_arguments', ['action' => 'fooAction', 'argument' => 'bar']) ; $pass = new RegisterControllerArgumentLocatorsPass(); @@ -100,10 +100,10 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase public function testInvalidMethod() { $container = new ContainerBuilder(); - $container->register('argument_resolver.service')->addArgument(array()); + $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', RegisterTestController::class) - ->addTag('controller.service_arguments', array('action' => 'barAction', 'argument' => 'bar', 'id' => 'bar_service')) + ->addTag('controller.service_arguments', ['action' => 'barAction', 'argument' => 'bar', 'id' => 'bar_service']) ; $pass = new RegisterControllerArgumentLocatorsPass(); @@ -117,10 +117,10 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase public function testInvalidArgument() { $container = new ContainerBuilder(); - $container->register('argument_resolver.service')->addArgument(array()); + $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', RegisterTestController::class) - ->addTag('controller.service_arguments', array('action' => 'fooAction', 'argument' => 'baz', 'id' => 'bar')) + ->addTag('controller.service_arguments', ['action' => 'fooAction', 'argument' => 'baz', 'id' => 'bar']) ; $pass = new RegisterControllerArgumentLocatorsPass(); @@ -130,7 +130,7 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase public function testAllActions() { $container = new ContainerBuilder(); - $resolver = $container->register('argument_resolver.service')->addArgument(array()); + $resolver = $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', RegisterTestController::class) ->addTag('controller.service_arguments') @@ -141,7 +141,7 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase $locator = $container->getDefinition((string) $resolver->getArgument(0))->getArgument(0); - $this->assertEquals(array('foo:fooAction'), array_keys($locator)); + $this->assertEquals(['foo:fooAction'], array_keys($locator)); $this->assertInstanceof(ServiceClosureArgument::class, $locator['foo:fooAction']); $locator = $container->getDefinition((string) $locator['foo:fooAction']->getValues()[0]); @@ -149,18 +149,18 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase $this->assertSame(ServiceLocator::class, $locator->getClass()); $this->assertFalse($locator->isPublic()); - $expected = array('bar' => new ServiceClosureArgument(new TypedReference(ControllerDummy::class, ControllerDummy::class, RegisterTestController::class, ContainerInterface::IGNORE_ON_INVALID_REFERENCE))); + $expected = ['bar' => new ServiceClosureArgument(new TypedReference(ControllerDummy::class, ControllerDummy::class, RegisterTestController::class, ContainerInterface::IGNORE_ON_INVALID_REFERENCE))]; $this->assertEquals($expected, $locator->getArgument(0)); } public function testExplicitArgument() { $container = new ContainerBuilder(); - $resolver = $container->register('argument_resolver.service')->addArgument(array()); + $resolver = $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', RegisterTestController::class) - ->addTag('controller.service_arguments', array('action' => 'fooAction', 'argument' => 'bar', 'id' => 'bar')) - ->addTag('controller.service_arguments', array('action' => 'fooAction', 'argument' => 'bar', 'id' => 'baz')) // should be ignored, the first wins + ->addTag('controller.service_arguments', ['action' => 'fooAction', 'argument' => 'bar', 'id' => 'bar']) + ->addTag('controller.service_arguments', ['action' => 'fooAction', 'argument' => 'bar', 'id' => 'baz']) // should be ignored, the first wins ; $pass = new RegisterControllerArgumentLocatorsPass(); @@ -169,17 +169,17 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase $locator = $container->getDefinition((string) $resolver->getArgument(0))->getArgument(0); $locator = $container->getDefinition((string) $locator['foo:fooAction']->getValues()[0]); - $expected = array('bar' => new ServiceClosureArgument(new TypedReference('bar', ControllerDummy::class, RegisterTestController::class))); + $expected = ['bar' => new ServiceClosureArgument(new TypedReference('bar', ControllerDummy::class, RegisterTestController::class))]; $this->assertEquals($expected, $locator->getArgument(0)); } public function testOptionalArgument() { $container = new ContainerBuilder(); - $resolver = $container->register('argument_resolver.service')->addArgument(array()); + $resolver = $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', RegisterTestController::class) - ->addTag('controller.service_arguments', array('action' => 'fooAction', 'argument' => 'bar', 'id' => '?bar')) + ->addTag('controller.service_arguments', ['action' => 'fooAction', 'argument' => 'bar', 'id' => '?bar']) ; $pass = new RegisterControllerArgumentLocatorsPass(); @@ -188,14 +188,14 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase $locator = $container->getDefinition((string) $resolver->getArgument(0))->getArgument(0); $locator = $container->getDefinition((string) $locator['foo:fooAction']->getValues()[0]); - $expected = array('bar' => new ServiceClosureArgument(new TypedReference('bar', ControllerDummy::class, RegisterTestController::class, ContainerInterface::IGNORE_ON_INVALID_REFERENCE))); + $expected = ['bar' => new ServiceClosureArgument(new TypedReference('bar', ControllerDummy::class, RegisterTestController::class, ContainerInterface::IGNORE_ON_INVALID_REFERENCE))]; $this->assertEquals($expected, $locator->getArgument(0)); } public function testSkipSetContainer() { $container = new ContainerBuilder(); - $resolver = $container->register('argument_resolver.service')->addArgument(array()); + $resolver = $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', ContainerAwareRegisterTestController::class) ->addTag('controller.service_arguments'); @@ -204,7 +204,7 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase $pass->process($container); $locator = $container->getDefinition((string) $resolver->getArgument(0))->getArgument(0); - $this->assertSame(array('foo:fooAction'), array_keys($locator)); + $this->assertSame(['foo:fooAction'], array_keys($locator)); } /** @@ -214,7 +214,7 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase public function testExceptionOnNonExistentTypeHint() { $container = new ContainerBuilder(); - $container->register('argument_resolver.service')->addArgument(array()); + $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', NonExistentClassController::class) ->addTag('controller.service_arguments'); @@ -230,7 +230,7 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase public function testExceptionOnNonExistentTypeHintDifferentNamespace() { $container = new ContainerBuilder(); - $container->register('argument_resolver.service')->addArgument(array()); + $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', NonExistentClassDifferentNamespaceController::class) ->addTag('controller.service_arguments'); @@ -242,7 +242,7 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase public function testNoExceptionOnNonExistentTypeHintOptionalArg() { $container = new ContainerBuilder(); - $resolver = $container->register('argument_resolver.service')->addArgument(array()); + $resolver = $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', NonExistentClassOptionalController::class) ->addTag('controller.service_arguments'); @@ -251,13 +251,13 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase $pass->process($container); $locator = $container->getDefinition((string) $resolver->getArgument(0))->getArgument(0); - $this->assertSame(array('foo:barAction', 'foo:fooAction'), array_keys($locator)); + $this->assertSame(['foo:barAction', 'foo:fooAction'], array_keys($locator)); } public function testArgumentWithNoTypeHintIsOk() { $container = new ContainerBuilder(); - $resolver = $container->register('argument_resolver.service')->addArgument(array()); + $resolver = $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', ArgumentWithoutTypeController::class) ->addTag('controller.service_arguments'); @@ -272,7 +272,7 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase public function testControllersAreMadePublic() { $container = new ContainerBuilder(); - $resolver = $container->register('argument_resolver.service')->addArgument(array()); + $resolver = $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', ArgumentWithoutTypeController::class) ->setPublic(false) @@ -290,10 +290,10 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase public function testBindings($bindingName) { $container = new ContainerBuilder(); - $resolver = $container->register('argument_resolver.service')->addArgument(array()); + $resolver = $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', RegisterTestController::class) - ->setBindings(array($bindingName => new Reference('foo'))) + ->setBindings([$bindingName => new Reference('foo')]) ->addTag('controller.service_arguments'); $pass = new RegisterControllerArgumentLocatorsPass(); @@ -303,22 +303,22 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase $locator = $container->getDefinition((string) $locator['foo:fooAction']->getValues()[0]); - $expected = array('bar' => new ServiceClosureArgument(new Reference('foo'))); + $expected = ['bar' => new ServiceClosureArgument(new Reference('foo'))]; $this->assertEquals($expected, $locator->getArgument(0)); } public function provideBindings() { - return array(array(ControllerDummy::class), array('$bar')); + return [[ControllerDummy::class], ['$bar']]; } public function testDoNotBindScalarValueToControllerArgument() { $container = new ContainerBuilder(); - $resolver = $container->register('argument_resolver.service')->addArgument(array()); + $resolver = $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', ArgumentWithoutTypeController::class) - ->setBindings(array('$someArg' => '%foo%')) + ->setBindings(['$someArg' => '%foo%']) ->addTag('controller.service_arguments'); $pass = new RegisterControllerArgumentLocatorsPass(); @@ -331,12 +331,12 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase public function testBindingsOnChildDefinitions() { $container = new ContainerBuilder(); - $resolver = $container->register('argument_resolver.service')->addArgument(array()); + $resolver = $container->register('argument_resolver.service')->addArgument([]); $container->register('parent', ArgumentWithoutTypeController::class); $container->setDefinition('child', (new ChildDefinition('parent')) - ->setBindings(array('$someArg' => new Reference('parent'))) + ->setBindings(['$someArg' => new Reference('parent')]) ->addTag('controller.service_arguments') ); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPassTest.php index 9cac9681..713ab544 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPassTest.php @@ -23,13 +23,13 @@ class RemoveEmptyControllerArgumentLocatorsPassTest extends TestCase public function testProcess() { $container = new ContainerBuilder(); - $resolver = $container->register('argument_resolver.service')->addArgument(array()); + $resolver = $container->register('argument_resolver.service')->addArgument([]); $container->register('stdClass', 'stdClass'); $container->register(parent::class, 'stdClass'); $container->register('c1', RemoveTestController1::class)->addTag('controller.service_arguments'); $container->register('c2', RemoveTestController2::class)->addTag('controller.service_arguments') - ->addMethodCall('setTestCase', array(new Reference('c1'))); + ->addMethodCall('setTestCase', [new Reference('c1')]); $pass = new RegisterControllerArgumentLocatorsPass(); $pass->process($container); @@ -43,19 +43,19 @@ class RemoveEmptyControllerArgumentLocatorsPassTest extends TestCase (new ResolveInvalidReferencesPass())->process($container); $this->assertCount(1, $container->getDefinition((string) $controllers['c2:setTestCase']->getValues()[0])->getArgument(0)); - $this->assertSame(array(), $container->getDefinition((string) $controllers['c2:fooAction']->getValues()[0])->getArgument(0)); + $this->assertSame([], $container->getDefinition((string) $controllers['c2:fooAction']->getValues()[0])->getArgument(0)); (new RemoveEmptyControllerArgumentLocatorsPass())->process($container); $controllers = $container->getDefinition((string) $resolver->getArgument(0))->getArgument(0); - $this->assertSame(array('c1:fooAction'), array_keys($controllers)); - $this->assertSame(array('bar'), array_keys($container->getDefinition((string) $controllers['c1:fooAction']->getValues()[0])->getArgument(0))); + $this->assertSame(['c1:fooAction'], array_keys($controllers)); + $this->assertSame(['bar'], array_keys($container->getDefinition((string) $controllers['c1:fooAction']->getValues()[0])->getArgument(0))); - $expectedLog = array( + $expectedLog = [ 'Symfony\Component\HttpKernel\DependencyInjection\RemoveEmptyControllerArgumentLocatorsPass: Removing service-argument resolver for controller "c2:fooAction": no corresponding services exist for the referenced types.', 'Symfony\Component\HttpKernel\DependencyInjection\RemoveEmptyControllerArgumentLocatorsPass: Removing method "setTestCase" of service "c2" from controller candidates: the method is called at instantiation, thus cannot be an action.', - ); + ]; $this->assertSame($expectedLog, $container->getCompiler()->getLog()); } @@ -63,7 +63,7 @@ class RemoveEmptyControllerArgumentLocatorsPassTest extends TestCase public function testSameIdClass() { $container = new ContainerBuilder(); - $resolver = $container->register('argument_resolver.service')->addArgument(array()); + $resolver = $container->register('argument_resolver.service')->addArgument([]); $container->register(RegisterTestController::class, RegisterTestController::class) ->addTag('controller.service_arguments') @@ -72,17 +72,17 @@ class RemoveEmptyControllerArgumentLocatorsPassTest extends TestCase (new RegisterControllerArgumentLocatorsPass())->process($container); (new RemoveEmptyControllerArgumentLocatorsPass())->process($container); - $expected = array( + $expected = [ RegisterTestController::class.':fooAction', RegisterTestController::class.'::fooAction', - ); + ]; $this->assertEquals($expected, array_keys($container->getDefinition((string) $resolver->getArgument(0))->getArgument(0))); } public function testInvoke() { $container = new ContainerBuilder(); - $resolver = $container->register('argument_resolver.service')->addArgument(array()); + $resolver = $container->register('argument_resolver.service')->addArgument([]); $container->register('invokable', InvokableRegisterTestController::class) ->addTag('controller.service_arguments') @@ -92,7 +92,7 @@ class RemoveEmptyControllerArgumentLocatorsPassTest extends TestCase (new RemoveEmptyControllerArgumentLocatorsPass())->process($container); $this->assertEquals( - array('invokable:__invoke', 'invokable'), + ['invokable:__invoke', 'invokable'], array_keys($container->getDefinition((string) $resolver->getArgument(0))->getArgument(0)) ); } @@ -100,7 +100,7 @@ class RemoveEmptyControllerArgumentLocatorsPassTest extends TestCase public function testInvokeSameIdClass() { $container = new ContainerBuilder(); - $resolver = $container->register('argument_resolver.service')->addArgument(array()); + $resolver = $container->register('argument_resolver.service')->addArgument([]); $container->register(InvokableRegisterTestController::class, InvokableRegisterTestController::class) ->addTag('controller.service_arguments') @@ -109,11 +109,11 @@ class RemoveEmptyControllerArgumentLocatorsPassTest extends TestCase (new RegisterControllerArgumentLocatorsPass())->process($container); (new RemoveEmptyControllerArgumentLocatorsPass())->process($container); - $expected = array( + $expected = [ InvokableRegisterTestController::class.':__invoke', InvokableRegisterTestController::class.'::__invoke', InvokableRegisterTestController::class, - ); + ]; $this->assertEquals($expected, array_keys($container->getDefinition((string) $resolver->getArgument(0))->getArgument(0))); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ResettableServicePassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ResettableServicePassTest.php index f7ea16db..9b23ad00 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ResettableServicePassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ResettableServicePassTest.php @@ -19,14 +19,14 @@ class ResettableServicePassTest extends TestCase $container = new ContainerBuilder(); $container->register('one', ResettableService::class) ->setPublic(true) - ->addTag('kernel.reset', array('method' => 'reset')); + ->addTag('kernel.reset', ['method' => 'reset']); $container->register('two', ClearableService::class) ->setPublic(true) - ->addTag('kernel.reset', array('method' => 'clear')); + ->addTag('kernel.reset', ['method' => 'clear']); $container->register('services_resetter', ServicesResetter::class) ->setPublic(true) - ->setArguments(array(null, array())); + ->setArguments([null, []]); $container->addCompilerPass(new ResettableServicePass()); $container->compile(); @@ -34,16 +34,16 @@ class ResettableServicePassTest extends TestCase $definition = $container->getDefinition('services_resetter'); $this->assertEquals( - array( - new IteratorArgument(array( + [ + new IteratorArgument([ 'one' => new Reference('one', ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE), 'two' => new Reference('two', ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE), - )), - array( + ]), + [ 'one' => 'reset', 'two' => 'clear', - ), - ), + ], + ], $definition->getArguments() ); } @@ -58,7 +58,7 @@ class ResettableServicePassTest extends TestCase $container->register(ResettableService::class) ->addTag('kernel.reset'); $container->register('services_resetter', ServicesResetter::class) - ->setArguments(array(null, array())); + ->setArguments([null, []]); $container->addCompilerPass(new ResettableServicePass()); $container->compile(); @@ -68,7 +68,7 @@ class ResettableServicePassTest extends TestCase { $container = new ContainerBuilder(); $container->register('services_resetter', ServicesResetter::class) - ->setArguments(array(null, array())); + ->setArguments([null, []]); $container->addCompilerPass(new ResettableServicePass()); $container->compile(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ServicesResetterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ServicesResetterTest.php index 47c62abd..86f1abdb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ServicesResetterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ServicesResetterTest.php @@ -26,13 +26,13 @@ class ServicesResetterTest extends TestCase public function testResetServices() { - $resetter = new ServicesResetter(new \ArrayIterator(array( + $resetter = new ServicesResetter(new \ArrayIterator([ 'id1' => new ResettableService(), 'id2' => new ClearableService(), - )), array( + ]), [ 'id1' => 'reset', 'id2' => 'clear', - )); + ]); $resetter->reset(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Event/FilterControllerArgumentsEventTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Event/FilterControllerArgumentsEventTest.php index f1e440b2..abc51ac5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Event/FilterControllerArgumentsEventTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Event/FilterControllerArgumentsEventTest.php @@ -11,7 +11,7 @@ class FilterControllerArgumentsEventTest extends TestCase { public function testFilterControllerArgumentsEvent() { - $filterController = new FilterControllerArgumentsEvent(new TestHttpKernel(), function () {}, array('test'), new Request(), 1); - $this->assertEquals($filterController->getArguments(), array('test')); + $filterController = new FilterControllerArgumentsEvent(new TestHttpKernel(), function () {}, ['test'], new Request(), 1); + $this->assertEquals($filterController->getArguments(), ['test']); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php index 3ffb9f3d..b4ea2f95 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php @@ -30,7 +30,7 @@ class AddRequestFormatsListenerTest extends TestCase protected function setUp() { - $this->listener = new AddRequestFormatsListener(array('csv' => array('text/csv', 'text/plain'))); + $this->listener = new AddRequestFormatsListener(['csv' => ['text/csv', 'text/plain']]); } protected function tearDown() @@ -46,7 +46,7 @@ class AddRequestFormatsListenerTest extends TestCase public function testRegisteredEvent() { $this->assertEquals( - array(KernelEvents::REQUEST => array('onKernelRequest', 1)), + [KernelEvents::REQUEST => ['onKernelRequest', 1]], AddRequestFormatsListener::getSubscribedEvents() ); } @@ -58,7 +58,7 @@ class AddRequestFormatsListenerTest extends TestCase $request->expects($this->once()) ->method('setFormat') - ->with('csv', array('text/csv', 'text/plain')); + ->with('csv', ['text/csv', 'text/plain']); $this->listener->onKernelRequest($event); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/DebugHandlersListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/DebugHandlersListenerTest.php index 9a9c17ed..d9e261d3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/DebugHandlersListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/DebugHandlersListenerTest.php @@ -40,11 +40,11 @@ class DebugHandlersListenerTest extends TestCase $listener = new DebugHandlersListener($userHandler, $logger); $xHandler = new ExceptionHandler(); $eHandler = new ErrorHandler(); - $eHandler->setExceptionHandler(array($xHandler, 'handle')); + $eHandler->setExceptionHandler([$xHandler, 'handle']); $exception = null; - set_error_handler(array($eHandler, 'handleError')); - set_exception_handler(array($eHandler, 'handleException')); + set_error_handler([$eHandler, 'handleError']); + set_exception_handler([$eHandler, 'handleException']); try { $listener->configure(); } catch (\Exception $exception) { @@ -58,10 +58,10 @@ class DebugHandlersListenerTest extends TestCase $this->assertSame($userHandler, $xHandler->setHandler('var_dump')); - $loggers = $eHandler->setLoggers(array()); + $loggers = $eHandler->setLoggers([]); $this->assertArrayHasKey(E_DEPRECATED, $loggers); - $this->assertSame(array($logger, LogLevel::INFO), $loggers[E_DEPRECATED]); + $this->assertSame([$logger, LogLevel::INFO], $loggers[E_DEPRECATED]); } public function testConfigureForHttpKernelWithNoTerminateWithException() @@ -75,7 +75,7 @@ class DebugHandlersListenerTest extends TestCase ); $exception = null; - $h = set_exception_handler(array($eHandler, 'handleException')); + $h = set_exception_handler([$eHandler, 'handleException']); try { $listener->configure($event); } catch (\Exception $exception) { @@ -101,16 +101,16 @@ class DebugHandlersListenerTest extends TestCase $dispatcher->addSubscriber($listener); - $xListeners = array( - KernelEvents::REQUEST => array(array($listener, 'configure')), - ConsoleEvents::COMMAND => array(array($listener, 'configure')), - ); + $xListeners = [ + KernelEvents::REQUEST => [[$listener, 'configure']], + ConsoleEvents::COMMAND => [[$listener, 'configure']], + ]; $this->assertSame($xListeners, $dispatcher->getListeners()); $exception = null; $eHandler = new ErrorHandler(); - set_error_handler(array($eHandler, 'handleError')); - set_exception_handler(array($eHandler, 'handleException')); + set_error_handler([$eHandler, 'handleError']); + set_exception_handler([$eHandler, 'handleException']); try { $dispatcher->dispatch(ConsoleEvents::COMMAND, $event); } catch (\Exception $exception) { @@ -139,7 +139,7 @@ class DebugHandlersListenerTest extends TestCase $eHandler->setExceptionHandler('var_dump'); $exception = null; - set_exception_handler(array($eHandler, 'handleException')); + set_exception_handler([$eHandler, 'handleException']); try { $listener->configure(); } catch (\Exception $exception) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/DumpListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/DumpListenerTest.php index 509f4430..b86a7552 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/DumpListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/DumpListenerTest.php @@ -29,7 +29,7 @@ class DumpListenerTest extends TestCase public function testSubscribedEvents() { $this->assertSame( - array(ConsoleEvents::COMMAND => array('configure', 1024)), + [ConsoleEvents::COMMAND => ['configure', 1024]], DumpListener::getSubscribedEvents() ); } @@ -68,7 +68,7 @@ class MockCloner implements ClonerInterface { public function cloneVar($var) { - return new Data(array(array($var.'-'))); + return new Data([[$var.'-']]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php index 0b73075e..c4e8cd50 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php @@ -94,7 +94,7 @@ class ExceptionListenerTest extends TestCase public function provider() { if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - return array(array(null, null)); + return [[null, null]]; } $request = new Request(); @@ -102,9 +102,9 @@ class ExceptionListenerTest extends TestCase $event = new GetResponseForExceptionEvent(new TestKernel(), $request, HttpKernelInterface::MASTER_REQUEST, $exception); $event2 = new GetResponseForExceptionEvent(new TestKernelThatThrowsException(), $request, HttpKernelInterface::MASTER_REQUEST, $exception); - return array( - array($event, $event2), - ); + return [ + [$event, $event2], + ]; } public function testSubRequestFormat() @@ -142,7 +142,7 @@ class ExceptionListenerTest extends TestCase $event = new GetResponseForExceptionEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST, new \Exception('foo')); $dispatcher->dispatch(KernelEvents::EXCEPTION, $event); - $response = new Response('', 200, array('content-security-policy' => "style-src 'self'")); + $response = new Response('', 200, ['content-security-policy' => "style-src 'self'"]); $this->assertTrue($response->headers->has('content-security-policy')); $event = new FilterResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST, $response); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.php index edf04982..6408b1b2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.php @@ -68,7 +68,7 @@ class FragmentListenerTest extends TestCase */ public function testAccessDeniedWithWrongSignature() { - $request = Request::create('http://example.com/_fragment', 'GET', array(), array(), array(), array('REMOTE_ADDR' => '10.0.0.1')); + $request = Request::create('http://example.com/_fragment', 'GET', [], [], [], ['REMOTE_ADDR' => '10.0.0.1']); $listener = new FragmentListener(new UriSigner('foo')); $event = $this->createGetResponseEvent($request); @@ -79,14 +79,14 @@ class FragmentListenerTest extends TestCase public function testWithSignature() { $signer = new UriSigner('foo'); - $request = Request::create($signer->sign('http://example.com/_fragment?_path=foo%3Dbar%26_controller%3Dfoo'), 'GET', array(), array(), array(), array('REMOTE_ADDR' => '10.0.0.1')); + $request = Request::create($signer->sign('http://example.com/_fragment?_path=foo%3Dbar%26_controller%3Dfoo'), 'GET', [], [], [], ['REMOTE_ADDR' => '10.0.0.1']); $listener = new FragmentListener($signer); $event = $this->createGetResponseEvent($request); $listener->onKernelRequest($event); - $this->assertEquals(array('foo' => 'bar', '_controller' => 'foo'), $request->attributes->get('_route_params')); + $this->assertEquals(['foo' => 'bar', '_controller' => 'foo'], $request->attributes->get('_route_params')); $this->assertFalse($request->query->has('_path')); } @@ -105,7 +105,7 @@ class FragmentListenerTest extends TestCase public function testRemovesPathWithControllerNotDefined() { $signer = new UriSigner('foo'); - $request = Request::create($signer->sign('http://example.com/_fragment?_path=foo%3Dbar'), 'GET', array(), array(), array(), array('REMOTE_ADDR' => '10.0.0.1')); + $request = Request::create($signer->sign('http://example.com/_fragment?_path=foo%3Dbar'), 'GET', [], [], [], ['REMOTE_ADDR' => '10.0.0.1']); $listener = new FragmentListener($signer); $event = $this->createGetResponseEvent($request); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php index f442235a..1cf4b72c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php @@ -54,7 +54,7 @@ class LocaleListenerTest extends TestCase $context = $this->getMockBuilder('Symfony\Component\Routing\RequestContext')->getMock(); $context->expects($this->once())->method('setParameter')->with('_locale', 'es'); - $router = $this->getMockBuilder('Symfony\Component\Routing\Router')->setMethods(array('getContext'))->disableOriginalConstructor()->getMock(); + $router = $this->getMockBuilder('Symfony\Component\Routing\Router')->setMethods(['getContext'])->disableOriginalConstructor()->getMock(); $router->expects($this->once())->method('getContext')->will($this->returnValue($context)); $request = Request::create('/'); @@ -70,7 +70,7 @@ class LocaleListenerTest extends TestCase $context = $this->getMockBuilder('Symfony\Component\Routing\RequestContext')->getMock(); $context->expects($this->once())->method('setParameter')->with('_locale', 'es'); - $router = $this->getMockBuilder('Symfony\Component\Routing\Router')->setMethods(array('getContext'))->disableOriginalConstructor()->getMock(); + $router = $this->getMockBuilder('Symfony\Component\Routing\Router')->setMethods(['getContext'])->disableOriginalConstructor()->getMock(); $router->expects($this->once())->method('getContext')->will($this->returnValue($context)); $parentRequest = Request::create('/'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php index 526b3aa7..392aa2fc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php @@ -19,6 +19,7 @@ use Symfony\Component\HttpKernel\Event\PostResponseEvent; use Symfony\Component\HttpKernel\EventListener\ProfilerListener; use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\HttpKernel\Profiler\Profile; class ProfilerListenerTest extends TestCase { @@ -27,9 +28,7 @@ class ProfilerListenerTest extends TestCase */ public function testKernelTerminate() { - $profile = $this->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profile') - ->disableOriginalConstructor() - ->getMock(); + $profile = new Profile('token'); $profiler = $this->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profiler') ->disableOriginalConstructor() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ResponseListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ResponseListenerTest.php index 1d896026..aeab68f3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ResponseListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ResponseListenerTest.php @@ -30,7 +30,7 @@ class ResponseListenerTest extends TestCase { $this->dispatcher = new EventDispatcher(); $listener = new ResponseListener('UTF-8'); - $this->dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'onKernelResponse')); + $this->dispatcher->addListener(KernelEvents::RESPONSE, [$listener, 'onKernelResponse']); $this->kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); } @@ -54,7 +54,7 @@ class ResponseListenerTest extends TestCase public function testFilterSetsNonDefaultCharsetIfNotOverridden() { $listener = new ResponseListener('ISO-8859-15'); - $this->dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'onKernelResponse'), 1); + $this->dispatcher->addListener(KernelEvents::RESPONSE, [$listener, 'onKernelResponse'], 1); $response = new Response('foo'); @@ -67,7 +67,7 @@ class ResponseListenerTest extends TestCase public function testFilterDoesNothingIfCharsetIsOverridden() { $listener = new ResponseListener('ISO-8859-15'); - $this->dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'onKernelResponse'), 1); + $this->dispatcher->addListener(KernelEvents::RESPONSE, [$listener, 'onKernelResponse'], 1); $response = new Response('foo'); $response->setCharset('ISO-8859-1'); @@ -81,7 +81,7 @@ class ResponseListenerTest extends TestCase public function testFiltersSetsNonDefaultCharsetIfNotOverriddenOnNonTextContentType() { $listener = new ResponseListener('ISO-8859-15'); - $this->dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'onKernelResponse'), 1); + $this->dispatcher->addListener(KernelEvents::RESPONSE, [$listener, 'onKernelResponse'], 1); $response = new Response('foo'); $request = Request::create('/'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php index ecbce409..218af8d3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php @@ -62,12 +62,12 @@ class RouterListenerTest extends TestCase public function getPortData() { - return array( - array(80, 443, 'http://localhost/', 80, 443), - array(80, 443, 'http://localhost:90/', 90, 443), - array(80, 443, 'https://localhost/', 80, 443), - array(80, 443, 'https://localhost:90/', 80, 90), - ); + return [ + [80, 443, 'http://localhost/', 80, 443], + [80, 443, 'http://localhost:90/', 90, 443], + [80, 443, 'https://localhost/', 80, 443], + [80, 443, 'https://localhost:90/', 80, 90], + ]; } /** @@ -102,7 +102,7 @@ class RouterListenerTest extends TestCase $requestMatcher->expects($this->once()) ->method('matchRequest') ->with($this->isInstanceOf('Symfony\Component\HttpFoundation\Request')) - ->will($this->returnValue(array())); + ->will($this->returnValue([])); $listener = new RouterListener($requestMatcher, $this->requestStack, new RequestContext()); $listener->onKernelRequest($event); @@ -118,7 +118,7 @@ class RouterListenerTest extends TestCase $requestMatcher->expects($this->any()) ->method('matchRequest') ->with($this->isInstanceOf('Symfony\Component\HttpFoundation\Request')) - ->will($this->returnValue(array())); + ->will($this->returnValue([])); $context = new RequestContext(); @@ -159,10 +159,10 @@ class RouterListenerTest extends TestCase public function getLoggingParameterData() { - return array( - array(array('_route' => 'foo'), 'Matched route "{route}".', array('route' => 'foo', 'route_parameters' => array('_route' => 'foo'), 'request_uri' => 'http://localhost/', 'method' => 'GET')), - array(array(), 'Matched route "{route}".', array('route' => 'n/a', 'route_parameters' => array(), 'request_uri' => 'http://localhost/', 'method' => 'GET')), - ); + return [ + [['_route' => 'foo'], 'Matched route "{route}".', ['route' => 'foo', 'route_parameters' => ['_route' => 'foo'], 'request_uri' => 'http://localhost/', 'method' => 'GET']], + [[], 'Matched route "{route}".', ['route' => 'n/a', 'route_parameters' => [], 'request_uri' => 'http://localhost/', 'method' => 'GET']], + ]; } public function testWithBadRequest() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php index 1b95d19f..f0bac605 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php @@ -90,7 +90,7 @@ class SessionListenerTest extends TestCase $request = new Request(); $response = new Response(); - $response->setCache(array('public' => true, 'max_age' => '30')); + $response->setCache(['public' => true, 'max_age' => '30']); $listener->onKernelRequest(new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST)); $this->assertTrue($request->hasSession()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/SurrogateListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/SurrogateListenerTest.php index b955c07d..66e119f1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/SurrogateListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/SurrogateListenerTest.php @@ -30,7 +30,7 @@ class SurrogateListenerTest extends TestCase $response = new Response('foo '); $listener = new SurrogateListener(new Esi()); - $dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'onKernelResponse')); + $dispatcher->addListener(KernelEvents::RESPONSE, [$listener, 'onKernelResponse']); $event = new FilterResponseEvent($kernel, new Request(), HttpKernelInterface::SUB_REQUEST, $response); $dispatcher->dispatch(KernelEvents::RESPONSE, $event); @@ -44,7 +44,7 @@ class SurrogateListenerTest extends TestCase $response = new Response('foo '); $listener = new SurrogateListener(new Esi()); - $dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'onKernelResponse')); + $dispatcher->addListener(KernelEvents::RESPONSE, [$listener, 'onKernelResponse']); $event = new FilterResponseEvent($kernel, new Request(), HttpKernelInterface::MASTER_REQUEST, $response); $dispatcher->dispatch(KernelEvents::RESPONSE, $event); @@ -58,7 +58,7 @@ class SurrogateListenerTest extends TestCase $response = new Response('foo'); $listener = new SurrogateListener(new Esi()); - $dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'onKernelResponse')); + $dispatcher->addListener(KernelEvents::RESPONSE, [$listener, 'onKernelResponse']); $event = new FilterResponseEvent($kernel, new Request(), HttpKernelInterface::MASTER_REQUEST, $response); $dispatcher->dispatch(KernelEvents::RESPONSE, $event); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php index 0d0985ca..f261f2ed 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php @@ -87,7 +87,7 @@ class TestSessionListenerTest extends TestCase $response = $this->filterResponse(new Request(), HttpKernelInterface::MASTER_REQUEST); - $this->assertSame(array(), $response->headers->getCookies()); + $this->assertSame([], $response->headers->getCookies()); } public function testEmptySessionWithNewSessionIdDoesSendCookie() @@ -97,7 +97,7 @@ class TestSessionListenerTest extends TestCase $this->fixSessionId('456'); $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); - $request = Request::create('/', 'GET', array(), array('MOCKSESSID' => '123')); + $request = Request::create('/', 'GET', [], ['MOCKSESSID' => '123']); $event = new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST); $this->listener->onKernelRequest($event); @@ -116,11 +116,11 @@ class TestSessionListenerTest extends TestCase $this->fixSessionId('456'); $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); - $request = Request::create('/', 'GET', array(), array('MOCKSESSID' => '123')); + $request = Request::create('/', 'GET', [], ['MOCKSESSID' => '123']); $event = new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST); $this->listener->onKernelRequest($event); - $response = new Response('', 200, array('Set-Cookie' => $existing)); + $response = new Response('', 200, ['Set-Cookie' => $existing]); $response = $this->filterResponse(new Request(), HttpKernelInterface::MASTER_REQUEST, $response); @@ -129,11 +129,11 @@ class TestSessionListenerTest extends TestCase public function anotherCookieProvider() { - return array( - 'same' => array('MOCKSESSID=789; path=/', array('MOCKSESSID=789; path=/')), - 'different domain' => array('MOCKSESSID=789; path=/; domain=example.com', array('MOCKSESSID=789; path=/; domain=example.com', 'MOCKSESSID=456; path=/')), - 'different path' => array('MOCKSESSID=789; path=/foo', array('MOCKSESSID=789; path=/foo', 'MOCKSESSID=456; path=/')), - ); + return [ + 'same' => ['MOCKSESSID=789; path=/', ['MOCKSESSID=789; path=/']], + 'different domain' => ['MOCKSESSID=789; path=/; domain=example.com', ['MOCKSESSID=789; path=/; domain=example.com', 'MOCKSESSID=456; path=/']], + 'different path' => ['MOCKSESSID=789; path=/foo', ['MOCKSESSID=789; path=/foo', 'MOCKSESSID=456; path=/']], + ]; } public function testUnstartedSessionIsNotSave() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/TranslatorListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/TranslatorListenerTest.php index 23b83317..c1d56ec8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/TranslatorListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/TranslatorListenerTest.php @@ -47,7 +47,7 @@ class TranslatorListenerTest extends TestCase $this->translator ->expects($this->at(0)) ->method('setLocale') - ->will($this->throwException(new \InvalidArgumentException())); + ->willThrowException(new \InvalidArgumentException()); $this->translator ->expects($this->at(1)) ->method('setLocale') @@ -84,7 +84,7 @@ class TranslatorListenerTest extends TestCase $this->translator ->expects($this->at(0)) ->method('setLocale') - ->will($this->throwException(new \InvalidArgumentException())); + ->willThrowException(new \InvalidArgumentException()); $this->translator ->expects($this->at(1)) ->method('setLocale') diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php index bdab742c..fb7a4379 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php @@ -23,7 +23,7 @@ class ValidateRequestListenerTest extends TestCase { protected function tearDown() { - Request::setTrustedProxies(array(), -1); + Request::setTrustedProxies([], -1); } /** @@ -35,12 +35,12 @@ class ValidateRequestListenerTest extends TestCase $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); $request = new Request(); - $request->setTrustedProxies(array('1.1.1.1'), Request::HEADER_X_FORWARDED_FOR | Request::HEADER_FORWARDED); + $request->setTrustedProxies(['1.1.1.1'], Request::HEADER_X_FORWARDED_FOR | Request::HEADER_FORWARDED); $request->server->set('REMOTE_ADDR', '1.1.1.1'); $request->headers->set('FORWARDED', 'for=2.2.2.2'); $request->headers->set('X_FORWARDED_FOR', '3.3.3.3'); - $dispatcher->addListener(KernelEvents::REQUEST, array(new ValidateRequestListener(), 'onKernelRequest')); + $dispatcher->addListener(KernelEvents::REQUEST, [new ValidateRequestListener(), 'onKernelRequest']); $event = new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST); $dispatcher->dispatch(KernelEvents::REQUEST, $event); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/HttpExceptionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/HttpExceptionTest.php index b6477355..f5fe9725 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/HttpExceptionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/HttpExceptionTest.php @@ -9,22 +9,22 @@ class HttpExceptionTest extends TestCase { public function headerDataProvider() { - return array( - array(array('X-Test' => 'Test')), - array(array('X-Test' => 1)), - array( - array( - array('X-Test' => 'Test'), - array('X-Test-2' => 'Test-2'), - ), - ), - ); + return [ + [['X-Test' => 'Test']], + [['X-Test' => 1]], + [ + [ + ['X-Test' => 'Test'], + ['X-Test-2' => 'Test-2'], + ], + ], + ]; } public function testHeadersDefault() { $exception = $this->createException(); - $this->assertSame(array(), $exception->getHeaders()); + $this->assertSame([], $exception->getHeaders()); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php index b5def13c..31dbf2f0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php @@ -8,8 +8,8 @@ class MethodNotAllowedHttpExceptionTest extends HttpExceptionTest { public function testHeadersDefault() { - $exception = new MethodNotAllowedHttpException(array('GET', 'PUT')); - $this->assertSame(array('Allow' => 'GET, PUT'), $exception->getHeaders()); + $exception = new MethodNotAllowedHttpException(['GET', 'PUT']); + $this->assertSame(['Allow' => 'GET, PUT'], $exception->getHeaders()); } /** @@ -17,7 +17,7 @@ class MethodNotAllowedHttpExceptionTest extends HttpExceptionTest */ public function testHeadersSetter($headers) { - $exception = new MethodNotAllowedHttpException(array('GET')); + $exception = new MethodNotAllowedHttpException(['GET']); $exception->setHeaders($headers); $this->assertSame($headers, $exception->getHeaders()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php index e41a23d4..cefde951 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php @@ -9,7 +9,7 @@ class ServiceUnavailableHttpExceptionTest extends HttpExceptionTest public function testHeadersDefaultRetryAfter() { $exception = new ServiceUnavailableHttpException(10); - $this->assertSame(array('Retry-After' => 10), $exception->getHeaders()); + $this->assertSame(['Retry-After' => 10], $exception->getHeaders()); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php index 2079bb33..73ee91a7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php @@ -9,7 +9,7 @@ class TooManyRequestsHttpExceptionTest extends HttpExceptionTest public function testHeadersDefaultRertyAfter() { $exception = new TooManyRequestsHttpException(10); - $this->assertSame(array('Retry-After' => 10), $exception->getHeaders()); + $this->assertSame(['Retry-After' => 10], $exception->getHeaders()); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/UnauthorizedHttpExceptionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/UnauthorizedHttpExceptionTest.php index 37a0028d..a8cc19ae 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/UnauthorizedHttpExceptionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/UnauthorizedHttpExceptionTest.php @@ -9,7 +9,7 @@ class UnauthorizedHttpExceptionTest extends HttpExceptionTest public function testHeadersDefault() { $exception = new UnauthorizedHttpException('Challenge'); - $this->assertSame(array('WWW-Authenticate' => 'Challenge'), $exception->getHeaders()); + $this->assertSame(['WWW-Authenticate' => 'Challenge'], $exception->getHeaders()); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/123/Kernel123.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/123/Kernel123.php index d3a76684..70c4026f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/123/Kernel123.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/123/Kernel123.php @@ -18,7 +18,7 @@ class Kernel123 extends Kernel { public function registerBundles() { - return array(); + return []; } public function registerContainerConfiguration(LoaderInterface $loader) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/DataCollector/CloneVarDataCollector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/DataCollector/CloneVarDataCollector.php index 89dec36a..4f5de182 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/DataCollector/CloneVarDataCollector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/DataCollector/CloneVarDataCollector.php @@ -31,7 +31,7 @@ class CloneVarDataCollector extends DataCollector public function reset() { - $this->data = array(); + $this->data = []; } public function getData() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTest.php index 9acee4ca..88c34b02 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTest.php @@ -23,7 +23,7 @@ class KernelForTest extends Kernel public function registerBundles() { - return array(); + return []; } public function registerContainerConfiguration(LoaderInterface $loader) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelWithoutBundles.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelWithoutBundles.php index cee1b09f..1f5a4560 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelWithoutBundles.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelWithoutBundles.php @@ -19,7 +19,7 @@ class KernelWithoutBundles extends Kernel { public function registerBundles() { - return array(); + return []; } public function registerContainerConfiguration(LoaderInterface $loader) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php index ca2e6a69..dc9c9166 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php @@ -18,12 +18,12 @@ class TestEventDispatcher extends EventDispatcher implements TraceableEventDispa { public function getCalledListeners() { - return array('foo'); + return ['foo']; } public function getNotCalledListeners() { - return array('bar'); + return ['bar']; } public function reset() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/EsiFragmentRendererTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/EsiFragmentRendererTest.php index 00d796d5..52d85519 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/EsiFragmentRendererTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/EsiFragmentRendererTest.php @@ -34,7 +34,7 @@ class EsiFragmentRendererTest extends TestCase { $strategy = new EsiFragmentRenderer(new Esi(), $this->getInlineStrategy(true), new UriSigner('foo')); $request = Request::create('/'); - $reference = new ControllerReference('main_controller', array('foo' => new \stdClass()), array()); + $reference = new ControllerReference('main_controller', ['foo' => new \stdClass()], []); $strategy->render($reference, $request); } @@ -42,7 +42,7 @@ class EsiFragmentRendererTest extends TestCase { $strategy = new EsiFragmentRenderer(new Esi(), $this->getInlineStrategy(true), new UriSigner('foo')); $request = Request::create('/'); - $reference = new ControllerReference('main_controller', array('foo' => array(true)), array()); + $reference = new ControllerReference('main_controller', ['foo' => [true]], []); $strategy->render($reference, $request); } @@ -55,8 +55,8 @@ class EsiFragmentRendererTest extends TestCase $request->headers->set('Surrogate-Capability', 'ESI/1.0'); $this->assertEquals('', $strategy->render('/', $request)->getContent()); - $this->assertEquals("\n", $strategy->render('/', $request, array('comment' => 'This is a comment'))->getContent()); - $this->assertEquals('', $strategy->render('/', $request, array('alt' => 'foo'))->getContent()); + $this->assertEquals("\n", $strategy->render('/', $request, ['comment' => 'This is a comment'])->getContent()); + $this->assertEquals('', $strategy->render('/', $request, ['alt' => 'foo'])->getContent()); } public function testRenderControllerReference() @@ -68,12 +68,12 @@ class EsiFragmentRendererTest extends TestCase $request->setLocale('fr'); $request->headers->set('Surrogate-Capability', 'ESI/1.0'); - $reference = new ControllerReference('main_controller', array(), array()); - $altReference = new ControllerReference('alt_controller', array(), array()); + $reference = new ControllerReference('main_controller', [], []); + $altReference = new ControllerReference('alt_controller', [], []); $this->assertEquals( - '', - $strategy->render($reference, $request, array('alt' => $altReference))->getContent() + '', + $strategy->render($reference, $request, ['alt' => $altReference])->getContent() ); } @@ -102,7 +102,7 @@ class EsiFragmentRendererTest extends TestCase $request->setLocale('fr'); $request->headers->set('Surrogate-Capability', 'ESI/1.0'); - $strategy->render('/', $request, array('alt' => new ControllerReference('alt_controller'))); + $strategy->render('/', $request, ['alt' => new ControllerReference('alt_controller')]); } private function getInlineStrategy($called = false) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php index a296aa0e..8829393e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php @@ -68,12 +68,12 @@ class FragmentHandlerTest extends TestCase public function testRender() { - $handler = $this->getHandler($this->returnValue(new Response('foo')), array('/', Request::create('/'), array('foo' => 'foo', 'ignore_errors' => true))); + $handler = $this->getHandler($this->returnValue(new Response('foo')), ['/', Request::create('/'), ['foo' => 'foo', 'ignore_errors' => true]]); - $this->assertEquals('foo', $handler->render('/', 'foo', array('foo' => 'foo'))); + $this->assertEquals('foo', $handler->render('/', 'foo', ['foo' => 'foo'])); } - protected function getHandler($returnValue, $arguments = array()) + protected function getHandler($returnValue, $arguments = []) { $renderer = $this->getMockBuilder('Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface')->getMock(); $renderer @@ -88,7 +88,7 @@ class FragmentHandlerTest extends TestCase ; if ($arguments) { - \call_user_func_array(array($e, 'with'), $arguments); + \call_user_func_array([$e, 'with'], $arguments); } $handler = new FragmentHandler($this->requestStack); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/HIncludeFragmentRendererTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/HIncludeFragmentRendererTest.php index 10fbccf0..6125d95f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/HIncludeFragmentRendererTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/HIncludeFragmentRendererTest.php @@ -25,14 +25,14 @@ class HIncludeFragmentRendererTest extends TestCase public function testRenderExceptionWhenControllerAndNoSigner() { $strategy = new HIncludeFragmentRenderer(); - $strategy->render(new ControllerReference('main_controller', array(), array()), Request::create('/')); + $strategy->render(new ControllerReference('main_controller', [], []), Request::create('/')); } public function testRenderWithControllerAndSigner() { $strategy = new HIncludeFragmentRenderer(null, new UriSigner('foo')); - $this->assertEquals('', $strategy->render(new ControllerReference('main_controller', array(), array()), Request::create('/'))->getContent()); + $this->assertEquals('', $strategy->render(new ControllerReference('main_controller', [], []), Request::create('/'))->getContent()); } public function testRenderWithUri() @@ -48,30 +48,30 @@ class HIncludeFragmentRendererTest extends TestCase { // only default $strategy = new HIncludeFragmentRenderer(); - $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), array('default' => 'default'))->getContent()); + $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), ['default' => 'default'])->getContent()); // only global default $strategy = new HIncludeFragmentRenderer(null, null, 'global_default'); - $this->assertEquals('global_default', $strategy->render('/foo', Request::create('/'), array())->getContent()); + $this->assertEquals('global_default', $strategy->render('/foo', Request::create('/'), [])->getContent()); // global default and default $strategy = new HIncludeFragmentRenderer(null, null, 'global_default'); - $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), array('default' => 'default'))->getContent()); + $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), ['default' => 'default'])->getContent()); } public function testRenderWithAttributesOptions() { // with id $strategy = new HIncludeFragmentRenderer(); - $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), array('default' => 'default', 'id' => 'bar'))->getContent()); + $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), ['default' => 'default', 'id' => 'bar'])->getContent()); // with attributes $strategy = new HIncludeFragmentRenderer(); - $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), array('default' => 'default', 'attributes' => array('p1' => 'v1', 'p2' => 'v2')))->getContent()); + $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), ['default' => 'default', 'attributes' => ['p1' => 'v1', 'p2' => 'v2']])->getContent()); // with id & attributes $strategy = new HIncludeFragmentRenderer(); - $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), array('default' => 'default', 'id' => 'bar', 'attributes' => array('p1' => 'v1', 'p2' => 'v2')))->getContent()); + $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), ['default' => 'default', 'id' => 'bar', 'attributes' => ['p1' => 'v1', 'p2' => 'v2']])->getContent()); } public function testRenderWithDefaultText() @@ -80,11 +80,11 @@ class HIncludeFragmentRendererTest extends TestCase $engine->expects($this->once()) ->method('exists') ->with('default') - ->will($this->throwException(new \InvalidArgumentException())); + ->willThrowException(new \InvalidArgumentException()); // only default $strategy = new HIncludeFragmentRenderer($engine); - $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), array('default' => 'default'))->getContent()); + $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), ['default' => 'default'])->getContent()); } public function testRenderWithEngineAndDefaultText() @@ -93,10 +93,10 @@ class HIncludeFragmentRendererTest extends TestCase $engine->expects($this->once()) ->method('exists') ->with('loading...') - ->will($this->throwException(new \RuntimeException())); + ->willThrowException(new \RuntimeException()); // only default $strategy = new HIncludeFragmentRenderer($engine); - $this->assertEquals('loading...', $strategy->render('/foo', Request::create('/'), array('default' => 'loading...'))->getContent()); + $this->assertEquals('loading...', $strategy->render('/foo', Request::create('/'), ['default' => 'loading...'])->getContent()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php index 80f9cd2b..11adf74c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php @@ -36,7 +36,7 @@ class InlineFragmentRendererTest extends TestCase { $strategy = new InlineFragmentRenderer($this->getKernel($this->returnValue(new Response('foo')))); - $this->assertEquals('foo', $strategy->render(new ControllerReference('main_controller', array(), array()), Request::create('/'))->getContent()); + $this->assertEquals('foo', $strategy->render(new ControllerReference('main_controller', [], []), Request::create('/'))->getContent()); } public function testRenderWithObjectsAsAttributes() @@ -44,15 +44,15 @@ class InlineFragmentRendererTest extends TestCase $object = new \stdClass(); $subRequest = Request::create('/_fragment?_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dmain_controller'); - $subRequest->attributes->replace(array('object' => $object, '_format' => 'html', '_controller' => 'main_controller', '_locale' => 'en')); - $subRequest->headers->set('x-forwarded-for', array('127.0.0.1')); - $subRequest->headers->set('forwarded', array('for="127.0.0.1";host="localhost";proto=http')); + $subRequest->attributes->replace(['object' => $object, '_format' => 'html', '_controller' => 'main_controller', '_locale' => 'en']); + $subRequest->headers->set('x-forwarded-for', ['127.0.0.1']); + $subRequest->headers->set('forwarded', ['for="127.0.0.1";host="localhost";proto=http']); $subRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); $subRequest->server->set('HTTP_FORWARDED', 'for="127.0.0.1";host="localhost";proto=http'); $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest($subRequest)); - $this->assertSame('foo', $strategy->render(new ControllerReference('main_controller', array('object' => $object), array()), Request::create('/'))->getContent()); + $this->assertSame('foo', $strategy->render(new ControllerReference('main_controller', ['object' => $object], []), Request::create('/'))->getContent()); } /** @@ -60,7 +60,7 @@ class InlineFragmentRendererTest extends TestCase */ public function testRenderWithObjectsAsAttributesPassedAsObjectsInTheControllerLegacy() { - $resolver = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver')->setMethods(array('getController'))->getMock(); + $resolver = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver')->setMethods(['getController'])->getMock(); $resolver ->expects($this->once()) ->method('getController') @@ -72,7 +72,7 @@ class InlineFragmentRendererTest extends TestCase $kernel = new HttpKernel(new EventDispatcher(), $resolver, new RequestStack()); $renderer = new InlineFragmentRenderer($kernel); - $response = $renderer->render(new ControllerReference('main_controller', array('object' => new \stdClass(), 'object1' => new Bar()), array()), Request::create('/')); + $response = $renderer->render(new ControllerReference('main_controller', ['object' => new \stdClass(), 'object1' => new Bar()], []), Request::create('/')); $this->assertEquals('bar', $response->getContent()); } @@ -93,22 +93,22 @@ class InlineFragmentRendererTest extends TestCase $kernel = new HttpKernel(new EventDispatcher(), $resolver, new RequestStack(), new ArgumentResolver()); $renderer = new InlineFragmentRenderer($kernel); - $response = $renderer->render(new ControllerReference('main_controller', array('object' => new \stdClass(), 'object1' => new Bar()), array()), Request::create('/')); + $response = $renderer->render(new ControllerReference('main_controller', ['object' => new \stdClass(), 'object1' => new Bar()], []), Request::create('/')); $this->assertEquals('bar', $response->getContent()); } public function testRenderWithTrustedHeaderDisabled() { - Request::setTrustedProxies(array(), 0); + Request::setTrustedProxies([], 0); $expectedSubRequest = Request::create('/'); - $expectedSubRequest->headers->set('x-forwarded-for', array('127.0.0.1')); + $expectedSubRequest->headers->set('x-forwarded-for', ['127.0.0.1']); $expectedSubRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest($expectedSubRequest)); $this->assertSame('foo', $strategy->render('/', Request::create('/'))->getContent()); - Request::setTrustedProxies(array(), -1); + Request::setTrustedProxies([], -1); } /** @@ -131,7 +131,7 @@ class InlineFragmentRendererTest extends TestCase $strategy = new InlineFragmentRenderer($this->getKernel($this->throwException(new \RuntimeException('foo'))), $dispatcher); - $this->assertEmpty($strategy->render('/', Request::create('/'), array('ignore_errors' => true))->getContent()); + $this->assertEmpty($strategy->render('/', Request::create('/'), ['ignore_errors' => true])->getContent()); } public function testRenderExceptionIgnoreErrorsWithAlt() @@ -141,7 +141,7 @@ class InlineFragmentRendererTest extends TestCase $this->returnValue(new Response('bar')) ))); - $this->assertEquals('bar', $strategy->render('/', Request::create('/'), array('ignore_errors' => true, 'alt' => '/foo'))->getContent()); + $this->assertEquals('bar', $strategy->render('/', Request::create('/'), ['ignore_errors' => true, 'alt' => '/foo'])->getContent()); } private function getKernel($returnValue) @@ -173,7 +173,7 @@ class InlineFragmentRendererTest extends TestCase $argumentResolver ->expects($this->once()) ->method('getArguments') - ->will($this->returnValue(array())) + ->will($this->returnValue([])) ; $kernel = new HttpKernel(new EventDispatcher(), $controllerResolver, new RequestStack(), $argumentResolver); @@ -184,7 +184,7 @@ class InlineFragmentRendererTest extends TestCase echo 'Foo'; // simulate a sub-request with output buffering and an exception - $renderer->render('/', Request::create('/'), array('ignore_errors' => true)); + $renderer->render('/', Request::create('/'), ['ignore_errors' => true]); $this->assertEquals('Foo', ob_get_clean()); } @@ -195,10 +195,10 @@ class InlineFragmentRendererTest extends TestCase $expectedSubRequest->attributes->set('_format', 'foo'); $expectedSubRequest->setLocale('fr'); if (Request::HEADER_X_FORWARDED_FOR & Request::getTrustedHeaderSet()) { - $expectedSubRequest->headers->set('x-forwarded-for', array('127.0.0.1')); + $expectedSubRequest->headers->set('x-forwarded-for', ['127.0.0.1']); $expectedSubRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); } - $expectedSubRequest->headers->set('forwarded', array('for="127.0.0.1";host="localhost";proto=http')); + $expectedSubRequest->headers->set('forwarded', ['for="127.0.0.1";host="localhost";proto=http']); $expectedSubRequest->server->set('HTTP_FORWARDED', 'for="127.0.0.1";host="localhost";proto=http'); $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest($expectedSubRequest)); @@ -215,10 +215,10 @@ class InlineFragmentRendererTest extends TestCase $expectedSubRequest->headers->set('Surrogate-Capability', 'abc="ESI/1.0"'); if (Request::HEADER_X_FORWARDED_FOR & Request::getTrustedHeaderSet()) { - $expectedSubRequest->headers->set('x-forwarded-for', array('127.0.0.1')); + $expectedSubRequest->headers->set('x-forwarded-for', ['127.0.0.1']); $expectedSubRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); } - $expectedSubRequest->headers->set('forwarded', array('for="127.0.0.1";host="localhost";proto=http')); + $expectedSubRequest->headers->set('forwarded', ['for="127.0.0.1";host="localhost";proto=http']); $expectedSubRequest->server->set('HTTP_FORWARDED', 'for="127.0.0.1";host="localhost";proto=http'); $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest($expectedSubRequest)); @@ -230,35 +230,35 @@ class InlineFragmentRendererTest extends TestCase public function testESIHeaderIsKeptInSubrequestWithTrustedHeaderDisabled() { - Request::setTrustedProxies(array(), Request::HEADER_FORWARDED); + Request::setTrustedProxies([], Request::HEADER_FORWARDED); $this->testESIHeaderIsKeptInSubrequest(); - Request::setTrustedProxies(array(), -1); + Request::setTrustedProxies([], -1); } public function testHeadersPossiblyResultingIn304AreNotAssignedToSubrequest() { $expectedSubRequest = Request::create('/'); - $expectedSubRequest->headers->set('x-forwarded-for', array('127.0.0.1')); - $expectedSubRequest->headers->set('forwarded', array('for="127.0.0.1";host="localhost";proto=http')); + $expectedSubRequest->headers->set('x-forwarded-for', ['127.0.0.1']); + $expectedSubRequest->headers->set('forwarded', ['for="127.0.0.1";host="localhost";proto=http']); $expectedSubRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); $expectedSubRequest->server->set('HTTP_FORWARDED', 'for="127.0.0.1";host="localhost";proto=http'); $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest($expectedSubRequest)); - $request = Request::create('/', 'GET', array(), array(), array(), array('HTTP_IF_MODIFIED_SINCE' => 'Fri, 01 Jan 2016 00:00:00 GMT', 'HTTP_IF_NONE_MATCH' => '*')); + $request = Request::create('/', 'GET', [], [], [], ['HTTP_IF_MODIFIED_SINCE' => 'Fri, 01 Jan 2016 00:00:00 GMT', 'HTTP_IF_NONE_MATCH' => '*']); $strategy->render('/', $request); } public function testFirstTrustedProxyIsSetAsRemote() { - Request::setTrustedProxies(array('1.1.1.1'), -1); + Request::setTrustedProxies(['1.1.1.1'], -1); $expectedSubRequest = Request::create('/'); $expectedSubRequest->headers->set('Surrogate-Capability', 'abc="ESI/1.0"'); $expectedSubRequest->server->set('REMOTE_ADDR', '127.0.0.1'); - $expectedSubRequest->headers->set('x-forwarded-for', array('127.0.0.1')); - $expectedSubRequest->headers->set('forwarded', array('for="127.0.0.1";host="localhost";proto=http')); + $expectedSubRequest->headers->set('x-forwarded-for', ['127.0.0.1']); + $expectedSubRequest->headers->set('forwarded', ['for="127.0.0.1";host="localhost";proto=http']); $expectedSubRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); $expectedSubRequest->server->set('HTTP_FORWARDED', 'for="127.0.0.1";host="localhost";proto=http'); @@ -268,7 +268,7 @@ class InlineFragmentRendererTest extends TestCase $request->headers->set('Surrogate-Capability', 'abc="ESI/1.0"'); $strategy->render('/', $request); - Request::setTrustedProxies(array(), -1); + Request::setTrustedProxies([], -1); } public function testIpAddressOfRangedTrustedProxyIsSetAsRemote() @@ -276,12 +276,12 @@ class InlineFragmentRendererTest extends TestCase $expectedSubRequest = Request::create('/'); $expectedSubRequest->headers->set('Surrogate-Capability', 'abc="ESI/1.0"'); $expectedSubRequest->server->set('REMOTE_ADDR', '127.0.0.1'); - $expectedSubRequest->headers->set('x-forwarded-for', array('127.0.0.1')); - $expectedSubRequest->headers->set('forwarded', array('for="127.0.0.1";host="localhost";proto=http')); + $expectedSubRequest->headers->set('x-forwarded-for', ['127.0.0.1']); + $expectedSubRequest->headers->set('forwarded', ['for="127.0.0.1";host="localhost";proto=http']); $expectedSubRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); $expectedSubRequest->server->set('HTTP_FORWARDED', 'for="127.0.0.1";host="localhost";proto=http'); - Request::setTrustedProxies(array('1.1.1.1/24'), -1); + Request::setTrustedProxies(['1.1.1.1/24'], -1); $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest($expectedSubRequest)); @@ -289,7 +289,7 @@ class InlineFragmentRendererTest extends TestCase $request->headers->set('Surrogate-Capability', 'abc="ESI/1.0"'); $strategy->render('/', $request); - Request::setTrustedProxies(array(), -1); + Request::setTrustedProxies([], -1); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php index 3a040ded..c03e8c4a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php @@ -35,14 +35,14 @@ class RoutableFragmentRendererTest extends TestCase public function getGenerateFragmentUriData() { - return array( - array('/_fragment?_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array(), array())), - array('/_fragment?_path=_format%3Dxml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array('_format' => 'xml'), array())), - array('/_fragment?_path=foo%3Dfoo%26_format%3Djson%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array('foo' => 'foo', '_format' => 'json'), array())), - array('/_fragment?bar=bar&_path=foo%3Dfoo%26_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array('foo' => 'foo'), array('bar' => 'bar'))), - array('/_fragment?foo=foo&_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array(), array('foo' => 'foo'))), - array('/_fragment?_path=foo%255B0%255D%3Dfoo%26foo%255B1%255D%3Dbar%26_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array('foo' => array('foo', 'bar')), array())), - ); + return [ + ['/_fragment?_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', [], [])], + ['/_fragment?_path=_format%3Dxml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', ['_format' => 'xml'], [])], + ['/_fragment?_path=foo%3Dfoo%26_format%3Djson%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', ['foo' => 'foo', '_format' => 'json'], [])], + ['/_fragment?bar=bar&_path=foo%3Dfoo%26_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', ['foo' => 'foo'], ['bar' => 'bar'])], + ['/_fragment?foo=foo&_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', [], ['foo' => 'foo'])], + ['/_fragment?_path=foo%255B0%255D%3Dfoo%26foo%255B1%255D%3Dbar%26_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', ['foo' => ['foo', 'bar']], [])], + ]; } public function testGenerateFragmentUriWithARequest() @@ -50,7 +50,7 @@ class RoutableFragmentRendererTest extends TestCase $request = Request::create('/'); $request->attributes->set('_format', 'json'); $request->setLocale('fr'); - $controller = new ControllerReference('controller', array(), array()); + $controller = new ControllerReference('controller', [], []); $this->assertEquals('/_fragment?_path=_format%3Djson%26_locale%3Dfr%26_controller%3Dcontroller', $this->callGenerateFragmentUriMethod($controller, $request)); } @@ -66,10 +66,10 @@ class RoutableFragmentRendererTest extends TestCase public function getGenerateFragmentUriDataWithNonScalar() { - return array( - array(new ControllerReference('controller', array('foo' => new Foo(), 'bar' => 'bar'), array())), - array(new ControllerReference('controller', array('foo' => array('foo' => 'foo'), 'bar' => array('bar' => new Foo())), array())), - ); + return [ + [new ControllerReference('controller', ['foo' => new Foo(), 'bar' => 'bar'], [])], + [new ControllerReference('controller', ['foo' => ['foo' => 'foo'], 'bar' => ['bar' => new Foo()]], [])], + ]; } private function callGenerateFragmentUriMethod(ControllerReference $reference, Request $request, $absolute = false) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/SsiFragmentRendererTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/SsiFragmentRendererTest.php index f7258031..b2181725 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/SsiFragmentRendererTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/SsiFragmentRendererTest.php @@ -35,7 +35,7 @@ class SsiFragmentRendererTest extends TestCase $request->headers->set('Surrogate-Capability', 'SSI/1.0'); $this->assertEquals('', $strategy->render('/', $request)->getContent()); - $this->assertEquals('', $strategy->render('/', $request, array('comment' => 'This is a comment'))->getContent(), 'Strategy options should not impact the ssi include tag'); + $this->assertEquals('', $strategy->render('/', $request, ['comment' => 'This is a comment'])->getContent(), 'Strategy options should not impact the ssi include tag'); } public function testRenderControllerReference() @@ -47,12 +47,12 @@ class SsiFragmentRendererTest extends TestCase $request->setLocale('fr'); $request->headers->set('Surrogate-Capability', 'SSI/1.0'); - $reference = new ControllerReference('main_controller', array(), array()); - $altReference = new ControllerReference('alt_controller', array(), array()); + $reference = new ControllerReference('main_controller', [], []); + $altReference = new ControllerReference('alt_controller', [], []); $this->assertEquals( - '', - $strategy->render($reference, $request, array('alt' => $altReference))->getContent() + '', + $strategy->render($reference, $request, ['alt' => $altReference])->getContent() ); } @@ -81,7 +81,7 @@ class SsiFragmentRendererTest extends TestCase $request->setLocale('fr'); $request->headers->set('Surrogate-Capability', 'SSI/1.0'); - $strategy->render('/', $request, array('alt' => new ControllerReference('alt_controller'))); + $strategy->render('/', $request, ['alt' => new ControllerReference('alt_controller')]); } private function getInlineStrategy($called = false) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/EsiTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/EsiTest.php index 863ad761..ccc3eecf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/EsiTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/EsiTest.php @@ -220,13 +220,13 @@ class EsiTest extends TestCase $response1 = new Response('foo'); $response1->setStatusCode(404); $response2 = new Response('bar'); - $cache = $this->getCache(Request::create('/'), array($response1, $response2)); + $cache = $this->getCache(Request::create('/'), [$response1, $response2]); $this->assertEquals('bar', $esi->handle($cache, '/', '/alt', false)); } protected function getCache($request, $response) { - $cache = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpCache\HttpCache')->setMethods(array('getRequest', 'handle'))->disableOriginalConstructor()->getMock(); + $cache = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpCache\HttpCache')->setMethods(['getRequest', 'handle'])->disableOriginalConstructor()->getMock(); $cache->expects($this->any()) ->method('getRequest') ->will($this->returnValue($request)) @@ -234,7 +234,7 @@ class EsiTest extends TestCase if (\is_array($response)) { $cache->expects($this->any()) ->method('handle') - ->will(\call_user_func_array(array($this, 'onConsecutiveCalls'), $response)) + ->will(\call_user_func_array([$this, 'onConsecutiveCalls'], $response)) ; } else { $cache->expects($this->any()) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php index a41d8665..7b3cac78 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php @@ -39,7 +39,7 @@ class HttpCacheTest extends HttpCacheTestCase // implements TerminableInterface $kernelMock = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\Kernel') ->disableOriginalConstructor() - ->setMethods(array('terminate', 'registerBundles', 'registerContainerConfiguration')) + ->setMethods(['terminate', 'registerBundles', 'registerContainerConfiguration']) ->getMock(); $kernelMock->expects($this->once()) @@ -61,7 +61,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testInvalidatesOnPostPutDeleteRequests() { - foreach (array('post', 'put', 'delete') as $method) { + foreach (['post', 'put', 'delete'] as $method) { $this->setNextResponse(200); $this->request($method, '/'); @@ -74,8 +74,8 @@ class HttpCacheTest extends HttpCacheTestCase public function testDoesNotCacheWithAuthorizationRequestHeaderAndNonPublicResponse() { - $this->setNextResponse(200, array('ETag' => '"Foo"')); - $this->request('GET', '/', array('HTTP_AUTHORIZATION' => 'basic foobarbaz')); + $this->setNextResponse(200, ['ETag' => '"Foo"']); + $this->request('GET', '/', ['HTTP_AUTHORIZATION' => 'basic foobarbaz']); $this->assertHttpKernelIsCalled(); $this->assertResponseOk(); @@ -88,8 +88,8 @@ class HttpCacheTest extends HttpCacheTestCase public function testDoesCacheWithAuthorizationRequestHeaderAndPublicResponse() { - $this->setNextResponse(200, array('Cache-Control' => 'public', 'ETag' => '"Foo"')); - $this->request('GET', '/', array('HTTP_AUTHORIZATION' => 'basic foobarbaz')); + $this->setNextResponse(200, ['Cache-Control' => 'public', 'ETag' => '"Foo"']); + $this->request('GET', '/', ['HTTP_AUTHORIZATION' => 'basic foobarbaz']); $this->assertHttpKernelIsCalled(); $this->assertResponseOk(); @@ -101,8 +101,8 @@ class HttpCacheTest extends HttpCacheTestCase public function testDoesNotCacheWithCookieHeaderAndNonPublicResponse() { - $this->setNextResponse(200, array('ETag' => '"Foo"')); - $this->request('GET', '/', array(), array('foo' => 'bar')); + $this->setNextResponse(200, ['ETag' => '"Foo"']); + $this->request('GET', '/', [], ['foo' => 'bar']); $this->assertHttpKernelIsCalled(); $this->assertResponseOk(); @@ -115,7 +115,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testDoesNotCacheRequestsWithACookieHeader() { $this->setNextResponse(200); - $this->request('GET', '/', array(), array('foo' => 'bar')); + $this->request('GET', '/', [], ['foo' => 'bar']); $this->assertHttpKernelIsCalled(); $this->assertResponseOk(); @@ -129,8 +129,8 @@ class HttpCacheTest extends HttpCacheTestCase { $time = \DateTime::createFromFormat('U', time()); - $this->setNextResponse(200, array('Cache-Control' => 'public', 'Last-Modified' => $time->format(DATE_RFC2822), 'Content-Type' => 'text/plain'), 'Hello World'); - $this->request('GET', '/', array('HTTP_IF_MODIFIED_SINCE' => $time->format(DATE_RFC2822))); + $this->setNextResponse(200, ['Cache-Control' => 'public', 'Last-Modified' => $time->format(DATE_RFC2822), 'Content-Type' => 'text/plain'], 'Hello World'); + $this->request('GET', '/', ['HTTP_IF_MODIFIED_SINCE' => $time->format(DATE_RFC2822)]); $this->assertHttpKernelIsCalled(); $this->assertEquals(304, $this->response->getStatusCode()); @@ -142,8 +142,8 @@ class HttpCacheTest extends HttpCacheTestCase public function testRespondsWith304WhenIfNoneMatchMatchesETag() { - $this->setNextResponse(200, array('Cache-Control' => 'public', 'ETag' => '12345', 'Content-Type' => 'text/plain'), 'Hello World'); - $this->request('GET', '/', array('HTTP_IF_NONE_MATCH' => '12345')); + $this->setNextResponse(200, ['Cache-Control' => 'public', 'ETag' => '12345', 'Content-Type' => 'text/plain'], 'Hello World'); + $this->request('GET', '/', ['HTTP_IF_NONE_MATCH' => '12345']); $this->assertHttpKernelIsCalled(); $this->assertEquals(304, $this->response->getStatusCode()); @@ -158,7 +158,7 @@ class HttpCacheTest extends HttpCacheTestCase { $time = \DateTime::createFromFormat('U', time()); - $this->setNextResponse(200, array(), '', function ($request, $response) use ($time) { + $this->setNextResponse(200, [], '', function ($request, $response) use ($time) { $response->setStatusCode(200); $response->headers->set('ETag', '12345'); $response->headers->set('Last-Modified', $time->format(DATE_RFC2822)); @@ -168,17 +168,17 @@ class HttpCacheTest extends HttpCacheTestCase // only ETag matches $t = \DateTime::createFromFormat('U', time() - 3600); - $this->request('GET', '/', array('HTTP_IF_NONE_MATCH' => '12345', 'HTTP_IF_MODIFIED_SINCE' => $t->format(DATE_RFC2822))); + $this->request('GET', '/', ['HTTP_IF_NONE_MATCH' => '12345', 'HTTP_IF_MODIFIED_SINCE' => $t->format(DATE_RFC2822)]); $this->assertHttpKernelIsCalled(); $this->assertEquals(200, $this->response->getStatusCode()); // only Last-Modified matches - $this->request('GET', '/', array('HTTP_IF_NONE_MATCH' => '1234', 'HTTP_IF_MODIFIED_SINCE' => $time->format(DATE_RFC2822))); + $this->request('GET', '/', ['HTTP_IF_NONE_MATCH' => '1234', 'HTTP_IF_MODIFIED_SINCE' => $time->format(DATE_RFC2822)]); $this->assertHttpKernelIsCalled(); $this->assertEquals(200, $this->response->getStatusCode()); // Both matches - $this->request('GET', '/', array('HTTP_IF_NONE_MATCH' => '12345', 'HTTP_IF_MODIFIED_SINCE' => $time->format(DATE_RFC2822))); + $this->request('GET', '/', ['HTTP_IF_NONE_MATCH' => '12345', 'HTTP_IF_MODIFIED_SINCE' => $time->format(DATE_RFC2822)]); $this->assertHttpKernelIsCalled(); $this->assertEquals(304, $this->response->getStatusCode()); } @@ -187,10 +187,10 @@ class HttpCacheTest extends HttpCacheTestCase { $this->setNextResponse( 200, - array( + [ 'ETag' => '1234', 'Cache-Control' => 'public, s-maxage=60', - ) + ] ); $this->request('GET', '/'); @@ -210,7 +210,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testValidatesPrivateResponsesCachedOnTheClient() { - $this->setNextResponse(200, array(), '', function ($request, $response) { + $this->setNextResponse(200, [], '', function ($request, $response) { $etags = preg_split('/\s*,\s*/', $request->headers->get('IF_NONE_MATCH')); if ($request->cookies->has('authenticated')) { $response->headers->set('Cache-Control', 'private, no-store'); @@ -243,7 +243,7 @@ class HttpCacheTest extends HttpCacheTestCase $this->assertTraceContains('miss'); $this->assertTraceContains('store'); - $this->request('GET', '/', array(), array('authenticated' => '')); + $this->request('GET', '/', [], ['authenticated' => '']); $this->assertHttpKernelIsCalled(); $this->assertEquals(200, $this->response->getStatusCode()); $this->assertEquals('"private tag"', $this->response->headers->get('ETag')); @@ -257,8 +257,8 @@ class HttpCacheTest extends HttpCacheTestCase { $time = \DateTime::createFromFormat('U', time() + 5); - $this->setNextResponse(200, array('Cache-Control' => 'public', 'Expires' => $time->format(DATE_RFC2822))); - $this->request('GET', '/', array('HTTP_CACHE_CONTROL' => 'no-cache')); + $this->setNextResponse(200, ['Cache-Control' => 'public', 'Expires' => $time->format(DATE_RFC2822)]); + $this->request('GET', '/', ['HTTP_CACHE_CONTROL' => 'no-cache']); $this->assertHttpKernelIsCalled(); $this->assertTraceContains('store'); @@ -269,7 +269,7 @@ class HttpCacheTest extends HttpCacheTestCase { $count = 0; - $this->setNextResponse(200, array('Cache-Control' => 'public, max-age=10000'), '', function ($request, $response) use (&$count) { + $this->setNextResponse(200, ['Cache-Control' => 'public, max-age=10000'], '', function ($request, $response) use (&$count) { ++$count; $response->setContent(1 == $count ? 'Hello World' : 'Goodbye World'); }); @@ -285,7 +285,7 @@ class HttpCacheTest extends HttpCacheTestCase $this->assertTraceContains('fresh'); $this->cacheConfig['allow_reload'] = true; - $this->request('GET', '/', array('HTTP_CACHE_CONTROL' => 'no-cache')); + $this->request('GET', '/', ['HTTP_CACHE_CONTROL' => 'no-cache']); $this->assertEquals(200, $this->response->getStatusCode()); $this->assertEquals('Goodbye World', $this->response->getContent()); $this->assertTraceContains('reload'); @@ -296,7 +296,7 @@ class HttpCacheTest extends HttpCacheTestCase { $count = 0; - $this->setNextResponse(200, array('Cache-Control' => 'public, max-age=10000'), '', function ($request, $response) use (&$count) { + $this->setNextResponse(200, ['Cache-Control' => 'public, max-age=10000'], '', function ($request, $response) use (&$count) { ++$count; $response->setContent(1 == $count ? 'Hello World' : 'Goodbye World'); }); @@ -312,12 +312,12 @@ class HttpCacheTest extends HttpCacheTestCase $this->assertTraceContains('fresh'); $this->cacheConfig['allow_reload'] = false; - $this->request('GET', '/', array('HTTP_CACHE_CONTROL' => 'no-cache')); + $this->request('GET', '/', ['HTTP_CACHE_CONTROL' => 'no-cache']); $this->assertEquals(200, $this->response->getStatusCode()); $this->assertEquals('Hello World', $this->response->getContent()); $this->assertTraceNotContains('reload'); - $this->request('GET', '/', array('HTTP_CACHE_CONTROL' => 'no-cache')); + $this->request('GET', '/', ['HTTP_CACHE_CONTROL' => 'no-cache']); $this->assertEquals(200, $this->response->getStatusCode()); $this->assertEquals('Hello World', $this->response->getContent()); $this->assertTraceNotContains('reload'); @@ -327,7 +327,7 @@ class HttpCacheTest extends HttpCacheTestCase { $count = 0; - $this->setNextResponse(200, array(), '', function ($request, $response) use (&$count) { + $this->setNextResponse(200, [], '', function ($request, $response) use (&$count) { ++$count; $response->headers->set('Cache-Control', 'public, max-age=10000'); $response->setETag($count); @@ -345,7 +345,7 @@ class HttpCacheTest extends HttpCacheTestCase $this->assertTraceContains('fresh'); $this->cacheConfig['allow_revalidate'] = true; - $this->request('GET', '/', array('HTTP_CACHE_CONTROL' => 'max-age=0')); + $this->request('GET', '/', ['HTTP_CACHE_CONTROL' => 'max-age=0']); $this->assertEquals(200, $this->response->getStatusCode()); $this->assertEquals('Goodbye World', $this->response->getContent()); $this->assertTraceContains('stale'); @@ -357,7 +357,7 @@ class HttpCacheTest extends HttpCacheTestCase { $count = 0; - $this->setNextResponse(200, array(), '', function ($request, $response) use (&$count) { + $this->setNextResponse(200, [], '', function ($request, $response) use (&$count) { ++$count; $response->headers->set('Cache-Control', 'public, max-age=10000'); $response->setETag($count); @@ -375,14 +375,14 @@ class HttpCacheTest extends HttpCacheTestCase $this->assertTraceContains('fresh'); $this->cacheConfig['allow_revalidate'] = false; - $this->request('GET', '/', array('HTTP_CACHE_CONTROL' => 'max-age=0')); + $this->request('GET', '/', ['HTTP_CACHE_CONTROL' => 'max-age=0']); $this->assertEquals(200, $this->response->getStatusCode()); $this->assertEquals('Hello World', $this->response->getContent()); $this->assertTraceNotContains('stale'); $this->assertTraceNotContains('invalid'); $this->assertTraceContains('fresh'); - $this->request('GET', '/', array('HTTP_CACHE_CONTROL' => 'max-age=0')); + $this->request('GET', '/', ['HTTP_CACHE_CONTROL' => 'max-age=0']); $this->assertEquals(200, $this->response->getStatusCode()); $this->assertEquals('Hello World', $this->response->getContent()); $this->assertTraceNotContains('stale'); @@ -393,7 +393,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testFetchesResponseFromBackendWhenCacheMisses() { $time = \DateTime::createFromFormat('U', time() + 5); - $this->setNextResponse(200, array('Cache-Control' => 'public', 'Expires' => $time->format(DATE_RFC2822))); + $this->setNextResponse(200, ['Cache-Control' => 'public', 'Expires' => $time->format(DATE_RFC2822)]); $this->request('GET', '/'); $this->assertEquals(200, $this->response->getStatusCode()); @@ -405,7 +405,7 @@ class HttpCacheTest extends HttpCacheTestCase { foreach (array_merge(range(201, 202), range(204, 206), range(303, 305), range(400, 403), range(405, 409), range(411, 417), range(500, 505)) as $code) { $time = \DateTime::createFromFormat('U', time() + 5); - $this->setNextResponse($code, array('Expires' => $time->format(DATE_RFC2822))); + $this->setNextResponse($code, ['Expires' => $time->format(DATE_RFC2822)]); $this->request('GET', '/'); $this->assertEquals($code, $this->response->getStatusCode()); @@ -417,7 +417,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testDoesNotCacheResponsesWithExplicitNoStoreDirective() { $time = \DateTime::createFromFormat('U', time() + 5); - $this->setNextResponse(200, array('Expires' => $time->format(DATE_RFC2822), 'Cache-Control' => 'no-store')); + $this->setNextResponse(200, ['Expires' => $time->format(DATE_RFC2822), 'Cache-Control' => 'no-store']); $this->request('GET', '/'); $this->assertTraceNotContains('store'); @@ -436,7 +436,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testCachesResponsesWithExplicitNoCacheDirective() { $time = \DateTime::createFromFormat('U', time() + 5); - $this->setNextResponse(200, array('Expires' => $time->format(DATE_RFC2822), 'Cache-Control' => 'public, no-cache')); + $this->setNextResponse(200, ['Expires' => $time->format(DATE_RFC2822), 'Cache-Control' => 'public, no-cache']); $this->request('GET', '/'); $this->assertTraceContains('store'); @@ -446,7 +446,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testCachesResponsesWithAnExpirationHeader() { $time = \DateTime::createFromFormat('U', time() + 5); - $this->setNextResponse(200, array('Cache-Control' => 'public', 'Expires' => $time->format(DATE_RFC2822))); + $this->setNextResponse(200, ['Cache-Control' => 'public', 'Expires' => $time->format(DATE_RFC2822)]); $this->request('GET', '/'); $this->assertEquals(200, $this->response->getStatusCode()); @@ -462,7 +462,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testCachesResponsesWithAMaxAgeDirective() { - $this->setNextResponse(200, array('Cache-Control' => 'public, max-age=5')); + $this->setNextResponse(200, ['Cache-Control' => 'public, max-age=5']); $this->request('GET', '/'); $this->assertEquals(200, $this->response->getStatusCode()); @@ -478,7 +478,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testCachesResponsesWithASMaxAgeDirective() { - $this->setNextResponse(200, array('Cache-Control' => 's-maxage=5')); + $this->setNextResponse(200, ['Cache-Control' => 's-maxage=5']); $this->request('GET', '/'); $this->assertEquals(200, $this->response->getStatusCode()); @@ -495,7 +495,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testCachesResponsesWithALastModifiedValidatorButNoFreshnessInformation() { $time = \DateTime::createFromFormat('U', time()); - $this->setNextResponse(200, array('Cache-Control' => 'public', 'Last-Modified' => $time->format(DATE_RFC2822))); + $this->setNextResponse(200, ['Cache-Control' => 'public', 'Last-Modified' => $time->format(DATE_RFC2822)]); $this->request('GET', '/'); $this->assertEquals(200, $this->response->getStatusCode()); @@ -506,7 +506,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testCachesResponsesWithAnETagValidatorButNoFreshnessInformation() { - $this->setNextResponse(200, array('Cache-Control' => 'public', 'ETag' => '"123456"')); + $this->setNextResponse(200, ['Cache-Control' => 'public', 'ETag' => '"123456"']); $this->request('GET', '/'); $this->assertEquals(200, $this->response->getStatusCode()); @@ -519,7 +519,7 @@ class HttpCacheTest extends HttpCacheTestCase { $time1 = \DateTime::createFromFormat('U', time() - 5); $time2 = \DateTime::createFromFormat('U', time() + 5); - $this->setNextResponse(200, array('Cache-Control' => 'public', 'Date' => $time1->format(DATE_RFC2822), 'Expires' => $time2->format(DATE_RFC2822))); + $this->setNextResponse(200, ['Cache-Control' => 'public', 'Date' => $time1->format(DATE_RFC2822), 'Expires' => $time2->format(DATE_RFC2822)]); $this->request('GET', '/'); $this->assertHttpKernelIsCalled(); @@ -543,7 +543,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testHitsCachedResponseWithMaxAgeDirective() { $time = \DateTime::createFromFormat('U', time() - 5); - $this->setNextResponse(200, array('Date' => $time->format(DATE_RFC2822), 'Cache-Control' => 'public, max-age=10')); + $this->setNextResponse(200, ['Date' => $time->format(DATE_RFC2822), 'Cache-Control' => 'public, max-age=10']); $this->request('GET', '/'); $this->assertHttpKernelIsCalled(); @@ -573,7 +573,7 @@ class HttpCacheTest extends HttpCacheTestCase $this->cacheConfig['stale_while_revalidate'] = 10; // The prescence of Last-Modified makes this cacheable (because Response::isValidateable() then). - $this->setNextResponse(200, array('Cache-Control' => 'public, s-maxage=5', 'Last-Modified' => 'some while ago'), 'Old response'); + $this->setNextResponse(200, ['Cache-Control' => 'public, s-maxage=5', 'Last-Modified' => 'some while ago'], 'Old response'); $this->request('GET', '/'); // warm the cache // Now, lock the cache @@ -607,7 +607,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testHitsCachedResponseWithSMaxAgeDirective() { $time = \DateTime::createFromFormat('U', time() - 5); - $this->setNextResponse(200, array('Date' => $time->format(DATE_RFC2822), 'Cache-Control' => 's-maxage=10, max-age=0')); + $this->setNextResponse(200, ['Date' => $time->format(DATE_RFC2822), 'Cache-Control' => 's-maxage=10, max-age=0']); $this->request('GET', '/'); $this->assertHttpKernelIsCalled(); @@ -752,7 +752,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testDoesNotAssignDefaultTtlWhenResponseHasMustRevalidateDirective() { - $this->setNextResponse(200, array('Cache-Control' => 'must-revalidate')); + $this->setNextResponse(200, ['Cache-Control' => 'must-revalidate']); $this->cacheConfig['default_ttl'] = 10; $this->request('GET', '/'); @@ -767,7 +767,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testFetchesFullResponseWhenCacheStaleAndNoValidatorsPresent() { $time = \DateTime::createFromFormat('U', time() + 5); - $this->setNextResponse(200, array('Cache-Control' => 'public', 'Expires' => $time->format(DATE_RFC2822))); + $this->setNextResponse(200, ['Cache-Control' => 'public', 'Expires' => $time->format(DATE_RFC2822)]); // build initial request $this->request('GET', '/'); @@ -807,7 +807,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testValidatesCachedResponsesWithLastModifiedAndNoFreshnessInformation() { $time = \DateTime::createFromFormat('U', time()); - $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) use ($time) { + $this->setNextResponse(200, [], 'Hello World', function ($request, $response) use ($time) { $response->headers->set('Cache-Control', 'public'); $response->headers->set('Last-Modified', $time->format(DATE_RFC2822)); if ($time->format(DATE_RFC2822) == $request->headers->get('IF_MODIFIED_SINCE')) { @@ -845,7 +845,7 @@ class HttpCacheTest extends HttpCacheTestCase { $test = $this; - $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) use ($test) { + $this->setNextResponse(200, [], 'Hello World', function ($request, $response) use ($test) { $test->assertSame('OPTIONS', $request->getMethod()); }); @@ -858,7 +858,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testValidatesCachedResponsesWithETagAndNoFreshnessInformation() { - $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) { + $this->setNextResponse(200, [], 'Hello World', function ($request, $response) { $response->headers->set('Cache-Control', 'public'); $response->headers->set('ETag', '"12345"'); if ($response->getETag() == $request->headers->get('IF_NONE_MATCH')) { @@ -895,7 +895,7 @@ class HttpCacheTest extends HttpCacheTestCase { $time = \DateTime::createFromFormat('U', time()); - $this->setNextResponse(200, array(), 'Hello World', function (Request $request, Response $response) use ($time) { + $this->setNextResponse(200, [], 'Hello World', function (Request $request, Response $response) use ($time) { $response->setSharedMaxAge(10); $response->headers->set('Last-Modified', $time->format(DATE_RFC2822)); }); @@ -913,7 +913,7 @@ class HttpCacheTest extends HttpCacheTestCase sleep(15); // expire the cache - $this->setNextResponse(304, array(), '', function (Request $request, Response $response) use ($time) { + $this->setNextResponse(304, [], '', function (Request $request, Response $response) use ($time) { $this->assertEquals($time->format(DATE_RFC2822), $request->headers->get('IF_MODIFIED_SINCE')); }); @@ -929,7 +929,7 @@ class HttpCacheTest extends HttpCacheTestCase { $time = \DateTime::createFromFormat('U', time()); $count = 0; - $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) use ($time, &$count) { + $this->setNextResponse(200, [], 'Hello World', function ($request, $response) use ($time, &$count) { $response->headers->set('Last-Modified', $time->format(DATE_RFC2822)); $response->headers->set('Cache-Control', 'public'); switch (++$count) { @@ -966,20 +966,20 @@ class HttpCacheTest extends HttpCacheTestCase public function testPassesHeadRequestsThroughDirectlyOnPass() { - $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) { + $this->setNextResponse(200, [], 'Hello World', function ($request, $response) { $response->setContent(''); $response->setStatusCode(200); $this->assertEquals('HEAD', $request->getMethod()); }); - $this->request('HEAD', '/', array('HTTP_EXPECT' => 'something ...')); + $this->request('HEAD', '/', ['HTTP_EXPECT' => 'something ...']); $this->assertHttpKernelIsCalled(); $this->assertEquals('', $this->response->getContent()); } public function testUsesCacheToRespondToHeadRequestsWhenFresh() { - $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) { + $this->setNextResponse(200, [], 'Hello World', function ($request, $response) { $response->headers->set('Cache-Control', 'public, max-age=10'); $response->setContent('Hello World'); $response->setStatusCode(200); @@ -1000,7 +1000,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testSendsNoContentWhenFresh() { $time = \DateTime::createFromFormat('U', time()); - $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) use ($time) { + $this->setNextResponse(200, [], 'Hello World', function ($request, $response) use ($time) { $response->headers->set('Cache-Control', 'public, max-age=10'); $response->headers->set('Last-Modified', $time->format(DATE_RFC2822)); }); @@ -1009,7 +1009,7 @@ class HttpCacheTest extends HttpCacheTestCase $this->assertHttpKernelIsCalled(); $this->assertEquals('Hello World', $this->response->getContent()); - $this->request('GET', '/', array('HTTP_IF_MODIFIED_SINCE' => $time->format(DATE_RFC2822))); + $this->request('GET', '/', ['HTTP_IF_MODIFIED_SINCE' => $time->format(DATE_RFC2822)]); $this->assertHttpKernelIsNotCalled(); $this->assertEquals(304, $this->response->getStatusCode()); $this->assertEquals('', $this->response->getContent()); @@ -1017,7 +1017,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testInvalidatesCachedResponsesOnPost() { - $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) { + $this->setNextResponse(200, [], 'Hello World', function ($request, $response) { if ('GET' == $request->getMethod()) { $response->setStatusCode(200); $response->headers->set('Cache-Control', 'public, max-age=500'); @@ -1066,20 +1066,20 @@ class HttpCacheTest extends HttpCacheTestCase public function testServesFromCacheWhenHeadersMatch() { $count = 0; - $this->setNextResponse(200, array('Cache-Control' => 'max-age=10000'), '', function ($request, $response) use (&$count) { + $this->setNextResponse(200, ['Cache-Control' => 'max-age=10000'], '', function ($request, $response) use (&$count) { $response->headers->set('Vary', 'Accept User-Agent Foo'); $response->headers->set('Cache-Control', 'public, max-age=10'); $response->headers->set('X-Response-Count', ++$count); $response->setContent($request->headers->get('USER_AGENT')); }); - $this->request('GET', '/', array('HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/1.0')); + $this->request('GET', '/', ['HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/1.0']); $this->assertEquals(200, $this->response->getStatusCode()); $this->assertEquals('Bob/1.0', $this->response->getContent()); $this->assertTraceContains('miss'); $this->assertTraceContains('store'); - $this->request('GET', '/', array('HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/1.0')); + $this->request('GET', '/', ['HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/1.0']); $this->assertEquals(200, $this->response->getStatusCode()); $this->assertEquals('Bob/1.0', $this->response->getContent()); $this->assertTraceContains('fresh'); @@ -1090,36 +1090,36 @@ class HttpCacheTest extends HttpCacheTestCase public function testStoresMultipleResponsesWhenHeadersDiffer() { $count = 0; - $this->setNextResponse(200, array('Cache-Control' => 'max-age=10000'), '', function ($request, $response) use (&$count) { + $this->setNextResponse(200, ['Cache-Control' => 'max-age=10000'], '', function ($request, $response) use (&$count) { $response->headers->set('Vary', 'Accept User-Agent Foo'); $response->headers->set('Cache-Control', 'public, max-age=10'); $response->headers->set('X-Response-Count', ++$count); $response->setContent($request->headers->get('USER_AGENT')); }); - $this->request('GET', '/', array('HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/1.0')); + $this->request('GET', '/', ['HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/1.0']); $this->assertEquals(200, $this->response->getStatusCode()); $this->assertEquals('Bob/1.0', $this->response->getContent()); $this->assertEquals(1, $this->response->headers->get('X-Response-Count')); - $this->request('GET', '/', array('HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/2.0')); + $this->request('GET', '/', ['HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/2.0']); $this->assertEquals(200, $this->response->getStatusCode()); $this->assertTraceContains('miss'); $this->assertTraceContains('store'); $this->assertEquals('Bob/2.0', $this->response->getContent()); $this->assertEquals(2, $this->response->headers->get('X-Response-Count')); - $this->request('GET', '/', array('HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/1.0')); + $this->request('GET', '/', ['HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/1.0']); $this->assertTraceContains('fresh'); $this->assertEquals('Bob/1.0', $this->response->getContent()); $this->assertEquals(1, $this->response->headers->get('X-Response-Count')); - $this->request('GET', '/', array('HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/2.0')); + $this->request('GET', '/', ['HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/2.0']); $this->assertTraceContains('fresh'); $this->assertEquals('Bob/2.0', $this->response->getContent()); $this->assertEquals(2, $this->response->headers->get('X-Response-Count')); - $this->request('GET', '/', array('HTTP_USER_AGENT' => 'Bob/2.0')); + $this->request('GET', '/', ['HTTP_USER_AGENT' => 'Bob/2.0']); $this->assertTraceContains('miss'); $this->assertEquals('Bob/2.0', $this->response->getContent()); $this->assertEquals(3, $this->response->headers->get('X-Response-Count')); @@ -1141,7 +1141,7 @@ class HttpCacheTest extends HttpCacheTestCase $this->setNextResponse(); $this->cacheConfig['allow_reload'] = true; - $this->request('GET', '/', array(), array(), false, array('Pragma' => 'no-cache')); + $this->request('GET', '/', [], [], false, ['Pragma' => 'no-cache']); $this->assertExceptionsAreCaught(); } @@ -1158,30 +1158,30 @@ class HttpCacheTest extends HttpCacheTestCase public function testEsiCacheSendsTheLowestTtl() { - $responses = array( - array( + $responses = [ + [ 'status' => 200, 'body' => ' ', - 'headers' => array( + 'headers' => [ 'Cache-Control' => 's-maxage=300', 'Surrogate-Control' => 'content="ESI/1.0"', - ), - ), - array( + ], + ], + [ 'status' => 200, 'body' => 'Hello World!', - 'headers' => array('Cache-Control' => 's-maxage=200'), - ), - array( + 'headers' => ['Cache-Control' => 's-maxage=200'], + ], + [ 'status' => 200, 'body' => 'My name is Bobby.', - 'headers' => array('Cache-Control' => 's-maxage=100'), - ), - ); + 'headers' => ['Cache-Control' => 's-maxage=100'], + ], + ]; $this->setNextResponses($responses); - $this->request('GET', '/', array(), array(), true); + $this->request('GET', '/', [], [], true); $this->assertEquals('Hello World! My name is Bobby.', $this->response->getContent()); $this->assertEquals(100, $this->response->getTtl()); @@ -1189,25 +1189,25 @@ class HttpCacheTest extends HttpCacheTestCase public function testEsiCacheSendsTheLowestTtlForHeadRequests() { - $responses = array( - array( + $responses = [ + [ 'status' => 200, 'body' => 'I am a long-lived master response, but I embed a short-lived resource: ', - 'headers' => array( + 'headers' => [ 'Cache-Control' => 's-maxage=300', 'Surrogate-Control' => 'content="ESI/1.0"', - ), - ), - array( + ], + ], + [ 'status' => 200, 'body' => 'I am a short-lived resource', - 'headers' => array('Cache-Control' => 's-maxage=100'), - ), - ); + 'headers' => ['Cache-Control' => 's-maxage=100'], + ], + ]; $this->setNextResponses($responses); - $this->request('HEAD', '/', array(), array(), true); + $this->request('HEAD', '/', [], [], true); $this->assertEmpty($this->response->getContent()); $this->assertEquals(100, $this->response->getTtl()); @@ -1215,30 +1215,30 @@ class HttpCacheTest extends HttpCacheTestCase public function testEsiCacheForceValidation() { - $responses = array( - array( + $responses = [ + [ 'status' => 200, 'body' => ' ', - 'headers' => array( + 'headers' => [ 'Cache-Control' => 's-maxage=300', 'Surrogate-Control' => 'content="ESI/1.0"', - ), - ), - array( + ], + ], + [ 'status' => 200, 'body' => 'Hello World!', - 'headers' => array('ETag' => 'foobar'), - ), - array( + 'headers' => ['ETag' => 'foobar'], + ], + [ 'status' => 200, 'body' => 'My name is Bobby.', - 'headers' => array('Cache-Control' => 's-maxage=100'), - ), - ); + 'headers' => ['Cache-Control' => 's-maxage=100'], + ], + ]; $this->setNextResponses($responses); - $this->request('GET', '/', array(), array(), true); + $this->request('GET', '/', [], [], true); $this->assertEquals('Hello World! My name is Bobby.', $this->response->getContent()); $this->assertNull($this->response->getTtl()); $this->assertTrue($this->response->mustRevalidate()); @@ -1248,25 +1248,25 @@ class HttpCacheTest extends HttpCacheTestCase public function testEsiCacheForceValidationForHeadRequests() { - $responses = array( - array( + $responses = [ + [ 'status' => 200, 'body' => 'I am the master response and use expiration caching, but I embed another resource: ', - 'headers' => array( + 'headers' => [ 'Cache-Control' => 's-maxage=300', 'Surrogate-Control' => 'content="ESI/1.0"', - ), - ), - array( + ], + ], + [ 'status' => 200, 'body' => 'I am the embedded resource and use validation caching', - 'headers' => array('ETag' => 'foobar'), - ), - ); + 'headers' => ['ETag' => 'foobar'], + ], + ]; $this->setNextResponses($responses); - $this->request('HEAD', '/', array(), array(), true); + $this->request('HEAD', '/', [], [], true); // The response has been assembled from expiration and validation based resources // This can neither be cached nor revalidated, so it should be private/no cache @@ -1279,50 +1279,50 @@ class HttpCacheTest extends HttpCacheTestCase public function testEsiRecalculateContentLengthHeader() { - $responses = array( - array( + $responses = [ + [ 'status' => 200, 'body' => '', - 'headers' => array( + 'headers' => [ 'Content-Length' => 26, 'Surrogate-Control' => 'content="ESI/1.0"', - ), - ), - array( + ], + ], + [ 'status' => 200, 'body' => 'Hello World!', - 'headers' => array(), - ), - ); + 'headers' => [], + ], + ]; $this->setNextResponses($responses); - $this->request('GET', '/', array(), array(), true); + $this->request('GET', '/', [], [], true); $this->assertEquals('Hello World!', $this->response->getContent()); $this->assertEquals(12, $this->response->headers->get('Content-Length')); } public function testEsiRecalculateContentLengthHeaderForHeadRequest() { - $responses = array( - array( + $responses = [ + [ 'status' => 200, 'body' => '', - 'headers' => array( + 'headers' => [ 'Content-Length' => 26, 'Surrogate-Control' => 'content="ESI/1.0"', - ), - ), - array( + ], + ], + [ 'status' => 200, 'body' => 'Hello World!', - 'headers' => array(), - ), - ); + 'headers' => [], + ], + ]; $this->setNextResponses($responses); - $this->request('HEAD', '/', array(), array(), true); + $this->request('HEAD', '/', [], [], true); // https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13 // "The Content-Length entity-header field indicates the size of the entity-body, @@ -1336,7 +1336,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testClientIpIsAlwaysLocalhostForForwardedRequests() { $this->setNextResponse(); - $this->request('GET', '/', array('REMOTE_ADDR' => '10.0.0.1')); + $this->request('GET', '/', ['REMOTE_ADDR' => '10.0.0.1']); $this->kernel->assert(function ($backendRequest) { $this->assertSame('127.0.0.1', $backendRequest->server->get('REMOTE_ADDR')); @@ -1351,25 +1351,25 @@ class HttpCacheTest extends HttpCacheTestCase Request::setTrustedProxies($existing, Request::HEADER_X_FORWARDED_ALL); $this->setNextResponse(); - $this->request('GET', '/', array('REMOTE_ADDR' => '10.0.0.1')); + $this->request('GET', '/', ['REMOTE_ADDR' => '10.0.0.1']); $this->assertSame($existing, Request::getTrustedProxies()); - $existing = array_unique(array_merge($existing, array('127.0.0.1'))); + $existing = array_unique(array_merge($existing, ['127.0.0.1'])); $this->kernel->assert(function ($backendRequest) use ($existing) { $this->assertSame($existing, Request::getTrustedProxies()); $this->assertsame('10.0.0.1', $backendRequest->getClientIp()); }); - Request::setTrustedProxies(array(), -1); + Request::setTrustedProxies([], -1); } public function getTrustedProxyData() { - return array( - array(array()), - array(array('10.0.0.2')), - array(array('10.0.0.2', '127.0.0.1')), - ); + return [ + [[]], + [['10.0.0.2']], + [['10.0.0.2', '127.0.0.1']], + ]; } /** @@ -1378,7 +1378,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testForwarderHeaderForForwardedRequests($forwarded, $expected) { $this->setNextResponse(); - $server = array('REMOTE_ADDR' => '10.0.0.1'); + $server = ['REMOTE_ADDR' => '10.0.0.1']; if (null !== $forwarded) { Request::setTrustedProxies($server, -1); $server['HTTP_FORWARDED'] = $forwarded; @@ -1389,42 +1389,42 @@ class HttpCacheTest extends HttpCacheTestCase $this->assertSame($expected, $backendRequest->headers->get('Forwarded')); }); - Request::setTrustedProxies(array(), -1); + Request::setTrustedProxies([], -1); } public function getForwardedData() { - return array( - array(null, 'for="10.0.0.1";host="localhost";proto=http'), - array('for=10.0.0.2', 'for="10.0.0.2";host="localhost";proto=http, for="10.0.0.1"'), - array('for=10.0.0.2, for=10.0.0.3', 'for="10.0.0.2";host="localhost";proto=http, for="10.0.0.3", for="10.0.0.1"'), - ); + return [ + [null, 'for="10.0.0.1";host="localhost";proto=http'], + ['for=10.0.0.2', 'for="10.0.0.2";host="localhost";proto=http, for="10.0.0.1"'], + ['for=10.0.0.2, for=10.0.0.3', 'for="10.0.0.2";host="localhost";proto=http, for="10.0.0.3", for="10.0.0.1"'], + ]; } public function testEsiCacheRemoveValidationHeadersIfEmbeddedResponses() { $time = \DateTime::createFromFormat('U', time()); - $responses = array( - array( + $responses = [ + [ 'status' => 200, 'body' => '', - 'headers' => array( + 'headers' => [ 'Surrogate-Control' => 'content="ESI/1.0"', 'ETag' => 'hey', 'Last-Modified' => $time->format(DATE_RFC2822), - ), - ), - array( + ], + ], + [ 'status' => 200, 'body' => 'Hey!', - 'headers' => array(), - ), - ); + 'headers' => [], + ], + ]; $this->setNextResponses($responses); - $this->request('GET', '/', array(), array(), true); + $this->request('GET', '/', [], [], true); $this->assertNull($this->response->getETag()); $this->assertNull($this->response->getLastModified()); } @@ -1433,26 +1433,26 @@ class HttpCacheTest extends HttpCacheTestCase { $time = \DateTime::createFromFormat('U', time()); - $responses = array( - array( + $responses = [ + [ 'status' => 200, 'body' => '', - 'headers' => array( + 'headers' => [ 'Surrogate-Control' => 'content="ESI/1.0"', 'ETag' => 'hey', 'Last-Modified' => $time->format(DATE_RFC2822), - ), - ), - array( + ], + ], + [ 'status' => 200, 'body' => 'Hey!', - 'headers' => array(), - ), - ); + 'headers' => [], + ], + ]; $this->setNextResponses($responses); - $this->request('HEAD', '/', array(), array(), true); + $this->request('HEAD', '/', [], [], true); $this->assertEmpty($this->response->getContent()); $this->assertNull($this->response->getETag()); $this->assertNull($this->response->getLastModified()); @@ -1460,11 +1460,11 @@ class HttpCacheTest extends HttpCacheTestCase public function testDoesNotCacheOptionsRequest() { - $this->setNextResponse(200, array('Cache-Control' => 'public, s-maxage=60'), 'get'); + $this->setNextResponse(200, ['Cache-Control' => 'public, s-maxage=60'], 'get'); $this->request('GET', '/'); $this->assertHttpKernelIsCalled(); - $this->setNextResponse(200, array('Cache-Control' => 'public, s-maxage=60'), 'options'); + $this->setNextResponse(200, ['Cache-Control' => 'public, s-maxage=60'], 'options'); $this->request('OPTIONS', '/'); $this->assertHttpKernelIsCalled(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php index b3aa2be2..1eb46174 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php @@ -41,12 +41,12 @@ class HttpCacheTestCase extends TestCase $this->cache = null; $this->esi = null; - $this->caches = array(); - $this->cacheConfig = array(); + $this->caches = []; + $this->cacheConfig = []; $this->request = null; $this->response = null; - $this->responses = array(); + $this->responses = []; $this->catch = false; @@ -112,7 +112,7 @@ class HttpCacheTestCase extends TestCase $this->assertFalse($this->kernel->isCatchingExceptions()); } - public function request($method, $uri = '/', $server = array(), $cookies = array(), $esi = false, $headers = array()) + public function request($method, $uri = '/', $server = [], $cookies = [], $esi = false, $headers = []) { if (null === $this->kernel) { throw new \LogicException('You must call setNextResponse() before calling request().'); @@ -126,7 +126,7 @@ class HttpCacheTestCase extends TestCase $this->esi = $esi ? new Esi() : null; $this->cache = new HttpCache($this->kernel, $this->store, $this->esi, $this->cacheConfig); - $this->request = Request::create($uri, $method, array(), $cookies, array(), $server); + $this->request = Request::create($uri, $method, [], $cookies, [], $server); $this->request->headers->add($headers); $this->response = $this->cache->handle($this->request, HttpKernelInterface::MASTER_REQUEST, $this->catch); @@ -136,7 +136,7 @@ class HttpCacheTestCase extends TestCase public function getMetaStorageValues() { - $values = array(); + $values = []; foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator(sys_get_temp_dir().'/http_cache/md', \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) { $values[] = file_get_contents($file); } @@ -145,7 +145,7 @@ class HttpCacheTestCase extends TestCase } // A basic response with 200 status code and a tiny body. - public function setNextResponse($statusCode = 200, array $headers = array(), $body = 'Hello World', \Closure $customizer = null) + public function setNextResponse($statusCode = 200, array $headers = [], $body = 'Hello World', \Closure $customizer = null) { $this->kernel = new TestHttpKernel($body, $statusCode, $headers, $customizer); } @@ -168,7 +168,7 @@ class HttpCacheTestCase extends TestCase $fp = opendir($directory); while (false !== $file = readdir($fp)) { - if (!\in_array($file, array('.', '..'))) { + if (!\in_array($file, ['.', '..'])) { if (is_link($directory.'/'.$file)) { unlink($directory.'/'.$file); } elseif (is_dir($directory.'/'.$file)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php index 6d67a177..22cadf71 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php @@ -237,4 +237,233 @@ class ResponseCacheStrategyTest extends TestCase $this->assertSame('60', $masterResponse->headers->getCacheControlDirective('s-maxage')); $this->assertFalse($masterResponse->isValidateable()); } + + /** + * @dataProvider cacheControlMergingProvider + */ + public function testCacheControlMerging(array $expects, array $master, array $surrogates) + { + $cacheStrategy = new ResponseCacheStrategy(); + $buildResponse = function ($config) { + $response = new Response(); + + foreach ($config as $key => $value) { + switch ($key) { + case 'age': + $response->headers->set('Age', $value); + break; + + case 'expires': + $expires = clone $response->getDate(); + $expires->modify('+'.$value.' seconds'); + $response->setExpires($expires); + break; + + case 'max-age': + $response->setMaxAge($value); + break; + + case 's-maxage': + $response->setSharedMaxAge($value); + break; + + case 'private': + $response->setPrivate(); + break; + + case 'public': + $response->setPublic(); + break; + + default: + $response->headers->addCacheControlDirective($key, $value); + } + } + + return $response; + }; + + foreach ($surrogates as $config) { + $cacheStrategy->add($buildResponse($config)); + } + + $response = $buildResponse($master); + $cacheStrategy->update($response); + + foreach ($expects as $key => $value) { + if ('expires' === $key) { + $this->assertSame($value, $response->getExpires()->format('U') - $response->getDate()->format('U')); + } elseif ('age' === $key) { + $this->assertSame($value, $response->getAge()); + } elseif (true === $value) { + $this->assertTrue($response->headers->hasCacheControlDirective($key), sprintf('Cache-Control header must have "%s" flag', $key)); + } elseif (false === $value) { + $this->assertFalse( + $response->headers->hasCacheControlDirective($key), + sprintf('Cache-Control header must NOT have "%s" flag', $key) + ); + } else { + $this->assertSame($value, $response->headers->getCacheControlDirective($key), sprintf('Cache-Control flag "%s" should be "%s"', $key, $value)); + } + } + } + + public function cacheControlMergingProvider() + { + yield 'result is public if all responses are public' => [ + ['private' => false, 'public' => true], + ['public' => true], + [ + ['public' => true], + ], + ]; + + yield 'result is private by default' => [ + ['private' => true, 'public' => false], + ['public' => true], + [ + [], + ], + ]; + + yield 'combines public and private responses' => [ + ['must-revalidate' => false, 'private' => true, 'public' => false], + ['public' => true], + [ + ['private' => true], + ], + ]; + + yield 'inherits no-cache from surrogates' => [ + ['no-cache' => true, 'public' => false], + ['public' => true], + [ + ['no-cache' => true], + ], + ]; + + yield 'inherits no-store from surrogate' => [ + ['no-store' => true, 'public' => false], + ['public' => true], + [ + ['no-store' => true], + ], + ]; + + yield 'resolve to lowest possible max-age' => [ + ['public' => false, 'private' => true, 's-maxage' => false, 'max-age' => '60'], + ['public' => true, 'max-age' => 3600], + [ + ['private' => true, 'max-age' => 60], + ], + ]; + + yield 'resolves multiple max-age' => [ + ['public' => false, 'private' => true, 's-maxage' => false, 'max-age' => '60'], + ['private' => true, 'max-age' => 100], + [ + ['private' => true, 'max-age' => 3600], + ['public' => true, 'max-age' => 60, 's-maxage' => 60], + ['private' => true, 'max-age' => 60], + ], + ]; + + yield 'merge max-age and s-maxage' => [ + ['public' => true, 's-maxage' => '60', 'max-age' => null], + ['public' => true, 's-maxage' => 3600], + [ + ['public' => true, 'max-age' => 60], + ], + ]; + + yield 'result is private when combining private responses' => [ + ['no-cache' => false, 'must-revalidate' => false, 'private' => true], + ['s-maxage' => 60, 'private' => true], + [ + ['s-maxage' => 60, 'private' => true], + ], + ]; + + yield 'result can have s-maxage and max-age' => [ + ['public' => true, 'private' => false, 's-maxage' => '60', 'max-age' => '30'], + ['s-maxage' => 100, 'max-age' => 2000], + [ + ['s-maxage' => 1000, 'max-age' => 30], + ['s-maxage' => 500, 'max-age' => 500], + ['s-maxage' => 60, 'max-age' => 1000], + ], + ]; + + yield 'does not set headers without value' => [ + ['max-age' => null, 's-maxage' => null, 'public' => null], + ['private' => true], + [ + ['private' => true], + ], + ]; + + yield 'max-age 0 is sent to the client' => [ + ['private' => true, 'max-age' => '0'], + ['max-age' => 0, 'private' => true], + [ + ['max-age' => 60, 'private' => true], + ], + ]; + + yield 'max-age is relative to age' => [ + ['max-age' => '240', 'age' => 60], + ['max-age' => 180], + [ + ['max-age' => 600, 'age' => 60], + ], + ]; + + yield 'retains lowest age of all responses' => [ + ['max-age' => '160', 'age' => 60], + ['max-age' => 600, 'age' => 60], + [ + ['max-age' => 120, 'age' => 20], + ], + ]; + + yield 'max-age can be less than age, essentially expiring the response' => [ + ['age' => 120, 'max-age' => '90'], + ['max-age' => 90, 'age' => 120], + [ + ['max-age' => 120, 'age' => 60], + ], + ]; + + yield 'max-age is 0 regardless of age' => [ + ['max-age' => '0'], + ['max-age' => 60], + [ + ['max-age' => 0, 'age' => 60], + ], + ]; + + yield 'max-age is not negative' => [ + ['max-age' => '0'], + ['max-age' => 0], + [ + ['max-age' => 0, 'age' => 60], + ], + ]; + + yield 'calculates lowest Expires header' => [ + ['expires' => 60], + ['expires' => 60], + [ + ['expires' => 120], + ], + ]; + + yield 'calculates Expires header relative to age' => [ + ['expires' => 210, 'age' => 120], + ['expires' => 90], + [ + ['expires' => 600, 'age' => '120'], + ], + ]; + } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/SsiTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/SsiTest.php index 26ef6cb2..2fc0bb96 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/SsiTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/SsiTest.php @@ -187,13 +187,13 @@ class SsiTest extends TestCase $response1 = new Response('foo'); $response1->setStatusCode(404); $response2 = new Response('bar'); - $cache = $this->getCache(Request::create('/'), array($response1, $response2)); + $cache = $this->getCache(Request::create('/'), [$response1, $response2]); $this->assertEquals('bar', $ssi->handle($cache, '/', '/alt', false)); } protected function getCache($request, $response) { - $cache = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpCache\HttpCache')->setMethods(array('getRequest', 'handle'))->disableOriginalConstructor()->getMock(); + $cache = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpCache\HttpCache')->setMethods(['getRequest', 'handle'])->disableOriginalConstructor()->getMock(); $cache->expects($this->any()) ->method('getRequest') ->will($this->returnValue($request)) @@ -201,7 +201,7 @@ class SsiTest extends TestCase if (\is_array($response)) { $cache->expects($this->any()) ->method('handle') - ->will(\call_user_func_array(array($this, 'onConsecutiveCalls'), $response)) + ->will(\call_user_func_array([$this, 'onConsecutiveCalls'], $response)) ; } else { $cache->expects($this->any()) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php index cef01916..fc47ff2c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php @@ -29,7 +29,7 @@ class StoreTest extends TestCase protected function setUp() { $this->request = Request::create('/'); - $this->response = new Response('hello world', 200, array()); + $this->response = new Response('hello world', 200, []); HttpCacheTestCase::clearDirectory(sys_get_temp_dir().'/http_cache'); @@ -108,7 +108,7 @@ class StoreTest extends TestCase public function testDoesNotFindAnEntryWithLookupWhenNoneExists() { - $request = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar')); + $request = Request::create('/test', 'get', [], [], [], ['HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar']); $this->assertNull($this->store->lookup($request)); } @@ -137,7 +137,7 @@ class StoreTest extends TestCase $this->storeSimpleEntry(); $response = $this->store->lookup($this->request); - $this->assertEquals($response->headers->all(), array_merge(array('content-length' => 4, 'x-body-file' => array($this->getStorePath($response->headers->get('X-Content-Digest')))), $this->response->headers->all())); + $this->assertEquals($response->headers->all(), array_merge(['content-length' => 4, 'x-body-file' => [$this->getStorePath($response->headers->get('X-Content-Digest'))]], $this->response->headers->all())); } public function testRestoresResponseContentFromEntityStoreWithLookup() @@ -165,9 +165,9 @@ class StoreTest extends TestCase public function testDoesNotReturnEntriesThatVaryWithLookup() { - $req1 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar')); - $req2 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Bling', 'HTTP_BAR' => 'Bam')); - $res = new Response('test', 200, array('Vary' => 'Foo Bar')); + $req1 = Request::create('/test', 'get', [], [], [], ['HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar']); + $req2 = Request::create('/test', 'get', [], [], [], ['HTTP_FOO' => 'Bling', 'HTTP_BAR' => 'Bam']); + $res = new Response('test', 200, ['Vary' => 'Foo Bar']); $this->store->write($req1, $res); $this->assertNull($this->store->lookup($req2)); @@ -175,9 +175,9 @@ class StoreTest extends TestCase public function testDoesNotReturnEntriesThatSlightlyVaryWithLookup() { - $req1 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar')); - $req2 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bam')); - $res = new Response('test', 200, array('Vary' => array('Foo', 'Bar'))); + $req1 = Request::create('/test', 'get', [], [], [], ['HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar']); + $req2 = Request::create('/test', 'get', [], [], [], ['HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bam']); + $res = new Response('test', 200, ['Vary' => ['Foo', 'Bar']]); $this->store->write($req1, $res); $this->assertNull($this->store->lookup($req2)); @@ -185,16 +185,16 @@ class StoreTest extends TestCase public function testStoresMultipleResponsesForEachVaryCombination() { - $req1 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar')); - $res1 = new Response('test 1', 200, array('Vary' => 'Foo Bar')); + $req1 = Request::create('/test', 'get', [], [], [], ['HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar']); + $res1 = new Response('test 1', 200, ['Vary' => 'Foo Bar']); $key = $this->store->write($req1, $res1); - $req2 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Bling', 'HTTP_BAR' => 'Bam')); - $res2 = new Response('test 2', 200, array('Vary' => 'Foo Bar')); + $req2 = Request::create('/test', 'get', [], [], [], ['HTTP_FOO' => 'Bling', 'HTTP_BAR' => 'Bam']); + $res2 = new Response('test 2', 200, ['Vary' => 'Foo Bar']); $this->store->write($req2, $res2); - $req3 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Baz', 'HTTP_BAR' => 'Boom')); - $res3 = new Response('test 3', 200, array('Vary' => 'Foo Bar')); + $req3 = Request::create('/test', 'get', [], [], [], ['HTTP_FOO' => 'Baz', 'HTTP_BAR' => 'Boom']); + $res3 = new Response('test 3', 200, ['Vary' => 'Foo Bar']); $this->store->write($req3, $res3); $this->assertEquals($this->getStorePath('en'.hash('sha256', 'test 3')), $this->store->lookup($req3)->getContent()); @@ -206,18 +206,18 @@ class StoreTest extends TestCase public function testOverwritesNonVaryingResponseWithStore() { - $req1 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar')); - $res1 = new Response('test 1', 200, array('Vary' => 'Foo Bar')); + $req1 = Request::create('/test', 'get', [], [], [], ['HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar']); + $res1 = new Response('test 1', 200, ['Vary' => 'Foo Bar']); $key = $this->store->write($req1, $res1); $this->assertEquals($this->getStorePath('en'.hash('sha256', 'test 1')), $this->store->lookup($req1)->getContent()); - $req2 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Bling', 'HTTP_BAR' => 'Bam')); - $res2 = new Response('test 2', 200, array('Vary' => 'Foo Bar')); + $req2 = Request::create('/test', 'get', [], [], [], ['HTTP_FOO' => 'Bling', 'HTTP_BAR' => 'Bam']); + $res2 = new Response('test 2', 200, ['Vary' => 'Foo Bar']); $this->store->write($req2, $res2); $this->assertEquals($this->getStorePath('en'.hash('sha256', 'test 2')), $this->store->lookup($req2)->getContent()); - $req3 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar')); - $res3 = new Response('test 3', 200, array('Vary' => 'Foo Bar')); + $req3 = Request::create('/test', 'get', [], [], [], ['HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar']); + $res3 = new Response('test 3', 200, ['Vary' => 'Foo Bar']); $key = $this->store->write($req3, $res3); $this->assertEquals($this->getStorePath('en'.hash('sha256', 'test 3')), $this->store->lookup($req3)->getContent()); @@ -226,7 +226,7 @@ class StoreTest extends TestCase public function testLocking() { - $req = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar')); + $req = Request::create('/test', 'get', [], [], [], ['HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar']); $this->assertTrue($this->store->lock($req)); $path = $this->store->lock($req); @@ -263,14 +263,14 @@ class StoreTest extends TestCase $this->assertEmpty($this->getStoreMetadata($requestHttps)); } - protected function storeSimpleEntry($path = null, $headers = array()) + protected function storeSimpleEntry($path = null, $headers = []) { if (null === $path) { $path = '/test'; } - $this->request = Request::create($path, 'get', array(), array(), array(), $headers); - $this->response = new Response('test', 200, array('Cache-Control' => 'max-age=420')); + $this->request = Request::create($path, 'get', [], [], [], $headers); + $this->response = new Response('test', 200, ['Cache-Control' => 'max-age=420']); return $this->store->write($this->request, $this->response); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/SubRequestHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/SubRequestHandlerTest.php index dfe0a734..67b637bf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/SubRequestHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/SubRequestHandlerTest.php @@ -33,7 +33,7 @@ class SubRequestHandlerTest extends TestCase public function testTrustedHeadersAreKept() { - Request::setTrustedProxies(array('10.0.0.1'), -1); + Request::setTrustedProxies(['10.0.0.1'], -1); $globalState = $this->getGlobalState(); $request = Request::create('/'); @@ -82,7 +82,7 @@ class SubRequestHandlerTest extends TestCase public function testTrustedForwardedHeader() { - Request::setTrustedProxies(array('10.0.0.1'), -1); + Request::setTrustedProxies(['10.0.0.1'], -1); $globalState = $this->getGlobalState(); $request = Request::create('/'); @@ -104,7 +104,7 @@ class SubRequestHandlerTest extends TestCase public function testTrustedXForwardedForHeader() { - Request::setTrustedProxies(array('10.0.0.1'), -1); + Request::setTrustedProxies(['10.0.0.1'], -1); $globalState = $this->getGlobalState(); $request = Request::create('/'); @@ -127,10 +127,10 @@ class SubRequestHandlerTest extends TestCase private function getGlobalState() { - return array( + return [ Request::getTrustedProxies(), Request::getTrustedHeaderSet(), - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestHttpKernel.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestHttpKernel.php index 5dbf02c9..304ff9d9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestHttpKernel.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestHttpKernel.php @@ -41,7 +41,7 @@ class TestHttpKernel extends HttpKernel implements ControllerResolverInterface, public function assert(\Closure $callback) { - $trustedConfig = array(Request::getTrustedProxies(), Request::getTrustedHeaderSet()); + $trustedConfig = [Request::getTrustedProxies(), Request::getTrustedHeaderSet()]; list($trustedProxies, $trustedHeaderSet, $backendRequest) = $this->backendRequest; Request::setTrustedProxies($trustedProxies, $trustedHeaderSet); @@ -57,7 +57,7 @@ class TestHttpKernel extends HttpKernel implements ControllerResolverInterface, public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = false) { $this->catch = $catch; - $this->backendRequest = array(Request::getTrustedProxies(), Request::getTrustedHeaderSet(), $request); + $this->backendRequest = [Request::getTrustedProxies(), Request::getTrustedHeaderSet(), $request]; return parent::handle($request, $type, $catch); } @@ -69,12 +69,12 @@ class TestHttpKernel extends HttpKernel implements ControllerResolverInterface, public function getController(Request $request) { - return array($this, 'callController'); + return [$this, 'callController']; } public function getArguments(Request $request, $controller) { - return array($request); + return [$request]; } public function callController(Request $request) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php index 712132bd..010bee86 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php @@ -21,9 +21,9 @@ use Symfony\Component\HttpKernel\HttpKernelInterface; class TestMultipleHttpKernel extends HttpKernel implements ControllerResolverInterface, ArgumentResolverInterface { - protected $bodies = array(); - protected $statuses = array(); - protected $headers = array(); + protected $bodies = []; + protected $statuses = []; + protected $headers = []; protected $called = false; protected $backendRequest; @@ -52,12 +52,12 @@ class TestMultipleHttpKernel extends HttpKernel implements ControllerResolverInt public function getController(Request $request) { - return array($this, 'callController'); + return [$this, 'callController']; } public function getArguments(Request $request, $controller) { - return array($request); + return [$request]; } public function callController(Request $request) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php index 4b9ec69d..939ecc04 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php @@ -104,7 +104,7 @@ class HttpKernelTest extends TestCase $event->setResponse(new Response($event->getException()->getMessage())); }); - $kernel = $this->getHttpKernel($dispatcher, function () { throw new MethodNotAllowedHttpException(array('POST')); }); + $kernel = $this->getHttpKernel($dispatcher, function () { throw new MethodNotAllowedHttpException(['POST']); }); $response = $kernel->handle(new Request()); $this->assertEquals('405', $response->getStatusCode()); @@ -119,7 +119,7 @@ class HttpKernelTest extends TestCase { $dispatcher = new EventDispatcher(); $dispatcher->addListener(KernelEvents::EXCEPTION, function ($event) use ($responseStatusCode, $expectedStatusCode) { - $event->setResponse(new Response('', $responseStatusCode, array('X-Status-Code' => $expectedStatusCode))); + $event->setResponse(new Response('', $responseStatusCode, ['X-Status-Code' => $expectedStatusCode])); }); $kernel = $this->getHttpKernel($dispatcher, function () { throw new \RuntimeException(); }); @@ -131,12 +131,12 @@ class HttpKernelTest extends TestCase public function getStatusCodes() { - return array( - array(200, 404), - array(404, 200), - array(301, 200), - array(500, 200), - ); + return [ + [200, 404], + [404, 200], + [301, 200], + [500, 200], + ]; } /** @@ -158,11 +158,11 @@ class HttpKernelTest extends TestCase public function getSpecificStatusCodes() { - return array( - array(200), - array(302), - array(403), - ); + return [ + [200], + [302], + [403], + ]; } public function testHandleWhenAListenerReturnsAResponse() @@ -200,7 +200,7 @@ class HttpKernelTest extends TestCase public function testHandleWhenTheControllerIsAnObjectWithInvoke() { $dispatcher = new EventDispatcher(); - $kernel = $this->getHttpKernel($dispatcher, new Controller()); + $kernel = $this->getHttpKernel($dispatcher, new TestController()); $this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request())); } @@ -216,7 +216,7 @@ class HttpKernelTest extends TestCase public function testHandleWhenTheControllerIsAnArray() { $dispatcher = new EventDispatcher(); - $kernel = $this->getHttpKernel($dispatcher, array(new Controller(), 'controller')); + $kernel = $this->getHttpKernel($dispatcher, [new TestController(), 'controller']); $this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request())); } @@ -224,7 +224,7 @@ class HttpKernelTest extends TestCase public function testHandleWhenTheControllerIsAStaticArray() { $dispatcher = new EventDispatcher(); - $kernel = $this->getHttpKernel($dispatcher, array('Symfony\Component\HttpKernel\Tests\Controller', 'staticcontroller')); + $kernel = $this->getHttpKernel($dispatcher, ['Symfony\Component\HttpKernel\Tests\TestController', 'staticcontroller']); $this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request())); } @@ -267,7 +267,7 @@ class HttpKernelTest extends TestCase { $dispatcher = new EventDispatcher(); $dispatcher->addListener(KernelEvents::CONTROLLER_ARGUMENTS, function (FilterControllerArgumentsEvent $event) { - $event->setArguments(array('foo')); + $event->setArguments(['foo']); }); $kernel = $this->getHttpKernel($dispatcher, function ($content) { return new Response($content); }); @@ -291,12 +291,12 @@ class HttpKernelTest extends TestCase }; $event->setController($newController); - $event->setArguments(array('bar')); + $event->setArguments(['bar']); }); - $kernel = $this->getHttpKernel($dispatcher, function ($content) { return new Response($content); }, null, array('foo')); + $kernel = $this->getHttpKernel($dispatcher, function ($content) { return new Response($content); }, null, ['foo']); - $this->assertResponseEquals(new Response('foo', 200, array('X-Id' => 'bar')), $kernel->handle(new Request())); + $this->assertResponseEquals(new Response('foo', 200, ['X-Id' => 'bar']), $kernel->handle(new Request())); } public function testTerminate() @@ -321,7 +321,7 @@ class HttpKernelTest extends TestCase { $request = new Request(); - $stack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->setMethods(array('push', 'pop'))->getMock(); + $stack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->setMethods(['push', 'pop'])->getMock(); $stack->expects($this->at(0))->method('push')->with($this->equalTo($request)); $stack->expects($this->at(1))->method('pop'); @@ -337,7 +337,7 @@ class HttpKernelTest extends TestCase public function testInconsistentClientIpsOnMasterRequests() { $request = new Request(); - $request->setTrustedProxies(array('1.1.1.1'), Request::HEADER_X_FORWARDED_FOR | Request::HEADER_FORWARDED); + $request->setTrustedProxies(['1.1.1.1'], Request::HEADER_X_FORWARDED_FOR | Request::HEADER_FORWARDED); $request->server->set('REMOTE_ADDR', '1.1.1.1'); $request->headers->set('FORWARDED', 'for=2.2.2.2'); $request->headers->set('X_FORWARDED_FOR', '3.3.3.3'); @@ -350,10 +350,10 @@ class HttpKernelTest extends TestCase $kernel = $this->getHttpKernel($dispatcher); $kernel->handle($request, $kernel::MASTER_REQUEST, false); - Request::setTrustedProxies(array(), -1); + Request::setTrustedProxies([], -1); } - private function getHttpKernel(EventDispatcherInterface $eventDispatcher, $controller = null, RequestStack $requestStack = null, array $arguments = array()) + private function getHttpKernel(EventDispatcherInterface $eventDispatcher, $controller = null, RequestStack $requestStack = null, array $arguments = []) { if (null === $controller) { $controller = function () { return new Response('Hello'); }; @@ -381,7 +381,7 @@ class HttpKernelTest extends TestCase } } -class Controller +class TestController { public function __invoke() { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/KernelTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/KernelTest.php index ab0b8cfb..208e11e1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/KernelTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/KernelTest.php @@ -92,7 +92,7 @@ class KernelTest extends TestCase public function testBootInitializesBundlesAndContainer() { - $kernel = $this->getKernel(array('initializeBundles', 'initializeContainer')); + $kernel = $this->getKernel(['initializeBundles', 'initializeContainer']); $kernel->expects($this->once()) ->method('initializeBundles'); $kernel->expects($this->once()) @@ -107,10 +107,10 @@ class KernelTest extends TestCase $bundle->expects($this->once()) ->method('setContainer'); - $kernel = $this->getKernel(array('initializeBundles', 'initializeContainer', 'getBundles')); + $kernel = $this->getKernel(['initializeBundles', 'initializeContainer', 'getBundles']); $kernel->expects($this->once()) ->method('getBundles') - ->will($this->returnValue(array($bundle))); + ->will($this->returnValue([$bundle])); $kernel->boot(); } @@ -118,7 +118,7 @@ class KernelTest extends TestCase public function testBootSetsTheBootedFlagToTrue() { // use test kernel to access isBooted() - $kernel = $this->getKernelForTest(array('initializeBundles', 'initializeContainer')); + $kernel = $this->getKernelForTest(['initializeBundles', 'initializeContainer']); $kernel->boot(); $this->assertTrue($kernel->isBooted()); @@ -129,7 +129,7 @@ class KernelTest extends TestCase */ public function testClassCacheIsLoaded() { - $kernel = $this->getKernel(array('initializeBundles', 'initializeContainer', 'doLoadClassCache')); + $kernel = $this->getKernel(['initializeBundles', 'initializeContainer', 'doLoadClassCache']); $kernel->loadClassCache('name', '.extension'); $kernel->expects($this->once()) ->method('doLoadClassCache') @@ -140,7 +140,7 @@ class KernelTest extends TestCase public function testClassCacheIsNotLoadedByDefault() { - $kernel = $this->getKernel(array('initializeBundles', 'initializeContainer', 'doLoadClassCache')); + $kernel = $this->getKernel(['initializeBundles', 'initializeContainer', 'doLoadClassCache']); $kernel->expects($this->never()) ->method('doLoadClassCache'); @@ -152,7 +152,7 @@ class KernelTest extends TestCase */ public function testClassCacheIsNotLoadedWhenKernelIsNotBooted() { - $kernel = $this->getKernel(array('initializeBundles', 'initializeContainer', 'doLoadClassCache')); + $kernel = $this->getKernel(['initializeBundles', 'initializeContainer', 'doLoadClassCache']); $kernel->loadClassCache(); $kernel->expects($this->never()) ->method('doLoadClassCache'); @@ -163,7 +163,7 @@ class KernelTest extends TestCase $container = new ContainerBuilder(); $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\Tests\Fixtures\KernelForTest') ->disableOriginalConstructor() - ->setMethods(array('getContainerBuilder', 'prepareContainer', 'getCacheDir', 'getLogDir')) + ->setMethods(['getContainerBuilder', 'prepareContainer', 'getCacheDir', 'getLogDir']) ->getMock(); $kernel->expects($this->any()) ->method('getContainerBuilder') @@ -196,7 +196,7 @@ class KernelTest extends TestCase public function testBootKernelSeveralTimesOnlyInitializesBundlesOnce() { - $kernel = $this->getKernel(array('initializeBundles', 'initializeContainer')); + $kernel = $this->getKernel(['initializeBundles', 'initializeContainer']); $kernel->expects($this->once()) ->method('initializeBundles'); @@ -210,7 +210,7 @@ class KernelTest extends TestCase $bundle->expects($this->once()) ->method('shutdown'); - $kernel = $this->getKernel(array(), array($bundle)); + $kernel = $this->getKernel([], [$bundle]); $kernel->boot(); $kernel->shutdown(); @@ -223,10 +223,10 @@ class KernelTest extends TestCase ->method('setContainer') ->with(null); - $kernel = $this->getKernel(array('getBundles')); + $kernel = $this->getKernel(['getBundles']); $kernel->expects($this->any()) ->method('getBundles') - ->will($this->returnValue(array($bundle))); + ->will($this->returnValue([$bundle])); $kernel->boot(); $kernel->shutdown(); @@ -246,7 +246,7 @@ class KernelTest extends TestCase ->method('handle') ->with($request, $type, $catch); - $kernel = $this->getKernel(array('getHttpKernel')); + $kernel = $this->getKernel(['getHttpKernel']); $kernel->expects($this->once()) ->method('getHttpKernel') ->will($this->returnValue($httpKernelMock)); @@ -264,7 +264,7 @@ class KernelTest extends TestCase ->disableOriginalConstructor() ->getMock(); - $kernel = $this->getKernel(array('getHttpKernel', 'boot')); + $kernel = $this->getKernel(['getHttpKernel', 'boot']); $kernel->expects($this->once()) ->method('getHttpKernel') ->will($this->returnValue($httpKernelMock)); @@ -384,7 +384,7 @@ EOF; $debug = true; $kernel = new KernelForTest($env, $debug); - $expected = serialize(array($env, $debug)); + $expected = serialize([$env, $debug]); $this->assertEquals($expected, $kernel->serialize()); } @@ -417,11 +417,11 @@ EOF; */ public function testLocateResourceThrowsExceptionWhenResourceDoesNotExist() { - $kernel = $this->getKernel(array('getBundle')); + $kernel = $this->getKernel(['getBundle']); $kernel ->expects($this->once()) ->method('getBundle') - ->will($this->returnValue(array($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle')))) + ->will($this->returnValue([$this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle')])) ; $kernel->locateResource('@Bundle1Bundle/config/routing.xml'); @@ -429,11 +429,11 @@ EOF; public function testLocateResourceReturnsTheFirstThatMatches() { - $kernel = $this->getKernel(array('getBundle')); + $kernel = $this->getKernel(['getBundle']); $kernel ->expects($this->once()) ->method('getBundle') - ->will($this->returnValue(array($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle')))) + ->will($this->returnValue([$this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle')])) ; $this->assertEquals(__DIR__.'/Fixtures/Bundle1Bundle/foo.txt', $kernel->locateResource('@Bundle1Bundle/foo.txt')); @@ -447,11 +447,11 @@ EOF; $parent = $this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle'); $child = $this->getBundle(__DIR__.'/Fixtures/Bundle2Bundle'); - $kernel = $this->getKernel(array('getBundle')); + $kernel = $this->getKernel(['getBundle']); $kernel ->expects($this->exactly(2)) ->method('getBundle') - ->will($this->returnValue(array($child, $parent))) + ->will($this->returnValue([$child, $parent])) ; $this->assertEquals(__DIR__.'/Fixtures/Bundle2Bundle/foo.txt', $kernel->locateResource('@ParentAABundle/foo.txt')); @@ -466,16 +466,16 @@ EOF; $parent = $this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle'); $child = $this->getBundle(__DIR__.'/Fixtures/Bundle2Bundle'); - $kernel = $this->getKernel(array('getBundle')); + $kernel = $this->getKernel(['getBundle']); $kernel ->expects($this->once()) ->method('getBundle') - ->will($this->returnValue(array($child, $parent))) + ->will($this->returnValue([$child, $parent])) ; - $this->assertEquals(array( + $this->assertEquals([ __DIR__.'/Fixtures/Bundle2Bundle/foo.txt', - __DIR__.'/Fixtures/Bundle1Bundle/foo.txt', ), + __DIR__.'/Fixtures/Bundle1Bundle/foo.txt', ], $kernel->locateResource('@Bundle1Bundle/foo.txt', null, false)); } @@ -484,29 +484,29 @@ EOF; */ public function testLocateResourceReturnsAllMatchesBis() { - $kernel = $this->getKernel(array('getBundle')); + $kernel = $this->getKernel(['getBundle']); $kernel ->expects($this->once()) ->method('getBundle') - ->will($this->returnValue(array( + ->will($this->returnValue([ $this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle'), $this->getBundle(__DIR__.'/Foobar'), - ))) + ])) ; $this->assertEquals( - array(__DIR__.'/Fixtures/Bundle1Bundle/foo.txt'), + [__DIR__.'/Fixtures/Bundle1Bundle/foo.txt'], $kernel->locateResource('@Bundle1Bundle/foo.txt', null, false) ); } public function testLocateResourceIgnoresDirOnNonResource() { - $kernel = $this->getKernel(array('getBundle')); + $kernel = $this->getKernel(['getBundle']); $kernel ->expects($this->once()) ->method('getBundle') - ->will($this->returnValue(array($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle')))) + ->will($this->returnValue([$this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle')])) ; $this->assertEquals( @@ -517,11 +517,11 @@ EOF; public function testLocateResourceReturnsTheDirOneForResources() { - $kernel = $this->getKernel(array('getBundle')); + $kernel = $this->getKernel(['getBundle']); $kernel ->expects($this->once()) ->method('getBundle') - ->will($this->returnValue(array($this->getBundle(__DIR__.'/Fixtures/FooBundle', null, null, 'FooBundle')))) + ->will($this->returnValue([$this->getBundle(__DIR__.'/Fixtures/FooBundle', null, null, 'FooBundle')])) ; $this->assertEquals( @@ -535,16 +535,16 @@ EOF; */ public function testLocateResourceReturnsTheDirOneForResourcesAndBundleOnes() { - $kernel = $this->getKernel(array('getBundle')); + $kernel = $this->getKernel(['getBundle']); $kernel ->expects($this->once()) ->method('getBundle') - ->will($this->returnValue(array($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle', null, null, 'Bundle1Bundle')))) + ->will($this->returnValue([$this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle', null, null, 'Bundle1Bundle')])) ; - $this->assertEquals(array( + $this->assertEquals([ __DIR__.'/Fixtures/Resources/Bundle1Bundle/foo.txt', - __DIR__.'/Fixtures/Bundle1Bundle/Resources/foo.txt', ), + __DIR__.'/Fixtures/Bundle1Bundle/Resources/foo.txt', ], $kernel->locateResource('@Bundle1Bundle/Resources/foo.txt', __DIR__.'/Fixtures/Resources', false) ); } @@ -557,18 +557,18 @@ EOF; $parent = $this->getBundle(__DIR__.'/Fixtures/BaseBundle', null, 'BaseBundle', 'BaseBundle'); $child = $this->getBundle(__DIR__.'/Fixtures/ChildBundle', 'ParentBundle', 'ChildBundle', 'ChildBundle'); - $kernel = $this->getKernel(array('getBundle')); + $kernel = $this->getKernel(['getBundle']); $kernel ->expects($this->exactly(4)) ->method('getBundle') - ->will($this->returnValue(array($child, $parent))) + ->will($this->returnValue([$child, $parent])) ; - $this->assertEquals(array( + $this->assertEquals([ __DIR__.'/Fixtures/Resources/ChildBundle/foo.txt', __DIR__.'/Fixtures/ChildBundle/Resources/foo.txt', __DIR__.'/Fixtures/BaseBundle/Resources/foo.txt', - ), + ], $kernel->locateResource('@BaseBundle/Resources/foo.txt', __DIR__.'/Fixtures/Resources', false) ); @@ -592,11 +592,11 @@ EOF; public function testLocateResourceOnDirectories() { - $kernel = $this->getKernel(array('getBundle')); + $kernel = $this->getKernel(['getBundle']); $kernel ->expects($this->exactly(2)) ->method('getBundle') - ->will($this->returnValue(array($this->getBundle(__DIR__.'/Fixtures/FooBundle', null, null, 'FooBundle')))) + ->will($this->returnValue([$this->getBundle(__DIR__.'/Fixtures/FooBundle', null, null, 'FooBundle')])) ; $this->assertEquals( @@ -608,11 +608,11 @@ EOF; $kernel->locateResource('@FooBundle/Resources', __DIR__.'/Fixtures/Resources') ); - $kernel = $this->getKernel(array('getBundle')); + $kernel = $this->getKernel(['getBundle']); $kernel ->expects($this->exactly(2)) ->method('getBundle') - ->will($this->returnValue(array($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle', null, null, 'Bundle1Bundle')))) + ->will($this->returnValue([$this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle', null, null, 'Bundle1Bundle')])) ; $this->assertEquals( @@ -634,16 +634,16 @@ EOF; $child = $this->getBundle(null, 'ParentABundle', 'ChildABundle'); // use test kernel so we can access getBundleMap() - $kernel = $this->getKernelForTest(array('registerBundles')); + $kernel = $this->getKernelForTest(['registerBundles']); $kernel ->expects($this->once()) ->method('registerBundles') - ->will($this->returnValue(array($parent, $child))) + ->will($this->returnValue([$parent, $child])) ; $kernel->boot(); $map = $kernel->getBundleMap(); - $this->assertEquals(array($child, $parent), $map['ParentABundle']); + $this->assertEquals([$child, $parent], $map['ParentABundle']); } /** @@ -656,18 +656,18 @@ EOF; $child = $this->getBundle(null, 'ParentBBundle', 'ChildBBundle'); // use test kernel so we can access getBundleMap() - $kernel = $this->getKernelForTest(array('registerBundles')); + $kernel = $this->getKernelForTest(['registerBundles']); $kernel ->expects($this->once()) ->method('registerBundles') - ->will($this->returnValue(array($grandparent, $parent, $child))) + ->will($this->returnValue([$grandparent, $parent, $child])) ; $kernel->boot(); $map = $kernel->getBundleMap(); - $this->assertEquals(array($child, $parent, $grandparent), $map['GrandParentBBundle']); - $this->assertEquals(array($child, $parent), $map['ParentBBundle']); - $this->assertEquals(array($child), $map['ChildBBundle']); + $this->assertEquals([$child, $parent, $grandparent], $map['GrandParentBBundle']); + $this->assertEquals([$child, $parent], $map['ParentBBundle']); + $this->assertEquals([$child], $map['ChildBBundle']); } /** @@ -678,7 +678,7 @@ EOF; public function testInitializeBundlesThrowsExceptionWhenAParentDoesNotExists() { $child = $this->getBundle(null, 'FooBar', 'ChildCBundle'); - $kernel = $this->getKernel(array(), array($child)); + $kernel = $this->getKernel([], [$child]); $kernel->boot(); } @@ -692,18 +692,18 @@ EOF; $child = $this->getBundle(null, 'ParentCBundle', 'ChildCBundle'); // use test kernel so we can access getBundleMap() - $kernel = $this->getKernelForTest(array('registerBundles')); + $kernel = $this->getKernelForTest(['registerBundles']); $kernel ->expects($this->once()) ->method('registerBundles') - ->will($this->returnValue(array($parent, $grandparent, $child))) + ->will($this->returnValue([$parent, $grandparent, $child])) ; $kernel->boot(); $map = $kernel->getBundleMap(); - $this->assertEquals(array($child, $parent, $grandparent), $map['GrandParentCBundle']); - $this->assertEquals(array($child, $parent), $map['ParentCBundle']); - $this->assertEquals(array($child), $map['ChildCBundle']); + $this->assertEquals([$child, $parent, $grandparent], $map['GrandParentCBundle']); + $this->assertEquals([$child, $parent], $map['ParentCBundle']); + $this->assertEquals([$child], $map['ChildCBundle']); } /** @@ -717,7 +717,7 @@ EOF; $child1 = $this->getBundle(null, 'ParentCBundle', 'ChildC1Bundle'); $child2 = $this->getBundle(null, 'ParentCBundle', 'ChildC2Bundle'); - $kernel = $this->getKernel(array(), array($parent, $child1, $child2)); + $kernel = $this->getKernel([], [$parent, $child1, $child2]); $kernel->boot(); } @@ -731,7 +731,7 @@ EOF; $fooBundle = $this->getBundle(null, null, 'FooBundle', 'DuplicateName'); $barBundle = $this->getBundle(null, null, 'BarBundle', 'DuplicateName'); - $kernel = $this->getKernel(array(), array($fooBundle, $barBundle)); + $kernel = $this->getKernel([], [$fooBundle, $barBundle]); $kernel->boot(); } @@ -744,13 +744,13 @@ EOF; { $circularRef = $this->getBundle(null, 'CircularRefBundle', 'CircularRefBundle'); - $kernel = $this->getKernel(array(), array($circularRef)); + $kernel = $this->getKernel([], [$circularRef]); $kernel->boot(); } public function testTerminateReturnsSilentlyIfKernelIsNotBooted() { - $kernel = $this->getKernel(array('getHttpKernel')); + $kernel = $this->getKernel(['getHttpKernel']); $kernel->expects($this->never()) ->method('getHttpKernel'); @@ -762,7 +762,7 @@ EOF; // does not implement TerminableInterface $httpKernel = new TestKernel(); - $kernel = $this->getKernel(array('getHttpKernel')); + $kernel = $this->getKernel(['getHttpKernel']); $kernel->expects($this->once()) ->method('getHttpKernel') ->willReturn($httpKernel); @@ -775,14 +775,14 @@ EOF; // implements TerminableInterface $httpKernelMock = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernel') ->disableOriginalConstructor() - ->setMethods(array('terminate')) + ->setMethods(['terminate']) ->getMock(); $httpKernelMock ->expects($this->once()) ->method('terminate'); - $kernel = $this->getKernel(array('getHttpKernel')); + $kernel = $this->getKernel(['getHttpKernel']); $kernel->expects($this->exactly(2)) ->method('getHttpKernel') ->will($this->returnValue($httpKernelMock)); @@ -882,7 +882,7 @@ EOF; $container->addCompilerPass(new ResettableServicePass()); $container->register('one', ResettableService::class) ->setPublic(true) - ->addTag('kernel.reset', array('method' => 'reset')); + ->addTag('kernel.reset', ['method' => 'reset']); $container->register('services_resetter', ServicesResetter::class)->setPublic(true); }, $httpKernelMock, 'resetting'); @@ -906,7 +906,7 @@ EOF; */ public function testKernelStartTimeIsResetWhileBootingAlreadyBootedKernel() { - $kernel = $this->getKernelForTest(array('initializeBundles'), true); + $kernel = $this->getKernelForTest(['initializeBundles'], true); $kernel->boot(); $preReBoot = $kernel->getStartTime(); @@ -925,7 +925,7 @@ EOF; { $bundle = $this ->getMockBuilder('Symfony\Component\HttpKernel\Bundle\BundleInterface') - ->setMethods(array('getPath', 'getParent', 'getName')) + ->setMethods(['getPath', 'getParent', 'getName']) ->disableOriginalConstructor() ; @@ -964,14 +964,14 @@ EOF; * * @return Kernel */ - protected function getKernel(array $methods = array(), array $bundles = array()) + protected function getKernel(array $methods = [], array $bundles = []) { $methods[] = 'registerBundles'; $kernel = $this ->getMockBuilder('Symfony\Component\HttpKernel\Kernel') ->setMethods($methods) - ->setConstructorArgs(array('test', false)) + ->setConstructorArgs(['test', false]) ->getMockForAbstractClass() ; $kernel->expects($this->any()) @@ -985,10 +985,10 @@ EOF; return $kernel; } - protected function getKernelForTest(array $methods = array(), $debug = false) + protected function getKernelForTest(array $methods = [], $debug = false) { $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\Tests\Fixtures\KernelForTest') - ->setConstructorArgs(array('test', $debug)) + ->setConstructorArgs(['test', $debug]) ->setMethods($methods) ->getMock(); $p = new \ReflectionProperty($kernel, 'rootDir'); @@ -1030,7 +1030,7 @@ class CustomProjectDirKernel extends Kernel public function registerBundles() { - return array(); + return []; } public function registerContainerConfiguration(LoaderInterface $loader) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php index a5d070c8..7354000b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php @@ -72,39 +72,39 @@ class LoggerTest extends TestCase */ public function testLogsAtAllLevels($level, $message) { - $this->logger->{$level}($message, array('user' => 'Bob')); - $this->logger->log($level, $message, array('user' => 'Bob')); + $this->logger->{$level}($message, ['user' => 'Bob']); + $this->logger->log($level, $message, ['user' => 'Bob']); - $expected = array( + $expected = [ "[$level] message of level $level with context: Bob", "[$level] message of level $level with context: Bob", - ); + ]; $this->assertLogsMatch($expected, $this->getLogs()); } public function provideLevelsAndMessages() { - return array( - LogLevel::EMERGENCY => array(LogLevel::EMERGENCY, 'message of level emergency with context: {user}'), - LogLevel::ALERT => array(LogLevel::ALERT, 'message of level alert with context: {user}'), - LogLevel::CRITICAL => array(LogLevel::CRITICAL, 'message of level critical with context: {user}'), - LogLevel::ERROR => array(LogLevel::ERROR, 'message of level error with context: {user}'), - LogLevel::WARNING => array(LogLevel::WARNING, 'message of level warning with context: {user}'), - LogLevel::NOTICE => array(LogLevel::NOTICE, 'message of level notice with context: {user}'), - LogLevel::INFO => array(LogLevel::INFO, 'message of level info with context: {user}'), - LogLevel::DEBUG => array(LogLevel::DEBUG, 'message of level debug with context: {user}'), - ); + return [ + LogLevel::EMERGENCY => [LogLevel::EMERGENCY, 'message of level emergency with context: {user}'], + LogLevel::ALERT => [LogLevel::ALERT, 'message of level alert with context: {user}'], + LogLevel::CRITICAL => [LogLevel::CRITICAL, 'message of level critical with context: {user}'], + LogLevel::ERROR => [LogLevel::ERROR, 'message of level error with context: {user}'], + LogLevel::WARNING => [LogLevel::WARNING, 'message of level warning with context: {user}'], + LogLevel::NOTICE => [LogLevel::NOTICE, 'message of level notice with context: {user}'], + LogLevel::INFO => [LogLevel::INFO, 'message of level info with context: {user}'], + LogLevel::DEBUG => [LogLevel::DEBUG, 'message of level debug with context: {user}'], + ]; } public function testLogLevelDisabled() { $this->logger = new Logger(LogLevel::INFO, $this->tmpFile); - $this->logger->debug('test', array('user' => 'Bob')); - $this->logger->log(LogLevel::DEBUG, 'test', array('user' => 'Bob')); + $this->logger->debug('test', ['user' => 'Bob']); + $this->logger->log(LogLevel::DEBUG, 'test', ['user' => 'Bob']); // Will always be true, but asserts than an exception isn't thrown - $this->assertSame(array(), $this->getLogs()); + $this->assertSame([], $this->getLogs()); } /** @@ -134,18 +134,18 @@ class LoggerTest extends TestCase public function testContextReplacement() { $logger = $this->logger; - $logger->info('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar')); + $logger->info('{Message {nothing} {user} {foo.bar} a}', ['user' => 'Bob', 'foo.bar' => 'Bar']); - $expected = array('[info] {Message {nothing} Bob Bar a}'); + $expected = ['[info] {Message {nothing} Bob Bar a}']; $this->assertLogsMatch($expected, $this->getLogs()); } public function testObjectCastToString() { if (method_exists($this, 'createPartialMock')) { - $dummy = $this->createPartialMock(DummyTest::class, array('__toString')); + $dummy = $this->createPartialMock(DummyTest::class, ['__toString']); } else { - $dummy = $this->getMock(DummyTest::class, array('__toString')); + $dummy = $this->getMock(DummyTest::class, ['__toString']); } $dummy->expects($this->atLeastOnce()) ->method('__toString') @@ -153,54 +153,54 @@ class LoggerTest extends TestCase $this->logger->warning($dummy); - $expected = array('[warning] DUMMY'); + $expected = ['[warning] DUMMY']; $this->assertLogsMatch($expected, $this->getLogs()); } public function testContextCanContainAnything() { - $context = array( + $context = [ 'bool' => true, 'null' => null, 'string' => 'Foo', 'int' => 0, 'float' => 0.5, - 'nested' => array('with object' => new DummyTest()), + 'nested' => ['with object' => new DummyTest()], 'object' => new \DateTime(), 'resource' => fopen('php://memory', 'r'), - ); + ]; $this->logger->warning('Crazy context data', $context); - $expected = array('[warning] Crazy context data'); + $expected = ['[warning] Crazy context data']; $this->assertLogsMatch($expected, $this->getLogs()); } public function testContextExceptionKeyCanBeExceptionOrOtherValues() { $logger = $this->logger; - $logger->warning('Random message', array('exception' => 'oops')); - $logger->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail'))); + $logger->warning('Random message', ['exception' => 'oops']); + $logger->critical('Uncaught Exception!', ['exception' => new \LogicException('Fail')]); - $expected = array( + $expected = [ '[warning] Random message', '[critical] Uncaught Exception!', - ); + ]; $this->assertLogsMatch($expected, $this->getLogs()); } public function testFormatter() { $this->logger = new Logger(LogLevel::DEBUG, $this->tmpFile, function ($level, $message, $context) { - return json_encode(array('level' => $level, 'message' => $message, 'context' => $context)).\PHP_EOL; + return json_encode(['level' => $level, 'message' => $message, 'context' => $context]).\PHP_EOL; }); - $this->logger->error('An error', array('foo' => 'bar')); - $this->logger->warning('A warning', array('baz' => 'bar')); - $this->assertSame(array( + $this->logger->error('An error', ['foo' => 'bar']); + $this->logger->warning('A warning', ['baz' => 'bar']); + $this->assertSame([ '{"level":"error","message":"An error","context":{"foo":"bar"}}', '{"level":"warning","message":"A warning","context":{"baz":"bar"}}', - ), $this->getLogs()); + ], $this->getLogs()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Logger.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Logger.php index 63c70bf6..8ae75613 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Logger.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Logger.php @@ -29,59 +29,59 @@ class Logger implements LoggerInterface public function clear() { - $this->logs = array( - 'emergency' => array(), - 'alert' => array(), - 'critical' => array(), - 'error' => array(), - 'warning' => array(), - 'notice' => array(), - 'info' => array(), - 'debug' => array(), - ); + $this->logs = [ + 'emergency' => [], + 'alert' => [], + 'critical' => [], + 'error' => [], + 'warning' => [], + 'notice' => [], + 'info' => [], + 'debug' => [], + ]; } - public function log($level, $message, array $context = array()) + public function log($level, $message, array $context = []) { $this->logs[$level][] = $message; } - public function emergency($message, array $context = array()) + public function emergency($message, array $context = []) { $this->log('emergency', $message, $context); } - public function alert($message, array $context = array()) + public function alert($message, array $context = []) { $this->log('alert', $message, $context); } - public function critical($message, array $context = array()) + public function critical($message, array $context = []) { $this->log('critical', $message, $context); } - public function error($message, array $context = array()) + public function error($message, array $context = []) { $this->log('error', $message, $context); } - public function warning($message, array $context = array()) + public function warning($message, array $context = []) { $this->log('warning', $message, $context); } - public function notice($message, array $context = array()) + public function notice($message, array $context = []) { $this->log('notice', $message, $context); } - public function info($message, array $context = array()) + public function info($message, array $context = []) { $this->log('info', $message, $context); } - public function debug($message, array $context = array()) + public function debug($message, array $context = []) { $this->log('debug', $message, $context); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php index a1db1d9c..1cc05e41 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php @@ -226,7 +226,7 @@ class FileProfilerStorageTest extends TestCase public function testRetrieveByMethodAndLimit() { - foreach (array('POST', 'GET') as $method) { + foreach (['POST', 'GET'] as $method) { for ($i = 0; $i < 5; ++$i) { $profile = new Profile('token_'.$i.$method); $profile->setMethod($method); @@ -293,8 +293,8 @@ class FileProfilerStorageTest extends TestCase $tokens = $this->storage->find('', '', 10, ''); $this->assertCount(2, $tokens); - $this->assertContains($tokens[0]['status_code'], array(200, 404)); - $this->assertContains($tokens[1]['status_code'], array(200, 404)); + $this->assertContains($tokens[0]['status_code'], [200, 404]); + $this->assertContains($tokens[1]['status_code'], [200, 404]); } public function testMultiRowIndexFile() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php index cff133c1..8f12e013 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php @@ -44,7 +44,7 @@ class ProfilerTest extends TestCase public function testReset() { $collector = $this->getMockBuilder(DataCollectorInterface::class) - ->setMethods(array('collect', 'getName', 'reset')) + ->setMethods(['collect', 'getName', 'reset']) ->getMock(); $collector->expects($this->any())->method('getName')->willReturn('mock'); $collector->expects($this->once())->method('reset'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/TestHttpKernel.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/TestHttpKernel.php index fb95aa03..27ba2d6f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/TestHttpKernel.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/TestHttpKernel.php @@ -27,12 +27,12 @@ class TestHttpKernel extends HttpKernel implements ControllerResolverInterface, public function getController(Request $request) { - return array($this, 'callController'); + return [$this, 'callController']; } public function getArguments(Request $request, $controller) { - return array($request); + return [$request]; } public function callController(Request $request) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php index 84ec19f7..9b7fe08a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php @@ -21,7 +21,8 @@ class UriSignerTest extends TestCase $signer = new UriSigner('foobar'); $this->assertContains('?_hash=', $signer->sign('http://example.com/foo')); - $this->assertContains('&_hash=', $signer->sign('http://example.com/foo?foo=bar')); + $this->assertContains('?_hash=', $signer->sign('http://example.com/foo?foo=bar')); + $this->assertContains('&foo=', $signer->sign('http://example.com/foo?foo=bar')); } public function testCheck() @@ -45,7 +46,7 @@ class UriSignerTest extends TestCase $signer = new UriSigner('foobar'); $this->assertSame( - 'http://example.com/foo?baz=bay&foo=bar&_hash=rIOcC%2FF3DoEGo%2FvnESjSp7uU9zA9S%2F%2BOLhxgMexoPUM%3D', + 'http://example.com/foo?_hash=rIOcC%2FF3DoEGo%2FvnESjSp7uU9zA9S%2F%2BOLhxgMexoPUM%3D&baz=bay&foo=bar', $signer->sign('http://example.com/foo?foo=bar&baz=bay') ); $this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar&baz=bay'))); @@ -61,4 +62,15 @@ class UriSignerTest extends TestCase ); $this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar&baz=bay'))); } + + public function testSignerWorksWithFragments() + { + $signer = new UriSigner('foobar'); + + $this->assertSame( + 'http://example.com/foo?_hash=EhpAUyEobiM3QTrKxoLOtQq5IsWyWedoXDPqIjzNj5o%3D&bar=foo&foo=bar#foobar', + $signer->sign('http://example.com/foo?bar=foo&foo=bar#foobar') + ); + $this->assertTrue($signer->check($signer->sign('http://example.com/foo?bar=foo&foo=bar#foobar'))); + } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/UriSigner.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/UriSigner.php index 28459b4e..481270da 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/UriSigner.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/UriSigner.php @@ -47,12 +47,13 @@ class UriSigner if (isset($url['query'])) { parse_str($url['query'], $params); } else { - $params = array(); + $params = []; } $uri = $this->buildUrl($url, $params); + $params[$this->parameter] = $this->computeHash($uri); - return $uri.(false === strpos($uri, '?') ? '?' : '&').$this->parameter.'='.$this->computeHash($uri); + return $this->buildUrl($url, $params); } /** @@ -68,14 +69,14 @@ class UriSigner if (isset($url['query'])) { parse_str($url['query'], $params); } else { - $params = array(); + $params = []; } if (empty($params[$this->parameter])) { return false; } - $hash = urlencode($params[$this->parameter]); + $hash = $params[$this->parameter]; unset($params[$this->parameter]); return $this->computeHash($this->buildUrl($url, $params)) === $hash; @@ -83,10 +84,10 @@ class UriSigner private function computeHash($uri) { - return urlencode(base64_encode(hash_hmac('sha256', $uri, $this->secret, true))); + return base64_encode(hash_hmac('sha256', $uri, $this->secret, true)); } - private function buildUrl(array $url, array $params = array()) + private function buildUrl(array $url, array $params = []) { ksort($params, SORT_STRING); $url['query'] = http_build_query($params, '', '&'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/composer.json b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/composer.json index 9ad3877b..f47f1162 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/composer.json +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/composer.json @@ -19,7 +19,7 @@ "php": "^5.5.9|>=7.0.8", "symfony/event-dispatcher": "~2.8|~3.0|~4.0", "symfony/http-foundation": "~3.4.12|~4.0.12|^4.1.1", - "symfony/debug": "~2.8|~3.0|~4.0", + "symfony/debug": "^3.3.3|~4.0", "symfony/polyfill-ctype": "~1.8", "psr/log": "~1.0" }, diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Inflector/Inflector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Inflector/Inflector.php index a4bf3e39..1d499ef8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Inflector/Inflector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Inflector/Inflector.php @@ -27,7 +27,7 @@ final class Inflector * * @see http://english-zone.com/spelling/plurals.html */ - private static $pluralMap = array( + private static $pluralMap = [ // First entry: plural suffix, reversed // Second entry: length of plural suffix // Third entry: Whether the suffix may succeed a vocal @@ -35,109 +35,109 @@ final class Inflector // Fifth entry: singular suffix, normal // bacteria (bacterium), criteria (criterion), phenomena (phenomenon) - array('a', 1, true, true, array('on', 'um')), + ['a', 1, true, true, ['on', 'um']], // nebulae (nebula) - array('ea', 2, true, true, 'a'), + ['ea', 2, true, true, 'a'], // services (service) - array('secivres', 8, true, true, 'service'), + ['secivres', 8, true, true, 'service'], // mice (mouse), lice (louse) - array('eci', 3, false, true, 'ouse'), + ['eci', 3, false, true, 'ouse'], // geese (goose) - array('esee', 4, false, true, 'oose'), + ['esee', 4, false, true, 'oose'], // fungi (fungus), alumni (alumnus), syllabi (syllabus), radii (radius) - array('i', 1, true, true, 'us'), + ['i', 1, true, true, 'us'], // men (man), women (woman) - array('nem', 3, true, true, 'man'), + ['nem', 3, true, true, 'man'], // children (child) - array('nerdlihc', 8, true, true, 'child'), + ['nerdlihc', 8, true, true, 'child'], // oxen (ox) - array('nexo', 4, false, false, 'ox'), + ['nexo', 4, false, false, 'ox'], // indices (index), appendices (appendix), prices (price) - array('seci', 4, false, true, array('ex', 'ix', 'ice')), + ['seci', 4, false, true, ['ex', 'ix', 'ice']], // selfies (selfie) - array('seifles', 7, true, true, 'selfie'), + ['seifles', 7, true, true, 'selfie'], // movies (movie) - array('seivom', 6, true, true, 'movie'), + ['seivom', 6, true, true, 'movie'], // feet (foot) - array('teef', 4, true, true, 'foot'), + ['teef', 4, true, true, 'foot'], // geese (goose) - array('eseeg', 5, true, true, 'goose'), + ['eseeg', 5, true, true, 'goose'], // teeth (tooth) - array('hteet', 5, true, true, 'tooth'), + ['hteet', 5, true, true, 'tooth'], // news (news) - array('swen', 4, true, true, 'news'), + ['swen', 4, true, true, 'news'], // series (series) - array('seires', 6, true, true, 'series'), + ['seires', 6, true, true, 'series'], // babies (baby) - array('sei', 3, false, true, 'y'), + ['sei', 3, false, true, 'y'], // accesses (access), addresses (address), kisses (kiss) - array('sess', 4, true, false, 'ss'), + ['sess', 4, true, false, 'ss'], // analyses (analysis), ellipses (ellipsis), funguses (fungus), // neuroses (neurosis), theses (thesis), emphases (emphasis), // oases (oasis), crises (crisis), houses (house), bases (base), // atlases (atlas) - array('ses', 3, true, true, array('s', 'se', 'sis')), + ['ses', 3, true, true, ['s', 'se', 'sis']], // objectives (objective), alternative (alternatives) - array('sevit', 5, true, true, 'tive'), + ['sevit', 5, true, true, 'tive'], // drives (drive) - array('sevird', 6, false, true, 'drive'), + ['sevird', 6, false, true, 'drive'], // lives (life), wives (wife) - array('sevi', 4, false, true, 'ife'), + ['sevi', 4, false, true, 'ife'], // moves (move) - array('sevom', 5, true, true, 'move'), + ['sevom', 5, true, true, 'move'], // hooves (hoof), dwarves (dwarf), elves (elf), leaves (leaf), caves (cave), staves (staff) - array('sev', 3, true, true, array('f', 've', 'ff')), + ['sev', 3, true, true, ['f', 've', 'ff']], // axes (axis), axes (ax), axes (axe) - array('sexa', 4, false, false, array('ax', 'axe', 'axis')), + ['sexa', 4, false, false, ['ax', 'axe', 'axis']], // indexes (index), matrixes (matrix) - array('sex', 3, true, false, 'x'), + ['sex', 3, true, false, 'x'], // quizzes (quiz) - array('sezz', 4, true, false, 'z'), + ['sezz', 4, true, false, 'z'], // bureaus (bureau) - array('suae', 4, false, true, 'eau'), + ['suae', 4, false, true, 'eau'], // roses (rose), garages (garage), cassettes (cassette), // waltzes (waltz), heroes (hero), bushes (bush), arches (arch), // shoes (shoe) - array('se', 2, true, true, array('', 'e')), + ['se', 2, true, true, ['', 'e']], // tags (tag) - array('s', 1, true, true, ''), + ['s', 1, true, true, ''], // chateaux (chateau) - array('xuae', 4, false, true, 'eau'), + ['xuae', 4, false, true, 'eau'], // people (person) - array('elpoep', 6, true, true, 'person'), - ); + ['elpoep', 6, true, true, 'person'], + ]; /** * This class should not be instantiated. @@ -207,7 +207,7 @@ final class Inflector $firstUpper = ctype_upper($pluralRev[$j - 1]); if (\is_array($newSuffix)) { - $singulars = array(); + $singulars = []; foreach ($newSuffix as $newSuffixEntry) { $singulars[] = $newBase.($firstUpper ? ucfirst($newSuffixEntry) : $newSuffixEntry); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Inflector/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Inflector/LICENSE index fbcca13d..f03153cc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Inflector/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Inflector/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2012-2018 Fabien Potencier +Copyright (c) 2012-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Inflector/Tests/InflectorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Inflector/Tests/InflectorTest.php index 8c40532a..9f1e1c6b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Inflector/Tests/InflectorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Inflector/Tests/InflectorTest.php @@ -20,139 +20,139 @@ class InflectorTest extends TestCase { // see http://english-zone.com/spelling/plurals.html // see http://www.scribd.com/doc/3271143/List-of-100-Irregular-Plural-Nouns-in-English - return array( - array('accesses', 'access'), - array('addresses', 'address'), - array('agendas', 'agenda'), - array('alumnae', 'alumna'), - array('alumni', 'alumnus'), - array('analyses', array('analys', 'analyse', 'analysis')), - array('antennae', 'antenna'), - array('antennas', 'antenna'), - array('appendices', array('appendex', 'appendix', 'appendice')), - array('arches', array('arch', 'arche')), - array('atlases', array('atlas', 'atlase', 'atlasis')), - array('axes', array('ax', 'axe', 'axis')), - array('babies', 'baby'), - array('bacteria', array('bacterion', 'bacterium')), - array('bases', array('bas', 'base', 'basis')), - array('batches', array('batch', 'batche')), - array('beaux', 'beau'), - array('bees', array('be', 'bee')), - array('boxes', 'box'), - array('boys', 'boy'), - array('bureaus', 'bureau'), - array('bureaux', 'bureau'), - array('buses', array('bus', 'buse', 'busis')), - array('bushes', array('bush', 'bushe')), - array('calves', array('calf', 'calve', 'calff')), - array('cars', 'car'), - array('cassettes', array('cassett', 'cassette')), - array('caves', array('caf', 'cave', 'caff')), - array('chateaux', 'chateau'), - array('cheeses', array('chees', 'cheese', 'cheesis')), - array('children', 'child'), - array('circuses', array('circus', 'circuse', 'circusis')), - array('cliffs', 'cliff'), - array('committee', 'committee'), - array('crises', array('cris', 'crise', 'crisis')), - array('criteria', array('criterion', 'criterium')), - array('cups', 'cup'), - array('data', array('daton', 'datum')), - array('days', 'day'), - array('discos', 'disco'), - array('devices', array('devex', 'devix', 'device')), - array('drives', 'drive'), - array('drivers', 'driver'), - array('dwarves', array('dwarf', 'dwarve', 'dwarff')), - array('echoes', array('echo', 'echoe')), - array('elves', array('elf', 'elve', 'elff')), - array('emphases', array('emphas', 'emphase', 'emphasis')), - array('faxes', 'fax'), - array('feet', 'foot'), - array('feedback', 'feedback'), - array('foci', 'focus'), - array('focuses', array('focus', 'focuse', 'focusis')), - array('formulae', 'formula'), - array('formulas', 'formula'), - array('fungi', 'fungus'), - array('funguses', array('fungus', 'funguse', 'fungusis')), - array('garages', array('garag', 'garage')), - array('geese', 'goose'), - array('halves', array('half', 'halve', 'halff')), - array('hats', 'hat'), - array('heroes', array('hero', 'heroe')), - array('hippopotamuses', array('hippopotamus', 'hippopotamuse', 'hippopotamusis')), //hippopotami - array('hoaxes', 'hoax'), - array('hooves', array('hoof', 'hoove', 'hooff')), - array('houses', array('hous', 'house', 'housis')), - array('indexes', 'index'), - array('indices', array('index', 'indix', 'indice')), - array('ions', 'ion'), - array('irises', array('iris', 'irise', 'irisis')), - array('kisses', 'kiss'), - array('knives', 'knife'), - array('lamps', 'lamp'), - array('leaves', array('leaf', 'leave', 'leaff')), - array('lice', 'louse'), - array('lives', 'life'), - array('matrices', array('matrex', 'matrix', 'matrice')), - array('matrixes', 'matrix'), - array('men', 'man'), - array('mice', 'mouse'), - array('moves', 'move'), - array('movies', 'movie'), - array('nebulae', 'nebula'), - array('neuroses', array('neuros', 'neurose', 'neurosis')), - array('news', 'news'), - array('oases', array('oas', 'oase', 'oasis')), - array('objectives', 'objective'), - array('oxen', 'ox'), - array('parties', 'party'), - array('people', 'person'), - array('persons', 'person'), - array('phenomena', array('phenomenon', 'phenomenum')), - array('photos', 'photo'), - array('pianos', 'piano'), - array('plateaux', 'plateau'), - array('poppies', 'poppy'), - array('prices', array('prex', 'prix', 'price')), - array('quizzes', 'quiz'), - array('radii', 'radius'), - array('roofs', 'roof'), - array('roses', array('ros', 'rose', 'rosis')), - array('sandwiches', array('sandwich', 'sandwiche')), - array('scarves', array('scarf', 'scarve', 'scarff')), - array('schemas', 'schema'), //schemata - array('selfies', 'selfie'), - array('series', 'series'), - array('services', 'service'), - array('sheriffs', 'sheriff'), - array('shoes', array('sho', 'shoe')), - array('spies', 'spy'), - array('staves', array('staf', 'stave', 'staff')), - array('stories', 'story'), - array('strata', array('straton', 'stratum')), - array('suitcases', array('suitcas', 'suitcase', 'suitcasis')), - array('syllabi', 'syllabus'), - array('tags', 'tag'), - array('teeth', 'tooth'), - array('theses', array('thes', 'these', 'thesis')), - array('thieves', array('thief', 'thieve', 'thieff')), - array('trees', array('tre', 'tree')), - array('waltzes', array('waltz', 'waltze')), - array('wives', 'wife'), + return [ + ['accesses', 'access'], + ['addresses', 'address'], + ['agendas', 'agenda'], + ['alumnae', 'alumna'], + ['alumni', 'alumnus'], + ['analyses', ['analys', 'analyse', 'analysis']], + ['antennae', 'antenna'], + ['antennas', 'antenna'], + ['appendices', ['appendex', 'appendix', 'appendice']], + ['arches', ['arch', 'arche']], + ['atlases', ['atlas', 'atlase', 'atlasis']], + ['axes', ['ax', 'axe', 'axis']], + ['babies', 'baby'], + ['bacteria', ['bacterion', 'bacterium']], + ['bases', ['bas', 'base', 'basis']], + ['batches', ['batch', 'batche']], + ['beaux', 'beau'], + ['bees', ['be', 'bee']], + ['boxes', 'box'], + ['boys', 'boy'], + ['bureaus', 'bureau'], + ['bureaux', 'bureau'], + ['buses', ['bus', 'buse', 'busis']], + ['bushes', ['bush', 'bushe']], + ['calves', ['calf', 'calve', 'calff']], + ['cars', 'car'], + ['cassettes', ['cassett', 'cassette']], + ['caves', ['caf', 'cave', 'caff']], + ['chateaux', 'chateau'], + ['cheeses', ['chees', 'cheese', 'cheesis']], + ['children', 'child'], + ['circuses', ['circus', 'circuse', 'circusis']], + ['cliffs', 'cliff'], + ['committee', 'committee'], + ['crises', ['cris', 'crise', 'crisis']], + ['criteria', ['criterion', 'criterium']], + ['cups', 'cup'], + ['data', ['daton', 'datum']], + ['days', 'day'], + ['discos', 'disco'], + ['devices', ['devex', 'devix', 'device']], + ['drives', 'drive'], + ['drivers', 'driver'], + ['dwarves', ['dwarf', 'dwarve', 'dwarff']], + ['echoes', ['echo', 'echoe']], + ['elves', ['elf', 'elve', 'elff']], + ['emphases', ['emphas', 'emphase', 'emphasis']], + ['faxes', 'fax'], + ['feet', 'foot'], + ['feedback', 'feedback'], + ['foci', 'focus'], + ['focuses', ['focus', 'focuse', 'focusis']], + ['formulae', 'formula'], + ['formulas', 'formula'], + ['fungi', 'fungus'], + ['funguses', ['fungus', 'funguse', 'fungusis']], + ['garages', ['garag', 'garage']], + ['geese', 'goose'], + ['halves', ['half', 'halve', 'halff']], + ['hats', 'hat'], + ['heroes', ['hero', 'heroe']], + ['hippopotamuses', ['hippopotamus', 'hippopotamuse', 'hippopotamusis']], //hippopotami + ['hoaxes', 'hoax'], + ['hooves', ['hoof', 'hoove', 'hooff']], + ['houses', ['hous', 'house', 'housis']], + ['indexes', 'index'], + ['indices', ['index', 'indix', 'indice']], + ['ions', 'ion'], + ['irises', ['iris', 'irise', 'irisis']], + ['kisses', 'kiss'], + ['knives', 'knife'], + ['lamps', 'lamp'], + ['leaves', ['leaf', 'leave', 'leaff']], + ['lice', 'louse'], + ['lives', 'life'], + ['matrices', ['matrex', 'matrix', 'matrice']], + ['matrixes', 'matrix'], + ['men', 'man'], + ['mice', 'mouse'], + ['moves', 'move'], + ['movies', 'movie'], + ['nebulae', 'nebula'], + ['neuroses', ['neuros', 'neurose', 'neurosis']], + ['news', 'news'], + ['oases', ['oas', 'oase', 'oasis']], + ['objectives', 'objective'], + ['oxen', 'ox'], + ['parties', 'party'], + ['people', 'person'], + ['persons', 'person'], + ['phenomena', ['phenomenon', 'phenomenum']], + ['photos', 'photo'], + ['pianos', 'piano'], + ['plateaux', 'plateau'], + ['poppies', 'poppy'], + ['prices', ['prex', 'prix', 'price']], + ['quizzes', 'quiz'], + ['radii', 'radius'], + ['roofs', 'roof'], + ['roses', ['ros', 'rose', 'rosis']], + ['sandwiches', ['sandwich', 'sandwiche']], + ['scarves', ['scarf', 'scarve', 'scarff']], + ['schemas', 'schema'], //schemata + ['selfies', 'selfie'], + ['series', 'series'], + ['services', 'service'], + ['sheriffs', 'sheriff'], + ['shoes', ['sho', 'shoe']], + ['spies', 'spy'], + ['staves', ['staf', 'stave', 'staff']], + ['stories', 'story'], + ['strata', ['straton', 'stratum']], + ['suitcases', ['suitcas', 'suitcase', 'suitcasis']], + ['syllabi', 'syllabus'], + ['tags', 'tag'], + ['teeth', 'tooth'], + ['theses', ['thes', 'these', 'thesis']], + ['thieves', ['thief', 'thieve', 'thieff']], + ['trees', ['tre', 'tree']], + ['waltzes', ['waltz', 'waltze']], + ['wives', 'wife'], // test casing: if the first letter was uppercase, it should remain so - array('Men', 'Man'), - array('GrandChildren', 'GrandChild'), - array('SubTrees', array('SubTre', 'SubTree')), + ['Men', 'Man'], + ['GrandChildren', 'GrandChild'], + ['SubTrees', ['SubTre', 'SubTree']], // Known issues - //array('insignia', 'insigne'), - //array('insignias', 'insigne'), - //array('rattles', 'rattle'), - ); + //['insignia', 'insigne'], + //['insignias', 'insigne'], + //['rattles', 'rattle'], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Collator/Collator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Collator/Collator.php index 6260e5f0..62b1ddc9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Collator/Collator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Collator/Collator.php @@ -108,11 +108,11 @@ class Collator */ public function asort(&$array, $sortFlag = self::SORT_REGULAR) { - $intlToPlainFlagMap = array( + $intlToPlainFlagMap = [ self::SORT_REGULAR => \SORT_REGULAR, self::SORT_NUMERIC => \SORT_NUMERIC, self::SORT_STRING => \SORT_STRING, - ); + ]; $plainSortFlag = isset($intlToPlainFlagMap[$sortFlag]) ? $intlToPlainFlagMap[$sortFlag] : self::SORT_REGULAR; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php index 035166c1..1efade5b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php @@ -33,7 +33,7 @@ class BundleEntryReader implements BundleEntryReaderInterface /** * A mapping of locale aliases to locales. */ - private $localeAliases = array(); + private $localeAliases = []; /** * Creates an entry reader based on the given resource bundle reader. @@ -76,7 +76,7 @@ class BundleEntryReader implements BundleEntryReaderInterface $readSucceeded = false; $exception = null; $currentLocale = $locale; - $testedLocales = array(); + $testedLocales = []; while (null !== $currentLocale) { // Resolve any aliases to their target locales diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReaderInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReaderInterface.php index 13cf85bb..8dac0aad 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReaderInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReaderInterface.php @@ -35,7 +35,7 @@ interface BundleEntryReaderInterface extends BundleReaderInterface * * Then the value can be read by calling: * - * $reader->readEntry('...', 'en', array('TopLevel', 'NestedLevel', 'Entry')); + * $reader->readEntry('...', 'en', ['TopLevel', 'NestedLevel', 'Entry']); * * @param string $path The path to the resource bundle * @param string $locale The locale to read diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Writer/PhpBundleWriter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Writer/PhpBundleWriter.php index 53d943dc..2cd959fb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Writer/PhpBundleWriter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Writer/PhpBundleWriter.php @@ -43,9 +43,11 @@ TEMPLATE; }); $data = var_export($data, true); - $data = preg_replace('/array \(/', 'array(', $data); - $data = preg_replace('/\n {1,10}array\(/', 'array(', $data); + $data = preg_replace('/array \(/', '[', $data); + $data = preg_replace('/\n {1,10}\[/', '[', $data); $data = preg_replace('/ /', ' ', $data); + $data = preg_replace('/\),$/m', '],', $data); + $data = preg_replace('/\)$/', ']', $data); $data = sprintf($template, $data); file_put_contents($path.'/'.$locale.'.php', $data); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php index e657b382..1be618d7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php @@ -42,7 +42,7 @@ class CurrencyDataGenerator extends AbstractDataGenerator /** * Monetary units excluded from generation. */ - private static $blacklist = array( + private static $blacklist = [ self::UNKNOWN_CURRENCY_ID => true, self::EUROPEAN_COMPOSITE_UNIT_ID => true, self::EUROPEAN_MONETARY_UNIT_ID => true, @@ -56,14 +56,14 @@ class CurrencyDataGenerator extends AbstractDataGenerator self::PALLADIUM_ID => true, self::SUCRE_ID => true, self::SPECIAL_DRAWING_RIGHTS_ID => true, - ); + ]; /** * Collects all available currency codes. * * @var string[] */ - private $currencyCodes = array(); + private $currencyCodes = []; /** * {@inheritdoc} @@ -87,7 +87,7 @@ class CurrencyDataGenerator extends AbstractDataGenerator */ protected function preGenerate() { - $this->currencyCodes = array(); + $this->currencyCodes = []; } /** @@ -98,10 +98,10 @@ class CurrencyDataGenerator extends AbstractDataGenerator $localeBundle = $reader->read($tempDir, $displayLocale); if (isset($localeBundle['Currencies']) && null !== $localeBundle['Currencies']) { - $data = array( + $data = [ 'Version' => $localeBundle['Version'], 'Names' => $this->generateSymbolNamePairs($localeBundle), - ); + ]; $this->currencyCodes = array_merge($this->currencyCodes, array_keys($data['Names'])); @@ -116,10 +116,10 @@ class CurrencyDataGenerator extends AbstractDataGenerator { $rootBundle = $reader->read($tempDir, 'root'); - return array( + return [ 'Version' => $rootBundle['Version'], 'Names' => $this->generateSymbolNamePairs($rootBundle), - ); + ]; } /** @@ -135,12 +135,12 @@ class CurrencyDataGenerator extends AbstractDataGenerator sort($this->currencyCodes); - $data = array( + $data = [ 'Version' => $rootBundle['Version'], 'Currencies' => $this->currencyCodes, 'Meta' => $this->generateCurrencyMeta($supplementalDataBundle), 'Alpha3ToNumeric' => $this->generateAlpha3ToNumericMapping($numericCodesBundle, $this->currencyCodes), - ); + ]; $data['NumericToAlpha3'] = $this->generateNumericToAlpha3Mapping($data['Alpha3ToNumeric']); @@ -181,14 +181,14 @@ class CurrencyDataGenerator extends AbstractDataGenerator private function generateNumericToAlpha3Mapping(array $alpha3ToNumericMapping) { - $numericToAlpha3Mapping = array(); + $numericToAlpha3Mapping = []; foreach ($alpha3ToNumericMapping as $alpha3 => $numeric) { // Make sure that the mapping is stored as table and not as array $numeric = (string) $numeric; if (!isset($numericToAlpha3Mapping[$numeric])) { - $numericToAlpha3Mapping[$numeric] = array(); + $numericToAlpha3Mapping[$numeric] = []; } $numericToAlpha3Mapping[$numeric][] = $alpha3; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/GeneratorConfig.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/GeneratorConfig.php index 9bb9304d..230b3434 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/GeneratorConfig.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/GeneratorConfig.php @@ -28,7 +28,7 @@ class GeneratorConfig /** * @var BundleWriterInterface[] */ - private $bundleWriters = array(); + private $bundleWriters = []; /** * @param string $sourceDir diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php index 9b3cf0a4..e59eb4db 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php @@ -29,7 +29,7 @@ class LanguageDataGenerator extends AbstractDataGenerator /** * Source: http://www-01.sil.org/iso639-3/codes.asp. */ - private static $preferredAlpha2ToAlpha3Mapping = array( + private static $preferredAlpha2ToAlpha3Mapping = [ 'ak' => 'aka', 'ar' => 'ara', 'ay' => 'aym', @@ -81,14 +81,14 @@ class LanguageDataGenerator extends AbstractDataGenerator 'yi' => 'yid', 'za' => 'zha', 'zh' => 'zho', - ); + ]; /** * Collects all available language codes. * * @var string[] */ - private $languageCodes = array(); + private $languageCodes = []; /** * {@inheritdoc} @@ -112,7 +112,7 @@ class LanguageDataGenerator extends AbstractDataGenerator */ protected function preGenerate() { - $this->languageCodes = array(); + $this->languageCodes = []; } /** @@ -124,10 +124,10 @@ class LanguageDataGenerator extends AbstractDataGenerator // isset() on \ResourceBundle returns true even if the value is null if (isset($localeBundle['Languages']) && null !== $localeBundle['Languages']) { - $data = array( + $data = [ 'Version' => $localeBundle['Version'], 'Names' => iterator_to_array($localeBundle['Languages']), - ); + ]; $this->languageCodes = array_merge($this->languageCodes, array_keys($data['Names'])); @@ -154,18 +154,18 @@ class LanguageDataGenerator extends AbstractDataGenerator sort($this->languageCodes); - return array( + return [ 'Version' => $rootBundle['Version'], 'Languages' => $this->languageCodes, 'Aliases' => array_column(iterator_to_array($metadataBundle['alias']['language']), 'replacement'), 'Alpha2ToAlpha3' => $this->generateAlpha2ToAlpha3Mapping($metadataBundle), - ); + ]; } private function generateAlpha2ToAlpha3Mapping(ArrayAccessibleResourceBundle $metadataBundle) { $aliases = iterator_to_array($metadataBundle['alias']['language']); - $alpha2ToAlpha3 = array(); + $alpha2ToAlpha3 = []; foreach ($aliases as $alias => $language) { $language = $language['replacement']; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/LocaleDataGenerator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/LocaleDataGenerator.php index e2cf6d31..11b1b6b6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/LocaleDataGenerator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/LocaleDataGenerator.php @@ -70,12 +70,12 @@ class LocaleDataGenerator // Generate a list of (existing) locale fallbacks $fallbackMapping = $this->generateFallbackMapping($displayLocales, $aliases); - $localeNames = array(); + $localeNames = []; // Generate locale names for all locales that have translations in // at least the language or the region bundle foreach ($displayLocales as $displayLocale => $_) { - $localeNames[$displayLocale] = array(); + $localeNames[$displayLocale] = []; foreach ($locales as $locale) { try { @@ -111,9 +111,9 @@ class LocaleDataGenerator } foreach ($writers as $targetDir => $writer) { - $writer->write($targetDir.'/'.$this->dirName, $displayLocale, array( + $writer->write($targetDir.'/'.$this->dirName, $displayLocale, [ 'Names' => $localeNames[$displayLocale], - )); + ]); } } @@ -121,18 +121,18 @@ class LocaleDataGenerator // target foreach ($aliases as $alias => $aliasOf) { foreach ($writers as $targetDir => $writer) { - $writer->write($targetDir.'/'.$this->dirName, $alias, array( + $writer->write($targetDir.'/'.$this->dirName, $alias, [ '%%ALIAS' => $aliasOf, - )); + ]); } } // Create root file which maps locale codes to locale codes, for fallback foreach ($writers as $targetDir => $writer) { - $writer->write($targetDir.'/'.$this->dirName, 'meta', array( + $writer->write($targetDir.'/'.$this->dirName, 'meta', [ 'Locales' => $locales, 'Aliases' => $aliases, - )); + ]); } } @@ -157,7 +157,7 @@ class LocaleDataGenerator // the name sorting // $name = $this->langBundle->getLanguageName($displayLocale, $lang, $region); - // Some languages are simply not translated + // Some languages are not translated // Example: "az" (Azerbaijani) has no translation in "af" (Afrikaans) if (null === ($name = $this->languageDataProvider->getName($lang, $displayLocale))) { return; @@ -168,7 +168,7 @@ class LocaleDataGenerator // continue; //} - $extras = array(); + $extras = []; // Discover the name of the script part of the locale // i.e. in zh_Hans_MO, "Hans" is the script @@ -209,7 +209,7 @@ class LocaleDataGenerator private function generateFallbackMapping(array $displayLocales, array $aliases) { - $mapping = array(); + $mapping = []; foreach ($displayLocales as $displayLocale => $_) { $mapping[$displayLocale] = null; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php index 920e2e31..0728db80 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php @@ -40,7 +40,7 @@ class RegionDataGenerator extends AbstractDataGenerator /** * Regions excluded from generation. */ - private static $blacklist = array( + private static $blacklist = [ self::UNKNOWN_REGION_ID => true, // Look like countries, but are sub-continents self::OUTLYING_OCEANIA_REGION_ID => true, @@ -53,14 +53,14 @@ class RegionDataGenerator extends AbstractDataGenerator self::BOUVET_ISLAND_ID => true, self::HEARD_MCDONALD_ISLANDS_ID => true, self::CLIPPERTON_ISLAND_ID => true, - ); + ]; /** * Collects all available language codes. * * @var string[] */ - private $regionCodes = array(); + private $regionCodes = []; /** * {@inheritdoc} @@ -83,7 +83,7 @@ class RegionDataGenerator extends AbstractDataGenerator */ protected function preGenerate() { - $this->regionCodes = array(); + $this->regionCodes = []; } /** @@ -95,10 +95,10 @@ class RegionDataGenerator extends AbstractDataGenerator // isset() on \ResourceBundle returns true even if the value is null if (isset($localeBundle['Countries']) && null !== $localeBundle['Countries']) { - $data = array( + $data = [ 'Version' => $localeBundle['Version'], 'Names' => $this->generateRegionNames($localeBundle), - ); + ]; $this->regionCodes = array_merge($this->regionCodes, array_keys($data['Names'])); @@ -124,10 +124,10 @@ class RegionDataGenerator extends AbstractDataGenerator sort($this->regionCodes); - return array( + return [ 'Version' => $rootBundle['Version'], 'Regions' => $this->regionCodes, - ); + ]; } /** @@ -136,7 +136,7 @@ class RegionDataGenerator extends AbstractDataGenerator protected function generateRegionNames(ArrayAccessibleResourceBundle $localeBundle) { $unfilteredRegionNames = iterator_to_array($localeBundle['Countries']); - $regionNames = array(); + $regionNames = []; foreach ($unfilteredRegionNames as $region => $regionName) { if (isset(self::$blacklist[$region])) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/ScriptDataGenerator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/ScriptDataGenerator.php index 7ba6bbe6..7ed06252 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/ScriptDataGenerator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/ScriptDataGenerator.php @@ -29,7 +29,7 @@ class ScriptDataGenerator extends AbstractDataGenerator * * @var string[] */ - private $scriptCodes = array(); + private $scriptCodes = []; /** * {@inheritdoc} @@ -52,7 +52,7 @@ class ScriptDataGenerator extends AbstractDataGenerator */ protected function preGenerate() { - $this->scriptCodes = array(); + $this->scriptCodes = []; } /** @@ -64,10 +64,10 @@ class ScriptDataGenerator extends AbstractDataGenerator // isset() on \ResourceBundle returns true even if the value is null if (isset($localeBundle['Scripts']) && null !== $localeBundle['Scripts']) { - $data = array( + $data = [ 'Version' => $localeBundle['Version'], 'Names' => iterator_to_array($localeBundle['Scripts']), - ); + ]; $this->scriptCodes = array_merge($this->scriptCodes, array_keys($data['Names'])); @@ -93,9 +93,9 @@ class ScriptDataGenerator extends AbstractDataGenerator sort($this->scriptCodes); - return array( + return [ 'Version' => $rootBundle['Version'], 'Scripts' => $this->scriptCodes, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/CurrencyDataProvider.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/CurrencyDataProvider.php index 5cf5fc24..dacde26f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/CurrencyDataProvider.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/CurrencyDataProvider.php @@ -47,7 +47,7 @@ class CurrencyDataProvider public function getCurrencies() { - return $this->reader->readEntry($this->path, 'meta', array('Currencies')); + return $this->reader->readEntry($this->path, 'meta', ['Currencies']); } public function getSymbol($currency, $displayLocale = null) @@ -56,7 +56,7 @@ class CurrencyDataProvider $displayLocale = Locale::getDefault(); } - return $this->reader->readEntry($this->path, $displayLocale, array('Names', $currency, static::INDEX_SYMBOL)); + return $this->reader->readEntry($this->path, $displayLocale, ['Names', $currency, static::INDEX_SYMBOL]); } public function getName($currency, $displayLocale = null) @@ -65,7 +65,7 @@ class CurrencyDataProvider $displayLocale = Locale::getDefault(); } - return $this->reader->readEntry($this->path, $displayLocale, array('Names', $currency, static::INDEX_NAME)); + return $this->reader->readEntry($this->path, $displayLocale, ['Names', $currency, static::INDEX_NAME]); } public function getNames($displayLocale = null) @@ -80,7 +80,7 @@ class CurrencyDataProvider // 3-letter codes (e.g. 32 => "ARA", "ARP", "ARS") // ==================================================================== - $names = $this->reader->readEntry($this->path, $displayLocale, array('Names')); + $names = $this->reader->readEntry($this->path, $displayLocale, ['Names']); if ($names instanceof \Traversable) { $names = iterator_to_array($names); @@ -106,9 +106,9 @@ class CurrencyDataProvider public function getFractionDigits($currency) { try { - return $this->reader->readEntry($this->path, 'meta', array('Meta', $currency, static::INDEX_FRACTION_DIGITS)); + return $this->reader->readEntry($this->path, 'meta', ['Meta', $currency, static::INDEX_FRACTION_DIGITS]); } catch (MissingResourceException $e) { - return $this->reader->readEntry($this->path, 'meta', array('Meta', 'DEFAULT', static::INDEX_FRACTION_DIGITS)); + return $this->reader->readEntry($this->path, 'meta', ['Meta', 'DEFAULT', static::INDEX_FRACTION_DIGITS]); } } @@ -118,9 +118,9 @@ class CurrencyDataProvider public function getRoundingIncrement($currency) { try { - return $this->reader->readEntry($this->path, 'meta', array('Meta', $currency, static::INDEX_ROUNDING_INCREMENT)); + return $this->reader->readEntry($this->path, 'meta', ['Meta', $currency, static::INDEX_ROUNDING_INCREMENT]); } catch (MissingResourceException $e) { - return $this->reader->readEntry($this->path, 'meta', array('Meta', 'DEFAULT', static::INDEX_ROUNDING_INCREMENT)); + return $this->reader->readEntry($this->path, 'meta', ['Meta', 'DEFAULT', static::INDEX_ROUNDING_INCREMENT]); } } @@ -129,7 +129,7 @@ class CurrencyDataProvider */ public function getNumericCode($currency) { - return $this->reader->readEntry($this->path, 'meta', array('Alpha3ToNumeric', $currency)); + return $this->reader->readEntry($this->path, 'meta', ['Alpha3ToNumeric', $currency]); } /** @@ -137,6 +137,6 @@ class CurrencyDataProvider */ public function forNumericCode($numericCode) { - return $this->reader->readEntry($this->path, 'meta', array('NumericToAlpha3', (string) $numericCode)); + return $this->reader->readEntry($this->path, 'meta', ['NumericToAlpha3', (string) $numericCode]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/LanguageDataProvider.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/LanguageDataProvider.php index 2a2084e9..21781585 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/LanguageDataProvider.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/LanguageDataProvider.php @@ -40,12 +40,12 @@ class LanguageDataProvider public function getLanguages() { - return $this->reader->readEntry($this->path, 'meta', array('Languages')); + return $this->reader->readEntry($this->path, 'meta', ['Languages']); } public function getAliases() { - return $this->reader->readEntry($this->path, 'root', array('Aliases')); + return $this->reader->readEntry($this->path, 'root', ['Aliases']); } public function getName($language, $displayLocale = null) @@ -54,7 +54,7 @@ class LanguageDataProvider $displayLocale = Locale::getDefault(); } - return $this->reader->readEntry($this->path, $displayLocale, array('Names', $language)); + return $this->reader->readEntry($this->path, $displayLocale, ['Names', $language]); } public function getNames($displayLocale = null) @@ -63,7 +63,7 @@ class LanguageDataProvider $displayLocale = Locale::getDefault(); } - $languages = $this->reader->readEntry($this->path, $displayLocale, array('Names')); + $languages = $this->reader->readEntry($this->path, $displayLocale, ['Names']); if ($languages instanceof \Traversable) { $languages = iterator_to_array($languages); @@ -77,6 +77,6 @@ class LanguageDataProvider public function getAlpha3Code($language) { - return $this->reader->readEntry($this->path, 'meta', array('Alpha2ToAlpha3', $language)); + return $this->reader->readEntry($this->path, 'meta', ['Alpha2ToAlpha3', $language]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/LocaleDataProvider.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/LocaleDataProvider.php index 0eb82f62..4328b57d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/LocaleDataProvider.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/LocaleDataProvider.php @@ -40,12 +40,12 @@ class LocaleDataProvider public function getLocales() { - return $this->reader->readEntry($this->path, 'meta', array('Locales')); + return $this->reader->readEntry($this->path, 'meta', ['Locales']); } public function getAliases() { - $aliases = $this->reader->readEntry($this->path, 'meta', array('Aliases')); + $aliases = $this->reader->readEntry($this->path, 'meta', ['Aliases']); if ($aliases instanceof \Traversable) { $aliases = iterator_to_array($aliases); @@ -60,7 +60,7 @@ class LocaleDataProvider $displayLocale = Locale::getDefault(); } - return $this->reader->readEntry($this->path, $displayLocale, array('Names', $locale)); + return $this->reader->readEntry($this->path, $displayLocale, ['Names', $locale]); } public function getNames($displayLocale = null) @@ -69,7 +69,7 @@ class LocaleDataProvider $displayLocale = Locale::getDefault(); } - $names = $this->reader->readEntry($this->path, $displayLocale, array('Names')); + $names = $this->reader->readEntry($this->path, $displayLocale, ['Names']); if ($names instanceof \Traversable) { $names = iterator_to_array($names); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/RegionDataProvider.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/RegionDataProvider.php index d3c81641..08bd7243 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/RegionDataProvider.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/RegionDataProvider.php @@ -40,7 +40,7 @@ class RegionDataProvider public function getRegions() { - return $this->reader->readEntry($this->path, 'meta', array('Regions')); + return $this->reader->readEntry($this->path, 'meta', ['Regions']); } public function getName($region, $displayLocale = null) @@ -49,7 +49,7 @@ class RegionDataProvider $displayLocale = Locale::getDefault(); } - return $this->reader->readEntry($this->path, $displayLocale, array('Names', $region)); + return $this->reader->readEntry($this->path, $displayLocale, ['Names', $region]); } public function getNames($displayLocale = null) @@ -58,7 +58,7 @@ class RegionDataProvider $displayLocale = Locale::getDefault(); } - $names = $this->reader->readEntry($this->path, $displayLocale, array('Names')); + $names = $this->reader->readEntry($this->path, $displayLocale, ['Names']); if ($names instanceof \Traversable) { $names = iterator_to_array($names); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/ScriptDataProvider.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/ScriptDataProvider.php index 29ff1d63..c6844494 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/ScriptDataProvider.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/ScriptDataProvider.php @@ -40,7 +40,7 @@ class ScriptDataProvider public function getScripts() { - return $this->reader->readEntry($this->path, 'meta', array('Scripts')); + return $this->reader->readEntry($this->path, 'meta', ['Scripts']); } public function getName($script, $displayLocale = null) @@ -49,7 +49,7 @@ class ScriptDataProvider $displayLocale = Locale::getDefault(); } - return $this->reader->readEntry($this->path, $displayLocale, array('Names', $script)); + return $this->reader->readEntry($this->path, $displayLocale, ['Names', $script]); } public function getNames($displayLocale = null) @@ -58,7 +58,7 @@ class ScriptDataProvider $displayLocale = Locale::getDefault(); } - $names = $this->reader->readEntry($this->path, $displayLocale, array('Names')); + $names = $this->reader->readEntry($this->path, $displayLocale, ['Names']); if ($names instanceof \Traversable) { $names = iterator_to_array($names); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/LocaleScanner.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/LocaleScanner.php index 0604593f..ba0a6c5f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/LocaleScanner.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/LocaleScanner.php @@ -68,7 +68,7 @@ class LocaleScanner public function scanAliases($sourceDir) { $locales = $this->scanLocales($sourceDir); - $aliases = array(); + $aliases = []; // Delete locales that are no aliases foreach ($locales as $locale) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/RecursiveArrayAccess.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/RecursiveArrayAccess.php index c133932c..09dd551d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/RecursiveArrayAccess.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/RecursiveArrayAccess.php @@ -25,7 +25,7 @@ class RecursiveArrayAccess foreach ($indices as $index) { // Use array_key_exists() for arrays, isset() otherwise if (\is_array($array)) { - if (array_key_exists($index, $array)) { + if (\array_key_exists($index, $array)) { $array = $array[$index]; continue; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/RingBuffer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/RingBuffer.php index 1ab1a301..9f82d86e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/RingBuffer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/RingBuffer.php @@ -26,9 +26,9 @@ use Symfony\Component\Intl\Exception\OutOfBoundsException; */ class RingBuffer implements \ArrayAccess { - private $values = array(); + private $values = []; - private $indices = array(); + private $indices = []; private $cursor = 0; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/AmPmTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/AmPmTransformer.php index 66376475..2593cd89 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/AmPmTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/AmPmTransformer.php @@ -41,8 +41,8 @@ class AmPmTransformer extends Transformer */ public function extractDateOptions($matched, $length) { - return array( + return [ 'marker' => $matched, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayOfWeekTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayOfWeekTransformer.php index a174fdca..1da32cd0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayOfWeekTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayOfWeekTransformer.php @@ -60,6 +60,6 @@ class DayOfWeekTransformer extends Transformer */ public function extractDateOptions($matched, $length) { - return array(); + return []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayOfYearTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayOfYearTransformer.php index 5af6dd72..8b48371f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayOfYearTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayOfYearTransformer.php @@ -43,6 +43,6 @@ class DayOfYearTransformer extends Transformer */ public function extractDateOptions($matched, $length) { - return array(); + return []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayTransformer.php index f0ded907..c07855df 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayTransformer.php @@ -41,8 +41,8 @@ class DayTransformer extends Transformer */ public function extractDateOptions($matched, $length) { - return array( + return [ 'day' => (int) $matched, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php index 82025168..9c0d86ef 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php @@ -49,7 +49,7 @@ class FullTransformer $notImplementedCharsMatch = $this->buildCharsMatch($this->notImplementedChars); $this->regExp = "/($this->quoteMatch|$implementedCharsMatch|$notImplementedCharsMatch)/"; - $this->transformers = array( + $this->transformers = [ 'M' => new MonthTransformer(), 'L' => new MonthTransformer(), 'y' => new YearTransformer(), @@ -66,7 +66,7 @@ class FullTransformer 'm' => new MinuteTransformer(), 's' => new SecondTransformer(), 'z' => new TimezoneTransformer(), - ); + ]; } /** @@ -140,7 +140,7 @@ class FullTransformer $reverseMatchingRegExp = $this->getReverseMatchingRegExp($this->pattern); $reverseMatchingRegExp = '/^'.$reverseMatchingRegExp.'$/'; - $options = array(); + $options = []; if (preg_match($reverseMatchingRegExp, $value, $matches)) { $matches = $this->normalizeArray($matches); @@ -255,17 +255,17 @@ class FullTransformer */ protected function normalizeArray(array $data) { - $ret = array(); + $ret = []; foreach ($data as $key => $value) { if (!\is_string($key)) { continue; } - $ret[$key[0]] = array( + $ret[$key[0]] = [ 'value' => $value, 'pattern' => $key, - ); + ]; } return $ret; @@ -332,7 +332,7 @@ class FullTransformer */ private function getDefaultValueForOptions(array $options) { - return array( + return [ 'year' => isset($options['year']) ? $options['year'] : 1970, 'month' => isset($options['month']) ? $options['month'] : 1, 'day' => isset($options['day']) ? $options['day'] : 1, @@ -342,6 +342,6 @@ class FullTransformer 'second' => isset($options['second']) ? $options['second'] : 0, 'marker' => isset($options['marker']) ? $options['marker'] : null, 'timezone' => isset($options['timezone']) ? $options['timezone'] : null, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour1200Transformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour1200Transformer.php index 948e3450..157d2428 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour1200Transformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour1200Transformer.php @@ -56,9 +56,9 @@ class Hour1200Transformer extends HourTransformer */ public function extractDateOptions($matched, $length) { - return array( + return [ 'hour' => (int) $matched, 'hourInstance' => $this, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour1201Transformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour1201Transformer.php index 19c4d203..7e704b04 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour1201Transformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour1201Transformer.php @@ -56,9 +56,9 @@ class Hour1201Transformer extends HourTransformer */ public function extractDateOptions($matched, $length) { - return array( + return [ 'hour' => (int) $matched, 'hourInstance' => $this, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour2400Transformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour2400Transformer.php index e43d0ee8..904a0369 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour2400Transformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour2400Transformer.php @@ -55,9 +55,9 @@ class Hour2400Transformer extends HourTransformer */ public function extractDateOptions($matched, $length) { - return array( + return [ 'hour' => (int) $matched, 'hourInstance' => $this, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour2401Transformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour2401Transformer.php index df4e671a..e2988d85 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour2401Transformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour2401Transformer.php @@ -58,9 +58,9 @@ class Hour2401Transformer extends HourTransformer */ public function extractDateOptions($matched, $length) { - return array( + return [ 'hour' => (int) $matched, 'hourInstance' => $this, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/MinuteTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/MinuteTransformer.php index 08b5356e..d0ba82e1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/MinuteTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/MinuteTransformer.php @@ -43,8 +43,8 @@ class MinuteTransformer extends Transformer */ public function extractDateOptions($matched, $length) { - return array( + return [ 'minute' => (int) $matched, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php index cc917ef8..40ab1d67 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php @@ -20,7 +20,7 @@ namespace Symfony\Component\Intl\DateFormatter\DateFormat; */ class MonthTransformer extends Transformer { - protected static $months = array( + protected static $months = [ 'January', 'February', 'March', @@ -33,22 +33,22 @@ class MonthTransformer extends Transformer 'October', 'November', 'December', - ); + ]; /** * Short months names (first 3 letters). */ - protected static $shortMonths = array(); + protected static $shortMonths = []; /** * Flipped $months array, $name => $index. */ - protected static $flippedMonths = array(); + protected static $flippedMonths = []; /** * Flipped $shortMonths array, $name => $index. */ - protected static $flippedShortMonths = array(); + protected static $flippedShortMonths = []; public function __construct() { @@ -67,12 +67,12 @@ class MonthTransformer extends Transformer */ public function format(\DateTime $dateTime, $length) { - $matchLengthMap = array( + $matchLengthMap = [ 1 => 'n', 2 => 'm', 3 => 'M', 4 => 'F', - ); + ]; if (isset($matchLengthMap[$length])) { return $dateTime->format($matchLengthMap[$length]); @@ -129,8 +129,8 @@ class MonthTransformer extends Transformer $matched = (int) $matched; } - return array( + return [ 'month' => $matched, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/QuarterTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/QuarterTransformer.php index fa7e91d0..d8ef0674 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/QuarterTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/QuarterTransformer.php @@ -34,7 +34,7 @@ class QuarterTransformer extends Transformer case 3: return 'Q'.$quarter; default: - $map = array(1 => '1st quarter', 2 => '2nd quarter', 3 => '3rd quarter', 4 => '4th quarter'); + $map = [1 => '1st quarter', 2 => '2nd quarter', 3 => '3rd quarter', 4 => '4th quarter']; return $map[$quarter]; } @@ -61,6 +61,6 @@ class QuarterTransformer extends Transformer */ public function extractDateOptions($matched, $length) { - return array(); + return []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/SecondTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/SecondTransformer.php index dd2e7bd9..b1054c47 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/SecondTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/SecondTransformer.php @@ -43,8 +43,8 @@ class SecondTransformer extends Transformer */ public function extractDateOptions($matched, $length) { - return array( + return [ 'second' => (int) $matched, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimezoneTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimezoneTransformer.php index d8f50119..c77fbc16 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimezoneTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimezoneTransformer.php @@ -31,7 +31,7 @@ class TimezoneTransformer extends Transformer { $timeZone = substr($dateTime->getTimezone()->getName(), 0, 3); - if (!\in_array($timeZone, array('Etc', 'UTC', 'GMT'))) { + if (!\in_array($timeZone, ['Etc', 'UTC', 'GMT'])) { throw new NotImplementedException('Time zone different than GMT or UTC is not supported as a formatting output.'); } @@ -41,7 +41,7 @@ class TimezoneTransformer extends Transformer } // From ICU >= 59.1 GMT and UTC are no longer unified - if (\in_array($timeZone, array('UTC', 'UCT', 'Universal', 'Zulu'))) { + if (\in_array($timeZone, ['UTC', 'UCT', 'Universal', 'Zulu'])) { // offset is not supported with UTC return $length > 3 ? 'Coordinated Universal Time' : 'UTC'; } @@ -73,9 +73,9 @@ class TimezoneTransformer extends Transformer */ public function extractDateOptions($matched, $length) { - return array( + return [ 'timezone' => self::getEtcTimeZoneId($matched), - ); + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/YearTransformer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/YearTransformer.php index 0b546b77..043e6f32 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/YearTransformer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/YearTransformer.php @@ -45,8 +45,8 @@ class YearTransformer extends Transformer */ public function extractDateOptions($matched, $length) { - return array( + return [ 'year' => (int) $matched, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php index fe46f3f2..0f19310f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php @@ -76,23 +76,23 @@ class IntlDateFormatter /** * Patterns used to format the date when no pattern is provided. */ - private $defaultDateFormats = array( + private $defaultDateFormats = [ self::NONE => '', self::FULL => 'EEEE, LLLL d, y', self::LONG => 'LLLL d, y', self::MEDIUM => 'LLL d, y', self::SHORT => 'M/d/yy', - ); + ]; /** * Patterns used to format the time when no pattern is provided. */ - private $defaultTimeFormats = array( + private $defaultTimeFormats = [ self::FULL => 'h:mm:ss a zzzz', self::LONG => 'h:mm:ss a z', self::MEDIUM => 'h:mm:ss a', self::SHORT => 'h:mm a', - ); + ]; private $datetype; private $timetype; @@ -118,13 +118,13 @@ class IntlDateFormatter private $timeZoneId; /** - * @param string $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") - * @param int $datetype Type of date formatting, one of the format type constants - * @param int $timetype Type of time formatting, one of the format type constants - * @param mixed $timezone Timezone identifier - * @param int $calendar Calendar to use for formatting or parsing. The only currently - * supported value is IntlDateFormatter::GREGORIAN (or null using the default calendar, i.e. "GREGORIAN") - * @param string $pattern Optional pattern to use when formatting + * @param string $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") + * @param int|null $datetype Type of date formatting, one of the format type constants + * @param int|null $timetype Type of time formatting, one of the format type constants + * @param \IntlTimeZone|\DateTimeZone|string|null $timezone Timezone identifier + * @param int $calendar Calendar to use for formatting or parsing. The only currently + * supported value is IntlDateFormatter::GREGORIAN (or null using the default calendar, i.e. "GREGORIAN") + * @param string|null $pattern Optional pattern to use when formatting * * @see http://www.php.net/manual/en/intldateformatter.create.php * @see http://userguide.icu-project.org/formatparse/datetime @@ -142,8 +142,8 @@ class IntlDateFormatter throw new MethodArgumentValueNotImplementedException(__METHOD__, 'calendar', $calendar, 'Only the GREGORIAN calendar is supported'); } - $this->datetype = $datetype; - $this->timetype = $timetype; + $this->datetype = null !== $datetype ? $datetype : self::FULL; + $this->timetype = null !== $timetype ? $timetype : self::FULL; $this->setPattern($pattern); $this->setTimeZone($timezone); @@ -152,13 +152,13 @@ class IntlDateFormatter /** * Static constructor. * - * @param string $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") - * @param int $datetype Type of date formatting, one of the format type constants - * @param int $timetype Type of time formatting, one of the format type constants - * @param string $timezone Timezone identifier - * @param int $calendar Calendar to use for formatting or parsing; default is Gregorian - * One of the calendar constants - * @param string $pattern Optional pattern to use when formatting + * @param string $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") + * @param int|null $datetype Type of date formatting, one of the format type constants + * @param int|null $timetype Type of time formatting, one of the format type constants + * @param \IntlTimeZone|\DateTimeZone|string|null $timezone Timezone identifier + * @param int $calendar Calendar to use for formatting or parsing; default is Gregorian + * One of the calendar constants + * @param string|null $pattern Optional pattern to use when formatting * * @return self * @@ -485,7 +485,7 @@ class IntlDateFormatter /** * Set the formatter's pattern. * - * @param string $pattern A pattern string in conformance with the ICU IntlDateFormatter documentation + * @param string|null $pattern A pattern string in conformance with the ICU IntlDateFormatter documentation * * @return bool true on success or false on failure * @@ -506,9 +506,9 @@ class IntlDateFormatter /** * Set the formatter's timezone identifier. * - * @param string $timeZoneId The time zone ID string of the time zone to use. - * If NULL or the empty string, the default time zone for the - * runtime is used. + * @param string|null $timeZoneId The time zone ID string of the time zone to use. + * If NULL or the empty string, the default time zone for the + * runtime is used. * * @return bool true on success or false on failure * @@ -552,7 +552,7 @@ class IntlDateFormatter /** * This method was added in PHP 5.5 as replacement for `setTimeZoneId()`. * - * @param mixed $timeZone + * @param \IntlTimeZone|\DateTimeZone|string|null $timeZone * * @return bool true on success or false on failure * @@ -600,7 +600,7 @@ class IntlDateFormatter */ protected function getDefaultPattern() { - $patternParts = array(); + $patternParts = []; if (self::NONE !== $this->datetype) { $patternParts[] = $this->defaultDateFormats[$this->datetype]; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Globals/IntlGlobals.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Globals/IntlGlobals.php index 4e520695..0dd25382 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Globals/IntlGlobals.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Globals/IntlGlobals.php @@ -38,11 +38,11 @@ abstract class IntlGlobals /** * All known error codes. */ - private static $errorCodes = array( + private static $errorCodes = [ self::U_ZERO_ERROR => 'U_ZERO_ERROR', self::U_ILLEGAL_ARGUMENT_ERROR => 'U_ILLEGAL_ARGUMENT_ERROR', self::U_PARSE_ERROR => 'U_PARSE_ERROR', - ); + ]; /** * The error code of the last operation. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php index b598d49d..9ba821ea 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php @@ -151,40 +151,40 @@ class NumberFormatter /** * Default values for the en locale. */ - private $attributes = array( + private $attributes = [ self::FRACTION_DIGITS => 0, self::GROUPING_USED => 1, self::ROUNDING_MODE => self::ROUND_HALFEVEN, - ); + ]; /** * Holds the initialized attributes code. */ - private $initializedAttributes = array(); + private $initializedAttributes = []; /** * The supported styles to the constructor $styles argument. */ - private static $supportedStyles = array( + private static $supportedStyles = [ 'CURRENCY' => self::CURRENCY, 'DECIMAL' => self::DECIMAL, - ); + ]; /** * Supported attributes to the setAttribute() $attr argument. */ - private static $supportedAttributes = array( + private static $supportedAttributes = [ 'FRACTION_DIGITS' => self::FRACTION_DIGITS, 'GROUPING_USED' => self::GROUPING_USED, 'ROUNDING_MODE' => self::ROUNDING_MODE, - ); + ]; /** * The available rounding modes for setAttribute() usage with * NumberFormatter::ROUNDING_MODE. NumberFormatter::ROUND_DOWN * and NumberFormatter::ROUND_UP does not have a PHP only equivalent. */ - private static $roundingModes = array( + private static $roundingModes = [ 'ROUND_HALFEVEN' => self::ROUND_HALFEVEN, 'ROUND_HALFDOWN' => self::ROUND_HALFDOWN, 'ROUND_HALFUP' => self::ROUND_HALFUP, @@ -192,7 +192,7 @@ class NumberFormatter 'ROUND_FLOOR' => self::ROUND_FLOOR, 'ROUND_DOWN' => self::ROUND_DOWN, 'ROUND_UP' => self::ROUND_UP, - ); + ]; /** * The mapping between NumberFormatter rounding modes to the available @@ -200,23 +200,23 @@ class NumberFormatter * * @see http://www.php.net/manual/en/function.round.php */ - private static $phpRoundingMap = array( + private static $phpRoundingMap = [ self::ROUND_HALFDOWN => \PHP_ROUND_HALF_DOWN, self::ROUND_HALFEVEN => \PHP_ROUND_HALF_EVEN, self::ROUND_HALFUP => \PHP_ROUND_HALF_UP, - ); + ]; /** * The list of supported rounding modes which aren't available modes in * PHP's round() function, but there's an equivalent. Keys are rounding * modes, values does not matter. */ - private static $customRoundingList = array( + private static $customRoundingList = [ self::ROUND_CEILING => true, self::ROUND_FLOOR => true, self::ROUND_DOWN => true, self::ROUND_UP => true, - ); + ]; /** * The maximum value of the integer type in 32 bit platforms. @@ -230,15 +230,15 @@ class NumberFormatter */ private static $int64Max = 9223372036854775807; - private static $enSymbols = array( - self::DECIMAL => array('.', ',', ';', '%', '0', '#', '-', '+', '¤', '¤¤', '.', 'E', '‰', '*', '∞', 'NaN', '@', ','), - self::CURRENCY => array('.', ',', ';', '%', '0', '#', '-', '+', '¤', '¤¤', '.', 'E', '‰', '*', '∞', 'NaN', '@', ','), - ); + private static $enSymbols = [ + self::DECIMAL => ['.', ',', ';', '%', '0', '#', '-', '+', '¤', '¤¤', '.', 'E', '‰', '*', '∞', 'NaN', '@', ','], + self::CURRENCY => ['.', ',', ';', '%', '0', '#', '-', '+', '¤', '¤¤', '.', 'E', '‰', '*', '∞', 'NaN', '@', ','], + ]; - private static $enTextAttributes = array( - self::DECIMAL => array('', '', '-', '', ' ', 'XXX', ''), - self::CURRENCY => array('¤', '', '-¤', '', ' ', 'XXX'), - ); + private static $enTextAttributes = [ + self::DECIMAL => ['', '', '-', '', ' ', 'XXX', ''], + self::CURRENCY => ['¤', '', '-¤', '', ' ', 'XXX'], + ]; /** * @param string $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") @@ -460,7 +460,7 @@ class NumberFormatter */ public function getSymbol($attr) { - return array_key_exists($this->style, self::$enSymbols) && array_key_exists($attr, self::$enSymbols[$this->style]) ? self::$enSymbols[$this->style][$attr] : false; + return \array_key_exists($this->style, self::$enSymbols) && \array_key_exists($attr, self::$enSymbols[$this->style]) ? self::$enSymbols[$this->style][$attr] : false; } /** @@ -474,7 +474,7 @@ class NumberFormatter */ public function getTextAttribute($attr) { - return array_key_exists($this->style, self::$enTextAttributes) && array_key_exists($attr, self::$enTextAttributes[$this->style]) ? self::$enTextAttributes[$this->style][$attr] : false; + return \array_key_exists($this->style, self::$enTextAttributes) && \array_key_exists($attr, self::$enTextAttributes[$this->style]) ? self::$enTextAttributes[$this->style][$attr] : false; } /** @@ -484,7 +484,7 @@ class NumberFormatter * @param string $currency Parameter to receive the currency name (reference) * @param int $position Offset to begin the parsing on return this value will hold the offset at which the parsing ended * - * @return bool|string The parsed numeric value of false on error + * @return bool|string The parsed numeric value or false on error * * @see http://www.php.net/manual/en/numberformatter.parsecurrency.php * @@ -502,7 +502,7 @@ class NumberFormatter * @param int $type Type of the formatting, one of the format type constants. NumberFormatter::TYPE_DOUBLE by default. * @param int $position Offset to begin the parsing on return this value will hold the offset at which the parsing ended * - * @return int|float|false The parsed value of false on error + * @return int|float|false The parsed value or false on error * * @see http://www.php.net/manual/en/numberformatter.parse.php */ @@ -638,8 +638,8 @@ class NumberFormatter /** * Not supported. Set a text attribute. * - * @param int $attr An attribute specifier, one of the text attribute constants - * @param int $value The attribute value + * @param int $attr An attribute specifier, one of the text attribute constants + * @param string $value The attribute value * * @return bool true on success or false on failure * diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/CurrencyBundle.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/CurrencyBundle.php index b528b3b0..a7a3cc1b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/CurrencyBundle.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/CurrencyBundle.php @@ -73,7 +73,7 @@ class CurrencyBundle extends CurrencyDataProvider implements CurrencyBundleInter try { return $this->getNames($displayLocale); } catch (MissingResourceException $e) { - return array(); + return []; } } @@ -109,7 +109,7 @@ class CurrencyBundle extends CurrencyDataProvider implements CurrencyBundleInter try { return $this->localeProvider->getLocales(); } catch (MissingResourceException $e) { - return array(); + return []; } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php index ee319544..c709f1f6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php @@ -74,7 +74,7 @@ class LanguageBundle extends LanguageDataProvider implements LanguageBundleInter try { return $this->getNames($displayLocale); } catch (MissingResourceException $e) { - return array(); + return []; } } @@ -98,7 +98,7 @@ class LanguageBundle extends LanguageDataProvider implements LanguageBundleInter try { return $this->scriptProvider->getNames($displayLocale); } catch (MissingResourceException $e) { - return array(); + return []; } } @@ -110,7 +110,7 @@ class LanguageBundle extends LanguageDataProvider implements LanguageBundleInter try { return $this->localeProvider->getLocales(); } catch (MissingResourceException $e) { - return array(); + return []; } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LocaleBundle.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LocaleBundle.php index b14048a4..078b1de2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LocaleBundle.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LocaleBundle.php @@ -31,7 +31,7 @@ class LocaleBundle extends LocaleDataProvider implements LocaleBundleInterface try { return parent::getLocales(); } catch (MissingResourceException $e) { - return array(); + return []; } } @@ -55,7 +55,7 @@ class LocaleBundle extends LocaleDataProvider implements LocaleBundleInterface try { return $this->getNames($displayLocale); } catch (MissingResourceException $e) { - return array(); + return []; } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/RegionBundle.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/RegionBundle.php index d709ba55..1eccbb33 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/RegionBundle.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/RegionBundle.php @@ -61,7 +61,7 @@ class RegionBundle extends RegionDataProvider implements RegionBundleInterface try { return $this->getNames($displayLocale); } catch (MissingResourceException $e) { - return array(); + return []; } } @@ -73,7 +73,7 @@ class RegionBundle extends RegionDataProvider implements RegionBundleInterface try { return $this->localeProvider->getLocales(); } catch (MissingResourceException $e) { - return array(); + return []; } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/bin/update-data.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/bin/update-data.php index 7238f468..d6e25af4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/bin/update-data.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/bin/update-data.php @@ -178,8 +178,8 @@ $jsonDir = $baseDir; //$phpDir = $baseDir.'/'.Intl::PHP; //$resDir = $baseDir.'/'.Intl::RB_V2; -$targetDirs = array($jsonDir/*, $resDir*/); -$workingDirs = array($jsonDir/*, $txtDir, $resDir*/); +$targetDirs = [$jsonDir/*, $resDir*/]; +$workingDirs = [$jsonDir/*, $txtDir, $resDir*/]; //$config->addBundleWriter($txtDir, new TextBundleWriter()); $config->addBundleWriter($jsonDir, new JsonBundleWriter()); @@ -189,13 +189,13 @@ echo "Starting resource bundle compilation. This may take a while...\n"; $filesystem->remove($workingDirs); foreach ($workingDirs as $targetDir) { - $filesystem->mkdir(array( + $filesystem->mkdir([ $targetDir.'/'.Intl::CURRENCY_DIR, $targetDir.'/'.Intl::LANGUAGE_DIR, $targetDir.'/'.Intl::LOCALE_DIR, $targetDir.'/'.Intl::REGION_DIR, $targetDir.'/'.Intl::SCRIPT_DIR, - )); + ]); } // We don't want to use fallback to English during generation diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Collator/AbstractCollatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Collator/AbstractCollatorTest.php index 3465bb0c..28eb37d7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Collator/AbstractCollatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Collator/AbstractCollatorTest.php @@ -33,24 +33,24 @@ abstract class AbstractCollatorTest extends TestCase public function asortProvider() { - return array( + return [ /* array, sortFlag, expected */ - array( - array('a', 'b', 'c'), + [ + ['a', 'b', 'c'], Collator::SORT_REGULAR, - array('a', 'b', 'c'), - ), - array( - array('c', 'b', 'a'), + ['a', 'b', 'c'], + ], + [ + ['c', 'b', 'a'], Collator::SORT_REGULAR, - array(2 => 'a', 1 => 'b', 0 => 'c'), - ), - array( - array('b', 'c', 'a'), + [2 => 'a', 1 => 'b', 0 => 'c'], + ], + [ + ['b', 'c', 'a'], Collator::SORT_REGULAR, - array(2 => 'a', 0 => 'b', 1 => 'c'), - ), - ); + [2 => 'a', 0 => 'b', 1 => 'c'], + ], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php index aedc18d3..766611ed 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php @@ -32,34 +32,34 @@ class BundleEntryReaderTest extends TestCase */ private $readerImpl; - private static $data = array( - 'Entries' => array( + private static $data = [ + 'Entries' => [ 'Foo' => 'Bar', 'Bar' => 'Baz', - ), + ], 'Foo' => 'Bar', 'Version' => '2.0', - ); + ]; - private static $fallbackData = array( - 'Entries' => array( + private static $fallbackData = [ + 'Entries' => [ 'Foo' => 'Foo', 'Bam' => 'Lah', - ), + ], 'Baz' => 'Foo', 'Version' => '1.0', - ); + ]; - private static $mergedData = array( + private static $mergedData = [ // no recursive merging -> too complicated - 'Entries' => array( + 'Entries' => [ 'Foo' => 'Bar', 'Bar' => 'Baz', - ), + ], 'Baz' => 'Foo', 'Version' => '2.0', 'Foo' => 'Bar', - ); + ]; protected function setUp() { @@ -89,7 +89,7 @@ class BundleEntryReaderTest extends TestCase ->with(self::RES_DIR, 'root') ->will($this->returnValue(self::$fallbackData)); - $this->assertSame(self::$mergedData, $this->reader->readEntry(self::RES_DIR, 'en', array())); + $this->assertSame(self::$mergedData, $this->reader->readEntry(self::RES_DIR, 'en', [])); } public function testReadExistingEntry() @@ -99,7 +99,7 @@ class BundleEntryReaderTest extends TestCase ->with(self::RES_DIR, 'root') ->will($this->returnValue(self::$data)); - $this->assertSame('Bar', $this->reader->readEntry(self::RES_DIR, 'root', array('Entries', 'Foo'))); + $this->assertSame('Bar', $this->reader->readEntry(self::RES_DIR, 'root', ['Entries', 'Foo'])); } /** @@ -112,7 +112,7 @@ class BundleEntryReaderTest extends TestCase ->with(self::RES_DIR, 'root') ->will($this->returnValue(self::$data)); - $this->reader->readEntry(self::RES_DIR, 'root', array('Entries', 'NonExisting')); + $this->reader->readEntry(self::RES_DIR, 'root', ['Entries', 'NonExisting']); } public function testFallbackIfEntryDoesNotExist() @@ -127,7 +127,7 @@ class BundleEntryReaderTest extends TestCase ->with(self::RES_DIR, 'en') ->will($this->returnValue(self::$fallbackData)); - $this->assertSame('Lah', $this->reader->readEntry(self::RES_DIR, 'en_GB', array('Entries', 'Bam'))); + $this->assertSame('Lah', $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Entries', 'Bam'])); } /** @@ -140,7 +140,7 @@ class BundleEntryReaderTest extends TestCase ->with(self::RES_DIR, 'en_GB') ->will($this->returnValue(self::$data)); - $this->reader->readEntry(self::RES_DIR, 'en_GB', array('Entries', 'Bam'), false); + $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Entries', 'Bam'], false); } public function testFallbackIfLocaleDoesNotExist() @@ -148,14 +148,14 @@ class BundleEntryReaderTest extends TestCase $this->readerImpl->expects($this->at(0)) ->method('read') ->with(self::RES_DIR, 'en_GB') - ->will($this->throwException(new ResourceBundleNotFoundException())); + ->willThrowException(new ResourceBundleNotFoundException()); $this->readerImpl->expects($this->at(1)) ->method('read') ->with(self::RES_DIR, 'en') ->will($this->returnValue(self::$fallbackData)); - $this->assertSame('Lah', $this->reader->readEntry(self::RES_DIR, 'en_GB', array('Entries', 'Bam'))); + $this->assertSame('Lah', $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Entries', 'Bam'])); } /** @@ -166,22 +166,22 @@ class BundleEntryReaderTest extends TestCase $this->readerImpl->expects($this->once()) ->method('read') ->with(self::RES_DIR, 'en_GB') - ->will($this->throwException(new ResourceBundleNotFoundException())); + ->willThrowException(new ResourceBundleNotFoundException()); - $this->reader->readEntry(self::RES_DIR, 'en_GB', array('Entries', 'Bam'), false); + $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Entries', 'Bam'], false); } public function provideMergeableValues() { - return array( - array('foo', null, 'foo'), - array(null, 'foo', 'foo'), - array(array('foo', 'bar'), null, array('foo', 'bar')), - array(array('foo', 'bar'), array(), array('foo', 'bar')), - array(null, array('baz'), array('baz')), - array(array(), array('baz'), array('baz')), - array(array('foo', 'bar'), array('baz'), array('baz', 'foo', 'bar')), - ); + return [ + ['foo', null, 'foo'], + [null, 'foo', 'foo'], + [['foo', 'bar'], null, ['foo', 'bar']], + [['foo', 'bar'], [], ['foo', 'bar']], + [null, ['baz'], ['baz']], + [[], ['baz'], ['baz']], + [['foo', 'bar'], ['baz'], ['baz', 'foo', 'bar']], + ]; } /** @@ -206,7 +206,7 @@ class BundleEntryReaderTest extends TestCase ->will($this->returnValue($childData)); } - $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'en', array(), true)); + $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'en', [], true)); } /** @@ -219,7 +219,7 @@ class BundleEntryReaderTest extends TestCase ->with(self::RES_DIR, 'en_GB') ->will($this->returnValue($childData)); - $this->assertSame($childData, $this->reader->readEntry(self::RES_DIR, 'en_GB', array(), false)); + $this->assertSame($childData, $this->reader->readEntry(self::RES_DIR, 'en_GB', [], false)); } /** @@ -231,20 +231,20 @@ class BundleEntryReaderTest extends TestCase $this->readerImpl->expects($this->at(0)) ->method('read') ->with(self::RES_DIR, 'en') - ->will($this->returnValue(array('Foo' => array('Bar' => $childData)))); + ->will($this->returnValue(['Foo' => ['Bar' => $childData]])); $this->readerImpl->expects($this->at(1)) ->method('read') ->with(self::RES_DIR, 'root') - ->will($this->returnValue(array('Foo' => array('Bar' => $parentData)))); + ->will($this->returnValue(['Foo' => ['Bar' => $parentData]])); } else { $this->readerImpl->expects($this->once()) ->method('read') ->with(self::RES_DIR, 'en') - ->will($this->returnValue(array('Foo' => array('Bar' => $childData)))); + ->will($this->returnValue(['Foo' => ['Bar' => $childData]])); } - $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'en', array('Foo', 'Bar'), true)); + $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'en', ['Foo', 'Bar'], true)); } /** @@ -255,14 +255,14 @@ class BundleEntryReaderTest extends TestCase $this->readerImpl->expects($this->at(0)) ->method('read') ->with(self::RES_DIR, 'en_GB') - ->will($this->returnValue(array('Foo' => 'Baz'))); + ->will($this->returnValue(['Foo' => 'Baz'])); $this->readerImpl->expects($this->at(1)) ->method('read') ->with(self::RES_DIR, 'en') - ->will($this->returnValue(array('Foo' => array('Bar' => $parentData)))); + ->will($this->returnValue(['Foo' => ['Bar' => $parentData]])); - $this->assertSame($parentData, $this->reader->readEntry(self::RES_DIR, 'en_GB', array('Foo', 'Bar'), true)); + $this->assertSame($parentData, $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Foo', 'Bar'], true)); } /** @@ -274,20 +274,20 @@ class BundleEntryReaderTest extends TestCase $this->readerImpl->expects($this->at(0)) ->method('read') ->with(self::RES_DIR, 'en_GB') - ->will($this->returnValue(array('Foo' => array('Bar' => $childData)))); + ->will($this->returnValue(['Foo' => ['Bar' => $childData]])); $this->readerImpl->expects($this->at(1)) ->method('read') ->with(self::RES_DIR, 'en') - ->will($this->returnValue(array('Foo' => 'Bar'))); + ->will($this->returnValue(['Foo' => 'Bar'])); } else { $this->readerImpl->expects($this->once()) ->method('read') ->with(self::RES_DIR, 'en_GB') - ->will($this->returnValue(array('Foo' => array('Bar' => $childData)))); + ->will($this->returnValue(['Foo' => ['Bar' => $childData]])); } - $this->assertSame($childData, $this->reader->readEntry(self::RES_DIR, 'en_GB', array('Foo', 'Bar'), true)); + $this->assertSame($childData, $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Foo', 'Bar'], true)); } /** @@ -298,14 +298,14 @@ class BundleEntryReaderTest extends TestCase $this->readerImpl->expects($this->at(0)) ->method('read') ->with(self::RES_DIR, 'en_GB') - ->will($this->returnValue(array('Foo' => 'Baz'))); + ->will($this->returnValue(['Foo' => 'Baz'])); $this->readerImpl->expects($this->at(1)) ->method('read') ->with(self::RES_DIR, 'en') - ->will($this->returnValue(array('Foo' => 'Bar'))); + ->will($this->returnValue(['Foo' => 'Bar'])); - $this->reader->readEntry(self::RES_DIR, 'en_GB', array('Foo', 'Bar'), true); + $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Foo', 'Bar'], true); } /** @@ -320,20 +320,20 @@ class BundleEntryReaderTest extends TestCase $this->readerImpl->expects($this->at(0)) ->method('read') ->with(self::RES_DIR, 'en_GB') - ->will($this->returnValue(array('Foo' => array('Bar' => $childData)))); + ->will($this->returnValue(['Foo' => ['Bar' => $childData]])); $this->readerImpl->expects($this->at(1)) ->method('read') ->with(self::RES_DIR, 'en') - ->will($this->returnValue(array('Foo' => array('Bar' => $parentData)))); + ->will($this->returnValue(['Foo' => ['Bar' => $parentData]])); } else { $this->readerImpl->expects($this->once()) ->method('read') ->with(self::RES_DIR, 'en_GB') - ->will($this->returnValue(array('Foo' => array('Bar' => $childData)))); + ->will($this->returnValue(['Foo' => ['Bar' => $childData]])); } - $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'en_GB', array('Foo', 'Bar'), true)); + $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Foo', 'Bar'], true)); } /** @@ -341,26 +341,26 @@ class BundleEntryReaderTest extends TestCase */ public function testFollowLocaleAliases($childData, $parentData, $result) { - $this->reader->setLocaleAliases(array('mo' => 'ro_MD')); + $this->reader->setLocaleAliases(['mo' => 'ro_MD']); if (null === $childData || \is_array($childData)) { $this->readerImpl->expects($this->at(0)) ->method('read') ->with(self::RES_DIR, 'ro_MD') - ->will($this->returnValue(array('Foo' => array('Bar' => $childData)))); + ->will($this->returnValue(['Foo' => ['Bar' => $childData]])); // Read fallback locale of aliased locale ("ro_MD" -> "ro") $this->readerImpl->expects($this->at(1)) ->method('read') ->with(self::RES_DIR, 'ro') - ->will($this->returnValue(array('Foo' => array('Bar' => $parentData)))); + ->will($this->returnValue(['Foo' => ['Bar' => $parentData]])); } else { $this->readerImpl->expects($this->once()) ->method('read') ->with(self::RES_DIR, 'ro_MD') - ->will($this->returnValue(array('Foo' => array('Bar' => $childData)))); + ->will($this->returnValue(['Foo' => ['Bar' => $childData]])); } - $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'mo', array('Foo', 'Bar'), true)); + $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'mo', ['Foo', 'Bar'], true)); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/en.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/en.php index f2b06a91..e00056ae 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/en.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/en.php @@ -9,6 +9,6 @@ * file that was distributed with this source code. */ -return array( +return [ 'Foo' => 'Bar', -); +]; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/invalid_directory/en.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/invalid_directory/en.php index f2b06a91..e00056ae 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/invalid_directory/en.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/invalid_directory/en.php @@ -9,6 +9,6 @@ * file that was distributed with this source code. */ -return array( +return [ 'Foo' => 'Bar', -); +]; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/php/en.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/php/en.php index f2b06a91..e00056ae 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/php/en.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/php/en.php @@ -9,6 +9,6 @@ * file that was distributed with this source code. */ -return array( +return [ 'Foo' => 'Bar', -); +]; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.php index b694a078..4038f5bc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.php @@ -1,17 +1,17 @@ array( - 'Array' => array( +return [ + 'Entry1' => [ + 'Array' => [ 0 => 'foo', 1 => 'bar', - ), + ], 'Integer' => 5, 'Boolean' => false, 'Float' => 1.23, - ), + ], 'Entry2' => 'String', - 'Traversable' => array( + 'Traversable' => [ 'Foo' => 'Bar', - ), -); + ], +]; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.php index 24e6465e..03e0fc2d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.php @@ -1,7 +1,7 @@ array( +return [ + 'Entry' => [ 'NestedEntry' => 'Value', - ), -); + ], +]; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php index d13279c0..f56bc843 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php @@ -48,18 +48,18 @@ class JsonBundleWriterTest extends TestCase public function testWrite() { - $this->writer->write($this->directory, 'en', array( - 'Entry1' => array( - 'Array' => array('foo', 'bar'), + $this->writer->write($this->directory, 'en', [ + 'Entry1' => [ + 'Array' => ['foo', 'bar'], 'Integer' => 5, 'Boolean' => false, 'Float' => 1.23, - ), + ], 'Entry2' => 'String', - 'Traversable' => new \ArrayIterator(array( + 'Traversable' => new \ArrayIterator([ 'Foo' => 'Bar', - )), - )); + ]), + ]); $this->assertFileEquals(__DIR__.'/Fixtures/en.json', $this->directory.'/en.json'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php index e1b8f674..8010f957 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php @@ -48,18 +48,18 @@ class PhpBundleWriterTest extends TestCase public function testWrite() { - $this->writer->write($this->directory, 'en', array( - 'Entry1' => array( - 'Array' => array('foo', 'bar'), + $this->writer->write($this->directory, 'en', [ + 'Entry1' => [ + 'Array' => ['foo', 'bar'], 'Integer' => 5, 'Boolean' => false, 'Float' => 1.23, - ), + ], 'Entry2' => 'String', - 'Traversable' => new \ArrayIterator(array( + 'Traversable' => new \ArrayIterator([ 'Foo' => 'Bar', - )), - )); + ]), + ]); $this->assertFileEquals(__DIR__.'/Fixtures/en.php', $this->directory.'/en.php'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/TextBundleWriterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/TextBundleWriterTest.php index 4908f283..2c0e70e0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/TextBundleWriterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/TextBundleWriterTest.php @@ -50,51 +50,51 @@ class TextBundleWriterTest extends TestCase public function testWrite() { - $this->writer->write($this->directory, 'en', array( - 'Entry1' => array( - 'Array' => array('foo', 'bar', array('Key' => 'value')), + $this->writer->write($this->directory, 'en', [ + 'Entry1' => [ + 'Array' => ['foo', 'bar', ['Key' => 'value']], 'Integer' => 5, - 'IntVector' => array(0, 1, 2, 3), - 'NotAnIntVector' => array(0 => 0, 2 => 1, 1 => 2, 3 => 3), - 'IntVectorWithStringKeys' => array('a' => 0, 'b' => 1, 'c' => 2), - 'TableWithIntKeys' => array(0 => 0, 1 => 1, 3 => 3), + 'IntVector' => [0, 1, 2, 3], + 'NotAnIntVector' => [0 => 0, 2 => 1, 1 => 2, 3 => 3], + 'IntVectorWithStringKeys' => ['a' => 0, 'b' => 1, 'c' => 2], + 'TableWithIntKeys' => [0 => 0, 1 => 1, 3 => 3], 'FalseBoolean' => false, 'TrueBoolean' => true, 'Null' => null, 'Float' => 1.23, - ), + ], 'Entry2' => 'String', - )); + ]); $this->assertFileEquals(__DIR__.'/Fixtures/en.txt', $this->directory.'/en.txt'); } public function testWriteTraversable() { - $this->writer->write($this->directory, 'en', new \ArrayIterator(array( - 'Entry1' => new \ArrayIterator(array( - 'Array' => array('foo', 'bar', array('Key' => 'value')), + $this->writer->write($this->directory, 'en', new \ArrayIterator([ + 'Entry1' => new \ArrayIterator([ + 'Array' => ['foo', 'bar', ['Key' => 'value']], 'Integer' => 5, - 'IntVector' => array(0, 1, 2, 3), - 'NotAnIntVector' => array(0 => 0, 2 => 1, 1 => 2, 3 => 3), - 'IntVectorWithStringKeys' => array('a' => 0, 'b' => 1, 'c' => 2), - 'TableWithIntKeys' => array(0 => 0, 1 => 1, 3 => 3), + 'IntVector' => [0, 1, 2, 3], + 'NotAnIntVector' => [0 => 0, 2 => 1, 1 => 2, 3 => 3], + 'IntVectorWithStringKeys' => ['a' => 0, 'b' => 1, 'c' => 2], + 'TableWithIntKeys' => [0 => 0, 1 => 1, 3 => 3], 'FalseBoolean' => false, 'TrueBoolean' => true, 'Null' => null, 'Float' => 1.23, - )), + ]), 'Entry2' => 'String', - ))); + ])); $this->assertFileEquals(__DIR__.'/Fixtures/en.txt', $this->directory.'/en.txt'); } public function testWriteNoFallback() { - $data = array( + $data = [ 'Entry' => 'Value', - ); + ]; $this->writer->write($this->directory, 'en_nofallback', $data, $fallback = false); @@ -103,13 +103,13 @@ class TextBundleWriterTest extends TestCase public function testEscapeKeysIfNecessary() { - $this->writer->write($this->directory, 'escaped', array( + $this->writer->write($this->directory, 'escaped', [ // Keys with colons must be escaped, otherwise the part after the // colon is interpreted as resource type 'EntryWith:Colon' => 'Value', // Keys with spaces must be escaped 'Entry With Spaces' => 'Value', - )); + ]); $this->assertFileEquals(__DIR__.'/Fixtures/escaped.txt', $this->directory.'/escaped.txt'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php index bf23caee..70afbb66 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php @@ -22,7 +22,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest { // The below arrays document the state of the ICU data bundled with this package. - protected static $currencies = array( + protected static $currencies = [ 'ADP', 'AED', 'AFA', @@ -313,9 +313,9 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest 'ZWD', 'ZWL', 'ZWR', - ); + ]; - protected static $alpha3ToNumeric = array( + protected static $alpha3ToNumeric = [ 'AFA' => 4, 'ALK' => 8, 'ALL' => 8, @@ -584,7 +584,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest 'ESA' => 996, 'USN' => 997, 'USS' => 998, - ); + ]; /** * @var CurrencyDataProvider @@ -659,7 +659,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest public function testGetName($displayLocale) { $expected = $this->dataProvider->getNames($displayLocale); - $actual = array(); + $actual = []; foreach ($expected as $currency => $name) { $actual[$currency] = $this->dataProvider->getName($currency, $displayLocale); @@ -673,7 +673,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest Locale::setDefault('de_AT'); $expected = $this->dataProvider->getNames('de_AT'); - $actual = array(); + $actual = []; foreach ($expected as $currency => $name) { $actual[$currency] = $this->dataProvider->getName($currency); @@ -697,7 +697,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest public function provideCurrencies() { return array_map( - function ($currency) { return array($currency); }, + function ($currency) { return [$currency]; }, static::$currencies ); } @@ -721,7 +721,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest public function provideCurrenciesWithNumericEquivalent() { return array_map( - function ($value) { return array($value); }, + function ($value) { return [$value]; }, array_keys(static::$alpha3ToNumeric) ); } @@ -737,7 +737,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest public function provideCurrenciesWithoutNumericEquivalent() { return array_map( - function ($value) { return array($value); }, + function ($value) { return [$value]; }, array_diff(static::$currencies, array_keys(static::$alpha3ToNumeric)) ); } @@ -756,7 +756,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest $numericToAlpha3 = $this->getNumericToAlpha3Mapping(); return array_map( - function ($numeric, $alpha3) { return array($numeric, $alpha3); }, + function ($numeric, $alpha3) { return [$numeric, $alpha3]; }, array_keys($numericToAlpha3), $numericToAlpha3 ); @@ -782,7 +782,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest $invalidNumericCodes = array_diff(range(0, 1000), $validNumericCodes); return array_map( - function ($value) { return array($value); }, + function ($value) { return [$value]; }, $invalidNumericCodes ); } @@ -798,11 +798,11 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest private function getNumericToAlpha3Mapping() { - $numericToAlpha3 = array(); + $numericToAlpha3 = []; foreach (static::$alpha3ToNumeric as $alpha3 => $numeric) { if (!isset($numericToAlpha3[$numeric])) { - $numericToAlpha3[$numeric] = array(); + $numericToAlpha3[$numeric] = []; } $numericToAlpha3[$numeric][] = $alpha3; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractDataProviderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractDataProviderTest.php index 19246a06..22025bec 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractDataProviderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractDataProviderTest.php @@ -26,7 +26,7 @@ abstract class AbstractDataProviderTest extends TestCase // not loaded, because it is NOT possible to skip the execution of data // providers. - private static $locales = array( + private static $locales = [ 'af', 'af_NA', 'af_ZA', @@ -633,9 +633,9 @@ abstract class AbstractDataProviderTest extends TestCase 'zh_TW', 'zu', 'zu_ZA', - ); + ]; - private static $localeAliases = array( + private static $localeAliases = [ 'az_AZ' => 'az_Latn_AZ', 'bs_BA' => 'bs_Latn_BA', 'en_NH' => 'en_VU', @@ -673,7 +673,7 @@ abstract class AbstractDataProviderTest extends TestCase 'zh_MO' => 'zh_Hant_MO', 'zh_SG' => 'zh_Hans_SG', 'zh_TW' => 'zh_Hant_TW', - ); + ]; private static $rootLocales; @@ -686,7 +686,7 @@ abstract class AbstractDataProviderTest extends TestCase public function provideLocales() { return array_map( - function ($locale) { return array($locale); }, + function ($locale) { return [$locale]; }, $this->getLocales() ); } @@ -694,7 +694,7 @@ abstract class AbstractDataProviderTest extends TestCase public function provideLocaleAliases() { return array_map( - function ($alias, $ofLocale) { return array($alias, $ofLocale); }, + function ($alias, $ofLocale) { return [$alias, $ofLocale]; }, array_keys($this->getLocaleAliases()), $this->getLocaleAliases() ); @@ -703,7 +703,7 @@ abstract class AbstractDataProviderTest extends TestCase public function provideRootLocales() { return array_map( - function ($locale) { return array($locale); }, + function ($locale) { return [$locale]; }, $this->getRootLocales() ); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php index f328ebb4..003e688d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php @@ -22,7 +22,7 @@ abstract class AbstractLanguageDataProviderTest extends AbstractDataProviderTest { // The below arrays document the state of the ICU data bundled with this package. - protected static $languages = array( + protected static $languages = [ 'aa', 'ab', 'ace', @@ -643,9 +643,9 @@ abstract class AbstractLanguageDataProviderTest extends AbstractDataProviderTest 'zun', 'zxx', 'zza', - ); + ]; - protected static $alpha2ToAlpha3 = array( + protected static $alpha2ToAlpha3 = [ 'aa' => 'aar', 'ab' => 'abk', 'af' => 'afr', @@ -826,7 +826,7 @@ abstract class AbstractLanguageDataProviderTest extends AbstractDataProviderTest 'yo' => 'yor', 'za' => 'zha', 'zu' => 'zul', - ); + ]; /** * @var LanguageDataProvider @@ -913,7 +913,7 @@ abstract class AbstractLanguageDataProviderTest extends AbstractDataProviderTest public function provideLanguagesWithAlpha3Equivalent() { return array_map( - function ($value) { return array($value); }, + function ($value) { return [$value]; }, array_keys(static::$alpha2ToAlpha3) ); } @@ -929,7 +929,7 @@ abstract class AbstractLanguageDataProviderTest extends AbstractDataProviderTest public function provideLanguagesWithoutAlpha3Equivalent() { return array_map( - function ($value) { return array($value); }, + function ($value) { return [$value]; }, array_diff(static::$languages, array_keys(static::$alpha2ToAlpha3)) ); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractRegionDataProviderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractRegionDataProviderTest.php index c91c96f1..1f5febb2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractRegionDataProviderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractRegionDataProviderTest.php @@ -22,7 +22,7 @@ abstract class AbstractRegionDataProviderTest extends AbstractDataProviderTest { // The below arrays document the state of the ICU data bundled with this package. - protected static $territories = array( + protected static $territories = [ 'AC', 'AD', 'AE', @@ -278,7 +278,7 @@ abstract class AbstractRegionDataProviderTest extends AbstractDataProviderTest 'ZA', 'ZM', 'ZW', - ); + ]; /** * @var RegionDataProvider diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractScriptDataProviderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractScriptDataProviderTest.php index c827f623..0626159c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractScriptDataProviderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractScriptDataProviderTest.php @@ -23,7 +23,7 @@ abstract class AbstractScriptDataProviderTest extends AbstractDataProviderTest { // The below arrays document the state of the ICU data bundled with this package. - protected static $scripts = array( + protected static $scripts = [ 'Adlm', 'Afak', 'Aghb', @@ -209,7 +209,7 @@ abstract class AbstractScriptDataProviderTest extends AbstractDataProviderTest 'Zxxx', 'Zyyy', 'Zzzz', - ); + ]; /** * @var ScriptDataProvider diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Util/LocaleScannerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Util/LocaleScannerTest.php index f76c71d8..23f312b7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Util/LocaleScannerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Util/LocaleScannerTest.php @@ -63,14 +63,14 @@ class LocaleScannerTest extends TestCase public function testScanLocales() { - $sortedLocales = array('de', 'de_alias', 'en', 'en_alias', 'fr', 'fr_alias'); + $sortedLocales = ['de', 'de_alias', 'en', 'en_alias', 'fr', 'fr_alias']; $this->assertSame($sortedLocales, $this->scanner->scanLocales($this->directory)); } public function testScanAliases() { - $sortedAliases = array('de_alias' => 'de', 'en_alias' => 'en', 'fr_alias' => 'fr'); + $sortedAliases = ['de_alias' => 'de', 'en_alias' => 'en', 'fr_alias' => 'fr']; $this->assertSame($sortedAliases, $this->scanner->scanAliases($this->directory)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php index 77d3c125..a1ade6a4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php @@ -46,6 +46,20 @@ abstract class AbstractIntlDateFormatterTest extends TestCase ); } + public function testConstructorWithoutDateType() + { + $formatter = new IntlDateFormatter('en', null, IntlDateFormatter::SHORT, 'UTC', IntlDateFormatter::GREGORIAN); + + $this->assertSame('EEEE, LLLL d, y, h:mm a', $formatter->getPattern()); + } + + public function testConstructorWithoutTimeType() + { + $formatter = new IntlDateFormatter('en', IntlDateFormatter::SHORT, null, 'UTC', IntlDateFormatter::GREGORIAN); + + $this->assertSame('M/d/yy, h:mm:ss a zzzz', $formatter->getPattern()); + } + /** * @dataProvider formatProvider */ @@ -63,185 +77,185 @@ abstract class AbstractIntlDateFormatterTest extends TestCase { $dateTime = new \DateTime('@0'); - $formatData = array( + $formatData = [ /* general */ - array('y-M-d', 0, '1970-1-1'), - array("EEE, MMM d, ''yy", 0, "Thu, Jan 1, '70"), - array('h:mm a', 0, '12:00 AM'), - array('yyyyy.MMMM.dd hh:mm aaa', 0, '01970.January.01 12:00 AM'), + ['y-M-d', 0, '1970-1-1'], + ["EEE, MMM d, ''yy", 0, "Thu, Jan 1, '70"], + ['h:mm a', 0, '12:00 AM'], + ['yyyyy.MMMM.dd hh:mm aaa', 0, '01970.January.01 12:00 AM'], /* escaping */ - array("'M'", 0, 'M'), - array("'yy'", 0, 'yy'), - array("'''yy'", 0, "'yy"), - array("''y", 0, "'1970"), - array("''yy", 0, "'70"), - array("H 'o'' clock'", 0, "0 o' clock"), + ["'M'", 0, 'M'], + ["'yy'", 0, 'yy'], + ["'''yy'", 0, "'yy"], + ["''y", 0, "'1970"], + ["''yy", 0, "'70"], + ["H 'o'' clock'", 0, "0 o' clock"], /* month */ - array('M', 0, '1'), - array('MM', 0, '01'), - array('MMM', 0, 'Jan'), - array('MMMM', 0, 'January'), - array('MMMMM', 0, 'J'), - array('MMMMMM', 0, '000001'), + ['M', 0, '1'], + ['MM', 0, '01'], + ['MMM', 0, 'Jan'], + ['MMMM', 0, 'January'], + ['MMMMM', 0, 'J'], + ['MMMMMM', 0, '000001'], - array('L', 0, '1'), - array('LL', 0, '01'), - array('LLL', 0, 'Jan'), - array('LLLL', 0, 'January'), - array('LLLLL', 0, 'J'), - array('LLLLLL', 0, '000001'), + ['L', 0, '1'], + ['LL', 0, '01'], + ['LLL', 0, 'Jan'], + ['LLLL', 0, 'January'], + ['LLLLL', 0, 'J'], + ['LLLLLL', 0, '000001'], /* year */ - array('y', 0, '1970'), - array('yy', 0, '70'), - array('yyy', 0, '1970'), - array('yyyy', 0, '1970'), - array('yyyyy', 0, '01970'), - array('yyyyyy', 0, '001970'), + ['y', 0, '1970'], + ['yy', 0, '70'], + ['yyy', 0, '1970'], + ['yyyy', 0, '1970'], + ['yyyyy', 0, '01970'], + ['yyyyyy', 0, '001970'], /* day */ - array('d', 0, '1'), - array('dd', 0, '01'), - array('ddd', 0, '001'), + ['d', 0, '1'], + ['dd', 0, '01'], + ['ddd', 0, '001'], /* quarter */ - array('Q', 0, '1'), - array('QQ', 0, '01'), - array('QQQ', 0, 'Q1'), - array('QQQQ', 0, '1st quarter'), - array('QQQQQ', 0, '1st quarter'), + ['Q', 0, '1'], + ['QQ', 0, '01'], + ['QQQ', 0, 'Q1'], + ['QQQQ', 0, '1st quarter'], + ['QQQQQ', 0, '1st quarter'], - array('q', 0, '1'), - array('qq', 0, '01'), - array('qqq', 0, 'Q1'), - array('qqqq', 0, '1st quarter'), - array('qqqqq', 0, '1st quarter'), + ['q', 0, '1'], + ['qq', 0, '01'], + ['qqq', 0, 'Q1'], + ['qqqq', 0, '1st quarter'], + ['qqqqq', 0, '1st quarter'], // 4 months - array('Q', 7776000, '2'), - array('QQ', 7776000, '02'), - array('QQQ', 7776000, 'Q2'), - array('QQQQ', 7776000, '2nd quarter'), + ['Q', 7776000, '2'], + ['QQ', 7776000, '02'], + ['QQQ', 7776000, 'Q2'], + ['QQQQ', 7776000, '2nd quarter'], // 7 months - array('QQQQ', 15638400, '3rd quarter'), + ['QQQQ', 15638400, '3rd quarter'], // 10 months - array('QQQQ', 23587200, '4th quarter'), + ['QQQQ', 23587200, '4th quarter'], /* 12-hour (1-12) */ - array('h', 0, '12'), - array('hh', 0, '12'), - array('hhh', 0, '012'), + ['h', 0, '12'], + ['hh', 0, '12'], + ['hhh', 0, '012'], - array('h', 1, '12'), - array('h', 3600, '1'), - array('h', 43200, '12'), // 12 hours + ['h', 1, '12'], + ['h', 3600, '1'], + ['h', 43200, '12'], // 12 hours /* day of year */ - array('D', 0, '1'), - array('D', 86400, '2'), // 1 day - array('D', 31536000, '1'), // 1 year - array('D', 31622400, '2'), // 1 year + 1 day + ['D', 0, '1'], + ['D', 86400, '2'], // 1 day + ['D', 31536000, '1'], // 1 year + ['D', 31622400, '2'], // 1 year + 1 day /* day of week */ - array('E', 0, 'Thu'), - array('EE', 0, 'Thu'), - array('EEE', 0, 'Thu'), - array('EEEE', 0, 'Thursday'), - array('EEEEE', 0, 'T'), - array('EEEEEE', 0, 'Th'), + ['E', 0, 'Thu'], + ['EE', 0, 'Thu'], + ['EEE', 0, 'Thu'], + ['EEEE', 0, 'Thursday'], + ['EEEEE', 0, 'T'], + ['EEEEEE', 0, 'Th'], - array('E', 1296540000, 'Tue'), // 2011-02-01 - array('E', 1296950400, 'Sun'), // 2011-02-06 + ['E', 1296540000, 'Tue'], // 2011-02-01 + ['E', 1296950400, 'Sun'], // 2011-02-06 /* am/pm marker */ - array('a', 0, 'AM'), - array('aa', 0, 'AM'), - array('aaa', 0, 'AM'), - array('aaaa', 0, 'AM'), + ['a', 0, 'AM'], + ['aa', 0, 'AM'], + ['aaa', 0, 'AM'], + ['aaaa', 0, 'AM'], // 12 hours - array('a', 43200, 'PM'), - array('aa', 43200, 'PM'), - array('aaa', 43200, 'PM'), - array('aaaa', 43200, 'PM'), + ['a', 43200, 'PM'], + ['aa', 43200, 'PM'], + ['aaa', 43200, 'PM'], + ['aaaa', 43200, 'PM'], /* 24-hour (0-23) */ - array('H', 0, '0'), - array('HH', 0, '00'), - array('HHH', 0, '000'), + ['H', 0, '0'], + ['HH', 0, '00'], + ['HHH', 0, '000'], - array('H', 1, '0'), - array('H', 3600, '1'), - array('H', 43200, '12'), - array('H', 46800, '13'), + ['H', 1, '0'], + ['H', 3600, '1'], + ['H', 43200, '12'], + ['H', 46800, '13'], /* 24-hour (1-24) */ - array('k', 0, '24'), - array('kk', 0, '24'), - array('kkk', 0, '024'), + ['k', 0, '24'], + ['kk', 0, '24'], + ['kkk', 0, '024'], - array('k', 1, '24'), - array('k', 3600, '1'), - array('k', 43200, '12'), - array('k', 46800, '13'), + ['k', 1, '24'], + ['k', 3600, '1'], + ['k', 43200, '12'], + ['k', 46800, '13'], /* 12-hour (0-11) */ - array('K', 0, '0'), - array('KK', 0, '00'), - array('KKK', 0, '000'), + ['K', 0, '0'], + ['KK', 0, '00'], + ['KKK', 0, '000'], - array('K', 1, '0'), - array('K', 3600, '1'), - array('K', 43200, '0'), // 12 hours + ['K', 1, '0'], + ['K', 3600, '1'], + ['K', 43200, '0'], // 12 hours /* minute */ - array('m', 0, '0'), - array('mm', 0, '00'), - array('mmm', 0, '000'), + ['m', 0, '0'], + ['mm', 0, '00'], + ['mmm', 0, '000'], - array('m', 1, '0'), - array('m', 60, '1'), - array('m', 120, '2'), - array('m', 180, '3'), - array('m', 3600, '0'), - array('m', 3660, '1'), - array('m', 43200, '0'), // 12 hours + ['m', 1, '0'], + ['m', 60, '1'], + ['m', 120, '2'], + ['m', 180, '3'], + ['m', 3600, '0'], + ['m', 3660, '1'], + ['m', 43200, '0'], // 12 hours /* second */ - array('s', 0, '0'), - array('ss', 0, '00'), - array('sss', 0, '000'), + ['s', 0, '0'], + ['ss', 0, '00'], + ['sss', 0, '000'], - array('s', 1, '1'), - array('s', 2, '2'), - array('s', 5, '5'), - array('s', 30, '30'), - array('s', 59, '59'), - array('s', 60, '0'), - array('s', 120, '0'), - array('s', 180, '0'), - array('s', 3600, '0'), - array('s', 3601, '1'), - array('s', 3630, '30'), - array('s', 43200, '0'), // 12 hours - ); + ['s', 1, '1'], + ['s', 2, '2'], + ['s', 5, '5'], + ['s', 30, '30'], + ['s', 59, '59'], + ['s', 60, '0'], + ['s', 120, '0'], + ['s', 180, '0'], + ['s', 3600, '0'], + ['s', 3601, '1'], + ['s', 3630, '30'], + ['s', 43200, '0'], // 12 hours + ]; /* general, DateTime */ - $formatData[] = array('y-M-d', $dateTime, '1970-1-1'); - $formatData[] = array("EEE, MMM d, ''yy", $dateTime, "Thu, Jan 1, '70"); - $formatData[] = array('h:mm a', $dateTime, '12:00 AM'); - $formatData[] = array('yyyyy.MMMM.dd hh:mm aaa', $dateTime, '01970.January.01 12:00 AM'); + $formatData[] = ['y-M-d', $dateTime, '1970-1-1']; + $formatData[] = ["EEE, MMM d, ''yy", $dateTime, "Thu, Jan 1, '70"]; + $formatData[] = ['h:mm a', $dateTime, '12:00 AM']; + $formatData[] = ['yyyyy.MMMM.dd hh:mm aaa', $dateTime, '01970.January.01 12:00 AM']; if (IcuVersion::compare(Intl::getIcuVersion(), '59.1', '>=', 1)) { // Before ICU 59.1 GMT was used instead of UTC - $formatData[] = array("yyyy.MM.dd 'at' HH:mm:ss zzz", 0, '1970.01.01 at 00:00:00 UTC'); - $formatData[] = array('K:mm a, z', 0, '0:00 AM, UTC'); - $formatData[] = array("yyyy.MM.dd 'at' HH:mm:ss zzz", $dateTime, '1970.01.01 at 00:00:00 UTC'); - $formatData[] = array('K:mm a, z', $dateTime, '0:00 AM, UTC'); + $formatData[] = ["yyyy.MM.dd 'at' HH:mm:ss zzz", 0, '1970.01.01 at 00:00:00 UTC']; + $formatData[] = ['K:mm a, z', 0, '0:00 AM, UTC']; + $formatData[] = ["yyyy.MM.dd 'at' HH:mm:ss zzz", $dateTime, '1970.01.01 at 00:00:00 UTC']; + $formatData[] = ['K:mm a, z', $dateTime, '0:00 AM, UTC']; } return $formatData; @@ -274,9 +288,9 @@ abstract class AbstractIntlDateFormatterTest extends TestCase public function formatErrorProvider() { - return array( - array('y-M-d', 'foobar', 'datefmt_format: string \'foobar\' is not numeric, which would be required for it to be a valid date: U_ILLEGAL_ARGUMENT_ERROR'), - ); + return [ + ['y-M-d', 'foobar', 'datefmt_format: string \'foobar\' is not numeric, which would be required for it to be a valid date: U_ILLEGAL_ARGUMENT_ERROR'], + ]; } /** @@ -291,31 +305,31 @@ abstract class AbstractIntlDateFormatterTest extends TestCase public function formatWithTimezoneProvider() { - $data = array( - array(0, 'UTC', '1970-01-01 00:00:00'), - array(0, 'GMT', '1970-01-01 00:00:00'), - array(0, 'GMT-03:00', '1969-12-31 21:00:00'), - array(0, 'GMT+03:00', '1970-01-01 03:00:00'), - array(0, 'Europe/Zurich', '1970-01-01 01:00:00'), - array(0, 'Europe/Paris', '1970-01-01 01:00:00'), - array(0, 'Africa/Cairo', '1970-01-01 02:00:00'), - array(0, 'Africa/Casablanca', '1970-01-01 00:00:00'), - array(0, 'Africa/Djibouti', '1970-01-01 03:00:00'), - array(0, 'Africa/Johannesburg', '1970-01-01 02:00:00'), - array(0, 'America/Antigua', '1969-12-31 20:00:00'), - array(0, 'America/Toronto', '1969-12-31 19:00:00'), - array(0, 'America/Vancouver', '1969-12-31 16:00:00'), - array(0, 'Asia/Aqtau', '1970-01-01 05:00:00'), - array(0, 'Asia/Bangkok', '1970-01-01 07:00:00'), - array(0, 'Asia/Dubai', '1970-01-01 04:00:00'), - array(0, 'Australia/Brisbane', '1970-01-01 10:00:00'), - array(0, 'Australia/Eucla', '1970-01-01 08:45:00'), - array(0, 'Australia/Melbourne', '1970-01-01 10:00:00'), - array(0, 'Europe/Berlin', '1970-01-01 01:00:00'), - array(0, 'Europe/Dublin', '1970-01-01 01:00:00'), - array(0, 'Europe/Warsaw', '1970-01-01 01:00:00'), - array(0, 'Pacific/Fiji', '1970-01-01 12:00:00'), - ); + $data = [ + [0, 'UTC', '1970-01-01 00:00:00'], + [0, 'GMT', '1970-01-01 00:00:00'], + [0, 'GMT-03:00', '1969-12-31 21:00:00'], + [0, 'GMT+03:00', '1970-01-01 03:00:00'], + [0, 'Europe/Zurich', '1970-01-01 01:00:00'], + [0, 'Europe/Paris', '1970-01-01 01:00:00'], + [0, 'Africa/Cairo', '1970-01-01 02:00:00'], + [0, 'Africa/Casablanca', '1970-01-01 00:00:00'], + [0, 'Africa/Djibouti', '1970-01-01 03:00:00'], + [0, 'Africa/Johannesburg', '1970-01-01 02:00:00'], + [0, 'America/Antigua', '1969-12-31 20:00:00'], + [0, 'America/Toronto', '1969-12-31 19:00:00'], + [0, 'America/Vancouver', '1969-12-31 16:00:00'], + [0, 'Asia/Aqtau', '1970-01-01 05:00:00'], + [0, 'Asia/Bangkok', '1970-01-01 07:00:00'], + [0, 'Asia/Dubai', '1970-01-01 04:00:00'], + [0, 'Australia/Brisbane', '1970-01-01 10:00:00'], + [0, 'Australia/Eucla', '1970-01-01 08:45:00'], + [0, 'Australia/Melbourne', '1970-01-01 10:00:00'], + [0, 'Europe/Berlin', '1970-01-01 01:00:00'], + [0, 'Europe/Dublin', '1970-01-01 01:00:00'], + [0, 'Europe/Warsaw', '1970-01-01 01:00:00'], + [0, 'Pacific/Fiji', '1970-01-01 12:00:00'], + ]; return $data; } @@ -334,56 +348,56 @@ abstract class AbstractIntlDateFormatterTest extends TestCase public function formatTimezoneProvider() { - $cases = array( - array('z', 'GMT', 'GMT'), - array('zz', 'GMT', 'GMT'), - array('zzz', 'GMT', 'GMT'), - array('zzzz', 'GMT', 'Greenwich Mean Time'), - array('zzzzz', 'GMT', 'Greenwich Mean Time'), + $cases = [ + ['z', 'GMT', 'GMT'], + ['zz', 'GMT', 'GMT'], + ['zzz', 'GMT', 'GMT'], + ['zzzz', 'GMT', 'Greenwich Mean Time'], + ['zzzzz', 'GMT', 'Greenwich Mean Time'], - array('z', 'Etc/GMT', 'GMT'), - array('zz', 'Etc/GMT', 'GMT'), - array('zzz', 'Etc/GMT', 'GMT'), - array('zzzz', 'Etc/GMT', 'Greenwich Mean Time'), - array('zzzzz', 'Etc/GMT', 'Greenwich Mean Time'), + ['z', 'Etc/GMT', 'GMT'], + ['zz', 'Etc/GMT', 'GMT'], + ['zzz', 'Etc/GMT', 'GMT'], + ['zzzz', 'Etc/GMT', 'Greenwich Mean Time'], + ['zzzzz', 'Etc/GMT', 'Greenwich Mean Time'], - array('z', 'Etc/GMT+3', 'GMT-3'), - array('zz', 'Etc/GMT+3', 'GMT-3'), - array('zzz', 'Etc/GMT+3', 'GMT-3'), - array('zzzz', 'Etc/GMT+3', 'GMT-03:00'), - array('zzzzz', 'Etc/GMT+3', 'GMT-03:00'), + ['z', 'Etc/GMT+3', 'GMT-3'], + ['zz', 'Etc/GMT+3', 'GMT-3'], + ['zzz', 'Etc/GMT+3', 'GMT-3'], + ['zzzz', 'Etc/GMT+3', 'GMT-03:00'], + ['zzzzz', 'Etc/GMT+3', 'GMT-03:00'], - array('z', 'UTC', 'UTC'), - array('zz', 'UTC', 'UTC'), - array('zzz', 'UTC', 'UTC'), - array('zzzz', 'UTC', 'Coordinated Universal Time'), - array('zzzzz', 'UTC', 'Coordinated Universal Time'), + ['z', 'UTC', 'UTC'], + ['zz', 'UTC', 'UTC'], + ['zzz', 'UTC', 'UTC'], + ['zzzz', 'UTC', 'Coordinated Universal Time'], + ['zzzzz', 'UTC', 'Coordinated Universal Time'], - array('z', 'Etc/UTC', 'UTC'), - array('zz', 'Etc/UTC', 'UTC'), - array('zzz', 'Etc/UTC', 'UTC'), - array('zzzz', 'Etc/UTC', 'Coordinated Universal Time'), - array('zzzzz', 'Etc/UTC', 'Coordinated Universal Time'), + ['z', 'Etc/UTC', 'UTC'], + ['zz', 'Etc/UTC', 'UTC'], + ['zzz', 'Etc/UTC', 'UTC'], + ['zzzz', 'Etc/UTC', 'Coordinated Universal Time'], + ['zzzzz', 'Etc/UTC', 'Coordinated Universal Time'], - array('z', 'Etc/Universal', 'UTC'), - array('z', 'Etc/Zulu', 'UTC'), - array('z', 'Etc/UCT', 'UTC'), - array('z', 'Etc/Greenwich', 'GMT'), - array('zzzzz', 'Etc/Universal', 'Coordinated Universal Time'), - array('zzzzz', 'Etc/Zulu', 'Coordinated Universal Time'), - array('zzzzz', 'Etc/UCT', 'Coordinated Universal Time'), - array('zzzzz', 'Etc/Greenwich', 'Greenwich Mean Time'), - ); + ['z', 'Etc/Universal', 'UTC'], + ['z', 'Etc/Zulu', 'UTC'], + ['z', 'Etc/UCT', 'UTC'], + ['z', 'Etc/Greenwich', 'GMT'], + ['zzzzz', 'Etc/Universal', 'Coordinated Universal Time'], + ['zzzzz', 'Etc/Zulu', 'Coordinated Universal Time'], + ['zzzzz', 'Etc/UCT', 'Coordinated Universal Time'], + ['zzzzz', 'Etc/Greenwich', 'Greenwich Mean Time'], + ]; if (!\defined('HHVM_VERSION')) { // these timezones are not considered valid in HHVM - $cases = array_merge($cases, array( - array('z', 'GMT+03:00', 'GMT+3'), - array('zz', 'GMT+03:00', 'GMT+3'), - array('zzz', 'GMT+03:00', 'GMT+3'), - array('zzzz', 'GMT+03:00', 'GMT+03:00'), - array('zzzzz', 'GMT+03:00', 'GMT+03:00'), - )); + $cases = array_merge($cases, [ + ['z', 'GMT+03:00', 'GMT+3'], + ['zz', 'GMT+03:00', 'GMT+3'], + ['zzz', 'GMT+03:00', 'GMT+3'], + ['zzzz', 'GMT+03:00', 'GMT+03:00'], + ['zzzzz', 'GMT+03:00', 'GMT+03:00'], + ]); } return $cases; @@ -489,16 +503,16 @@ abstract class AbstractIntlDateFormatterTest extends TestCase public function dateAndTimeTypeProvider() { - return array( - array(0, IntlDateFormatter::FULL, IntlDateFormatter::NONE, 'Thursday, January 1, 1970'), - array(0, IntlDateFormatter::LONG, IntlDateFormatter::NONE, 'January 1, 1970'), - array(0, IntlDateFormatter::MEDIUM, IntlDateFormatter::NONE, 'Jan 1, 1970'), - array(0, IntlDateFormatter::SHORT, IntlDateFormatter::NONE, '1/1/70'), - array(0, IntlDateFormatter::NONE, IntlDateFormatter::FULL, '12:00:00 AM Coordinated Universal Time'), - array(0, IntlDateFormatter::NONE, IntlDateFormatter::LONG, '12:00:00 AM UTC'), - array(0, IntlDateFormatter::NONE, IntlDateFormatter::MEDIUM, '12:00:00 AM'), - array(0, IntlDateFormatter::NONE, IntlDateFormatter::SHORT, '12:00 AM'), - ); + return [ + [0, IntlDateFormatter::FULL, IntlDateFormatter::NONE, 'Thursday, January 1, 1970'], + [0, IntlDateFormatter::LONG, IntlDateFormatter::NONE, 'January 1, 1970'], + [0, IntlDateFormatter::MEDIUM, IntlDateFormatter::NONE, 'Jan 1, 1970'], + [0, IntlDateFormatter::SHORT, IntlDateFormatter::NONE, '1/1/70'], + [0, IntlDateFormatter::NONE, IntlDateFormatter::FULL, '12:00:00 AM Coordinated Universal Time'], + [0, IntlDateFormatter::NONE, IntlDateFormatter::LONG, '12:00:00 AM UTC'], + [0, IntlDateFormatter::NONE, IntlDateFormatter::MEDIUM, '12:00:00 AM'], + [0, IntlDateFormatter::NONE, IntlDateFormatter::SHORT, '12:00 AM'], + ]; } public function testGetCalendar() @@ -571,263 +585,263 @@ abstract class AbstractIntlDateFormatterTest extends TestCase public function parseYearProvider() { - return array( - array('y-M-d', '1970-1-1', 0), - array('yy-M-d', '70-1-1', 0), - ); + return [ + ['y-M-d', '1970-1-1', 0], + ['yy-M-d', '70-1-1', 0], + ]; } public function parseQuarterProvider() { - return array( - array('Q', '1', 0), - array('QQ', '01', 0), - array('QQQ', 'Q1', 0), - array('QQQQ', '1st quarter', 0), - array('QQQQQ', '1st quarter', 0), + return [ + ['Q', '1', 0], + ['QQ', '01', 0], + ['QQQ', 'Q1', 0], + ['QQQQ', '1st quarter', 0], + ['QQQQQ', '1st quarter', 0], - array('Q', '2', 7776000), - array('QQ', '02', 7776000), - array('QQQ', 'Q2', 7776000), - array('QQQQ', '2nd quarter', 7776000), - array('QQQQQ', '2nd quarter', 7776000), + ['Q', '2', 7776000], + ['QQ', '02', 7776000], + ['QQQ', 'Q2', 7776000], + ['QQQQ', '2nd quarter', 7776000], + ['QQQQQ', '2nd quarter', 7776000], - array('q', '1', 0), - array('qq', '01', 0), - array('qqq', 'Q1', 0), - array('qqqq', '1st quarter', 0), - array('qqqqq', '1st quarter', 0), - ); + ['q', '1', 0], + ['qq', '01', 0], + ['qqq', 'Q1', 0], + ['qqqq', '1st quarter', 0], + ['qqqqq', '1st quarter', 0], + ]; } public function parseMonthProvider() { - return array( - array('y-M-d', '1970-1-1', 0), - array('y-MMM-d', '1970-Jan-1', 0), - array('y-MMMM-d', '1970-January-1', 0), - ); + return [ + ['y-M-d', '1970-1-1', 0], + ['y-MMM-d', '1970-Jan-1', 0], + ['y-MMMM-d', '1970-January-1', 0], + ]; } public function parseStandaloneMonthProvider() { - return array( - array('y-L-d', '1970-1-1', 0), - array('y-LLL-d', '1970-Jan-1', 0), - array('y-LLLL-d', '1970-January-1', 0), - ); + return [ + ['y-L-d', '1970-1-1', 0], + ['y-LLL-d', '1970-Jan-1', 0], + ['y-LLLL-d', '1970-January-1', 0], + ]; } public function parseDayProvider() { - return array( - array('y-M-d', '1970-1-1', 0), - array('y-M-dd', '1970-1-01', 0), - array('y-M-ddd', '1970-1-001', 0), - ); + return [ + ['y-M-d', '1970-1-1', 0], + ['y-M-dd', '1970-1-01', 0], + ['y-M-ddd', '1970-1-001', 0], + ]; } public function parseDayOfWeekProvider() { - return array( - array('E', 'Thu', 0), - array('EE', 'Thu', 0), - array('EEE', 'Thu', 0), - array('EEEE', 'Thursday', 0), - array('EEEEE', 'T', 432000), - array('EEEEEE', 'Th', 0), - ); + return [ + ['E', 'Thu', 0], + ['EE', 'Thu', 0], + ['EEE', 'Thu', 0], + ['EEEE', 'Thursday', 0], + ['EEEEE', 'T', 432000], + ['EEEEEE', 'Th', 0], + ]; } public function parseDayOfYearProvider() { - return array( - array('D', '1', 0), - array('D', '2', 86400), - ); + return [ + ['D', '1', 0], + ['D', '2', 86400], + ]; } public function parseHour12ClockOneBasedProvider() { - return array( + return [ // 12 hours (1-12) - array('y-M-d h', '1970-1-1 1', 3600), - array('y-M-d h', '1970-1-1 10', 36000), - array('y-M-d hh', '1970-1-1 11', 39600), - array('y-M-d hh', '1970-1-1 12', 0), - array('y-M-d hh a', '1970-1-1 0 AM', 0), - array('y-M-d hh a', '1970-1-1 1 AM', 3600), - array('y-M-d hh a', '1970-1-1 10 AM', 36000), - array('y-M-d hh a', '1970-1-1 11 AM', 39600), - array('y-M-d hh a', '1970-1-1 12 AM', 0), - array('y-M-d hh a', '1970-1-1 23 AM', 82800), - array('y-M-d hh a', '1970-1-1 24 AM', 86400), - array('y-M-d hh a', '1970-1-1 0 PM', 43200), - array('y-M-d hh a', '1970-1-1 1 PM', 46800), - array('y-M-d hh a', '1970-1-1 10 PM', 79200), - array('y-M-d hh a', '1970-1-1 11 PM', 82800), - array('y-M-d hh a', '1970-1-1 12 PM', 43200), - array('y-M-d hh a', '1970-1-1 23 PM', 126000), - array('y-M-d hh a', '1970-1-1 24 PM', 129600), - ); + ['y-M-d h', '1970-1-1 1', 3600], + ['y-M-d h', '1970-1-1 10', 36000], + ['y-M-d hh', '1970-1-1 11', 39600], + ['y-M-d hh', '1970-1-1 12', 0], + ['y-M-d hh a', '1970-1-1 0 AM', 0], + ['y-M-d hh a', '1970-1-1 1 AM', 3600], + ['y-M-d hh a', '1970-1-1 10 AM', 36000], + ['y-M-d hh a', '1970-1-1 11 AM', 39600], + ['y-M-d hh a', '1970-1-1 12 AM', 0], + ['y-M-d hh a', '1970-1-1 23 AM', 82800], + ['y-M-d hh a', '1970-1-1 24 AM', 86400], + ['y-M-d hh a', '1970-1-1 0 PM', 43200], + ['y-M-d hh a', '1970-1-1 1 PM', 46800], + ['y-M-d hh a', '1970-1-1 10 PM', 79200], + ['y-M-d hh a', '1970-1-1 11 PM', 82800], + ['y-M-d hh a', '1970-1-1 12 PM', 43200], + ['y-M-d hh a', '1970-1-1 23 PM', 126000], + ['y-M-d hh a', '1970-1-1 24 PM', 129600], + ]; } public function parseHour12ClockZeroBasedProvider() { - return array( + return [ // 12 hours (0-11) - array('y-M-d K', '1970-1-1 1', 3600), - array('y-M-d K', '1970-1-1 10', 36000), - array('y-M-d KK', '1970-1-1 11', 39600), - array('y-M-d KK', '1970-1-1 12', 43200), - array('y-M-d KK a', '1970-1-1 0 AM', 0), - array('y-M-d KK a', '1970-1-1 1 AM', 3600), - array('y-M-d KK a', '1970-1-1 10 AM', 36000), - array('y-M-d KK a', '1970-1-1 11 AM', 39600), - array('y-M-d KK a', '1970-1-1 12 AM', 43200), - array('y-M-d KK a', '1970-1-1 23 AM', 82800), - array('y-M-d KK a', '1970-1-1 24 AM', 86400), - array('y-M-d KK a', '1970-1-1 0 PM', 43200), - array('y-M-d KK a', '1970-1-1 1 PM', 46800), - array('y-M-d KK a', '1970-1-1 10 PM', 79200), - array('y-M-d KK a', '1970-1-1 11 PM', 82800), - array('y-M-d KK a', '1970-1-1 12 PM', 86400), - array('y-M-d KK a', '1970-1-1 23 PM', 126000), - array('y-M-d KK a', '1970-1-1 24 PM', 129600), - ); + ['y-M-d K', '1970-1-1 1', 3600], + ['y-M-d K', '1970-1-1 10', 36000], + ['y-M-d KK', '1970-1-1 11', 39600], + ['y-M-d KK', '1970-1-1 12', 43200], + ['y-M-d KK a', '1970-1-1 0 AM', 0], + ['y-M-d KK a', '1970-1-1 1 AM', 3600], + ['y-M-d KK a', '1970-1-1 10 AM', 36000], + ['y-M-d KK a', '1970-1-1 11 AM', 39600], + ['y-M-d KK a', '1970-1-1 12 AM', 43200], + ['y-M-d KK a', '1970-1-1 23 AM', 82800], + ['y-M-d KK a', '1970-1-1 24 AM', 86400], + ['y-M-d KK a', '1970-1-1 0 PM', 43200], + ['y-M-d KK a', '1970-1-1 1 PM', 46800], + ['y-M-d KK a', '1970-1-1 10 PM', 79200], + ['y-M-d KK a', '1970-1-1 11 PM', 82800], + ['y-M-d KK a', '1970-1-1 12 PM', 86400], + ['y-M-d KK a', '1970-1-1 23 PM', 126000], + ['y-M-d KK a', '1970-1-1 24 PM', 129600], + ]; } public function parseHour24ClockOneBasedProvider() { - return array( + return [ // 24 hours (1-24) - array('y-M-d k', '1970-1-1 1', 3600), - array('y-M-d k', '1970-1-1 10', 36000), - array('y-M-d kk', '1970-1-1 11', 39600), - array('y-M-d kk', '1970-1-1 12', 43200), - array('y-M-d kk', '1970-1-1 23', 82800), - array('y-M-d kk', '1970-1-1 24', 0), - array('y-M-d kk a', '1970-1-1 0 AM', 0), - array('y-M-d kk a', '1970-1-1 1 AM', 0), - array('y-M-d kk a', '1970-1-1 10 AM', 0), - array('y-M-d kk a', '1970-1-1 11 AM', 0), - array('y-M-d kk a', '1970-1-1 12 AM', 0), - array('y-M-d kk a', '1970-1-1 23 AM', 0), - array('y-M-d kk a', '1970-1-1 24 AM', 0), - array('y-M-d kk a', '1970-1-1 0 PM', 43200), - array('y-M-d kk a', '1970-1-1 1 PM', 43200), - array('y-M-d kk a', '1970-1-1 10 PM', 43200), - array('y-M-d kk a', '1970-1-1 11 PM', 43200), - array('y-M-d kk a', '1970-1-1 12 PM', 43200), - array('y-M-d kk a', '1970-1-1 23 PM', 43200), - array('y-M-d kk a', '1970-1-1 24 PM', 43200), - ); + ['y-M-d k', '1970-1-1 1', 3600], + ['y-M-d k', '1970-1-1 10', 36000], + ['y-M-d kk', '1970-1-1 11', 39600], + ['y-M-d kk', '1970-1-1 12', 43200], + ['y-M-d kk', '1970-1-1 23', 82800], + ['y-M-d kk', '1970-1-1 24', 0], + ['y-M-d kk a', '1970-1-1 0 AM', 0], + ['y-M-d kk a', '1970-1-1 1 AM', 0], + ['y-M-d kk a', '1970-1-1 10 AM', 0], + ['y-M-d kk a', '1970-1-1 11 AM', 0], + ['y-M-d kk a', '1970-1-1 12 AM', 0], + ['y-M-d kk a', '1970-1-1 23 AM', 0], + ['y-M-d kk a', '1970-1-1 24 AM', 0], + ['y-M-d kk a', '1970-1-1 0 PM', 43200], + ['y-M-d kk a', '1970-1-1 1 PM', 43200], + ['y-M-d kk a', '1970-1-1 10 PM', 43200], + ['y-M-d kk a', '1970-1-1 11 PM', 43200], + ['y-M-d kk a', '1970-1-1 12 PM', 43200], + ['y-M-d kk a', '1970-1-1 23 PM', 43200], + ['y-M-d kk a', '1970-1-1 24 PM', 43200], + ]; } public function parseHour24ClockZeroBasedProvider() { - return array( + return [ // 24 hours (0-23) - array('y-M-d H', '1970-1-1 0', 0), - array('y-M-d H', '1970-1-1 1', 3600), - array('y-M-d H', '1970-1-1 10', 36000), - array('y-M-d HH', '1970-1-1 11', 39600), - array('y-M-d HH', '1970-1-1 12', 43200), - array('y-M-d HH', '1970-1-1 23', 82800), - array('y-M-d HH a', '1970-1-1 0 AM', 0), - array('y-M-d HH a', '1970-1-1 1 AM', 0), - array('y-M-d HH a', '1970-1-1 10 AM', 0), - array('y-M-d HH a', '1970-1-1 11 AM', 0), - array('y-M-d HH a', '1970-1-1 12 AM', 0), - array('y-M-d HH a', '1970-1-1 23 AM', 0), - array('y-M-d HH a', '1970-1-1 24 AM', 0), - array('y-M-d HH a', '1970-1-1 0 PM', 43200), - array('y-M-d HH a', '1970-1-1 1 PM', 43200), - array('y-M-d HH a', '1970-1-1 10 PM', 43200), - array('y-M-d HH a', '1970-1-1 11 PM', 43200), - array('y-M-d HH a', '1970-1-1 12 PM', 43200), - array('y-M-d HH a', '1970-1-1 23 PM', 43200), - array('y-M-d HH a', '1970-1-1 24 PM', 43200), - ); + ['y-M-d H', '1970-1-1 0', 0], + ['y-M-d H', '1970-1-1 1', 3600], + ['y-M-d H', '1970-1-1 10', 36000], + ['y-M-d HH', '1970-1-1 11', 39600], + ['y-M-d HH', '1970-1-1 12', 43200], + ['y-M-d HH', '1970-1-1 23', 82800], + ['y-M-d HH a', '1970-1-1 0 AM', 0], + ['y-M-d HH a', '1970-1-1 1 AM', 0], + ['y-M-d HH a', '1970-1-1 10 AM', 0], + ['y-M-d HH a', '1970-1-1 11 AM', 0], + ['y-M-d HH a', '1970-1-1 12 AM', 0], + ['y-M-d HH a', '1970-1-1 23 AM', 0], + ['y-M-d HH a', '1970-1-1 24 AM', 0], + ['y-M-d HH a', '1970-1-1 0 PM', 43200], + ['y-M-d HH a', '1970-1-1 1 PM', 43200], + ['y-M-d HH a', '1970-1-1 10 PM', 43200], + ['y-M-d HH a', '1970-1-1 11 PM', 43200], + ['y-M-d HH a', '1970-1-1 12 PM', 43200], + ['y-M-d HH a', '1970-1-1 23 PM', 43200], + ['y-M-d HH a', '1970-1-1 24 PM', 43200], + ]; } public function parseMinuteProvider() { - return array( - array('y-M-d HH:m', '1970-1-1 0:1', 60), - array('y-M-d HH:mm', '1970-1-1 0:10', 600), - ); + return [ + ['y-M-d HH:m', '1970-1-1 0:1', 60], + ['y-M-d HH:mm', '1970-1-1 0:10', 600], + ]; } public function parseSecondProvider() { - return array( - array('y-M-d HH:mm:s', '1970-1-1 00:01:1', 61), - array('y-M-d HH:mm:ss', '1970-1-1 00:01:10', 70), - ); + return [ + ['y-M-d HH:mm:s', '1970-1-1 00:01:1', 61], + ['y-M-d HH:mm:ss', '1970-1-1 00:01:10', 70], + ]; } public function parseTimezoneProvider() { - return array( - array('y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT-03:00', 10800), - array('y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT-04:00', 14400), - array('y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT-00:00', 0), - array('y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT+03:00', -10800), - array('y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT+04:00', -14400), - array('y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT-0300', 10800), - array('y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT+0300', -10800), + return [ + ['y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT-03:00', 10800], + ['y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT-04:00', 14400], + ['y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT-00:00', 0], + ['y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT+03:00', -10800], + ['y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT+04:00', -14400], + ['y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT-0300', 10800], + ['y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT+0300', -10800], // a previous timezone parsing should not change the timezone for the next parsing - array('y-M-d HH:mm:ss', '1970-1-1 00:00:00', 0), - ); + ['y-M-d HH:mm:ss', '1970-1-1 00:00:00', 0], + ]; } public function parseAmPmProvider() { - return array( + return [ // AM/PM (already covered by hours tests) - array('y-M-d HH:mm:ss a', '1970-1-1 00:00:00 AM', 0), - array('y-M-d HH:mm:ss a', '1970-1-1 00:00:00 PM', 43200), - ); + ['y-M-d HH:mm:ss a', '1970-1-1 00:00:00 AM', 0], + ['y-M-d HH:mm:ss a', '1970-1-1 00:00:00 PM', 43200], + ]; } public function parseStandaloneAmPmProvider() { - return array( - array('a', 'AM', 0), - array('a', 'PM', 43200), - ); + return [ + ['a', 'AM', 0], + ['a', 'PM', 43200], + ]; } public function parseRegexMetaCharsProvider() { - return array( + return [ // regexp meta chars in the pattern string - array('y[M-d', '1970[1-1', 0), - array('y[M/d', '1970[1/1', 0), - ); + ['y[M-d', '1970[1-1', 0], + ['y[M/d', '1970[1/1', 0], + ]; } public function parseQuoteCharsProvider() { - return array( - array("'M'", 'M', 0), - array("'yy'", 'yy', 0), - array("'''yy'", "'yy", 0), - array("''y", "'1970", 0), - array("H 'o'' clock'", "0 o' clock", 0), - ); + return [ + ["'M'", 'M', 0], + ["'yy'", 'yy', 0], + ["'''yy'", "'yy", 0], + ["''y", "'1970", 0], + ["H 'o'' clock'", "0 o' clock", 0], + ]; } public function parseDashSlashProvider() { - return array( - array('y-M-d', '1970/1/1', 0), - array('yy-M-d', '70/1/1', 0), - array('y/M/d', '1970-1-1', 0), - array('yy/M/d', '70-1-1', 0), - ); + return [ + ['y-M-d', '1970/1/1', 0], + ['yy-M-d', '70/1/1', 0], + ['y/M/d', '1970-1-1', 0], + ['yy/M/d', '70-1-1', 0], + ]; } /** @@ -845,15 +859,15 @@ abstract class AbstractIntlDateFormatterTest extends TestCase public function parseErrorProvider() { - return array( + return [ // 1 char month - array('y-MMMMM-d', '1970-J-1'), - array('y-MMMMM-d', '1970-S-1'), + ['y-MMMMM-d', '1970-J-1'], + ['y-MMMMM-d', '1970-S-1'], // standalone 1 char month - array('y-LLLLL-d', '1970-J-1'), - array('y-LLLLL-d', '1970-S-1'), - ); + ['y-LLLLL-d', '1970-J-1'], + ['y-LLLLL-d', '1970-S-1'], + ]; } /* @@ -896,16 +910,16 @@ abstract class AbstractIntlDateFormatterTest extends TestCase public function setTimeZoneIdProvider() { - return array( - array('UTC', 'UTC'), - array('GMT', 'GMT'), - array('GMT-03:00', 'GMT-03:00'), - array('Europe/Zurich', 'Europe/Zurich'), - array(null, date_default_timezone_get()), - array('Foo/Bar', 'UTC'), - array('GMT+00:AA', 'UTC'), - array('GMT+00AA', 'UTC'), - ); + return [ + ['UTC', 'UTC'], + ['GMT', 'GMT'], + ['GMT-03:00', 'GMT-03:00'], + ['Europe/Zurich', 'Europe/Zurich'], + [null, date_default_timezone_get()], + ['Foo/Bar', 'UTC'], + ['GMT+00:AA', 'UTC'], + ['GMT+00AA', 'UTC'], + ]; } protected function getDefaultDateFormatter($pattern = null) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php index 88af2e77..03c69d27 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php @@ -52,7 +52,7 @@ class IntlDateFormatterTest extends AbstractIntlDateFormatterTest { $formatter = $this->getDefaultDateFormatter(); - $localtime = array( + $localtime = [ 'tm_sec' => 59, 'tm_min' => 3, 'tm_hour' => 15, @@ -62,7 +62,7 @@ class IntlDateFormatterTest extends AbstractIntlDateFormatterTest 'tm_wday' => 0, 'tm_yday' => 105, 'tm_isdst' => 0, - ); + ]; try { $formatter->format($localtime); @@ -89,7 +89,7 @@ class IntlDateFormatterTest extends AbstractIntlDateFormatterTest public function testFormatWithNonIntegerTimestamp() { $formatter = $this->getDefaultDateFormatter(); - $formatter->format(array()); + $formatter->format([]); } public function testGetErrorCode() @@ -220,7 +220,7 @@ class IntlDateFormatterTest extends AbstractIntlDateFormatterTest private function notImplemented(array $dataSets) { return array_map(function ($row) { - return array($row[0], $row[1], 0); + return [$row[0], $row[1], 0]; }, $dataSets); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php index 57c75fb9..2cb49ef8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php @@ -22,13 +22,13 @@ abstract class AbstractIntlGlobalsTest extends TestCase { public function errorNameProvider() { - return array( - array(-129, '[BOGUS UErrorCode]'), - array(0, 'U_ZERO_ERROR'), - array(1, 'U_ILLEGAL_ARGUMENT_ERROR'), - array(9, 'U_PARSE_ERROR'), - array(129, '[BOGUS UErrorCode]'), - ); + return [ + [-129, '[BOGUS UErrorCode]'], + [0, 'U_ZERO_ERROR'], + [1, 'U_ILLEGAL_ARGUMENT_ERROR'], + [9, 'U_PARSE_ERROR'], + [129, '[BOGUS UErrorCode]'], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Locale/LocaleTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Locale/LocaleTest.php index 932f6597..d087094d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Locale/LocaleTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Locale/LocaleTest.php @@ -26,11 +26,11 @@ class LocaleTest extends AbstractLocaleTest */ public function testComposeLocale() { - $subtags = array( + $subtags = [ 'language' => 'pt', 'script' => 'Latn', 'region' => 'BR', - ); + ]; $this->call('composeLocale', $subtags); } @@ -127,10 +127,10 @@ class LocaleTest extends AbstractLocaleTest */ public function testLookup() { - $langtag = array( + $langtag = [ 'pt-Latn-BR', 'pt-BR', - ); + ]; $this->call('lookup', $langtag, 'pt-BR-x-priv1'); } @@ -161,6 +161,6 @@ class LocaleTest extends AbstractLocaleTest { $args = \array_slice(\func_get_args(), 1); - return \call_user_func_array(array('Symfony\Component\Intl\Locale\Locale', $methodName), $args); + return \call_user_func_array(['Symfony\Component\Intl\Locale\Locale', $methodName], $args); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Locale/Verification/LocaleTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Locale/Verification/LocaleTest.php index cdcc0fde..13f2c4f5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Locale/Verification/LocaleTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Locale/Verification/LocaleTest.php @@ -33,6 +33,6 @@ class LocaleTest extends AbstractLocaleTest { $args = \array_slice(\func_get_args(), 1); - return \call_user_func_array(array('Locale', $methodName), $args); + return \call_user_func_array(['Locale', $methodName], $args); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/LocaleTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/LocaleTest.php index 57059af9..ff908cbc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/LocaleTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/LocaleTest.php @@ -18,22 +18,22 @@ class LocaleTest extends TestCase { public function provideGetFallbackTests() { - $tests = array( - array('sl_Latn_IT', 'sl_Latn_IT_nedis'), - array('sl_Latn', 'sl_Latn_IT'), - array('fr', 'fr_FR'), - array('fr', 'fr-FR'), - array('en', 'fr'), - array('root', 'en'), - array(null, 'root'), - ); + $tests = [ + ['sl_Latn_IT', 'sl_Latn_IT_nedis'], + ['sl_Latn', 'sl_Latn_IT'], + ['fr', 'fr_FR'], + ['fr', 'fr-FR'], + ['en', 'fr'], + ['root', 'en'], + [null, 'root'], + ]; if (\function_exists('locale_parse')) { - $tests[] = array('sl_Latn_IT', 'sl-Latn-IT-nedis'); - $tests[] = array('sl_Latn', 'sl-Latn_IT'); + $tests[] = ['sl_Latn_IT', 'sl-Latn-IT-nedis']; + $tests[] = ['sl_Latn', 'sl-Latn_IT']; } else { - $tests[] = array('sl-Latn-IT', 'sl-Latn-IT-nedis'); - $tests[] = array('sl-Latn', 'sl-Latn-IT'); + $tests[] = ['sl-Latn-IT', 'sl-Latn-IT-nedis']; + $tests[] = ['sl-Latn', 'sl-Latn-IT']; } return $tests; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php index 89be7957..a81d30c8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php @@ -33,23 +33,23 @@ abstract class AbstractNumberFormatterTest extends TestCase public function formatCurrencyWithDecimalStyleProvider() { - return array( - array(100, 'ALL', '100'), - array(100, 'BRL', '100.00'), - array(100, 'CRC', '100'), - array(100, 'JPY', '100'), - array(100, 'CHF', '100'), - array(-100, 'ALL', '-100'), - array(-100, 'BRL', '-100'), - array(-100, 'CRC', '-100'), - array(-100, 'JPY', '-100'), - array(-100, 'CHF', '-100'), - array(1000.12, 'ALL', '1,000.12'), - array(1000.12, 'BRL', '1,000.12'), - array(1000.12, 'CRC', '1,000.12'), - array(1000.12, 'JPY', '1,000.12'), - array(1000.12, 'CHF', '1,000.12'), - ); + return [ + [100, 'ALL', '100'], + [100, 'BRL', '100.00'], + [100, 'CRC', '100'], + [100, 'JPY', '100'], + [100, 'CHF', '100'], + [-100, 'ALL', '-100'], + [-100, 'BRL', '-100'], + [-100, 'CRC', '-100'], + [-100, 'JPY', '-100'], + [-100, 'CHF', '-100'], + [1000.12, 'ALL', '1,000.12'], + [1000.12, 'BRL', '1,000.12'], + [1000.12, 'CRC', '1,000.12'], + [1000.12, 'JPY', '1,000.12'], + [1000.12, 'CHF', '1,000.12'], + ]; } /** @@ -65,19 +65,19 @@ abstract class AbstractNumberFormatterTest extends TestCase public function formatCurrencyWithCurrencyStyleProvider() { - return array( - array(100, 'ALL', "ALL\xc2\xa0100"), - array(-100, 'ALL', "-ALL\xc2\xa0100"), - array(1000.12, 'ALL', "ALL\xc2\xa01,000"), + return [ + [100, 'ALL', "ALL\xc2\xa0100"], + [-100, 'ALL', "-ALL\xc2\xa0100"], + [1000.12, 'ALL', "ALL\xc2\xa01,000"], - array(100, 'JPY', '¥100'), - array(-100, 'JPY', '-¥100'), - array(1000.12, 'JPY', '¥1,000'), + [100, 'JPY', '¥100'], + [-100, 'JPY', '-¥100'], + [1000.12, 'JPY', '¥1,000'], - array(100, 'EUR', '€100.00'), - array(-100, 'EUR', '-€100.00'), - array(1000.12, 'EUR', '€1,000.12'), - ); + [100, 'EUR', '€100.00'], + [-100, 'EUR', '-€100.00'], + [1000.12, 'EUR', '€1,000.12'], + ]; } /** @@ -93,11 +93,11 @@ abstract class AbstractNumberFormatterTest extends TestCase public function formatCurrencyWithCurrencyStyleCostaRicanColonsRoundingProvider() { - return array( - array(100, 'CRC', 'CRC', "%s\xc2\xa0100.00"), - array(-100, 'CRC', 'CRC', "-%s\xc2\xa0100.00"), - array(1000.12, 'CRC', 'CRC', "%s\xc2\xa01,000.12"), - ); + return [ + [100, 'CRC', 'CRC', "%s\xc2\xa0100.00"], + [-100, 'CRC', 'CRC', "-%s\xc2\xa0100.00"], + [1000.12, 'CRC', 'CRC', "%s\xc2\xa01,000.12"], + ]; } /** @@ -111,20 +111,20 @@ abstract class AbstractNumberFormatterTest extends TestCase public function formatCurrencyWithCurrencyStyleBrazilianRealRoundingProvider() { - return array( - array(100, 'BRL', 'R', '%s$100.00'), - array(-100, 'BRL', 'R', '-%s$100.00'), - array(1000.12, 'BRL', 'R', '%s$1,000.12'), + return [ + [100, 'BRL', 'R', '%s$100.00'], + [-100, 'BRL', 'R', '-%s$100.00'], + [1000.12, 'BRL', 'R', '%s$1,000.12'], // Rounding checks - array(1000.121, 'BRL', 'R', '%s$1,000.12'), - array(1000.123, 'BRL', 'R', '%s$1,000.12'), - array(1000.125, 'BRL', 'R', '%s$1,000.12'), - array(1000.127, 'BRL', 'R', '%s$1,000.13'), - array(1000.129, 'BRL', 'R', '%s$1,000.13'), - array(11.50999, 'BRL', 'R', '%s$11.51'), - array(11.9999464, 'BRL', 'R', '%s$12.00'), - ); + [1000.121, 'BRL', 'R', '%s$1,000.12'], + [1000.123, 'BRL', 'R', '%s$1,000.12'], + [1000.125, 'BRL', 'R', '%s$1,000.12'], + [1000.127, 'BRL', 'R', '%s$1,000.13'], + [1000.129, 'BRL', 'R', '%s$1,000.13'], + [11.50999, 'BRL', 'R', '%s$11.51'], + [11.9999464, 'BRL', 'R', '%s$12.00'], + ]; } /** @@ -140,24 +140,24 @@ abstract class AbstractNumberFormatterTest extends TestCase public function formatCurrencyWithCurrencyStyleSwissRoundingProvider() { - return array( - array(100, 'CHF', 'CHF', "%s\xc2\xa0100.00"), - array(-100, 'CHF', 'CHF', "-%s\xc2\xa0100.00"), - array(1000.12, 'CHF', 'CHF', "%s\xc2\xa01,000.12"), - array('1000.12', 'CHF', 'CHF', "%s\xc2\xa01,000.12"), + return [ + [100, 'CHF', 'CHF', "%s\xc2\xa0100.00"], + [-100, 'CHF', 'CHF', "-%s\xc2\xa0100.00"], + [1000.12, 'CHF', 'CHF', "%s\xc2\xa01,000.12"], + ['1000.12', 'CHF', 'CHF', "%s\xc2\xa01,000.12"], // Rounding checks - array(1000.121, 'CHF', 'CHF', "%s\xc2\xa01,000.12"), - array(1000.123, 'CHF', 'CHF', "%s\xc2\xa01,000.12"), - array(1000.125, 'CHF', 'CHF', "%s\xc2\xa01,000.12"), - array(1000.127, 'CHF', 'CHF', "%s\xc2\xa01,000.13"), - array(1000.129, 'CHF', 'CHF', "%s\xc2\xa01,000.13"), + [1000.121, 'CHF', 'CHF', "%s\xc2\xa01,000.12"], + [1000.123, 'CHF', 'CHF', "%s\xc2\xa01,000.12"], + [1000.125, 'CHF', 'CHF', "%s\xc2\xa01,000.12"], + [1000.127, 'CHF', 'CHF', "%s\xc2\xa01,000.13"], + [1000.129, 'CHF', 'CHF', "%s\xc2\xa01,000.13"], - array(1200000.00, 'CHF', 'CHF', "%s\xc2\xa01,200,000.00"), - array(1200000.1, 'CHF', 'CHF', "%s\xc2\xa01,200,000.10"), - array(1200000.10, 'CHF', 'CHF', "%s\xc2\xa01,200,000.10"), - array(1200000.101, 'CHF', 'CHF', "%s\xc2\xa01,200,000.10"), - ); + [1200000.00, 'CHF', 'CHF', "%s\xc2\xa01,200,000.00"], + [1200000.1, 'CHF', 'CHF', "%s\xc2\xa01,200,000.10"], + [1200000.10, 'CHF', 'CHF', "%s\xc2\xa01,200,000.10"], + [1200000.101, 'CHF', 'CHF', "%s\xc2\xa01,200,000.10"], + ]; } public function testFormat() @@ -199,12 +199,12 @@ abstract class AbstractNumberFormatterTest extends TestCase $message = '->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range.'; - return array( - array($formatter, 1, '1'), - array($formatter, 1.1, '1'), - array($formatter, 2147483648, '-2,147,483,648', $message), - array($formatter, -2147483649, '2,147,483,647', $message), - ); + return [ + [$formatter, 1, '1'], + [$formatter, 1.1, '1'], + [$formatter, 2147483648, '-2,147,483,648', $message], + [$formatter, -2147483649, '2,147,483,647', $message], + ]; } /** @@ -224,12 +224,12 @@ abstract class AbstractNumberFormatterTest extends TestCase $message = '->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range.'; - return array( - array($formatter, 1, '¤1.00'), - array($formatter, 1.1, '¤1.00'), - array($formatter, 2147483648, '-¤2,147,483,648.00', $message), - array($formatter, -2147483649, '¤2,147,483,647.00', $message), - ); + return [ + [$formatter, 1, '¤1.00'], + [$formatter, 1.1, '¤1.00'], + [$formatter, 2147483648, '-¤2,147,483,648.00', $message], + [$formatter, -2147483649, '¤2,147,483,647.00', $message], + ]; } /** @@ -247,12 +247,12 @@ abstract class AbstractNumberFormatterTest extends TestCase { $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); - return array( - array($formatter, 1, '1'), - array($formatter, 1.1, '1'), - array($formatter, 2147483648, '2,147,483,648'), - array($formatter, -2147483649, '-2,147,483,649'), - ); + return [ + [$formatter, 1, '1'], + [$formatter, 1.1, '1'], + [$formatter, 2147483648, '2,147,483,648'], + [$formatter, -2147483649, '-2,147,483,649'], + ]; } /** @@ -270,12 +270,12 @@ abstract class AbstractNumberFormatterTest extends TestCase { $formatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); - return array( - array($formatter, 1, '¤1.00'), - array($formatter, 1.1, '¤1.00'), - array($formatter, 2147483648, '¤2,147,483,648.00'), - array($formatter, -2147483649, '-¤2,147,483,649.00'), - ); + return [ + [$formatter, 1, '¤1.00'], + [$formatter, 1.1, '¤1.00'], + [$formatter, 2147483648, '¤2,147,483,648.00'], + [$formatter, -2147483649, '-¤2,147,483,649.00'], + ]; } /** @@ -291,10 +291,10 @@ abstract class AbstractNumberFormatterTest extends TestCase { $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); - return array( - array($formatter, 1, '1'), - array($formatter, 1.1, '1.1'), - ); + return [ + [$formatter, 1, '1'], + [$formatter, 1.1, '1.1'], + ]; } /** @@ -312,10 +312,10 @@ abstract class AbstractNumberFormatterTest extends TestCase { $formatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); - return array( - array($formatter, 1, '¤1.00'), - array($formatter, 1.1, '¤1.10'), - ); + return [ + [$formatter, 1, '¤1.00'], + [$formatter, 1.1, '¤1.10'], + ]; } /** @@ -347,10 +347,10 @@ abstract class AbstractNumberFormatterTest extends TestCase $df = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); $cf = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); - return array( - array($df, 1), - array($cf, 1), - ); + return [ + [$df, 1], + [$cf, 1], + ]; } /** @@ -378,14 +378,14 @@ abstract class AbstractNumberFormatterTest extends TestCase public function formatFractionDigitsProvider() { - return array( - array(1.123, '1.123', null, 0), - array(1.123, '1', 0, 0), - array(1.123, '1.1', 1, 1), - array(1.123, '1.12', 2, 2), - array(1.123, '1.123', -1, 0), - array(1.123, '1', 'abc', 0), - ); + return [ + [1.123, '1.123', null, 0], + [1.123, '1', 0, 0], + [1.123, '1.1', 1, 1], + [1.123, '1.12', 2, 2], + [1.123, '1.123', -1, 0], + [1.123, '1', 'abc', 0], + ]; } /** @@ -411,14 +411,14 @@ abstract class AbstractNumberFormatterTest extends TestCase public function formatGroupingUsedProvider() { - return array( - array(1000, '1,000', null, 1), - array(1000, '1000', 0, 0), - array(1000, '1,000', 1, 1), - array(1000, '1,000', 2, 1), - array(1000, '1000', 'abc', 0), - array(1000, '1,000', -1, 1), - ); + return [ + [1000, '1,000', null, 1], + [1000, '1000', 0, 0], + [1000, '1,000', 1, 1], + [1000, '1,000', 2, 1], + [1000, '1000', 'abc', 0], + [1000, '1,000', -1, 1], + ]; } /** @@ -436,14 +436,14 @@ abstract class AbstractNumberFormatterTest extends TestCase public function formatRoundingModeRoundHalfUpProvider() { // The commented value is differently rounded by intl's NumberFormatter in 32 and 64 bit architectures - return array( - array(1.121, '1.12'), - array(1.123, '1.12'), - // array(1.125, '1.13'), - array(1.127, '1.13'), - array(1.129, '1.13'), - array(1020 / 100, '10.20'), - ); + return [ + [1.121, '1.12'], + [1.123, '1.12'], + // [1.125, '1.13'], + [1.127, '1.13'], + [1.129, '1.13'], + [1020 / 100, '10.20'], + ]; } /** @@ -460,14 +460,14 @@ abstract class AbstractNumberFormatterTest extends TestCase public function formatRoundingModeRoundHalfDownProvider() { - return array( - array(1.121, '1.12'), - array(1.123, '1.12'), - array(1.125, '1.12'), - array(1.127, '1.13'), - array(1.129, '1.13'), - array(1020 / 100, '10.20'), - ); + return [ + [1.121, '1.12'], + [1.123, '1.12'], + [1.125, '1.12'], + [1.127, '1.13'], + [1.129, '1.13'], + [1020 / 100, '10.20'], + ]; } /** @@ -484,14 +484,14 @@ abstract class AbstractNumberFormatterTest extends TestCase public function formatRoundingModeRoundHalfEvenProvider() { - return array( - array(1.121, '1.12'), - array(1.123, '1.12'), - array(1.125, '1.12'), - array(1.127, '1.13'), - array(1.129, '1.13'), - array(1020 / 100, '10.20'), - ); + return [ + [1.121, '1.12'], + [1.123, '1.12'], + [1.125, '1.12'], + [1.127, '1.13'], + [1.129, '1.13'], + [1020 / 100, '10.20'], + ]; } /** @@ -508,15 +508,15 @@ abstract class AbstractNumberFormatterTest extends TestCase public function formatRoundingModeRoundCeilingProvider() { - return array( - array(1.123, '1.13'), - array(1.125, '1.13'), - array(1.127, '1.13'), - array(-1.123, '-1.12'), - array(-1.125, '-1.12'), - array(-1.127, '-1.12'), - array(1020 / 100, '10.20'), - ); + return [ + [1.123, '1.13'], + [1.125, '1.13'], + [1.127, '1.13'], + [-1.123, '-1.12'], + [-1.125, '-1.12'], + [-1.127, '-1.12'], + [1020 / 100, '10.20'], + ]; } /** @@ -533,15 +533,15 @@ abstract class AbstractNumberFormatterTest extends TestCase public function formatRoundingModeRoundFloorProvider() { - return array( - array(1.123, '1.12'), - array(1.125, '1.12'), - array(1.127, '1.12'), - array(-1.123, '-1.13'), - array(-1.125, '-1.13'), - array(-1.127, '-1.13'), - array(1020 / 100, '10.20'), - ); + return [ + [1.123, '1.12'], + [1.125, '1.12'], + [1.127, '1.12'], + [-1.123, '-1.13'], + [-1.125, '-1.13'], + [-1.127, '-1.13'], + [1020 / 100, '10.20'], + ]; } /** @@ -558,15 +558,15 @@ abstract class AbstractNumberFormatterTest extends TestCase public function formatRoundingModeRoundDownProvider() { - return array( - array(1.123, '1.12'), - array(1.125, '1.12'), - array(1.127, '1.12'), - array(-1.123, '-1.12'), - array(-1.125, '-1.12'), - array(-1.127, '-1.12'), - array(1020 / 100, '10.20'), - ); + return [ + [1.123, '1.12'], + [1.125, '1.12'], + [1.127, '1.12'], + [-1.123, '-1.12'], + [-1.125, '-1.12'], + [-1.127, '-1.12'], + [1020 / 100, '10.20'], + ]; } /** @@ -583,15 +583,15 @@ abstract class AbstractNumberFormatterTest extends TestCase public function formatRoundingModeRoundUpProvider() { - return array( - array(1.123, '1.13'), - array(1.125, '1.13'), - array(1.127, '1.13'), - array(-1.123, '-1.13'), - array(-1.125, '-1.13'), - array(-1.127, '-1.13'), - array(1020 / 100, '10.20'), - ); + return [ + [1.123, '1.13'], + [1.125, '1.13'], + [1.127, '1.13'], + [-1.123, '-1.13'], + [-1.125, '-1.13'], + [-1.127, '-1.13'], + [1020 / 100, '10.20'], + ]; } public function testGetLocale() @@ -664,44 +664,44 @@ abstract class AbstractNumberFormatterTest extends TestCase public function parseProvider() { - return array( - array('prefix1', false, '->parse() does not parse a number with a string prefix.', 0), - array('prefix1', false, '->parse() does not parse a number with a string prefix.', 0, false), - array('1.4suffix', (float) 1.4, '->parse() parses a number with a string suffix.', 3), - array('1.4suffix', (float) 1.4, '->parse() parses a number with a string suffix.', 3, false), - array('1,234.4suffix', 1234.4, '->parse() parses a number with a string suffix.', 7), - array('1,234.4suffix', 1.0, '->parse() parses a number with a string suffix.', 1, false), - array('-.4suffix', (float) -0.4, '->parse() parses a negative dot float with suffix.', 3), - array('-.4suffix', (float) -0.4, '->parse() parses a negative dot float with suffix.', 3, false), - array(',4', false, '->parse() does not parse when invalid grouping used.', 0), - array(',4', false, '->parse() does not parse when invalid grouping used.', 0, false), - array('123,4', false, '->parse() does not parse when invalid grouping used.', 0), - array('123,4', 123.0, '->parse() truncates invalid grouping when grouping is disabled.', 3, false), - array('123,a4', 123.0, '->parse() truncates a string suffix.', 3), - array('123,a4', 123.0, '->parse() truncates a string suffix.', 3, false), - array('-123,4', false, '->parse() does not parse when invalid grouping used.', 1), - array('-123,4', -123.0, '->parse() truncates invalid grouping when grouping is disabled.', 4, false), - array('-123,4567', false, '->parse() does not parse when invalid grouping used.', 1), - array('-123,4567', -123.0, '->parse() truncates invalid grouping when grouping is disabled.', 4, false), - array('-123,456,789', -123456789.0, '->parse() parses a number with grouping.', 12), - array('-123,456,789', -123.0, '->parse() truncates a group if grouping is disabled.', 4, false), - array('-123,456,789.66', -123456789.66, '->parse() parses a number with grouping.', 15), - array('-123,456,789.66', -123.00, '->parse() truncates a group if grouping is disabled.', 4, false), - array('-123,456789.66', false, '->parse() does not parse when invalid grouping used.', 1), - array('-123,456789.66', -123.00, '->parse() truncates a group if grouping is disabled.', 4, false), - array('-123456,789.66', false, '->parse() does not parse when invalid grouping used.', 1), - array('-123456,789.66', -123456.00, '->parse() truncates a group if grouping is disabled.', 7, false), - array('-123,456,78', false, '->parse() does not parse when invalid grouping used.', 1), - array('-123,456,78', -123.0, '->parse() truncates a group if grouping is disabled.', 4, false), - array('-123,45,789', false, '->parse() does not parse when invalid grouping used.', 1), - array('-123,45,789', -123.0, '->parse() truncates a group if grouping is disabled.', 4, false), - array('-123,,456', -123.0, '->parse() parses when grouping is duplicated.', 4), - array('-123,,456', -123.0, '->parse() parses when grouping is disabled.', 4, false), - array('-123,,4', -123.0, '->parse() parses when grouping is duplicated.', 4), - array('-123,,4', -123.0, '->parse() parses when grouping is duplicated.', 4, false), - array('239.', 239.0, '->parse() parses when string ends with decimal separator.', 4), - array('239.', 239.0, '->parse() parses when string ends with decimal separator.', 4, false), - ); + return [ + ['prefix1', false, '->parse() does not parse a number with a string prefix.', 0], + ['prefix1', false, '->parse() does not parse a number with a string prefix.', 0, false], + ['1.4suffix', (float) 1.4, '->parse() parses a number with a string suffix.', 3], + ['1.4suffix', (float) 1.4, '->parse() parses a number with a string suffix.', 3, false], + ['1,234.4suffix', 1234.4, '->parse() parses a number with a string suffix.', 7], + ['1,234.4suffix', 1.0, '->parse() parses a number with a string suffix.', 1, false], + ['-.4suffix', (float) -0.4, '->parse() parses a negative dot float with suffix.', 3], + ['-.4suffix', (float) -0.4, '->parse() parses a negative dot float with suffix.', 3, false], + [',4', false, '->parse() does not parse when invalid grouping used.', 0], + [',4', false, '->parse() does not parse when invalid grouping used.', 0, false], + ['123,4', false, '->parse() does not parse when invalid grouping used.', 0], + ['123,4', 123.0, '->parse() truncates invalid grouping when grouping is disabled.', 3, false], + ['123,a4', 123.0, '->parse() truncates a string suffix.', 3], + ['123,a4', 123.0, '->parse() truncates a string suffix.', 3, false], + ['-123,4', false, '->parse() does not parse when invalid grouping used.', 1], + ['-123,4', -123.0, '->parse() truncates invalid grouping when grouping is disabled.', 4, false], + ['-123,4567', false, '->parse() does not parse when invalid grouping used.', 1], + ['-123,4567', -123.0, '->parse() truncates invalid grouping when grouping is disabled.', 4, false], + ['-123,456,789', -123456789.0, '->parse() parses a number with grouping.', 12], + ['-123,456,789', -123.0, '->parse() truncates a group if grouping is disabled.', 4, false], + ['-123,456,789.66', -123456789.66, '->parse() parses a number with grouping.', 15], + ['-123,456,789.66', -123.00, '->parse() truncates a group if grouping is disabled.', 4, false], + ['-123,456789.66', false, '->parse() does not parse when invalid grouping used.', 1], + ['-123,456789.66', -123.00, '->parse() truncates a group if grouping is disabled.', 4, false], + ['-123456,789.66', false, '->parse() does not parse when invalid grouping used.', 1], + ['-123456,789.66', -123456.00, '->parse() truncates a group if grouping is disabled.', 7, false], + ['-123,456,78', false, '->parse() does not parse when invalid grouping used.', 1], + ['-123,456,78', -123.0, '->parse() truncates a group if grouping is disabled.', 4, false], + ['-123,45,789', false, '->parse() does not parse when invalid grouping used.', 1], + ['-123,45,789', -123.0, '->parse() truncates a group if grouping is disabled.', 4, false], + ['-123,,456', -123.0, '->parse() parses when grouping is duplicated.', 4], + ['-123,,456', -123.0, '->parse() parses when grouping is disabled.', 4, false], + ['-123,,4', -123.0, '->parse() parses when grouping is duplicated.', 4], + ['-123,,4', -123.0, '->parse() parses when grouping is duplicated.', 4, false], + ['239.', 239.0, '->parse() parses when string ends with decimal separator.', 4], + ['239.', 239.0, '->parse() parses when string ends with decimal separator.', 4, false], + ]; } public function testParseTypeDefault() @@ -730,15 +730,15 @@ abstract class AbstractNumberFormatterTest extends TestCase public function parseTypeInt32Provider() { - return array( - array('1', 1), - array('1.1', 1), - array('.1', 0), - array('2,147,483,647', 2147483647), - array('-2,147,483,648', -2147483647 - 1), - array('2,147,483,648', false, '->parse() TYPE_INT32 returns false when the number is greater than the integer positive range.'), - array('-2,147,483,649', false, '->parse() TYPE_INT32 returns false when the number is greater than the integer negative range.'), - ); + return [ + ['1', 1], + ['1.1', 1], + ['.1', 0], + ['2,147,483,647', 2147483647], + ['-2,147,483,648', -2147483647 - 1], + ['2,147,483,648', false, '->parse() TYPE_INT32 returns false when the number is greater than the integer positive range.'], + ['-2,147,483,649', false, '->parse() TYPE_INT32 returns false when the number is greater than the integer negative range.'], + ]; } public function testParseTypeInt64With32BitIntegerInPhp32Bit() @@ -822,12 +822,12 @@ abstract class AbstractNumberFormatterTest extends TestCase public function parseTypeDoubleProvider() { - return array( - array('1', (float) 1), - array('1.1', 1.1), - array('9,223,372,036,854,775,808', 9223372036854775808), - array('-9,223,372,036,854,775,809', -9223372036854775809), - ); + return [ + ['1', (float) 1], + ['1.1', 1.1], + ['9,223,372,036,854,775,808', 9223372036854775808], + ['-9,223,372,036,854,775,809', -9223372036854775809], + ]; } public function testParseTypeCurrency() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Util/IcuVersionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Util/IcuVersionTest.php index 2fe7a0e4..b037c332 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Util/IcuVersionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Util/IcuVersionTest.php @@ -21,24 +21,24 @@ class IcuVersionTest extends TestCase { public function normalizeProvider() { - return array( - array(null, '1', '10'), - array(null, '1.2', '12'), - array(null, '1.2.3', '12.3'), - array(null, '1.2.3.4', '12.3.4'), - array(1, '1', '10'), - array(1, '1.2', '12'), - array(1, '1.2.3', '12'), - array(1, '1.2.3.4', '12'), - array(2, '1', '10'), - array(2, '1.2', '12'), - array(2, '1.2.3', '12.3'), - array(2, '1.2.3.4', '12.3'), - array(3, '1', '10'), - array(3, '1.2', '12'), - array(3, '1.2.3', '12.3'), - array(3, '1.2.3.4', '12.3.4'), - ); + return [ + [null, '1', '10'], + [null, '1.2', '12'], + [null, '1.2.3', '12.3'], + [null, '1.2.3.4', '12.3.4'], + [1, '1', '10'], + [1, '1.2', '12'], + [1, '1.2.3', '12'], + [1, '1.2.3.4', '12'], + [2, '1', '10'], + [2, '1.2', '12'], + [2, '1.2.3', '12.3'], + [2, '1.2.3.4', '12.3'], + [3, '1', '10'], + [3, '1.2', '12'], + [3, '1.2.3', '12.3'], + [3, '1.2.3.4', '12.3.4'], + ]; } /** @@ -51,55 +51,55 @@ class IcuVersionTest extends TestCase public function compareProvider() { - return array( - array(null, '1', '==', '1', true), - array(null, '1.0', '==', '1.1', false), - array(null, '1.0.0', '==', '1.0.1', false), - array(null, '1.0.0.0', '==', '1.0.0.1', false), - array(null, '1.0.0.0.0', '==', '1.0.0.0.1', false), + return [ + [null, '1', '==', '1', true], + [null, '1.0', '==', '1.1', false], + [null, '1.0.0', '==', '1.0.1', false], + [null, '1.0.0.0', '==', '1.0.0.1', false], + [null, '1.0.0.0.0', '==', '1.0.0.0.1', false], - array(null, '1', '==', '10', true), - array(null, '1.0', '==', '11', false), - array(null, '1.0.0', '==', '10.1', false), - array(null, '1.0.0.0', '==', '10.0.1', false), - array(null, '1.0.0.0.0', '==', '10.0.0.1', false), + [null, '1', '==', '10', true], + [null, '1.0', '==', '11', false], + [null, '1.0.0', '==', '10.1', false], + [null, '1.0.0.0', '==', '10.0.1', false], + [null, '1.0.0.0.0', '==', '10.0.0.1', false], - array(1, '1', '==', '1', true), - array(1, '1.0', '==', '1.1', false), - array(1, '1.0.0', '==', '1.0.1', true), - array(1, '1.0.0.0', '==', '1.0.0.1', true), - array(1, '1.0.0.0.0', '==', '1.0.0.0.1', true), + [1, '1', '==', '1', true], + [1, '1.0', '==', '1.1', false], + [1, '1.0.0', '==', '1.0.1', true], + [1, '1.0.0.0', '==', '1.0.0.1', true], + [1, '1.0.0.0.0', '==', '1.0.0.0.1', true], - array(1, '1', '==', '10', true), - array(1, '1.0', '==', '11', false), - array(1, '1.0.0', '==', '10.1', true), - array(1, '1.0.0.0', '==', '10.0.1', true), - array(1, '1.0.0.0.0', '==', '10.0.0.1', true), + [1, '1', '==', '10', true], + [1, '1.0', '==', '11', false], + [1, '1.0.0', '==', '10.1', true], + [1, '1.0.0.0', '==', '10.0.1', true], + [1, '1.0.0.0.0', '==', '10.0.0.1', true], - array(2, '1', '==', '1', true), - array(2, '1.0', '==', '1.1', false), - array(2, '1.0.0', '==', '1.0.1', false), - array(2, '1.0.0.0', '==', '1.0.0.1', true), - array(2, '1.0.0.0.0', '==', '1.0.0.0.1', true), + [2, '1', '==', '1', true], + [2, '1.0', '==', '1.1', false], + [2, '1.0.0', '==', '1.0.1', false], + [2, '1.0.0.0', '==', '1.0.0.1', true], + [2, '1.0.0.0.0', '==', '1.0.0.0.1', true], - array(2, '1', '==', '10', true), - array(2, '1.0', '==', '11', false), - array(2, '1.0.0', '==', '10.1', false), - array(2, '1.0.0.0', '==', '10.0.1', true), - array(2, '1.0.0.0.0', '==', '10.0.0.1', true), + [2, '1', '==', '10', true], + [2, '1.0', '==', '11', false], + [2, '1.0.0', '==', '10.1', false], + [2, '1.0.0.0', '==', '10.0.1', true], + [2, '1.0.0.0.0', '==', '10.0.0.1', true], - array(3, '1', '==', '1', true), - array(3, '1.0', '==', '1.1', false), - array(3, '1.0.0', '==', '1.0.1', false), - array(3, '1.0.0.0', '==', '1.0.0.1', false), - array(3, '1.0.0.0.0', '==', '1.0.0.0.1', true), + [3, '1', '==', '1', true], + [3, '1.0', '==', '1.1', false], + [3, '1.0.0', '==', '1.0.1', false], + [3, '1.0.0.0', '==', '1.0.0.1', false], + [3, '1.0.0.0.0', '==', '1.0.0.0.1', true], - array(3, '1', '==', '10', true), - array(3, '1.0', '==', '11', false), - array(3, '1.0.0', '==', '10.1', false), - array(3, '1.0.0.0', '==', '10.0.1', false), - array(3, '1.0.0.0.0', '==', '10.0.0.1', true), - ); + [3, '1', '==', '10', true], + [3, '1.0', '==', '11', false], + [3, '1.0.0', '==', '10.1', false], + [3, '1.0.0.0', '==', '10.0.1', false], + [3, '1.0.0.0.0', '==', '10.0.0.1', true], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Util/VersionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Util/VersionTest.php index b570b3ae..e3bb07ee 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Util/VersionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Util/VersionTest.php @@ -21,28 +21,28 @@ class VersionTest extends TestCase { public function normalizeProvider() { - return array( - array(null, '1', '1'), - array(null, '1.2', '1.2'), - array(null, '1.2.3', '1.2.3'), - array(null, '1.2.3.4', '1.2.3.4'), - array(1, '1', '1'), - array(1, '1.2', '1'), - array(1, '1.2.3', '1'), - array(1, '1.2.3.4', '1'), - array(2, '1', '1'), - array(2, '1.2', '1.2'), - array(2, '1.2.3', '1.2'), - array(2, '1.2.3.4', '1.2'), - array(3, '1', '1'), - array(3, '1.2', '1.2'), - array(3, '1.2.3', '1.2.3'), - array(3, '1.2.3.4', '1.2.3'), - array(4, '1', '1'), - array(4, '1.2', '1.2'), - array(4, '1.2.3', '1.2.3'), - array(4, '1.2.3.4', '1.2.3.4'), - ); + return [ + [null, '1', '1'], + [null, '1.2', '1.2'], + [null, '1.2.3', '1.2.3'], + [null, '1.2.3.4', '1.2.3.4'], + [1, '1', '1'], + [1, '1.2', '1'], + [1, '1.2.3', '1'], + [1, '1.2.3.4', '1'], + [2, '1', '1'], + [2, '1.2', '1.2'], + [2, '1.2.3', '1.2'], + [2, '1.2.3.4', '1.2'], + [3, '1', '1'], + [3, '1.2', '1.2'], + [3, '1.2.3', '1.2.3'], + [3, '1.2.3.4', '1.2.3'], + [4, '1', '1'], + [4, '1.2', '1.2'], + [4, '1.2.3', '1.2.3'], + [4, '1.2.3.4', '1.2.3.4'], + ]; } /** @@ -55,27 +55,27 @@ class VersionTest extends TestCase public function compareProvider() { - return array( - array(null, '1', '==', '1', true), - array(null, '1.0', '==', '1.1', false), - array(null, '1.0.0', '==', '1.0.1', false), - array(null, '1.0.0.0', '==', '1.0.0.1', false), + return [ + [null, '1', '==', '1', true], + [null, '1.0', '==', '1.1', false], + [null, '1.0.0', '==', '1.0.1', false], + [null, '1.0.0.0', '==', '1.0.0.1', false], - array(1, '1', '==', '1', true), - array(1, '1.0', '==', '1.1', true), - array(1, '1.0.0', '==', '1.0.1', true), - array(1, '1.0.0.0', '==', '1.0.0.1', true), + [1, '1', '==', '1', true], + [1, '1.0', '==', '1.1', true], + [1, '1.0.0', '==', '1.0.1', true], + [1, '1.0.0.0', '==', '1.0.0.1', true], - array(2, '1', '==', '1', true), - array(2, '1.0', '==', '1.1', false), - array(2, '1.0.0', '==', '1.0.1', true), - array(2, '1.0.0.0', '==', '1.0.0.1', true), + [2, '1', '==', '1', true], + [2, '1.0', '==', '1.1', false], + [2, '1.0.0', '==', '1.0.1', true], + [2, '1.0.0.0', '==', '1.0.0.1', true], - array(3, '1', '==', '1', true), - array(3, '1.0', '==', '1.1', false), - array(3, '1.0.0', '==', '1.0.1', false), - array(3, '1.0.0.0', '==', '1.0.0.1', true), - ); + [3, '1', '==', '1', true], + [3, '1.0', '==', '1.1', false], + [3, '1.0.0', '==', '1.0.1', false], + [3, '1.0.0.0', '==', '1.0.0.1', true], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AbstractConnection.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AbstractConnection.php index 67529b62..a43e2535 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AbstractConnection.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AbstractConnection.php @@ -21,7 +21,7 @@ abstract class AbstractConnection implements ConnectionInterface { protected $config; - public function __construct(array $config = array()) + public function __construct(array $config = []) { $resolver = new OptionsResolver(); @@ -37,13 +37,13 @@ abstract class AbstractConnection implements ConnectionInterface */ protected function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ 'host' => 'localhost', 'version' => 3, 'connection_string' => null, 'encryption' => 'none', - 'options' => array(), - )); + 'options' => [], + ]); $resolver->setDefault('port', function (Options $options) { return 'ssl' === $options['encryption'] ? 636 : 389; @@ -57,7 +57,7 @@ abstract class AbstractConnection implements ConnectionInterface $resolver->setAllowedTypes('port', 'numeric'); $resolver->setAllowedTypes('connection_string', 'string'); $resolver->setAllowedTypes('version', 'numeric'); - $resolver->setAllowedValues('encryption', array('none', 'ssl', 'tls')); + $resolver->setAllowedValues('encryption', ['none', 'ssl', 'tls']); $resolver->setAllowedTypes('options', 'array'); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AbstractQuery.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AbstractQuery.php index d2c39d73..e07431c9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AbstractQuery.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AbstractQuery.php @@ -24,10 +24,10 @@ abstract class AbstractQuery implements QueryInterface protected $query; protected $options; - public function __construct(ConnectionInterface $connection, $dn, $query, array $options = array()) + public function __construct(ConnectionInterface $connection, $dn, $query, array $options = []) { $resolver = new OptionsResolver(); - $resolver->setDefaults(array( + $resolver->setDefaults([ 'filter' => '*', 'maxItems' => 0, 'sizeLimit' => 0, @@ -35,12 +35,12 @@ abstract class AbstractQuery implements QueryInterface 'deref' => static::DEREF_NEVER, 'attrsOnly' => 0, 'scope' => static::SCOPE_SUB, - )); - $resolver->setAllowedValues('deref', array(static::DEREF_ALWAYS, static::DEREF_NEVER, static::DEREF_FINDING, static::DEREF_SEARCHING)); - $resolver->setAllowedValues('scope', array(static::SCOPE_BASE, static::SCOPE_ONE, static::SCOPE_SUB)); + ]); + $resolver->setAllowedValues('deref', [static::DEREF_ALWAYS, static::DEREF_NEVER, static::DEREF_FINDING, static::DEREF_SEARCHING]); + $resolver->setAllowedValues('scope', [static::SCOPE_BASE, static::SCOPE_ONE, static::SCOPE_SUB]); $resolver->setNormalizer('filter', function (Options $options, $value) { - return \is_array($value) ? $value : array($value); + return \is_array($value) ? $value : [$value]; }); $this->connection = $connection; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AdapterInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AdapterInterface.php index f01e3528..3c2fb4b9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AdapterInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AdapterInterface.php @@ -32,7 +32,7 @@ interface AdapterInterface * * @return QueryInterface */ - public function createQuery($dn, $query, array $options = array()); + public function createQuery($dn, $query, array $options = []); /** * Fetches the entry manager instance. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Adapter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Adapter.php index fbc41af3..0700f6ec 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Adapter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Adapter.php @@ -23,7 +23,7 @@ class Adapter implements AdapterInterface private $connection; private $entryManager; - public function __construct(array $config = array()) + public function __construct(array $config = []) { if (!\extension_loaded('ldap')) { throw new LdapException('The LDAP PHP extension is not enabled.'); @@ -59,7 +59,7 @@ class Adapter implements AdapterInterface /** * {@inheritdoc} */ - public function createQuery($dn, $query, array $options = array()) + public function createQuery($dn, $query, array $options = []) { return new Query($this->getConnection(), $dn, $query, $options); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php index 581cf153..fade4307 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php @@ -121,10 +121,10 @@ class Collection implements CollectionInterface private function cleanupAttributes(array $entry) { - $attributes = array_diff_key($entry, array_flip(range(0, $entry['count'] - 1)) + array( + $attributes = array_diff_key($entry, array_flip(range(0, $entry['count'] - 1)) + [ 'count' => null, 'dn' => null, - )); + ]); array_walk($attributes, function (&$value) { unset($value['count']); }); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php index 09cb42c7..33742039 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php @@ -27,7 +27,7 @@ class Query extends AbstractQuery /** @var resource */ private $search; - public function __construct(Connection $connection, $dn, $query, array $options = array()) + public function __construct(Connection $connection, $dn, $query, array $options = []) { parent::__construct($connection, $dn, $query, $options); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Entry.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Entry.php index 1d69b2be..f79c1bba 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Entry.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Entry.php @@ -19,7 +19,7 @@ class Entry private $dn; private $attributes; - public function __construct($dn, array $attributes = array()) + public function __construct($dn, array $attributes = []) { $this->dn = $dn; $this->attributes = $attributes; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Ldap.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Ldap.php index 514f51d2..dda47b53 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Ldap.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Ldap.php @@ -21,9 +21,9 @@ final class Ldap implements LdapInterface { private $adapter; - private static $adapterMap = array( + private static $adapterMap = [ 'ext_ldap' => 'Symfony\Component\Ldap\Adapter\ExtLdap\Adapter', - ); + ]; public function __construct(AdapterInterface $adapter) { @@ -41,7 +41,7 @@ final class Ldap implements LdapInterface /** * {@inheritdoc} */ - public function query($dn, $query, array $options = array()) + public function query($dn, $query, array $options = []) { return $this->adapter->createQuery($dn, $query, $options); } @@ -70,7 +70,7 @@ final class Ldap implements LdapInterface * * @return static */ - public static function create($adapter, array $config = array()) + public static function create($adapter, array $config = []) { if (!isset(self::$adapterMap[$adapter])) { throw new DriverNotFoundException(sprintf( diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapClient.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapClient.php index 2287d2dd..42175d85 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapClient.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapClient.php @@ -42,7 +42,7 @@ final class LdapClient implements LdapClientInterface /** * {@inheritdoc} */ - public function query($dn, $query, array $options = array()) + public function query($dn, $query, array $options = []) { return $this->ldap->query($dn, $query, $options); } @@ -62,19 +62,19 @@ final class LdapClient implements LdapClientInterface { @trigger_error('The "find" method is deprecated since Symfony 3.1 and will be removed in 4.0. Use the "query" method instead.', E_USER_DEPRECATED); - $query = $this->ldap->query($dn, $query, array('filter' => $filter)); + $query = $this->ldap->query($dn, $query, ['filter' => $filter]); $entries = $query->execute(); - $result = array( + $result = [ 'count' => 0, - ); + ]; foreach ($entries as $entry) { - $resultEntry = array(); + $resultEntry = []; foreach ($entry->getAttributes() as $attribute => $values) { - $resultAttribute = array( + $resultAttribute = [ 'count' => \count($values), - ); + ]; foreach ($values as $val) { $resultAttribute[] = $val; @@ -114,14 +114,14 @@ final class LdapClient implements LdapClientInterface $encryption = 'none'; } - return array( + return [ 'host' => $host, 'port' => $port, 'encryption' => $encryption, - 'options' => array( + 'options' => [ 'protocol_version' => $version, 'referrals' => (bool) $optReferrals, - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapInterface.php index 9f24276d..aa6b233f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapInterface.php @@ -44,7 +44,7 @@ interface LdapInterface * * @return QueryInterface */ - public function query($dn, $query, array $options = array()); + public function query($dn, $query, array $options = []); /** * @return EntryManagerInterface diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/AdapterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/AdapterTest.php index f2383618..18d1c02d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/AdapterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/AdapterTest.php @@ -38,7 +38,7 @@ class AdapterTest extends LdapTestCase $ldap = new Adapter($this->getLdapConfig()); $ldap->getConnection()->bind('cn=admin,dc=symfony,dc=com', 'symfony'); - $query = $ldap->createQuery('dc=symfony,dc=com', '(&(objectclass=person)(ou=Maintainers))', array()); + $query = $ldap->createQuery('dc=symfony,dc=com', '(&(objectclass=person)(ou=Maintainers))', []); $result = $query->execute(); $this->assertInstanceOf(Collection::class, $result); @@ -46,8 +46,8 @@ class AdapterTest extends LdapTestCase $entry = $result[0]; $this->assertInstanceOf(Entry::class, $entry); - $this->assertEquals(array('Fabien Potencier'), $entry->getAttribute('cn')); - $this->assertEquals(array('fabpot@symfony.com', 'fabien@potencier.com'), $entry->getAttribute('mail')); + $this->assertEquals(['Fabien Potencier'], $entry->getAttribute('cn')); + $this->assertEquals(['fabpot@symfony.com', 'fabien@potencier.com'], $entry->getAttribute('mail')); } /** @@ -58,14 +58,14 @@ class AdapterTest extends LdapTestCase $ldap = new Adapter($this->getLdapConfig()); $ldap->getConnection()->bind('cn=admin,dc=symfony,dc=com', 'symfony'); - $query = $ldap->createQuery('dc=symfony,dc=com', '(&(objectclass=person)(ou=Maintainers))', array()); + $query = $ldap->createQuery('dc=symfony,dc=com', '(&(objectclass=person)(ou=Maintainers))', []); $result = $query->execute(); $iterator = $result->getIterator(); $iterator->rewind(); $entry = $iterator->current(); $this->assertInstanceOf(Entry::class, $entry); - $this->assertEquals(array('Fabien Potencier'), $entry->getAttribute('cn')); - $this->assertEquals(array('fabpot@symfony.com', 'fabien@potencier.com'), $entry->getAttribute('mail')); + $this->assertEquals(['Fabien Potencier'], $entry->getAttribute('cn')); + $this->assertEquals(['fabpot@symfony.com', 'fabien@potencier.com'], $entry->getAttribute('mail')); } /** @@ -75,7 +75,7 @@ class AdapterTest extends LdapTestCase { $ldap = new Adapter($this->getLdapConfig()); $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(NotBoundException::class); - $query = $ldap->createQuery('dc=symfony,dc=com', '(&(objectclass=person)(ou=Maintainers))', array()); + $query = $ldap->createQuery('dc=symfony,dc=com', '(&(objectclass=person)(ou=Maintainers))', []); $query->execute(); } @@ -85,14 +85,14 @@ class AdapterTest extends LdapTestCase $ldap->getConnection()->bind('cn=admin,dc=symfony,dc=com', 'symfony'); - $query = $ldap->createQuery('cn=Fabien Potencier,dc=symfony,dc=com', '(objectclass=*)', array( + $query = $ldap->createQuery('cn=Fabien Potencier,dc=symfony,dc=com', '(objectclass=*)', [ 'scope' => Query::SCOPE_BASE, - )); + ]); $result = $query->execute(); $entry = $result[0]; $this->assertEquals($result->count(), 1); - $this->assertEquals(array('Fabien Potencier'), $entry->getAttribute('cn')); + $this->assertEquals(['Fabien Potencier'], $entry->getAttribute('cn')); } public function testLdapQueryScopeOneLevel() @@ -101,14 +101,14 @@ class AdapterTest extends LdapTestCase $ldap->getConnection()->bind('cn=admin,dc=symfony,dc=com', 'symfony'); - $one_level_result = $ldap->createQuery('ou=Components,dc=symfony,dc=com', '(objectclass=*)', array( + $one_level_result = $ldap->createQuery('ou=Components,dc=symfony,dc=com', '(objectclass=*)', [ 'scope' => Query::SCOPE_ONE, - ))->execute(); + ])->execute(); $subtree_count = $ldap->createQuery('ou=Components,dc=symfony,dc=com', '(objectclass=*)')->execute()->count(); $this->assertNotEquals($one_level_result->count(), $subtree_count); $this->assertEquals($one_level_result->count(), 1); - $this->assertEquals($one_level_result[0]->getAttribute('ou'), array('Ldap')); + $this->assertEquals($one_level_result[0]->getAttribute('ou'), ['Ldap']); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php index 855a5750..d9ff58fe 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php @@ -38,12 +38,12 @@ class LdapManagerTest extends LdapTestCase { $this->executeSearchQuery(1); - $entry = new Entry('cn=Charles Sarrazin,dc=symfony,dc=com', array( - 'sn' => array('csarrazi'), - 'objectclass' => array( + $entry = new Entry('cn=Charles Sarrazin,dc=symfony,dc=com', [ + 'sn' => ['csarrazi'], + 'objectclass' => [ 'inetOrgPerson', - ), - )); + ], + ]); $em = $this->adapter->getEntryManager(); $em->add($entry); @@ -63,11 +63,11 @@ class LdapManagerTest extends LdapTestCase $this->executeSearchQuery(1); // The entry is missing a subject name - $entry = new Entry('cn=Charles Sarrazin,dc=symfony,dc=com', array( - 'objectclass' => array( + $entry = new Entry('cn=Charles Sarrazin,dc=symfony,dc=com', [ + 'objectclass' => [ 'inetOrgPerson', - ), - )); + ], + ]); $em = $this->adapter->getEntryManager(); $em->add($entry); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapClientTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapClientTest.php index 34d727f8..63b3379d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapClientTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapClientTest.php @@ -59,9 +59,9 @@ class LdapClientTest extends LdapTestCase $this->ldap ->expects($this->once()) ->method('query') - ->with('foo', 'bar', array('baz')) + ->with('foo', 'bar', ['baz']) ; - $this->client->query('foo', 'bar', array('baz')); + $this->client->query('foo', 'bar', ['baz']); } public function testLdapFind() @@ -70,18 +70,18 @@ class LdapClientTest extends LdapTestCase $collection ->expects($this->once()) ->method('getIterator') - ->will($this->returnValue(new \ArrayIterator(array( - new Entry('cn=qux,dc=foo,dc=com', array( - 'cn' => array('qux'), - 'dc' => array('com', 'foo'), - 'givenName' => array('Qux'), - )), - new Entry('cn=baz,dc=foo,dc=com', array( - 'cn' => array('baz'), - 'dc' => array('com', 'foo'), - 'givenName' => array('Baz'), - )), - )))) + ->will($this->returnValue(new \ArrayIterator([ + new Entry('cn=qux,dc=foo,dc=com', [ + 'cn' => ['qux'], + 'dc' => ['com', 'foo'], + 'givenName' => ['Qux'], + ]), + new Entry('cn=baz,dc=foo,dc=com', [ + 'cn' => ['baz'], + 'dc' => ['com', 'foo'], + 'givenName' => ['Baz'], + ]), + ]))) ; $query = $this->getMockBuilder(QueryInterface::class)->getMock(); $query @@ -92,53 +92,53 @@ class LdapClientTest extends LdapTestCase $this->ldap ->expects($this->once()) ->method('query') - ->with('dc=foo,dc=com', 'bar', array('filter' => 'baz')) + ->with('dc=foo,dc=com', 'bar', ['filter' => 'baz']) ->willReturn($query) ; - $expected = array( + $expected = [ 'count' => 2, - 0 => array( + 0 => [ 'count' => 3, 0 => 'cn', - 'cn' => array( + 'cn' => [ 'count' => 1, 0 => 'qux', - ), + ], 1 => 'dc', - 'dc' => array( + 'dc' => [ 'count' => 2, 0 => 'com', 1 => 'foo', - ), + ], 2 => 'givenname', - 'givenname' => array( + 'givenname' => [ 'count' => 1, 0 => 'Qux', - ), + ], 'dn' => 'cn=qux,dc=foo,dc=com', - ), - 1 => array( + ], + 1 => [ 'count' => 3, 0 => 'cn', - 'cn' => array( + 'cn' => [ 'count' => 1, 0 => 'baz', - ), + ], 1 => 'dc', - 'dc' => array( + 'dc' => [ 'count' => 2, 0 => 'com', 1 => 'foo', - ), + ], 2 => 'givenname', - 'givenname' => array( + 'givenname' => [ 'count' => 1, 0 => 'Baz', - ), + ], 'dn' => 'cn=baz,dc=foo,dc=com', - ), - ); + ], + ]; $this->assertEquals($expected, $this->client->find('dc=foo,dc=com', 'bar', 'baz')); } @@ -151,7 +151,7 @@ class LdapClientTest extends LdapTestCase $reflMethod = $reflObj->getMethod('normalizeConfig'); $reflMethod->setAccessible(true); array_unshift($args, $this->client); - $this->assertEquals($expected, \call_user_func_array(array($reflMethod, 'invoke'), $args)); + $this->assertEquals($expected, \call_user_func_array([$reflMethod, 'invoke'], $args)); } /** @@ -167,7 +167,7 @@ class LdapClientTest extends LdapTestCase $con = @ldap_connect($config['host'], $config['port']); @ldap_bind($con, 'cn=admin,dc=symfony,dc=com', 'symfony'); - $search = @ldap_search($con, 'dc=symfony,dc=com', '(&(objectclass=person)(ou=Maintainers))', array('*')); + $search = @ldap_search($con, 'dc=symfony,dc=com', '(&(objectclass=person)(ou=Maintainers))', ['*']); $expected = @ldap_get_entries($con, $search); $this->assertSame($expected, $result); @@ -175,55 +175,55 @@ class LdapClientTest extends LdapTestCase public function provideConfig() { - return array( - array( - array('localhost', 389, 3, true, false, false), - array( + return [ + [ + ['localhost', 389, 3, true, false, false], + [ 'host' => 'localhost', 'port' => 389, 'encryption' => 'ssl', - 'options' => array( + 'options' => [ 'protocol_version' => 3, 'referrals' => false, - ), - ), - ), - array( - array('localhost', 389, 3, false, true, false), - array( + ], + ], + ], + [ + ['localhost', 389, 3, false, true, false], + [ 'host' => 'localhost', 'port' => 389, 'encryption' => 'tls', - 'options' => array( + 'options' => [ 'protocol_version' => 3, 'referrals' => false, - ), - ), - ), - array( - array('localhost', 389, 3, false, false, false), - array( + ], + ], + ], + [ + ['localhost', 389, 3, false, false, false], + [ 'host' => 'localhost', 'port' => 389, 'encryption' => 'none', - 'options' => array( + 'options' => [ 'protocol_version' => 3, 'referrals' => false, - ), - ), - ), - array( - array('localhost', 389, 3, false, false, false), - array( + ], + ], + ], + [ + ['localhost', 389, 3, false, false, false], + [ 'host' => 'localhost', 'port' => 389, 'encryption' => 'none', - 'options' => array( + 'options' => [ 'protocol_version' => 3, 'referrals' => false, - ), - ), - ), - ); + ], + ], + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapTest.php index 17184323..acc84522 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapTest.php @@ -62,9 +62,9 @@ class LdapTest extends TestCase $this->adapter ->expects($this->once()) ->method('createQuery') - ->with('foo', 'bar', array('baz')) + ->with('foo', 'bar', ['baz']) ; - $this->ldap->query('foo', 'bar', array('baz')); + $this->ldap->query('foo', 'bar', ['baz']); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapTestCase.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapTestCase.php index 33afd6d2..2e5fa9a3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapTestCase.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapTestCase.php @@ -8,9 +8,9 @@ class LdapTestCase extends TestCase { protected function getLdapConfig() { - return array( + return [ 'host' => getenv('LDAP_HOST'), 'port' => getenv('LDAP_PORT'), - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Key.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Key.php index 8be4f3a2..a7403301 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Key.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Key.php @@ -20,7 +20,7 @@ final class Key { private $resource; private $expiringTime; - private $state = array(); + private $state = []; /** * @param string $resource diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/LICENSE index fcd3fa76..3c464ca9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016-2018 Fabien Potencier +Copyright (c) 2016-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Lock.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Lock.php index 9cd15dd4..1a6c0e26 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Lock.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Lock.php @@ -76,7 +76,7 @@ final class Lock implements LockInterface, LoggerAwareInterface } $this->dirty = true; - $this->logger->info('Successfully acquired the "{resource}" lock.', array('resource' => $this->key)); + $this->logger->info('Successfully acquired the "{resource}" lock.', ['resource' => $this->key]); if ($this->ttl) { $this->refresh(); @@ -89,7 +89,7 @@ final class Lock implements LockInterface, LoggerAwareInterface return true; } catch (LockConflictedException $e) { $this->dirty = false; - $this->logger->notice('Failed to acquire the "{resource}" lock. Someone else already acquired the lock.', array('resource' => $this->key)); + $this->logger->notice('Failed to acquire the "{resource}" lock. Someone else already acquired the lock.', ['resource' => $this->key]); if ($blocking) { throw $e; @@ -97,7 +97,7 @@ final class Lock implements LockInterface, LoggerAwareInterface return false; } catch (\Exception $e) { - $this->logger->notice('Failed to acquire the "{resource}" lock.', array('resource' => $this->key, 'exception' => $e)); + $this->logger->notice('Failed to acquire the "{resource}" lock.', ['resource' => $this->key, 'exception' => $e]); throw new LockAcquiringException(sprintf('Failed to acquire the "%s" lock.', $this->key), 0, $e); } } @@ -120,13 +120,13 @@ final class Lock implements LockInterface, LoggerAwareInterface throw new LockExpiredException(sprintf('Failed to put off the expiration of the "%s" lock within the specified time.', $this->key)); } - $this->logger->info('Expiration defined for "{resource}" lock for "{ttl}" seconds.', array('resource' => $this->key, 'ttl' => $this->ttl)); + $this->logger->info('Expiration defined for "{resource}" lock for "{ttl}" seconds.', ['resource' => $this->key, 'ttl' => $this->ttl]); } catch (LockConflictedException $e) { $this->dirty = false; - $this->logger->notice('Failed to define an expiration for the "{resource}" lock, someone else acquired the lock.', array('resource' => $this->key)); + $this->logger->notice('Failed to define an expiration for the "{resource}" lock, someone else acquired the lock.', ['resource' => $this->key]); throw $e; } catch (\Exception $e) { - $this->logger->notice('Failed to define an expiration for the "{resource}" lock.', array('resource' => $this->key, 'exception' => $e)); + $this->logger->notice('Failed to define an expiration for the "{resource}" lock.', ['resource' => $this->key, 'exception' => $e]); throw new LockAcquiringException(sprintf('Failed to define an expiration for the "%s" lock.', $this->key), 0, $e); } } @@ -148,7 +148,7 @@ final class Lock implements LockInterface, LoggerAwareInterface $this->dirty = false; if ($this->store->exists($this->key)) { - $this->logger->notice('Failed to release the "{resource}" lock.', array('resource' => $this->key)); + $this->logger->notice('Failed to release the "{resource}" lock.', ['resource' => $this->key]); throw new LockReleasingException(sprintf('Failed to release the "%s" lock.', $this->key)); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Store/CombinedStore.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Store/CombinedStore.php index b0ca2c14..38f3f35e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Store/CombinedStore.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Store/CombinedStore.php @@ -69,7 +69,7 @@ class CombinedStore implements StoreInterface, LoggerAwareInterface $store->save($key); ++$successCount; } catch (\Exception $e) { - $this->logger->warning('One store failed to save the "{resource}" lock.', array('resource' => $key, 'store' => $store, 'exception' => $e)); + $this->logger->warning('One store failed to save the "{resource}" lock.', ['resource' => $key, 'store' => $store, 'exception' => $e]); ++$failureCount; } @@ -82,7 +82,7 @@ class CombinedStore implements StoreInterface, LoggerAwareInterface return; } - $this->logger->warning('Failed to store the "{resource}" lock. Quorum has not been met.', array('resource' => $key, 'success' => $successCount, 'failure' => $failureCount)); + $this->logger->warning('Failed to store the "{resource}" lock. Quorum has not been met.', ['resource' => $key, 'success' => $successCount, 'failure' => $failureCount]); // clean up potential locks $this->delete($key); @@ -108,7 +108,7 @@ class CombinedStore implements StoreInterface, LoggerAwareInterface foreach ($this->stores as $store) { try { if (0.0 >= $adjustedTtl = $expireAt - microtime(true)) { - $this->logger->warning('Stores took to long to put off the expiration of the "{resource}" lock.', array('resource' => $key, 'store' => $store, 'ttl' => $ttl)); + $this->logger->warning('Stores took to long to put off the expiration of the "{resource}" lock.', ['resource' => $key, 'store' => $store, 'ttl' => $ttl]); $key->reduceLifetime(0); break; } @@ -116,7 +116,7 @@ class CombinedStore implements StoreInterface, LoggerAwareInterface $store->putOffExpiration($key, $adjustedTtl); ++$successCount; } catch (\Exception $e) { - $this->logger->warning('One store failed to put off the expiration of the "{resource}" lock.', array('resource' => $key, 'store' => $store, 'exception' => $e)); + $this->logger->warning('One store failed to put off the expiration of the "{resource}" lock.', ['resource' => $key, 'store' => $store, 'exception' => $e]); ++$failureCount; } @@ -133,7 +133,7 @@ class CombinedStore implements StoreInterface, LoggerAwareInterface return; } - $this->logger->warning('Failed to define the expiration for the "{resource}" lock. Quorum has not been met.', array('resource' => $key, 'success' => $successCount, 'failure' => $failureCount)); + $this->logger->warning('Failed to define the expiration for the "{resource}" lock. Quorum has not been met.', ['resource' => $key, 'success' => $successCount, 'failure' => $failureCount]); // clean up potential locks $this->delete($key); @@ -150,7 +150,7 @@ class CombinedStore implements StoreInterface, LoggerAwareInterface try { $store->delete($key); } catch (\Exception $e) { - $this->logger->notice('One store failed to delete the "{resource}" lock.', array('resource' => $key, 'store' => $store, 'exception' => $e)); + $this->logger->notice('One store failed to delete the "{resource}" lock.', ['resource' => $key, 'store' => $store, 'exception' => $e]); } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Store/MemcachedStore.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Store/MemcachedStore.php index 455dfebc..9b795504 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Store/MemcachedStore.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Store/MemcachedStore.php @@ -173,15 +173,15 @@ class MemcachedStore implements StoreInterface if ($this->useExtendedReturn) { $extendedReturn = $this->memcached->get((string) $key, null, \Memcached::GET_EXTENDED); if (\Memcached::GET_ERROR_RETURN_VALUE === $extendedReturn) { - return array($extendedReturn, 0.0); + return [$extendedReturn, 0.0]; } - return array($extendedReturn['value'], $extendedReturn['cas']); + return [$extendedReturn['value'], $extendedReturn['cas']]; } $cas = 0.0; $value = $this->memcached->get((string) $key, null, $cas); - return array($value, $cas); + return [$value, $cas]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Store/RedisStore.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Store/RedisStore.php index e3b15005..2d7ba453 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Store/RedisStore.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Store/RedisStore.php @@ -62,7 +62,7 @@ class RedisStore implements StoreInterface '; $key->reduceLifetime($this->initialTtl); - if (!$this->evaluate($script, (string) $key, array($this->getToken($key), (int) ceil($this->initialTtl * 1000)))) { + if (!$this->evaluate($script, (string) $key, [$this->getToken($key), (int) ceil($this->initialTtl * 1000)])) { throw new LockConflictedException(); } @@ -90,7 +90,7 @@ class RedisStore implements StoreInterface '; $key->reduceLifetime($ttl); - if (!$this->evaluate($script, (string) $key, array($this->getToken($key), (int) ceil($ttl * 1000)))) { + if (!$this->evaluate($script, (string) $key, [$this->getToken($key), (int) ceil($ttl * 1000)])) { throw new LockConflictedException(); } @@ -112,7 +112,7 @@ class RedisStore implements StoreInterface end '; - $this->evaluate($script, (string) $key, array($this->getToken($key))); + $this->evaluate($script, (string) $key, [$this->getToken($key)]); } /** @@ -135,15 +135,15 @@ class RedisStore implements StoreInterface private function evaluate($script, $resource, array $args) { if ($this->redis instanceof \Redis || $this->redis instanceof \RedisCluster || $this->redis instanceof RedisProxy) { - return $this->redis->eval($script, array_merge(array($resource), $args), 1); + return $this->redis->eval($script, array_merge([$resource], $args), 1); } if ($this->redis instanceof \RedisArray) { - return $this->redis->_instance($this->redis->_target($resource))->eval($script, array_merge(array($resource), $args), 1); + return $this->redis->_instance($this->redis->_target($resource))->eval($script, array_merge([$resource], $args), 1); } if ($this->redis instanceof \Predis\Client) { - return \call_user_func_array(array($this->redis, 'eval'), array_merge(array($script, 1, $resource), $args)); + return \call_user_func_array([$this->redis, 'eval'], array_merge([$script, 1, $resource], $args)); } throw new InvalidArgumentException(sprintf('%s() expects being initialized with a Redis, RedisArray, RedisCluster or Predis\Client, %s given', __METHOD__, \is_object($this->redis) ? \get_class($this->redis) : \gettype($this->redis))); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Store/RetryTillSaveStore.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Store/RetryTillSaveStore.php index dfc3b266..1ee988ea 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Store/RetryTillSaveStore.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Store/RetryTillSaveStore.php @@ -71,7 +71,7 @@ class RetryTillSaveStore implements StoreInterface, LoggerAwareInterface } } while (++$retry < $this->retryCount); - $this->logger->warning('Failed to store the "{resource}" lock. Abort after {retry} retry.', array('resource' => $key, 'retry' => $retry)); + $this->logger->warning('Failed to store the "{resource}" lock. Abort after {retry} retry.', ['resource' => $key, 'retry' => $retry]); throw new LockConflictedException(); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/StoreInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/StoreInterface.php index 985c4476..a45c93ae 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/StoreInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/StoreInterface.php @@ -43,7 +43,7 @@ interface StoreInterface * * If the store does not support this feature it should throw a NotSupportedException. * - * @param float $ttl amount of second to keep the lock in the store + * @param float $ttl amount of seconds to keep the lock in the store * * @throws LockConflictedException * @throws NotSupportedException diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/LockTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/LockTest.php index 7913644b..f461311d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/LockTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/LockTest.php @@ -140,7 +140,7 @@ class LockTest extends TestCase $store ->method('exists') - ->willReturnOnConsecutiveCalls(array(true, false)) + ->willReturnOnConsecutiveCalls([true, false]) ; $store ->expects($this->once()) @@ -159,7 +159,7 @@ class LockTest extends TestCase $store ->method('exists') - ->willReturnOnConsecutiveCalls(array(true, false)) + ->willReturnOnConsecutiveCalls([true, false]) ; $store ->expects($this->never()) @@ -206,7 +206,7 @@ class LockTest extends TestCase $logger->expects($this->atLeastOnce()) ->method('notice') - ->with('Failed to release the "{resource}" lock.', array('resource' => $key)); + ->with('Failed to release the "{resource}" lock.', ['resource' => $key]); $store ->expects($this->once()) @@ -243,12 +243,12 @@ class LockTest extends TestCase public function provideExpiredDates() { - yield array(array(-0.1), true); - yield array(array(0.1, -0.1), true); - yield array(array(-0.1, 0.1), true); + yield [[-0.1], true]; + yield [[0.1, -0.1], true]; + yield [[-0.1, 0.1], true]; - yield array(array(), false); - yield array(array(0.1), false); - yield array(array(-0.1, null), false); + yield [[], false]; + yield [[0.1], false]; + yield [[-0.1, null], false]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php index c04c01d6..3fafcb98 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php @@ -36,7 +36,7 @@ trait BlockingStoreTestTrait */ public function testBlockingLocks() { - // Amount a microsecond used to order async actions + // Amount of microseconds we should wait without slowing things down too much $clockDelay = 50000; if (\PHP_VERSION_ID < 50600 || \defined('HHVM_VERSION_ID')) { @@ -51,11 +51,11 @@ trait BlockingStoreTestTrait $parentPID = posix_getpid(); // Block SIGHUP signal - pcntl_sigprocmask(SIG_BLOCK, array(SIGHUP)); + pcntl_sigprocmask(SIG_BLOCK, [SIGHUP]); if ($childPID = pcntl_fork()) { // Wait the start of the child - pcntl_sigwaitinfo(array(SIGHUP), $info); + pcntl_sigwaitinfo([SIGHUP], $info); try { // This call should failed given the lock should already by acquired by the child @@ -77,14 +77,14 @@ trait BlockingStoreTestTrait $this->assertSame(0, pcntl_wexitstatus($status1), 'The child process couldn\'t lock the resource'); } else { // Block SIGHUP signal - pcntl_sigprocmask(SIG_BLOCK, array(SIGHUP)); + pcntl_sigprocmask(SIG_BLOCK, [SIGHUP]); try { $store->save($key); // send the ready signal to the parent posix_kill($parentPID, SIGHUP); // Wait for the parent to be ready - pcntl_sigwaitinfo(array(SIGHUP), $info); + pcntl_sigwaitinfo([SIGHUP], $info); // Wait ClockDelay to let parent assert to finish usleep($clockDelay); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php index f2c55b05..bcfc40b1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php @@ -46,7 +46,7 @@ class CombinedStoreTest extends AbstractStoreTest self::markTestSkipped($e->getMessage()); } - return new CombinedStore(array(new RedisStore($redis)), new UnanimousStrategy()); + return new CombinedStore([new RedisStore($redis)], new UnanimousStrategy()); } /** @var \PHPUnit_Framework_MockObject_MockObject */ @@ -64,7 +64,7 @@ class CombinedStoreTest extends AbstractStoreTest $this->store1 = $this->getMockBuilder(StoreInterface::class)->getMock(); $this->store2 = $this->getMockBuilder(StoreInterface::class)->getMock(); - $this->store = new CombinedStore(array($this->store1, $this->store2), $this->strategy); + $this->store = new CombinedStore([$this->store1, $this->store2], $this->strategy); } /** @@ -269,7 +269,7 @@ class CombinedStoreTest extends AbstractStoreTest $store1 = $this->getMockBuilder(StoreInterface::class)->getMock(); $store2 = $this->getMockBuilder(StoreInterface::class)->getMock(); - $store = new CombinedStore(array($store1, $store2), $this->strategy); + $store = new CombinedStore([$store1, $store2], $this->strategy); $key = new Key(uniqid(__METHOD__, true)); $ttl = random_int(1, 10); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Store/ExpiringStoreTestTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Store/ExpiringStoreTestTrait.php index 10b13273..f523780c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Store/ExpiringStoreTestTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Store/ExpiringStoreTestTrait.php @@ -20,7 +20,9 @@ use Symfony\Component\Lock\StoreInterface; trait ExpiringStoreTestTrait { /** - * Amount a microsecond used to order async actions. + * Amount of microseconds used as a delay to test expiration. Should be + * small enough not to slow the test suite too much, and high enough not to + * fail because of race conditions. * * @return int */ @@ -34,7 +36,7 @@ trait ExpiringStoreTestTrait /** * Tests the store automatically delete the key when it expire. * - * This test is time sensible: the $clockDelay could be adjust. + * This test is time-sensitive: the $clockDelay could be adjusted. */ public function testExpiration() { @@ -45,10 +47,10 @@ trait ExpiringStoreTestTrait $store = $this->getStore(); $store->save($key); - $store->putOffExpiration($key, $clockDelay / 1000000); + $store->putOffExpiration($key, 2 * $clockDelay / 1000000); $this->assertTrue($store->exists($key)); - usleep(2 * $clockDelay); + usleep(3 * $clockDelay); $this->assertFalse($store->exists($key)); } @@ -71,24 +73,23 @@ trait ExpiringStoreTestTrait /** * Tests the refresh can push the limits to the expiration. * - * This test is time sensible: the $clockDelay could be adjust. + * This test is time-sensitive: the $clockDelay could be adjusted. */ public function testRefreshLock() { - // Amount a microsecond used to order async actions + // Amount of microseconds we should wait without slowing things down too much $clockDelay = $this->getClockDelay(); - // Amount a microsecond used to order async actions $key = new Key(uniqid(__METHOD__, true)); /** @var StoreInterface $store */ $store = $this->getStore(); $store->save($key); - $store->putOffExpiration($key, $clockDelay / 1000000); + $store->putOffExpiration($key, 2 * $clockDelay / 1000000); $this->assertTrue($store->exists($key)); - usleep(2 * $clockDelay); + usleep(3 * $clockDelay); $this->assertFalse($store->exists($key)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Store/RedisArrayStoreTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Store/RedisArrayStoreTest.php index 180da461..7d915615 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Store/RedisArrayStoreTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Store/RedisArrayStoreTest.php @@ -31,7 +31,7 @@ class RedisArrayStoreTest extends AbstractRedisStoreTest protected function getRedisConnection() { - $redis = new \RedisArray(array(getenv('REDIS_HOST'))); + $redis = new \RedisArray([getenv('REDIS_HOST')]); return $redis; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Strategy/ConsensusStrategyTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Strategy/ConsensusStrategyTest.php index b8c09dfb..8034cfe7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Strategy/ConsensusStrategyTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Strategy/ConsensusStrategyTest.php @@ -30,45 +30,45 @@ class ConsensusStrategyTest extends TestCase public function provideMetResults() { // success, failure, total, isMet - yield array(3, 0, 3, true); - yield array(2, 1, 3, true); - yield array(2, 0, 3, true); - yield array(1, 2, 3, false); - yield array(1, 1, 3, false); - yield array(1, 0, 3, false); - yield array(0, 3, 3, false); - yield array(0, 2, 3, false); - yield array(0, 1, 3, false); - yield array(0, 0, 3, false); + yield [3, 0, 3, true]; + yield [2, 1, 3, true]; + yield [2, 0, 3, true]; + yield [1, 2, 3, false]; + yield [1, 1, 3, false]; + yield [1, 0, 3, false]; + yield [0, 3, 3, false]; + yield [0, 2, 3, false]; + yield [0, 1, 3, false]; + yield [0, 0, 3, false]; - yield array(2, 0, 2, true); - yield array(1, 1, 2, false); - yield array(1, 0, 2, false); - yield array(0, 2, 2, false); - yield array(0, 1, 2, false); - yield array(0, 0, 2, false); + yield [2, 0, 2, true]; + yield [1, 1, 2, false]; + yield [1, 0, 2, false]; + yield [0, 2, 2, false]; + yield [0, 1, 2, false]; + yield [0, 0, 2, false]; } public function provideIndeterminate() { // success, failure, total, canBeMet - yield array(3, 0, 3, true); - yield array(2, 1, 3, true); - yield array(2, 0, 3, true); - yield array(1, 2, 3, false); - yield array(1, 1, 3, true); - yield array(1, 0, 3, true); - yield array(0, 3, 3, false); - yield array(0, 2, 3, false); - yield array(0, 1, 3, true); - yield array(0, 0, 3, true); + yield [3, 0, 3, true]; + yield [2, 1, 3, true]; + yield [2, 0, 3, true]; + yield [1, 2, 3, false]; + yield [1, 1, 3, true]; + yield [1, 0, 3, true]; + yield [0, 3, 3, false]; + yield [0, 2, 3, false]; + yield [0, 1, 3, true]; + yield [0, 0, 3, true]; - yield array(2, 0, 2, true); - yield array(1, 1, 2, false); - yield array(1, 0, 2, true); - yield array(0, 2, 2, false); - yield array(0, 1, 2, false); - yield array(0, 0, 2, true); + yield [2, 0, 2, true]; + yield [1, 1, 2, false]; + yield [1, 0, 2, true]; + yield [0, 2, 2, false]; + yield [0, 1, 2, false]; + yield [0, 0, 2, true]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Strategy/UnanimousStrategyTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Strategy/UnanimousStrategyTest.php index 4e63e6b4..a07b42dd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Strategy/UnanimousStrategyTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Lock/Tests/Strategy/UnanimousStrategyTest.php @@ -30,45 +30,45 @@ class UnanimousStrategyTest extends TestCase public function provideMetResults() { // success, failure, total, isMet - yield array(3, 0, 3, true); - yield array(2, 1, 3, false); - yield array(2, 0, 3, false); - yield array(1, 2, 3, false); - yield array(1, 1, 3, false); - yield array(1, 0, 3, false); - yield array(0, 3, 3, false); - yield array(0, 2, 3, false); - yield array(0, 1, 3, false); - yield array(0, 0, 3, false); + yield [3, 0, 3, true]; + yield [2, 1, 3, false]; + yield [2, 0, 3, false]; + yield [1, 2, 3, false]; + yield [1, 1, 3, false]; + yield [1, 0, 3, false]; + yield [0, 3, 3, false]; + yield [0, 2, 3, false]; + yield [0, 1, 3, false]; + yield [0, 0, 3, false]; - yield array(2, 0, 2, true); - yield array(1, 1, 2, false); - yield array(1, 0, 2, false); - yield array(0, 2, 2, false); - yield array(0, 1, 2, false); - yield array(0, 0, 2, false); + yield [2, 0, 2, true]; + yield [1, 1, 2, false]; + yield [1, 0, 2, false]; + yield [0, 2, 2, false]; + yield [0, 1, 2, false]; + yield [0, 0, 2, false]; } public function provideIndeterminate() { // success, failure, total, canBeMet - yield array(3, 0, 3, true); - yield array(2, 1, 3, false); - yield array(2, 0, 3, true); - yield array(1, 2, 3, false); - yield array(1, 1, 3, false); - yield array(1, 0, 3, true); - yield array(0, 3, 3, false); - yield array(0, 2, 3, false); - yield array(0, 1, 3, false); - yield array(0, 0, 3, true); + yield [3, 0, 3, true]; + yield [2, 1, 3, false]; + yield [2, 0, 3, true]; + yield [1, 2, 3, false]; + yield [1, 1, 3, false]; + yield [1, 0, 3, true]; + yield [0, 3, 3, false]; + yield [0, 2, 3, false]; + yield [0, 1, 3, false]; + yield [0, 0, 3, true]; - yield array(2, 0, 2, true); - yield array(1, 1, 2, false); - yield array(1, 0, 2, true); - yield array(0, 2, 2, false); - yield array(0, 1, 2, false); - yield array(0, 0, 2, true); + yield [2, 0, 2, true]; + yield [1, 1, 2, false]; + yield [1, 0, 2, true]; + yield [0, 2, 2, false]; + yield [0, 1, 2, false]; + yield [0, 0, 2, true]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Debug/OptionsResolverIntrospector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Debug/OptionsResolverIntrospector.php index 146c18bf..bacb70b0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Debug/OptionsResolverIntrospector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Debug/OptionsResolverIntrospector.php @@ -32,7 +32,7 @@ class OptionsResolverIntrospector throw new UndefinedOptionsException(sprintf('The option "%s" does not exist.', $option)); } - if (!array_key_exists($option, $this->{$property})) { + if (!\array_key_exists($option, $this->{$property})) { throw new NoConfigurationException($message); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/OptionsResolver.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/OptionsResolver.php index 83d81969..8ed03c2a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/OptionsResolver.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/OptionsResolver.php @@ -29,51 +29,51 @@ class OptionsResolver implements Options /** * The names of all defined options. */ - private $defined = array(); + private $defined = []; /** * The default option values. */ - private $defaults = array(); + private $defaults = []; /** * The names of required options. */ - private $required = array(); + private $required = []; /** * The resolved option values. */ - private $resolved = array(); + private $resolved = []; /** * A list of normalizer closures. * * @var \Closure[] */ - private $normalizers = array(); + private $normalizers = []; /** * A list of accepted values for each option. */ - private $allowedValues = array(); + private $allowedValues = []; /** * A list of accepted types for each option. */ - private $allowedTypes = array(); + private $allowedTypes = []; /** * A list of closures for evaluating lazy options. */ - private $lazy = array(); + private $lazy = []; /** * A list of lazy options whose closure is currently being called. * * This list helps detecting circular dependencies between lazy options. */ - private $calling = array(); + private $calling = []; /** * Whether the instance is locked for reading. @@ -85,11 +85,11 @@ class OptionsResolver implements Options */ private $locked = false; - private static $typeAliases = array( + private static $typeAliases = [ 'boolean' => 'bool', 'integer' => 'int', 'double' => 'float', - ); + ]; /** * Sets the default value of a given option. @@ -154,7 +154,7 @@ class OptionsResolver implements Options // Ignore previous lazy options if the closure has no second parameter if (!isset($this->lazy[$option]) || !isset($params[1])) { - $this->lazy[$option] = array(); + $this->lazy[$option] = []; } // Store closure for later evaluation @@ -175,7 +175,7 @@ class OptionsResolver implements Options // to resolve options with lazy closures, normalizers or validation // rules, none of which can exist for undefined options // If the option was resolved before, update the resolved value - if (!isset($this->defined[$option]) || array_key_exists($option, $this->resolved)) { + if (!isset($this->defined[$option]) || \array_key_exists($option, $this->resolved)) { $this->resolved[$option] = $value; } @@ -215,7 +215,7 @@ class OptionsResolver implements Options */ public function hasDefault($option) { - return array_key_exists($option, $this->defaults); + return \array_key_exists($option, $this->defaults); } /** @@ -280,7 +280,7 @@ class OptionsResolver implements Options */ public function isMissing($option) { - return isset($this->required[$option]) && !array_key_exists($option, $this->defaults); + return isset($this->required[$option]) && !\array_key_exists($option, $this->defaults); } /** @@ -423,7 +423,7 @@ class OptionsResolver implements Options throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $option, implode('", "', array_keys($this->defined)))); } - $this->allowedValues[$option] = \is_array($allowedValues) ? $allowedValues : array($allowedValues); + $this->allowedValues[$option] = \is_array($allowedValues) ? $allowedValues : [$allowedValues]; // Make sure the option is processed unset($this->resolved[$option]); @@ -465,7 +465,7 @@ class OptionsResolver implements Options } if (!\is_array($allowedValues)) { - $allowedValues = array($allowedValues); + $allowedValues = [$allowedValues]; } if (!isset($this->allowedValues[$option])) { @@ -590,14 +590,14 @@ class OptionsResolver implements Options throw new AccessException('Options cannot be cleared from a lazy option or normalizer.'); } - $this->defined = array(); - $this->defaults = array(); - $this->required = array(); - $this->resolved = array(); - $this->lazy = array(); - $this->normalizers = array(); - $this->allowedTypes = array(); - $this->allowedValues = array(); + $this->defined = []; + $this->defaults = []; + $this->required = []; + $this->resolved = []; + $this->lazy = []; + $this->normalizers = []; + $this->allowedTypes = []; + $this->allowedValues = []; return $this; } @@ -626,7 +626,7 @@ class OptionsResolver implements Options * @throws NoSuchOptionException If a lazy option reads an unavailable option * @throws AccessException If called from a lazy option or normalizer */ - public function resolve(array $options = array()) + public function resolve(array $options = []) { if ($this->locked) { throw new AccessException('Options cannot be resolved from a lazy option or normalizer.'); @@ -694,12 +694,12 @@ class OptionsResolver implements Options } // Shortcut for resolved options - if (array_key_exists($option, $this->resolved)) { + if (\array_key_exists($option, $this->resolved)) { return $this->resolved[$option]; } // Check whether the option is set at all - if (!array_key_exists($option, $this->defaults)) { + if (!\array_key_exists($option, $this->defaults)) { if (!isset($this->defined[$option])) { throw new NoSuchOptionException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $option, implode('", "', array_keys($this->defined)))); } @@ -735,7 +735,7 @@ class OptionsResolver implements Options // Validate the type of the resolved option if (isset($this->allowedTypes[$option])) { $valid = false; - $invalidTypes = array(); + $invalidTypes = []; foreach ($this->allowedTypes[$option] as $type) { $type = isset(self::$typeAliases[$type]) ? self::$typeAliases[$type] : $type; @@ -759,7 +759,7 @@ class OptionsResolver implements Options // Validate the value of the resolved option if (isset($this->allowedValues[$option])) { $success = false; - $printableAllowedValues = array(); + $printableAllowedValues = []; foreach ($this->allowedValues[$option] as $allowedValue) { if ($allowedValue instanceof \Closure) { @@ -908,7 +908,7 @@ class OptionsResolver implements Options throw new AccessException('Array access is only supported within closures of lazy options and normalizers.'); } - return array_key_exists($option, $this->defaults); + return \array_key_exists($option, $this->defaults); } /** @@ -981,7 +981,7 @@ class OptionsResolver implements Options } if (\is_array($value)) { - $subTypes = array(); + $subTypes = []; foreach ($value as $val) { $subTypes[$this->formatTypeOf($val, null)] = true; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Tests/Debug/OptionsResolverIntrospectorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Tests/Debug/OptionsResolverIntrospectorTest.php index 7c4753ab..8dd7997d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Tests/Debug/OptionsResolverIntrospectorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Tests/Debug/OptionsResolverIntrospectorTest.php @@ -64,7 +64,7 @@ class OptionsResolverIntrospectorTest extends TestCase public function testGetLazyClosures() { $resolver = new OptionsResolver(); - $closures = array(); + $closures = []; $resolver->setDefault($option = 'foo', $closures[] = function (Options $options) {}); $debug = new OptionsResolverIntrospector($resolver); @@ -100,7 +100,7 @@ class OptionsResolverIntrospectorTest extends TestCase { $resolver = new OptionsResolver(); $resolver->setDefined($option = 'foo'); - $resolver->setAllowedTypes($option = 'foo', $allowedTypes = array('string', 'bool')); + $resolver->setAllowedTypes($option = 'foo', $allowedTypes = ['string', 'bool']); $debug = new OptionsResolverIntrospector($resolver); $this->assertSame($allowedTypes, $debug->getAllowedTypes($option)); @@ -135,7 +135,7 @@ class OptionsResolverIntrospectorTest extends TestCase { $resolver = new OptionsResolver(); $resolver->setDefined($option = 'foo'); - $resolver->setAllowedValues($option = 'foo', $allowedValues = array('bar', 'baz')); + $resolver->setAllowedValues($option = 'foo', $allowedValues = ['bar', 'baz']); $debug = new OptionsResolverIntrospector($resolver); $this->assertSame($allowedValues, $debug->getAllowedValues($option)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php index 449a53f6..abf0aa01 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php @@ -38,7 +38,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefault('z', '1'); $this->resolver->setDefault('a', '2'); - $this->resolver->resolve(array('foo' => 'bar')); + $this->resolver->resolve(['foo' => 'bar']); } /** @@ -50,7 +50,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefault('z', '1'); $this->resolver->setDefault('a', '2'); - $this->resolver->resolve(array('ping' => 'pong', 'foo' => 'bar', 'baz' => 'bam')); + $this->resolver->resolve(['ping' => 'pong', 'foo' => 'bar', 'baz' => 'bam']); } /** @@ -59,7 +59,7 @@ class OptionsResolverTest extends TestCase public function testResolveFailsFromLazyOption() { $this->resolver->setDefault('foo', function (Options $options) { - $options->resolve(array()); + $options->resolve([]); }); $this->resolver->resolve(); @@ -75,10 +75,10 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefault('one', '1'); $this->resolver->setDefault('two', '20'); - $this->assertEquals(array( + $this->assertEquals([ 'one' => '1', 'two' => '20', - ), $this->resolver->resolve()); + ], $this->resolver->resolve()); } /** @@ -118,7 +118,7 @@ class OptionsResolverTest extends TestCase return 'lazy'; }); - $this->assertEquals(array('foo' => 'lazy'), $this->resolver->resolve()); + $this->assertEquals(['foo' => 'lazy'], $this->resolver->resolve()); } public function testClosureWithoutTypeHintNotInvoked() @@ -129,7 +129,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefault('foo', $closure); - $this->assertSame(array('foo' => $closure), $this->resolver->resolve()); + $this->assertSame(['foo' => $closure], $this->resolver->resolve()); } public function testClosureWithoutParametersNotInvoked() @@ -140,7 +140,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefault('foo', $closure); - $this->assertSame(array('foo' => $closure), $this->resolver->resolve()); + $this->assertSame(['foo' => $closure], $this->resolver->resolve()); } public function testAccessPreviousDefaultValue() @@ -155,7 +155,7 @@ class OptionsResolverTest extends TestCase return 'lazy'; }); - $this->assertEquals(array('foo' => 'lazy'), $this->resolver->resolve()); + $this->assertEquals(['foo' => 'lazy'], $this->resolver->resolve()); } public function testAccessPreviousLazyDefaultValue() @@ -172,7 +172,7 @@ class OptionsResolverTest extends TestCase return 'lazy'; }); - $this->assertEquals(array('foo' => 'lazy'), $this->resolver->resolve()); + $this->assertEquals(['foo' => 'lazy'], $this->resolver->resolve()); } public function testPreviousValueIsNotEvaluatedIfNoSecondArgument() @@ -187,7 +187,7 @@ class OptionsResolverTest extends TestCase return 'lazy'; }); - $this->assertEquals(array('foo' => 'lazy'), $this->resolver->resolve()); + $this->assertEquals(['foo' => 'lazy'], $this->resolver->resolve()); } public function testOverwrittenLazyOptionNotEvaluated() @@ -198,7 +198,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefault('foo', 'bar'); - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertSame(['foo' => 'bar'], $this->resolver->resolve()); } public function testInvokeEachLazyOptionOnlyOnce() @@ -259,7 +259,7 @@ class OptionsResolverTest extends TestCase { $this->resolver->setRequired('foo'); - $this->assertNotEmpty($this->resolver->resolve(array('foo' => 'bar'))); + $this->assertNotEmpty($this->resolver->resolve(['foo' => 'bar'])); } public function testIsRequired() @@ -307,11 +307,11 @@ class OptionsResolverTest extends TestCase public function testGetRequiredOptions() { - $this->resolver->setRequired(array('foo', 'bar')); + $this->resolver->setRequired(['foo', 'bar']); $this->resolver->setDefault('bam', 'baz'); $this->resolver->setDefault('foo', 'boo'); - $this->assertSame(array('foo', 'bar'), $this->resolver->getRequiredOptions()); + $this->assertSame(['foo', 'bar'], $this->resolver->getRequiredOptions()); } public function testIsMissingIfNotSet() @@ -346,11 +346,11 @@ class OptionsResolverTest extends TestCase public function testGetMissingOptions() { - $this->resolver->setRequired(array('foo', 'bar')); + $this->resolver->setRequired(['foo', 'bar']); $this->resolver->setDefault('bam', 'baz'); $this->resolver->setDefault('foo', 'boo'); - $this->assertSame(array('bar'), $this->resolver->getMissingOptions()); + $this->assertSame(['bar'], $this->resolver->getMissingOptions()); } /** @@ -369,7 +369,7 @@ class OptionsResolverTest extends TestCase { $this->resolver->setDefined('foo'); - $this->assertSame(array(), $this->resolver->resolve()); + $this->assertSame([], $this->resolver->resolve()); } public function testDefinedOptionsIncludedIfDefaultSetBefore() @@ -377,7 +377,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefault('foo', 'bar'); $this->resolver->setDefined('foo'); - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertSame(['foo' => 'bar'], $this->resolver->resolve()); } public function testDefinedOptionsIncludedIfDefaultSetAfter() @@ -385,14 +385,14 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefined('foo'); $this->resolver->setDefault('foo', 'bar'); - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertSame(['foo' => 'bar'], $this->resolver->resolve()); } public function testDefinedOptionsIncludedIfPassedToResolve() { $this->resolver->setDefined('foo'); - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve(array('foo' => 'bar'))); + $this->assertSame(['foo' => 'bar'], $this->resolver->resolve(['foo' => 'bar'])); } public function testIsDefined() @@ -425,11 +425,11 @@ class OptionsResolverTest extends TestCase public function testGetDefinedOptions() { - $this->resolver->setDefined(array('foo', 'bar')); + $this->resolver->setDefined(['foo', 'bar']); $this->resolver->setDefault('baz', 'bam'); $this->resolver->setRequired('boo'); - $this->assertSame(array('foo', 'bar', 'baz', 'boo'), $this->resolver->getDefinedOptions()); + $this->assertSame(['foo', 'bar', 'baz', 'boo'], $this->resolver->getDefinedOptions()); } public function testRemovedOptionsAreNotDefined() @@ -462,9 +462,9 @@ class OptionsResolverTest extends TestCase { $this->resolver->setDefined('foo'); $this->resolver->setAllowedTypes('foo', 'string[]'); - $options = $this->resolver->resolve(array('foo' => array('bar', 'baz'))); + $options = $this->resolver->resolve(['foo' => ['bar', 'baz']]); - $this->assertSame(array('foo' => array('bar', 'baz')), $options); + $this->assertSame(['foo' => ['bar', 'baz']], $options); } /** @@ -490,7 +490,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefined('foo'); $this->resolver->setAllowedTypes('foo', 'int[]'); - $this->resolver->resolve(array('foo' => array(new \DateTime()))); + $this->resolver->resolve(['foo' => [new \DateTime()]]); } /** @@ -502,7 +502,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefined('foo'); $this->resolver->setAllowedTypes('foo', 'int[]'); - $this->resolver->resolve(array('foo' => 'bar')); + $this->resolver->resolve(['foo' => 'bar']); } /** @@ -515,11 +515,11 @@ class OptionsResolverTest extends TestCase $this->resolver->setAllowedTypes('foo', 'int[]'); $values = range(1, 5); $values[] = new \stdClass(); - $values[] = array(); + $values[] = []; $values[] = new \DateTime(); $values[] = 123; - $this->resolver->resolve(array('foo' => $values)); + $this->resolver->resolve(['foo' => $values]); } /** @@ -532,11 +532,11 @@ class OptionsResolverTest extends TestCase $this->resolver->setAllowedTypes('foo', 'int[][]'); $this->resolver->resolve( - array( - 'foo' => array( - array(1.2), - ), - ) + [ + 'foo' => [ + [1.2], + ], + ] ); } @@ -555,21 +555,21 @@ class OptionsResolverTest extends TestCase $this->setExpectedException('Symfony\Component\OptionsResolver\Exception\InvalidOptionsException', $exceptionMessage); } - $this->resolver->resolve(array('option' => $actualType)); + $this->resolver->resolve(['option' => $actualType]); } public function provideInvalidTypes() { - return array( - array(true, 'string', 'The option "option" with value true is expected to be of type "string", but is of type "boolean".'), - array(false, 'string', 'The option "option" with value false is expected to be of type "string", but is of type "boolean".'), - array(fopen(__FILE__, 'r'), 'string', 'The option "option" with value resource is expected to be of type "string", but is of type "resource".'), - array(array(), 'string', 'The option "option" with value array is expected to be of type "string", but is of type "array".'), - array(new OptionsResolver(), 'string', 'The option "option" with value Symfony\Component\OptionsResolver\OptionsResolver is expected to be of type "string", but is of type "Symfony\Component\OptionsResolver\OptionsResolver".'), - array(42, 'string', 'The option "option" with value 42 is expected to be of type "string", but is of type "integer".'), - array(null, 'string', 'The option "option" with value null is expected to be of type "string", but is of type "NULL".'), - array('bar', '\stdClass', 'The option "option" with value "bar" is expected to be of type "\stdClass", but is of type "string".'), - ); + return [ + [true, 'string', 'The option "option" with value true is expected to be of type "string", but is of type "boolean".'], + [false, 'string', 'The option "option" with value false is expected to be of type "string", but is of type "boolean".'], + [fopen(__FILE__, 'r'), 'string', 'The option "option" with value resource is expected to be of type "string", but is of type "resource".'], + [[], 'string', 'The option "option" with value array is expected to be of type "string", but is of type "array".'], + [new OptionsResolver(), 'string', 'The option "option" with value Symfony\Component\OptionsResolver\OptionsResolver is expected to be of type "string", but is of type "Symfony\Component\OptionsResolver\OptionsResolver".'], + [42, 'string', 'The option "option" with value 42 is expected to be of type "string", but is of type "integer".'], + [null, 'string', 'The option "option" with value null is expected to be of type "string", but is of type "NULL".'], + ['bar', '\stdClass', 'The option "option" with value "bar" is expected to be of type "\stdClass", but is of type "string".'], + ]; } public function testResolveSucceedsIfValidType() @@ -587,7 +587,7 @@ class OptionsResolverTest extends TestCase public function testResolveFailsIfInvalidTypeMultiple() { $this->resolver->setDefault('foo', 42); - $this->resolver->setAllowedTypes('foo', array('string', 'bool')); + $this->resolver->setAllowedTypes('foo', ['string', 'bool']); $this->resolver->resolve(); } @@ -595,7 +595,7 @@ class OptionsResolverTest extends TestCase public function testResolveSucceedsIfValidTypeMultiple() { $this->resolver->setDefault('foo', true); - $this->resolver->setAllowedTypes('foo', array('string', 'bool')); + $this->resolver->setAllowedTypes('foo', ['string', 'bool']); $this->assertNotEmpty($this->resolver->resolve()); } @@ -611,14 +611,14 @@ class OptionsResolverTest extends TestCase public function testResolveSucceedsIfTypedArray() { $this->resolver->setDefault('foo', null); - $this->resolver->setAllowedTypes('foo', array('null', 'DateTime[]')); + $this->resolver->setAllowedTypes('foo', ['null', 'DateTime[]']); - $data = array( - 'foo' => array( + $data = [ + 'foo' => [ new \DateTime(), new \DateTime(), - ), - ); + ], + ]; $result = $this->resolver->resolve($data); $this->assertEquals($data, $result); } @@ -681,7 +681,7 @@ class OptionsResolverTest extends TestCase public function testResolveFailsIfInvalidAddedTypeMultiple() { $this->resolver->setDefault('foo', 42); - $this->resolver->addAllowedTypes('foo', array('string', 'bool')); + $this->resolver->addAllowedTypes('foo', ['string', 'bool']); $this->resolver->resolve(); } @@ -689,7 +689,7 @@ class OptionsResolverTest extends TestCase public function testResolveSucceedsIfValidAddedTypeMultiple() { $this->resolver->setDefault('foo', 'bar'); - $this->resolver->addAllowedTypes('foo', array('string', 'bool')); + $this->resolver->addAllowedTypes('foo', ['string', 'bool']); $this->assertNotEmpty($this->resolver->resolve()); } @@ -747,7 +747,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefined('foo'); $this->resolver->setAllowedValues('foo', 'bar'); - $this->resolver->resolve(array('foo' => 42)); + $this->resolver->resolve(['foo' => 42]); } /** @@ -778,7 +778,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefault('foo', 'bar'); $this->resolver->setAllowedValues('foo', 'bar'); - $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertEquals(['foo' => 'bar'], $this->resolver->resolve()); } public function testResolveSucceedsIfValidValueIsNull() @@ -786,7 +786,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefault('foo', null); $this->resolver->setAllowedValues('foo', null); - $this->assertEquals(array('foo' => null), $this->resolver->resolve()); + $this->assertEquals(['foo' => null], $this->resolver->resolve()); } /** @@ -796,7 +796,7 @@ class OptionsResolverTest extends TestCase public function testResolveFailsIfInvalidValueMultiple() { $this->resolver->setDefault('foo', 42); - $this->resolver->setAllowedValues('foo', array('bar', false, null)); + $this->resolver->setAllowedValues('foo', ['bar', false, null]); $this->resolver->resolve(); } @@ -804,9 +804,9 @@ class OptionsResolverTest extends TestCase public function testResolveSucceedsIfValidValueMultiple() { $this->resolver->setDefault('foo', 'baz'); - $this->resolver->setAllowedValues('foo', array('bar', 'baz')); + $this->resolver->setAllowedValues('foo', ['bar', 'baz']); - $this->assertEquals(array('foo' => 'baz'), $this->resolver->resolve()); + $this->assertEquals(['foo' => 'baz'], $this->resolver->resolve()); } public function testResolveFailsIfClosureReturnsFalse() @@ -836,7 +836,7 @@ class OptionsResolverTest extends TestCase return true; }); - $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertEquals(['foo' => 'bar'], $this->resolver->resolve()); $this->assertSame('bar', $passedValue); } @@ -846,11 +846,11 @@ class OptionsResolverTest extends TestCase public function testResolveFailsIfAllClosuresReturnFalse() { $this->resolver->setDefault('foo', 42); - $this->resolver->setAllowedValues('foo', array( + $this->resolver->setAllowedValues('foo', [ function () { return false; }, function () { return false; }, function () { return false; }, - )); + ]); $this->resolver->resolve(); } @@ -858,13 +858,13 @@ class OptionsResolverTest extends TestCase public function testResolveSucceedsIfAnyClosureReturnsTrue() { $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setAllowedValues('foo', array( + $this->resolver->setAllowedValues('foo', [ function () { return false; }, function () { return true; }, function () { return false; }, - )); + ]); - $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertEquals(['foo' => 'bar'], $this->resolver->resolve()); } /** @@ -905,7 +905,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefault('foo', 'bar'); $this->resolver->addAllowedValues('foo', 'bar'); - $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertEquals(['foo' => 'bar'], $this->resolver->resolve()); } public function testResolveSucceedsIfValidAddedValueIsNull() @@ -913,7 +913,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefault('foo', null); $this->resolver->addAllowedValues('foo', null); - $this->assertEquals(array('foo' => null), $this->resolver->resolve()); + $this->assertEquals(['foo' => null], $this->resolver->resolve()); } /** @@ -922,7 +922,7 @@ class OptionsResolverTest extends TestCase public function testResolveFailsIfInvalidAddedValueMultiple() { $this->resolver->setDefault('foo', 42); - $this->resolver->addAllowedValues('foo', array('bar', 'baz')); + $this->resolver->addAllowedValues('foo', ['bar', 'baz']); $this->resolver->resolve(); } @@ -930,9 +930,9 @@ class OptionsResolverTest extends TestCase public function testResolveSucceedsIfValidAddedValueMultiple() { $this->resolver->setDefault('foo', 'bar'); - $this->resolver->addAllowedValues('foo', array('bar', 'baz')); + $this->resolver->addAllowedValues('foo', ['bar', 'baz']); - $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertEquals(['foo' => 'bar'], $this->resolver->resolve()); } public function testAddAllowedValuesDoesNotOverwrite() @@ -941,7 +941,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setAllowedValues('foo', 'bar'); $this->resolver->addAllowedValues('foo', 'baz'); - $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertEquals(['foo' => 'bar'], $this->resolver->resolve()); } public function testAddAllowedValuesDoesNotOverwrite2() @@ -950,7 +950,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setAllowedValues('foo', 'bar'); $this->resolver->addAllowedValues('foo', 'baz'); - $this->assertEquals(array('foo' => 'baz'), $this->resolver->resolve()); + $this->assertEquals(['foo' => 'baz'], $this->resolver->resolve()); } /** @@ -971,7 +971,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setAllowedValues('foo', function () { return false; }); $this->resolver->addAllowedValues('foo', function () { return true; }); - $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertEquals(['foo' => 'bar'], $this->resolver->resolve()); } public function testResolveSucceedsIfAnyAddedClosureReturnsTrue2() @@ -980,7 +980,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setAllowedValues('foo', function () { return true; }); $this->resolver->addAllowedValues('foo', function () { return false; }); - $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertEquals(['foo' => 'bar'], $this->resolver->resolve()); } public function testSetNormalizerReturnsThis() @@ -996,7 +996,7 @@ class OptionsResolverTest extends TestCase return 'normalized'; }); - $this->assertEquals(array('foo' => 'normalized'), $this->resolver->resolve()); + $this->assertEquals(['foo' => 'normalized'], $this->resolver->resolve()); } /** @@ -1029,7 +1029,7 @@ class OptionsResolverTest extends TestCase return 'normalized['.$value.']'; }); - $this->assertEquals(array('foo' => 'normalized[bar]'), $this->resolver->resolve()); + $this->assertEquals(['foo' => 'normalized[bar]'], $this->resolver->resolve()); } public function testNormalizerReceivesPassedOption() @@ -1040,9 +1040,9 @@ class OptionsResolverTest extends TestCase return 'normalized['.$value.']'; }); - $resolved = $this->resolver->resolve(array('foo' => 'baz')); + $resolved = $this->resolver->resolve(['foo' => 'baz']); - $this->assertEquals(array('foo' => 'normalized[baz]'), $resolved); + $this->assertEquals(['foo' => 'normalized[baz]'], $resolved); } /** @@ -1089,10 +1089,10 @@ class OptionsResolverTest extends TestCase return 'normalized'; }); - $this->assertEquals(array( + $this->assertEquals([ 'default' => 'bar', 'norm' => 'normalized', - ), $this->resolver->resolve()); + ], $this->resolver->resolve()); } public function testNormalizerCanAccessLazyOptions() @@ -1109,10 +1109,10 @@ class OptionsResolverTest extends TestCase return 'normalized'; }); - $this->assertEquals(array( + $this->assertEquals([ 'lazy' => 'bar', 'norm' => 'normalized', - ), $this->resolver->resolve()); + ], $this->resolver->resolve()); } /** @@ -1156,7 +1156,7 @@ class OptionsResolverTest extends TestCase { $throw = true; - $this->resolver->setDefaults(array('catcher' => null, 'thrower' => null)); + $this->resolver->setDefaults(['catcher' => null, 'thrower' => null]); $this->resolver->setNormalizer('catcher', function (Options $options) { try { @@ -1175,7 +1175,7 @@ class OptionsResolverTest extends TestCase return true; }); - $this->assertSame(array('catcher' => false, 'thrower' => true), $this->resolver->resolve()); + $this->assertSame(['catcher' => false, 'thrower' => true], $this->resolver->resolve()); } public function testCaughtExceptionFromLazyDoesNotCrashOptionResolver() @@ -1199,7 +1199,7 @@ class OptionsResolverTest extends TestCase return true; }); - $this->assertSame(array('catcher' => false, 'thrower' => true), $this->resolver->resolve()); + $this->assertSame(['catcher' => false, 'thrower' => true], $this->resolver->resolve()); } public function testInvokeEachNormalizerOnlyOnce() @@ -1236,7 +1236,7 @@ class OptionsResolverTest extends TestCase public function testSetDefaultsReturnsThis() { - $this->assertSame($this->resolver, $this->resolver->setDefaults(array('foo', 'bar'))); + $this->assertSame($this->resolver, $this->resolver->setDefaults(['foo', 'bar'])); } public function testSetDefaults() @@ -1244,16 +1244,16 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefault('one', '1'); $this->resolver->setDefault('two', 'bar'); - $this->resolver->setDefaults(array( + $this->resolver->setDefaults([ 'two' => '2', 'three' => '3', - )); + ]); - $this->assertEquals(array( + $this->assertEquals([ 'one' => '1', 'two' => '2', 'three' => '3', - ), $this->resolver->resolve()); + ], $this->resolver->resolve()); } /** @@ -1262,7 +1262,7 @@ class OptionsResolverTest extends TestCase public function testFailIfSetDefaultsFromLazyOption() { $this->resolver->setDefault('foo', function (Options $options) { - $options->setDefaults(array('two' => '2')); + $options->setDefaults(['two' => '2']); }); $this->resolver->resolve(); @@ -1281,7 +1281,7 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefault('baz', 'boo'); $this->resolver->remove('foo'); - $this->assertSame(array('baz' => 'boo'), $this->resolver->resolve()); + $this->assertSame(['baz' => 'boo'], $this->resolver->resolve()); } public function testRemoveMultipleOptions() @@ -1290,9 +1290,9 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefault('baz', 'boo'); $this->resolver->setDefault('doo', 'dam'); - $this->resolver->remove(array('foo', 'doo')); + $this->resolver->remove(['foo', 'doo']); - $this->assertSame(array('baz' => 'boo'), $this->resolver->resolve()); + $this->assertSame(['baz' => 'boo'], $this->resolver->resolve()); } public function testRemoveLazyOption() @@ -1302,7 +1302,7 @@ class OptionsResolverTest extends TestCase }); $this->resolver->remove('foo'); - $this->assertSame(array(), $this->resolver->resolve()); + $this->assertSame([], $this->resolver->resolve()); } public function testRemoveNormalizer() @@ -1314,7 +1314,7 @@ class OptionsResolverTest extends TestCase $this->resolver->remove('foo'); $this->resolver->setDefault('foo', 'bar'); - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertSame(['foo' => 'bar'], $this->resolver->resolve()); } public function testRemoveAllowedTypes() @@ -1324,17 +1324,17 @@ class OptionsResolverTest extends TestCase $this->resolver->remove('foo'); $this->resolver->setDefault('foo', 'bar'); - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertSame(['foo' => 'bar'], $this->resolver->resolve()); } public function testRemoveAllowedValues() { $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setAllowedValues('foo', array('baz', 'boo')); + $this->resolver->setAllowedValues('foo', ['baz', 'boo']); $this->resolver->remove('foo'); $this->resolver->setDefault('foo', 'bar'); - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertSame(['foo' => 'bar'], $this->resolver->resolve()); } /** @@ -1378,7 +1378,7 @@ class OptionsResolverTest extends TestCase }); $this->resolver->clear(); - $this->assertSame(array(), $this->resolver->resolve()); + $this->assertSame([], $this->resolver->resolve()); } public function testClearNormalizer() @@ -1390,7 +1390,7 @@ class OptionsResolverTest extends TestCase $this->resolver->clear(); $this->resolver->setDefault('foo', 'bar'); - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertSame(['foo' => 'bar'], $this->resolver->resolve()); } public function testClearAllowedTypes() @@ -1400,7 +1400,7 @@ class OptionsResolverTest extends TestCase $this->resolver->clear(); $this->resolver->setDefault('foo', 'bar'); - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertSame(['foo' => 'bar'], $this->resolver->resolve()); } public function testClearAllowedValues() @@ -1410,7 +1410,7 @@ class OptionsResolverTest extends TestCase $this->resolver->clear(); $this->resolver->setDefault('foo', 'bar'); - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertSame(['foo' => 'bar'], $this->resolver->resolve()); } /** @@ -1469,7 +1469,7 @@ class OptionsResolverTest extends TestCase // accessed }); - $this->resolver->resolve(array('default2' => 42, 'required' => 'value')); + $this->resolver->resolve(['default2' => 42, 'required' => 'value']); } /** @@ -1567,7 +1567,7 @@ class OptionsResolverTest extends TestCase Assert::assertCount(4, $options); }); - $this->assertCount(4, $this->resolver->resolve(array('required' => 'value'))); + $this->assertCount(4, $this->resolver->resolve(['required' => 'value'])); } /** @@ -1592,18 +1592,18 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefined('foo'); $this->resolver->setAllowedTypes('foo', 'int[][]'); - $this->assertEquals(array( - 'foo' => array( - array( + $this->assertEquals([ + 'foo' => [ + [ 1, 2, - ), - ), - ), $this->resolver->resolve( - array( - 'foo' => array( - array(1, 2), - ), - ) + ], + ], + ], $this->resolver->resolve( + [ + 'foo' => [ + [1, 2], + ], + ] )); } @@ -1612,26 +1612,26 @@ class OptionsResolverTest extends TestCase $this->resolver->setDefined('foo'); $this->resolver->setAllowedTypes('foo', 'int[][][][]'); - $this->assertEquals(array( - 'foo' => array( - array( - array( - array( + $this->assertEquals([ + 'foo' => [ + [ + [ + [ 1, 2, - ), - ), - ), - ), - ), $this->resolver->resolve( - array( - 'foo' => array( - array( - array( - array(1, 2), - ), - ), - ), - ) + ], + ], + ], + ], + ], $this->resolver->resolve( + [ + 'foo' => [ + [ + [ + [1, 2], + ], + ], + ], + ] )); } @@ -1645,15 +1645,15 @@ class OptionsResolverTest extends TestCase $this->resolver->setAllowedTypes('foo', 'float[][][][]'); $this->resolver->resolve( - array( - 'foo' => array( - array( - array( - array(1, 2), - ), - ), - ), - ) + [ + 'foo' => [ + [ + [ + [1, 2], + ], + ], + ], + ] ); } @@ -1665,11 +1665,11 @@ class OptionsResolverTest extends TestCase { $this->resolver->setDefined('foo'); $this->resolver->setAllowedTypes('foo', 'int[][]'); - $this->resolver->resolve(array( - 'foo' => array( - array(1, true, 'str', array(2, 3)), - ), - )); + $this->resolver->resolve([ + 'foo' => [ + [1, true, 'str', [2, 3]], + ], + ]); } /** @@ -1680,11 +1680,11 @@ class OptionsResolverTest extends TestCase { $this->resolver->setDefined('foo'); $this->resolver->setAllowedTypes('foo', 'int[][]'); - $this->resolver->resolve(array( - 'foo' => array( - array(true, 'str', array(2, 3)), - ), - )); + $this->resolver->resolve([ + 'foo' => [ + [true, 'str', [2, 3]], + ], + ]); } /** @@ -1695,11 +1695,11 @@ class OptionsResolverTest extends TestCase { $this->resolver->setDefined('foo'); $this->resolver->setAllowedTypes('foo', 'string[][][]'); - $this->resolver->resolve(array( - 'foo' => array( - array('str', array(1, 2)), - ), - )); + $this->resolver->resolve([ + 'foo' => [ + ['str', [1, 2]], + ], + ]); } /** @@ -1710,12 +1710,12 @@ class OptionsResolverTest extends TestCase { $this->resolver->setDefined('foo'); $this->resolver->setAllowedTypes('foo', 'string[][][]'); - $this->resolver->resolve(array( - 'foo' => array( - array( - array('str'), array(1, 2), ), - ), - )); + $this->resolver->resolve([ + 'foo' => [ + [ + ['str'], [1, 2], ], + ], + ]); } /** @@ -1726,11 +1726,11 @@ class OptionsResolverTest extends TestCase { $this->resolver->setDefined('foo'); $this->resolver->setAllowedTypes('foo', 'string[]'); - $this->resolver->resolve(array( - 'foo' => array( - array( - array('str'), array(1, 2), ), - ), - )); + $this->resolver->resolve([ + 'foo' => [ + [ + ['str'], [1, 2], ], + ], + ]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/ExecutableFinder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/ExecutableFinder.php index ccfa4c09..a621fc69 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/ExecutableFinder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/ExecutableFinder.php @@ -19,7 +19,7 @@ namespace Symfony\Component\Process; */ class ExecutableFinder { - private $suffixes = array('.exe', '.bat', '.cmd', '.com'); + private $suffixes = ['.exe', '.bat', '.cmd', '.com']; /** * Replaces default suffixes of executable. @@ -42,17 +42,17 @@ class ExecutableFinder /** * Finds an executable by name. * - * @param string $name The executable name (without the extension) - * @param string $default The default to return if no executable is found - * @param array $extraDirs Additional dirs to check into + * @param string $name The executable name (without the extension) + * @param string|null $default The default to return if no executable is found + * @param array $extraDirs Additional dirs to check into * - * @return string The executable path or default value + * @return string|null The executable path or default value */ - public function find($name, $default = null, array $extraDirs = array()) + public function find($name, $default = null, array $extraDirs = []) { if (ini_get('open_basedir')) { $searchPath = explode(PATH_SEPARATOR, ini_get('open_basedir')); - $dirs = array(); + $dirs = []; foreach ($searchPath as $path) { // Silencing against https://bugs.php.net/69240 if (@is_dir($path)) { @@ -70,7 +70,7 @@ class ExecutableFinder ); } - $suffixes = array(''); + $suffixes = ['']; if ('\\' === \DIRECTORY_SEPARATOR) { $pathExt = getenv('PATHEXT'); $suffixes = array_merge($pathExt ? explode(PATH_SEPARATOR, $pathExt) : $this->suffixes, $suffixes); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/InputStream.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/InputStream.php index 0214014e..757d6294 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/InputStream.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/InputStream.php @@ -22,7 +22,7 @@ class InputStream implements \IteratorAggregate { /** @var callable|null */ private $onEmpty = null; - private $input = array(); + private $input = []; private $open = true; /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/PhpExecutableFinder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/PhpExecutableFinder.php index 334de13f..a97aa12c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/PhpExecutableFinder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/PhpExecutableFinder.php @@ -44,7 +44,7 @@ class PhpExecutableFinder } // PHP_BINARY return the current sapi executable - if (PHP_BINARY && \in_array(\PHP_SAPI, array('cli', 'cli-server', 'phpdbg'), true)) { + if (PHP_BINARY && \in_array(\PHP_SAPI, ['cli', 'cli-server', 'phpdbg'], true)) { return PHP_BINARY.$args; } @@ -66,7 +66,7 @@ class PhpExecutableFinder return $php; } - $dirs = array(PHP_BINDIR); + $dirs = [PHP_BINDIR]; if ('\\' === \DIRECTORY_SEPARATOR) { $dirs[] = 'C:\xampp\php\\'; } @@ -81,7 +81,7 @@ class PhpExecutableFinder */ public function findArguments() { - $arguments = array(); + $arguments = []; if (\defined('HHVM_VERSION')) { $arguments[] = '--php'; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/PhpProcess.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/PhpProcess.php index 5b847830..f0c47b28 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/PhpProcess.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/PhpProcess.php @@ -37,7 +37,7 @@ class PhpProcess extends Process if (false === $php = $executableFinder->find(false)) { $php = null; } else { - $php = array_merge(array($php), $executableFinder->findArguments()); + $php = array_merge([$php], $executableFinder->findArguments()); } if ('phpdbg' === \PHP_SAPI) { $file = tempnam(sys_get_temp_dir(), 'dbg'); @@ -64,7 +64,7 @@ class PhpProcess extends Process /** * {@inheritdoc} */ - public function start(callable $callback = null/*, array $env = array()*/) + public function start(callable $callback = null/*, array $env = []*/) { if (null === $this->getCommandLine()) { throw new RuntimeException('Unable to find the PHP executable.'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/AbstractPipes.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/AbstractPipes.php index e5e26866..23886b61 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/AbstractPipes.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/AbstractPipes.php @@ -20,7 +20,7 @@ use Symfony\Component\Process\Exception\InvalidArgumentException; */ abstract class AbstractPipes implements PipesInterface { - public $pipes = array(); + public $pipes = []; private $inputBuffer = ''; private $input; @@ -49,7 +49,7 @@ abstract class AbstractPipes implements PipesInterface foreach ($this->pipes as $pipe) { fclose($pipe); } - $this->pipes = array(); + $this->pipes = []; } /** @@ -117,8 +117,8 @@ abstract class AbstractPipes implements PipesInterface } } - $r = $e = array(); - $w = array($this->pipes[0]); + $r = $e = []; + $w = [$this->pipes[0]]; // let's have a look if something changed in streams if (false === @stream_select($r, $w, $e, 0, 0)) { @@ -130,7 +130,7 @@ abstract class AbstractPipes implements PipesInterface $written = fwrite($stdin, $this->inputBuffer); $this->inputBuffer = substr($this->inputBuffer, $written); if (isset($this->inputBuffer[0])) { - return array($this->pipes[0]); + return [$this->pipes[0]]; } } @@ -145,7 +145,7 @@ abstract class AbstractPipes implements PipesInterface if (isset($data[0])) { $this->inputBuffer = $data; - return array($this->pipes[0]); + return [$this->pipes[0]]; } } if (feof($input)) { @@ -164,7 +164,7 @@ abstract class AbstractPipes implements PipesInterface fclose($this->pipes[0]); unset($this->pipes[0]); } elseif (!$w) { - return array($this->pipes[0]); + return [$this->pipes[0]]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/UnixPipes.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/UnixPipes.php index 254df519..1ebf2138 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/UnixPipes.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/UnixPipes.php @@ -48,34 +48,34 @@ class UnixPipes extends AbstractPipes if (!$this->haveReadSupport) { $nullstream = fopen('/dev/null', 'c'); - return array( - array('pipe', 'r'), + return [ + ['pipe', 'r'], $nullstream, $nullstream, - ); + ]; } if ($this->ttyMode) { - return array( - array('file', '/dev/tty', 'r'), - array('file', '/dev/tty', 'w'), - array('file', '/dev/tty', 'w'), - ); + return [ + ['file', '/dev/tty', 'r'], + ['file', '/dev/tty', 'w'], + ['file', '/dev/tty', 'w'], + ]; } if ($this->ptyMode && Process::isPtySupported()) { - return array( - array('pty'), - array('pty'), - array('pty'), - ); + return [ + ['pty'], + ['pty'], + ['pty'], + ]; } - return array( - array('pipe', 'r'), - array('pipe', 'w'), // stdout - array('pipe', 'w'), // stderr - ); + return [ + ['pipe', 'r'], + ['pipe', 'w'], // stdout + ['pipe', 'w'], // stderr + ]; } /** @@ -83,7 +83,7 @@ class UnixPipes extends AbstractPipes */ public function getFiles() { - return array(); + return []; } /** @@ -94,18 +94,18 @@ class UnixPipes extends AbstractPipes $this->unblock(); $w = $this->write(); - $read = $e = array(); + $read = $e = []; $r = $this->pipes; unset($r[0]); // let's have a look if something changed in streams - set_error_handler(array($this, 'handleError')); + set_error_handler([$this, 'handleError']); if (($r || $w) && false === stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) { restore_error_handler(); // if a system call has been interrupted, forget about it, let's try again // otherwise, an error occurred, let's reset pipes if (!$this->hasSystemCallBeenInterrupted()) { - $this->pipes = array(); + $this->pipes = []; } return $read; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/WindowsPipes.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/WindowsPipes.php index f577c08c..1619e632 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/WindowsPipes.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/WindowsPipes.php @@ -26,13 +26,13 @@ use Symfony\Component\Process\Process; */ class WindowsPipes extends AbstractPipes { - private $files = array(); - private $fileHandles = array(); - private $lockHandles = array(); - private $readBytes = array( + private $files = []; + private $fileHandles = []; + private $lockHandles = []; + private $readBytes = [ Process::STDOUT => 0, Process::STDERR => 0, - ); + ]; private $haveReadSupport; public function __construct($input, $haveReadSupport) @@ -44,10 +44,10 @@ class WindowsPipes extends AbstractPipes // Workaround for this problem is to use temporary files instead of pipes on Windows platform. // // @see https://bugs.php.net/bug.php?id=51800 - $pipes = array( + $pipes = [ Process::STDOUT => Process::OUT, Process::STDERR => Process::ERR, - ); + ]; $tmpDir = sys_get_temp_dir(); $lastError = 'unknown reason'; set_error_handler(function ($type, $msg) use (&$lastError) { $lastError = $msg; }); @@ -98,21 +98,21 @@ class WindowsPipes extends AbstractPipes if (!$this->haveReadSupport) { $nullstream = fopen('NUL', 'c'); - return array( - array('pipe', 'r'), + return [ + ['pipe', 'r'], $nullstream, $nullstream, - ); + ]; } // We're not using pipe on Windows platform as it hangs (https://bugs.php.net/bug.php?id=51800) // We're not using file handles as it can produce corrupted output https://bugs.php.net/bug.php?id=65650 // So we redirect output within the commandline and pass the nul device to the process - return array( - array('pipe', 'r'), - array('file', 'NUL', 'w'), - array('file', 'NUL', 'w'), - ); + return [ + ['pipe', 'r'], + ['file', 'NUL', 'w'], + ['file', 'NUL', 'w'], + ]; } /** @@ -130,7 +130,7 @@ class WindowsPipes extends AbstractPipes { $this->unblock(); $w = $this->write(); - $read = $r = $e = array(); + $read = $r = $e = []; if ($blocking) { if ($w) { @@ -186,6 +186,6 @@ class WindowsPipes extends AbstractPipes flock($this->lockHandles[$type], LOCK_UN); fclose($this->lockHandles[$type]); } - $this->fileHandles = $this->lockHandles = array(); + $this->fileHandles = $this->lockHandles = []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php index 20af1032..75395b66 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php @@ -58,9 +58,9 @@ class Process implements \IteratorAggregate private $lastOutputTime; private $timeout; private $idleTimeout; - private $options = array('suppress_errors' => true); + private $options = ['suppress_errors' => true]; private $exitcode; - private $fallbackStatus = array(); + private $fallbackStatus = []; private $processInformation; private $outputDisabled = false; private $stdout; @@ -88,7 +88,7 @@ class Process implements \IteratorAggregate * * User-defined errors must use exit codes in the 64-113 range. */ - public static $exitCodes = array( + public static $exitCodes = [ 0 => 'OK', 1 => 'General error', 2 => 'Misuse of shell builtins', @@ -129,7 +129,7 @@ class Process implements \IteratorAggregate 157 => 'Pollable event', // 158 - not defined 159 => 'Bad syscall', - ); + ]; /** * @param string|array $commandline The command line to run @@ -204,7 +204,7 @@ class Process implements \IteratorAggregate * * @final since version 3.3 */ - public function run($callback = null/*, array $env = array()*/) + public function run($callback = null/*, array $env = []*/) { $env = 1 < \func_num_args() ? func_get_arg(1) : null; $this->start($callback, $env); @@ -228,7 +228,7 @@ class Process implements \IteratorAggregate * * @final since version 3.3 */ - public function mustRun(callable $callback = null/*, array $env = array()*/) + public function mustRun(callable $callback = null/*, array $env = []*/) { if (!$this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { throw new RuntimeException('This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.'); @@ -262,7 +262,7 @@ class Process implements \IteratorAggregate * @throws RuntimeException When process is already running * @throws LogicException In case a callback is provided and output has been disabled */ - public function start(callable $callback = null/*, array $env = array()*/) + public function start(callable $callback = null/*, array $env = [*/) { if ($this->isRunning()) { throw new RuntimeException('Process is already running'); @@ -287,7 +287,7 @@ class Process implements \IteratorAggregate $inheritEnv = $this->inheritEnv; if (\is_array($commandline = $this->commandline)) { - $commandline = implode(' ', array_map(array($this, 'escapeArgument'), $commandline)); + $commandline = implode(' ', array_map([$this, 'escapeArgument'], $commandline)); if ('\\' !== \DIRECTORY_SEPARATOR) { // exec is mandatory to deal with sending a signal to the process @@ -316,7 +316,7 @@ class Process implements \IteratorAggregate $commandline = $this->prepareWindowsCommandLine($commandline, $env); } elseif (!$this->useFileHandles && $this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { // last exit code is output on the fourth pipe and caught to work around --enable-sigchild - $descriptors[3] = array('pipe', 'w'); + $descriptors[3] = ['pipe', 'w']; // See https://unix.stackexchange.com/questions/71205/background-process-pipe-input $commandline = '{ ('.$commandline.') <&3 3<&- 3>/dev/null & } 3<&0;'; @@ -329,7 +329,7 @@ class Process implements \IteratorAggregate if (\defined('HHVM_VERSION')) { $envPairs = $env; } else { - $envPairs = array(); + $envPairs = []; foreach ($env as $k => $v) { if (false !== $v) { $envPairs[] = $k.'='.$v; @@ -378,7 +378,7 @@ class Process implements \IteratorAggregate * * @final since version 3.3 */ - public function restart(callable $callback = null/*, array $env = array()*/) + public function restart(callable $callback = null/*, array $env = []*/) { if ($this->isRunning()) { throw new RuntimeException('Process is already running'); @@ -939,7 +939,7 @@ class Process implements \IteratorAggregate */ public function getCommandLine() { - return \is_array($this->commandline) ? implode(' ', array_map(array($this, 'escapeArgument'), $this->commandline)) : $this->commandline; + return \is_array($this->commandline) ? implode(' ', array_map([$this, 'escapeArgument'], $this->commandline)) : $this->commandline; } /** @@ -1035,7 +1035,7 @@ class Process implements \IteratorAggregate static $isTtySupported; if (null === $isTtySupported) { - $isTtySupported = (bool) @proc_open('echo 1 >/dev/null', array(array('file', '/dev/tty', 'r'), array('file', '/dev/tty', 'w'), array('file', '/dev/tty', 'w')), $pipes); + $isTtySupported = (bool) @proc_open('echo 1 >/dev/null', [['file', '/dev/tty', 'r'], ['file', '/dev/tty', 'w'], ['file', '/dev/tty', 'w']], $pipes); } if (!$isTtySupported) { @@ -1359,7 +1359,7 @@ class Process implements \IteratorAggregate return $result = false; } - return $result = (bool) @proc_open('echo 1 >/dev/null', array(array('pty'), array('pty'), array('pty')), $pipes); + return $result = (bool) @proc_open('echo 1 >/dev/null', [['pty'], ['pty'], ['pty']], $pipes); } /** @@ -1563,7 +1563,7 @@ class Process implements \IteratorAggregate $this->starttime = null; $this->callback = null; $this->exitcode = null; - $this->fallbackStatus = array(); + $this->fallbackStatus = []; $this->processInformation = null; $this->stdout = fopen('php://temp/maxmemory:'.(1024 * 1024), 'w+b'); $this->stderr = fopen('php://temp/maxmemory:'.(1024 * 1024), 'w+b'); @@ -1610,7 +1610,7 @@ class Process implements \IteratorAggregate $ok = @proc_terminate($this->process, $signal); } elseif (\function_exists('posix_kill')) { $ok = @posix_kill($pid, $signal); - } elseif ($ok = proc_open(sprintf('kill -%d %d', $signal, $pid), array(2 => array('pipe', 'w')), $pipes)) { + } elseif ($ok = proc_open(sprintf('kill -%d %d', $signal, $pid), [2 => ['pipe', 'w']], $pipes)) { $ok = false === fgets($pipes[2]); } if (!$ok) { @@ -1634,7 +1634,7 @@ class Process implements \IteratorAggregate { $uid = uniqid('', true); $varCount = 0; - $varCache = array(); + $varCache = []; $cmd = preg_replace_callback( '/"(?:( [^"%!^]*+ @@ -1657,7 +1657,7 @@ class Process implements \IteratorAggregate return '"'.$value.'"'; } - $value = str_replace(array('!LF!', '"^!"', '"^%"', '"^^"', '""'), array("\n", '!', '%', '^', '"'), $value); + $value = str_replace(['!LF!', '"^!"', '"^%"', '"^^"', '""'], ["\n", '!', '%', '^', '"'], $value); $value = '"'.preg_replace('/(\\\\*)"/', '$1$1\\"', $value).'"'; $var = $uid.++$varCount; @@ -1727,12 +1727,12 @@ class Process implements \IteratorAggregate } $argument = preg_replace('/(\\\\+)$/', '$1$1', $argument); - return '"'.str_replace(array('"', '^', '%', '!', "\n"), array('""', '"^^"', '"^%"', '"^!"', '!LF!'), $argument).'"'; + return '"'.str_replace(['"', '^', '%', '!', "\n"], ['""', '"^^"', '"^%"', '"^!"', '!LF!'], $argument).'"'; } private function getDefaultEnv() { - $env = array(); + $env = []; foreach ($_SERVER as $k => $v) { if (\is_string($v) && false !== $v = getenv($k)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/ProcessBuilder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/ProcessBuilder.php index 9ad39246..69d13c3f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/ProcessBuilder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/ProcessBuilder.php @@ -25,18 +25,18 @@ class ProcessBuilder { private $arguments; private $cwd; - private $env = array(); + private $env = []; private $input; private $timeout = 60; private $options; private $inheritEnv = true; - private $prefix = array(); + private $prefix = []; private $outputDisabled = false; /** * @param string[] $arguments An array of arguments */ - public function __construct(array $arguments = array()) + public function __construct(array $arguments = []) { $this->arguments = $arguments; } @@ -48,7 +48,7 @@ class ProcessBuilder * * @return static */ - public static function create(array $arguments = array()) + public static function create(array $arguments = []) { return new static($arguments); } @@ -78,7 +78,7 @@ class ProcessBuilder */ public function setPrefix($prefix) { - $this->prefix = \is_array($prefix) ? $prefix : array($prefix); + $this->prefix = \is_array($prefix) ? $prefix : [$prefix]; return $this; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php index ee25eda0..a437f2bb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php @@ -65,6 +65,21 @@ class ExecutableFinderTest extends TestCase $this->assertEquals($expected, $result); } + public function testFindWithNullAsDefault() + { + if (ini_get('open_basedir')) { + $this->markTestSkipped('Cannot test when open_basedir is set'); + } + + $this->setPath(''); + + $finder = new ExecutableFinder(); + + $result = $finder->find('foo'); + + $this->assertNull($result); + } + public function testFindWithExtraDirs() { if (ini_get('open_basedir')) { @@ -73,7 +88,7 @@ class ExecutableFinderTest extends TestCase $this->setPath(''); - $extraDirs = array(\dirname(PHP_BINARY)); + $extraDirs = [\dirname(PHP_BINARY)]; $finder = new ExecutableFinder(); $result = $finder->find($this->getPhpBinaryName(), null, $extraDirs); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php index 0c9e32d7..795be8fa 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php @@ -62,11 +62,11 @@ class PhpExecutableFinderTest extends TestCase $f = new PhpExecutableFinder(); if (\defined('HHVM_VERSION')) { - $this->assertEquals($f->findArguments(), array('--php'), '::findArguments() returns HHVM arguments'); + $this->assertEquals($f->findArguments(), ['--php'], '::findArguments() returns HHVM arguments'); } elseif ('phpdbg' === \PHP_SAPI) { - $this->assertEquals($f->findArguments(), array('-qrr'), '::findArguments() returns phpdbg arguments'); + $this->assertEquals($f->findArguments(), ['-qrr'], '::findArguments() returns phpdbg arguments'); } else { - $this->assertEquals($f->findArguments(), array(), '::findArguments() returns no arguments'); + $this->assertEquals($f->findArguments(), [], '::findArguments() returns no arguments'); } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php index 1ea0e127..9ea8981e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php @@ -14,8 +14,8 @@ define('ERR_TIMEOUT', 2); define('ERR_READ_FAILED', 3); define('ERR_WRITE_FAILED', 4); -$read = array(STDIN); -$write = array(STDOUT, STDERR); +$read = [STDIN]; +$write = [STDOUT, STDERR]; stream_set_blocking(STDIN, 0); stream_set_blocking(STDOUT, 0); @@ -42,7 +42,7 @@ while ($read || $write) { $out = (string) substr($out, $written); } if (null === $read && '' === $out) { - $write = array_diff($write, array(STDOUT)); + $write = array_diff($write, [STDOUT]); } if (in_array(STDERR, $w) && strlen($err) > 0) { @@ -53,7 +53,7 @@ while ($read || $write) { $err = (string) substr($err, $written); } if (null === $read && '' === $err) { - $write = array_diff($write, array(STDERR)); + $write = array_diff($write, [STDERR]); } if ($r) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessBuilderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessBuilderTest.php index c98b8730..349b197a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessBuilderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessBuilderTest.php @@ -38,10 +38,10 @@ class ProcessBuilderTest extends TestCase public function testAddEnvironmentVariables() { $pb = new ProcessBuilder(); - $env = array( + $env = [ 'foo' => 'bar', 'foo2' => 'bar2', - ); + ]; $proc = $pb ->add('command') ->setEnv('foo', 'bar2') @@ -76,8 +76,8 @@ class ProcessBuilderTest extends TestCase public function testShouldSetArguments() { - $pb = new ProcessBuilder(array('initial')); - $pb->setArguments(array('second')); + $pb = new ProcessBuilder(['initial']); + $pb->setArguments(['second']); $proc = $pb->getProcess(); @@ -89,14 +89,14 @@ class ProcessBuilderTest extends TestCase $pb = new ProcessBuilder(); $pb->setPrefix('/usr/bin/php'); - $proc = $pb->setArguments(array('-v'))->getProcess(); + $proc = $pb->setArguments(['-v'])->getProcess(); if ('\\' === \DIRECTORY_SEPARATOR) { $this->assertEquals('"/usr/bin/php" -v', $proc->getCommandLine()); } else { $this->assertEquals("'/usr/bin/php' '-v'", $proc->getCommandLine()); } - $proc = $pb->setArguments(array('-i'))->getProcess(); + $proc = $pb->setArguments(['-i'])->getProcess(); if ('\\' === \DIRECTORY_SEPARATOR) { $this->assertEquals('"/usr/bin/php" -i', $proc->getCommandLine()); } else { @@ -107,16 +107,16 @@ class ProcessBuilderTest extends TestCase public function testArrayPrefixesArePrependedToAllGeneratedProcess() { $pb = new ProcessBuilder(); - $pb->setPrefix(array('/usr/bin/php', 'composer.phar')); + $pb->setPrefix(['/usr/bin/php', 'composer.phar']); - $proc = $pb->setArguments(array('-v'))->getProcess(); + $proc = $pb->setArguments(['-v'])->getProcess(); if ('\\' === \DIRECTORY_SEPARATOR) { $this->assertEquals('"/usr/bin/php" composer.phar -v', $proc->getCommandLine()); } else { $this->assertEquals("'/usr/bin/php' 'composer.phar' '-v'", $proc->getCommandLine()); } - $proc = $pb->setArguments(array('-i'))->getProcess(); + $proc = $pb->setArguments(['-i'])->getProcess(); if ('\\' === \DIRECTORY_SEPARATOR) { $this->assertEquals('"/usr/bin/php" composer.phar -i', $proc->getCommandLine()); } else { @@ -126,7 +126,7 @@ class ProcessBuilderTest extends TestCase public function testShouldEscapeArguments() { - $pb = new ProcessBuilder(array('%path%', 'foo " bar', '%baz%baz')); + $pb = new ProcessBuilder(['%path%', 'foo " bar', '%baz%baz']); $proc = $pb->getProcess(); if ('\\' === \DIRECTORY_SEPARATOR) { @@ -138,7 +138,7 @@ class ProcessBuilderTest extends TestCase public function testShouldEscapeArgumentsAndPrefix() { - $pb = new ProcessBuilder(array('arg')); + $pb = new ProcessBuilder(['arg']); $pb->setPrefix('%prefix%'); $proc = $pb->getProcess(); @@ -172,7 +172,7 @@ class ProcessBuilderTest extends TestCase public function testShouldNotThrowALogicExceptionIfNoPrefix() { - $process = ProcessBuilder::create(array('/usr/bin/php')) + $process = ProcessBuilder::create(['/usr/bin/php']) ->getProcess(); if ('\\' === \DIRECTORY_SEPARATOR) { @@ -184,7 +184,7 @@ class ProcessBuilderTest extends TestCase public function testShouldReturnProcessWithDisabledOutput() { - $process = ProcessBuilder::create(array('/usr/bin/php')) + $process = ProcessBuilder::create(['/usr/bin/php']) ->disableOutput() ->getProcess(); @@ -193,7 +193,7 @@ class ProcessBuilderTest extends TestCase public function testShouldReturnProcessWithEnabledOutput() { - $process = ProcessBuilder::create(array('/usr/bin/php')) + $process = ProcessBuilder::create(['/usr/bin/php']) ->disableOutput() ->enableOutput() ->getProcess(); @@ -208,7 +208,7 @@ class ProcessBuilderTest extends TestCase public function testInvalidInput() { $builder = ProcessBuilder::create(); - $builder->setInput(array()); + $builder->setInput([]); } public function testDoesNotPrefixExec() @@ -217,7 +217,7 @@ class ProcessBuilderTest extends TestCase $this->markTestSkipped('This test cannot run on Windows.'); } - $builder = ProcessBuilder::create(array('command', '-v', 'ls')); + $builder = ProcessBuilder::create(['command', '-v', 'ls']); $process = $builder->getProcess(); $process->run(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php index 25712af7..4b0376ff 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php @@ -24,7 +24,7 @@ class ProcessFailedExceptionTest extends TestCase */ public function testProcessFailedExceptionThrowsException() { - $process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(array('isSuccessful'))->setConstructorArgs(array('php'))->getMock(); + $process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(['isSuccessful'])->setConstructorArgs(['php'])->getMock(); $process->expects($this->once()) ->method('isSuccessful') ->will($this->returnValue(true)); @@ -52,7 +52,7 @@ class ProcessFailedExceptionTest extends TestCase $errorOutput = 'FATAL: Unexpected error'; $workingDirectory = getcwd(); - $process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(array('isSuccessful', 'getOutput', 'getErrorOutput', 'getExitCode', 'getExitCodeText', 'isOutputDisabled', 'getWorkingDirectory'))->setConstructorArgs(array($cmd))->getMock(); + $process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(['isSuccessful', 'getOutput', 'getErrorOutput', 'getExitCode', 'getExitCodeText', 'isOutputDisabled', 'getWorkingDirectory'])->setConstructorArgs([$cmd])->getMock(); $process->expects($this->once()) ->method('isSuccessful') ->will($this->returnValue(false)); @@ -100,7 +100,7 @@ class ProcessFailedExceptionTest extends TestCase $exitText = 'General error'; $workingDirectory = getcwd(); - $process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(array('isSuccessful', 'isOutputDisabled', 'getExitCode', 'getExitCodeText', 'getOutput', 'getErrorOutput', 'getWorkingDirectory'))->setConstructorArgs(array($cmd))->getMock(); + $process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(['isSuccessful', 'isOutputDisabled', 'getExitCode', 'getExitCodeText', 'getOutput', 'getErrorOutput', 'getWorkingDirectory'])->setConstructorArgs([$cmd])->getMock(); $process->expects($this->once()) ->method('isSuccessful') ->will($this->returnValue(false)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessTest.php index da74a3db..a9ecbe80 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessTest.php @@ -115,7 +115,7 @@ class ProcessTest extends TestCase */ public function testStopWithTimeoutIsActuallyWorking() { - $p = $this->getProcess(array(self::$phpBin, __DIR__.'/NonStopableProcess.php', 30)); + $p = $this->getProcess([self::$phpBin, __DIR__.'/NonStopableProcess.php', 30]); $p->start(); while (false === strpos($p->getOutput(), 'received')) { @@ -276,10 +276,10 @@ class ProcessTest extends TestCase public function provideInvalidInputValues() { - return array( - array(array()), - array(new NonStringifiable()), - ); + return [ + [[]], + [new NonStringifiable()], + ]; } /** @@ -294,25 +294,25 @@ class ProcessTest extends TestCase public function provideInputValues() { - return array( - array(null, null), - array('24.5', 24.5), - array('input data', 'input data'), - ); + return [ + [null, null], + ['24.5', 24.5], + ['input data', 'input data'], + ]; } public function chainedCommandsOutputProvider() { if ('\\' === \DIRECTORY_SEPARATOR) { - return array( - array("2 \r\n2\r\n", '&&', '2'), - ); + return [ + ["2 \r\n2\r\n", '&&', '2'], + ]; } - return array( - array("1\n1\n", ';', '1'), - array("2\n2\n", '&&', '2'), - ); + return [ + ["1\n1\n", ';', '1'], + ["2\n2\n", '&&', '2'], + ]; } /** @@ -381,7 +381,7 @@ class ProcessTest extends TestCase $p->start(); - foreach (array('foo', 'bar') as $s) { + foreach (['foo', 'bar'] as $s) { while (false === strpos($p->$getOutput(), $s)) { usleep(1000); } @@ -397,10 +397,10 @@ class ProcessTest extends TestCase public function provideIncrementalOutput() { - return array( - array('getOutput', 'getIncrementalOutput', 'php://stdout'), - array('getErrorOutput', 'getIncrementalErrorOutput', 'php://stderr'), - ); + return [ + ['getOutput', 'getIncrementalOutput', 'php://stdout'], + ['getErrorOutput', 'getIncrementalErrorOutput', 'php://stderr'], + ]; } public function testGetOutput() @@ -907,7 +907,7 @@ class ProcessTest extends TestCase */ public function testSignal() { - $process = $this->getProcess(array(self::$phpBin, __DIR__.'/SignalListener.php')); + $process = $this->getProcess([self::$phpBin, __DIR__.'/SignalListener.php']); $process->start(); while (false === strpos($process->getOutput(), 'Caught')) { @@ -969,13 +969,13 @@ class ProcessTest extends TestCase public function provideMethodsThatNeedARunningProcess() { - return array( - array('getOutput'), - array('getIncrementalOutput'), - array('getErrorOutput'), - array('getIncrementalErrorOutput'), - array('wait'), - ); + return [ + ['getOutput'], + ['getIncrementalOutput'], + ['getErrorOutput'], + ['getIncrementalErrorOutput'], + ['wait'], + ]; } /** @@ -1000,12 +1000,12 @@ class ProcessTest extends TestCase public function provideMethodsThatNeedATerminatedProcess() { - return array( - array('hasBeenSignaled'), - array('getTermSignal'), - array('hasBeenStopped'), - array('getStopSignal'), - ); + return [ + ['hasBeenSignaled'], + ['getTermSignal'], + ['hasBeenStopped'], + ['getStopSignal'], + ]; } /** @@ -1032,10 +1032,10 @@ class ProcessTest extends TestCase public function provideWrongSignal() { - return array( - array(-4), - array('Céphalopodes'), - ); + return [ + [-4], + ['Céphalopodes'], + ]; } public function testDisableOutputDisablesTheOutput() @@ -1125,12 +1125,12 @@ class ProcessTest extends TestCase public function provideOutputFetchingMethods() { - return array( - array('getOutput'), - array('getIncrementalOutput'), - array('getErrorOutput'), - array('getIncrementalErrorOutput'), - ); + return [ + ['getOutput'], + ['getIncrementalOutput'], + ['getErrorOutput'], + ['getIncrementalErrorOutput'], + ]; } public function testStopTerminatesProcessCleanly() @@ -1162,32 +1162,32 @@ class ProcessTest extends TestCase public function responsesCodeProvider() { - return array( + return [ //expected output / getter / code to execute - //array(1,'getExitCode','exit(1);'), - //array(true,'isSuccessful','exit();'), - array('output', 'getOutput', 'echo \'output\';'), - ); + //[1,'getExitCode','exit(1);'], + //[true,'isSuccessful','exit();'], + ['output', 'getOutput', 'echo \'output\';'], + ]; } public function pipesCodeProvider() { - $variations = array( + $variations = [ 'fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);', 'include \''.__DIR__.'/PipeStdinInStdoutStdErrStreamSelect.php\';', - ); + ]; if ('\\' === \DIRECTORY_SEPARATOR) { // Avoid XL buffers on Windows because of https://bugs.php.net/bug.php?id=65650 - $sizes = array(1, 2, 4, 8); + $sizes = [1, 2, 4, 8]; } else { - $sizes = array(1, 16, 64, 1024, 4096); + $sizes = [1, 16, 64, 1024, 4096]; } - $codes = array(); + $codes = []; foreach ($sizes as $size) { foreach ($variations as $code) { - $codes[] = array($code, $size); + $codes[] = [$code, $size]; } } @@ -1215,10 +1215,10 @@ class ProcessTest extends TestCase public function provideVariousIncrementals() { - return array( - array('php://stdout', 'getIncrementalOutput'), - array('php://stderr', 'getIncrementalErrorOutput'), - ); + return [ + ['php://stdout', 'getIncrementalOutput'], + ['php://stderr', 'getIncrementalErrorOutput'], + ]; } public function testIteratorInput() @@ -1323,32 +1323,32 @@ class ProcessTest extends TestCase $process = $this->getProcessForCode('fwrite(STDOUT, 123); fwrite(STDERR, 234); flush(); usleep(10000); fwrite(STDOUT, fread(STDIN, 3)); fwrite(STDERR, 456);'); $process->setInput($input); $process->start(); - $output = array(); + $output = []; foreach ($process as $type => $data) { - $output[] = array($type, $data); + $output[] = [$type, $data]; break; } - $expectedOutput = array( - array($process::OUT, '123'), - ); + $expectedOutput = [ + [$process::OUT, '123'], + ]; $this->assertSame($expectedOutput, $output); $input->write(345); foreach ($process as $type => $data) { - $output[] = array($type, $data); + $output[] = [$type, $data]; } $this->assertSame('', $process->getOutput()); $this->assertFalse($process->isRunning()); - $expectedOutput = array( - array($process::OUT, '123'), - array($process::ERR, '234'), - array($process::OUT, '345'), - array($process::ERR, '456'), - ); + $expectedOutput = [ + [$process::OUT, '123'], + [$process::ERR, '234'], + [$process::OUT, '345'], + [$process::ERR, '456'], + ]; $this->assertSame($expectedOutput, $output); } @@ -1359,32 +1359,32 @@ class ProcessTest extends TestCase $process = $this->getProcessForCode('fwrite(STDOUT, fread(STDIN, 3));'); $process->setInput($input); $process->start(); - $output = array(); + $output = []; foreach ($process->getIterator($process::ITER_NON_BLOCKING | $process::ITER_KEEP_OUTPUT) as $type => $data) { - $output[] = array($type, $data); + $output[] = [$type, $data]; break; } - $expectedOutput = array( - array($process::OUT, ''), - ); + $expectedOutput = [ + [$process::OUT, ''], + ]; $this->assertSame($expectedOutput, $output); $input->write(123); foreach ($process->getIterator($process::ITER_NON_BLOCKING | $process::ITER_KEEP_OUTPUT) as $type => $data) { if ('' !== $data) { - $output[] = array($type, $data); + $output[] = [$type, $data]; } } $this->assertSame('123', $process->getOutput()); $this->assertFalse($process->isRunning()); - $expectedOutput = array( - array($process::OUT, ''), - array($process::OUT, '123'), - ); + $expectedOutput = [ + [$process::OUT, ''], + [$process::OUT, '123'], + ]; $this->assertSame($expectedOutput, $output); } @@ -1406,7 +1406,7 @@ class ProcessTest extends TestCase public function testSetBadEnv() { $process = $this->getProcess('echo hello'); - $process->setEnv(array('bad%%' => '123')); + $process->setEnv(['bad%%' => '123']); $process->inheritEnvironmentVariables(true); $process->run(); @@ -1420,7 +1420,7 @@ class ProcessTest extends TestCase putenv('existing_var=foo'); $_ENV['existing_var'] = 'foo'; $process = $this->getProcess('php -r "echo getenv(\'new_test_var\');"'); - $process->setEnv(array('existing_var' => 'bar', 'new_test_var' => 'foo')); + $process->setEnv(['existing_var' => 'bar', 'new_test_var' => 'foo']); $process->inheritEnvironmentVariables(); $process->run(); @@ -1435,14 +1435,14 @@ class ProcessTest extends TestCase public function testEnvIsInherited() { - $process = $this->getProcessForCode('echo serialize($_SERVER);', null, array('BAR' => 'BAZ', 'EMPTY' => '')); + $process = $this->getProcessForCode('echo serialize($_SERVER);', null, ['BAR' => 'BAZ', 'EMPTY' => '']); putenv('FOO=BAR'); $_ENV['FOO'] = 'BAR'; $process->run(); - $expected = array('BAR' => 'BAZ', 'EMPTY' => '', 'FOO' => 'BAR'); + $expected = ['BAR' => 'BAZ', 'EMPTY' => '', 'FOO' => 'BAR']; $env = array_intersect_key(unserialize($process->getOutput()), $expected); $this->assertEquals($expected, $env); @@ -1456,7 +1456,7 @@ class ProcessTest extends TestCase */ public function testInheritEnvDisabled() { - $process = $this->getProcessForCode('echo serialize($_SERVER);', null, array('BAR' => 'BAZ')); + $process = $this->getProcessForCode('echo serialize($_SERVER);', null, ['BAR' => 'BAZ']); putenv('FOO=BAR'); $_ENV['FOO'] = 'BAR'; @@ -1466,7 +1466,7 @@ class ProcessTest extends TestCase $process->run(); - $expected = array('BAR' => 'BAZ', 'FOO' => 'BAR'); + $expected = ['BAR' => 'BAZ', 'FOO' => 'BAR']; $env = array_intersect_key(unserialize($process->getOutput()), $expected); unset($expected['FOO']); @@ -1478,7 +1478,7 @@ class ProcessTest extends TestCase public function testGetCommandLine() { - $p = new Process(array('/usr/bin/php')); + $p = new Process(['/usr/bin/php']); $expected = '\\' === \DIRECTORY_SEPARATOR ? '"/usr/bin/php"' : "'/usr/bin/php'"; $this->assertSame($expected, $p->getCommandLine()); @@ -1489,7 +1489,7 @@ class ProcessTest extends TestCase */ public function testEscapeArgument($arg) { - $p = new Process(array(self::$phpBin, '-r', 'echo $argv[1];', $arg)); + $p = new Process([self::$phpBin, '-r', 'echo $argv[1];', $arg]); $p->run(); $this->assertSame((string) $arg, $p->getOutput()); @@ -1501,7 +1501,7 @@ class ProcessTest extends TestCase */ public function testEscapeArgumentWhenInheritEnvDisabled($arg) { - $p = new Process(array(self::$phpBin, '-r', 'echo $argv[1];', $arg), null, array('BAR' => 'BAZ')); + $p = new Process([self::$phpBin, '-r', 'echo $argv[1];', $arg], null, ['BAR' => 'BAZ']); $p->inheritEnvironmentVariables(false); $p->run(); @@ -1528,24 +1528,24 @@ EOTXT; public function provideEscapeArgument() { - yield array('a"b%c%'); - yield array('a"b^c^'); - yield array("a\nb'c"); - yield array('a^b c!'); - yield array("a!b\tc"); - yield array('a\\\\"\\"'); - yield array('éÉèÈàÀöä'); - yield array(null); - yield array(1); - yield array(1.1); + yield ['a"b%c%']; + yield ['a"b^c^']; + yield ["a\nb'c"]; + yield ['a^b c!']; + yield ["a!b\tc"]; + yield ['a\\\\"\\"']; + yield ['éÉèÈàÀöä']; + yield [null]; + yield [1]; + yield [1.1]; } public function testEnvArgument() { - $env = array('FOO' => 'Foo', 'BAR' => 'Bar'); + $env = ['FOO' => 'Foo', 'BAR' => 'Bar']; $cmd = '\\' === \DIRECTORY_SEPARATOR ? 'echo !FOO! !BAR! !BAZ!' : 'echo $FOO $BAR $BAZ'; $p = new Process($cmd, null, $env); - $p->run(null, array('BAR' => 'baR', 'BAZ' => 'baZ')); + $p->run(null, ['BAR' => 'baR', 'BAZ' => 'baZ']); $this->assertSame('Foo baR baZ', rtrim($p->getOutput())); $this->assertSame($env, $p->getEnv()); @@ -1593,7 +1593,7 @@ EOTXT; */ private function getProcessForCode($code, $cwd = null, array $env = null, $input = null, $timeout = 60) { - return $this->getProcess(array(self::$phpBin, '-r', $code), $cwd, $env, $input, $timeout); + return $this->getProcess([self::$phpBin, '-r', $code], $cwd, $env, $input, $timeout); } private function skipIfNotEnhancedSigchild($expectException = true) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessUtilsTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessUtilsTest.php index 0a3ccb57..0c2fe94d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessUtilsTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessUtilsTest.php @@ -30,24 +30,24 @@ class ProcessUtilsTest extends TestCase public function dataArguments() { if ('\\' === \DIRECTORY_SEPARATOR) { - return array( - array('"\"php\" \"-v\""', '"php" "-v"'), - array('"foo bar"', 'foo bar'), - array('^%"path"^%', '%path%'), - array('"<|>\\" \\"\'f"', '<|>" "\'f'), - array('""', ''), - array('"with\trailingbs\\\\"', 'with\trailingbs\\'), - ); + return [ + ['"\"php\" \"-v\""', '"php" "-v"'], + ['"foo bar"', 'foo bar'], + ['^%"path"^%', '%path%'], + ['"<|>\\" \\"\'f"', '<|>" "\'f'], + ['""', ''], + ['"with\trailingbs\\\\"', 'with\trailingbs\\'], + ]; } - return array( - array("'\"php\" \"-v\"'", '"php" "-v"'), - array("'foo bar'", 'foo bar'), - array("'%path%'", '%path%'), - array("'<|>\" \"'\\''f'", '<|>" "\'f'), - array("''", ''), - array("'with\\trailingbs\\'", 'with\trailingbs\\'), - array("'withNonAsciiAccentLikeéÉèÈàÀöä'", 'withNonAsciiAccentLikeéÉèÈàÀöä'), - ); + return [ + ["'\"php\" \"-v\"'", '"php" "-v"'], + ["'foo bar'", 'foo bar'], + ["'%path%'", '%path%'], + ["'<|>\" \"'\\''f'", '<|>" "\'f'], + ["''", ''], + ["'with\\trailingbs\\'", 'with\trailingbs\\'], + ["'withNonAsciiAccentLikeéÉèÈàÀöä'", 'withNonAsciiAccentLikeéÉèÈàÀöä'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php index 90e4c234..83b0f1ce 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php @@ -129,13 +129,13 @@ class PropertyAccessor implements PropertyAccessorInterface */ private $cacheItemPool; - private $readPropertyCache = array(); - private $writePropertyCache = array(); - private $propertyPathCache = array(); + private $readPropertyCache = []; + private $writePropertyCache = []; + private $propertyPathCache = []; private static $previousErrorHandler = false; - private static $errorHandler = array(__CLASS__, 'handleError'); - private static $resultProto = array(self::VALUE => null); + private static $errorHandler = [__CLASS__, 'handleError']; + private static $resultProto = [self::VALUE => null]; /** * Should not be used by application code. Use @@ -159,9 +159,9 @@ class PropertyAccessor implements PropertyAccessorInterface { $propertyPath = $this->getPropertyPath($propertyPath); - $zval = array( + $zval = [ self::VALUE => $objectOrArray, - ); + ]; $propertyValues = $this->readPropertiesUntil($zval, $propertyPath, $propertyPath->getLength(), $this->ignoreInvalidIndices); return $propertyValues[\count($propertyValues) - 1][self::VALUE]; @@ -174,10 +174,10 @@ class PropertyAccessor implements PropertyAccessorInterface { $propertyPath = $this->getPropertyPath($propertyPath); - $zval = array( + $zval = [ self::VALUE => $objectOrArray, self::REF => &$objectOrArray, - ); + ]; $propertyValues = $this->readPropertiesUntil($zval, $propertyPath, $propertyPath->getLength() - 1); $overwrite = true; @@ -244,7 +244,7 @@ class PropertyAccessor implements PropertyAccessorInterface /** * @internal */ - public static function handleError($type, $message, $file, $line, $context = array()) + public static function handleError($type, $message, $file, $line, $context = []) { if (E_RECOVERABLE_ERROR === $type) { self::throwInvalidArgumentException($message, debug_backtrace(false), 1); @@ -260,7 +260,7 @@ class PropertyAccessor implements PropertyAccessorInterface return; } - if (isset($trace[$i]['file']) && __FILE__ === $trace[$i]['file'] && array_key_exists(0, $trace[$i]['args'])) { + if (isset($trace[$i]['file']) && __FILE__ === $trace[$i]['file'] && \array_key_exists(0, $trace[$i]['args'])) { $pos = strpos($message, $delim = 'must be of the type ') ?: (strpos($message, $delim = 'must be an instance of ') ?: strpos($message, $delim = 'must implement interface ')); $pos += \strlen($delim); $type = $trace[$i]['args'][0]; @@ -280,9 +280,9 @@ class PropertyAccessor implements PropertyAccessorInterface } try { - $zval = array( + $zval = [ self::VALUE => $objectOrArray, - ); + ]; $this->readPropertiesUntil($zval, $propertyPath, $propertyPath->getLength(), $this->ignoreInvalidIndices); return true; @@ -301,9 +301,9 @@ class PropertyAccessor implements PropertyAccessorInterface $propertyPath = $this->getPropertyPath($propertyPath); try { - $zval = array( + $zval = [ self::VALUE => $objectOrArray, - ); + ]; $propertyValues = $this->readPropertiesUntil($zval, $propertyPath, $propertyPath->getLength() - 1); for ($i = \count($propertyValues) - 1; 0 <= $i; --$i) { @@ -353,7 +353,7 @@ class PropertyAccessor implements PropertyAccessorInterface } // Add the root object to the list - $propertyValues = array($zval); + $propertyValues = [$zval]; for ($i = 0; $i < $lastIndex; ++$i) { $property = $propertyPath->getElement($i); @@ -362,7 +362,7 @@ class PropertyAccessor implements PropertyAccessorInterface if ($isIndex) { // Create missing nested arrays on demand if (($zval[self::VALUE] instanceof \ArrayAccess && !$zval[self::VALUE]->offsetExists($property)) || - (\is_array($zval[self::VALUE]) && !isset($zval[self::VALUE][$property]) && !array_key_exists($property, $zval[self::VALUE])) + (\is_array($zval[self::VALUE]) && !isset($zval[self::VALUE][$property]) && !\array_key_exists($property, $zval[self::VALUE])) ) { if (!$ignoreInvalidIndices) { if (!\is_array($zval[self::VALUE])) { @@ -378,10 +378,10 @@ class PropertyAccessor implements PropertyAccessorInterface if ($i + 1 < $propertyPath->getLength()) { if (isset($zval[self::REF])) { - $zval[self::VALUE][$property] = array(); + $zval[self::VALUE][$property] = []; $zval[self::REF] = $zval[self::VALUE]; } else { - $zval[self::VALUE] = array($property => array()); + $zval[self::VALUE] = [$property => []]; } } } @@ -521,7 +521,7 @@ class PropertyAccessor implements PropertyAccessorInterface } } - $access = array(); + $access = []; $reflClass = new \ReflectionClass($class); $access[self::ACCESS_HAS_PROPERTY] = $reflClass->hasProperty($property); @@ -556,7 +556,7 @@ class PropertyAccessor implements PropertyAccessorInterface $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_MAGIC; $access[self::ACCESS_NAME] = $getter; } else { - $methods = array($getter, $getsetter, $isser, $hasser, '__get'); + $methods = [$getter, $getsetter, $isser, $hasser, '__get']; if ($this->magicCall) { $methods[] = '__call'; } @@ -687,7 +687,8 @@ class PropertyAccessor implements PropertyAccessorInterface */ private function getWriteAccessInfo($class, $property, $value) { - $key = str_replace('\\', '.', $class).'..'.$property; + $useAdderAndRemover = \is_array($value) || $value instanceof \Traversable; + $key = str_replace('\\', '.', $class).'..'.$property.'..'.(int) $useAdderAndRemover; if (isset($this->writePropertyCache[$key])) { return $this->writePropertyCache[$key]; @@ -700,13 +701,23 @@ class PropertyAccessor implements PropertyAccessorInterface } } - $access = array(); + $access = []; $reflClass = new \ReflectionClass($class); $access[self::ACCESS_HAS_PROPERTY] = $reflClass->hasProperty($property); $camelized = $this->camelize($property); $singulars = (array) Inflector::singularize($camelized); + if ($useAdderAndRemover) { + $methods = $this->findAdderAndRemover($reflClass, $singulars); + + if (null !== $methods) { + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_ADDER_AND_REMOVER; + $access[self::ACCESS_ADDER] = $methods[0]; + $access[self::ACCESS_REMOVER] = $methods[1]; + } + } + if (!isset($access[self::ACCESS_TYPE])) { $setter = 'set'.$camelized; $getsetter = lcfirst($camelized); // jQuery style, e.g. read: last(), write: last($item) @@ -728,22 +739,16 @@ class PropertyAccessor implements PropertyAccessorInterface $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_MAGIC; $access[self::ACCESS_NAME] = $setter; } elseif (null !== $methods = $this->findAdderAndRemover($reflClass, $singulars)) { - if (\is_array($value) || $value instanceof \Traversable) { - $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_ADDER_AND_REMOVER; - $access[self::ACCESS_ADDER] = $methods[0]; - $access[self::ACCESS_REMOVER] = $methods[1]; - } else { - $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_NOT_FOUND; - $access[self::ACCESS_NAME] = sprintf( - 'The property "%s" in class "%s" can be defined with the methods "%s()" but '. - 'the new value must be an array or an instance of \Traversable, '. - '"%s" given.', - $property, - $reflClass->name, - implode('()", "', $methods), - \is_object($value) ? \get_class($value) : \gettype($value) - ); - } + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_NOT_FOUND; + $access[self::ACCESS_NAME] = sprintf( + 'The property "%s" in class "%s" can be defined with the methods "%s()" but '. + 'the new value must be an array or an instance of \Traversable, '. + '"%s" given.', + $property, + $reflClass->name, + implode('()", "', $methods), + \is_object($value) ? \get_class($value) : \gettype($value) + ); } else { $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_NOT_FOUND; $access[self::ACCESS_NAME] = sprintf( @@ -781,7 +786,19 @@ class PropertyAccessor implements PropertyAccessorInterface return false; } - $access = $this->getWriteAccessInfo(\get_class($object), $property, array()); + $access = $this->getWriteAccessInfo(\get_class($object), $property, []); + + $isWritable = self::ACCESS_TYPE_METHOD === $access[self::ACCESS_TYPE] + || self::ACCESS_TYPE_PROPERTY === $access[self::ACCESS_TYPE] + || self::ACCESS_TYPE_ADDER_AND_REMOVER === $access[self::ACCESS_TYPE] + || (!$access[self::ACCESS_HAS_PROPERTY] && property_exists($object, $property)) + || self::ACCESS_TYPE_MAGIC === $access[self::ACCESS_TYPE]; + + if ($isWritable) { + return true; + } + + $access = $this->getWriteAccessInfo(\get_class($object), $property, ''); return self::ACCESS_TYPE_METHOD === $access[self::ACCESS_TYPE] || self::ACCESS_TYPE_PROPERTY === $access[self::ACCESS_TYPE] @@ -820,7 +837,7 @@ class PropertyAccessor implements PropertyAccessorInterface $removeMethodFound = $this->isMethodAccessible($reflClass, $removeMethod, 1); if ($addMethodFound && $removeMethodFound) { - return array($addMethod, $removeMethod); + return [$addMethod, $removeMethod]; } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPath.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPath.php index 2897a4ad..cb7d4ced 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPath.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPath.php @@ -32,7 +32,7 @@ class PropertyPath implements \IteratorAggregate, PropertyPathInterface * * @var array */ - private $elements = array(); + private $elements = []; /** * The number of elements in the property path. @@ -47,7 +47,7 @@ class PropertyPath implements \IteratorAggregate, PropertyPathInterface * * @var array */ - private $isIndex = array(); + private $isIndex = []; /** * String representation of the path. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php index e17c53c0..ede9e6b3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php @@ -18,8 +18,8 @@ use Symfony\Component\PropertyAccess\Exception\OutOfBoundsException; */ class PropertyPathBuilder { - private $elements = array(); - private $isIndex = array(); + private $elements = []; + private $isIndex = []; /** * Creates a new property path builder. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/NonTraversableArrayObject.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/NonTraversableArrayObject.php index d2ff9358..4b18e725 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/NonTraversableArrayObject.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/NonTraversableArrayObject.php @@ -21,12 +21,12 @@ class NonTraversableArrayObject implements \ArrayAccess, \Countable, \Serializab public function __construct(array $array = null) { - $this->array = $array ?: array(); + $this->array = $array ?: []; } public function offsetExists($offset) { - return array_key_exists($offset, $this->array); + return \array_key_exists($offset, $this->array); } public function offsetGet($offset) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestSingularAndPluralProps.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestSingularAndPluralProps.php index db17f3f6..d8a8c764 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestSingularAndPluralProps.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestSingularAndPluralProps.php @@ -21,7 +21,7 @@ class TestSingularAndPluralProps private $email; /** @var array */ - private $emails = array(); + private $emails = []; /** * @return string|null @@ -60,6 +60,6 @@ class TestSingularAndPluralProps */ public function removeEmail($email) { - $this->emails = array_diff($this->emails, array($email)); + $this->emails = array_diff($this->emails, [$email]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TraversableArrayObject.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TraversableArrayObject.php index 6758f18f..b075286f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TraversableArrayObject.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TraversableArrayObject.php @@ -21,12 +21,12 @@ class TraversableArrayObject implements \ArrayAccess, \IteratorAggregate, \Count public function __construct(array $array = null) { - $this->array = $array ?: array(); + $this->array = $array ?: []; } public function offsetExists($offset) { - return array_key_exists($offset, $this->array); + return \array_key_exists($offset, $this->array); } public function offsetGet($offset) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTest.php index b0ed69c8..3c007fde 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTest.php @@ -31,10 +31,10 @@ abstract class PropertyAccessorArrayAccessTest extends TestCase public function getValidPropertyPaths() { - return array( - array($this->getContainer(array('firstName' => 'Bernhard')), '[firstName]', 'Bernhard'), - array($this->getContainer(array('person' => $this->getContainer(array('firstName' => 'Bernhard')))), '[person][firstName]', 'Bernhard'), - ); + return [ + [$this->getContainer(['firstName' => 'Bernhard']), '[firstName]', 'Bernhard'], + [$this->getContainer(['person' => $this->getContainer(['firstName' => 'Bernhard'])]), '[person][firstName]', 'Bernhard'], + ]; } /** @@ -54,7 +54,7 @@ abstract class PropertyAccessorArrayAccessTest extends TestCase ->enableExceptionOnInvalidIndex() ->getPropertyAccessor(); - $object = $this->getContainer(array('firstName' => 'Bernhard')); + $object = $this->getContainer(['firstName' => 'Bernhard']); $this->propertyAccessor->getValue($object, '[lastName]'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php index 8a7ab104..1aee259a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php @@ -102,9 +102,9 @@ abstract class PropertyAccessorCollectionTest extends PropertyAccessorArrayAcces { public function testSetValueCallsAdderAndRemoverForCollections() { - $axesBefore = $this->getContainer(array(1 => 'second', 3 => 'fourth', 4 => 'fifth')); - $axesMerged = $this->getContainer(array(1 => 'first', 2 => 'second', 3 => 'third')); - $axesAfter = $this->getContainer(array(1 => 'second', 5 => 'first', 6 => 'third')); + $axesBefore = $this->getContainer([1 => 'second', 3 => 'fourth', 4 => 'fifth']); + $axesMerged = $this->getContainer([1 => 'first', 2 => 'second', 3 => 'third']); + $axesAfter = $this->getContainer([1 => 'second', 5 => 'first', 6 => 'third']); $axesMergedCopy = \is_object($axesMerged) ? clone $axesMerged : $axesMerged; // Don't use a mock in order to test whether the collections are @@ -123,8 +123,8 @@ abstract class PropertyAccessorCollectionTest extends PropertyAccessorArrayAcces { $car = $this->getMockBuilder(__CLASS__.'_CompositeCar')->getMock(); $structure = $this->getMockBuilder(__CLASS__.'_CarStructure')->getMock(); - $axesBefore = $this->getContainer(array(1 => 'second', 3 => 'fourth')); - $axesAfter = $this->getContainer(array(0 => 'first', 1 => 'second', 2 => 'third')); + $axesBefore = $this->getContainer([1 => 'second', 3 => 'fourth']); + $axesAfter = $this->getContainer([0 => 'first', 1 => 'second', 2 => 'third']); $car->expects($this->any()) ->method('getStructure') @@ -153,8 +153,8 @@ abstract class PropertyAccessorCollectionTest extends PropertyAccessorArrayAcces public function testSetValueFailsIfNoAdderNorRemoverFound() { $car = $this->getMockBuilder(__CLASS__.'_CarNoAdderAndRemover')->getMock(); - $axesBefore = $this->getContainer(array(1 => 'second', 3 => 'fourth')); - $axesAfter = $this->getContainer(array(0 => 'first', 1 => 'second', 2 => 'third')); + $axesBefore = $this->getContainer([1 => 'second', 3 => 'fourth']); + $axesAfter = $this->getContainer([0 => 'first', 1 => 'second', 2 => 'third']); $car->expects($this->any()) ->method('getAxes') diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php index cf615238..9219d716 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php @@ -40,47 +40,47 @@ class PropertyAccessorTest extends TestCase public function getPathsWithUnexpectedType() { - return array( - array('', 'foobar'), - array('foo', 'foobar'), - array(null, 'foobar'), - array(123, 'foobar'), - array((object) array('prop' => null), 'prop.foobar'), - array((object) array('prop' => (object) array('subProp' => null)), 'prop.subProp.foobar'), - array(array('index' => null), '[index][foobar]'), - array(array('index' => array('subIndex' => null)), '[index][subIndex][foobar]'), - ); + return [ + ['', 'foobar'], + ['foo', 'foobar'], + [null, 'foobar'], + [123, 'foobar'], + [(object) ['prop' => null], 'prop.foobar'], + [(object) ['prop' => (object) ['subProp' => null]], 'prop.subProp.foobar'], + [['index' => null], '[index][foobar]'], + [['index' => ['subIndex' => null]], '[index][subIndex][foobar]'], + ]; } public function getPathsWithMissingProperty() { - return array( - array((object) array('firstName' => 'Bernhard'), 'lastName'), - array((object) array('property' => (object) array('firstName' => 'Bernhard')), 'property.lastName'), - array(array('index' => (object) array('firstName' => 'Bernhard')), '[index].lastName'), - array(new TestClass('Bernhard'), 'protectedProperty'), - array(new TestClass('Bernhard'), 'privateProperty'), - array(new TestClass('Bernhard'), 'protectedAccessor'), - array(new TestClass('Bernhard'), 'protectedIsAccessor'), - array(new TestClass('Bernhard'), 'protectedHasAccessor'), - array(new TestClass('Bernhard'), 'privateAccessor'), - array(new TestClass('Bernhard'), 'privateIsAccessor'), - array(new TestClass('Bernhard'), 'privateHasAccessor'), + return [ + [(object) ['firstName' => 'Bernhard'], 'lastName'], + [(object) ['property' => (object) ['firstName' => 'Bernhard']], 'property.lastName'], + [['index' => (object) ['firstName' => 'Bernhard']], '[index].lastName'], + [new TestClass('Bernhard'), 'protectedProperty'], + [new TestClass('Bernhard'), 'privateProperty'], + [new TestClass('Bernhard'), 'protectedAccessor'], + [new TestClass('Bernhard'), 'protectedIsAccessor'], + [new TestClass('Bernhard'), 'protectedHasAccessor'], + [new TestClass('Bernhard'), 'privateAccessor'], + [new TestClass('Bernhard'), 'privateIsAccessor'], + [new TestClass('Bernhard'), 'privateHasAccessor'], // Properties are not camelized - array(new TestClass('Bernhard'), 'public_property'), - ); + [new TestClass('Bernhard'), 'public_property'], + ]; } public function getPathsWithMissingIndex() { - return array( - array(array('firstName' => 'Bernhard'), '[lastName]'), - array(array(), '[index][lastName]'), - array(array('index' => array()), '[index][lastName]'), - array(array('index' => array('firstName' => 'Bernhard')), '[index][lastName]'), - array((object) array('property' => array('firstName' => 'Bernhard')), 'property[lastName]'), - ); + return [ + [['firstName' => 'Bernhard'], '[lastName]'], + [[], '[index][lastName]'], + [['index' => []], '[index][lastName]'], + [['index' => ['firstName' => 'Bernhard']], '[index][lastName]'], + [(object) ['property' => ['firstName' => 'Bernhard']], 'property[lastName]'], + ]; } /** @@ -134,10 +134,10 @@ class PropertyAccessorTest extends TestCase public function testGetValueReadsArrayWithMissingIndexForCustomPropertyPath() { $object = new \ArrayObject(); - $array = array('child' => array('index' => $object)); + $array = ['child' => ['index' => $object]]; $this->assertNull($this->propertyAccessor->getValue($array, '[child][index][foo][bar]')); - $this->assertSame(array(), $object->getArrayCopy()); + $this->assertSame([], $object->getArrayCopy()); } // https://github.com/symfony/symfony/pull/4450 @@ -149,24 +149,24 @@ class PropertyAccessorTest extends TestCase public function testGetValueNotModifyObject() { $object = new \stdClass(); - $object->firstName = array('Bernhard'); + $object->firstName = ['Bernhard']; $this->assertNull($this->propertyAccessor->getValue($object, 'firstName[1]')); - $this->assertSame(array('Bernhard'), $object->firstName); + $this->assertSame(['Bernhard'], $object->firstName); } public function testGetValueNotModifyObjectException() { $propertyAccessor = new PropertyAccessor(false, true); $object = new \stdClass(); - $object->firstName = array('Bernhard'); + $object->firstName = ['Bernhard']; try { $propertyAccessor->getValue($object, 'firstName[1]'); } catch (NoSuchIndexException $e) { } - $this->assertSame(array('Bernhard'), $object->firstName); + $this->assertSame(['Bernhard'], $object->firstName); } /** @@ -289,7 +289,7 @@ class PropertyAccessorTest extends TestCase $this->propertyAccessor->setValue($author, 'magicCallProperty', 'Updated'); - $this->assertEquals('Updated', $author->__call('getMagicCallProperty', array())); + $this->assertEquals('Updated', $author->__call('getMagicCallProperty', [])); } /** @@ -305,7 +305,7 @@ class PropertyAccessorTest extends TestCase public function testGetValueWhenArrayValueIsNull() { $this->propertyAccessor = new PropertyAccessor(false, true); - $this->assertNull($this->propertyAccessor->getValue(array('index' => array('nullable' => null)), '[index][nullable]')); + $this->assertNull($this->propertyAccessor->getValue(['index' => ['nullable' => null]], '[index][nullable]')); } /** @@ -432,47 +432,47 @@ class PropertyAccessorTest extends TestCase public function getValidPropertyPaths() { - return array( - array(array('Bernhard', 'Schussek'), '[0]', 'Bernhard'), - array(array('Bernhard', 'Schussek'), '[1]', 'Schussek'), - array(array('firstName' => 'Bernhard'), '[firstName]', 'Bernhard'), - array(array('index' => array('firstName' => 'Bernhard')), '[index][firstName]', 'Bernhard'), - array((object) array('firstName' => 'Bernhard'), 'firstName', 'Bernhard'), - array((object) array('property' => array('firstName' => 'Bernhard')), 'property[firstName]', 'Bernhard'), - array(array('index' => (object) array('firstName' => 'Bernhard')), '[index].firstName', 'Bernhard'), - array((object) array('property' => (object) array('firstName' => 'Bernhard')), 'property.firstName', 'Bernhard'), + return [ + [['Bernhard', 'Schussek'], '[0]', 'Bernhard'], + [['Bernhard', 'Schussek'], '[1]', 'Schussek'], + [['firstName' => 'Bernhard'], '[firstName]', 'Bernhard'], + [['index' => ['firstName' => 'Bernhard']], '[index][firstName]', 'Bernhard'], + [(object) ['firstName' => 'Bernhard'], 'firstName', 'Bernhard'], + [(object) ['property' => ['firstName' => 'Bernhard']], 'property[firstName]', 'Bernhard'], + [['index' => (object) ['firstName' => 'Bernhard']], '[index].firstName', 'Bernhard'], + [(object) ['property' => (object) ['firstName' => 'Bernhard']], 'property.firstName', 'Bernhard'], // Accessor methods - array(new TestClass('Bernhard'), 'publicProperty', 'Bernhard'), - array(new TestClass('Bernhard'), 'publicAccessor', 'Bernhard'), - array(new TestClass('Bernhard'), 'publicAccessorWithDefaultValue', 'Bernhard'), - array(new TestClass('Bernhard'), 'publicAccessorWithRequiredAndDefaultValue', 'Bernhard'), - array(new TestClass('Bernhard'), 'publicIsAccessor', 'Bernhard'), - array(new TestClass('Bernhard'), 'publicHasAccessor', 'Bernhard'), - array(new TestClass('Bernhard'), 'publicGetSetter', 'Bernhard'), + [new TestClass('Bernhard'), 'publicProperty', 'Bernhard'], + [new TestClass('Bernhard'), 'publicAccessor', 'Bernhard'], + [new TestClass('Bernhard'), 'publicAccessorWithDefaultValue', 'Bernhard'], + [new TestClass('Bernhard'), 'publicAccessorWithRequiredAndDefaultValue', 'Bernhard'], + [new TestClass('Bernhard'), 'publicIsAccessor', 'Bernhard'], + [new TestClass('Bernhard'), 'publicHasAccessor', 'Bernhard'], + [new TestClass('Bernhard'), 'publicGetSetter', 'Bernhard'], // Methods are camelized - array(new TestClass('Bernhard'), 'public_accessor', 'Bernhard'), - array(new TestClass('Bernhard'), '_public_accessor', 'Bernhard'), + [new TestClass('Bernhard'), 'public_accessor', 'Bernhard'], + [new TestClass('Bernhard'), '_public_accessor', 'Bernhard'], // Missing indices - array(array('index' => array()), '[index][firstName]', null), - array(array('root' => array('index' => array())), '[root][index][firstName]', null), + [['index' => []], '[index][firstName]', null], + [['root' => ['index' => []]], '[root][index][firstName]', null], // Special chars - array(array('%!@$§.' => 'Bernhard'), '[%!@$§.]', 'Bernhard'), - array(array('index' => array('%!@$§.' => 'Bernhard')), '[index][%!@$§.]', 'Bernhard'), - array((object) array('%!@$§' => 'Bernhard'), '%!@$§', 'Bernhard'), - array((object) array('property' => (object) array('%!@$§' => 'Bernhard')), 'property.%!@$§', 'Bernhard'), + [['%!@$§.' => 'Bernhard'], '[%!@$§.]', 'Bernhard'], + [['index' => ['%!@$§.' => 'Bernhard']], '[index][%!@$§.]', 'Bernhard'], + [(object) ['%!@$§' => 'Bernhard'], '%!@$§', 'Bernhard'], + [(object) ['property' => (object) ['%!@$§' => 'Bernhard']], 'property.%!@$§', 'Bernhard'], // nested objects and arrays - array(array('foo' => new TestClass('bar')), '[foo].publicGetSetter', 'bar'), - array(new TestClass(array('foo' => 'bar')), 'publicGetSetter[foo]', 'bar'), - array(new TestClass(new TestClass('bar')), 'publicGetter.publicGetSetter', 'bar'), - array(new TestClass(array('foo' => new TestClass('bar'))), 'publicGetter[foo].publicGetSetter', 'bar'), - array(new TestClass(new TestClass(new TestClass('bar'))), 'publicGetter.publicGetter.publicGetSetter', 'bar'), - array(new TestClass(array('foo' => array('baz' => new TestClass('bar')))), 'publicGetter[foo][baz].publicGetSetter', 'bar'), - ); + [['foo' => new TestClass('bar')], '[foo].publicGetSetter', 'bar'], + [new TestClass(['foo' => 'bar']), 'publicGetSetter[foo]', 'bar'], + [new TestClass(new TestClass('bar')), 'publicGetter.publicGetSetter', 'bar'], + [new TestClass(['foo' => new TestClass('bar')]), 'publicGetter[foo].publicGetSetter', 'bar'], + [new TestClass(new TestClass(new TestClass('bar'))), 'publicGetter.publicGetter.publicGetSetter', 'bar'], + [new TestClass(['foo' => ['baz' => new TestClass('bar')]]), 'publicGetter[foo][baz].publicGetSetter', 'bar'], + ]; } public function testTicket5755() @@ -487,20 +487,20 @@ class PropertyAccessorTest extends TestCase public function testSetValueDeepWithMagicGetter() { $obj = new TestClassMagicGet('foo'); - $obj->publicProperty = array('foo' => array('bar' => 'some_value')); + $obj->publicProperty = ['foo' => ['bar' => 'some_value']]; $this->propertyAccessor->setValue($obj, 'publicProperty[foo][bar]', 'Updated'); $this->assertSame('Updated', $obj->publicProperty['foo']['bar']); } public function getReferenceChainObjectsForSetValue() { - return array( - array(array('a' => array('b' => array('c' => 'old-value'))), '[a][b][c]', 'new-value'), - array(new TestClassSetValue(new TestClassSetValue('old-value')), 'value.value', 'new-value'), - array(new TestClassSetValue(array('a' => array('b' => array('c' => new TestClassSetValue('old-value'))))), 'value[a][b][c].value', 'new-value'), - array(new TestClassSetValue(array('a' => array('b' => 'old-value'))), 'value[a][b]', 'new-value'), - array(new \ArrayIterator(array('a' => array('b' => array('c' => 'old-value')))), '[a][b][c]', 'new-value'), - ); + return [ + [['a' => ['b' => ['c' => 'old-value']]], '[a][b][c]', 'new-value'], + [new TestClassSetValue(new TestClassSetValue('old-value')), 'value.value', 'new-value'], + [new TestClassSetValue(['a' => ['b' => ['c' => new TestClassSetValue('old-value')]]]), 'value[a][b][c].value', 'new-value'], + [new TestClassSetValue(['a' => ['b' => 'old-value']]), 'value[a][b]', 'new-value'], + [new \ArrayIterator(['a' => ['b' => ['c' => 'old-value']]]), '[a][b][c]', 'new-value'], + ]; } /** @@ -515,11 +515,11 @@ class PropertyAccessorTest extends TestCase public function getReferenceChainObjectsForIsWritable() { - return array( - array(new TestClassIsWritable(array('a' => array('b' => 'old-value'))), 'value[a][b]', false), - array(new TestClassIsWritable(new \ArrayIterator(array('a' => array('b' => 'old-value')))), 'value[a][b]', true), - array(new TestClassIsWritable(array('a' => array('b' => array('c' => new TestClassSetValue('old-value'))))), 'value[a][b][c].value', true), - ); + return [ + [new TestClassIsWritable(['a' => ['b' => 'old-value']]), 'value[a][b]', false], + [new TestClassIsWritable(new \ArrayIterator(['a' => ['b' => 'old-value']])), 'value[a][b]', true], + [new TestClassIsWritable(['a' => ['b' => ['c' => new TestClassSetValue('old-value')]]]), 'value[a][b][c].value', true], + ]; } /** @@ -563,12 +563,12 @@ class PropertyAccessorTest extends TestCase public function testArrayNotBeeingOverwritten() { - $value = array('value1' => 'foo', 'value2' => 'bar'); + $value = ['value1' => 'foo', 'value2' => 'bar']; $object = new TestClass($value); $this->propertyAccessor->setValue($object, 'publicAccessor[value2]', 'baz'); $this->assertSame('baz', $this->propertyAccessor->getValue($object, 'publicAccessor[value2]')); - $this->assertSame(array('value1' => 'foo', 'value2' => 'baz'), $object->getPublicAccessor()); + $this->assertSame(['value1' => 'foo', 'value2' => 'baz'], $object->getPublicAccessor()); } public function testCacheReadAccess() @@ -686,7 +686,7 @@ class PropertyAccessorTest extends TestCase { $object = new ReturnTyped(); - $this->propertyAccessor->setValue($object, 'foos', array(new \DateTime())); + $this->propertyAccessor->setValue($object, 'foos', [new \DateTime()]); } /** @@ -717,9 +717,29 @@ class PropertyAccessorTest extends TestCase $object = new TestSingularAndPluralProps(); $this->propertyAccessor->isWritable($object, 'emails'); //cache access info - $this->propertyAccessor->setValue($object, 'emails', array('test@email.com')); + $this->propertyAccessor->setValue($object, 'emails', ['test@email.com']); - self::assertEquals(array('test@email.com'), $object->getEmails()); - self::assertNull($object->getEmail()); + $this->assertEquals(['test@email.com'], $object->getEmails()); + $this->assertNull($object->getEmail()); + } + + public function testAdderAndRemoverArePreferredOverSetter() + { + $object = new TestPluralAdderRemoverAndSetter(); + + $this->propertyAccessor->isWritable($object, 'emails'); //cache access info + $this->propertyAccessor->setValue($object, 'emails', ['test@email.com']); + + $this->assertEquals(['test@email.com'], $object->getEmails()); + } + + public function testAdderAndRemoverArePreferredOverSetterForSameSingularAndPlural() + { + $object = new TestPluralAdderRemoverAndSetterSameSingularAndPlural(); + + $this->propertyAccessor->isWritable($object, 'aircraft'); //cache access info + $this->propertyAccessor->setValue($object, 'aircraft', ['aeroplane']); + + $this->assertEquals(['aeroplane'], $object->getAircraft()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php index 44822699..287b4b1f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php @@ -204,10 +204,10 @@ class PropertyPathBuilderTest extends TestCase public function provideInvalidOffsets() { - return array( - array(6), - array(-7), - ); + return [ + [6], + [-7], + ]; } public function testReplaceWithLengthGreaterOne() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php index 6c5c6b22..c58ebf51 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php @@ -41,15 +41,15 @@ class PropertyPathTest extends TestCase public function providePathsContainingUnexpectedCharacters() { - return array( - array('property.'), - array('property.['), - array('property..'), - array('property['), - array('property[['), - array('property[.'), - array('property[]'), - ); + return [ + ['property.'], + ['property.['], + ['property..'], + ['property['], + ['property[['], + ['property[.'], + ['property[]'], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/StringUtilTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/StringUtilTest.php index 86829f41..633ee28c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/StringUtilTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/StringUtilTest.php @@ -23,9 +23,9 @@ class StringUtilTest extends TestCase { // This is only a stub to make sure the BC layer works // Actual tests are in the Symfony Inflector component - return array( - array('axes', array('ax', 'axe', 'axis')), - ); + return [ + ['axes', ['ax', 'axe', 'axis']], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php index c500d5fe..7d47cd04 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php @@ -36,7 +36,7 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property /** * @var DocBlock[] */ - private $docBlocks = array(); + private $docBlocks = []; private $docBlockFactory; private $contextFactory; @@ -68,7 +68,7 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property /** * {@inheritdoc} */ - public function getShortDescription($class, $property, array $context = array()) + public function getShortDescription($class, $property, array $context = []) { /** @var $docBlock DocBlock */ list($docBlock) = $this->getDocBlock($class, $property); @@ -94,7 +94,7 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property /** * {@inheritdoc} */ - public function getLongDescription($class, $property, array $context = array()) + public function getLongDescription($class, $property, array $context = []) { /** @var $docBlock DocBlock */ list($docBlock) = $this->getDocBlock($class, $property); @@ -110,7 +110,7 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property /** * {@inheritdoc} */ - public function getTypes($class, $property, array $context = array()) + public function getTypes($class, $property, array $context = []) { /** @var $docBlock DocBlock */ list($docBlock, $source, $prefix) = $this->getDocBlock($class, $property); @@ -132,7 +132,7 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property break; } - $types = array(); + $types = []; /** @var DocBlock\Tags\Var_|DocBlock\Tags\Return_|DocBlock\Tags\Param $tag */ foreach ($docBlock->getTagsByName($tag) as $tag) { if ($tag && null !== $tag->getType()) { @@ -148,7 +148,7 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property return $types; } - return array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), $types[0])); + return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), $types[0])]; } /** @@ -171,19 +171,19 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property switch (true) { case $docBlock = $this->getDocBlockFromProperty($class, $property): - $data = array($docBlock, self::PROPERTY, null); + $data = [$docBlock, self::PROPERTY, null]; break; case list($docBlock) = $this->getDocBlockFromMethod($class, $ucFirstProperty, self::ACCESSOR): - $data = array($docBlock, self::ACCESSOR, null); + $data = [$docBlock, self::ACCESSOR, null]; break; case list($docBlock, $prefix) = $this->getDocBlockFromMethod($class, $ucFirstProperty, self::MUTATOR): - $data = array($docBlock, self::MUTATOR, $prefix); + $data = [$docBlock, self::MUTATOR, $prefix]; break; default: - $data = array(null, null, null); + $data = [null, null, null]; } return $this->docBlocks[$propertyHash] = $data; @@ -252,7 +252,7 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property } try { - return array($this->docBlockFactory->create($reflectionMethod, $this->contextFactory->createFromReflector($reflectionMethod)), $prefix); + return [$this->docBlockFactory->create($reflectionMethod, $this->contextFactory->createFromReflector($reflectionMethod)), $prefix]; } catch (\InvalidArgumentException $e) { return null; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php index 41c947d8..51354921 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php @@ -29,17 +29,17 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp /** * @internal */ - public static $defaultMutatorPrefixes = array('add', 'remove', 'set'); + public static $defaultMutatorPrefixes = ['add', 'remove', 'set']; /** * @internal */ - public static $defaultAccessorPrefixes = array('is', 'can', 'get'); + public static $defaultAccessorPrefixes = ['is', 'can', 'get']; /** * @internal */ - public static $defaultArrayMutatorPrefixes = array('add', 'remove'); + public static $defaultArrayMutatorPrefixes = ['add', 'remove']; /** * @var bool @@ -77,7 +77,7 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp /** * {@inheritdoc} */ - public function getProperties($class, array $context = array()) + public function getProperties($class, array $context = []) { try { $reflectionClass = new \ReflectionClass($class); @@ -87,7 +87,7 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp $reflectionProperties = $reflectionClass->getProperties(); - $properties = array(); + $properties = []; foreach ($reflectionProperties as $reflectionProperty) { if ($reflectionProperty->isPublic()) { $properties[$reflectionProperty->name] = $reflectionProperty->name; @@ -115,7 +115,7 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp /** * {@inheritdoc} */ - public function getTypes($class, $property, array $context = array()) + public function getTypes($class, $property, array $context = []) { if ($fromMutator = $this->extractFromMutator($class, $property)) { return $fromMutator; @@ -129,7 +129,7 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp /** * {@inheritdoc} */ - public function isReadable($class, $property, array $context = array()) + public function isReadable($class, $property, array $context = []) { if ($this->isPublicProperty($class, $property)) { return true; @@ -143,7 +143,7 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp /** * {@inheritdoc} */ - public function isWritable($class, $property, array $context = array()) + public function isWritable($class, $property, array $context = []) { if ($this->isPublicProperty($class, $property)) { return true; @@ -198,7 +198,7 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp $type = new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), $type); } - return array($type); + return [$type]; } /** @@ -217,11 +217,11 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp } if ($this->supportsParameterType && $reflectionType = $reflectionMethod->getReturnType()) { - return array($this->extractFromReflectionType($reflectionType, $reflectionMethod)); + return [$this->extractFromReflectionType($reflectionType, $reflectionMethod)]; } - if (\in_array($prefix, array('is', 'can'))) { - return array(new Type(Type::BUILTIN_TYPE_BOOL)); + if (\in_array($prefix, ['is', 'can'])) { + return [new Type(Type::BUILTIN_TYPE_BOOL)]; } } @@ -304,7 +304,7 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp } if (0 === $reflectionMethod->getNumberOfRequiredParameters()) { - return array($reflectionMethod, $prefix); + return [$reflectionMethod, $prefix]; } } catch (\ReflectionException $e) { // Return null if the property doesn't exist @@ -329,7 +329,7 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp $ucSingulars = (array) Inflector::singularize($ucProperty); foreach ($this->mutatorPrefixes as $prefix) { - $names = array($ucProperty); + $names = [$ucProperty]; if (\in_array($prefix, $this->arrayMutatorPrefixes)) { $names = array_merge($names, $ucSingulars); } @@ -343,7 +343,7 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp // Parameter can be optional to allow things like: method(array $foo = null) if ($reflectionMethod->getNumberOfParameters() >= 1) { - return array($reflectionMethod, $prefix); + return [$reflectionMethod, $prefix]; } } catch (\ReflectionException $e) { // Try the next prefix if the method doesn't exist diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/SerializerExtractor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/SerializerExtractor.php index 59acd4de..12955b6c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/SerializerExtractor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/SerializerExtractor.php @@ -33,7 +33,7 @@ class SerializerExtractor implements PropertyListExtractorInterface /** * {@inheritdoc} */ - public function getProperties($class, array $context = array()) + public function getProperties($class, array $context = []) { if (!isset($context['serializer_groups']) || !\is_array($context['serializer_groups'])) { return; @@ -43,7 +43,7 @@ class SerializerExtractor implements PropertyListExtractorInterface return; } - $properties = array(); + $properties = []; $serializerClassMetadata = $this->classMetadataFactory->getMetadataFor($class); foreach ($serializerClassMetadata->getAttributesMetadata() as $serializerAttributeMetadata) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/LICENSE index 24fa32c2..4cd8bdd3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Fabien Potencier +Copyright (c) 2015-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyAccessExtractorInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyAccessExtractorInterface.php index ecf44d9d..49d5afb0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyAccessExtractorInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyAccessExtractorInterface.php @@ -27,7 +27,7 @@ interface PropertyAccessExtractorInterface * * @return bool|null */ - public function isReadable($class, $property, array $context = array()); + public function isReadable($class, $property, array $context = []); /** * Is the property writable? @@ -38,5 +38,5 @@ interface PropertyAccessExtractorInterface * * @return bool|null */ - public function isWritable($class, $property, array $context = array()); + public function isWritable($class, $property, array $context = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyDescriptionExtractorInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyDescriptionExtractorInterface.php index 3f400a8f..385e772b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyDescriptionExtractorInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyDescriptionExtractorInterface.php @@ -27,7 +27,7 @@ interface PropertyDescriptionExtractorInterface * * @return string|null */ - public function getShortDescription($class, $property, array $context = array()); + public function getShortDescription($class, $property, array $context = []); /** * Gets the long description of the property. @@ -38,5 +38,5 @@ interface PropertyDescriptionExtractorInterface * * @return string|null */ - public function getLongDescription($class, $property, array $context = array()); + public function getLongDescription($class, $property, array $context = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyInfoCacheExtractor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyInfoCacheExtractor.php index 52e94b81..6f348095 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyInfoCacheExtractor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyInfoCacheExtractor.php @@ -24,7 +24,7 @@ class PropertyInfoCacheExtractor implements PropertyInfoExtractorInterface { private $propertyInfoExtractor; private $cacheItemPool; - private $arrayCache = array(); + private $arrayCache = []; public function __construct(PropertyInfoExtractorInterface $propertyInfoExtractor, CacheItemPoolInterface $cacheItemPool) { @@ -35,49 +35,49 @@ class PropertyInfoCacheExtractor implements PropertyInfoExtractorInterface /** * {@inheritdoc} */ - public function isReadable($class, $property, array $context = array()) + public function isReadable($class, $property, array $context = []) { - return $this->extract('isReadable', array($class, $property, $context)); + return $this->extract('isReadable', [$class, $property, $context]); } /** * {@inheritdoc} */ - public function isWritable($class, $property, array $context = array()) + public function isWritable($class, $property, array $context = []) { - return $this->extract('isWritable', array($class, $property, $context)); + return $this->extract('isWritable', [$class, $property, $context]); } /** * {@inheritdoc} */ - public function getShortDescription($class, $property, array $context = array()) + public function getShortDescription($class, $property, array $context = []) { - return $this->extract('getShortDescription', array($class, $property, $context)); + return $this->extract('getShortDescription', [$class, $property, $context]); } /** * {@inheritdoc} */ - public function getLongDescription($class, $property, array $context = array()) + public function getLongDescription($class, $property, array $context = []) { - return $this->extract('getLongDescription', array($class, $property, $context)); + return $this->extract('getLongDescription', [$class, $property, $context]); } /** * {@inheritdoc} */ - public function getProperties($class, array $context = array()) + public function getProperties($class, array $context = []) { - return $this->extract('getProperties', array($class, $context)); + return $this->extract('getProperties', [$class, $context]); } /** * {@inheritdoc} */ - public function getTypes($class, $property, array $context = array()) + public function getTypes($class, $property, array $context = []) { - return $this->extract('getTypes', array($class, $property, $context)); + return $this->extract('getTypes', [$class, $property, $context]); } /** @@ -94,13 +94,13 @@ class PropertyInfoCacheExtractor implements PropertyInfoExtractorInterface $serializedArguments = serialize($arguments); } catch (\Exception $exception) { // If arguments are not serializable, skip the cache - return \call_user_func_array(array($this->propertyInfoExtractor, $method), $arguments); + return \call_user_func_array([$this->propertyInfoExtractor, $method], $arguments); } // Calling rawurlencode escapes special characters not allowed in PSR-6's keys $key = rawurlencode($method.'.'.$serializedArguments); - if (array_key_exists($key, $this->arrayCache)) { + if (\array_key_exists($key, $this->arrayCache)) { return $this->arrayCache[$key]; } @@ -110,7 +110,7 @@ class PropertyInfoCacheExtractor implements PropertyInfoExtractorInterface return $this->arrayCache[$key] = $item->get(); } - $value = \call_user_func_array(array($this->propertyInfoExtractor, $method), $arguments); + $value = \call_user_func_array([$this->propertyInfoExtractor, $method], $arguments); $item->set($value); $this->cacheItemPool->save($item); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyInfoExtractor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyInfoExtractor.php index 53881fb7..58cea088 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyInfoExtractor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyInfoExtractor.php @@ -31,7 +31,7 @@ class PropertyInfoExtractor implements PropertyInfoExtractorInterface * @param iterable|PropertyDescriptionExtractorInterface[] $descriptionExtractors * @param iterable|PropertyAccessExtractorInterface[] $accessExtractors */ - public function __construct($listExtractors = array(), $typeExtractors = array(), $descriptionExtractors = array(), $accessExtractors = array()) + public function __construct($listExtractors = [], $typeExtractors = [], $descriptionExtractors = [], $accessExtractors = []) { $this->listExtractors = $listExtractors; $this->typeExtractors = $typeExtractors; @@ -42,49 +42,49 @@ class PropertyInfoExtractor implements PropertyInfoExtractorInterface /** * {@inheritdoc} */ - public function getProperties($class, array $context = array()) + public function getProperties($class, array $context = []) { - return $this->extract($this->listExtractors, 'getProperties', array($class, $context)); + return $this->extract($this->listExtractors, 'getProperties', [$class, $context]); } /** * {@inheritdoc} */ - public function getShortDescription($class, $property, array $context = array()) + public function getShortDescription($class, $property, array $context = []) { - return $this->extract($this->descriptionExtractors, 'getShortDescription', array($class, $property, $context)); + return $this->extract($this->descriptionExtractors, 'getShortDescription', [$class, $property, $context]); } /** * {@inheritdoc} */ - public function getLongDescription($class, $property, array $context = array()) + public function getLongDescription($class, $property, array $context = []) { - return $this->extract($this->descriptionExtractors, 'getLongDescription', array($class, $property, $context)); + return $this->extract($this->descriptionExtractors, 'getLongDescription', [$class, $property, $context]); } /** * {@inheritdoc} */ - public function getTypes($class, $property, array $context = array()) + public function getTypes($class, $property, array $context = []) { - return $this->extract($this->typeExtractors, 'getTypes', array($class, $property, $context)); + return $this->extract($this->typeExtractors, 'getTypes', [$class, $property, $context]); } /** * {@inheritdoc} */ - public function isReadable($class, $property, array $context = array()) + public function isReadable($class, $property, array $context = []) { - return $this->extract($this->accessExtractors, 'isReadable', array($class, $property, $context)); + return $this->extract($this->accessExtractors, 'isReadable', [$class, $property, $context]); } /** * {@inheritdoc} */ - public function isWritable($class, $property, array $context = array()) + public function isWritable($class, $property, array $context = []) { - return $this->extract($this->accessExtractors, 'isWritable', array($class, $property, $context)); + return $this->extract($this->accessExtractors, 'isWritable', [$class, $property, $context]); } /** @@ -99,7 +99,7 @@ class PropertyInfoExtractor implements PropertyInfoExtractorInterface private function extract($extractors, $method, array $arguments) { foreach ($extractors as $extractor) { - $value = \call_user_func_array(array($extractor, $method), $arguments); + $value = \call_user_func_array([$extractor, $method], $arguments); if (null !== $value) { return $value; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyListExtractorInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyListExtractorInterface.php index 1faae33d..2c831731 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyListExtractorInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyListExtractorInterface.php @@ -26,5 +26,5 @@ interface PropertyListExtractorInterface * * @return string[]|null */ - public function getProperties($class, array $context = array()); + public function getProperties($class, array $context = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyTypeExtractorInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyTypeExtractorInterface.php index 8aa08b4e..c970530f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyTypeExtractorInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyTypeExtractorInterface.php @@ -27,5 +27,5 @@ interface PropertyTypeExtractorInterface * * @return Type[]|null */ - public function getTypes($class, $property, array $context = array()); + public function getTypes($class, $property, array $context = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/AbstractPropertyInfoExtractorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/AbstractPropertyInfoExtractorTest.php index 5b729c79..f0897d71 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/AbstractPropertyInfoExtractorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/AbstractPropertyInfoExtractorTest.php @@ -29,7 +29,7 @@ class AbstractPropertyInfoExtractorTest extends TestCase protected function setUp() { - $extractors = array(new NullExtractor(), new DummyExtractor()); + $extractors = [new NullExtractor(), new DummyExtractor()]; $this->propertyInfo = new PropertyInfoExtractor($extractors, $extractors, $extractors, $extractors); } @@ -43,31 +43,31 @@ class AbstractPropertyInfoExtractorTest extends TestCase public function testGetShortDescription() { - $this->assertSame('short', $this->propertyInfo->getShortDescription('Foo', 'bar', array())); + $this->assertSame('short', $this->propertyInfo->getShortDescription('Foo', 'bar', [])); } public function testGetLongDescription() { - $this->assertSame('long', $this->propertyInfo->getLongDescription('Foo', 'bar', array())); + $this->assertSame('long', $this->propertyInfo->getLongDescription('Foo', 'bar', [])); } public function testGetTypes() { - $this->assertEquals(array(new Type(Type::BUILTIN_TYPE_INT)), $this->propertyInfo->getTypes('Foo', 'bar', array())); + $this->assertEquals([new Type(Type::BUILTIN_TYPE_INT)], $this->propertyInfo->getTypes('Foo', 'bar', [])); } public function testIsReadable() { - $this->assertTrue($this->propertyInfo->isReadable('Foo', 'bar', array())); + $this->assertTrue($this->propertyInfo->isReadable('Foo', 'bar', [])); } public function testIsWritable() { - $this->assertTrue($this->propertyInfo->isWritable('Foo', 'bar', array())); + $this->assertTrue($this->propertyInfo->isWritable('Foo', 'bar', [])); } public function testGetProperties() { - $this->assertEquals(array('a', 'b'), $this->propertyInfo->getProperties('Foo')); + $this->assertEquals(['a', 'b'], $this->propertyInfo->getProperties('Foo')); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/DependencyInjection/PropertyInfoPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/DependencyInjection/PropertyInfoPassTest.php index 031e34af..02cc10e8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/DependencyInjection/PropertyInfoPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/DependencyInjection/PropertyInfoPassTest.php @@ -26,44 +26,44 @@ class PropertyInfoPassTest extends TestCase { $container = new ContainerBuilder(); - $definition = $container->register('property_info')->setArguments(array(null, null, null, null)); - $container->register('n2')->addTag($tag, array('priority' => 100)); - $container->register('n1')->addTag($tag, array('priority' => 200)); + $definition = $container->register('property_info')->setArguments([null, null, null, null]); + $container->register('n2')->addTag($tag, ['priority' => 100]); + $container->register('n1')->addTag($tag, ['priority' => 200]); $container->register('n3')->addTag($tag); $propertyInfoPass = new PropertyInfoPass(); $propertyInfoPass->process($container); - $expected = new IteratorArgument(array( + $expected = new IteratorArgument([ new Reference('n1'), new Reference('n2'), new Reference('n3'), - )); + ]); $this->assertEquals($expected, $definition->getArgument($index)); } public function provideTags() { - return array( - array(0, 'property_info.list_extractor'), - array(1, 'property_info.type_extractor'), - array(2, 'property_info.description_extractor'), - array(3, 'property_info.access_extractor'), - ); + return [ + [0, 'property_info.list_extractor'], + [1, 'property_info.type_extractor'], + [2, 'property_info.description_extractor'], + [3, 'property_info.access_extractor'], + ]; } public function testReturningEmptyArrayWhenNoService() { $container = new ContainerBuilder(); $propertyInfoExtractorDefinition = $container->register('property_info') - ->setArguments(array(array(), array(), array(), array())); + ->setArguments([[], [], [], []]); $propertyInfoPass = new PropertyInfoPass(); $propertyInfoPass->process($container); - $this->assertEquals(new IteratorArgument(array()), $propertyInfoExtractorDefinition->getArgument(0)); - $this->assertEquals(new IteratorArgument(array()), $propertyInfoExtractorDefinition->getArgument(1)); - $this->assertEquals(new IteratorArgument(array()), $propertyInfoExtractorDefinition->getArgument(2)); - $this->assertEquals(new IteratorArgument(array()), $propertyInfoExtractorDefinition->getArgument(3)); + $this->assertEquals(new IteratorArgument([]), $propertyInfoExtractorDefinition->getArgument(0)); + $this->assertEquals(new IteratorArgument([]), $propertyInfoExtractorDefinition->getArgument(1)); + $this->assertEquals(new IteratorArgument([]), $propertyInfoExtractorDefinition->getArgument(2)); + $this->assertEquals(new IteratorArgument([]), $propertyInfoExtractorDefinition->getArgument(3)); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php index 6766b249..f4f9e9dc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php @@ -50,7 +50,7 @@ class PhpDocExtractorTest extends TestCase */ public function testExtractTypesWithCustomPrefixes($property, array $type = null) { - $customExtractor = new PhpDocExtractor(null, array('add', 'remove'), array('is', 'can')); + $customExtractor = new PhpDocExtractor(null, ['add', 'remove'], ['is', 'can']); $this->assertEquals($type, $customExtractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property)); } @@ -60,130 +60,130 @@ class PhpDocExtractorTest extends TestCase */ public function testExtractTypesWithNoPrefixes($property, array $type = null) { - $noPrefixExtractor = new PhpDocExtractor(null, array(), array(), array()); + $noPrefixExtractor = new PhpDocExtractor(null, [], [], []); $this->assertEquals($type, $noPrefixExtractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property)); } public function typesProvider() { - return array( - array('foo', null, 'Short description.', 'Long description.'), - array('bar', array(new Type(Type::BUILTIN_TYPE_STRING)), 'This is bar', null), - array('baz', array(new Type(Type::BUILTIN_TYPE_INT)), 'Should be used.', null), - array('foo2', array(new Type(Type::BUILTIN_TYPE_FLOAT)), null, null), - array('foo3', array(new Type(Type::BUILTIN_TYPE_CALLABLE)), null, null), - array('foo4', array(new Type(Type::BUILTIN_TYPE_NULL)), null, null), - array('foo5', null, null, null), - array( + return [ + ['foo', null, 'Short description.', 'Long description.'], + ['bar', [new Type(Type::BUILTIN_TYPE_STRING)], 'This is bar', null], + ['baz', [new Type(Type::BUILTIN_TYPE_INT)], 'Should be used.', null], + ['foo2', [new Type(Type::BUILTIN_TYPE_FLOAT)], null, null], + ['foo3', [new Type(Type::BUILTIN_TYPE_CALLABLE)], null, null], + ['foo4', [new Type(Type::BUILTIN_TYPE_NULL)], null, null], + ['foo5', null, null, null], + [ 'files', - array( + [ new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'SplFileInfo')), new Type(Type::BUILTIN_TYPE_RESOURCE), - ), + ], null, null, - ), - array('bal', array(new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime')), null, null), - array('parent', array(new Type(Type::BUILTIN_TYPE_OBJECT, false, 'Symfony\Component\PropertyInfo\Tests\Fixtures\ParentDummy')), null, null), - array('collection', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime'))), null, null), - array('nestedCollection', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING, false)))), null, null), - array('mixedCollection', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, null, null)), null, null), - array('a', array(new Type(Type::BUILTIN_TYPE_INT)), 'A.', null), - array('b', array(new Type(Type::BUILTIN_TYPE_OBJECT, true, 'Symfony\Component\PropertyInfo\Tests\Fixtures\ParentDummy')), 'B.', null), - array('c', array(new Type(Type::BUILTIN_TYPE_BOOL, true)), null, null), - array('d', array(new Type(Type::BUILTIN_TYPE_BOOL)), null, null), - array('e', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_RESOURCE))), null, null), - array('f', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime'))), null, null), - array('g', array(new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true)), 'Nullable array.', null), - array('h', array(new Type(Type::BUILTIN_TYPE_STRING, true)), null, null), - array('i', array(new Type(Type::BUILTIN_TYPE_STRING, true), new Type(Type::BUILTIN_TYPE_INT, true)), null, null), - array('j', array(new Type(Type::BUILTIN_TYPE_OBJECT, true, 'DateTime')), null, null), - array('donotexist', null, null, null), - array('staticGetter', null, null, null), - array('staticSetter', null, null, null), - array('emptyVar', null, null, null), - ); + ], + ['bal', [new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime')], null, null], + ['parent', [new Type(Type::BUILTIN_TYPE_OBJECT, false, 'Symfony\Component\PropertyInfo\Tests\Fixtures\ParentDummy')], null, null], + ['collection', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime'))], null, null], + ['nestedCollection', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING, false)))], null, null], + ['mixedCollection', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, null, null)], null, null], + ['a', [new Type(Type::BUILTIN_TYPE_INT)], 'A.', null], + ['b', [new Type(Type::BUILTIN_TYPE_OBJECT, true, 'Symfony\Component\PropertyInfo\Tests\Fixtures\ParentDummy')], 'B.', null], + ['c', [new Type(Type::BUILTIN_TYPE_BOOL, true)], null, null], + ['d', [new Type(Type::BUILTIN_TYPE_BOOL)], null, null], + ['e', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_RESOURCE))], null, null], + ['f', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime'))], null, null], + ['g', [new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true)], 'Nullable array.', null], + ['h', [new Type(Type::BUILTIN_TYPE_STRING, true)], null, null], + ['i', [new Type(Type::BUILTIN_TYPE_STRING, true), new Type(Type::BUILTIN_TYPE_INT, true)], null, null], + ['j', [new Type(Type::BUILTIN_TYPE_OBJECT, true, 'DateTime')], null, null], + ['donotexist', null, null, null], + ['staticGetter', null, null, null], + ['staticSetter', null, null, null], + ['emptyVar', null, null, null], + ]; } public function typesWithCustomPrefixesProvider() { - return array( - array('foo', null, 'Short description.', 'Long description.'), - array('bar', array(new Type(Type::BUILTIN_TYPE_STRING)), 'This is bar', null), - array('baz', array(new Type(Type::BUILTIN_TYPE_INT)), 'Should be used.', null), - array('foo2', array(new Type(Type::BUILTIN_TYPE_FLOAT)), null, null), - array('foo3', array(new Type(Type::BUILTIN_TYPE_CALLABLE)), null, null), - array('foo4', array(new Type(Type::BUILTIN_TYPE_NULL)), null, null), - array('foo5', null, null, null), - array( + return [ + ['foo', null, 'Short description.', 'Long description.'], + ['bar', [new Type(Type::BUILTIN_TYPE_STRING)], 'This is bar', null], + ['baz', [new Type(Type::BUILTIN_TYPE_INT)], 'Should be used.', null], + ['foo2', [new Type(Type::BUILTIN_TYPE_FLOAT)], null, null], + ['foo3', [new Type(Type::BUILTIN_TYPE_CALLABLE)], null, null], + ['foo4', [new Type(Type::BUILTIN_TYPE_NULL)], null, null], + ['foo5', null, null, null], + [ 'files', - array( + [ new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'SplFileInfo')), new Type(Type::BUILTIN_TYPE_RESOURCE), - ), + ], null, null, - ), - array('bal', array(new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime')), null, null), - array('parent', array(new Type(Type::BUILTIN_TYPE_OBJECT, false, 'Symfony\Component\PropertyInfo\Tests\Fixtures\ParentDummy')), null, null), - array('collection', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime'))), null, null), - array('nestedCollection', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING, false)))), null, null), - array('mixedCollection', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, null, null)), null, null), - array('a', null, 'A.', null), - array('b', null, 'B.', null), - array('c', array(new Type(Type::BUILTIN_TYPE_BOOL, true)), null, null), - array('d', array(new Type(Type::BUILTIN_TYPE_BOOL)), null, null), - array('e', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_RESOURCE))), null, null), - array('f', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime'))), null, null), - array('g', array(new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true)), 'Nullable array.', null), - array('h', array(new Type(Type::BUILTIN_TYPE_STRING, true)), null, null), - array('i', array(new Type(Type::BUILTIN_TYPE_STRING, true), new Type(Type::BUILTIN_TYPE_INT, true)), null, null), - array('j', array(new Type(Type::BUILTIN_TYPE_OBJECT, true, 'DateTime')), null, null), - array('donotexist', null, null, null), - array('staticGetter', null, null, null), - array('staticSetter', null, null, null), - ); + ], + ['bal', [new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime')], null, null], + ['parent', [new Type(Type::BUILTIN_TYPE_OBJECT, false, 'Symfony\Component\PropertyInfo\Tests\Fixtures\ParentDummy')], null, null], + ['collection', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime'))], null, null], + ['nestedCollection', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING, false)))], null, null], + ['mixedCollection', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, null, null)], null, null], + ['a', null, 'A.', null], + ['b', null, 'B.', null], + ['c', [new Type(Type::BUILTIN_TYPE_BOOL, true)], null, null], + ['d', [new Type(Type::BUILTIN_TYPE_BOOL)], null, null], + ['e', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_RESOURCE))], null, null], + ['f', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime'))], null, null], + ['g', [new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true)], 'Nullable array.', null], + ['h', [new Type(Type::BUILTIN_TYPE_STRING, true)], null, null], + ['i', [new Type(Type::BUILTIN_TYPE_STRING, true), new Type(Type::BUILTIN_TYPE_INT, true)], null, null], + ['j', [new Type(Type::BUILTIN_TYPE_OBJECT, true, 'DateTime')], null, null], + ['donotexist', null, null, null], + ['staticGetter', null, null, null], + ['staticSetter', null, null, null], + ]; } public function typesWithNoPrefixesProvider() { - return array( - array('foo', null, 'Short description.', 'Long description.'), - array('bar', array(new Type(Type::BUILTIN_TYPE_STRING)), 'This is bar', null), - array('baz', array(new Type(Type::BUILTIN_TYPE_INT)), 'Should be used.', null), - array('foo2', array(new Type(Type::BUILTIN_TYPE_FLOAT)), null, null), - array('foo3', array(new Type(Type::BUILTIN_TYPE_CALLABLE)), null, null), - array('foo4', array(new Type(Type::BUILTIN_TYPE_NULL)), null, null), - array('foo5', null, null, null), - array( + return [ + ['foo', null, 'Short description.', 'Long description.'], + ['bar', [new Type(Type::BUILTIN_TYPE_STRING)], 'This is bar', null], + ['baz', [new Type(Type::BUILTIN_TYPE_INT)], 'Should be used.', null], + ['foo2', [new Type(Type::BUILTIN_TYPE_FLOAT)], null, null], + ['foo3', [new Type(Type::BUILTIN_TYPE_CALLABLE)], null, null], + ['foo4', [new Type(Type::BUILTIN_TYPE_NULL)], null, null], + ['foo5', null, null, null], + [ 'files', - array( + [ new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'SplFileInfo')), new Type(Type::BUILTIN_TYPE_RESOURCE), - ), + ], null, null, - ), - array('bal', array(new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime')), null, null), - array('parent', array(new Type(Type::BUILTIN_TYPE_OBJECT, false, 'Symfony\Component\PropertyInfo\Tests\Fixtures\ParentDummy')), null, null), - array('collection', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime'))), null, null), - array('nestedCollection', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING, false)))), null, null), - array('mixedCollection', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, null, null)), null, null), - array('a', null, 'A.', null), - array('b', null, 'B.', null), - array('c', null, null, null), - array('d', null, null, null), - array('e', null, null, null), - array('f', null, null, null), - array('g', array(new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true)), 'Nullable array.', null), - array('h', array(new Type(Type::BUILTIN_TYPE_STRING, true)), null, null), - array('i', array(new Type(Type::BUILTIN_TYPE_STRING, true), new Type(Type::BUILTIN_TYPE_INT, true)), null, null), - array('j', array(new Type(Type::BUILTIN_TYPE_OBJECT, true, 'DateTime')), null, null), - array('donotexist', null, null, null), - array('staticGetter', null, null, null), - array('staticSetter', null, null, null), - ); + ], + ['bal', [new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime')], null, null], + ['parent', [new Type(Type::BUILTIN_TYPE_OBJECT, false, 'Symfony\Component\PropertyInfo\Tests\Fixtures\ParentDummy')], null, null], + ['collection', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime'))], null, null], + ['nestedCollection', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING, false)))], null, null], + ['mixedCollection', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, null, null)], null, null], + ['a', null, 'A.', null], + ['b', null, 'B.', null], + ['c', null, null, null], + ['d', null, null, null], + ['e', null, null, null], + ['f', null, null, null], + ['g', [new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true)], 'Nullable array.', null], + ['h', [new Type(Type::BUILTIN_TYPE_STRING, true)], null, null], + ['i', [new Type(Type::BUILTIN_TYPE_STRING, true), new Type(Type::BUILTIN_TYPE_INT, true)], null, null], + ['j', [new Type(Type::BUILTIN_TYPE_OBJECT, true, 'DateTime')], null, null], + ['donotexist', null, null, null], + ['staticGetter', null, null, null], + ['staticSetter', null, null, null], + ]; } public function testReturnNullOnEmptyDocBlock() @@ -193,17 +193,17 @@ class PhpDocExtractorTest extends TestCase public function dockBlockFallbackTypesProvider() { - return array( - 'pub' => array( - 'pub', array(new Type(Type::BUILTIN_TYPE_STRING)), - ), - 'protAcc' => array( - 'protAcc', array(new Type(Type::BUILTIN_TYPE_INT)), - ), - 'protMut' => array( - 'protMut', array(new Type(Type::BUILTIN_TYPE_BOOL)), - ), - ); + return [ + 'pub' => [ + 'pub', [new Type(Type::BUILTIN_TYPE_STRING)], + ], + 'protAcc' => [ + 'protAcc', [new Type(Type::BUILTIN_TYPE_INT)], + ], + 'protMut' => [ + 'protMut', [new Type(Type::BUILTIN_TYPE_BOOL)], + ], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php index 24ef0623..0ed5390b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php @@ -34,7 +34,7 @@ class ReflectionExtractorTest extends TestCase public function testGetProperties() { $this->assertSame( - array( + [ 'bal', 'parent', 'collection', @@ -63,7 +63,7 @@ class ReflectionExtractorTest extends TestCase 'd', 'e', 'f', - ), + ], $this->extractor->getProperties('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy') ); @@ -72,10 +72,10 @@ class ReflectionExtractorTest extends TestCase public function testGetPropertiesWithCustomPrefixes() { - $customExtractor = new ReflectionExtractor(array('add', 'remove'), array('is', 'can')); + $customExtractor = new ReflectionExtractor(['add', 'remove'], ['is', 'can']); $this->assertSame( - array( + [ 'bal', 'parent', 'collection', @@ -98,17 +98,17 @@ class ReflectionExtractorTest extends TestCase 'd', 'e', 'f', - ), + ], $customExtractor->getProperties('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy') ); } public function testGetPropertiesWithNoPrefixes() { - $noPrefixExtractor = new ReflectionExtractor(array(), array(), array()); + $noPrefixExtractor = new ReflectionExtractor([], [], []); $this->assertSame( - array( + [ 'bal', 'parent', 'collection', @@ -127,7 +127,7 @@ class ReflectionExtractorTest extends TestCase 'foo4', 'foo5', 'files', - ), + ], $noPrefixExtractor->getProperties('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy') ); } @@ -137,24 +137,24 @@ class ReflectionExtractorTest extends TestCase */ public function testExtractors($property, array $type = null) { - $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property, array())); + $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property, [])); } public function typesProvider() { - return array( - array('a', null), - array('b', array(new Type(Type::BUILTIN_TYPE_OBJECT, true, 'Symfony\Component\PropertyInfo\Tests\Fixtures\ParentDummy'))), - array('c', array(new Type(Type::BUILTIN_TYPE_BOOL))), - array('d', array(new Type(Type::BUILTIN_TYPE_BOOL))), - array('e', null), - array('f', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime')))), - array('donotexist', null), - array('staticGetter', null), - array('staticSetter', null), - array('self', array(new Type(Type::BUILTIN_TYPE_OBJECT, false, 'Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy'))), - array('realParent', array(new Type(Type::BUILTIN_TYPE_OBJECT, false, 'Symfony\Component\PropertyInfo\Tests\Fixtures\ParentDummy'))), - ); + return [ + ['a', null], + ['b', [new Type(Type::BUILTIN_TYPE_OBJECT, true, 'Symfony\Component\PropertyInfo\Tests\Fixtures\ParentDummy')]], + ['c', [new Type(Type::BUILTIN_TYPE_BOOL)]], + ['d', [new Type(Type::BUILTIN_TYPE_BOOL)]], + ['e', null], + ['f', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime'))]], + ['donotexist', null], + ['staticGetter', null], + ['staticSetter', null], + ['self', [new Type(Type::BUILTIN_TYPE_OBJECT, false, 'Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy')]], + ['realParent', [new Type(Type::BUILTIN_TYPE_OBJECT, false, 'Symfony\Component\PropertyInfo\Tests\Fixtures\ParentDummy')]], + ]; } /** @@ -163,19 +163,19 @@ class ReflectionExtractorTest extends TestCase */ public function testExtractPhp7Type($property, array $type = null) { - $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php7Dummy', $property, array())); + $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php7Dummy', $property, [])); } public function php7TypesProvider() { - return array( - array('foo', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true))), - array('bar', array(new Type(Type::BUILTIN_TYPE_INT))), - array('baz', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING)))), - array('buz', array(new Type(Type::BUILTIN_TYPE_OBJECT, false, 'Symfony\Component\PropertyInfo\Tests\Fixtures\Php7Dummy'))), - array('biz', array(new Type(Type::BUILTIN_TYPE_OBJECT, false, 'stdClass'))), - array('donotexist', null), - ); + return [ + ['foo', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true)]], + ['bar', [new Type(Type::BUILTIN_TYPE_INT)]], + ['baz', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING))]], + ['buz', [new Type(Type::BUILTIN_TYPE_OBJECT, false, 'Symfony\Component\PropertyInfo\Tests\Fixtures\Php7Dummy')]], + ['biz', [new Type(Type::BUILTIN_TYPE_OBJECT, false, 'stdClass')]], + ['donotexist', null], + ]; } /** @@ -184,18 +184,18 @@ class ReflectionExtractorTest extends TestCase */ public function testExtractPhp71Type($property, array $type = null) { - $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php71Dummy', $property, array())); + $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php71Dummy', $property, [])); } public function php71TypesProvider() { - return array( - array('foo', array(new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true))), - array('buz', array(new Type(Type::BUILTIN_TYPE_NULL))), - array('bar', array(new Type(Type::BUILTIN_TYPE_INT, true))), - array('baz', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING)))), - array('donotexist', null), - ); + return [ + ['foo', [new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true)]], + ['buz', [new Type(Type::BUILTIN_TYPE_NULL)]], + ['bar', [new Type(Type::BUILTIN_TYPE_INT, true)]], + ['baz', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING))]], + ['donotexist', null], + ]; } /** @@ -205,27 +205,27 @@ class ReflectionExtractorTest extends TestCase { $this->assertSame( $expected, - $this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property, array()) + $this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property, []) ); } public function getReadableProperties() { - return array( - array('bar', false), - array('baz', false), - array('parent', true), - array('a', true), - array('b', false), - array('c', true), - array('d', true), - array('e', false), - array('f', false), - array('Id', true), - array('id', true), - array('Guid', true), - array('guid', false), - ); + return [ + ['bar', false], + ['baz', false], + ['parent', true], + ['a', true], + ['b', false], + ['c', true], + ['d', true], + ['e', false], + ['f', false], + ['Id', true], + ['id', true], + ['Guid', true], + ['guid', false], + ]; } /** @@ -235,32 +235,32 @@ class ReflectionExtractorTest extends TestCase { $this->assertSame( $expected, - $this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property, array()) + $this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property, []) ); } public function getWritableProperties() { - return array( - array('bar', false), - array('baz', false), - array('parent', true), - array('a', false), - array('b', true), - array('c', false), - array('d', false), - array('e', true), - array('f', true), - array('Id', false), - array('Guid', true), - array('guid', false), - ); + return [ + ['bar', false], + ['baz', false], + ['parent', true], + ['a', false], + ['b', true], + ['c', false], + ['d', false], + ['e', true], + ['f', true], + ['Id', false], + ['Guid', true], + ['guid', false], + ]; } public function testSingularize() { $this->assertTrue($this->extractor->isWritable(AdderRemoverDummy::class, 'analyses')); $this->assertTrue($this->extractor->isWritable(AdderRemoverDummy::class, 'feet')); - $this->assertEquals(array('analyses', 'feet'), $this->extractor->getProperties(AdderRemoverDummy::class)); + $this->assertEquals(['analyses', 'feet'], $this->extractor->getProperties(AdderRemoverDummy::class)); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractor/SerializerExtractorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractor/SerializerExtractorTest.php index 91cdf80f..791398e3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractor/SerializerExtractorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractor/SerializerExtractorTest.php @@ -36,8 +36,8 @@ class SerializerExtractorTest extends TestCase public function testGetProperties() { $this->assertEquals( - array('collection'), - $this->extractor->getProperties('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', array('serializer_groups' => array('a'))) + ['collection'], + $this->extractor->getProperties('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', ['serializer_groups' => ['a']]) ); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/DummyExtractor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/DummyExtractor.php index cfabcf2a..cb17020a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/DummyExtractor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/DummyExtractor.php @@ -25,7 +25,7 @@ class DummyExtractor implements PropertyListExtractorInterface, PropertyDescript /** * {@inheritdoc} */ - public function getShortDescription($class, $property, array $context = array()) + public function getShortDescription($class, $property, array $context = []) { return 'short'; } @@ -33,7 +33,7 @@ class DummyExtractor implements PropertyListExtractorInterface, PropertyDescript /** * {@inheritdoc} */ - public function getLongDescription($class, $property, array $context = array()) + public function getLongDescription($class, $property, array $context = []) { return 'long'; } @@ -41,15 +41,15 @@ class DummyExtractor implements PropertyListExtractorInterface, PropertyDescript /** * {@inheritdoc} */ - public function getTypes($class, $property, array $context = array()) + public function getTypes($class, $property, array $context = []) { - return array(new Type(Type::BUILTIN_TYPE_INT)); + return [new Type(Type::BUILTIN_TYPE_INT)]; } /** * {@inheritdoc} */ - public function isReadable($class, $property, array $context = array()) + public function isReadable($class, $property, array $context = []) { return true; } @@ -57,7 +57,7 @@ class DummyExtractor implements PropertyListExtractorInterface, PropertyDescript /** * {@inheritdoc} */ - public function isWritable($class, $property, array $context = array()) + public function isWritable($class, $property, array $context = []) { return true; } @@ -65,8 +65,8 @@ class DummyExtractor implements PropertyListExtractorInterface, PropertyDescript /** * {@inheritdoc} */ - public function getProperties($class, array $context = array()) + public function getProperties($class, array $context = []) { - return array('a', 'b'); + return ['a', 'b']; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/NullExtractor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/NullExtractor.php index 1f263bfc..c6a1785f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/NullExtractor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/NullExtractor.php @@ -26,7 +26,7 @@ class NullExtractor implements PropertyListExtractorInterface, PropertyDescripti /** * {@inheritdoc} */ - public function getShortDescription($class, $property, array $context = array()) + public function getShortDescription($class, $property, array $context = []) { $this->assertIsString($class); $this->assertIsString($property); @@ -35,7 +35,7 @@ class NullExtractor implements PropertyListExtractorInterface, PropertyDescripti /** * {@inheritdoc} */ - public function getLongDescription($class, $property, array $context = array()) + public function getLongDescription($class, $property, array $context = []) { $this->assertIsString($class); $this->assertIsString($property); @@ -44,7 +44,7 @@ class NullExtractor implements PropertyListExtractorInterface, PropertyDescripti /** * {@inheritdoc} */ - public function getTypes($class, $property, array $context = array()) + public function getTypes($class, $property, array $context = []) { $this->assertIsString($class); $this->assertIsString($property); @@ -53,7 +53,7 @@ class NullExtractor implements PropertyListExtractorInterface, PropertyDescripti /** * {@inheritdoc} */ - public function isReadable($class, $property, array $context = array()) + public function isReadable($class, $property, array $context = []) { $this->assertIsString($class); $this->assertIsString($property); @@ -62,7 +62,7 @@ class NullExtractor implements PropertyListExtractorInterface, PropertyDescripti /** * {@inheritdoc} */ - public function isWritable($class, $property, array $context = array()) + public function isWritable($class, $property, array $context = []) { $this->assertIsString($class); $this->assertIsString($property); @@ -71,7 +71,7 @@ class NullExtractor implements PropertyListExtractorInterface, PropertyDescripti /** * {@inheritdoc} */ - public function getProperties($class, array $context = array()) + public function getProperties($class, array $context = []) { $this->assertIsString($class); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Type.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Type.php index 53974fa5..e4088677 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Type.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Type.php @@ -36,7 +36,7 @@ class Type * * @var string[] */ - public static $builtinTypes = array( + public static $builtinTypes = [ self::BUILTIN_TYPE_INT, self::BUILTIN_TYPE_FLOAT, self::BUILTIN_TYPE_STRING, @@ -47,7 +47,7 @@ class Type self::BUILTIN_TYPE_CALLABLE, self::BUILTIN_TYPE_NULL, self::BUILTIN_TYPE_ITERABLE, - ); + ]; private $builtinType; private $nullable; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Util/PhpDocTypeHelper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Util/PhpDocTypeHelper.php index 5031c12f..0879a045 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Util/PhpDocTypeHelper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Util/PhpDocTypeHelper.php @@ -32,7 +32,7 @@ final class PhpDocTypeHelper */ public function getTypes(DocType $varType) { - $types = array(); + $types = []; $nullable = false; if ($varType instanceof Nullable) { @@ -53,7 +53,7 @@ final class PhpDocTypeHelper return $types; } - $varTypes = array(); + $varTypes = []; for ($typeIndex = 0; $varType->has($typeIndex); ++$typeIndex) { $varTypes[] = (string) $varType->get($typeIndex); } @@ -155,9 +155,9 @@ final class PhpDocTypeHelper private function getPhpTypeAndClass($docType) { if (\in_array($docType, Type::$builtinTypes)) { - return array($docType, null); + return [$docType, null]; } - return array('object', substr($docType, 1)); + return ['object', substr($docType, 1)]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Annotation/Route.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Annotation/Route.php index da47cea4..338ba512 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Annotation/Route.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Annotation/Route.php @@ -23,12 +23,12 @@ class Route { private $path; private $name; - private $requirements = array(); - private $options = array(); - private $defaults = array(); + private $requirements = []; + private $options = []; + private $defaults = []; private $host; - private $methods = array(); - private $schemes = array(); + private $methods = []; + private $schemes = []; private $condition; /** @@ -114,7 +114,7 @@ class Route public function setSchemes($schemes) { - $this->schemes = \is_array($schemes) ? $schemes : array($schemes); + $this->schemes = \is_array($schemes) ? $schemes : [$schemes]; } public function getSchemes() @@ -124,7 +124,7 @@ class Route public function setMethods($methods) { - $this->methods = \is_array($methods) ? $methods : array($methods); + $this->methods = \is_array($methods) ? $methods : [$methods]; } public function getMethods() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/CHANGELOG.md b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/CHANGELOG.md index e278f8b1..3d34c1d1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/CHANGELOG.md +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/CHANGELOG.md @@ -41,7 +41,7 @@ CHANGELOG Before: ```php - $router->generate('blog_show', array('slug' => 'my-blog-post'), true); + $router->generate('blog_show', ['slug' => 'my-blog-post'], true); ``` After: @@ -49,7 +49,7 @@ CHANGELOG ```php use Symfony\Component\Routing\Generator\UrlGeneratorInterface; - $router->generate('blog_show', array('slug' => 'my-blog-post'), UrlGeneratorInterface::ABSOLUTE_URL); + $router->generate('blog_show', ['slug' => 'my-blog-post'], UrlGeneratorInterface::ABSOLUTE_URL); ``` 2.5.0 @@ -114,7 +114,7 @@ CHANGELOG ```php $route = new Route(); $route->setPath('/article/{id}'); - $route->setMethods(array('POST', 'PUT')); + $route->setMethods(['POST', 'PUT']); $route->setSchemes('https'); ``` @@ -169,10 +169,10 @@ CHANGELOG used with a single parameter. The other params `$prefix`, `$default`, `$requirements` and `$options` will still work, but have been deprecated. The `addPrefix` method should be used for this use-case instead. - Before: `$parentCollection->addCollection($collection, '/prefix', array(...), array(...))` + Before: `$parentCollection->addCollection($collection, '/prefix', [...], [...])` After: ```php - $collection->addPrefix('/prefix', array(...), array(...)); + $collection->addPrefix('/prefix', [...], [...]); $parentCollection->addCollection($collection); ``` * added support for the method default argument values when defining a @Route @@ -197,7 +197,7 @@ CHANGELOG (only relevant if you implemented your own RouteCompiler). * Added possibility to generate relative paths and network paths in the UrlGenerator, e.g. "../parent-file" and "//example.com/dir/file". The third parameter in - `UrlGeneratorInterface::generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH)` + `UrlGeneratorInterface::generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH)` now accepts more values and you should use the constants defined in `UrlGeneratorInterface` for claritiy. The old method calls with a Boolean parameter will continue to work because they equal the signature using the constants. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/CompiledRoute.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/CompiledRoute.php index 8ecf5153..23acc527 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/CompiledRoute.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/CompiledRoute.php @@ -37,7 +37,7 @@ class CompiledRoute implements \Serializable * @param array $hostVariables An array of host variables * @param array $variables An array of variables (variables defined in the path and in the host patterns) */ - public function __construct($staticPrefix, $regex, array $tokens, array $pathVariables, $hostRegex = null, array $hostTokens = array(), array $hostVariables = array(), array $variables = array()) + public function __construct($staticPrefix, $regex, array $tokens, array $pathVariables, $hostRegex = null, array $hostTokens = [], array $hostVariables = [], array $variables = []) { $this->staticPrefix = (string) $staticPrefix; $this->regex = $regex; @@ -54,7 +54,7 @@ class CompiledRoute implements \Serializable */ public function serialize() { - return serialize(array( + return serialize([ 'vars' => $this->variables, 'path_prefix' => $this->staticPrefix, 'path_regex' => $this->regex, @@ -63,7 +63,7 @@ class CompiledRoute implements \Serializable 'host_regex' => $this->hostRegex, 'host_tokens' => $this->hostTokens, 'host_vars' => $this->hostVariables, - )); + ]); } /** @@ -72,7 +72,7 @@ class CompiledRoute implements \Serializable public function unserialize($serialized) { if (\PHP_VERSION_ID >= 70000) { - $data = unserialize($serialized, array('allowed_classes' => false)); + $data = unserialize($serialized, ['allowed_classes' => false]); } else { $data = unserialize($serialized); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/DependencyInjection/RoutingResolverPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/DependencyInjection/RoutingResolverPass.php index 6e858104..5bdbfb82 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/DependencyInjection/RoutingResolverPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/DependencyInjection/RoutingResolverPass.php @@ -43,7 +43,7 @@ class RoutingResolverPass implements CompilerPassInterface $definition = $container->getDefinition($this->resolverServiceId); foreach ($this->findAndSortTaggedServices($this->loaderTag, $container) as $id) { - $definition->addMethodCall('addLoader', array(new Reference($id))); + $definition->addMethodCall('addLoader', [new Reference($id)]); } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/MethodNotAllowedException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/MethodNotAllowedException.php index 712412fe..cf108354 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/MethodNotAllowedException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/MethodNotAllowedException.php @@ -20,7 +20,7 @@ namespace Symfony\Component\Routing\Exception; */ class MethodNotAllowedException extends \RuntimeException implements ExceptionInterface { - protected $allowedMethods = array(); + protected $allowedMethods = []; public function __construct(array $allowedMethods, $message = null, $code = 0, \Exception $previous = null) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php index fed34723..096519aa 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php @@ -28,7 +28,7 @@ interface GeneratorDumperInterface * * @return string Executable code */ - public function dump(array $options = array()); + public function dump(array $options = []); /** * Gets the routes to dump. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php index 60bdf1da..2e99c81d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php @@ -31,12 +31,12 @@ class PhpGeneratorDumper extends GeneratorDumper * * @return string A PHP class representing the generator class */ - public function dump(array $options = array()) + public function dump(array $options = []) { - $options = array_merge(array( + $options = array_merge([ 'class' => 'ProjectUrlGenerator', 'base_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator', - ), $options); + ], $options); return <<getRoutes()->all() as $name => $route) { $compiledRoute = $route->compile(); - $properties = array(); + $properties = []; $properties[] = $compiledRoute->getVariables(); $properties[] = $route->getDefaults(); $properties[] = $route->getRequirements(); @@ -90,7 +90,7 @@ EOF; $routes .= sprintf(" '%s' => %s,\n", $name, str_replace("\n", '', var_export($properties, true))); } - $routes .= ' )'; + $routes .= ' ]'; return $routes; } @@ -103,7 +103,7 @@ EOF; private function generateGenerateMethod() { return <<<'EOF' - public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH) + public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH) { if (!isset(self::$declaredRoutes[$name])) { throw new RouteNotFoundException(sprintf('Unable to generate a URL for the named route "%s" as such route does not exist.', $name)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/UrlGenerator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/UrlGenerator.php index 6ed70cab..b87f4bb5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/UrlGenerator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/UrlGenerator.php @@ -45,7 +45,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt * "?" and "#" (would be interpreted wrongly as query and fragment identifier), * "'" and """ (are used as delimiters in HTML). */ - protected $decodedChars = array( + protected $decodedChars = [ // the slash can be used to designate a hierarchical structure and we want allow using it with this meaning // some webservers don't allow the slash in encoded form in the path for security reasons anyway // see http://stackoverflow.com/questions/4069002/http-400-if-2f-part-of-get-url-in-jboss @@ -63,7 +63,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt '%21' => '!', '%2A' => '*', '%7C' => '|', - ); + ]; public function __construct(RouteCollection $routes, RequestContext $context, LoggerInterface $logger = null) { @@ -107,7 +107,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt /** * {@inheritdoc} */ - public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH) + public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH) { if (null === $route = $this->routes->get($name)) { throw new RouteNotFoundException(sprintf('Unable to generate a URL for the named route "%s" as such route does not exist.', $name)); @@ -124,7 +124,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt * @throws InvalidParameterException When a parameter value for a placeholder is not correct because * it does not match the requirement */ - protected function doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens, array $requiredSchemes = array()) + protected function doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens, array $requiredSchemes = []) { $variables = array_flip($variables); $mergedParams = array_replace($defaults, $this->context->getParameters(), $parameters); @@ -139,15 +139,15 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt $message = 'Parameter "{parameter}" for route "{route}" must match "{expected}" ("{given}" given) to generate a corresponding URL.'; foreach ($tokens as $token) { if ('variable' === $token[0]) { - if (!$optional || !array_key_exists($token[3], $defaults) || null !== $mergedParams[$token[3]] && (string) $mergedParams[$token[3]] !== (string) $defaults[$token[3]]) { - // check requirement - if (null !== $this->strictRequirements && !preg_match('#^'.$token[2].'$#'.(empty($token[4]) ? '' : 'u'), $mergedParams[$token[3]])) { + if (!$optional || !\array_key_exists($token[3], $defaults) || null !== $mergedParams[$token[3]] && (string) $mergedParams[$token[3]] !== (string) $defaults[$token[3]]) { + // check requirement (while ignoring look-around patterns) + if (null !== $this->strictRequirements && !preg_match('#^'.preg_replace('/\(\?(?:=|<=|!|strictRequirements) { - throw new InvalidParameterException(strtr($message, array('{parameter}' => $token[3], '{route}' => $name, '{expected}' => $token[2], '{given}' => $mergedParams[$token[3]]))); + throw new InvalidParameterException(strtr($message, ['{parameter}' => $token[3], '{route}' => $name, '{expected}' => $token[2], '{given}' => $mergedParams[$token[3]]])); } if ($this->logger) { - $this->logger->error($message, array('parameter' => $token[3], 'route' => $name, 'expected' => $token[2], 'given' => $mergedParams[$token[3]])); + $this->logger->error($message, ['parameter' => $token[3], 'route' => $name, 'expected' => $token[2], 'given' => $mergedParams[$token[3]]]); } return; @@ -173,7 +173,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt // the path segments "." and ".." are interpreted as relative reference when resolving a URI; see http://tools.ietf.org/html/rfc3986#section-3.3 // so we need to encode them as they are not used for this purpose here // otherwise we would generate a URI that, when followed by a user agent (e.g. browser), does not match this route - $url = strtr($url, array('/../' => '/%2E%2E/', '/./' => '/%2E/')); + $url = strtr($url, ['/../' => '/%2E%2E/', '/./' => '/%2E/']); if ('/..' === substr($url, -3)) { $url = substr($url, 0, -2).'%2E%2E'; } elseif ('/.' === substr($url, -2)) { @@ -195,13 +195,14 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt $routeHost = ''; foreach ($hostTokens as $token) { if ('variable' === $token[0]) { - if (null !== $this->strictRequirements && !preg_match('#^'.$token[2].'$#i'.(empty($token[4]) ? '' : 'u'), $mergedParams[$token[3]])) { + // check requirement (while ignoring look-around patterns) + if (null !== $this->strictRequirements && !preg_match('#^'.preg_replace('/\(\?(?:=|<=|!|strictRequirements) { - throw new InvalidParameterException(strtr($message, array('{parameter}' => $token[3], '{route}' => $name, '{expected}' => $token[2], '{given}' => $mergedParams[$token[3]]))); + throw new InvalidParameterException(strtr($message, ['{parameter}' => $token[3], '{route}' => $name, '{expected}' => $token[2], '{given}' => $mergedParams[$token[3]]])); } if ($this->logger) { - $this->logger->error($message, array('parameter' => $token[3], 'route' => $name, 'expected' => $token[2], 'given' => $mergedParams[$token[3]])); + $this->logger->error($message, ['parameter' => $token[3], 'route' => $name, 'expected' => $token[2], 'given' => $mergedParams[$token[3]]]); } return; @@ -258,11 +259,11 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt if ($extra && $query = http_build_query($extra, '', '&', PHP_QUERY_RFC3986)) { // "/" and "?" can be left decoded for better user experience, see // http://tools.ietf.org/html/rfc3986#section-3.4 - $url .= '?'.strtr($query, array('%2F' => '/')); + $url .= '?'.strtr($query, ['%2F' => '/']); } if ('' !== $fragment) { - $url .= '#'.strtr(rawurlencode($fragment), array('%2F' => '/', '%3F' => '?')); + $url .= '#'.strtr(rawurlencode($fragment), ['%2F' => '/', '%3F' => '?']); } return $url; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php index d6e7938e..f7d37b25 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php @@ -82,5 +82,5 @@ interface UrlGeneratorInterface extends RequestContextAwareInterface * @throws InvalidParameterException When a parameter value for a placeholder is not correct because * it does not match the requirement */ - public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH); + public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php index 76a120b8..6a439e71 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php @@ -255,17 +255,17 @@ abstract class AnnotationClassLoader implements LoaderInterface private function resetGlobals() { - return array( + return [ 'path' => '', - 'requirements' => array(), - 'options' => array(), - 'defaults' => array(), - 'schemes' => array(), - 'methods' => array(), + 'requirements' => [], + 'options' => [], + 'defaults' => [], + 'schemes' => [], + 'methods' => [], 'host' => '', 'condition' => '', 'name' => '', - ); + ]; } protected function createRoute($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php index 034a1c58..dfea551f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php @@ -105,7 +105,7 @@ class AnnotationFileLoader extends FileLoader if (true === $namespace && T_STRING === $token[0]) { $namespace = $token[1]; - while (isset($tokens[++$i][1]) && \in_array($tokens[$i][0], array(T_NS_SEPARATOR, T_STRING))) { + while (isset($tokens[++$i][1]) && \in_array($tokens[$i][0], [T_NS_SEPARATOR, T_STRING])) { $namespace .= $tokens[$i][1]; } $token = $tokens[$i]; @@ -122,7 +122,7 @@ class AnnotationFileLoader extends FileLoader if (T_DOUBLE_COLON === $tokens[$j][0] || T_NEW === $tokens[$j][0]) { $skipClassToken = true; break; - } elseif (!\in_array($tokens[$j][0], array(T_WHITESPACE, T_DOC_COMMENT, T_COMMENT))) { + } elseif (!\in_array($tokens[$j][0], [T_WHITESPACE, T_DOC_COMMENT, T_COMMENT])) { break; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/Configurator/Traits/RouteTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/Configurator/Traits/RouteTrait.php index 4d2e255b..1d019fe4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/Configurator/Traits/RouteTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/Configurator/Traits/RouteTrait.php @@ -124,7 +124,7 @@ trait RouteTrait */ final public function controller($controller) { - $this->route->addDefaults(array('_controller' => $controller)); + $this->route->addDefaults(['_controller' => $controller]); return $this; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/ObjectRouteLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/ObjectRouteLoader.php index 12fc2bbe..ce58dc7d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/ObjectRouteLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/ObjectRouteLoader.php @@ -62,7 +62,7 @@ abstract class ObjectRouteLoader extends Loader throw new \BadMethodCallException(sprintf('Method "%s" not found on "%s" when importing routing resource "%s"', $method, \get_class($loaderObject), $resource)); } - $routeCollection = \call_user_func(array($loaderObject, $method), $this); + $routeCollection = \call_user_func([$loaderObject, $method], $this); if (!$routeCollection instanceof RouteCollection) { $type = \is_object($routeCollection) ? \get_class($routeCollection) : \gettype($routeCollection); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/XmlFileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/XmlFileLoader.php index 689245b5..e56add97 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/XmlFileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/XmlFileLoader.php @@ -149,7 +149,7 @@ class XmlFileLoader extends FileLoader $imported = $this->import($resource, ('' !== $type ? $type : null), false, $file); if (!\is_array($imported)) { - $imported = array($imported); + $imported = [$imported]; } foreach ($imported as $subCollection) { @@ -203,9 +203,9 @@ class XmlFileLoader extends FileLoader */ private function parseConfigs(\DOMElement $node, $path) { - $defaults = array(); - $requirements = array(); - $options = array(); + $defaults = []; + $requirements = []; + $options = []; $condition = null; foreach ($node->getElementsByTagNameNS(self::NAMESPACE_URI, '*') as $n) { @@ -246,7 +246,7 @@ class XmlFileLoader extends FileLoader $defaults['_controller'] = $controller; } - return array($defaults, $requirements, $options, $condition); + return [$defaults, $requirements, $options, $condition]; } /** @@ -310,7 +310,7 @@ class XmlFileLoader extends FileLoader case 'string': return trim($node->nodeValue); case 'list': - $list = array(); + $list = []; foreach ($node->childNodes as $element) { if (!$element instanceof \DOMElement) { @@ -326,7 +326,7 @@ class XmlFileLoader extends FileLoader return $list; case 'map': - $map = array(); + $map = []; foreach ($node->childNodes as $element) { if (!$element instanceof \DOMElement) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/YamlFileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/YamlFileLoader.php index d6511daa..bc21e9cb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/YamlFileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/YamlFileLoader.php @@ -26,9 +26,9 @@ use Symfony\Component\Yaml\Parser as YamlParser; */ class YamlFileLoader extends FileLoader { - private static $availableKeys = array( + private static $availableKeys = [ 'resource', 'type', 'prefix', 'path', 'host', 'schemes', 'methods', 'defaults', 'requirements', 'options', 'condition', 'controller', - ); + ]; private $yamlParser; /** @@ -102,7 +102,7 @@ class YamlFileLoader extends FileLoader */ public function supports($resource, $type = null) { - return \is_string($resource) && \in_array(pathinfo($resource, PATHINFO_EXTENSION), array('yml', 'yaml'), true) && (!$type || 'yaml' === $type); + return \is_string($resource) && \in_array(pathinfo($resource, PATHINFO_EXTENSION), ['yml', 'yaml'], true) && (!$type || 'yaml' === $type); } /** @@ -115,12 +115,12 @@ class YamlFileLoader extends FileLoader */ protected function parseRoute(RouteCollection $collection, $name, array $config, $path) { - $defaults = isset($config['defaults']) ? $config['defaults'] : array(); - $requirements = isset($config['requirements']) ? $config['requirements'] : array(); - $options = isset($config['options']) ? $config['options'] : array(); + $defaults = isset($config['defaults']) ? $config['defaults'] : []; + $requirements = isset($config['requirements']) ? $config['requirements'] : []; + $options = isset($config['options']) ? $config['options'] : []; $host = isset($config['host']) ? $config['host'] : ''; - $schemes = isset($config['schemes']) ? $config['schemes'] : array(); - $methods = isset($config['methods']) ? $config['methods'] : array(); + $schemes = isset($config['schemes']) ? $config['schemes'] : []; + $methods = isset($config['methods']) ? $config['methods'] : []; $condition = isset($config['condition']) ? $config['condition'] : null; if (isset($config['controller'])) { @@ -144,9 +144,9 @@ class YamlFileLoader extends FileLoader { $type = isset($config['type']) ? $config['type'] : null; $prefix = isset($config['prefix']) ? $config['prefix'] : ''; - $defaults = isset($config['defaults']) ? $config['defaults'] : array(); - $requirements = isset($config['requirements']) ? $config['requirements'] : array(); - $options = isset($config['options']) ? $config['options'] : array(); + $defaults = isset($config['defaults']) ? $config['defaults'] : []; + $requirements = isset($config['requirements']) ? $config['requirements'] : []; + $options = isset($config['options']) ? $config['options'] : []; $host = isset($config['host']) ? $config['host'] : null; $condition = isset($config['condition']) ? $config['condition'] : null; $schemes = isset($config['schemes']) ? $config['schemes'] : null; @@ -161,7 +161,7 @@ class YamlFileLoader extends FileLoader $imported = $this->import($config['resource'], $type, false, $file); if (!\is_array($imported)) { - $imported = array($imported); + $imported = [$imported]; } foreach ($imported as $subCollection) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php index dd057d2e..84ee1892 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php @@ -28,12 +28,12 @@ class DumperCollection implements \IteratorAggregate /** * @var DumperCollection[]|DumperRoute[] */ - private $children = array(); + private $children = []; /** * @var array */ - private $attributes = array(); + private $attributes = []; /** * Returns the children routes and collections. @@ -120,7 +120,7 @@ class DumperCollection implements \IteratorAggregate */ public function hasAttribute($name) { - return array_key_exists($name, $this->attributes); + return \array_key_exists($name, $this->attributes); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php index 5e7c134b..2a25293a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php @@ -28,7 +28,7 @@ interface MatcherDumperInterface * * @return string Executable code */ - public function dump(array $options = array()); + public function dump(array $options = []); /** * Gets the routes to dump. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php index ac1f8f81..0a830b64 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php @@ -30,7 +30,7 @@ class PhpMatcherDumper extends MatcherDumper /** * @var ExpressionFunctionProviderInterface[] */ - private $expressionLanguageProviders = array(); + private $expressionLanguageProviders = []; /** * Dumps a set of routes to a PHP class. @@ -44,12 +44,12 @@ class PhpMatcherDumper extends MatcherDumper * * @return string A PHP class representing the matcher class */ - public function dump(array $options = array()) + public function dump(array $options = []) { - $options = array_replace(array( + $options = array_replace([ 'class' => 'ProjectUrlMatcher', 'base_class' => 'Symfony\\Component\\Routing\\Matcher\\UrlMatcher', - ), $options); + ], $options); // trailing slash support is only enabled if we know how to redirect the user $interfaces = class_implements($options['base_class']); @@ -98,7 +98,7 @@ EOF; return <<context; @@ -230,7 +230,7 @@ EOF; { $code = ''; $compiledRoute = $route->compile(); - $conditions = array(); + $conditions = []; $hasTrailingSlash = false; $matches = false; $hostMatches = false; @@ -265,7 +265,7 @@ EOF; } if ($route->getCondition()) { - $conditions[] = $this->getExpressionLanguage()->compile($route->getCondition(), array('context', 'request')); + $conditions[] = $this->getExpressionLanguage()->compile($route->getCondition(), ['context', 'request']); } $conditions = implode(' && ', $conditions); @@ -283,14 +283,14 @@ EOF; // optimize parameters array if ($matches || $hostMatches) { - $vars = array(); + $vars = []; if ($hostMatches) { $vars[] = '$hostMatches'; } if ($matches) { $vars[] = '$matches'; } - $vars[] = "array('_route' => '$name')"; + $vars[] = "['_route' => '$name']"; $code .= sprintf( " \$ret = \$this->mergeDefaults(array_replace(%s), %s);\n", @@ -298,9 +298,9 @@ EOF; str_replace("\n", '', var_export($route->getDefaults(), true)) ); } elseif ($route->getDefaults()) { - $code .= sprintf(" \$ret = %s;\n", str_replace("\n", '', var_export(array_replace($route->getDefaults(), array('_route' => $name)), true))); + $code .= sprintf(" \$ret = %s;\n", str_replace("\n", '', var_export(array_replace($route->getDefaults(), ['_route' => $name]), true))); } else { - $code .= sprintf(" \$ret = array('_route' => '%s');\n", $name); + $code .= sprintf(" \$ret = ['_route' => '%s'];\n", $name); } if ($hasTrailingSlash) { @@ -331,9 +331,9 @@ EOF; $code .= <<getScheme()]); - if (!in_array($methodVariable, array('$methods'))) { + if (!in_array($methodVariable, ['$methods'])) { if (\$hasRequiredScheme) { - \$allow = array_merge(\$allow, array('$methods')); + \$allow = array_merge(\$allow, ['$methods']); } goto $gotoname; } @@ -363,8 +363,8 @@ EOF; } } elseif ($methods) { $code .= <<items[] = array($prefix, $route); + $this->items[] = [$prefix, $route]; $this->matchStart = \count($this->items); return; @@ -96,7 +96,7 @@ class StaticPrefixCollection // No optimised case was found, in this case we simple add the route for possible // grouping when new routes are added. - $this->items[] = array($prefix, $route); + $this->items[] = [$prefix, $route]; } /** @@ -120,7 +120,7 @@ class StaticPrefixCollection $child = new self($commonPrefix); if ($item instanceof self) { - $child->items = array($item); + $child->items = [$item]; } else { $child->addRoute($item[0], $item[1]); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php index 67805205..bccc78fd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php @@ -27,7 +27,7 @@ abstract class RedirectableUrlMatcher extends UrlMatcher implements Redirectable try { $parameters = parent::match($pathinfo); } catch (ResourceNotFoundException $e) { - if ('/' === substr($pathinfo, -1) || !\in_array($this->context->getMethod(), array('HEAD', 'GET'))) { + if ('/' === substr($pathinfo, -1) || !\in_array($this->context->getMethod(), ['HEAD', 'GET'])) { throw $e; } @@ -49,17 +49,17 @@ abstract class RedirectableUrlMatcher extends UrlMatcher implements Redirectable protected function handleRouteRequirements($pathinfo, $name, Route $route) { // expression condition - if ($route->getCondition() && !$this->getExpressionLanguage()->evaluate($route->getCondition(), array('context' => $this->context, 'request' => $this->request ?: $this->createRequest($pathinfo)))) { - return array(self::REQUIREMENT_MISMATCH, null); + if ($route->getCondition() && !$this->getExpressionLanguage()->evaluate($route->getCondition(), ['context' => $this->context, 'request' => $this->request ?: $this->createRequest($pathinfo)])) { + return [self::REQUIREMENT_MISMATCH, null]; } // check HTTP scheme requirement $scheme = $this->context->getScheme(); $schemes = $route->getSchemes(); if ($schemes && !$route->hasScheme($scheme)) { - return array(self::ROUTE_MATCH, $this->redirect($pathinfo, $name, current($schemes))); + return [self::ROUTE_MATCH, $this->redirect($pathinfo, $name, current($schemes))]; } - return array(self::REQUIREMENT_MATCH, null); + return [self::REQUIREMENT_MATCH, null]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php index 61cad8e6..3c3c4bfc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php @@ -31,7 +31,7 @@ class TraceableUrlMatcher extends UrlMatcher public function getTraces($pathinfo) { - $this->traces = array(); + $this->traces = []; try { $this->match($pathinfo); @@ -57,7 +57,7 @@ class TraceableUrlMatcher extends UrlMatcher if (!preg_match($compiledRoute->getRegex(), $pathinfo, $matches)) { // does it match without any requirements? - $r = new Route($route->getPath(), $route->getDefaults(), array(), $route->getOptions()); + $r = new Route($route->getPath(), $route->getDefaults(), [], $route->getOptions()); $cr = $r->compile(); if (!preg_match($cr->getRegex(), $pathinfo)) { $this->addTrace(sprintf('Path "%s" does not match', $route->getPath()), self::ROUTE_DOES_NOT_MATCH, $name, $route); @@ -66,7 +66,7 @@ class TraceableUrlMatcher extends UrlMatcher } foreach ($route->getRequirements() as $n => $regex) { - $r = new Route($route->getPath(), $route->getDefaults(), array($n => $regex), $route->getOptions()); + $r = new Route($route->getPath(), $route->getDefaults(), [$n => $regex], $route->getOptions()); $cr = $r->compile(); if (\in_array($n, $cr->getVariables()) && !preg_match($cr->getRegex(), $pathinfo)) { @@ -80,7 +80,7 @@ class TraceableUrlMatcher extends UrlMatcher } // check host requirement - $hostMatches = array(); + $hostMatches = []; if ($compiledRoute->getHostRegex() && !preg_match($compiledRoute->getHostRegex(), $this->context->getHost(), $hostMatches)) { $this->addTrace(sprintf('Host "%s" does not match the requirement ("%s")', $this->context->getHost(), $route->getHost()), self::ROUTE_ALMOST_MATCHES, $name, $route); @@ -105,7 +105,7 @@ class TraceableUrlMatcher extends UrlMatcher // check condition if ($condition = $route->getCondition()) { - if (!$this->getExpressionLanguage()->evaluate($condition, array('context' => $this->context, 'request' => $this->request ?: $this->createRequest($pathinfo)))) { + if (!$this->getExpressionLanguage()->evaluate($condition, ['context' => $this->context, 'request' => $this->request ?: $this->createRequest($pathinfo)])) { $this->addTrace(sprintf('Condition "%s" does not evaluate to "true"', $condition), self::ROUTE_ALMOST_MATCHES, $name, $route); continue; @@ -131,11 +131,11 @@ class TraceableUrlMatcher extends UrlMatcher private function addTrace($log, $level = self::ROUTE_DOES_NOT_MATCH, $name = null, $route = null) { - $this->traces[] = array( + $this->traces[] = [ 'log' => $log, 'name' => $name, 'level' => $level, 'path' => null !== $route ? $route->getPath() : null, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/UrlMatcher.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/UrlMatcher.php index 69d73906..663ebcbe 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/UrlMatcher.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/UrlMatcher.php @@ -33,7 +33,7 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface const ROUTE_MATCH = 2; protected $context; - protected $allow = array(); + protected $allow = []; protected $routes; protected $request; protected $expressionLanguage; @@ -41,7 +41,7 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface /** * @var ExpressionFunctionProviderInterface[] */ - protected $expressionLanguageProviders = array(); + protected $expressionLanguageProviders = []; public function __construct(RouteCollection $routes, RequestContext $context) { @@ -70,7 +70,7 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface */ public function match($pathinfo) { - $this->allow = array(); + $this->allow = []; if ($ret = $this->matchCollection(rawurldecode($pathinfo), $this->routes)) { return $ret; @@ -118,19 +118,24 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface */ protected function matchCollection($pathinfo, RouteCollection $routes) { + // HEAD and GET are equivalent as per RFC + if ('HEAD' === $method = $this->context->getMethod()) { + $method = 'GET'; + } $supportsTrailingSlash = '/' !== $pathinfo && '' !== $pathinfo && $this instanceof RedirectableUrlMatcherInterface; foreach ($routes as $name => $route) { $compiledRoute = $route->compile(); $staticPrefix = $compiledRoute->getStaticPrefix(); + $requiredMethods = $route->getMethods(); // check the static prefix of the URL first. Only use the more expensive preg_match when it matches if ('' === $staticPrefix || 0 === strpos($pathinfo, $staticPrefix)) { // no-op - } elseif (!$supportsTrailingSlash) { + } elseif (!$supportsTrailingSlash || ($requiredMethods && !\in_array('GET', $requiredMethods)) || 'GET' !== $method) { continue; } elseif ('/' === substr($staticPrefix, -1) && substr($staticPrefix, 0, -1) === $pathinfo) { - return; + return $this->allow = []; } else { continue; } @@ -148,10 +153,13 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface } if ($hasTrailingSlash && '/' !== substr($pathinfo, -1)) { - return; + if ((!$requiredMethods || \in_array('GET', $requiredMethods)) && 'GET' === $method) { + return $this->allow = []; + } + continue; } - $hostMatches = array(); + $hostMatches = []; if ($compiledRoute->getHostRegex() && !preg_match($compiledRoute->getHostRegex(), $this->context->getHost(), $hostMatches)) { continue; } @@ -163,12 +171,7 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface } // check HTTP method requirement - if ($requiredMethods = $route->getMethods()) { - // HEAD and GET are equivalent as per RFC - if ('HEAD' === $method = $this->context->getMethod()) { - $method = 'GET'; - } - + if ($requiredMethods) { if (!\in_array($method, $requiredMethods)) { if (self::REQUIREMENT_MATCH === $status[0]) { $this->allow = array_merge($this->allow, $requiredMethods); @@ -178,8 +181,10 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface } } - return $this->getAttributes($route, $name, array_replace($matches, $hostMatches, isset($status[1]) ? $status[1] : array())); + return $this->getAttributes($route, $name, array_replace($matches, $hostMatches, isset($status[1]) ? $status[1] : [])); } + + return []; } /** @@ -214,15 +219,15 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface protected function handleRouteRequirements($pathinfo, $name, Route $route) { // expression condition - if ($route->getCondition() && !$this->getExpressionLanguage()->evaluate($route->getCondition(), array('context' => $this->context, 'request' => $this->request ?: $this->createRequest($pathinfo)))) { - return array(self::REQUIREMENT_MISMATCH, null); + if ($route->getCondition() && !$this->getExpressionLanguage()->evaluate($route->getCondition(), ['context' => $this->context, 'request' => $this->request ?: $this->createRequest($pathinfo)])) { + return [self::REQUIREMENT_MISMATCH, null]; } // check HTTP scheme requirement $scheme = $this->context->getScheme(); $status = $route->getSchemes() && !$route->hasScheme($scheme) ? self::REQUIREMENT_MISMATCH : self::REQUIREMENT_MATCH; - return array($status, null); + return [$status, null]; } /** @@ -265,9 +270,9 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface return null; } - return Request::create($this->context->getScheme().'://'.$this->context->getHost().$this->context->getBaseUrl().$pathinfo, $this->context->getMethod(), $this->context->getParameters(), array(), array(), array( + return Request::create($this->context->getScheme().'://'.$this->context->getHost().$this->context->getBaseUrl().$pathinfo, $this->context->getMethod(), $this->context->getParameters(), [], [], [ 'SCRIPT_FILENAME' => $this->context->getBaseUrl(), 'SCRIPT_NAME' => $this->context->getBaseUrl(), - )); + ]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/RequestContext.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/RequestContext.php index d62a7766..8ebad8e2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/RequestContext.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/RequestContext.php @@ -31,7 +31,7 @@ class RequestContext private $httpPort; private $httpsPort; private $queryString; - private $parameters = array(); + private $parameters = []; /** * @param string $baseUrl The base URL @@ -316,7 +316,7 @@ class RequestContext */ public function hasParameter($name) { - return array_key_exists($name, $this->parameters); + return \array_key_exists($name, $this->parameters); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Route.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Route.php index 46e3e550..759b6f3b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Route.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Route.php @@ -21,11 +21,11 @@ class Route implements \Serializable { private $path = '/'; private $host = ''; - private $schemes = array(); - private $methods = array(); - private $defaults = array(); - private $requirements = array(); - private $options = array(); + private $schemes = []; + private $methods = []; + private $defaults = []; + private $requirements = []; + private $options = []; private $condition = ''; /** @@ -50,7 +50,7 @@ class Route implements \Serializable * @param string|string[] $methods A required HTTP method or an array of restricted methods * @param string $condition A condition that should evaluate to true for the route to match */ - public function __construct($path, array $defaults = array(), array $requirements = array(), array $options = array(), $host = '', $schemes = array(), $methods = array(), $condition = '') + public function __construct($path, array $defaults = [], array $requirements = [], array $options = [], $host = '', $schemes = [], $methods = [], $condition = '') { $this->setPath($path); $this->setDefaults($defaults); @@ -67,7 +67,7 @@ class Route implements \Serializable */ public function serialize() { - return serialize(array( + return serialize([ 'path' => $this->path, 'host' => $this->host, 'defaults' => $this->defaults, @@ -77,7 +77,7 @@ class Route implements \Serializable 'methods' => $this->methods, 'condition' => $this->condition, 'compiled' => $this->compiled, - )); + ]); } /** @@ -249,9 +249,9 @@ class Route implements \Serializable */ public function setOptions(array $options) { - $this->options = array( + $this->options = [ 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler', - ); + ]; return $this->addOptions($options); } @@ -314,7 +314,7 @@ class Route implements \Serializable */ public function hasOption($name) { - return array_key_exists($name, $this->options); + return \array_key_exists($name, $this->options); } /** @@ -338,7 +338,7 @@ class Route implements \Serializable */ public function setDefaults(array $defaults) { - $this->defaults = array(); + $this->defaults = []; return $this->addDefaults($defaults); } @@ -383,7 +383,7 @@ class Route implements \Serializable */ public function hasDefault($name) { - return array_key_exists($name, $this->defaults); + return \array_key_exists($name, $this->defaults); } /** @@ -423,7 +423,7 @@ class Route implements \Serializable */ public function setRequirements(array $requirements) { - $this->requirements = array(); + $this->requirements = []; return $this->addRequirements($requirements); } @@ -468,7 +468,7 @@ class Route implements \Serializable */ public function hasRequirement($key) { - return array_key_exists($key, $this->requirements); + return \array_key_exists($key, $this->requirements); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCollection.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCollection.php index c42229af..feac4155 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCollection.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCollection.php @@ -28,12 +28,12 @@ class RouteCollection implements \IteratorAggregate, \Countable /** * @var Route[] */ - private $routes = array(); + private $routes = []; /** * @var array */ - private $resources = array(); + private $resources = []; public function __clone() { @@ -138,7 +138,7 @@ class RouteCollection implements \IteratorAggregate, \Countable * @param array $defaults An array of default values * @param array $requirements An array of requirements */ - public function addPrefix($prefix, array $defaults = array(), array $requirements = array()) + public function addPrefix($prefix, array $defaults = [], array $requirements = []) { $prefix = trim(trim($prefix), '/'); @@ -160,7 +160,7 @@ class RouteCollection implements \IteratorAggregate, \Countable * @param array $defaults An array of default values * @param array $requirements An array of requirements */ - public function setHost($pattern, array $defaults = array(), array $requirements = array()) + public function setHost($pattern, array $defaults = [], array $requirements = []) { foreach ($this->routes as $route) { $route->setHost($pattern); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCollectionBuilder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCollectionBuilder.php index 05dcc362..800e448c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCollectionBuilder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCollectionBuilder.php @@ -25,18 +25,18 @@ class RouteCollectionBuilder /** * @var Route[]|RouteCollectionBuilder[] */ - private $routes = array(); + private $routes = []; private $loader; - private $defaults = array(); + private $defaults = []; private $prefix; private $host; private $condition; - private $requirements = array(); - private $options = array(); + private $requirements = []; + private $options = []; private $schemes; private $methods; - private $resources = array(); + private $resources = []; public function __construct(LoaderInterface $loader = null) { @@ -332,7 +332,7 @@ class RouteCollectionBuilder $methods = implode('_', $route->getMethods()).'_'; $routeName = $methods.$route->getPath(); - $routeName = str_replace(array('/', ':', '|', '-'), '_', $routeName); + $routeName = str_replace(['/', ':', '|', '-'], '_', $routeName); $routeName = preg_replace('/[^a-z0-9A-Z_.]+/', '', $routeName); // Collapse consecutive underscores down into a single underscore. @@ -360,7 +360,7 @@ class RouteCollectionBuilder if ($this->loader->supports($resource, $type)) { $collections = $this->loader->load($resource, $type); - return \is_array($collections) ? $collections : array($collections); + return \is_array($collections) ? $collections : [$collections]; } if (null === $resolver = $this->loader->getResolver()) { @@ -373,6 +373,6 @@ class RouteCollectionBuilder $collections = $loader->load($resource, $type); - return \is_array($collections) ? $collections : array($collections); + return \is_array($collections) ? $collections : [$collections]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCompiler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCompiler.php index 2562c185..391fa829 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCompiler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCompiler.php @@ -46,10 +46,10 @@ class RouteCompiler implements RouteCompilerInterface */ public static function compile(Route $route) { - $hostVariables = array(); - $variables = array(); + $hostVariables = []; + $variables = []; $hostRegex = null; - $hostTokens = array(); + $hostTokens = []; if ('' !== $host = $route->getHost()) { $result = self::compilePattern($route, $host, true); @@ -94,9 +94,9 @@ class RouteCompiler implements RouteCompilerInterface private static function compilePattern(Route $route, $pattern, $isHost) { - $tokens = array(); - $variables = array(); - $matches = array(); + $tokens = []; + $variables = []; + $matches = []; $pos = 0; $defaultSeparator = $isHost ? '.' : '/'; $useUtf8 = preg_match('//u', $pattern); @@ -143,9 +143,9 @@ class RouteCompiler implements RouteCompilerInterface } if ($isSeparator && $precedingText !== $precedingChar) { - $tokens[] = array('text', substr($precedingText, 0, -\strlen($precedingChar))); + $tokens[] = ['text', substr($precedingText, 0, -\strlen($precedingChar))]; } elseif (!$isSeparator && \strlen($precedingText) > 0) { - $tokens[] = array('text', $precedingText); + $tokens[] = ['text', $precedingText]; } $regexp = $route->getRequirement($varName); @@ -154,7 +154,7 @@ class RouteCompiler implements RouteCompilerInterface // Find the next static character after the variable that functions as a separator. By default, this separator and '/' // are disallowed for the variable. This default requirement makes sure that optional variables can be matched at all // and that the generating-matching-combination of URLs unambiguous, i.e. the params used for generating the URL are - // the same that will be matched. Example: new Route('/{page}.{_format}', array('_format' => 'html')) + // the same that will be matched. Example: new Route('/{page}.{_format}', ['_format' => 'html']) // If {page} would also match the separating dot, {_format} would never match as {page} will eagerly consume everything. // Also even if {_format} was not optional the requirement prevents that {page} matches something that was originally // part of {_format} when generating the URL, e.g. _format = 'mobile.html'. @@ -184,12 +184,12 @@ class RouteCompiler implements RouteCompilerInterface } } - $tokens[] = array('variable', $isSeparator ? $precedingChar : '', $regexp, $varName); + $tokens[] = ['variable', $isSeparator ? $precedingChar : '', $regexp, $varName]; $variables[] = $varName; } if ($pos < \strlen($pattern)) { - $tokens[] = array('text', substr($pattern, $pos)); + $tokens[] = ['text', substr($pattern, $pos)]; } // find the first optional token @@ -222,12 +222,12 @@ class RouteCompiler implements RouteCompilerInterface } } - return array( + return [ 'staticPrefix' => self::determineStaticPrefix($route, $tokens), 'regex' => $regexp, 'tokens' => array_reverse($tokens), 'variables' => $variables, - ); + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php index 3f4838ea..27c32e14 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php @@ -66,7 +66,7 @@ class Router implements RouterInterface, RequestMatcherInterface /** * @var array */ - protected $options = array(); + protected $options = []; /** * @var LoggerInterface|null @@ -81,7 +81,7 @@ class Router implements RouterInterface, RequestMatcherInterface /** * @var ExpressionFunctionProviderInterface[] */ - private $expressionLanguageProviders = array(); + private $expressionLanguageProviders = []; /** * @param LoaderInterface $loader A LoaderInterface instance @@ -90,7 +90,7 @@ class Router implements RouterInterface, RequestMatcherInterface * @param RequestContext $context The context * @param LoggerInterface $logger A logger instance */ - public function __construct(LoaderInterface $loader, $resource, array $options = array(), RequestContext $context = null, LoggerInterface $logger = null) + public function __construct(LoaderInterface $loader, $resource, array $options = [], RequestContext $context = null, LoggerInterface $logger = null) { $this->loader = $loader; $this->resource = $resource; @@ -124,7 +124,7 @@ class Router implements RouterInterface, RequestMatcherInterface */ public function setOptions(array $options) { - $this->options = array( + $this->options = [ 'cache_dir' => null, 'debug' => false, 'generator_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator', @@ -137,12 +137,12 @@ class Router implements RouterInterface, RequestMatcherInterface 'matcher_cache_class' => 'ProjectUrlMatcher', 'resource_type' => null, 'strict_requirements' => true, - ); + ]; // check option names and live merge, if errors are encountered Exception will be thrown - $invalid = array(); + $invalid = []; foreach ($options as $key => $value) { - if (array_key_exists($key, $this->options)) { + if (\array_key_exists($key, $this->options)) { $this->options[$key] = $value; } else { $invalid[] = $key; @@ -164,7 +164,7 @@ class Router implements RouterInterface, RequestMatcherInterface */ public function setOption($key, $value) { - if (!array_key_exists($key, $this->options)) { + if (!\array_key_exists($key, $this->options)) { throw new \InvalidArgumentException(sprintf('The Router does not support the "%s" option.', $key)); } @@ -182,7 +182,7 @@ class Router implements RouterInterface, RequestMatcherInterface */ public function getOption($key) { - if (!array_key_exists($key, $this->options)) { + if (!\array_key_exists($key, $this->options)) { throw new \InvalidArgumentException(sprintf('The Router does not support the "%s" option.', $key)); } @@ -235,7 +235,7 @@ class Router implements RouterInterface, RequestMatcherInterface /** * {@inheritdoc} */ - public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH) + public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH) { return $this->getGenerator()->generate($name, $parameters, $referenceType); } @@ -293,10 +293,10 @@ class Router implements RouterInterface, RequestMatcherInterface } } - $options = array( + $options = [ 'class' => $this->options['matcher_cache_class'], 'base_class' => $this->options['matcher_base_class'], - ); + ]; $cache->write($dumper->dump($options), $this->getRouteCollection()->getResources()); } @@ -327,10 +327,10 @@ class Router implements RouterInterface, RequestMatcherInterface function (ConfigCacheInterface $cache) { $dumper = $this->getGeneratorDumperInstance(); - $options = array( + $options = [ 'class' => $this->options['generator_cache_class'], 'base_class' => $this->options['generator_base_class'], - ); + ]; $cache->write($dumper->dump($options), $this->getRouteCollection()->getResources()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php index 9af22f29..2cbfd739 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php @@ -21,7 +21,7 @@ class RouteTest extends TestCase */ public function testInvalidRouteParameter() { - $route = new Route(array('foo' => 'bar')); + $route = new Route(['foo' => 'bar']); } /** @@ -29,22 +29,22 @@ class RouteTest extends TestCase */ public function testRouteParameters($parameter, $value, $getter) { - $route = new Route(array($parameter => $value)); + $route = new Route([$parameter => $value]); $this->assertEquals($route->$getter(), $value); } public function getValidParameters() { - return array( - array('value', '/Blog', 'getPath'), - array('requirements', array('locale' => 'en'), 'getRequirements'), - array('options', array('compiler_class' => 'RouteCompiler'), 'getOptions'), - array('name', 'blog_index', 'getName'), - array('defaults', array('_controller' => 'MyBlogBundle:Blog:index'), 'getDefaults'), - array('schemes', array('https'), 'getSchemes'), - array('methods', array('GET', 'POST'), 'getMethods'), - array('host', '{locale}.example.com', 'getHost'), - array('condition', 'context.getMethod() == "GET"', 'getCondition'), - ); + return [ + ['value', '/Blog', 'getPath'], + ['requirements', ['locale' => 'en'], 'getRequirements'], + ['options', ['compiler_class' => 'RouteCompiler'], 'getOptions'], + ['name', 'blog_index', 'getName'], + ['defaults', ['_controller' => 'MyBlogBundle:Blog:index'], 'getDefaults'], + ['schemes', ['https'], 'getSchemes'], + ['methods', ['GET', 'POST'], 'getMethods'], + ['host', '{locale}.example.com', 'getHost'], + ['condition', 'context.getMethod() == "GET"', 'getCondition'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/CompiledRouteTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/CompiledRouteTest.php index 5bec7bbd..9c9f4f28 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/CompiledRouteTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/CompiledRouteTest.php @@ -18,10 +18,10 @@ class CompiledRouteTest extends TestCase { public function testAccessors() { - $compiled = new CompiledRoute('prefix', 'regex', array('tokens'), array(), null, array(), array(), array('variables')); + $compiled = new CompiledRoute('prefix', 'regex', ['tokens'], [], null, [], [], ['variables']); $this->assertEquals('prefix', $compiled->getStaticPrefix(), '__construct() takes a static prefix as its second argument'); $this->assertEquals('regex', $compiled->getRegex(), '__construct() takes a regexp as its third argument'); - $this->assertEquals(array('tokens'), $compiled->getTokens(), '__construct() takes an array of tokens as its fourth argument'); - $this->assertEquals(array('variables'), $compiled->getVariables(), '__construct() takes an array of variables as its ninth argument'); + $this->assertEquals(['tokens'], $compiled->getTokens(), '__construct() takes an array of tokens as its fourth argument'); + $this->assertEquals(['variables'], $compiled->getVariables(), '__construct() takes an array of variables as its ninth argument'); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/DependencyInjection/RoutingResolverPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/DependencyInjection/RoutingResolverPassTest.php index 97a34c96..30c7516e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/DependencyInjection/RoutingResolverPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/DependencyInjection/RoutingResolverPassTest.php @@ -29,7 +29,7 @@ class RoutingResolverPassTest extends TestCase (new RoutingResolverPass())->process($container); $this->assertEquals( - array(array('addLoader', array(new Reference('loader1'))), array('addLoader', array(new Reference('loader2')))), + [['addLoader', [new Reference('loader1')]], ['addLoader', [new Reference('loader2')]]], $container->getDefinition('routing.resolver')->getMethodCalls() ); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/CustomRouteCompiler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/CustomRouteCompiler.php index c2e2afd9..22b942d7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/CustomRouteCompiler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/CustomRouteCompiler.php @@ -21,6 +21,6 @@ class CustomRouteCompiler extends RouteCompiler */ public static function compile(Route $route) { - return new CustomCompiledRoute('', '', array(), array()); + return new CustomCompiledRoute('', '', [], []); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/RedirectableUrlMatcher.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/RedirectableUrlMatcher.php index 08b67a07..79ae1cce 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/RedirectableUrlMatcher.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/RedirectableUrlMatcher.php @@ -21,10 +21,10 @@ class RedirectableUrlMatcher extends UrlMatcher implements RedirectableUrlMatche { public function redirect($path, $route, $scheme = null) { - return array( + return [ '_controller' => 'Some controller reference...', 'path' => $path, 'scheme' => $scheme, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher0.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher0.php index 9e9b9103..4978093f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher0.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher0.php @@ -17,7 +17,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher public function match($rawPathinfo) { - $allow = array(); + $allow = []; $pathinfo = rawurldecode($rawPathinfo); $trimmedPathinfo = rtrim($pathinfo, '/'); $context = $this->context; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php index 23a93c19..16fcc3e5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php @@ -17,7 +17,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher public function match($rawPathinfo) { - $allow = array(); + $allow = []; $pathinfo = rawurldecode($rawPathinfo); $trimmedPathinfo = rtrim($pathinfo, '/'); $context = $this->context; @@ -31,7 +31,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher if (0 === strpos($pathinfo, '/foo')) { // foo if (preg_match('#^/foo/(?Pbaz|symfony)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo')), array ( 'def' => 'test',)); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'foo']), array ( 'def' => 'test',)); } // foofoo @@ -44,9 +44,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher elseif (0 === strpos($pathinfo, '/bar')) { // bar if (preg_match('#^/bar/(?P[^/]++)$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'bar')), array ()); - if (!in_array($canonicalMethod, array('GET', 'HEAD'))) { - $allow = array_merge($allow, array('GET', 'HEAD')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'bar']), array ()); + if (!in_array($canonicalMethod, ['GET', 'HEAD'])) { + $allow = array_merge($allow, ['GET', 'HEAD']); goto not_bar; } @@ -56,9 +56,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher // barhead if (0 === strpos($pathinfo, '/barhead') && preg_match('#^/barhead/(?P[^/]++)$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'barhead')), array ()); - if (!in_array($canonicalMethod, array('GET'))) { - $allow = array_merge($allow, array('GET')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'barhead']), array ()); + if (!in_array($canonicalMethod, ['GET'])) { + $allow = array_merge($allow, ['GET']); goto not_barhead; } @@ -72,31 +72,31 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher if (0 === strpos($pathinfo, '/test/baz')) { // baz if ('/test/baz' === $pathinfo) { - return array('_route' => 'baz'); + return ['_route' => 'baz']; } // baz2 if ('/test/baz.html' === $pathinfo) { - return array('_route' => 'baz2'); + return ['_route' => 'baz2']; } // baz3 if ('/test/baz3/' === $pathinfo) { - return array('_route' => 'baz3'); + return ['_route' => 'baz3']; } } // baz4 if (preg_match('#^/test/(?P[^/]++)/$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'baz4')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'baz4']), array ()); } // baz5 if (preg_match('#^/test/(?P[^/]++)/$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'baz5')), array ()); - if (!in_array($requestMethod, array('POST'))) { - $allow = array_merge($allow, array('POST')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'baz5']), array ()); + if (!in_array($requestMethod, ['POST'])) { + $allow = array_merge($allow, ['POST']); goto not_baz5; } @@ -106,9 +106,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher // baz.baz6 if (preg_match('#^/test/(?P[^/]++)/$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'baz.baz6')), array ()); - if (!in_array($requestMethod, array('PUT'))) { - $allow = array_merge($allow, array('PUT')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'baz.baz6']), array ()); + if (!in_array($requestMethod, ['PUT'])) { + $allow = array_merge($allow, ['PUT']); goto not_bazbaz6; } @@ -120,42 +120,42 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher // quoter if (preg_match('#^/(?P[\']+)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'quoter')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'quoter']), array ()); } // space if ('/spa ce' === $pathinfo) { - return array('_route' => 'space'); + return ['_route' => 'space']; } if (0 === strpos($pathinfo, '/a')) { if (0 === strpos($pathinfo, '/a/b\'b')) { // foo1 if (preg_match('#^/a/b\'b/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo1')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'foo1']), array ()); } // bar1 if (preg_match('#^/a/b\'b/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar1')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'bar1']), array ()); } } // overridden if (preg_match('#^/a/(?P.*)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'overridden')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'overridden']), array ()); } if (0 === strpos($pathinfo, '/a/b\'b')) { // foo2 if (preg_match('#^/a/b\'b/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo2')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'foo2']), array ()); } // bar2 if (preg_match('#^/a/b\'b/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar2')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'bar2']), array ()); } } @@ -165,40 +165,40 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher elseif (0 === strpos($pathinfo, '/multi')) { // helloWorld if (0 === strpos($pathinfo, '/multi/hello') && preg_match('#^/multi/hello(?:/(?P[^/]++))?$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'helloWorld')), array ( 'who' => 'World!',)); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'helloWorld']), array ( 'who' => 'World!',)); } // hey if ('/multi/hey/' === $pathinfo) { - return array('_route' => 'hey'); + return ['_route' => 'hey']; } // overridden2 if ('/multi/new' === $pathinfo) { - return array('_route' => 'overridden2'); + return ['_route' => 'overridden2']; } } // foo3 if (preg_match('#^/(?P<_locale>[^/]++)/b/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo3')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'foo3']), array ()); } // bar3 if (preg_match('#^/(?P<_locale>[^/]++)/b/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar3')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'bar3']), array ()); } if (0 === strpos($pathinfo, '/aba')) { // ababa if ('/ababa' === $pathinfo) { - return array('_route' => 'ababa'); + return ['_route' => 'ababa']; } // foo4 if (preg_match('#^/aba/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo4')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'foo4']), array ()); } } @@ -208,12 +208,12 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher if (preg_match('#^a\\.example\\.com$#sDi', $host, $hostMatches)) { // route1 if ('/route1' === $pathinfo) { - return array('_route' => 'route1'); + return ['_route' => 'route1']; } // route2 if ('/c2/route2' === $pathinfo) { - return array('_route' => 'route2'); + return ['_route' => 'route2']; } } @@ -221,7 +221,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher if (preg_match('#^b\\.example\\.com$#sDi', $host, $hostMatches)) { // route3 if ('/c2/route3' === $pathinfo) { - return array('_route' => 'route3'); + return ['_route' => 'route3']; } } @@ -229,7 +229,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher if (preg_match('#^a\\.example\\.com$#sDi', $host, $hostMatches)) { // route4 if ('/route4' === $pathinfo) { - return array('_route' => 'route4'); + return ['_route' => 'route4']; } } @@ -237,36 +237,36 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher if (preg_match('#^c\\.example\\.com$#sDi', $host, $hostMatches)) { // route5 if ('/route5' === $pathinfo) { - return array('_route' => 'route5'); + return ['_route' => 'route5']; } } // route6 if ('/route6' === $pathinfo) { - return array('_route' => 'route6'); + return ['_route' => 'route6']; } if (preg_match('#^(?P[^\\.]++)\\.example\\.com$#sDi', $host, $hostMatches)) { if (0 === strpos($pathinfo, '/route1')) { // route11 if ('/route11' === $pathinfo) { - return $this->mergeDefaults(array_replace($hostMatches, array('_route' => 'route11')), array ()); + return $this->mergeDefaults(array_replace($hostMatches, ['_route' => 'route11']), array ()); } // route12 if ('/route12' === $pathinfo) { - return $this->mergeDefaults(array_replace($hostMatches, array('_route' => 'route12')), array ( 'var1' => 'val',)); + return $this->mergeDefaults(array_replace($hostMatches, ['_route' => 'route12']), array ( 'var1' => 'val',)); } // route13 if (0 === strpos($pathinfo, '/route13') && preg_match('#^/route13/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($hostMatches, $matches, array('_route' => 'route13')), array ()); + return $this->mergeDefaults(array_replace($hostMatches, $matches, ['_route' => 'route13']), array ()); } // route14 if (0 === strpos($pathinfo, '/route14') && preg_match('#^/route14/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($hostMatches, $matches, array('_route' => 'route14')), array ( 'var1' => 'val',)); + return $this->mergeDefaults(array_replace($hostMatches, $matches, ['_route' => 'route14']), array ( 'var1' => 'val',)); } } @@ -276,35 +276,35 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher if (preg_match('#^c\\.example\\.com$#sDi', $host, $hostMatches)) { // route15 if (0 === strpos($pathinfo, '/route15') && preg_match('#^/route15/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'route15')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'route15']), array ()); } } // route16 if (0 === strpos($pathinfo, '/route16') && preg_match('#^/route16/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'route16')), array ( 'var1' => 'val',)); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'route16']), array ( 'var1' => 'val',)); } // route17 if ('/route17' === $pathinfo) { - return array('_route' => 'route17'); + return ['_route' => 'route17']; } // a if ('/a/a...' === $pathinfo) { - return array('_route' => 'a'); + return ['_route' => 'a']; } if (0 === strpos($pathinfo, '/a/b')) { // b if (preg_match('#^/a/b/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'b')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'b']), array ()); } // c if (0 === strpos($pathinfo, '/a/b/c') && preg_match('#^/a/b/c/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'c')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'c']), array ()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php index e430adb1..2b80be57 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php @@ -17,7 +17,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec public function match($rawPathinfo) { - $allow = array(); + $allow = []; $pathinfo = rawurldecode($rawPathinfo); $trimmedPathinfo = rtrim($pathinfo, '/'); $context = $this->context; @@ -31,7 +31,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec if (0 === strpos($pathinfo, '/foo')) { // foo if (preg_match('#^/foo/(?Pbaz|symfony)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo')), array ( 'def' => 'test',)); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'foo']), array ( 'def' => 'test',)); } // foofoo @@ -44,9 +44,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec elseif (0 === strpos($pathinfo, '/bar')) { // bar if (preg_match('#^/bar/(?P[^/]++)$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'bar')), array ()); - if (!in_array($canonicalMethod, array('GET', 'HEAD'))) { - $allow = array_merge($allow, array('GET', 'HEAD')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'bar']), array ()); + if (!in_array($canonicalMethod, ['GET', 'HEAD'])) { + $allow = array_merge($allow, ['GET', 'HEAD']); goto not_bar; } @@ -56,9 +56,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // barhead if (0 === strpos($pathinfo, '/barhead') && preg_match('#^/barhead/(?P[^/]++)$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'barhead')), array ()); - if (!in_array($canonicalMethod, array('GET'))) { - $allow = array_merge($allow, array('GET')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'barhead']), array ()); + if (!in_array($canonicalMethod, ['GET'])) { + $allow = array_merge($allow, ['GET']); goto not_barhead; } @@ -72,17 +72,17 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec if (0 === strpos($pathinfo, '/test/baz')) { // baz if ('/test/baz' === $pathinfo) { - return array('_route' => 'baz'); + return ['_route' => 'baz']; } // baz2 if ('/test/baz.html' === $pathinfo) { - return array('_route' => 'baz2'); + return ['_route' => 'baz2']; } // baz3 if ('/test/baz3' === $trimmedPathinfo) { - $ret = array('_route' => 'baz3'); + $ret = ['_route' => 'baz3']; if ('/' === substr($pathinfo, -1)) { // no-op } elseif ('GET' !== $canonicalMethod) { @@ -99,7 +99,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // baz4 if (preg_match('#^/test/(?P[^/]++)/?$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'baz4')), array ()); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'baz4']), array ()); if ('/' === substr($pathinfo, -1)) { // no-op } elseif ('GET' !== $canonicalMethod) { @@ -114,9 +114,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // baz5 if (preg_match('#^/test/(?P[^/]++)/$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'baz5')), array ()); - if (!in_array($requestMethod, array('POST'))) { - $allow = array_merge($allow, array('POST')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'baz5']), array ()); + if (!in_array($requestMethod, ['POST'])) { + $allow = array_merge($allow, ['POST']); goto not_baz5; } @@ -126,9 +126,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // baz.baz6 if (preg_match('#^/test/(?P[^/]++)/$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'baz.baz6')), array ()); - if (!in_array($requestMethod, array('PUT'))) { - $allow = array_merge($allow, array('PUT')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'baz.baz6']), array ()); + if (!in_array($requestMethod, ['PUT'])) { + $allow = array_merge($allow, ['PUT']); goto not_bazbaz6; } @@ -140,42 +140,42 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // quoter if (preg_match('#^/(?P[\']+)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'quoter')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'quoter']), array ()); } // space if ('/spa ce' === $pathinfo) { - return array('_route' => 'space'); + return ['_route' => 'space']; } if (0 === strpos($pathinfo, '/a')) { if (0 === strpos($pathinfo, '/a/b\'b')) { // foo1 if (preg_match('#^/a/b\'b/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo1')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'foo1']), array ()); } // bar1 if (preg_match('#^/a/b\'b/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar1')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'bar1']), array ()); } } // overridden if (preg_match('#^/a/(?P.*)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'overridden')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'overridden']), array ()); } if (0 === strpos($pathinfo, '/a/b\'b')) { // foo2 if (preg_match('#^/a/b\'b/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo2')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'foo2']), array ()); } // bar2 if (preg_match('#^/a/b\'b/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar2')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'bar2']), array ()); } } @@ -185,12 +185,12 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec elseif (0 === strpos($pathinfo, '/multi')) { // helloWorld if (0 === strpos($pathinfo, '/multi/hello') && preg_match('#^/multi/hello(?:/(?P[^/]++))?$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'helloWorld')), array ( 'who' => 'World!',)); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'helloWorld']), array ( 'who' => 'World!',)); } // hey if ('/multi/hey' === $trimmedPathinfo) { - $ret = array('_route' => 'hey'); + $ret = ['_route' => 'hey']; if ('/' === substr($pathinfo, -1)) { // no-op } elseif ('GET' !== $canonicalMethod) { @@ -205,30 +205,30 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // overridden2 if ('/multi/new' === $pathinfo) { - return array('_route' => 'overridden2'); + return ['_route' => 'overridden2']; } } // foo3 if (preg_match('#^/(?P<_locale>[^/]++)/b/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo3')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'foo3']), array ()); } // bar3 if (preg_match('#^/(?P<_locale>[^/]++)/b/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar3')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'bar3']), array ()); } if (0 === strpos($pathinfo, '/aba')) { // ababa if ('/ababa' === $pathinfo) { - return array('_route' => 'ababa'); + return ['_route' => 'ababa']; } // foo4 if (preg_match('#^/aba/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo4')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'foo4']), array ()); } } @@ -238,12 +238,12 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec if (preg_match('#^a\\.example\\.com$#sDi', $host, $hostMatches)) { // route1 if ('/route1' === $pathinfo) { - return array('_route' => 'route1'); + return ['_route' => 'route1']; } // route2 if ('/c2/route2' === $pathinfo) { - return array('_route' => 'route2'); + return ['_route' => 'route2']; } } @@ -251,7 +251,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec if (preg_match('#^b\\.example\\.com$#sDi', $host, $hostMatches)) { // route3 if ('/c2/route3' === $pathinfo) { - return array('_route' => 'route3'); + return ['_route' => 'route3']; } } @@ -259,7 +259,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec if (preg_match('#^a\\.example\\.com$#sDi', $host, $hostMatches)) { // route4 if ('/route4' === $pathinfo) { - return array('_route' => 'route4'); + return ['_route' => 'route4']; } } @@ -267,36 +267,36 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec if (preg_match('#^c\\.example\\.com$#sDi', $host, $hostMatches)) { // route5 if ('/route5' === $pathinfo) { - return array('_route' => 'route5'); + return ['_route' => 'route5']; } } // route6 if ('/route6' === $pathinfo) { - return array('_route' => 'route6'); + return ['_route' => 'route6']; } if (preg_match('#^(?P[^\\.]++)\\.example\\.com$#sDi', $host, $hostMatches)) { if (0 === strpos($pathinfo, '/route1')) { // route11 if ('/route11' === $pathinfo) { - return $this->mergeDefaults(array_replace($hostMatches, array('_route' => 'route11')), array ()); + return $this->mergeDefaults(array_replace($hostMatches, ['_route' => 'route11']), array ()); } // route12 if ('/route12' === $pathinfo) { - return $this->mergeDefaults(array_replace($hostMatches, array('_route' => 'route12')), array ( 'var1' => 'val',)); + return $this->mergeDefaults(array_replace($hostMatches, ['_route' => 'route12']), array ( 'var1' => 'val',)); } // route13 if (0 === strpos($pathinfo, '/route13') && preg_match('#^/route13/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($hostMatches, $matches, array('_route' => 'route13')), array ()); + return $this->mergeDefaults(array_replace($hostMatches, $matches, ['_route' => 'route13']), array ()); } // route14 if (0 === strpos($pathinfo, '/route14') && preg_match('#^/route14/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($hostMatches, $matches, array('_route' => 'route14')), array ( 'var1' => 'val',)); + return $this->mergeDefaults(array_replace($hostMatches, $matches, ['_route' => 'route14']), array ( 'var1' => 'val',)); } } @@ -306,42 +306,42 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec if (preg_match('#^c\\.example\\.com$#sDi', $host, $hostMatches)) { // route15 if (0 === strpos($pathinfo, '/route15') && preg_match('#^/route15/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'route15')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'route15']), array ()); } } // route16 if (0 === strpos($pathinfo, '/route16') && preg_match('#^/route16/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'route16')), array ( 'var1' => 'val',)); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'route16']), array ( 'var1' => 'val',)); } // route17 if ('/route17' === $pathinfo) { - return array('_route' => 'route17'); + return ['_route' => 'route17']; } // a if ('/a/a...' === $pathinfo) { - return array('_route' => 'a'); + return ['_route' => 'a']; } if (0 === strpos($pathinfo, '/a/b')) { // b if (preg_match('#^/a/b/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'b')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'b']), array ()); } // c if (0 === strpos($pathinfo, '/a/b/c') && preg_match('#^/a/b/c/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'c')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'c']), array ()); } } // secure if ('/secure' === $pathinfo) { - $ret = array('_route' => 'secure'); + $ret = ['_route' => 'secure']; $requiredSchemes = array ( 'https' => 0,); if (!isset($requiredSchemes[$context->getScheme()])) { if ('GET' !== $canonicalMethod) { @@ -357,7 +357,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // nonsecure if ('/nonsecure' === $pathinfo) { - $ret = array('_route' => 'nonsecure'); + $ret = ['_route' => 'nonsecure']; $requiredSchemes = array ( 'http' => 0,); if (!isset($requiredSchemes[$context->getScheme()])) { if ('GET' !== $canonicalMethod) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php index 67c46674..03e540f6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php @@ -17,7 +17,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher public function match($rawPathinfo) { - $allow = array(); + $allow = []; $pathinfo = rawurldecode($rawPathinfo); $trimmedPathinfo = rtrim($pathinfo, '/'); $context = $this->context; @@ -31,19 +31,19 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher if (0 === strpos($pathinfo, '/rootprefix')) { // static if ('/rootprefix/test' === $pathinfo) { - return array('_route' => 'static'); + return ['_route' => 'static']; } // dynamic if (preg_match('#^/rootprefix/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'dynamic')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'dynamic']), array ()); } } // with-condition if ('/with-condition' === $pathinfo && ($context->getMethod() == "GET")) { - return array('_route' => 'with-condition'); + return ['_route' => 'with-condition']; } if ('/' === $pathinfo && !$allow) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher4.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher4.php index ed07194a..2585f12f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher4.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher4.php @@ -17,7 +17,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher public function match($rawPathinfo) { - $allow = array(); + $allow = []; $pathinfo = rawurldecode($rawPathinfo); $trimmedPathinfo = rtrim($pathinfo, '/'); $context = $this->context; @@ -30,9 +30,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher // just_head if ('/just_head' === $pathinfo) { - $ret = array('_route' => 'just_head'); - if (!in_array($requestMethod, array('HEAD'))) { - $allow = array_merge($allow, array('HEAD')); + $ret = ['_route' => 'just_head']; + if (!in_array($requestMethod, ['HEAD'])) { + $allow = array_merge($allow, ['HEAD']); goto not_just_head; } @@ -42,9 +42,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher // head_and_get if ('/head_and_get' === $pathinfo) { - $ret = array('_route' => 'head_and_get'); - if (!in_array($canonicalMethod, array('HEAD', 'GET'))) { - $allow = array_merge($allow, array('HEAD', 'GET')); + $ret = ['_route' => 'head_and_get']; + if (!in_array($canonicalMethod, ['HEAD', 'GET'])) { + $allow = array_merge($allow, ['HEAD', 'GET']); goto not_head_and_get; } @@ -54,9 +54,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher // get_and_head if ('/get_and_head' === $pathinfo) { - $ret = array('_route' => 'get_and_head'); - if (!in_array($canonicalMethod, array('GET', 'HEAD'))) { - $allow = array_merge($allow, array('GET', 'HEAD')); + $ret = ['_route' => 'get_and_head']; + if (!in_array($canonicalMethod, ['GET', 'HEAD'])) { + $allow = array_merge($allow, ['GET', 'HEAD']); goto not_get_and_head; } @@ -66,9 +66,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher // post_and_head if ('/post_and_head' === $pathinfo) { - $ret = array('_route' => 'post_and_head'); - if (!in_array($requestMethod, array('POST', 'HEAD'))) { - $allow = array_merge($allow, array('POST', 'HEAD')); + $ret = ['_route' => 'post_and_head']; + if (!in_array($requestMethod, ['POST', 'HEAD'])) { + $allow = array_merge($allow, ['POST', 'HEAD']); goto not_post_and_head; } @@ -79,9 +79,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher if (0 === strpos($pathinfo, '/put_and_post')) { // put_and_post if ('/put_and_post' === $pathinfo) { - $ret = array('_route' => 'put_and_post'); - if (!in_array($requestMethod, array('PUT', 'POST'))) { - $allow = array_merge($allow, array('PUT', 'POST')); + $ret = ['_route' => 'put_and_post']; + if (!in_array($requestMethod, ['PUT', 'POST'])) { + $allow = array_merge($allow, ['PUT', 'POST']); goto not_put_and_post; } @@ -91,9 +91,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher // put_and_get_and_head if ('/put_and_post' === $pathinfo) { - $ret = array('_route' => 'put_and_get_and_head'); - if (!in_array($canonicalMethod, array('PUT', 'GET', 'HEAD'))) { - $allow = array_merge($allow, array('PUT', 'GET', 'HEAD')); + $ret = ['_route' => 'put_and_get_and_head']; + if (!in_array($canonicalMethod, ['PUT', 'GET', 'HEAD'])) { + $allow = array_merge($allow, ['PUT', 'GET', 'HEAD']); goto not_put_and_get_and_head; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher5.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher5.php index 2b22513a..ba062234 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher5.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher5.php @@ -17,7 +17,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec public function match($rawPathinfo) { - $allow = array(); + $allow = []; $pathinfo = rawurldecode($rawPathinfo); $trimmedPathinfo = rtrim($pathinfo, '/'); $context = $this->context; @@ -31,30 +31,30 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec if (0 === strpos($pathinfo, '/a')) { // a_first if ('/a/11' === $pathinfo) { - return array('_route' => 'a_first'); + return ['_route' => 'a_first']; } // a_second if ('/a/22' === $pathinfo) { - return array('_route' => 'a_second'); + return ['_route' => 'a_second']; } // a_third if ('/a/333' === $pathinfo) { - return array('_route' => 'a_third'); + return ['_route' => 'a_third']; } } // a_wildcard if (preg_match('#^/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'a_wildcard')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'a_wildcard']), array ()); } if (0 === strpos($pathinfo, '/a')) { // a_fourth if ('/a/44' === $trimmedPathinfo) { - $ret = array('_route' => 'a_fourth'); + $ret = ['_route' => 'a_fourth']; if ('/' === substr($pathinfo, -1)) { // no-op } elseif ('GET' !== $canonicalMethod) { @@ -69,7 +69,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // a_fifth if ('/a/55' === $trimmedPathinfo) { - $ret = array('_route' => 'a_fifth'); + $ret = ['_route' => 'a_fifth']; if ('/' === substr($pathinfo, -1)) { // no-op } elseif ('GET' !== $canonicalMethod) { @@ -84,7 +84,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // a_sixth if ('/a/66' === $trimmedPathinfo) { - $ret = array('_route' => 'a_sixth'); + $ret = ['_route' => 'a_sixth']; if ('/' === substr($pathinfo, -1)) { // no-op } elseif ('GET' !== $canonicalMethod) { @@ -101,13 +101,13 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // nested_wildcard if (0 === strpos($pathinfo, '/nested') && preg_match('#^/nested/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'nested_wildcard')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'nested_wildcard']), array ()); } if (0 === strpos($pathinfo, '/nested/group')) { // nested_a if ('/nested/group/a' === $trimmedPathinfo) { - $ret = array('_route' => 'nested_a'); + $ret = ['_route' => 'nested_a']; if ('/' === substr($pathinfo, -1)) { // no-op } elseif ('GET' !== $canonicalMethod) { @@ -122,7 +122,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // nested_b if ('/nested/group/b' === $trimmedPathinfo) { - $ret = array('_route' => 'nested_b'); + $ret = ['_route' => 'nested_b']; if ('/' === substr($pathinfo, -1)) { // no-op } elseif ('GET' !== $canonicalMethod) { @@ -137,7 +137,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // nested_c if ('/nested/group/c' === $trimmedPathinfo) { - $ret = array('_route' => 'nested_c'); + $ret = ['_route' => 'nested_c']; if ('/' === substr($pathinfo, -1)) { // no-op } elseif ('GET' !== $canonicalMethod) { @@ -155,7 +155,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec elseif (0 === strpos($pathinfo, '/slashed/group')) { // slashed_a if ('/slashed/group' === $trimmedPathinfo) { - $ret = array('_route' => 'slashed_a'); + $ret = ['_route' => 'slashed_a']; if ('/' === substr($pathinfo, -1)) { // no-op } elseif ('GET' !== $canonicalMethod) { @@ -170,7 +170,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // slashed_b if ('/slashed/group/b' === $trimmedPathinfo) { - $ret = array('_route' => 'slashed_b'); + $ret = ['_route' => 'slashed_b']; if ('/' === substr($pathinfo, -1)) { // no-op } elseif ('GET' !== $canonicalMethod) { @@ -185,7 +185,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // slashed_c if ('/slashed/group/c' === $trimmedPathinfo) { - $ret = array('_route' => 'slashed_c'); + $ret = ['_route' => 'slashed_c']; if ('/' === substr($pathinfo, -1)) { // no-op } elseif ('GET' !== $canonicalMethod) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher6.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher6.php index 48ecdf81..a668f09d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher6.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher6.php @@ -17,7 +17,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher public function match($rawPathinfo) { - $allow = array(); + $allow = []; $pathinfo = rawurldecode($rawPathinfo); $trimmedPathinfo = rtrim($pathinfo, '/'); $context = $this->context; @@ -31,14 +31,14 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher if (0 === strpos($pathinfo, '/trailing/simple')) { // simple_trailing_slash_no_methods if ('/trailing/simple/no-methods/' === $pathinfo) { - return array('_route' => 'simple_trailing_slash_no_methods'); + return ['_route' => 'simple_trailing_slash_no_methods']; } // simple_trailing_slash_GET_method if ('/trailing/simple/get-method/' === $pathinfo) { - $ret = array('_route' => 'simple_trailing_slash_GET_method'); - if (!in_array($canonicalMethod, array('GET'))) { - $allow = array_merge($allow, array('GET')); + $ret = ['_route' => 'simple_trailing_slash_GET_method']; + if (!in_array($canonicalMethod, ['GET'])) { + $allow = array_merge($allow, ['GET']); goto not_simple_trailing_slash_GET_method; } @@ -48,9 +48,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher // simple_trailing_slash_HEAD_method if ('/trailing/simple/head-method/' === $pathinfo) { - $ret = array('_route' => 'simple_trailing_slash_HEAD_method'); - if (!in_array($requestMethod, array('HEAD'))) { - $allow = array_merge($allow, array('HEAD')); + $ret = ['_route' => 'simple_trailing_slash_HEAD_method']; + if (!in_array($requestMethod, ['HEAD'])) { + $allow = array_merge($allow, ['HEAD']); goto not_simple_trailing_slash_HEAD_method; } @@ -60,9 +60,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher // simple_trailing_slash_POST_method if ('/trailing/simple/post-method/' === $pathinfo) { - $ret = array('_route' => 'simple_trailing_slash_POST_method'); - if (!in_array($requestMethod, array('POST'))) { - $allow = array_merge($allow, array('POST')); + $ret = ['_route' => 'simple_trailing_slash_POST_method']; + if (!in_array($requestMethod, ['POST'])) { + $allow = array_merge($allow, ['POST']); goto not_simple_trailing_slash_POST_method; } @@ -75,14 +75,14 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher elseif (0 === strpos($pathinfo, '/trailing/regex')) { // regex_trailing_slash_no_methods if (0 === strpos($pathinfo, '/trailing/regex/no-methods') && preg_match('#^/trailing/regex/no\\-methods/(?P[^/]++)/$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_trailing_slash_no_methods')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'regex_trailing_slash_no_methods']), array ()); } // regex_trailing_slash_GET_method if (0 === strpos($pathinfo, '/trailing/regex/get-method') && preg_match('#^/trailing/regex/get\\-method/(?P[^/]++)/$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_trailing_slash_GET_method')), array ()); - if (!in_array($canonicalMethod, array('GET'))) { - $allow = array_merge($allow, array('GET')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'regex_trailing_slash_GET_method']), array ()); + if (!in_array($canonicalMethod, ['GET'])) { + $allow = array_merge($allow, ['GET']); goto not_regex_trailing_slash_GET_method; } @@ -92,9 +92,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher // regex_trailing_slash_HEAD_method if (0 === strpos($pathinfo, '/trailing/regex/head-method') && preg_match('#^/trailing/regex/head\\-method/(?P[^/]++)/$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_trailing_slash_HEAD_method')), array ()); - if (!in_array($requestMethod, array('HEAD'))) { - $allow = array_merge($allow, array('HEAD')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'regex_trailing_slash_HEAD_method']), array ()); + if (!in_array($requestMethod, ['HEAD'])) { + $allow = array_merge($allow, ['HEAD']); goto not_regex_trailing_slash_HEAD_method; } @@ -104,9 +104,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher // regex_trailing_slash_POST_method if (0 === strpos($pathinfo, '/trailing/regex/post-method') && preg_match('#^/trailing/regex/post\\-method/(?P[^/]++)/$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_trailing_slash_POST_method')), array ()); - if (!in_array($requestMethod, array('POST'))) { - $allow = array_merge($allow, array('POST')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'regex_trailing_slash_POST_method']), array ()); + if (!in_array($requestMethod, ['POST'])) { + $allow = array_merge($allow, ['POST']); goto not_regex_trailing_slash_POST_method; } @@ -119,14 +119,14 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher elseif (0 === strpos($pathinfo, '/not-trailing/simple')) { // simple_not_trailing_slash_no_methods if ('/not-trailing/simple/no-methods' === $pathinfo) { - return array('_route' => 'simple_not_trailing_slash_no_methods'); + return ['_route' => 'simple_not_trailing_slash_no_methods']; } // simple_not_trailing_slash_GET_method if ('/not-trailing/simple/get-method' === $pathinfo) { - $ret = array('_route' => 'simple_not_trailing_slash_GET_method'); - if (!in_array($canonicalMethod, array('GET'))) { - $allow = array_merge($allow, array('GET')); + $ret = ['_route' => 'simple_not_trailing_slash_GET_method']; + if (!in_array($canonicalMethod, ['GET'])) { + $allow = array_merge($allow, ['GET']); goto not_simple_not_trailing_slash_GET_method; } @@ -136,9 +136,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher // simple_not_trailing_slash_HEAD_method if ('/not-trailing/simple/head-method' === $pathinfo) { - $ret = array('_route' => 'simple_not_trailing_slash_HEAD_method'); - if (!in_array($requestMethod, array('HEAD'))) { - $allow = array_merge($allow, array('HEAD')); + $ret = ['_route' => 'simple_not_trailing_slash_HEAD_method']; + if (!in_array($requestMethod, ['HEAD'])) { + $allow = array_merge($allow, ['HEAD']); goto not_simple_not_trailing_slash_HEAD_method; } @@ -148,9 +148,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher // simple_not_trailing_slash_POST_method if ('/not-trailing/simple/post-method' === $pathinfo) { - $ret = array('_route' => 'simple_not_trailing_slash_POST_method'); - if (!in_array($requestMethod, array('POST'))) { - $allow = array_merge($allow, array('POST')); + $ret = ['_route' => 'simple_not_trailing_slash_POST_method']; + if (!in_array($requestMethod, ['POST'])) { + $allow = array_merge($allow, ['POST']); goto not_simple_not_trailing_slash_POST_method; } @@ -163,14 +163,14 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher elseif (0 === strpos($pathinfo, '/not-trailing/regex')) { // regex_not_trailing_slash_no_methods if (0 === strpos($pathinfo, '/not-trailing/regex/no-methods') && preg_match('#^/not\\-trailing/regex/no\\-methods/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_not_trailing_slash_no_methods')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'regex_not_trailing_slash_no_methods']), array ()); } // regex_not_trailing_slash_GET_method if (0 === strpos($pathinfo, '/not-trailing/regex/get-method') && preg_match('#^/not\\-trailing/regex/get\\-method/(?P[^/]++)$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_not_trailing_slash_GET_method')), array ()); - if (!in_array($canonicalMethod, array('GET'))) { - $allow = array_merge($allow, array('GET')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'regex_not_trailing_slash_GET_method']), array ()); + if (!in_array($canonicalMethod, ['GET'])) { + $allow = array_merge($allow, ['GET']); goto not_regex_not_trailing_slash_GET_method; } @@ -180,9 +180,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher // regex_not_trailing_slash_HEAD_method if (0 === strpos($pathinfo, '/not-trailing/regex/head-method') && preg_match('#^/not\\-trailing/regex/head\\-method/(?P[^/]++)$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_not_trailing_slash_HEAD_method')), array ()); - if (!in_array($requestMethod, array('HEAD'))) { - $allow = array_merge($allow, array('HEAD')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'regex_not_trailing_slash_HEAD_method']), array ()); + if (!in_array($requestMethod, ['HEAD'])) { + $allow = array_merge($allow, ['HEAD']); goto not_regex_not_trailing_slash_HEAD_method; } @@ -192,9 +192,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher // regex_not_trailing_slash_POST_method if (0 === strpos($pathinfo, '/not-trailing/regex/post-method') && preg_match('#^/not\\-trailing/regex/post\\-method/(?P[^/]++)$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_not_trailing_slash_POST_method')), array ()); - if (!in_array($requestMethod, array('POST'))) { - $allow = array_merge($allow, array('POST')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'regex_not_trailing_slash_POST_method']), array ()); + if (!in_array($requestMethod, ['POST'])) { + $allow = array_merge($allow, ['POST']); goto not_regex_not_trailing_slash_POST_method; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher7.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher7.php index 81d76ea4..c7f8852c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher7.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher7.php @@ -17,7 +17,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec public function match($rawPathinfo) { - $allow = array(); + $allow = []; $pathinfo = rawurldecode($rawPathinfo); $trimmedPathinfo = rtrim($pathinfo, '/'); $context = $this->context; @@ -31,7 +31,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec if (0 === strpos($pathinfo, '/trailing/simple')) { // simple_trailing_slash_no_methods if ('/trailing/simple/no-methods' === $trimmedPathinfo) { - $ret = array('_route' => 'simple_trailing_slash_no_methods'); + $ret = ['_route' => 'simple_trailing_slash_no_methods']; if ('/' === substr($pathinfo, -1)) { // no-op } elseif ('GET' !== $canonicalMethod) { @@ -46,7 +46,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // simple_trailing_slash_GET_method if ('/trailing/simple/get-method' === $trimmedPathinfo) { - $ret = array('_route' => 'simple_trailing_slash_GET_method'); + $ret = ['_route' => 'simple_trailing_slash_GET_method']; if ('/' === substr($pathinfo, -1)) { // no-op } elseif ('GET' !== $canonicalMethod) { @@ -55,8 +55,8 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec return array_replace($ret, $this->redirect($rawPathinfo.'/', 'simple_trailing_slash_GET_method')); } - if (!in_array($canonicalMethod, array('GET'))) { - $allow = array_merge($allow, array('GET')); + if (!in_array($canonicalMethod, ['GET'])) { + $allow = array_merge($allow, ['GET']); goto not_simple_trailing_slash_GET_method; } @@ -66,9 +66,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // simple_trailing_slash_HEAD_method if ('/trailing/simple/head-method/' === $pathinfo) { - $ret = array('_route' => 'simple_trailing_slash_HEAD_method'); - if (!in_array($requestMethod, array('HEAD'))) { - $allow = array_merge($allow, array('HEAD')); + $ret = ['_route' => 'simple_trailing_slash_HEAD_method']; + if (!in_array($requestMethod, ['HEAD'])) { + $allow = array_merge($allow, ['HEAD']); goto not_simple_trailing_slash_HEAD_method; } @@ -78,9 +78,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // simple_trailing_slash_POST_method if ('/trailing/simple/post-method/' === $pathinfo) { - $ret = array('_route' => 'simple_trailing_slash_POST_method'); - if (!in_array($requestMethod, array('POST'))) { - $allow = array_merge($allow, array('POST')); + $ret = ['_route' => 'simple_trailing_slash_POST_method']; + if (!in_array($requestMethod, ['POST'])) { + $allow = array_merge($allow, ['POST']); goto not_simple_trailing_slash_POST_method; } @@ -93,7 +93,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec elseif (0 === strpos($pathinfo, '/trailing/regex')) { // regex_trailing_slash_no_methods if (0 === strpos($pathinfo, '/trailing/regex/no-methods') && preg_match('#^/trailing/regex/no\\-methods/(?P[^/]++)/?$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_trailing_slash_no_methods')), array ()); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'regex_trailing_slash_no_methods']), array ()); if ('/' === substr($pathinfo, -1)) { // no-op } elseif ('GET' !== $canonicalMethod) { @@ -108,7 +108,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // regex_trailing_slash_GET_method if (0 === strpos($pathinfo, '/trailing/regex/get-method') && preg_match('#^/trailing/regex/get\\-method/(?P[^/]++)/?$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_trailing_slash_GET_method')), array ()); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'regex_trailing_slash_GET_method']), array ()); if ('/' === substr($pathinfo, -1)) { // no-op } elseif ('GET' !== $canonicalMethod) { @@ -117,8 +117,8 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec return array_replace($ret, $this->redirect($rawPathinfo.'/', 'regex_trailing_slash_GET_method')); } - if (!in_array($canonicalMethod, array('GET'))) { - $allow = array_merge($allow, array('GET')); + if (!in_array($canonicalMethod, ['GET'])) { + $allow = array_merge($allow, ['GET']); goto not_regex_trailing_slash_GET_method; } @@ -128,9 +128,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // regex_trailing_slash_HEAD_method if (0 === strpos($pathinfo, '/trailing/regex/head-method') && preg_match('#^/trailing/regex/head\\-method/(?P[^/]++)/$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_trailing_slash_HEAD_method')), array ()); - if (!in_array($requestMethod, array('HEAD'))) { - $allow = array_merge($allow, array('HEAD')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'regex_trailing_slash_HEAD_method']), array ()); + if (!in_array($requestMethod, ['HEAD'])) { + $allow = array_merge($allow, ['HEAD']); goto not_regex_trailing_slash_HEAD_method; } @@ -140,9 +140,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // regex_trailing_slash_POST_method if (0 === strpos($pathinfo, '/trailing/regex/post-method') && preg_match('#^/trailing/regex/post\\-method/(?P[^/]++)/$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_trailing_slash_POST_method')), array ()); - if (!in_array($requestMethod, array('POST'))) { - $allow = array_merge($allow, array('POST')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'regex_trailing_slash_POST_method']), array ()); + if (!in_array($requestMethod, ['POST'])) { + $allow = array_merge($allow, ['POST']); goto not_regex_trailing_slash_POST_method; } @@ -155,14 +155,14 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec elseif (0 === strpos($pathinfo, '/not-trailing/simple')) { // simple_not_trailing_slash_no_methods if ('/not-trailing/simple/no-methods' === $pathinfo) { - return array('_route' => 'simple_not_trailing_slash_no_methods'); + return ['_route' => 'simple_not_trailing_slash_no_methods']; } // simple_not_trailing_slash_GET_method if ('/not-trailing/simple/get-method' === $pathinfo) { - $ret = array('_route' => 'simple_not_trailing_slash_GET_method'); - if (!in_array($canonicalMethod, array('GET'))) { - $allow = array_merge($allow, array('GET')); + $ret = ['_route' => 'simple_not_trailing_slash_GET_method']; + if (!in_array($canonicalMethod, ['GET'])) { + $allow = array_merge($allow, ['GET']); goto not_simple_not_trailing_slash_GET_method; } @@ -172,9 +172,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // simple_not_trailing_slash_HEAD_method if ('/not-trailing/simple/head-method' === $pathinfo) { - $ret = array('_route' => 'simple_not_trailing_slash_HEAD_method'); - if (!in_array($requestMethod, array('HEAD'))) { - $allow = array_merge($allow, array('HEAD')); + $ret = ['_route' => 'simple_not_trailing_slash_HEAD_method']; + if (!in_array($requestMethod, ['HEAD'])) { + $allow = array_merge($allow, ['HEAD']); goto not_simple_not_trailing_slash_HEAD_method; } @@ -184,9 +184,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // simple_not_trailing_slash_POST_method if ('/not-trailing/simple/post-method' === $pathinfo) { - $ret = array('_route' => 'simple_not_trailing_slash_POST_method'); - if (!in_array($requestMethod, array('POST'))) { - $allow = array_merge($allow, array('POST')); + $ret = ['_route' => 'simple_not_trailing_slash_POST_method']; + if (!in_array($requestMethod, ['POST'])) { + $allow = array_merge($allow, ['POST']); goto not_simple_not_trailing_slash_POST_method; } @@ -199,14 +199,14 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec elseif (0 === strpos($pathinfo, '/not-trailing/regex')) { // regex_not_trailing_slash_no_methods if (0 === strpos($pathinfo, '/not-trailing/regex/no-methods') && preg_match('#^/not\\-trailing/regex/no\\-methods/(?P[^/]++)$#sD', $pathinfo, $matches)) { - return $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_not_trailing_slash_no_methods')), array ()); + return $this->mergeDefaults(array_replace($matches, ['_route' => 'regex_not_trailing_slash_no_methods']), array ()); } // regex_not_trailing_slash_GET_method if (0 === strpos($pathinfo, '/not-trailing/regex/get-method') && preg_match('#^/not\\-trailing/regex/get\\-method/(?P[^/]++)$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_not_trailing_slash_GET_method')), array ()); - if (!in_array($canonicalMethod, array('GET'))) { - $allow = array_merge($allow, array('GET')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'regex_not_trailing_slash_GET_method']), array ()); + if (!in_array($canonicalMethod, ['GET'])) { + $allow = array_merge($allow, ['GET']); goto not_regex_not_trailing_slash_GET_method; } @@ -216,9 +216,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // regex_not_trailing_slash_HEAD_method if (0 === strpos($pathinfo, '/not-trailing/regex/head-method') && preg_match('#^/not\\-trailing/regex/head\\-method/(?P[^/]++)$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_not_trailing_slash_HEAD_method')), array ()); - if (!in_array($requestMethod, array('HEAD'))) { - $allow = array_merge($allow, array('HEAD')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'regex_not_trailing_slash_HEAD_method']), array ()); + if (!in_array($requestMethod, ['HEAD'])) { + $allow = array_merge($allow, ['HEAD']); goto not_regex_not_trailing_slash_HEAD_method; } @@ -228,9 +228,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // regex_not_trailing_slash_POST_method if (0 === strpos($pathinfo, '/not-trailing/regex/post-method') && preg_match('#^/not\\-trailing/regex/post\\-method/(?P[^/]++)$#sD', $pathinfo, $matches)) { - $ret = $this->mergeDefaults(array_replace($matches, array('_route' => 'regex_not_trailing_slash_POST_method')), array ()); - if (!in_array($requestMethod, array('POST'))) { - $allow = array_merge($allow, array('POST')); + $ret = $this->mergeDefaults(array_replace($matches, ['_route' => 'regex_not_trailing_slash_POST_method']), array ()); + if (!in_array($requestMethod, ['POST'])) { + $allow = array_merge($allow, ['POST']); goto not_regex_not_trailing_slash_POST_method; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/glob/php_dsl_bar.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/glob/php_dsl_bar.php index e2b91b17..e6ccf24f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/glob/php_dsl_bar.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/glob/php_dsl_bar.php @@ -6,7 +6,7 @@ return function (RoutingConfigurator $routes) { $collection = $routes->collection(); $collection->add('bar_route', '/bar') - ->defaults(array('_controller' => 'AppBundle:Bar:view')); + ->defaults(['_controller' => 'AppBundle:Bar:view']); return $collection; }; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/glob/php_dsl_baz.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/glob/php_dsl_baz.php index ca8f188a..cce65d70 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/glob/php_dsl_baz.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/glob/php_dsl_baz.php @@ -6,7 +6,7 @@ return function (RoutingConfigurator $routes) { $collection = $routes->collection(); $collection->add('baz_route', '/baz') - ->defaults(array('_controller' => 'AppBundle:Baz:view')); + ->defaults(['_controller' => 'AppBundle:Baz:view']); return $collection; }; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/php_dsl.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/php_dsl.php index 0780c9fa..73da0124 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/php_dsl.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/php_dsl.php @@ -7,16 +7,16 @@ return function (RoutingConfigurator $routes) { ->collection() ->add('foo', '/foo') ->condition('abc') - ->options(array('utf8' => true)) + ->options(['utf8' => true]) ->add('buz', 'zub') ->controller('foo:act'); $routes->import('php_dsl_sub.php') ->prefix('/sub') - ->requirements(array('id' => '\d+')); + ->requirements(['id' => '\d+']); $routes->add('ouf', '/ouf') - ->schemes(array('https')) - ->methods(array('GET')) - ->defaults(array('id' => 0)); + ->schemes(['https']) + ->methods(['GET']) + ->defaults(['id' => 0]); }; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.php index 52ddfde0..3ef0e148 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.php @@ -6,12 +6,12 @@ use Symfony\Component\Routing\RouteCollection; $collection = new RouteCollection(); $collection->add('blog_show', new Route( '/blog/{slug}', - array('_controller' => 'MyBlogBundle:Blog:show'), - array('locale' => '\w+'), - array('compiler_class' => 'RouteCompiler'), + ['_controller' => 'MyBlogBundle:Blog:show'], + ['locale' => '\w+'], + ['compiler_class' => 'RouteCompiler'], '{locale}.example.com', - array('https'), - array('GET', 'POST', 'put', 'OpTiOnS'), + ['https'], + ['GET', 'POST', 'put', 'OpTiOnS'], 'context.getMethod() == "GET"' )); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validresource.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validresource.php index 482c80b2..31d354a3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validresource.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validresource.php @@ -3,15 +3,15 @@ /** @var $loader \Symfony\Component\Routing\Loader\PhpFileLoader */ /** @var \Symfony\Component\Routing\RouteCollection $collection */ $collection = $loader->import('validpattern.php'); -$collection->addDefaults(array( +$collection->addDefaults([ 'foo' => 123, -)); -$collection->addRequirements(array( +]); +$collection->addRequirements([ 'foo' => '\d+', -)); -$collection->addOptions(array( +]); +$collection->addOptions([ 'foo' => 'bar', -)); +]); $collection->setCondition('context.getMethod() == "POST"'); $collection->addPrefix('/prefix'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php index 32dc83e8..a6a47b4b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php @@ -73,10 +73,10 @@ class PhpGeneratorDumperTest extends TestCase $projectUrlGenerator = new \ProjectUrlGenerator(new RequestContext('/app.php')); - $absoluteUrlWithParameter = $projectUrlGenerator->generate('Test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_URL); - $absoluteUrlWithoutParameter = $projectUrlGenerator->generate('Test2', array(), UrlGeneratorInterface::ABSOLUTE_URL); - $relativeUrlWithParameter = $projectUrlGenerator->generate('Test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_PATH); - $relativeUrlWithoutParameter = $projectUrlGenerator->generate('Test2', array(), UrlGeneratorInterface::ABSOLUTE_PATH); + $absoluteUrlWithParameter = $projectUrlGenerator->generate('Test', ['foo' => 'bar'], UrlGeneratorInterface::ABSOLUTE_URL); + $absoluteUrlWithoutParameter = $projectUrlGenerator->generate('Test2', [], UrlGeneratorInterface::ABSOLUTE_URL); + $relativeUrlWithParameter = $projectUrlGenerator->generate('Test', ['foo' => 'bar'], UrlGeneratorInterface::ABSOLUTE_PATH); + $relativeUrlWithoutParameter = $projectUrlGenerator->generate('Test2', [], UrlGeneratorInterface::ABSOLUTE_PATH); $this->assertEquals('http://localhost/app.php/testing/bar', $absoluteUrlWithParameter); $this->assertEquals('http://localhost/app.php/testing2', $absoluteUrlWithoutParameter); @@ -96,18 +96,18 @@ class PhpGeneratorDumperTest extends TestCase } $this->routeCollection->add('Test2', new Route('/testing2')); - file_put_contents($this->largeTestTmpFilepath, $this->generatorDumper->dump(array( + file_put_contents($this->largeTestTmpFilepath, $this->generatorDumper->dump([ 'class' => 'ProjectLargeUrlGenerator', - ))); + ])); $this->routeCollection = $this->generatorDumper = null; include $this->largeTestTmpFilepath; $projectUrlGenerator = new \ProjectLargeUrlGenerator(new RequestContext('/app.php')); - $absoluteUrlWithParameter = $projectUrlGenerator->generate('Test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_URL); - $absoluteUrlWithoutParameter = $projectUrlGenerator->generate('Test2', array(), UrlGeneratorInterface::ABSOLUTE_URL); - $relativeUrlWithParameter = $projectUrlGenerator->generate('Test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_PATH); - $relativeUrlWithoutParameter = $projectUrlGenerator->generate('Test2', array(), UrlGeneratorInterface::ABSOLUTE_PATH); + $absoluteUrlWithParameter = $projectUrlGenerator->generate('Test', ['foo' => 'bar'], UrlGeneratorInterface::ABSOLUTE_URL); + $absoluteUrlWithoutParameter = $projectUrlGenerator->generate('Test2', [], UrlGeneratorInterface::ABSOLUTE_URL); + $relativeUrlWithParameter = $projectUrlGenerator->generate('Test', ['foo' => 'bar'], UrlGeneratorInterface::ABSOLUTE_PATH); + $relativeUrlWithoutParameter = $projectUrlGenerator->generate('Test2', [], UrlGeneratorInterface::ABSOLUTE_PATH); $this->assertEquals('http://localhost/app.php/testing/bar', $absoluteUrlWithParameter); $this->assertEquals('http://localhost/app.php/testing2', $absoluteUrlWithoutParameter); @@ -120,12 +120,12 @@ class PhpGeneratorDumperTest extends TestCase */ public function testDumpWithoutRoutes() { - file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(array('class' => 'WithoutRoutesUrlGenerator'))); + file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(['class' => 'WithoutRoutesUrlGenerator'])); include $this->testTmpFilepath; $projectUrlGenerator = new \WithoutRoutesUrlGenerator(new RequestContext('/app.php')); - $projectUrlGenerator->generate('Test', array()); + $projectUrlGenerator->generate('Test', []); } /** @@ -135,45 +135,45 @@ class PhpGeneratorDumperTest extends TestCase { $this->routeCollection->add('Test', new Route('/test')); - file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(array('class' => 'NonExistingRoutesUrlGenerator'))); + file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(['class' => 'NonExistingRoutesUrlGenerator'])); include $this->testTmpFilepath; $projectUrlGenerator = new \NonExistingRoutesUrlGenerator(new RequestContext()); - $url = $projectUrlGenerator->generate('NonExisting', array()); + $url = $projectUrlGenerator->generate('NonExisting', []); } public function testDumpForRouteWithDefaults() { - $this->routeCollection->add('Test', new Route('/testing/{foo}', array('foo' => 'bar'))); + $this->routeCollection->add('Test', new Route('/testing/{foo}', ['foo' => 'bar'])); - file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(array('class' => 'DefaultRoutesUrlGenerator'))); + file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(['class' => 'DefaultRoutesUrlGenerator'])); include $this->testTmpFilepath; $projectUrlGenerator = new \DefaultRoutesUrlGenerator(new RequestContext()); - $url = $projectUrlGenerator->generate('Test', array()); + $url = $projectUrlGenerator->generate('Test', []); $this->assertEquals('/testing', $url); } public function testDumpWithSchemeRequirement() { - $this->routeCollection->add('Test1', new Route('/testing', array(), array(), array(), '', array('ftp', 'https'))); + $this->routeCollection->add('Test1', new Route('/testing', [], [], [], '', ['ftp', 'https'])); - file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(array('class' => 'SchemeUrlGenerator'))); + file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(['class' => 'SchemeUrlGenerator'])); include $this->testTmpFilepath; $projectUrlGenerator = new \SchemeUrlGenerator(new RequestContext('/app.php')); - $absoluteUrl = $projectUrlGenerator->generate('Test1', array(), UrlGeneratorInterface::ABSOLUTE_URL); - $relativeUrl = $projectUrlGenerator->generate('Test1', array(), UrlGeneratorInterface::ABSOLUTE_PATH); + $absoluteUrl = $projectUrlGenerator->generate('Test1', [], UrlGeneratorInterface::ABSOLUTE_URL); + $relativeUrl = $projectUrlGenerator->generate('Test1', [], UrlGeneratorInterface::ABSOLUTE_PATH); $this->assertEquals('ftp://localhost/app.php/testing', $absoluteUrl); $this->assertEquals('ftp://localhost/app.php/testing', $relativeUrl); $projectUrlGenerator = new \SchemeUrlGenerator(new RequestContext('/app.php', 'GET', 'localhost', 'https')); - $absoluteUrl = $projectUrlGenerator->generate('Test1', array(), UrlGeneratorInterface::ABSOLUTE_URL); - $relativeUrl = $projectUrlGenerator->generate('Test1', array(), UrlGeneratorInterface::ABSOLUTE_PATH); + $absoluteUrl = $projectUrlGenerator->generate('Test1', [], UrlGeneratorInterface::ABSOLUTE_URL); + $relativeUrl = $projectUrlGenerator->generate('Test1', [], UrlGeneratorInterface::ABSOLUTE_PATH); $this->assertEquals('https://localhost/app.php/testing', $absoluteUrl); $this->assertEquals('/app.php/testing', $relativeUrl); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php index d4bf18cc..7f64a1f3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php @@ -23,7 +23,7 @@ class UrlGeneratorTest extends TestCase public function testAbsoluteUrlWithPort80() { $routes = $this->getRoutes('test', new Route('/testing')); - $url = $this->getGenerator($routes)->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL); + $url = $this->getGenerator($routes)->generate('test', [], UrlGeneratorInterface::ABSOLUTE_URL); $this->assertEquals('http://localhost/app.php/testing', $url); } @@ -31,7 +31,7 @@ class UrlGeneratorTest extends TestCase public function testAbsoluteSecureUrlWithPort443() { $routes = $this->getRoutes('test', new Route('/testing')); - $url = $this->getGenerator($routes, array('scheme' => 'https'))->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL); + $url = $this->getGenerator($routes, ['scheme' => 'https'])->generate('test', [], UrlGeneratorInterface::ABSOLUTE_URL); $this->assertEquals('https://localhost/app.php/testing', $url); } @@ -39,7 +39,7 @@ class UrlGeneratorTest extends TestCase public function testAbsoluteUrlWithNonStandardPort() { $routes = $this->getRoutes('test', new Route('/testing')); - $url = $this->getGenerator($routes, array('httpPort' => 8080))->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL); + $url = $this->getGenerator($routes, ['httpPort' => 8080])->generate('test', [], UrlGeneratorInterface::ABSOLUTE_URL); $this->assertEquals('http://localhost:8080/app.php/testing', $url); } @@ -47,7 +47,7 @@ class UrlGeneratorTest extends TestCase public function testAbsoluteSecureUrlWithNonStandardPort() { $routes = $this->getRoutes('test', new Route('/testing')); - $url = $this->getGenerator($routes, array('httpsPort' => 8080, 'scheme' => 'https'))->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL); + $url = $this->getGenerator($routes, ['httpsPort' => 8080, 'scheme' => 'https'])->generate('test', [], UrlGeneratorInterface::ABSOLUTE_URL); $this->assertEquals('https://localhost:8080/app.php/testing', $url); } @@ -55,7 +55,7 @@ class UrlGeneratorTest extends TestCase public function testRelativeUrlWithoutParameters() { $routes = $this->getRoutes('test', new Route('/testing')); - $url = $this->getGenerator($routes)->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_PATH); + $url = $this->getGenerator($routes)->generate('test', [], UrlGeneratorInterface::ABSOLUTE_PATH); $this->assertEquals('/app.php/testing', $url); } @@ -63,15 +63,15 @@ class UrlGeneratorTest extends TestCase public function testRelativeUrlWithParameter() { $routes = $this->getRoutes('test', new Route('/testing/{foo}')); - $url = $this->getGenerator($routes)->generate('test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_PATH); + $url = $this->getGenerator($routes)->generate('test', ['foo' => 'bar'], UrlGeneratorInterface::ABSOLUTE_PATH); $this->assertEquals('/app.php/testing/bar', $url); } public function testRelativeUrlWithNullParameter() { - $routes = $this->getRoutes('test', new Route('/testing.{format}', array('format' => null))); - $url = $this->getGenerator($routes)->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_PATH); + $routes = $this->getRoutes('test', new Route('/testing.{format}', ['format' => null])); + $url = $this->getGenerator($routes)->generate('test', [], UrlGeneratorInterface::ABSOLUTE_PATH); $this->assertEquals('/app.php/testing', $url); } @@ -81,31 +81,31 @@ class UrlGeneratorTest extends TestCase */ public function testRelativeUrlWithNullParameterButNotOptional() { - $routes = $this->getRoutes('test', new Route('/testing/{foo}/bar', array('foo' => null))); + $routes = $this->getRoutes('test', new Route('/testing/{foo}/bar', ['foo' => null])); // This must raise an exception because the default requirement for "foo" is "[^/]+" which is not met with these params. // Generating path "/testing//bar" would be wrong as matching this route would fail. - $this->getGenerator($routes)->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_PATH); + $this->getGenerator($routes)->generate('test', [], UrlGeneratorInterface::ABSOLUTE_PATH); } public function testRelativeUrlWithOptionalZeroParameter() { $routes = $this->getRoutes('test', new Route('/testing/{page}')); - $url = $this->getGenerator($routes)->generate('test', array('page' => 0), UrlGeneratorInterface::ABSOLUTE_PATH); + $url = $this->getGenerator($routes)->generate('test', ['page' => 0], UrlGeneratorInterface::ABSOLUTE_PATH); $this->assertEquals('/app.php/testing/0', $url); } public function testNotPassedOptionalParameterInBetween() { - $routes = $this->getRoutes('test', new Route('/{slug}/{page}', array('slug' => 'index', 'page' => 0))); - $this->assertSame('/app.php/index/1', $this->getGenerator($routes)->generate('test', array('page' => 1))); + $routes = $this->getRoutes('test', new Route('/{slug}/{page}', ['slug' => 'index', 'page' => 0])); + $this->assertSame('/app.php/index/1', $this->getGenerator($routes)->generate('test', ['page' => 1])); $this->assertSame('/app.php/', $this->getGenerator($routes)->generate('test')); } public function testRelativeUrlWithExtraParameters() { $routes = $this->getRoutes('test', new Route('/testing')); - $url = $this->getGenerator($routes)->generate('test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_PATH); + $url = $this->getGenerator($routes)->generate('test', ['foo' => 'bar'], UrlGeneratorInterface::ABSOLUTE_PATH); $this->assertEquals('/app.php/testing?foo=bar', $url); } @@ -113,7 +113,7 @@ class UrlGeneratorTest extends TestCase public function testAbsoluteUrlWithExtraParameters() { $routes = $this->getRoutes('test', new Route('/testing')); - $url = $this->getGenerator($routes)->generate('test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_URL); + $url = $this->getGenerator($routes)->generate('test', ['foo' => 'bar'], UrlGeneratorInterface::ABSOLUTE_URL); $this->assertEquals('http://localhost/app.php/testing?foo=bar', $url); } @@ -121,7 +121,7 @@ class UrlGeneratorTest extends TestCase public function testUrlWithNullExtraParameters() { $routes = $this->getRoutes('test', new Route('/testing')); - $url = $this->getGenerator($routes)->generate('test', array('foo' => null), UrlGeneratorInterface::ABSOLUTE_URL); + $url = $this->getGenerator($routes)->generate('test', ['foo' => null], UrlGeneratorInterface::ABSOLUTE_URL); $this->assertEquals('http://localhost/app.php/testing', $url); } @@ -133,7 +133,7 @@ class UrlGeneratorTest extends TestCase $context = new RequestContext('/app.php'); $context->setParameter('bar', 'bar'); $generator->setContext($context); - $url = $generator->generate('test', array('foo' => 'bar')); + $url = $generator->generate('test', ['foo' => 'bar']); $this->assertEquals('/app.php/testing?foo=bar', $url); } @@ -145,19 +145,19 @@ class UrlGeneratorTest extends TestCase $context = new RequestContext('/app.php'); $context->setParameter('foo', 'bar'); $generator->setContext($context); - $url = $generator->generate('test', array()); + $url = $generator->generate('test', []); $this->assertEquals('/app.php/testing/bar', $url); } public function testGlobalParameterHasHigherPriorityThanDefault() { - $routes = $this->getRoutes('test', new Route('/{_locale}', array('_locale' => 'en'))); + $routes = $this->getRoutes('test', new Route('/{_locale}', ['_locale' => 'en'])); $generator = $this->getGenerator($routes); $context = new RequestContext('/app.php'); $context->setParameter('_locale', 'de'); $generator->setContext($context); - $url = $generator->generate('test', array()); + $url = $generator->generate('test', []); $this->assertSame('/app.php/de', $url); } @@ -168,7 +168,7 @@ class UrlGeneratorTest extends TestCase public function testGenerateWithoutRoutes() { $routes = $this->getRoutes('foo', new Route('/testing/{foo}')); - $this->getGenerator($routes)->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL); + $this->getGenerator($routes)->generate('test', [], UrlGeneratorInterface::ABSOLUTE_URL); } /** @@ -177,7 +177,7 @@ class UrlGeneratorTest extends TestCase public function testGenerateForRouteWithoutMandatoryParameter() { $routes = $this->getRoutes('test', new Route('/testing/{foo}')); - $this->getGenerator($routes)->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL); + $this->getGenerator($routes)->generate('test', [], UrlGeneratorInterface::ABSOLUTE_URL); } /** @@ -185,8 +185,8 @@ class UrlGeneratorTest extends TestCase */ public function testGenerateForRouteWithInvalidOptionalParameter() { - $routes = $this->getRoutes('test', new Route('/testing/{foo}', array('foo' => '1'), array('foo' => 'd+'))); - $this->getGenerator($routes)->generate('test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_URL); + $routes = $this->getRoutes('test', new Route('/testing/{foo}', ['foo' => '1'], ['foo' => 'd+'])); + $this->getGenerator($routes)->generate('test', ['foo' => 'bar'], UrlGeneratorInterface::ABSOLUTE_URL); } /** @@ -194,35 +194,35 @@ class UrlGeneratorTest extends TestCase */ public function testGenerateForRouteWithInvalidParameter() { - $routes = $this->getRoutes('test', new Route('/testing/{foo}', array(), array('foo' => '1|2'))); - $this->getGenerator($routes)->generate('test', array('foo' => '0'), UrlGeneratorInterface::ABSOLUTE_URL); + $routes = $this->getRoutes('test', new Route('/testing/{foo}', [], ['foo' => '1|2'])); + $this->getGenerator($routes)->generate('test', ['foo' => '0'], UrlGeneratorInterface::ABSOLUTE_URL); } public function testGenerateForRouteWithInvalidOptionalParameterNonStrict() { - $routes = $this->getRoutes('test', new Route('/testing/{foo}', array('foo' => '1'), array('foo' => 'd+'))); + $routes = $this->getRoutes('test', new Route('/testing/{foo}', ['foo' => '1'], ['foo' => 'd+'])); $generator = $this->getGenerator($routes); $generator->setStrictRequirements(false); - $this->assertNull($generator->generate('test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_URL)); + $this->assertNull($generator->generate('test', ['foo' => 'bar'], UrlGeneratorInterface::ABSOLUTE_URL)); } public function testGenerateForRouteWithInvalidOptionalParameterNonStrictWithLogger() { - $routes = $this->getRoutes('test', new Route('/testing/{foo}', array('foo' => '1'), array('foo' => 'd+'))); + $routes = $this->getRoutes('test', new Route('/testing/{foo}', ['foo' => '1'], ['foo' => 'd+'])); $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); $logger->expects($this->once()) ->method('error'); - $generator = $this->getGenerator($routes, array(), $logger); + $generator = $this->getGenerator($routes, [], $logger); $generator->setStrictRequirements(false); - $this->assertNull($generator->generate('test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_URL)); + $this->assertNull($generator->generate('test', ['foo' => 'bar'], UrlGeneratorInterface::ABSOLUTE_URL)); } public function testGenerateForRouteWithInvalidParameterButDisabledRequirementsCheck() { - $routes = $this->getRoutes('test', new Route('/testing/{foo}', array('foo' => '1'), array('foo' => 'd+'))); + $routes = $this->getRoutes('test', new Route('/testing/{foo}', ['foo' => '1'], ['foo' => 'd+'])); $generator = $this->getGenerator($routes); $generator->setStrictRequirements(null); - $this->assertSame('/app.php/testing/bar', $generator->generate('test', array('foo' => 'bar'))); + $this->assertSame('/app.php/testing/bar', $generator->generate('test', ['foo' => 'bar'])); } /** @@ -230,8 +230,8 @@ class UrlGeneratorTest extends TestCase */ public function testGenerateForRouteWithInvalidMandatoryParameter() { - $routes = $this->getRoutes('test', new Route('/testing/{foo}', array(), array('foo' => 'd+'))); - $this->getGenerator($routes)->generate('test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_URL); + $routes = $this->getRoutes('test', new Route('/testing/{foo}', [], ['foo' => 'd+'])); + $this->getGenerator($routes)->generate('test', ['foo' => 'bar'], UrlGeneratorInterface::ABSOLUTE_URL); } /** @@ -239,8 +239,8 @@ class UrlGeneratorTest extends TestCase */ public function testGenerateForRouteWithInvalidUtf8Parameter() { - $routes = $this->getRoutes('test', new Route('/testing/{foo}', array(), array('foo' => '\pL+'), array('utf8' => true))); - $this->getGenerator($routes)->generate('test', array('foo' => 'abc123'), UrlGeneratorInterface::ABSOLUTE_URL); + $routes = $this->getRoutes('test', new Route('/testing/{foo}', [], ['foo' => '\pL+'], ['utf8' => true])); + $this->getGenerator($routes)->generate('test', ['foo' => 'abc123'], UrlGeneratorInterface::ABSOLUTE_URL); } /** @@ -248,31 +248,31 @@ class UrlGeneratorTest extends TestCase */ public function testRequiredParamAndEmptyPassed() { - $routes = $this->getRoutes('test', new Route('/{slug}', array(), array('slug' => '.+'))); - $this->getGenerator($routes)->generate('test', array('slug' => '')); + $routes = $this->getRoutes('test', new Route('/{slug}', [], ['slug' => '.+'])); + $this->getGenerator($routes)->generate('test', ['slug' => '']); } public function testSchemeRequirementDoesNothingIfSameCurrentScheme() { - $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('http'))); + $routes = $this->getRoutes('test', new Route('/', [], [], [], '', ['http'])); $this->assertEquals('/app.php/', $this->getGenerator($routes)->generate('test')); - $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('https'))); - $this->assertEquals('/app.php/', $this->getGenerator($routes, array('scheme' => 'https'))->generate('test')); + $routes = $this->getRoutes('test', new Route('/', [], [], [], '', ['https'])); + $this->assertEquals('/app.php/', $this->getGenerator($routes, ['scheme' => 'https'])->generate('test')); } public function testSchemeRequirementForcesAbsoluteUrl() { - $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('https'))); + $routes = $this->getRoutes('test', new Route('/', [], [], [], '', ['https'])); $this->assertEquals('https://localhost/app.php/', $this->getGenerator($routes)->generate('test')); - $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('http'))); - $this->assertEquals('http://localhost/app.php/', $this->getGenerator($routes, array('scheme' => 'https'))->generate('test')); + $routes = $this->getRoutes('test', new Route('/', [], [], [], '', ['http'])); + $this->assertEquals('http://localhost/app.php/', $this->getGenerator($routes, ['scheme' => 'https'])->generate('test')); } public function testSchemeRequirementCreatesUrlForFirstRequiredScheme() { - $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('Ftp', 'https'))); + $routes = $this->getRoutes('test', new Route('/', [], [], [], '', ['Ftp', 'https'])); $this->assertEquals('ftp://localhost/app.php/', $this->getGenerator($routes)->generate('test')); } @@ -281,48 +281,48 @@ class UrlGeneratorTest extends TestCase $routes = $this->getRoutes('test', new Route('//path-and-not-domain')); // this must not generate '//path-and-not-domain' because that would be a network path - $this->assertSame('/path-and-not-domain', $this->getGenerator($routes, array('BaseUrl' => ''))->generate('test')); + $this->assertSame('/path-and-not-domain', $this->getGenerator($routes, ['BaseUrl' => ''])->generate('test')); } public function testNoTrailingSlashForMultipleOptionalParameters() { - $routes = $this->getRoutes('test', new Route('/category/{slug1}/{slug2}/{slug3}', array('slug2' => null, 'slug3' => null))); + $routes = $this->getRoutes('test', new Route('/category/{slug1}/{slug2}/{slug3}', ['slug2' => null, 'slug3' => null])); - $this->assertEquals('/app.php/category/foo', $this->getGenerator($routes)->generate('test', array('slug1' => 'foo'))); + $this->assertEquals('/app.php/category/foo', $this->getGenerator($routes)->generate('test', ['slug1' => 'foo'])); } public function testWithAnIntegerAsADefaultValue() { - $routes = $this->getRoutes('test', new Route('/{default}', array('default' => 0))); + $routes = $this->getRoutes('test', new Route('/{default}', ['default' => 0])); - $this->assertEquals('/app.php/foo', $this->getGenerator($routes)->generate('test', array('default' => 'foo'))); + $this->assertEquals('/app.php/foo', $this->getGenerator($routes)->generate('test', ['default' => 'foo'])); } public function testNullForOptionalParameterIsIgnored() { - $routes = $this->getRoutes('test', new Route('/test/{default}', array('default' => 0))); + $routes = $this->getRoutes('test', new Route('/test/{default}', ['default' => 0])); - $this->assertEquals('/app.php/test', $this->getGenerator($routes)->generate('test', array('default' => null))); + $this->assertEquals('/app.php/test', $this->getGenerator($routes)->generate('test', ['default' => null])); } public function testQueryParamSameAsDefault() { - $routes = $this->getRoutes('test', new Route('/test', array('page' => 1))); + $routes = $this->getRoutes('test', new Route('/test', ['page' => 1])); - $this->assertSame('/app.php/test?page=2', $this->getGenerator($routes)->generate('test', array('page' => 2))); - $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', array('page' => 1))); - $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', array('page' => '1'))); + $this->assertSame('/app.php/test?page=2', $this->getGenerator($routes)->generate('test', ['page' => 2])); + $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', ['page' => 1])); + $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', ['page' => '1'])); $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test')); } public function testArrayQueryParamSameAsDefault() { - $routes = $this->getRoutes('test', new Route('/test', array('array' => array('foo', 'bar')))); + $routes = $this->getRoutes('test', new Route('/test', ['array' => ['foo', 'bar']])); - $this->assertSame('/app.php/test?array%5B0%5D=bar&array%5B1%5D=foo', $this->getGenerator($routes)->generate('test', array('array' => array('bar', 'foo')))); - $this->assertSame('/app.php/test?array%5Ba%5D=foo&array%5Bb%5D=bar', $this->getGenerator($routes)->generate('test', array('array' => array('a' => 'foo', 'b' => 'bar')))); - $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', array('array' => array('foo', 'bar')))); - $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', array('array' => array(1 => 'bar', 0 => 'foo')))); + $this->assertSame('/app.php/test?array%5B0%5D=bar&array%5B1%5D=foo', $this->getGenerator($routes)->generate('test', ['array' => ['bar', 'foo']])); + $this->assertSame('/app.php/test?array%5Ba%5D=foo&array%5Bb%5D=bar', $this->getGenerator($routes)->generate('test', ['array' => ['a' => 'foo', 'b' => 'bar']])); + $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', ['array' => ['foo', 'bar']])); + $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', ['array' => [1 => 'bar', 0 => 'foo']])); $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test')); } @@ -342,11 +342,11 @@ class UrlGeneratorTest extends TestCase // This tests the encoding of reserved characters that are used for delimiting of URI components (defined in RFC 3986) // and other special ASCII chars. These chars are tested as static text path, variable path and query param. $chars = '@:[]/()*\'" +,;-._~&$<>|{}%\\^`!?foo=bar#id'; - $routes = $this->getRoutes('test', new Route("/$chars/{varpath}", array(), array('varpath' => '.+'))); - $this->assertSame($expectedPath, $this->getGenerator($routes)->generate('test', array( + $routes = $this->getRoutes('test', new Route("/$chars/{varpath}", [], ['varpath' => '.+'])); + $this->assertSame($expectedPath, $this->getGenerator($routes)->generate('test', [ 'varpath' => $chars, 'query' => $chars, - ))); + ])); } public function testEncodingOfRelativePathSegments() @@ -361,24 +361,24 @@ class UrlGeneratorTest extends TestCase public function testAdjacentVariables() { - $routes = $this->getRoutes('test', new Route('/{x}{y}{z}.{_format}', array('z' => 'default-z', '_format' => 'html'), array('y' => '\d+'))); + $routes = $this->getRoutes('test', new Route('/{x}{y}{z}.{_format}', ['z' => 'default-z', '_format' => 'html'], ['y' => '\d+'])); $generator = $this->getGenerator($routes); - $this->assertSame('/app.php/foo123', $generator->generate('test', array('x' => 'foo', 'y' => '123'))); - $this->assertSame('/app.php/foo123bar.xml', $generator->generate('test', array('x' => 'foo', 'y' => '123', 'z' => 'bar', '_format' => 'xml'))); + $this->assertSame('/app.php/foo123', $generator->generate('test', ['x' => 'foo', 'y' => '123'])); + $this->assertSame('/app.php/foo123bar.xml', $generator->generate('test', ['x' => 'foo', 'y' => '123', 'z' => 'bar', '_format' => 'xml'])); // The default requirement for 'x' should not allow the separator '.' in this case because it would otherwise match everything // and following optional variables like _format could never match. $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Routing\Exception\InvalidParameterException'); - $generator->generate('test', array('x' => 'do.t', 'y' => '123', 'z' => 'bar', '_format' => 'xml')); + $generator->generate('test', ['x' => 'do.t', 'y' => '123', 'z' => 'bar', '_format' => 'xml']); } public function testOptionalVariableWithNoRealSeparator() { - $routes = $this->getRoutes('test', new Route('/get{what}', array('what' => 'All'))); + $routes = $this->getRoutes('test', new Route('/get{what}', ['what' => 'All'])); $generator = $this->getGenerator($routes); $this->assertSame('/app.php/get', $generator->generate('test')); - $this->assertSame('/app.php/getSites', $generator->generate('test', array('what' => 'Sites'))); + $this->assertSame('/app.php/getSites', $generator->generate('test', ['what' => 'Sites'])); } public function testRequiredVariableWithNoRealSeparator() @@ -386,7 +386,7 @@ class UrlGeneratorTest extends TestCase $routes = $this->getRoutes('test', new Route('/get{what}Suffix')); $generator = $this->getGenerator($routes); - $this->assertSame('/app.php/getSitesSuffix', $generator->generate('test', array('what' => 'Sites'))); + $this->assertSame('/app.php/getSitesSuffix', $generator->generate('test', ['what' => 'Sites'])); } public function testDefaultRequirementOfVariable() @@ -394,7 +394,7 @@ class UrlGeneratorTest extends TestCase $routes = $this->getRoutes('test', new Route('/{page}.{_format}')); $generator = $this->getGenerator($routes); - $this->assertSame('/app.php/index.mobile.html', $generator->generate('test', array('page' => 'index', '_format' => 'mobile.html'))); + $this->assertSame('/app.php/index.mobile.html', $generator->generate('test', ['page' => 'index', '_format' => 'mobile.html'])); } /** @@ -403,7 +403,7 @@ class UrlGeneratorTest extends TestCase public function testDefaultRequirementOfVariableDisallowsSlash() { $routes = $this->getRoutes('test', new Route('/{page}.{_format}')); - $this->getGenerator($routes)->generate('test', array('page' => 'index', '_format' => 'sl/ash')); + $this->getGenerator($routes)->generate('test', ['page' => 'index', '_format' => 'sl/ash']); } /** @@ -412,28 +412,28 @@ class UrlGeneratorTest extends TestCase public function testDefaultRequirementOfVariableDisallowsNextSeparator() { $routes = $this->getRoutes('test', new Route('/{page}.{_format}')); - $this->getGenerator($routes)->generate('test', array('page' => 'do.t', '_format' => 'html')); + $this->getGenerator($routes)->generate('test', ['page' => 'do.t', '_format' => 'html']); } public function testWithHostDifferentFromContext() { - $routes = $this->getRoutes('test', new Route('/{name}', array(), array(), array(), '{locale}.example.com')); + $routes = $this->getRoutes('test', new Route('/{name}', [], [], [], '{locale}.example.com')); - $this->assertEquals('//fr.example.com/app.php/Fabien', $this->getGenerator($routes)->generate('test', array('name' => 'Fabien', 'locale' => 'fr'))); + $this->assertEquals('//fr.example.com/app.php/Fabien', $this->getGenerator($routes)->generate('test', ['name' => 'Fabien', 'locale' => 'fr'])); } public function testWithHostSameAsContext() { - $routes = $this->getRoutes('test', new Route('/{name}', array(), array(), array(), '{locale}.example.com')); + $routes = $this->getRoutes('test', new Route('/{name}', [], [], [], '{locale}.example.com')); - $this->assertEquals('/app.php/Fabien', $this->getGenerator($routes, array('host' => 'fr.example.com'))->generate('test', array('name' => 'Fabien', 'locale' => 'fr'))); + $this->assertEquals('/app.php/Fabien', $this->getGenerator($routes, ['host' => 'fr.example.com'])->generate('test', ['name' => 'Fabien', 'locale' => 'fr'])); } public function testWithHostSameAsContextAndAbsolute() { - $routes = $this->getRoutes('test', new Route('/{name}', array(), array(), array(), '{locale}.example.com')); + $routes = $this->getRoutes('test', new Route('/{name}', [], [], [], '{locale}.example.com')); - $this->assertEquals('http://fr.example.com/app.php/Fabien', $this->getGenerator($routes, array('host' => 'fr.example.com'))->generate('test', array('name' => 'Fabien', 'locale' => 'fr'), UrlGeneratorInterface::ABSOLUTE_URL)); + $this->assertEquals('http://fr.example.com/app.php/Fabien', $this->getGenerator($routes, ['host' => 'fr.example.com'])->generate('test', ['name' => 'Fabien', 'locale' => 'fr'], UrlGeneratorInterface::ABSOLUTE_URL)); } /** @@ -441,8 +441,8 @@ class UrlGeneratorTest extends TestCase */ public function testUrlWithInvalidParameterInHost() { - $routes = $this->getRoutes('test', new Route('/', array(), array('foo' => 'bar'), array(), '{foo}.example.com')); - $this->getGenerator($routes)->generate('test', array('foo' => 'baz'), UrlGeneratorInterface::ABSOLUTE_PATH); + $routes = $this->getRoutes('test', new Route('/', [], ['foo' => 'bar'], [], '{foo}.example.com')); + $this->getGenerator($routes)->generate('test', ['foo' => 'baz'], UrlGeneratorInterface::ABSOLUTE_PATH); } /** @@ -450,8 +450,8 @@ class UrlGeneratorTest extends TestCase */ public function testUrlWithInvalidParameterInHostWhenParamHasADefaultValue() { - $routes = $this->getRoutes('test', new Route('/', array('foo' => 'bar'), array('foo' => 'bar'), array(), '{foo}.example.com')); - $this->getGenerator($routes)->generate('test', array('foo' => 'baz'), UrlGeneratorInterface::ABSOLUTE_PATH); + $routes = $this->getRoutes('test', new Route('/', ['foo' => 'bar'], ['foo' => 'bar'], [], '{foo}.example.com')); + $this->getGenerator($routes)->generate('test', ['foo' => 'baz'], UrlGeneratorInterface::ABSOLUTE_PATH); } /** @@ -459,72 +459,72 @@ class UrlGeneratorTest extends TestCase */ public function testUrlWithInvalidParameterEqualsDefaultValueInHost() { - $routes = $this->getRoutes('test', new Route('/', array('foo' => 'baz'), array('foo' => 'bar'), array(), '{foo}.example.com')); - $this->getGenerator($routes)->generate('test', array('foo' => 'baz'), UrlGeneratorInterface::ABSOLUTE_PATH); + $routes = $this->getRoutes('test', new Route('/', ['foo' => 'baz'], ['foo' => 'bar'], [], '{foo}.example.com')); + $this->getGenerator($routes)->generate('test', ['foo' => 'baz'], UrlGeneratorInterface::ABSOLUTE_PATH); } public function testUrlWithInvalidParameterInHostInNonStrictMode() { - $routes = $this->getRoutes('test', new Route('/', array(), array('foo' => 'bar'), array(), '{foo}.example.com')); + $routes = $this->getRoutes('test', new Route('/', [], ['foo' => 'bar'], [], '{foo}.example.com')); $generator = $this->getGenerator($routes); $generator->setStrictRequirements(false); - $this->assertNull($generator->generate('test', array('foo' => 'baz'), UrlGeneratorInterface::ABSOLUTE_PATH)); + $this->assertNull($generator->generate('test', ['foo' => 'baz'], UrlGeneratorInterface::ABSOLUTE_PATH)); } public function testHostIsCaseInsensitive() { - $routes = $this->getRoutes('test', new Route('/', array(), array('locale' => 'en|de|fr'), array(), '{locale}.FooBar.com')); + $routes = $this->getRoutes('test', new Route('/', [], ['locale' => 'en|de|fr'], [], '{locale}.FooBar.com')); $generator = $this->getGenerator($routes); - $this->assertSame('//EN.FooBar.com/app.php/', $generator->generate('test', array('locale' => 'EN'), UrlGeneratorInterface::NETWORK_PATH)); + $this->assertSame('//EN.FooBar.com/app.php/', $generator->generate('test', ['locale' => 'EN'], UrlGeneratorInterface::NETWORK_PATH)); } public function testDefaultHostIsUsedWhenContextHostIsEmpty() { - $routes = $this->getRoutes('test', new Route('/route', array('domain' => 'my.fallback.host'), array('domain' => '.+'), array(), '{domain}', array('http'))); + $routes = $this->getRoutes('test', new Route('/route', ['domain' => 'my.fallback.host'], ['domain' => '.+'], [], '{domain}', ['http'])); $generator = $this->getGenerator($routes); $generator->getContext()->setHost(''); - $this->assertSame('http://my.fallback.host/app.php/route', $generator->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL)); + $this->assertSame('http://my.fallback.host/app.php/route', $generator->generate('test', [], UrlGeneratorInterface::ABSOLUTE_URL)); } public function testDefaultHostIsUsedWhenContextHostIsEmptyAndSchemeIsNot() { - $routes = $this->getRoutes('test', new Route('/route', array('domain' => 'my.fallback.host'), array('domain' => '.+'), array(), '{domain}', array('http', 'https'))); + $routes = $this->getRoutes('test', new Route('/route', ['domain' => 'my.fallback.host'], ['domain' => '.+'], [], '{domain}', ['http', 'https'])); $generator = $this->getGenerator($routes); $generator->getContext()->setHost(''); $generator->getContext()->setScheme('https'); - $this->assertSame('https://my.fallback.host/app.php/route', $generator->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL)); + $this->assertSame('https://my.fallback.host/app.php/route', $generator->generate('test', [], UrlGeneratorInterface::ABSOLUTE_URL)); } public function testAbsoluteUrlFallbackToRelativeIfHostIsEmptyAndSchemeIsNot() { - $routes = $this->getRoutes('test', new Route('/route', array(), array(), array(), '', array('http', 'https'))); + $routes = $this->getRoutes('test', new Route('/route', [], [], [], '', ['http', 'https'])); $generator = $this->getGenerator($routes); $generator->getContext()->setHost(''); $generator->getContext()->setScheme('https'); - $this->assertSame('/app.php/route', $generator->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL)); + $this->assertSame('/app.php/route', $generator->generate('test', [], UrlGeneratorInterface::ABSOLUTE_URL)); } public function testGenerateNetworkPath() { - $routes = $this->getRoutes('test', new Route('/{name}', array(), array(), array(), '{locale}.example.com', array('http'))); + $routes = $this->getRoutes('test', new Route('/{name}', [], [], [], '{locale}.example.com', ['http'])); $this->assertSame('//fr.example.com/app.php/Fabien', $this->getGenerator($routes)->generate('test', - array('name' => 'Fabien', 'locale' => 'fr'), UrlGeneratorInterface::NETWORK_PATH), 'network path with different host' + ['name' => 'Fabien', 'locale' => 'fr'], UrlGeneratorInterface::NETWORK_PATH), 'network path with different host' ); - $this->assertSame('//fr.example.com/app.php/Fabien?query=string', $this->getGenerator($routes, array('host' => 'fr.example.com'))->generate('test', - array('name' => 'Fabien', 'locale' => 'fr', 'query' => 'string'), UrlGeneratorInterface::NETWORK_PATH), 'network path although host same as context' + $this->assertSame('//fr.example.com/app.php/Fabien?query=string', $this->getGenerator($routes, ['host' => 'fr.example.com'])->generate('test', + ['name' => 'Fabien', 'locale' => 'fr', 'query' => 'string'], UrlGeneratorInterface::NETWORK_PATH), 'network path although host same as context' ); - $this->assertSame('http://fr.example.com/app.php/Fabien', $this->getGenerator($routes, array('scheme' => 'https'))->generate('test', - array('name' => 'Fabien', 'locale' => 'fr'), UrlGeneratorInterface::NETWORK_PATH), 'absolute URL because scheme requirement does not match context' + $this->assertSame('http://fr.example.com/app.php/Fabien', $this->getGenerator($routes, ['scheme' => 'https'])->generate('test', + ['name' => 'Fabien', 'locale' => 'fr'], UrlGeneratorInterface::NETWORK_PATH), 'absolute URL because scheme requirement does not match context' ); $this->assertSame('http://fr.example.com/app.php/Fabien', $this->getGenerator($routes)->generate('test', - array('name' => 'Fabien', 'locale' => 'fr'), UrlGeneratorInterface::ABSOLUTE_URL), 'absolute URL with same scheme because it is requested' + ['name' => 'Fabien', 'locale' => 'fr'], UrlGeneratorInterface::ABSOLUTE_URL), 'absolute URL with same scheme because it is requested' ); } @@ -533,32 +533,32 @@ class UrlGeneratorTest extends TestCase $routes = new RouteCollection(); $routes->add('article', new Route('/{author}/{article}/')); $routes->add('comments', new Route('/{author}/{article}/comments')); - $routes->add('host', new Route('/{article}', array(), array(), array(), '{author}.example.com')); - $routes->add('scheme', new Route('/{author}/blog', array(), array(), array(), '', array('https'))); + $routes->add('host', new Route('/{article}', [], [], [], '{author}.example.com')); + $routes->add('scheme', new Route('/{author}/blog', [], [], [], '', ['https'])); $routes->add('unrelated', new Route('/about')); - $generator = $this->getGenerator($routes, array('host' => 'example.com', 'pathInfo' => '/fabien/symfony-is-great/')); + $generator = $this->getGenerator($routes, ['host' => 'example.com', 'pathInfo' => '/fabien/symfony-is-great/']); $this->assertSame('comments', $generator->generate('comments', - array('author' => 'fabien', 'article' => 'symfony-is-great'), UrlGeneratorInterface::RELATIVE_PATH) + ['author' => 'fabien', 'article' => 'symfony-is-great'], UrlGeneratorInterface::RELATIVE_PATH) ); $this->assertSame('comments?page=2', $generator->generate('comments', - array('author' => 'fabien', 'article' => 'symfony-is-great', 'page' => 2), UrlGeneratorInterface::RELATIVE_PATH) + ['author' => 'fabien', 'article' => 'symfony-is-great', 'page' => 2], UrlGeneratorInterface::RELATIVE_PATH) ); $this->assertSame('../twig-is-great/', $generator->generate('article', - array('author' => 'fabien', 'article' => 'twig-is-great'), UrlGeneratorInterface::RELATIVE_PATH) + ['author' => 'fabien', 'article' => 'twig-is-great'], UrlGeneratorInterface::RELATIVE_PATH) ); $this->assertSame('../../bernhard/forms-are-great/', $generator->generate('article', - array('author' => 'bernhard', 'article' => 'forms-are-great'), UrlGeneratorInterface::RELATIVE_PATH) + ['author' => 'bernhard', 'article' => 'forms-are-great'], UrlGeneratorInterface::RELATIVE_PATH) ); $this->assertSame('//bernhard.example.com/app.php/forms-are-great', $generator->generate('host', - array('author' => 'bernhard', 'article' => 'forms-are-great'), UrlGeneratorInterface::RELATIVE_PATH) + ['author' => 'bernhard', 'article' => 'forms-are-great'], UrlGeneratorInterface::RELATIVE_PATH) ); $this->assertSame('https://example.com/app.php/bernhard/blog', $generator->generate('scheme', - array('author' => 'bernhard'), UrlGeneratorInterface::RELATIVE_PATH) + ['author' => 'bernhard'], UrlGeneratorInterface::RELATIVE_PATH) ); $this->assertSame('../../about', $generator->generate('unrelated', - array(), UrlGeneratorInterface::RELATIVE_PATH) + [], UrlGeneratorInterface::RELATIVE_PATH) ); } @@ -572,138 +572,155 @@ class UrlGeneratorTest extends TestCase public function provideRelativePaths() { - return array( - array( + return [ + [ '/same/dir/', '/same/dir/', '', - ), - array( + ], + [ '/same/file', '/same/file', '', - ), - array( + ], + [ '/', '/file', 'file', - ), - array( + ], + [ '/', '/dir/file', 'dir/file', - ), - array( + ], + [ '/dir/file.html', '/dir/different-file.html', 'different-file.html', - ), - array( + ], + [ '/same/dir/extra-file', '/same/dir/', './', - ), - array( + ], + [ '/parent/dir/', '/parent/', '../', - ), - array( + ], + [ '/parent/dir/extra-file', '/parent/', '../', - ), - array( + ], + [ '/a/b/', '/x/y/z/', '../../x/y/z/', - ), - array( + ], + [ '/a/b/c/d/e', '/a/c/d', '../../../c/d', - ), - array( + ], + [ '/a/b/c//', '/a/b/c/', '../', - ), - array( + ], + [ '/a/b/c/', '/a/b/c//', './/', - ), - array( + ], + [ '/root/a/b/c/', '/root/x/b/c/', '../../../x/b/c/', - ), - array( + ], + [ '/a/b/c/d/', '/a', '../../../../a', - ), - array( + ], + [ '/special-chars/sp%20ce/1€/mäh/e=mc²', '/special-chars/sp%20ce/1€/<µ>/e=mc²', '../<µ>/e=mc²', - ), - array( + ], + [ 'not-rooted', 'dir/file', 'dir/file', - ), - array( + ], + [ '//dir/', '', '../../', - ), - array( + ], + [ '/dir/', '/dir/file:with-colon', './file:with-colon', - ), - array( + ], + [ '/dir/', '/dir/subdir/file:with-colon', 'subdir/file:with-colon', - ), - array( + ], + [ '/dir/', '/dir/:subdir/', './:subdir/', - ), - ); + ], + ]; } public function testFragmentsCanBeAppendedToUrls() { $routes = $this->getRoutes('test', new Route('/testing')); - $url = $this->getGenerator($routes)->generate('test', array('_fragment' => 'frag ment'), UrlGeneratorInterface::ABSOLUTE_PATH); + $url = $this->getGenerator($routes)->generate('test', ['_fragment' => 'frag ment'], UrlGeneratorInterface::ABSOLUTE_PATH); $this->assertEquals('/app.php/testing#frag%20ment', $url); - $url = $this->getGenerator($routes)->generate('test', array('_fragment' => '0'), UrlGeneratorInterface::ABSOLUTE_PATH); + $url = $this->getGenerator($routes)->generate('test', ['_fragment' => '0'], UrlGeneratorInterface::ABSOLUTE_PATH); $this->assertEquals('/app.php/testing#0', $url); } public function testFragmentsDoNotEscapeValidCharacters() { $routes = $this->getRoutes('test', new Route('/testing')); - $url = $this->getGenerator($routes)->generate('test', array('_fragment' => '?/'), UrlGeneratorInterface::ABSOLUTE_PATH); + $url = $this->getGenerator($routes)->generate('test', ['_fragment' => '?/'], UrlGeneratorInterface::ABSOLUTE_PATH); $this->assertEquals('/app.php/testing#?/', $url); } public function testFragmentsCanBeDefinedAsDefaults() { - $routes = $this->getRoutes('test', new Route('/testing', array('_fragment' => 'fragment'))); - $url = $this->getGenerator($routes)->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_PATH); + $routes = $this->getRoutes('test', new Route('/testing', ['_fragment' => 'fragment'])); + $url = $this->getGenerator($routes)->generate('test', [], UrlGeneratorInterface::ABSOLUTE_PATH); $this->assertEquals('/app.php/testing#fragment', $url); } - protected function getGenerator(RouteCollection $routes, array $parameters = array(), $logger = null) + /** + * @dataProvider provideLookAroundRequirementsInPath + */ + public function testLookRoundRequirementsInPath($expected, $path, $requirement) + { + $routes = $this->getRoutes('test', new Route($path, [], ['foo' => $requirement, 'baz' => '.+?'])); + $this->assertSame($expected, $this->getGenerator($routes)->generate('test', ['foo' => 'a/b', 'baz' => 'c/d/e'])); + } + + public function provideLookAroundRequirementsInPath() + { + yield ['/app.php/a/b/b%28ar/c/d/e', '/{foo}/b(ar/{baz}', '.+(?=/b\\(ar/)']; + yield ['/app.php/a/b/bar/c/d/e', '/{foo}/bar/{baz}', '.+(?!$)']; + yield ['/app.php/bar/a/b/bam/c/d/e', '/bar/{foo}/bam/{baz}', '(?<=/bar/).+']; + yield ['/app.php/bar/a/b/bam/c/d/e', '/bar/{foo}/bam/{baz}', '(? $value) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AbstractAnnotationLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AbstractAnnotationLoaderTest.php index e8bbe8fc..0ce4a47e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AbstractAnnotationLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AbstractAnnotationLoaderTest.php @@ -26,7 +26,7 @@ abstract class AbstractAnnotationLoaderTest extends TestCase public function getClassLoader($reader) { return $this->getMockBuilder('Symfony\Component\Routing\Loader\AnnotationClassLoader') - ->setConstructorArgs(array($reader)) + ->setConstructorArgs([$reader]) ->getMockForAbstractClass() ; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php index a0230ada..c11ae81e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php @@ -52,15 +52,15 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest public function provideTestSupportsChecksResource() { - return array( - array('class', true), - array('\fully\qualified\class\name', true), - array('namespaced\class\without\leading\slash', true), - array('ÿClassWithLegalSpecialCharacters', true), - array('5', false), - array('foo.foo', false), - array(null, false), - ); + return [ + ['class', true], + ['\fully\qualified\class\name', true], + ['namespaced\class\without\leading\slash', true], + ['ÿClassWithLegalSpecialCharacters', true], + ['5', false], + ['foo.foo', false], + [null, false], + ]; } public function testSupportsChecksTypeIfSpecified() @@ -71,55 +71,55 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest public function getLoadTests() { - return array( - array( + return [ + [ 'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass', - array('name' => 'route1', 'path' => '/path'), - array('arg2' => 'defaultValue2', 'arg3' => 'defaultValue3'), - ), - array( + ['name' => 'route1', 'path' => '/path'], + ['arg2' => 'defaultValue2', 'arg3' => 'defaultValue3'], + ], + [ 'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass', - array('defaults' => array('arg2' => 'foo'), 'requirements' => array('arg3' => '\w+')), - array('arg2' => 'defaultValue2', 'arg3' => 'defaultValue3'), - ), - array( + ['defaults' => ['arg2' => 'foo'], 'requirements' => ['arg3' => '\w+']], + ['arg2' => 'defaultValue2', 'arg3' => 'defaultValue3'], + ], + [ 'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass', - array('options' => array('foo' => 'bar')), - array('arg2' => 'defaultValue2', 'arg3' => 'defaultValue3'), - ), - array( + ['options' => ['foo' => 'bar']], + ['arg2' => 'defaultValue2', 'arg3' => 'defaultValue3'], + ], + [ 'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass', - array('schemes' => array('https'), 'methods' => array('GET')), - array('arg2' => 'defaultValue2', 'arg3' => 'defaultValue3'), - ), - array( + ['schemes' => ['https'], 'methods' => ['GET']], + ['arg2' => 'defaultValue2', 'arg3' => 'defaultValue3'], + ], + [ 'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass', - array('condition' => 'context.getMethod() == "GET"'), - array('arg2' => 'defaultValue2', 'arg3' => 'defaultValue3'), - ), - ); + ['condition' => 'context.getMethod() == "GET"'], + ['arg2' => 'defaultValue2', 'arg3' => 'defaultValue3'], + ], + ]; } /** * @dataProvider getLoadTests */ - public function testLoad($className, $routeData = array(), $methodArgs = array()) + public function testLoad($className, $routeData = [], $methodArgs = []) { - $routeData = array_replace(array( + $routeData = array_replace([ 'name' => 'route', 'path' => '/', - 'requirements' => array(), - 'options' => array(), - 'defaults' => array(), - 'schemes' => array(), - 'methods' => array(), + 'requirements' => [], + 'options' => [], + 'defaults' => [], + 'schemes' => [], + 'methods' => [], 'condition' => '', - ), $routeData); + ], $routeData); $this->reader ->expects($this->once()) ->method('getMethodAnnotations') - ->will($this->returnValue(array($this->getAnnotatedRoute($routeData)))) + ->will($this->returnValue([$this->getAnnotatedRoute($routeData)])) ; $routeCollection = $this->loader->load($className); @@ -148,19 +148,19 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest public function testClassRouteLoad() { - $classRouteData = array( + $classRouteData = [ 'name' => 'prefix_', 'path' => '/prefix', - 'schemes' => array('https'), - 'methods' => array('GET'), - ); + 'schemes' => ['https'], + 'methods' => ['GET'], + ]; - $methodRouteData = array( + $methodRouteData = [ 'name' => 'route1', 'path' => '/path', - 'schemes' => array('http'), - 'methods' => array('POST', 'PUT'), - ); + 'schemes' => ['http'], + 'methods' => ['POST', 'PUT'], + ]; $this->reader ->expects($this->once()) @@ -170,7 +170,7 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest $this->reader ->expects($this->once()) ->method('getMethodAnnotations') - ->will($this->returnValue(array($this->getAnnotatedRoute($methodRouteData)))) + ->will($this->returnValue([$this->getAnnotatedRoute($methodRouteData)])) ; $routeCollection = $this->loader->load('Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass'); @@ -183,22 +183,22 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest public function testInvokableClassRouteLoadWithMethodAnnotation() { - $classRouteData = array( + $classRouteData = [ 'name' => 'route1', 'path' => '/', - 'schemes' => array('https'), - 'methods' => array('GET'), - ); + 'schemes' => ['https'], + 'methods' => ['GET'], + ]; $this->reader ->expects($this->exactly(1)) ->method('getClassAnnotations') - ->will($this->returnValue(array($this->getAnnotatedRoute($classRouteData)))) + ->will($this->returnValue([$this->getAnnotatedRoute($classRouteData)])) ; $this->reader ->expects($this->once()) ->method('getMethodAnnotations') - ->will($this->returnValue(array())) + ->will($this->returnValue([])) ; $routeCollection = $this->loader->load('Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BazClass'); @@ -211,12 +211,12 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest public function testInvokableClassRouteLoadWithClassAnnotation() { - $classRouteData = array( + $classRouteData = [ 'name' => 'route1', 'path' => '/', - 'schemes' => array('https'), - 'methods' => array('GET'), - ); + 'schemes' => ['https'], + 'methods' => ['GET'], + ]; $this->reader ->expects($this->exactly(1)) @@ -227,13 +227,13 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest $this->reader ->expects($this->exactly(1)) ->method('getClassAnnotations') - ->will($this->returnValue(array($this->getAnnotatedRoute($classRouteData)))) + ->will($this->returnValue([$this->getAnnotatedRoute($classRouteData)])) ; $this->reader ->expects($this->once()) ->method('getMethodAnnotations') - ->will($this->returnValue(array())) + ->will($this->returnValue([])) ; $routeCollection = $this->loader->load('Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BazClass'); @@ -246,29 +246,29 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest public function testInvokableClassMultipleRouteLoad() { - $classRouteData1 = array( + $classRouteData1 = [ 'name' => 'route1', 'path' => '/1', - 'schemes' => array('https'), - 'methods' => array('GET'), - ); + 'schemes' => ['https'], + 'methods' => ['GET'], + ]; - $classRouteData2 = array( + $classRouteData2 = [ 'name' => 'route2', 'path' => '/2', - 'schemes' => array('https'), - 'methods' => array('GET'), - ); + 'schemes' => ['https'], + 'methods' => ['GET'], + ]; $this->reader ->expects($this->exactly(1)) ->method('getClassAnnotations') - ->will($this->returnValue(array($this->getAnnotatedRoute($classRouteData1), $this->getAnnotatedRoute($classRouteData2)))) + ->will($this->returnValue([$this->getAnnotatedRoute($classRouteData1), $this->getAnnotatedRoute($classRouteData2)])) ; $this->reader ->expects($this->once()) ->method('getMethodAnnotations') - ->will($this->returnValue(array())) + ->will($this->returnValue([])) ; $routeCollection = $this->loader->load('Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BazClass'); @@ -287,19 +287,19 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest public function testInvokableClassWithMethodRouteLoad() { - $classRouteData = array( + $classRouteData = [ 'name' => 'route1', 'path' => '/prefix', - 'schemes' => array('https'), - 'methods' => array('GET'), - ); + 'schemes' => ['https'], + 'methods' => ['GET'], + ]; - $methodRouteData = array( + $methodRouteData = [ 'name' => 'route2', 'path' => '/path', - 'schemes' => array('http'), - 'methods' => array('POST', 'PUT'), - ); + 'schemes' => ['http'], + 'methods' => ['POST', 'PUT'], + ]; $this->reader ->expects($this->once()) @@ -309,7 +309,7 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest $this->reader ->expects($this->once()) ->method('getMethodAnnotations') - ->will($this->returnValue(array($this->getAnnotatedRoute($methodRouteData)))) + ->will($this->returnValue([$this->getAnnotatedRoute($methodRouteData)])) ; $routeCollection = $this->loader->load('Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BazClass'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationDirectoryLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationDirectoryLoaderTest.php index 901b858d..ac254934 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationDirectoryLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationDirectoryLoaderTest.php @@ -34,13 +34,13 @@ class AnnotationDirectoryLoaderTest extends AbstractAnnotationLoaderTest $this->reader ->expects($this->any()) ->method('getMethodAnnotations') - ->will($this->returnValue(array())) + ->will($this->returnValue([])) ; $this->reader ->expects($this->any()) ->method('getClassAnnotations') - ->will($this->returnValue(array())) + ->will($this->returnValue([])) ; $this->loader->load(__DIR__.'/../Fixtures/AnnotatedClasses'); @@ -48,22 +48,22 @@ class AnnotationDirectoryLoaderTest extends AbstractAnnotationLoaderTest public function testLoadIgnoresHiddenDirectories() { - $this->expectAnnotationsToBeReadFrom(array( + $this->expectAnnotationsToBeReadFrom([ 'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass', 'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BazClass', 'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\FooClass', - )); + ]); $this->reader ->expects($this->any()) ->method('getMethodAnnotations') - ->will($this->returnValue(array())) + ->will($this->returnValue([])) ; $this->reader ->expects($this->any()) ->method('getClassAnnotations') - ->will($this->returnValue(array())) + ->will($this->returnValue([])) ; $this->loader->load(__DIR__.'/../Fixtures/AnnotatedClasses'); @@ -92,7 +92,7 @@ class AnnotationDirectoryLoaderTest extends AbstractAnnotationLoaderTest $this->reader ->expects($this->any()) ->method('getMethodAnnotations') - ->will($this->returnValue(array())) + ->will($this->returnValue([])) ; $this->loader->load(__DIR__.'/../Fixtures/AnnotatedClasses/FooClass.php'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php index e0a95c8c..26a897ea 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php @@ -59,10 +59,10 @@ class AnnotationFileLoaderTest extends AbstractAnnotationLoaderTest */ public function testLoadVariadic() { - $route = new Route(array('path' => '/path/to/{id}')); + $route = new Route(['path' => '/path/to/{id}']); $this->reader->expects($this->once())->method('getClassAnnotation'); $this->reader->expects($this->once())->method('getMethodAnnotations') - ->will($this->returnValue(array($route))); + ->will($this->returnValue([$route])); $this->loader->load(__DIR__.'/../Fixtures/OtherAnnotatedClasses/VariadicClass.php'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php index 45968551..2657751b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php @@ -30,11 +30,11 @@ class DirectoryLoaderTest extends AbstractAnnotationLoaderTest $locator = new FileLocator(); $this->reader = $this->getReader(); $this->loader = new DirectoryLoader($locator); - $resolver = new LoaderResolver(array( + $resolver = new LoaderResolver([ new YamlFileLoader($locator), new AnnotationFileLoader($locator, $this->getClassLoader($this->reader)), $this->loader, - )); + ]); $this->loader->setResolver($resolver); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/ObjectRouteLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/ObjectRouteLoaderTest.php index 408fa0b4..89dcd5ba 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/ObjectRouteLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/ObjectRouteLoaderTest.php @@ -26,9 +26,9 @@ class ObjectRouteLoaderTest extends TestCase $collection = new RouteCollection(); $collection->add('foo', new Route('/foo')); - $loader->loaderMap = array( + $loader->loaderMap = [ 'my_route_provider_service' => new RouteService($collection), - ); + ]; $actualRoutes = $loader->load( 'my_route_provider_service:loadRoutes', @@ -52,11 +52,11 @@ class ObjectRouteLoaderTest extends TestCase public function getBadResourceStrings() { - return array( - array('Foo'), - array('Bar::baz'), - array('Foo:Bar:baz'), - ); + return [ + ['Foo'], + ['Bar::baz'], + ['Foo:Bar:baz'], + ]; } /** @@ -65,7 +65,7 @@ class ObjectRouteLoaderTest extends TestCase public function testExceptionOnNoObjectReturned() { $loader = new ObjectRouteLoaderForTest(); - $loader->loaderMap = array('my_service' => 'NOT_AN_OBJECT'); + $loader->loaderMap = ['my_service' => 'NOT_AN_OBJECT']; $loader->load('my_service:method'); } @@ -75,7 +75,7 @@ class ObjectRouteLoaderTest extends TestCase public function testExceptionOnBadMethod() { $loader = new ObjectRouteLoaderForTest(); - $loader->loaderMap = array('my_service' => new \stdClass()); + $loader->loaderMap = ['my_service' => new \stdClass()]; $loader->load('my_service:method'); } @@ -85,21 +85,21 @@ class ObjectRouteLoaderTest extends TestCase public function testExceptionOnMethodNotReturningCollection() { $service = $this->getMockBuilder('stdClass') - ->setMethods(array('loadRoutes')) + ->setMethods(['loadRoutes']) ->getMock(); $service->expects($this->once()) ->method('loadRoutes') ->will($this->returnValue('NOT_A_COLLECTION')); $loader = new ObjectRouteLoaderForTest(); - $loader->loaderMap = array('my_service' => $service); + $loader->loaderMap = ['my_service' => $service]; $loader->load('my_service:loadRoutes'); } } class ObjectRouteLoaderForTest extends ObjectRouteLoader { - public $loaderMap = array(); + public $loaderMap = []; protected function getServiceObject($id) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php index 0dcf5d49..3e1f1ec2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php @@ -33,7 +33,7 @@ class PhpFileLoaderTest extends TestCase public function testLoadWithRoute() { - $loader = new PhpFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new PhpFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('validpattern.php'); $routes = $routeCollection->all(); @@ -45,14 +45,14 @@ class PhpFileLoaderTest extends TestCase $this->assertSame('MyBlogBundle:Blog:show', $route->getDefault('_controller')); $this->assertSame('{locale}.example.com', $route->getHost()); $this->assertSame('RouteCompiler', $route->getOption('compiler_class')); - $this->assertEquals(array('GET', 'POST', 'PUT', 'OPTIONS'), $route->getMethods()); - $this->assertEquals(array('https'), $route->getSchemes()); + $this->assertEquals(['GET', 'POST', 'PUT', 'OPTIONS'], $route->getMethods()); + $this->assertEquals(['https'], $route->getSchemes()); } } public function testLoadWithImport() { - $loader = new PhpFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new PhpFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('validresource.php'); $routes = $routeCollection->all(); @@ -64,14 +64,14 @@ class PhpFileLoaderTest extends TestCase $this->assertSame('MyBlogBundle:Blog:show', $route->getDefault('_controller')); $this->assertSame('{locale}.example.com', $route->getHost()); $this->assertSame('RouteCompiler', $route->getOption('compiler_class')); - $this->assertEquals(array('GET', 'POST', 'PUT', 'OPTIONS'), $route->getMethods()); - $this->assertEquals(array('https'), $route->getSchemes()); + $this->assertEquals(['GET', 'POST', 'PUT', 'OPTIONS'], $route->getMethods()); + $this->assertEquals(['https'], $route->getSchemes()); } } public function testThatDefiningVariableInConfigFileHasNoSideEffects() { - $locator = new FileLocator(array(__DIR__.'/../Fixtures')); + $locator = new FileLocator([__DIR__.'/../Fixtures']); $loader = new PhpFileLoader($locator); $routeCollection = $loader->load('with_define_path_variable.php'); $resources = $routeCollection->getResources(); @@ -86,30 +86,30 @@ class PhpFileLoaderTest extends TestCase public function testRoutingConfigurator() { - $locator = new FileLocator(array(__DIR__.'/../Fixtures')); + $locator = new FileLocator([__DIR__.'/../Fixtures']); $loader = new PhpFileLoader($locator); $routeCollection = $loader->load('php_dsl.php'); $expectedCollection = new RouteCollection(); $expectedCollection->add('foo', (new Route('/foo')) - ->setOptions(array('utf8' => true)) + ->setOptions(['utf8' => true]) ->setCondition('abc') ); $expectedCollection->add('buz', (new Route('/zub')) - ->setDefaults(array('_controller' => 'foo:act')) + ->setDefaults(['_controller' => 'foo:act']) ); $expectedCollection->add('c_bar', (new Route('/sub/pub/bar')) - ->setRequirements(array('id' => '\d+')) + ->setRequirements(['id' => '\d+']) ); $expectedCollection->add('c_pub_buz', (new Route('/sub/pub/buz')) ->setHost('host') - ->setRequirements(array('id' => '\d+')) + ->setRequirements(['id' => '\d+']) ); $expectedCollection->add('ouf', (new Route('/ouf')) - ->setSchemes(array('https')) - ->setMethods(array('GET')) - ->setDefaults(array('id' => 0)) + ->setSchemes(['https']) + ->setMethods(['GET']) + ->setDefaults(['id' => 0]) ); $expectedCollection->addResource(new FileResource(realpath(__DIR__.'/../Fixtures/php_dsl_sub.php'))); @@ -120,7 +120,7 @@ class PhpFileLoaderTest extends TestCase public function testRoutingConfiguratorCanImportGlobPatterns() { - $locator = new FileLocator(array(__DIR__.'/../Fixtures/glob')); + $locator = new FileLocator([__DIR__.'/../Fixtures/glob']); $loader = new PhpFileLoader($locator); $routeCollection = $loader->load('php_dsl.php'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php index 21fc3400..66588e7e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php @@ -31,7 +31,7 @@ class XmlFileLoaderTest extends TestCase public function testLoadWithRoute() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('validpattern.xml'); $route = $routeCollection->get('blog_show'); @@ -41,14 +41,14 @@ class XmlFileLoaderTest extends TestCase $this->assertSame('MyBundle:Blog:show', $route->getDefault('_controller')); $this->assertSame('\w+', $route->getRequirement('locale')); $this->assertSame('RouteCompiler', $route->getOption('compiler_class')); - $this->assertEquals(array('GET', 'POST', 'PUT', 'OPTIONS'), $route->getMethods()); - $this->assertEquals(array('https'), $route->getSchemes()); + $this->assertEquals(['GET', 'POST', 'PUT', 'OPTIONS'], $route->getMethods()); + $this->assertEquals(['https'], $route->getSchemes()); $this->assertEquals('context.getMethod() == "GET"', $route->getCondition()); } public function testLoadWithNamespacePrefix() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('namespaceprefix.xml'); $this->assertCount(1, $routeCollection->all(), 'One route is loaded'); @@ -66,7 +66,7 @@ class XmlFileLoaderTest extends TestCase public function testLoadWithImport() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('validresource.xml'); $routes = $routeCollection->all(); @@ -89,7 +89,7 @@ class XmlFileLoaderTest extends TestCase */ public function testLoadThrowsExceptionWithInvalidFile($filePath) { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $loader->load($filePath); } @@ -99,13 +99,13 @@ class XmlFileLoaderTest extends TestCase */ public function testLoadThrowsExceptionWithInvalidFileEvenWithoutSchemaValidation($filePath) { - $loader = new CustomXmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new CustomXmlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $loader->load($filePath); } public function getPathsToInvalidFiles() { - return array(array('nonvalidnode.xml'), array('nonvalidroute.xml'), array('nonvalid.xml'), array('missing_id.xml'), array('missing_path.xml')); + return [['nonvalidnode.xml'], ['nonvalidroute.xml'], ['nonvalid.xml'], ['missing_id.xml'], ['missing_path.xml']]; } /** @@ -114,13 +114,13 @@ class XmlFileLoaderTest extends TestCase */ public function testDocTypeIsNotAllowed() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $loader->load('withdoctype.xml'); } public function testNullValues() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('null_values.xml'); $route = $routeCollection->get('blog_show'); @@ -134,12 +134,12 @@ class XmlFileLoaderTest extends TestCase public function testScalarDataTypeDefaults() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('scalar_defaults.xml'); $route = $routeCollection->get('blog'); $this->assertSame( - array( + [ '_controller' => 'AcmeBlogBundle:Blog:index', 'slug' => null, 'published' => true, @@ -150,147 +150,147 @@ class XmlFileLoaderTest extends TestCase 'locked' => false, 'foo' => null, 'bar' => null, - ), + ], $route->getDefaults() ); } public function testListDefaults() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('list_defaults.xml'); $route = $routeCollection->get('blog'); $this->assertSame( - array( + [ '_controller' => 'AcmeBlogBundle:Blog:index', - 'values' => array(true, 1, 3.5, 'foo'), - ), + 'values' => [true, 1, 3.5, 'foo'], + ], $route->getDefaults() ); } public function testListInListDefaults() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('list_in_list_defaults.xml'); $route = $routeCollection->get('blog'); $this->assertSame( - array( + [ '_controller' => 'AcmeBlogBundle:Blog:index', - 'values' => array(array(true, 1, 3.5, 'foo')), - ), + 'values' => [[true, 1, 3.5, 'foo']], + ], $route->getDefaults() ); } public function testListInMapDefaults() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('list_in_map_defaults.xml'); $route = $routeCollection->get('blog'); $this->assertSame( - array( + [ '_controller' => 'AcmeBlogBundle:Blog:index', - 'values' => array('list' => array(true, 1, 3.5, 'foo')), - ), + 'values' => ['list' => [true, 1, 3.5, 'foo']], + ], $route->getDefaults() ); } public function testMapDefaults() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('map_defaults.xml'); $route = $routeCollection->get('blog'); $this->assertSame( - array( + [ '_controller' => 'AcmeBlogBundle:Blog:index', - 'values' => array( + 'values' => [ 'public' => true, 'page' => 1, 'price' => 3.5, 'title' => 'foo', - ), - ), + ], + ], $route->getDefaults() ); } public function testMapInListDefaults() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('map_in_list_defaults.xml'); $route = $routeCollection->get('blog'); $this->assertSame( - array( + [ '_controller' => 'AcmeBlogBundle:Blog:index', - 'values' => array(array( + 'values' => [[ 'public' => true, 'page' => 1, 'price' => 3.5, 'title' => 'foo', - )), - ), + ]], + ], $route->getDefaults() ); } public function testMapInMapDefaults() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('map_in_map_defaults.xml'); $route = $routeCollection->get('blog'); $this->assertSame( - array( + [ '_controller' => 'AcmeBlogBundle:Blog:index', - 'values' => array('map' => array( + 'values' => ['map' => [ 'public' => true, 'page' => 1, 'price' => 3.5, 'title' => 'foo', - )), - ), + ]], + ], $route->getDefaults() ); } public function testNullValuesInList() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('list_null_values.xml'); $route = $routeCollection->get('blog'); - $this->assertSame(array(null, null, null, null, null, null), $route->getDefault('list')); + $this->assertSame([null, null, null, null, null, null], $route->getDefault('list')); } public function testNullValuesInMap() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('map_null_values.xml'); $route = $routeCollection->get('blog'); $this->assertSame( - array( + [ 'boolean' => null, 'integer' => null, 'float' => null, 'string' => null, 'list' => null, 'map' => null, - ), + ], $route->getDefault('map') ); } public function testLoadRouteWithControllerAttribute() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures/controller'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller'])); $routeCollection = $loader->load('routing.xml'); $route = $routeCollection->get('app_homepage'); @@ -300,7 +300,7 @@ class XmlFileLoaderTest extends TestCase public function testLoadRouteWithoutControllerAttribute() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures/controller'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller'])); $routeCollection = $loader->load('routing.xml'); $route = $routeCollection->get('app_logout'); @@ -310,7 +310,7 @@ class XmlFileLoaderTest extends TestCase public function testLoadRouteWithControllerSetInDefaults() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures/controller'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller'])); $routeCollection = $loader->load('routing.xml'); $route = $routeCollection->get('app_blog'); @@ -324,7 +324,7 @@ class XmlFileLoaderTest extends TestCase */ public function testOverrideControllerInDefaults() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures/controller'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller'])); $loader->load('override_defaults.xml'); } @@ -333,7 +333,7 @@ class XmlFileLoaderTest extends TestCase */ public function testImportRouteWithController($file) { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures/controller'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller'])); $routeCollection = $loader->load($file); $route = $routeCollection->get('app_homepage'); @@ -348,8 +348,8 @@ class XmlFileLoaderTest extends TestCase public function provideFilesImportingRoutesWithControllers() { - yield array('import_controller.xml'); - yield array('import__controller.xml'); + yield ['import_controller.xml']; + yield ['import__controller.xml']; } /** @@ -358,13 +358,13 @@ class XmlFileLoaderTest extends TestCase */ public function testImportWithOverriddenController() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures/controller'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller'])); $loader->load('import_override_defaults.xml'); } public function testImportRouteWithGlobMatchingSingleFile() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures/glob'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures/glob'])); $routeCollection = $loader->load('import_single.xml'); $route = $routeCollection->get('bar_route'); @@ -373,7 +373,7 @@ class XmlFileLoaderTest extends TestCase public function testImportRouteWithGlobMatchingMultipleFiles() { - $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures/glob'))); + $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures/glob'])); $routeCollection = $loader->load('import_multiple.xml'); $route = $routeCollection->get('bar_route'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php index a89c5844..4944e5b6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php @@ -33,11 +33,11 @@ class YamlFileLoaderTest extends TestCase public function testLoadDoesNothingIfEmpty() { - $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $collection = $loader->load('empty.yml'); - $this->assertEquals(array(), $collection->all()); - $this->assertEquals(array(new FileResource(realpath(__DIR__.'/../Fixtures/empty.yml'))), $collection->getResources()); + $this->assertEquals([], $collection->all()); + $this->assertEquals([new FileResource(realpath(__DIR__.'/../Fixtures/empty.yml'))], $collection->getResources()); } /** @@ -46,26 +46,26 @@ class YamlFileLoaderTest extends TestCase */ public function testLoadThrowsExceptionWithInvalidFile($filePath) { - $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $loader->load($filePath); } public function getPathsToInvalidFiles() { - return array( - array('nonvalid.yml'), - array('nonvalid2.yml'), - array('incomplete.yml'), - array('nonvalidkeys.yml'), - array('nonesense_resource_plus_path.yml'), - array('nonesense_type_without_resource.yml'), - array('bad_format.yml'), - ); + return [ + ['nonvalid.yml'], + ['nonvalid2.yml'], + ['incomplete.yml'], + ['nonvalidkeys.yml'], + ['nonesense_resource_plus_path.yml'], + ['nonesense_type_without_resource.yml'], + ['bad_format.yml'], + ]; } public function testLoadSpecialRouteName() { - $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('special_route_name.yml'); $route = $routeCollection->get('#$péß^a|'); @@ -75,7 +75,7 @@ class YamlFileLoaderTest extends TestCase public function testLoadWithRoute() { - $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('validpattern.yml'); $route = $routeCollection->get('blog_show'); @@ -85,14 +85,14 @@ class YamlFileLoaderTest extends TestCase $this->assertSame('MyBundle:Blog:show', $route->getDefault('_controller')); $this->assertSame('\w+', $route->getRequirement('locale')); $this->assertSame('RouteCompiler', $route->getOption('compiler_class')); - $this->assertEquals(array('GET', 'POST', 'PUT', 'OPTIONS'), $route->getMethods()); - $this->assertEquals(array('https'), $route->getSchemes()); + $this->assertEquals(['GET', 'POST', 'PUT', 'OPTIONS'], $route->getMethods()); + $this->assertEquals(['https'], $route->getSchemes()); $this->assertEquals('context.getMethod() == "GET"', $route->getCondition()); } public function testLoadWithResource() { - $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures'])); $routeCollection = $loader->load('validresource.yml'); $routes = $routeCollection->all(); @@ -111,7 +111,7 @@ class YamlFileLoaderTest extends TestCase public function testLoadRouteWithControllerAttribute() { - $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures/controller'))); + $loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller'])); $routeCollection = $loader->load('routing.yml'); $route = $routeCollection->get('app_homepage'); @@ -121,7 +121,7 @@ class YamlFileLoaderTest extends TestCase public function testLoadRouteWithoutControllerAttribute() { - $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures/controller'))); + $loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller'])); $routeCollection = $loader->load('routing.yml'); $route = $routeCollection->get('app_logout'); @@ -131,7 +131,7 @@ class YamlFileLoaderTest extends TestCase public function testLoadRouteWithControllerSetInDefaults() { - $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures/controller'))); + $loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller'])); $routeCollection = $loader->load('routing.yml'); $route = $routeCollection->get('app_blog'); @@ -145,7 +145,7 @@ class YamlFileLoaderTest extends TestCase */ public function testOverrideControllerInDefaults() { - $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures/controller'))); + $loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller'])); $loader->load('override_defaults.yml'); } @@ -154,7 +154,7 @@ class YamlFileLoaderTest extends TestCase */ public function testImportRouteWithController($file) { - $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures/controller'))); + $loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller'])); $routeCollection = $loader->load($file); $route = $routeCollection->get('app_homepage'); @@ -169,8 +169,8 @@ class YamlFileLoaderTest extends TestCase public function provideFilesImportingRoutesWithControllers() { - yield array('import_controller.yml'); - yield array('import__controller.yml'); + yield ['import_controller.yml']; + yield ['import__controller.yml']; } /** @@ -179,13 +179,13 @@ class YamlFileLoaderTest extends TestCase */ public function testImportWithOverriddenController() { - $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures/controller'))); + $loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller'])); $loader->load('import_override_defaults.yml'); } public function testImportRouteWithGlobMatchingSingleFile() { - $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures/glob'))); + $loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures/glob'])); $routeCollection = $loader->load('import_single.yml'); $route = $routeCollection->get('bar_route'); @@ -194,7 +194,7 @@ class YamlFileLoaderTest extends TestCase public function testImportRouteWithGlobMatchingMultipleFiles() { - $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures/glob'))); + $loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures/glob'])); $routeCollection = $loader->load('import_multiple.yml'); $route = $routeCollection->get('bar_route'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/DumpedRedirectableUrlMatcherTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/DumpedRedirectableUrlMatcherTest.php index 1785c3ad..235e4776 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/DumpedRedirectableUrlMatcherTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/DumpedRedirectableUrlMatcherTest.php @@ -25,11 +25,11 @@ class DumpedRedirectableUrlMatcherTest extends RedirectableUrlMatcherTest $class = 'DumpedRedirectableUrlMatcher'.++$i; $dumper = new PhpMatcherDumper($routes); - eval('?>'.$dumper->dump(array('class' => $class, 'base_class' => 'Symfony\Component\Routing\Tests\Matcher\TestDumpedRedirectableUrlMatcher'))); + eval('?>'.$dumper->dump(['class' => $class, 'base_class' => 'Symfony\Component\Routing\Tests\Matcher\TestDumpedRedirectableUrlMatcher'])); return $this->getMockBuilder($class) - ->setConstructorArgs(array($context ?: new RequestContext())) - ->setMethods(array('redirect')) + ->setConstructorArgs([$context ?: new RequestContext()]) + ->setMethods(['redirect']) ->getMock(); } } @@ -38,6 +38,6 @@ class TestDumpedRedirectableUrlMatcher extends UrlMatcher implements Redirectabl { public function redirect($path, $route, $scheme = null) { - return array(); + return []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/DumpedUrlMatcherTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/DumpedUrlMatcherTest.php index b00dfdf5..34946f3f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/DumpedUrlMatcherTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/DumpedUrlMatcherTest.php @@ -41,7 +41,7 @@ class DumpedUrlMatcherTest extends UrlMatcherTest $class = 'DumpedUrlMatcher'.++$i; $dumper = new PhpMatcherDumper($routes); - eval('?>'.$dumper->dump(array('class' => $class))); + eval('?>'.$dumper->dump(['class' => $class])); return new $class($context ?: new RequestContext()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php index 68721bd6..2816567c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php @@ -54,11 +54,11 @@ class PhpMatcherDumperTest extends TestCase $collection = new RouteCollection(); $collection->add('secure', new Route( '/secure', - array(), - array(), - array(), + [], + [], + [], '', - array('https') + ['https'] )); $dumper = new PhpMatcherDumper($collection); $dumper->dump(); @@ -72,11 +72,11 @@ class PhpMatcherDumperTest extends TestCase $class = $this->generateDumpedMatcher($collection, true); $matcher = $this->getMockBuilder($class) - ->setMethods(array('redirect')) - ->setConstructorArgs(array(new RequestContext())) + ->setMethods(['redirect']) + ->setConstructorArgs([new RequestContext()]) ->getMock(); - $matcher->expects($this->once())->method('redirect')->with('/foo%3Abar/', 'foo')->willReturn(array()); + $matcher->expects($this->once())->method('redirect')->with('/foo%3Abar/', 'foo')->willReturn([]); $matcher->match('/foo%3Abar'); } @@ -84,7 +84,7 @@ class PhpMatcherDumperTest extends TestCase /** * @dataProvider getRouteCollections */ - public function testDump(RouteCollection $collection, $fixture, $options = array()) + public function testDump(RouteCollection $collection, $fixture, $options = []) { $basePath = __DIR__.'/../../Fixtures/dumper/'; @@ -103,28 +103,28 @@ class PhpMatcherDumperTest extends TestCase // defaults and requirements $collection->add('foo', new Route( '/foo/{bar}', - array('def' => 'test'), - array('bar' => 'baz|symfony') + ['def' => 'test'], + ['bar' => 'baz|symfony'] )); // method requirement $collection->add('bar', new Route( '/bar/{foo}', - array(), - array(), - array(), + [], + [], + [], '', - array(), - array('GET', 'head') + [], + ['GET', 'head'] )); // GET method requirement automatically adds HEAD as valid $collection->add('barhead', new Route( '/barhead/{foo}', - array(), - array(), - array(), + [], + [], + [], '', - array(), - array('GET') + [], + ['GET'] )); // simple $collection->add('baz', new Route( @@ -145,33 +145,33 @@ class PhpMatcherDumperTest extends TestCase // trailing slash and method $collection->add('baz5', new Route( '/test/{foo}/', - array(), - array(), - array(), + [], + [], + [], '', - array(), - array('post') + [], + ['post'] )); // complex name $collection->add('baz.baz6', new Route( '/test/{foo}/', - array(), - array(), - array(), + [], + [], + [], '', - array(), - array('put') + [], + ['put'] )); // defaults without variable $collection->add('foofoo', new Route( '/foofoo', - array('def' => 'test') + ['def' => 'test'] )); // pattern with quotes $collection->add('quoter', new Route( '/{quoter}', - array(), - array('quoter' => '[\']+') + [], + ['quoter' => '[\']+'] )); // space in pattern $collection->add('space', new Route( @@ -186,7 +186,7 @@ class PhpMatcherDumperTest extends TestCase $collection1->addPrefix('/b\'b'); $collection2 = new RouteCollection(); $collection2->addCollection($collection1); - $collection2->add('overridden', new Route('/{var}', array(), array('var' => '.*'))); + $collection2->add('overridden', new Route('/{var}', [], ['var' => '.*'])); $collection1 = new RouteCollection(); $collection1->add('foo2', new Route('/{foo1}')); $collection1->add('bar2', new Route('/{bar1}')); @@ -198,7 +198,7 @@ class PhpMatcherDumperTest extends TestCase // overridden through addCollection() and multiple sub-collections with no own prefix $collection1 = new RouteCollection(); $collection1->add('overridden2', new Route('/old')); - $collection1->add('helloWorld', new Route('/hello/{who}', array('who' => 'World!'))); + $collection1->add('helloWorld', new Route('/hello/{who}', ['who' => 'World!'])); $collection2 = new RouteCollection(); $collection3 = new RouteCollection(); $collection3->add('overridden2', new Route('/new')); @@ -229,22 +229,22 @@ class PhpMatcherDumperTest extends TestCase $collection1 = new RouteCollection(); - $route1 = new Route('/route1', array(), array(), array(), 'a.example.com'); + $route1 = new Route('/route1', [], [], [], 'a.example.com'); $collection1->add('route1', $route1); - $route2 = new Route('/c2/route2', array(), array(), array(), 'a.example.com'); + $route2 = new Route('/c2/route2', [], [], [], 'a.example.com'); $collection1->add('route2', $route2); - $route3 = new Route('/c2/route3', array(), array(), array(), 'b.example.com'); + $route3 = new Route('/c2/route3', [], [], [], 'b.example.com'); $collection1->add('route3', $route3); - $route4 = new Route('/route4', array(), array(), array(), 'a.example.com'); + $route4 = new Route('/route4', [], [], [], 'a.example.com'); $collection1->add('route4', $route4); - $route5 = new Route('/route5', array(), array(), array(), 'c.example.com'); + $route5 = new Route('/route5', [], [], [], 'c.example.com'); $collection1->add('route5', $route5); - $route6 = new Route('/route6', array(), array(), array(), null); + $route6 = new Route('/route6', [], [], [], null); $collection1->add('route6', $route6); $collection->addCollection($collection1); @@ -253,25 +253,25 @@ class PhpMatcherDumperTest extends TestCase $collection1 = new RouteCollection(); - $route11 = new Route('/route11', array(), array(), array(), '{var1}.example.com'); + $route11 = new Route('/route11', [], [], [], '{var1}.example.com'); $collection1->add('route11', $route11); - $route12 = new Route('/route12', array('var1' => 'val'), array(), array(), '{var1}.example.com'); + $route12 = new Route('/route12', ['var1' => 'val'], [], [], '{var1}.example.com'); $collection1->add('route12', $route12); - $route13 = new Route('/route13/{name}', array(), array(), array(), '{var1}.example.com'); + $route13 = new Route('/route13/{name}', [], [], [], '{var1}.example.com'); $collection1->add('route13', $route13); - $route14 = new Route('/route14/{name}', array('var1' => 'val'), array(), array(), '{var1}.example.com'); + $route14 = new Route('/route14/{name}', ['var1' => 'val'], [], [], '{var1}.example.com'); $collection1->add('route14', $route14); - $route15 = new Route('/route15/{name}', array(), array(), array(), 'c.example.com'); + $route15 = new Route('/route15/{name}', [], [], [], 'c.example.com'); $collection1->add('route15', $route15); - $route16 = new Route('/route16/{name}', array('var1' => 'val'), array(), array(), null); + $route16 = new Route('/route16/{name}', ['var1' => 'val'], [], [], null); $collection1->add('route16', $route16); - $route17 = new Route('/route17', array(), array(), array(), null); + $route17 = new Route('/route17', [], [], [], null); $collection1->add('route17', $route17); $collection->addCollection($collection1); @@ -297,21 +297,21 @@ class PhpMatcherDumperTest extends TestCase // force HTTPS redirection $redirectCollection->add('secure', new Route( '/secure', - array(), - array(), - array(), + [], + [], + [], '', - array('https') + ['https'] )); // force HTTP redirection $redirectCollection->add('nonsecure', new Route( '/nonsecure', - array(), - array(), - array(), + [], + [], + [], '', - array('http') + ['http'] )); /* test case 3 */ @@ -328,57 +328,57 @@ class PhpMatcherDumperTest extends TestCase $headMatchCasesCollection = new RouteCollection(); $headMatchCasesCollection->add('just_head', new Route( '/just_head', - array(), - array(), - array(), + [], + [], + [], '', - array(), - array('HEAD') + [], + ['HEAD'] )); $headMatchCasesCollection->add('head_and_get', new Route( '/head_and_get', - array(), - array(), - array(), + [], + [], + [], '', - array(), - array('HEAD', 'GET') + [], + ['HEAD', 'GET'] )); $headMatchCasesCollection->add('get_and_head', new Route( '/get_and_head', - array(), - array(), - array(), + [], + [], + [], '', - array(), - array('GET', 'HEAD') + [], + ['GET', 'HEAD'] )); $headMatchCasesCollection->add('post_and_head', new Route( '/post_and_head', - array(), - array(), - array(), + [], + [], + [], '', - array(), - array('POST', 'HEAD') + [], + ['POST', 'HEAD'] )); $headMatchCasesCollection->add('put_and_post', new Route( '/put_and_post', - array(), - array(), - array(), + [], + [], + [], '', - array(), - array('PUT', 'POST') + [], + ['PUT', 'POST'] )); $headMatchCasesCollection->add('put_and_get_and_head', new Route( '/put_and_post', - array(), - array(), - array(), + [], + [], + [], '', - array(), - array('PUT', 'GET', 'HEAD') + [], + ['PUT', 'GET', 'HEAD'] )); /* test case 5 */ @@ -400,39 +400,39 @@ class PhpMatcherDumperTest extends TestCase $groupOptimisedCollection->add('slashed_c', new Route('/slashed/group/c/')); $trailingSlashCollection = new RouteCollection(); - $trailingSlashCollection->add('simple_trailing_slash_no_methods', new Route('/trailing/simple/no-methods/', array(), array(), array(), '', array(), array())); - $trailingSlashCollection->add('simple_trailing_slash_GET_method', new Route('/trailing/simple/get-method/', array(), array(), array(), '', array(), array('GET'))); - $trailingSlashCollection->add('simple_trailing_slash_HEAD_method', new Route('/trailing/simple/head-method/', array(), array(), array(), '', array(), array('HEAD'))); - $trailingSlashCollection->add('simple_trailing_slash_POST_method', new Route('/trailing/simple/post-method/', array(), array(), array(), '', array(), array('POST'))); - $trailingSlashCollection->add('regex_trailing_slash_no_methods', new Route('/trailing/regex/no-methods/{param}/', array(), array(), array(), '', array(), array())); - $trailingSlashCollection->add('regex_trailing_slash_GET_method', new Route('/trailing/regex/get-method/{param}/', array(), array(), array(), '', array(), array('GET'))); - $trailingSlashCollection->add('regex_trailing_slash_HEAD_method', new Route('/trailing/regex/head-method/{param}/', array(), array(), array(), '', array(), array('HEAD'))); - $trailingSlashCollection->add('regex_trailing_slash_POST_method', new Route('/trailing/regex/post-method/{param}/', array(), array(), array(), '', array(), array('POST'))); + $trailingSlashCollection->add('simple_trailing_slash_no_methods', new Route('/trailing/simple/no-methods/', [], [], [], '', [], [])); + $trailingSlashCollection->add('simple_trailing_slash_GET_method', new Route('/trailing/simple/get-method/', [], [], [], '', [], ['GET'])); + $trailingSlashCollection->add('simple_trailing_slash_HEAD_method', new Route('/trailing/simple/head-method/', [], [], [], '', [], ['HEAD'])); + $trailingSlashCollection->add('simple_trailing_slash_POST_method', new Route('/trailing/simple/post-method/', [], [], [], '', [], ['POST'])); + $trailingSlashCollection->add('regex_trailing_slash_no_methods', new Route('/trailing/regex/no-methods/{param}/', [], [], [], '', [], [])); + $trailingSlashCollection->add('regex_trailing_slash_GET_method', new Route('/trailing/regex/get-method/{param}/', [], [], [], '', [], ['GET'])); + $trailingSlashCollection->add('regex_trailing_slash_HEAD_method', new Route('/trailing/regex/head-method/{param}/', [], [], [], '', [], ['HEAD'])); + $trailingSlashCollection->add('regex_trailing_slash_POST_method', new Route('/trailing/regex/post-method/{param}/', [], [], [], '', [], ['POST'])); - $trailingSlashCollection->add('simple_not_trailing_slash_no_methods', new Route('/not-trailing/simple/no-methods', array(), array(), array(), '', array(), array())); - $trailingSlashCollection->add('simple_not_trailing_slash_GET_method', new Route('/not-trailing/simple/get-method', array(), array(), array(), '', array(), array('GET'))); - $trailingSlashCollection->add('simple_not_trailing_slash_HEAD_method', new Route('/not-trailing/simple/head-method', array(), array(), array(), '', array(), array('HEAD'))); - $trailingSlashCollection->add('simple_not_trailing_slash_POST_method', new Route('/not-trailing/simple/post-method', array(), array(), array(), '', array(), array('POST'))); - $trailingSlashCollection->add('regex_not_trailing_slash_no_methods', new Route('/not-trailing/regex/no-methods/{param}', array(), array(), array(), '', array(), array())); - $trailingSlashCollection->add('regex_not_trailing_slash_GET_method', new Route('/not-trailing/regex/get-method/{param}', array(), array(), array(), '', array(), array('GET'))); - $trailingSlashCollection->add('regex_not_trailing_slash_HEAD_method', new Route('/not-trailing/regex/head-method/{param}', array(), array(), array(), '', array(), array('HEAD'))); - $trailingSlashCollection->add('regex_not_trailing_slash_POST_method', new Route('/not-trailing/regex/post-method/{param}', array(), array(), array(), '', array(), array('POST'))); + $trailingSlashCollection->add('simple_not_trailing_slash_no_methods', new Route('/not-trailing/simple/no-methods', [], [], [], '', [], [])); + $trailingSlashCollection->add('simple_not_trailing_slash_GET_method', new Route('/not-trailing/simple/get-method', [], [], [], '', [], ['GET'])); + $trailingSlashCollection->add('simple_not_trailing_slash_HEAD_method', new Route('/not-trailing/simple/head-method', [], [], [], '', [], ['HEAD'])); + $trailingSlashCollection->add('simple_not_trailing_slash_POST_method', new Route('/not-trailing/simple/post-method', [], [], [], '', [], ['POST'])); + $trailingSlashCollection->add('regex_not_trailing_slash_no_methods', new Route('/not-trailing/regex/no-methods/{param}', [], [], [], '', [], [])); + $trailingSlashCollection->add('regex_not_trailing_slash_GET_method', new Route('/not-trailing/regex/get-method/{param}', [], [], [], '', [], ['GET'])); + $trailingSlashCollection->add('regex_not_trailing_slash_HEAD_method', new Route('/not-trailing/regex/head-method/{param}', [], [], [], '', [], ['HEAD'])); + $trailingSlashCollection->add('regex_not_trailing_slash_POST_method', new Route('/not-trailing/regex/post-method/{param}', [], [], [], '', [], ['POST'])); - return array( - array(new RouteCollection(), 'url_matcher0.php', array()), - array($collection, 'url_matcher1.php', array()), - array($redirectCollection, 'url_matcher2.php', array('base_class' => 'Symfony\Component\Routing\Tests\Fixtures\RedirectableUrlMatcher')), - array($rootprefixCollection, 'url_matcher3.php', array()), - array($headMatchCasesCollection, 'url_matcher4.php', array()), - array($groupOptimisedCollection, 'url_matcher5.php', array('base_class' => 'Symfony\Component\Routing\Tests\Fixtures\RedirectableUrlMatcher')), - array($trailingSlashCollection, 'url_matcher6.php', array()), - array($trailingSlashCollection, 'url_matcher7.php', array('base_class' => 'Symfony\Component\Routing\Tests\Fixtures\RedirectableUrlMatcher')), - ); + return [ + [new RouteCollection(), 'url_matcher0.php', []], + [$collection, 'url_matcher1.php', []], + [$redirectCollection, 'url_matcher2.php', ['base_class' => 'Symfony\Component\Routing\Tests\Fixtures\RedirectableUrlMatcher']], + [$rootprefixCollection, 'url_matcher3.php', []], + [$headMatchCasesCollection, 'url_matcher4.php', []], + [$groupOptimisedCollection, 'url_matcher5.php', ['base_class' => 'Symfony\Component\Routing\Tests\Fixtures\RedirectableUrlMatcher']], + [$trailingSlashCollection, 'url_matcher6.php', []], + [$trailingSlashCollection, 'url_matcher7.php', ['base_class' => 'Symfony\Component\Routing\Tests\Fixtures\RedirectableUrlMatcher']], + ]; } private function generateDumpedMatcher(RouteCollection $collection, $redirectableStub = false) { - $options = array('class' => $this->matcherClass); + $options = ['class' => $this->matcherClass]; if ($redirectableStub) { $options['base_class'] = '\Symfony\Component\Routing\Tests\Matcher\Dumper\RedirectableUrlMatcherStub'; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/Dumper/StaticPrefixCollectionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/Dumper/StaticPrefixCollectionTest.php index 37419e77..e0ee4e8e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/Dumper/StaticPrefixCollectionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/Dumper/StaticPrefixCollectionTest.php @@ -28,51 +28,51 @@ class StaticPrefixCollectionTest extends TestCase public function routeProvider() { - return array( - 'Simple - not nested' => array( - array( - array('/', 'root'), - array('/prefix/segment/', 'prefix_segment'), - array('/leading/segment/', 'leading_segment'), - ), + return [ + 'Simple - not nested' => [ + [ + ['/', 'root'], + ['/prefix/segment/', 'prefix_segment'], + ['/leading/segment/', 'leading_segment'], + ], << array( - array( - array('/', 'root'), - array('/prefix/segment/aa', 'prefix_segment'), - array('/prefix/segment/bb', 'leading_segment'), - ), + ], + 'Not nested - group too small' => [ + [ + ['/', 'root'], + ['/prefix/segment/aa', 'prefix_segment'], + ['/prefix/segment/bb', 'leading_segment'], + ], << array( - array( - array('/', 'root'), - array('/prefix/segment/', 'prefix_segment'), - array('/prefix/segment/bb', 'leading_segment'), - ), + ], + 'Nested - contains item at intersection' => [ + [ + ['/', 'root'], + ['/prefix/segment/', 'prefix_segment'], + ['/prefix/segment/bb', 'leading_segment'], + ], << /prefix/segment prefix_segment -> /prefix/segment/bb leading_segment EOF - ), - 'Simple one level nesting' => array( - array( - array('/', 'root'), - array('/group/segment/', 'nested_segment'), - array('/group/thing/', 'some_segment'), - array('/group/other/', 'other_segment'), - ), + ], + 'Simple one level nesting' => [ + [ + ['/', 'root'], + ['/group/segment/', 'nested_segment'], + ['/group/thing/', 'some_segment'], + ['/group/other/', 'other_segment'], + ], << /group/thing some_segment -> /group/other other_segment EOF - ), - 'Retain matching order with groups' => array( - array( - array('/group/aa/', 'aa'), - array('/group/bb/', 'bb'), - array('/group/cc/', 'cc'), - array('/', 'root'), - array('/group/dd/', 'dd'), - array('/group/ee/', 'ee'), - array('/group/ff/', 'ff'), - ), + ], + 'Retain matching order with groups' => [ + [ + ['/group/aa/', 'aa'], + ['/group/bb/', 'bb'], + ['/group/cc/', 'cc'], + ['/', 'root'], + ['/group/dd/', 'dd'], + ['/group/ee/', 'ee'], + ['/group/ff/', 'ff'], + ], << /group/aa aa @@ -102,20 +102,20 @@ EOF -> /group/ee ee -> /group/ff ff EOF - ), - 'Retain complex matching order with groups at base' => array( - array( - array('/aaa/111/', 'first_aaa'), - array('/prefixed/group/aa/', 'aa'), - array('/prefixed/group/bb/', 'bb'), - array('/prefixed/group/cc/', 'cc'), - array('/prefixed/', 'root'), - array('/prefixed/group/dd/', 'dd'), - array('/prefixed/group/ee/', 'ee'), - array('/prefixed/group/ff/', 'ff'), - array('/aaa/222/', 'second_aaa'), - array('/aaa/333/', 'third_aaa'), - ), + ], + 'Retain complex matching order with groups at base' => [ + [ + ['/aaa/111/', 'first_aaa'], + ['/prefixed/group/aa/', 'aa'], + ['/prefixed/group/bb/', 'bb'], + ['/prefixed/group/cc/', 'cc'], + ['/prefixed/', 'root'], + ['/prefixed/group/dd/', 'dd'], + ['/prefixed/group/ee/', 'ee'], + ['/prefixed/group/ff/', 'ff'], + ['/aaa/222/', 'second_aaa'], + ['/aaa/333/', 'third_aaa'], + ], << /aaa/111 first_aaa @@ -132,17 +132,17 @@ EOF -> -> /prefixed/group/ee ee -> -> /prefixed/group/ff ff EOF - ), + ], - 'Group regardless of segments' => array( - array( - array('/aaa-111/', 'a1'), - array('/aaa-222/', 'a2'), - array('/aaa-333/', 'a3'), - array('/group-aa/', 'g1'), - array('/group-bb/', 'g2'), - array('/group-cc/', 'g3'), - ), + 'Group regardless of segments' => [ + [ + ['/aaa-111/', 'a1'], + ['/aaa-222/', 'a2'], + ['/aaa-333/', 'a3'], + ['/group-aa/', 'g1'], + ['/group-bb/', 'g2'], + ['/group-cc/', 'g3'], + ], << /aaa-111 a1 @@ -153,13 +153,13 @@ EOF -> /group-bb g2 -> /group-cc g3 EOF - ), - ); + ], + ]; } private function dumpCollection(StaticPrefixCollection $collection, $prefix = '') { - $lines = array(); + $lines = []; foreach ($collection->getItems() as $item) { if ($item instanceof StaticPrefixCollection) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php index a7aea0ec..e4336cdc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php @@ -23,7 +23,7 @@ class RedirectableUrlMatcherTest extends UrlMatcherTest $coll->add('foo', new Route('/foo/')); $matcher = $this->getUrlMatcher($coll); - $matcher->expects($this->once())->method('redirect')->will($this->returnValue(array())); + $matcher->expects($this->once())->method('redirect')->will($this->returnValue([])); $matcher->match('/foo'); } @@ -44,14 +44,14 @@ class RedirectableUrlMatcherTest extends UrlMatcherTest public function testSchemeRedirectRedirectsToFirstScheme() { $coll = new RouteCollection(); - $coll->add('foo', new Route('/foo', array(), array(), array(), '', array('FTP', 'HTTPS'))); + $coll->add('foo', new Route('/foo', [], [], [], '', ['FTP', 'HTTPS'])); $matcher = $this->getUrlMatcher($coll); $matcher ->expects($this->once()) ->method('redirect') ->with('/foo', 'foo', 'ftp') - ->will($this->returnValue(array('_route' => 'foo'))) + ->will($this->returnValue(['_route' => 'foo'])) ; $matcher->match('/foo'); } @@ -59,7 +59,7 @@ class RedirectableUrlMatcherTest extends UrlMatcherTest public function testNoSchemaRedirectIfOneOfMultipleSchemesMatches() { $coll = new RouteCollection(); - $coll->add('foo', new Route('/foo', array(), array(), array(), '', array('https', 'http'))); + $coll->add('foo', new Route('/foo', [], [], [], '', ['https', 'http'])); $matcher = $this->getUrlMatcher($coll); $matcher @@ -71,16 +71,16 @@ class RedirectableUrlMatcherTest extends UrlMatcherTest public function testSchemeRedirectWithParams() { $coll = new RouteCollection(); - $coll->add('foo', new Route('/foo/{bar}', array(), array(), array(), '', array('https'))); + $coll->add('foo', new Route('/foo/{bar}', [], [], [], '', ['https'])); $matcher = $this->getUrlMatcher($coll); $matcher ->expects($this->once()) ->method('redirect') ->with('/foo/baz', 'foo', 'https') - ->will($this->returnValue(array('redirect' => 'value'))) + ->will($this->returnValue(['redirect' => 'value'])) ; - $this->assertEquals(array('_route' => 'foo', 'bar' => 'baz', 'redirect' => 'value'), $matcher->match('/foo/baz')); + $this->assertEquals(['_route' => 'foo', 'bar' => 'baz', 'redirect' => 'value'], $matcher->match('/foo/baz')); } public function testSlashRedirectWithParams() @@ -93,9 +93,9 @@ class RedirectableUrlMatcherTest extends UrlMatcherTest ->expects($this->once()) ->method('redirect') ->with('/foo/baz/', 'foo', null) - ->will($this->returnValue(array('redirect' => 'value'))) + ->will($this->returnValue(['redirect' => 'value'])) ; - $this->assertEquals(array('_route' => 'foo', 'bar' => 'baz', 'redirect' => 'value'), $matcher->match('/foo/baz')); + $this->assertEquals(['_route' => 'foo', 'bar' => 'baz', 'redirect' => 'value'], $matcher->match('/foo/baz')); } public function testRedirectPreservesUrlEncoding() @@ -104,17 +104,17 @@ class RedirectableUrlMatcherTest extends UrlMatcherTest $coll->add('foo', new Route('/foo:bar/')); $matcher = $this->getUrlMatcher($coll); - $matcher->expects($this->once())->method('redirect')->with('/foo%3Abar/')->willReturn(array()); + $matcher->expects($this->once())->method('redirect')->with('/foo%3Abar/')->willReturn([]); $matcher->match('/foo%3Abar'); } public function testSchemeRequirement() { $coll = new RouteCollection(); - $coll->add('foo', new Route('/foo', array(), array(), array(), '', array('https'))); + $coll->add('foo', new Route('/foo', [], [], [], '', ['https'])); $matcher = $this->getUrlMatcher($coll, new RequestContext()); - $matcher->expects($this->once())->method('redirect')->with('/foo', 'foo', 'https')->willReturn(array()); - $this->assertSame(array('_route' => 'foo'), $matcher->match('/foo')); + $matcher->expects($this->once())->method('redirect')->with('/foo', 'foo', 'https')->willReturn([]); + $this->assertSame(['_route' => 'foo'], $matcher->match('/foo')); } public function testFallbackPage() @@ -124,12 +124,29 @@ class RedirectableUrlMatcherTest extends UrlMatcherTest $coll->add('bar', new Route('/{name}')); $matcher = $this->getUrlMatcher($coll); - $matcher->expects($this->once())->method('redirect')->with('/foo/')->will($this->returnValue(array('_route' => 'foo'))); - $this->assertSame(array('_route' => 'foo'), $matcher->match('/foo')); + $matcher->expects($this->once())->method('redirect')->with('/foo/')->will($this->returnValue(['_route' => 'foo'])); + $this->assertSame(['_route' => 'foo'], $matcher->match('/foo')); + } + + public function testSlashAndVerbPrecedenceWithRedirection() + { + $coll = new RouteCollection(); + $coll->add('a', new Route('/api/customers/{customerId}/contactpersons', [], [], [], '', [], ['post'])); + $coll->add('b', new Route('/api/customers/{customerId}/contactpersons/', [], [], [], '', [], ['get'])); + + $matcher = $this->getUrlMatcher($coll); + $expected = [ + '_route' => 'b', + 'customerId' => '123', + ]; + $this->assertEquals($expected, $matcher->match('/api/customers/123/contactpersons/')); + + $matcher->expects($this->once())->method('redirect')->with('/api/customers/123/contactpersons/')->willReturn([]); + $this->assertEquals($expected, $matcher->match('/api/customers/123/contactpersons')); } protected function getUrlMatcher(RouteCollection $routes, RequestContext $context = null) { - return $this->getMockForAbstractClass('Symfony\Component\Routing\Matcher\RedirectableUrlMatcher', array($routes, $context ?: new RequestContext())); + return $this->getMockForAbstractClass('Symfony\Component\Routing\Matcher\RedirectableUrlMatcher', [$routes, $context ?: new RequestContext()]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/TraceableUrlMatcherTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/TraceableUrlMatcherTest.php index 1f026a6e..04ddf845 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/TraceableUrlMatcherTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/TraceableUrlMatcherTest.php @@ -23,41 +23,41 @@ class TraceableUrlMatcherTest extends TestCase public function test() { $coll = new RouteCollection(); - $coll->add('foo', new Route('/foo', array(), array(), array(), '', array(), array('POST'))); - $coll->add('bar', new Route('/bar/{id}', array(), array('id' => '\d+'))); - $coll->add('bar1', new Route('/bar/{name}', array(), array('id' => '\w+'), array(), '', array(), array('POST'))); - $coll->add('bar2', new Route('/foo', array(), array(), array(), 'baz')); - $coll->add('bar3', new Route('/foo1', array(), array(), array(), 'baz')); - $coll->add('bar4', new Route('/foo2', array(), array(), array(), 'baz', array(), array(), 'context.getMethod() == "GET"')); + $coll->add('foo', new Route('/foo', [], [], [], '', [], ['POST'])); + $coll->add('bar', new Route('/bar/{id}', [], ['id' => '\d+'])); + $coll->add('bar1', new Route('/bar/{name}', [], ['id' => '\w+'], [], '', [], ['POST'])); + $coll->add('bar2', new Route('/foo', [], [], [], 'baz')); + $coll->add('bar3', new Route('/foo1', [], [], [], 'baz')); + $coll->add('bar4', new Route('/foo2', [], [], [], 'baz', [], [], 'context.getMethod() == "GET"')); $context = new RequestContext(); $context->setHost('baz'); $matcher = new TraceableUrlMatcher($coll, $context); $traces = $matcher->getTraces('/babar'); - $this->assertSame(array(0, 0, 0, 0, 0, 0), $this->getLevels($traces)); + $this->assertSame([0, 0, 0, 0, 0, 0], $this->getLevels($traces)); $traces = $matcher->getTraces('/foo'); - $this->assertSame(array(1, 0, 0, 2), $this->getLevels($traces)); + $this->assertSame([1, 0, 0, 2], $this->getLevels($traces)); $traces = $matcher->getTraces('/bar/12'); - $this->assertSame(array(0, 2), $this->getLevels($traces)); + $this->assertSame([0, 2], $this->getLevels($traces)); $traces = $matcher->getTraces('/bar/dd'); - $this->assertSame(array(0, 1, 1, 0, 0, 0), $this->getLevels($traces)); + $this->assertSame([0, 1, 1, 0, 0, 0], $this->getLevels($traces)); $traces = $matcher->getTraces('/foo1'); - $this->assertSame(array(0, 0, 0, 0, 2), $this->getLevels($traces)); + $this->assertSame([0, 0, 0, 0, 2], $this->getLevels($traces)); $context->setMethod('POST'); $traces = $matcher->getTraces('/foo'); - $this->assertSame(array(2), $this->getLevels($traces)); + $this->assertSame([2], $this->getLevels($traces)); $traces = $matcher->getTraces('/bar/dd'); - $this->assertSame(array(0, 1, 2), $this->getLevels($traces)); + $this->assertSame([0, 1, 2], $this->getLevels($traces)); $traces = $matcher->getTraces('/foo2'); - $this->assertSame(array(0, 0, 0, 0, 0, 1), $this->getLevels($traces)); + $this->assertSame([0, 0, 0, 0, 0, 1], $this->getLevels($traces)); } public function testMatchRouteOnMultipleHosts() @@ -65,17 +65,17 @@ class TraceableUrlMatcherTest extends TestCase $routes = new RouteCollection(); $routes->add('first', new Route( '/mypath/', - array('_controller' => 'MainBundle:Info:first'), - array(), - array(), + ['_controller' => 'MainBundle:Info:first'], + [], + [], 'some.example.com' )); $routes->add('second', new Route( '/mypath/', - array('_controller' => 'MainBundle:Info:second'), - array(), - array(), + ['_controller' => 'MainBundle:Info:second'], + [], + [], 'another.example.com' )); @@ -86,14 +86,14 @@ class TraceableUrlMatcherTest extends TestCase $traces = $matcher->getTraces('/mypath/'); $this->assertSame( - array(TraceableUrlMatcher::ROUTE_ALMOST_MATCHES, TraceableUrlMatcher::ROUTE_ALMOST_MATCHES), + [TraceableUrlMatcher::ROUTE_ALMOST_MATCHES, TraceableUrlMatcher::ROUTE_ALMOST_MATCHES], $this->getLevels($traces) ); } public function getLevels($traces) { - $levels = array(); + $levels = []; foreach ($traces as $trace) { $levels[] = $trace['level']; } @@ -104,7 +104,7 @@ class TraceableUrlMatcherTest extends TestCase public function testRoutesWithConditions() { $routes = new RouteCollection(); - $routes->add('foo', new Route('/foo', array(), array(), array(), 'baz', array(), array(), "request.headers.get('User-Agent') matches '/firefox/i'")); + $routes->add('foo', new Route('/foo', [], [], [], 'baz', [], [], "request.headers.get('User-Agent') matches '/firefox/i'")); $context = new RequestContext(); $context->setHost('baz'); @@ -115,7 +115,7 @@ class TraceableUrlMatcherTest extends TestCase $traces = $matcher->getTracesForRequest($notMatchingRequest); $this->assertEquals("Condition \"request.headers.get('User-Agent') matches '/firefox/i'\" does not evaluate to \"true\"", $traces[0]['log']); - $matchingRequest = Request::create('/foo', 'GET', array(), array(), array(), array('HTTP_USER_AGENT' => 'Firefox')); + $matchingRequest = Request::create('/foo', 'GET', [], [], [], ['HTTP_USER_AGENT' => 'Firefox']); $traces = $matcher->getTracesForRequest($matchingRequest); $this->assertEquals('Route matches!', $traces[0]['log']); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php index 0d4b44b0..61f9be33 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php @@ -33,7 +33,7 @@ class UrlMatcherTest extends TestCase public function testMethodNotAllowed() { $coll = new RouteCollection(); - $coll->add('foo', new Route('/foo', array(), array(), array(), '', array(), array('post'))); + $coll->add('foo', new Route('/foo', [], [], [], '', [], ['post'])); $matcher = $this->getUrlMatcher($coll); @@ -41,14 +41,14 @@ class UrlMatcherTest extends TestCase $matcher->match('/foo'); $this->fail(); } catch (MethodNotAllowedException $e) { - $this->assertEquals(array('POST'), $e->getAllowedMethods()); + $this->assertEquals(['POST'], $e->getAllowedMethods()); } } public function testMethodNotAllowedOnRoot() { $coll = new RouteCollection(); - $coll->add('foo', new Route('/', array(), array(), array(), '', array(), array('GET'))); + $coll->add('foo', new Route('/', [], [], [], '', [], ['GET'])); $matcher = $this->getUrlMatcher($coll, new RequestContext('', 'POST')); @@ -56,14 +56,14 @@ class UrlMatcherTest extends TestCase $matcher->match('/'); $this->fail(); } catch (MethodNotAllowedException $e) { - $this->assertEquals(array('GET'), $e->getAllowedMethods()); + $this->assertEquals(['GET'], $e->getAllowedMethods()); } } public function testHeadAllowedWhenRequirementContainsGet() { $coll = new RouteCollection(); - $coll->add('foo', new Route('/foo', array(), array(), array(), '', array(), array('get'))); + $coll->add('foo', new Route('/foo', [], [], [], '', [], ['get'])); $matcher = $this->getUrlMatcher($coll, new RequestContext('', 'head')); $this->assertInternalType('array', $matcher->match('/foo')); @@ -72,8 +72,8 @@ class UrlMatcherTest extends TestCase public function testMethodNotAllowedAggregatesAllowedMethods() { $coll = new RouteCollection(); - $coll->add('foo1', new Route('/foo', array(), array(), array(), '', array(), array('post'))); - $coll->add('foo2', new Route('/foo', array(), array(), array(), '', array(), array('put', 'delete'))); + $coll->add('foo1', new Route('/foo', [], [], [], '', [], ['post'])); + $coll->add('foo2', new Route('/foo', [], [], [], '', [], ['put', 'delete'])); $matcher = $this->getUrlMatcher($coll); @@ -81,7 +81,7 @@ class UrlMatcherTest extends TestCase $matcher->match('/foo'); $this->fail(); } catch (MethodNotAllowedException $e) { - $this->assertEquals(array('POST', 'PUT', 'DELETE'), $e->getAllowedMethods()); + $this->assertEquals(['POST', 'PUT', 'DELETE'], $e->getAllowedMethods()); } } @@ -96,17 +96,17 @@ class UrlMatcherTest extends TestCase $this->fail(); } catch (ResourceNotFoundException $e) { } - $this->assertEquals(array('_route' => 'foo', 'bar' => 'baz'), $matcher->match('/foo/baz')); + $this->assertEquals(['_route' => 'foo', 'bar' => 'baz'], $matcher->match('/foo/baz')); // test that defaults are merged $collection = new RouteCollection(); - $collection->add('foo', new Route('/foo/{bar}', array('def' => 'test'))); + $collection->add('foo', new Route('/foo/{bar}', ['def' => 'test'])); $matcher = $this->getUrlMatcher($collection); - $this->assertEquals(array('_route' => 'foo', 'bar' => 'baz', 'def' => 'test'), $matcher->match('/foo/baz')); + $this->assertEquals(['_route' => 'foo', 'bar' => 'baz', 'def' => 'test'], $matcher->match('/foo/baz')); // test that route "method" is ignored if no method is given in the context $collection = new RouteCollection(); - $collection->add('foo', new Route('/foo', array(), array(), array(), '', array(), array('get', 'head'))); + $collection->add('foo', new Route('/foo', [], [], [], '', [], ['get', 'head'])); $matcher = $this->getUrlMatcher($collection); $this->assertInternalType('array', $matcher->match('/foo')); @@ -126,24 +126,24 @@ class UrlMatcherTest extends TestCase // route with an optional variable as the first segment $collection = new RouteCollection(); - $collection->add('bar', new Route('/{bar}/foo', array('bar' => 'bar'), array('bar' => 'foo|bar'))); + $collection->add('bar', new Route('/{bar}/foo', ['bar' => 'bar'], ['bar' => 'foo|bar'])); $matcher = $this->getUrlMatcher($collection); - $this->assertEquals(array('_route' => 'bar', 'bar' => 'bar'), $matcher->match('/bar/foo')); - $this->assertEquals(array('_route' => 'bar', 'bar' => 'foo'), $matcher->match('/foo/foo')); + $this->assertEquals(['_route' => 'bar', 'bar' => 'bar'], $matcher->match('/bar/foo')); + $this->assertEquals(['_route' => 'bar', 'bar' => 'foo'], $matcher->match('/foo/foo')); $collection = new RouteCollection(); - $collection->add('bar', new Route('/{bar}', array('bar' => 'bar'), array('bar' => 'foo|bar'))); + $collection->add('bar', new Route('/{bar}', ['bar' => 'bar'], ['bar' => 'foo|bar'])); $matcher = $this->getUrlMatcher($collection); - $this->assertEquals(array('_route' => 'bar', 'bar' => 'foo'), $matcher->match('/foo')); - $this->assertEquals(array('_route' => 'bar', 'bar' => 'bar'), $matcher->match('/')); + $this->assertEquals(['_route' => 'bar', 'bar' => 'foo'], $matcher->match('/foo')); + $this->assertEquals(['_route' => 'bar', 'bar' => 'bar'], $matcher->match('/')); // route with only optional variables $collection = new RouteCollection(); - $collection->add('bar', new Route('/{foo}/{bar}', array('foo' => 'foo', 'bar' => 'bar'), array())); + $collection->add('bar', new Route('/{foo}/{bar}', ['foo' => 'foo', 'bar' => 'bar'], [])); $matcher = $this->getUrlMatcher($collection); - $this->assertEquals(array('_route' => 'bar', 'foo' => 'foo', 'bar' => 'bar'), $matcher->match('/')); - $this->assertEquals(array('_route' => 'bar', 'foo' => 'a', 'bar' => 'bar'), $matcher->match('/a')); - $this->assertEquals(array('_route' => 'bar', 'foo' => 'a', 'bar' => 'b'), $matcher->match('/a/b')); + $this->assertEquals(['_route' => 'bar', 'foo' => 'foo', 'bar' => 'bar'], $matcher->match('/')); + $this->assertEquals(['_route' => 'bar', 'foo' => 'a', 'bar' => 'bar'], $matcher->match('/a')); + $this->assertEquals(['_route' => 'bar', 'foo' => 'a', 'bar' => 'b'], $matcher->match('/a/b')); } public function testMatchWithPrefixes() @@ -154,7 +154,7 @@ class UrlMatcherTest extends TestCase $collection->addPrefix('/a'); $matcher = $this->getUrlMatcher($collection); - $this->assertEquals(array('_route' => 'foo', 'foo' => 'foo'), $matcher->match('/a/b/foo')); + $this->assertEquals(['_route' => 'foo', 'foo' => 'foo'], $matcher->match('/a/b/foo')); } public function testMatchWithDynamicPrefix() @@ -165,7 +165,7 @@ class UrlMatcherTest extends TestCase $collection->addPrefix('/{_locale}'); $matcher = $this->getUrlMatcher($collection); - $this->assertEquals(array('_locale' => 'fr', '_route' => 'foo', 'foo' => 'foo'), $matcher->match('/fr/b/foo')); + $this->assertEquals(['_locale' => 'fr', '_route' => 'foo', 'foo' => 'foo'], $matcher->match('/fr/b/foo')); } public function testMatchSpecialRouteName() @@ -174,7 +174,7 @@ class UrlMatcherTest extends TestCase $collection->add('$péß^a|', new Route('/bar')); $matcher = $this->getUrlMatcher($collection); - $this->assertEquals(array('_route' => '$péß^a|'), $matcher->match('/bar')); + $this->assertEquals(['_route' => '$péß^a|'], $matcher->match('/bar')); } /** @@ -193,20 +193,20 @@ class UrlMatcherTest extends TestCase { $collection = new RouteCollection(); $chars = '!"$%éà &\'()*+,./:;<=>@ABCDEFGHIJKLMNOPQRSTUVWXYZ\\[]^_`abcdefghijklmnopqrstuvwxyz{|}~-'; - $collection->add('foo', new Route('/{foo}/bar', array(), array('foo' => '['.preg_quote($chars).']+'), array('utf8' => true))); + $collection->add('foo', new Route('/{foo}/bar', [], ['foo' => '['.preg_quote($chars).']+'], ['utf8' => true])); $matcher = $this->getUrlMatcher($collection); - $this->assertEquals(array('_route' => 'foo', 'foo' => $chars), $matcher->match('/'.rawurlencode($chars).'/bar')); - $this->assertEquals(array('_route' => 'foo', 'foo' => $chars), $matcher->match('/'.strtr($chars, array('%' => '%25')).'/bar')); + $this->assertEquals(['_route' => 'foo', 'foo' => $chars], $matcher->match('/'.rawurlencode($chars).'/bar')); + $this->assertEquals(['_route' => 'foo', 'foo' => $chars], $matcher->match('/'.strtr($chars, ['%' => '%25']).'/bar')); } public function testMatchWithDotMetacharacterInRequirements() { $collection = new RouteCollection(); - $collection->add('foo', new Route('/{foo}/bar', array(), array('foo' => '.+'))); + $collection->add('foo', new Route('/{foo}/bar', [], ['foo' => '.+'])); $matcher = $this->getUrlMatcher($collection); - $this->assertEquals(array('_route' => 'foo', 'foo' => "\n"), $matcher->match('/'.urlencode("\n").'/bar'), 'linefeed character is matched'); + $this->assertEquals(['_route' => 'foo', 'foo' => "\n"], $matcher->match('/'.urlencode("\n").'/bar'), 'linefeed character is matched'); } public function testMatchOverriddenRoute() @@ -221,9 +221,9 @@ class UrlMatcherTest extends TestCase $matcher = $this->getUrlMatcher($collection); - $this->assertEquals(array('_route' => 'foo'), $matcher->match('/foo1')); + $this->assertEquals(['_route' => 'foo'], $matcher->match('/foo1')); $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Routing\Exception\ResourceNotFoundException'); - $this->assertEquals(array(), $matcher->match('/foo')); + $this->assertEquals([], $matcher->match('/foo')); } public function testMatchRegression() @@ -233,7 +233,7 @@ class UrlMatcherTest extends TestCase $coll->add('bar', new Route('/foo/bar/{foo}')); $matcher = $this->getUrlMatcher($coll); - $this->assertEquals(array('foo' => 'bar', '_route' => 'bar'), $matcher->match('/foo/bar/bar')); + $this->assertEquals(['foo' => 'bar', '_route' => 'bar'], $matcher->match('/foo/bar/bar')); $collection = new RouteCollection(); $collection->add('foo', new Route('/{bar}')); @@ -248,36 +248,36 @@ class UrlMatcherTest extends TestCase public function testDefaultRequirementForOptionalVariables() { $coll = new RouteCollection(); - $coll->add('test', new Route('/{page}.{_format}', array('page' => 'index', '_format' => 'html'))); + $coll->add('test', new Route('/{page}.{_format}', ['page' => 'index', '_format' => 'html'])); $matcher = $this->getUrlMatcher($coll); - $this->assertEquals(array('page' => 'my-page', '_format' => 'xml', '_route' => 'test'), $matcher->match('/my-page.xml')); + $this->assertEquals(['page' => 'my-page', '_format' => 'xml', '_route' => 'test'], $matcher->match('/my-page.xml')); } public function testMatchingIsEager() { $coll = new RouteCollection(); - $coll->add('test', new Route('/{foo}-{bar}-', array(), array('foo' => '.+', 'bar' => '.+'))); + $coll->add('test', new Route('/{foo}-{bar}-', [], ['foo' => '.+', 'bar' => '.+'])); $matcher = $this->getUrlMatcher($coll); - $this->assertEquals(array('foo' => 'text1-text2-text3', 'bar' => 'text4', '_route' => 'test'), $matcher->match('/text1-text2-text3-text4-')); + $this->assertEquals(['foo' => 'text1-text2-text3', 'bar' => 'text4', '_route' => 'test'], $matcher->match('/text1-text2-text3-text4-')); } public function testAdjacentVariables() { $coll = new RouteCollection(); - $coll->add('test', new Route('/{w}{x}{y}{z}.{_format}', array('z' => 'default-z', '_format' => 'html'), array('y' => 'y|Y'))); + $coll->add('test', new Route('/{w}{x}{y}{z}.{_format}', ['z' => 'default-z', '_format' => 'html'], ['y' => 'y|Y'])); $matcher = $this->getUrlMatcher($coll); // 'w' eagerly matches as much as possible and the other variables match the remaining chars. // This also shows that the variables w-z must all exclude the separating char (the dot '.' in this case) by default requirement. // Otherwise they would also consume '.xml' and _format would never match as it's an optional variable. - $this->assertEquals(array('w' => 'wwwww', 'x' => 'x', 'y' => 'Y', 'z' => 'Z', '_format' => 'xml', '_route' => 'test'), $matcher->match('/wwwwwxYZ.xml')); + $this->assertEquals(['w' => 'wwwww', 'x' => 'x', 'y' => 'Y', 'z' => 'Z', '_format' => 'xml', '_route' => 'test'], $matcher->match('/wwwwwxYZ.xml')); // As 'y' has custom requirement and can only be of value 'y|Y', it will leave 'ZZZ' to variable z. // So with carefully chosen requirements adjacent variables, can be useful. - $this->assertEquals(array('w' => 'wwwww', 'x' => 'x', 'y' => 'y', 'z' => 'ZZZ', '_format' => 'html', '_route' => 'test'), $matcher->match('/wwwwwxyZZZ')); + $this->assertEquals(['w' => 'wwwww', 'x' => 'x', 'y' => 'y', 'z' => 'ZZZ', '_format' => 'html', '_route' => 'test'], $matcher->match('/wwwwwxyZZZ')); // z and _format are optional. - $this->assertEquals(array('w' => 'wwwww', 'x' => 'x', 'y' => 'y', 'z' => 'default-z', '_format' => 'html', '_route' => 'test'), $matcher->match('/wwwwwxy')); + $this->assertEquals(['w' => 'wwwww', 'x' => 'x', 'y' => 'y', 'z' => 'default-z', '_format' => 'html', '_route' => 'test'], $matcher->match('/wwwwwxy')); $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Routing\Exception\ResourceNotFoundException'); $matcher->match('/wxy.html'); @@ -286,11 +286,11 @@ class UrlMatcherTest extends TestCase public function testOptionalVariableWithNoRealSeparator() { $coll = new RouteCollection(); - $coll->add('test', new Route('/get{what}', array('what' => 'All'))); + $coll->add('test', new Route('/get{what}', ['what' => 'All'])); $matcher = $this->getUrlMatcher($coll); - $this->assertEquals(array('what' => 'All', '_route' => 'test'), $matcher->match('/get')); - $this->assertEquals(array('what' => 'Sites', '_route' => 'test'), $matcher->match('/getSites')); + $this->assertEquals(['what' => 'All', '_route' => 'test'], $matcher->match('/get')); + $this->assertEquals(['what' => 'Sites', '_route' => 'test'], $matcher->match('/getSites')); // Usually the character in front of an optional parameter can be left out, e.g. with pattern '/get/{what}' just '/get' would match. // But here the 't' in 'get' is not a separating character, so it makes no sense to match without it. @@ -304,7 +304,7 @@ class UrlMatcherTest extends TestCase $coll->add('test', new Route('/get{what}Suffix')); $matcher = $this->getUrlMatcher($coll); - $this->assertEquals(array('what' => 'Sites', '_route' => 'test'), $matcher->match('/getSitesSuffix')); + $this->assertEquals(['what' => 'Sites', '_route' => 'test'], $matcher->match('/getSitesSuffix')); } public function testDefaultRequirementOfVariable() @@ -313,7 +313,7 @@ class UrlMatcherTest extends TestCase $coll->add('test', new Route('/{page}.{_format}')); $matcher = $this->getUrlMatcher($coll); - $this->assertEquals(array('page' => 'index', '_format' => 'mobile.html', '_route' => 'test'), $matcher->match('/index.mobile.html')); + $this->assertEquals(['page' => 'index', '_format' => 'mobile.html', '_route' => 'test'], $matcher->match('/index.mobile.html')); } /** @@ -334,7 +334,7 @@ class UrlMatcherTest extends TestCase public function testDefaultRequirementOfVariableDisallowsNextSeparator() { $coll = new RouteCollection(); - $coll->add('test', new Route('/{page}.{_format}', array(), array('_format' => 'html|xml'))); + $coll->add('test', new Route('/{page}.{_format}', [], ['_format' => 'html|xml'])); $matcher = $this->getUrlMatcher($coll); $matcher->match('/do.t.html'); @@ -346,7 +346,7 @@ class UrlMatcherTest extends TestCase public function testSchemeRequirement() { $coll = new RouteCollection(); - $coll->add('foo', new Route('/foo', array(), array(), array(), '', array('https'))); + $coll->add('foo', new Route('/foo', [], [], [], '', ['https'])); $matcher = $this->getUrlMatcher($coll); $matcher->match('/foo'); } @@ -371,7 +371,7 @@ class UrlMatcherTest extends TestCase $route->setCondition('request.getBaseUrl() == "/sub/front.php" and request.getPathInfo() == "/foo/bar"'); $coll->add('foo', $route); $matcher = $this->getUrlMatcher($coll, new RequestContext('/sub/front.php')); - $this->assertEquals(array('bar' => 'bar', '_route' => 'foo'), $matcher->match('/foo/bar')); + $this->assertEquals(['bar' => 'bar', '_route' => 'foo'], $matcher->match('/foo/bar')); } public function testDecodeOnce() @@ -380,7 +380,7 @@ class UrlMatcherTest extends TestCase $coll->add('foo', new Route('/foo/{foo}')); $matcher = $this->getUrlMatcher($coll); - $this->assertEquals(array('foo' => 'bar%23', '_route' => 'foo'), $matcher->match('/foo/bar%2523')); + $this->assertEquals(['foo' => 'bar%23', '_route' => 'foo'], $matcher->match('/foo/bar%2523')); } public function testCannotRelyOnPrefix() @@ -396,30 +396,30 @@ class UrlMatcherTest extends TestCase $coll->addCollection($subColl); $matcher = $this->getUrlMatcher($coll); - $this->assertEquals(array('_route' => 'bar'), $matcher->match('/new')); + $this->assertEquals(['_route' => 'bar'], $matcher->match('/new')); } public function testWithHost() { $coll = new RouteCollection(); - $coll->add('foo', new Route('/foo/{foo}', array(), array(), array(), '{locale}.example.com')); + $coll->add('foo', new Route('/foo/{foo}', [], [], [], '{locale}.example.com')); $matcher = $this->getUrlMatcher($coll, new RequestContext('', 'GET', 'en.example.com')); - $this->assertEquals(array('foo' => 'bar', '_route' => 'foo', 'locale' => 'en'), $matcher->match('/foo/bar')); + $this->assertEquals(['foo' => 'bar', '_route' => 'foo', 'locale' => 'en'], $matcher->match('/foo/bar')); } public function testWithHostOnRouteCollection() { $coll = new RouteCollection(); $coll->add('foo', new Route('/foo/{foo}')); - $coll->add('bar', new Route('/bar/{foo}', array(), array(), array(), '{locale}.example.net')); + $coll->add('bar', new Route('/bar/{foo}', [], [], [], '{locale}.example.net')); $coll->setHost('{locale}.example.com'); $matcher = $this->getUrlMatcher($coll, new RequestContext('', 'GET', 'en.example.com')); - $this->assertEquals(array('foo' => 'bar', '_route' => 'foo', 'locale' => 'en'), $matcher->match('/foo/bar')); + $this->assertEquals(['foo' => 'bar', '_route' => 'foo', 'locale' => 'en'], $matcher->match('/foo/bar')); $matcher = $this->getUrlMatcher($coll, new RequestContext('', 'GET', 'en.example.com')); - $this->assertEquals(array('foo' => 'bar', '_route' => 'bar', 'locale' => 'en'), $matcher->match('/bar/bar')); + $this->assertEquals(['foo' => 'bar', '_route' => 'bar', 'locale' => 'en'], $matcher->match('/bar/bar')); } /** @@ -428,7 +428,7 @@ class UrlMatcherTest extends TestCase public function testWithOutHostHostDoesNotMatch() { $coll = new RouteCollection(); - $coll->add('foo', new Route('/foo/{foo}', array(), array(), array(), '{locale}.example.com')); + $coll->add('foo', new Route('/foo/{foo}', [], [], [], '{locale}.example.com')); $matcher = $this->getUrlMatcher($coll, new RequestContext('', 'GET', 'example.com')); $matcher->match('/foo/bar'); @@ -440,7 +440,7 @@ class UrlMatcherTest extends TestCase public function testPathIsCaseSensitive() { $coll = new RouteCollection(); - $coll->add('foo', new Route('/locale', array(), array('locale' => 'EN|FR|DE'))); + $coll->add('foo', new Route('/locale', [], ['locale' => 'EN|FR|DE'])); $matcher = $this->getUrlMatcher($coll); $matcher->match('/en'); @@ -449,10 +449,10 @@ class UrlMatcherTest extends TestCase public function testHostIsCaseInsensitive() { $coll = new RouteCollection(); - $coll->add('foo', new Route('/', array(), array('locale' => 'EN|FR|DE'), array(), '{locale}.example.com')); + $coll->add('foo', new Route('/', [], ['locale' => 'EN|FR|DE'], [], '{locale}.example.com')); $matcher = $this->getUrlMatcher($coll, new RequestContext('', 'GET', 'en.example.com')); - $this->assertEquals(array('_route' => 'foo', 'locale' => 'en'), $matcher->match('/')); + $this->assertEquals(['_route' => 'foo', 'locale' => 'en'], $matcher->match('/')); } /** @@ -485,9 +485,9 @@ class UrlMatcherTest extends TestCase $coll->addCollection($subColl); $matcher = $this->getUrlMatcher($coll); - $this->assertEquals(array('_route' => 'a'), $matcher->match('/p/a')); - $this->assertEquals(array('_route' => 'baz', 'baz' => 'p'), $matcher->match('/p')); - $this->assertEquals(array('_route' => 'buz'), $matcher->match('/prefix/buz')); + $this->assertEquals(['_route' => 'a'], $matcher->match('/p/a')); + $this->assertEquals(['_route' => 'baz', 'baz' => 'p'], $matcher->match('/p')); + $this->assertEquals(['_route' => 'buz'], $matcher->match('/prefix/buz')); } /** @@ -496,12 +496,137 @@ class UrlMatcherTest extends TestCase public function testSchemeAndMethodMismatch() { $coll = new RouteCollection(); - $coll->add('foo', new Route('/', array(), array(), array(), null, array('https'), array('POST'))); + $coll->add('foo', new Route('/', [], [], [], null, ['https'], ['POST'])); $matcher = $this->getUrlMatcher($coll); $matcher->match('/'); } + public function testSiblingRoutes() + { + $coll = new RouteCollection(); + $coll->add('a', (new Route('/a{a}'))->setMethods('POST')); + $coll->add('b', (new Route('/a{a}'))->setMethods('PUT')); + $coll->add('c', new Route('/a{a}')); + $coll->add('d', (new Route('/b{a}'))->setCondition('false')); + $coll->add('e', (new Route('/{b}{a}'))->setCondition('false')); + $coll->add('f', (new Route('/{b}{a}'))->setRequirements(['b' => 'b'])); + + $matcher = $this->getUrlMatcher($coll); + $this->assertEquals(['_route' => 'c', 'a' => 'a'], $matcher->match('/aa')); + $this->assertEquals(['_route' => 'f', 'b' => 'b', 'a' => 'a'], $matcher->match('/ba')); + } + + public function testRequirementWithCapturingGroup() + { + $coll = new RouteCollection(); + $coll->add('a', new Route('/{a}/{b}', [], ['a' => '(a|b)'])); + + $matcher = $this->getUrlMatcher($coll); + $this->assertEquals(['_route' => 'a', 'a' => 'a', 'b' => 'b'], $matcher->match('/a/b')); + } + + public function testDotAllWithCatchAll() + { + $coll = new RouteCollection(); + $coll->add('a', new Route('/{id}.html', [], ['id' => '.+'])); + $coll->add('b', new Route('/{all}', [], ['all' => '.+'])); + + $matcher = $this->getUrlMatcher($coll); + $this->assertEquals(['_route' => 'a', 'id' => 'foo/bar'], $matcher->match('/foo/bar.html')); + } + + public function testHostPattern() + { + $coll = new RouteCollection(); + $coll->add('a', new Route('/{app}/{action}/{unused}', [], [], [], '{host}')); + + $expected = [ + '_route' => 'a', + 'app' => 'an_app', + 'action' => 'an_action', + 'unused' => 'unused', + 'host' => 'foo', + ]; + $matcher = $this->getUrlMatcher($coll, new RequestContext('', 'GET', 'foo')); + $this->assertEquals($expected, $matcher->match('/an_app/an_action/unused')); + } + + public function testHostWithDot() + { + $coll = new RouteCollection(); + $coll->add('a', new Route('/foo', [], [], [], 'foo.example.com')); + $coll->add('b', new Route('/bar/{baz}')); + + $matcher = $this->getUrlMatcher($coll); + $this->assertEquals('b', $matcher->match('/bar/abc.123')['_route']); + } + + public function testSlashVariant() + { + $coll = new RouteCollection(); + $coll->add('a', new Route('/foo/{bar}', [], ['bar' => '.*'])); + + $matcher = $this->getUrlMatcher($coll); + $this->assertEquals('a', $matcher->match('/foo/')['_route']); + } + + public function testSlashWithVerb() + { + $coll = new RouteCollection(); + $coll->add('a', new Route('/{foo}', [], [], [], '', [], ['put', 'delete'])); + $coll->add('b', new Route('/bar/')); + + $matcher = $this->getUrlMatcher($coll); + $this->assertSame(['_route' => 'b'], $matcher->match('/bar/')); + + $coll = new RouteCollection(); + $coll->add('a', new Route('/dav/{foo}', [], ['foo' => '.*'], [], '', [], ['GET', 'OPTIONS'])); + + $matcher = $this->getUrlMatcher($coll, new RequestContext('', 'OPTIONS')); + $expected = [ + '_route' => 'a', + 'foo' => 'files/bar/', + ]; + $this->assertEquals($expected, $matcher->match('/dav/files/bar/')); + } + + public function testSlashAndVerbPrecedence() + { + $coll = new RouteCollection(); + $coll->add('a', new Route('/api/customers/{customerId}/contactpersons/', [], [], [], '', [], ['post'])); + $coll->add('b', new Route('/api/customers/{customerId}/contactpersons', [], [], [], '', [], ['get'])); + + $matcher = $this->getUrlMatcher($coll); + $expected = [ + '_route' => 'b', + 'customerId' => '123', + ]; + $this->assertEquals($expected, $matcher->match('/api/customers/123/contactpersons')); + + $coll = new RouteCollection(); + $coll->add('a', new Route('/api/customers/{customerId}/contactpersons/', [], [], [], '', [], ['get'])); + $coll->add('b', new Route('/api/customers/{customerId}/contactpersons', [], [], [], '', [], ['post'])); + + $matcher = $this->getUrlMatcher($coll, new RequestContext('', 'POST')); + $expected = [ + '_route' => 'b', + 'customerId' => '123', + ]; + $this->assertEquals($expected, $matcher->match('/api/customers/123/contactpersons')); + } + + public function testGreedyTrailingRequirement() + { + $coll = new RouteCollection(); + $coll->add('a', new Route('/{a}', [], ['a' => '.+'])); + + $matcher = $this->getUrlMatcher($coll); + + $this->assertEquals(['_route' => 'a', 'a' => 'foo'], $matcher->match('/foo')); + $this->assertEquals(['_route' => 'a', 'a' => 'foo/'], $matcher->match('/foo/')); + } + protected function getUrlMatcher(RouteCollection $routes, RequestContext $context = null) { return new UrlMatcher($routes, $context ?: new RequestContext()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RequestContextTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RequestContextTest.php index ffe29d1a..3d23b0e8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RequestContextTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RequestContextTest.php @@ -68,16 +68,16 @@ class RequestContextTest extends TestCase public function testGetParameters() { $requestContext = new RequestContext(); - $this->assertEquals(array(), $requestContext->getParameters()); + $this->assertEquals([], $requestContext->getParameters()); - $requestContext->setParameters(array('foo' => 'bar')); - $this->assertEquals(array('foo' => 'bar'), $requestContext->getParameters()); + $requestContext->setParameters(['foo' => 'bar']); + $this->assertEquals(['foo' => 'bar'], $requestContext->getParameters()); } public function testHasParameter() { $requestContext = new RequestContext(); - $requestContext->setParameters(array('foo' => 'bar')); + $requestContext->setParameters(['foo' => 'bar']); $this->assertTrue($requestContext->hasParameter('foo')); $this->assertFalse($requestContext->hasParameter('baz')); @@ -86,7 +86,7 @@ class RequestContextTest extends TestCase public function testGetParameter() { $requestContext = new RequestContext(); - $requestContext->setParameters(array('foo' => 'bar')); + $requestContext->setParameters(['foo' => 'bar']); $this->assertEquals('bar', $requestContext->getParameter('foo')); $this->assertNull($requestContext->getParameter('baz')); @@ -154,7 +154,7 @@ class RequestContextTest extends TestCase $this->assertSame($requestContext, $requestContext->setQueryString('foo=bar')); $this->assertSame($requestContext, $requestContext->setHttpPort(80)); $this->assertSame($requestContext, $requestContext->setHttpsPort(443)); - $this->assertSame($requestContext, $requestContext->setParameters(array())); + $this->assertSame($requestContext, $requestContext->setParameters([])); $this->assertSame($requestContext, $requestContext->setParameter('foo', 'bar')); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php index 76a042d6..20afdff4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php @@ -68,7 +68,7 @@ class RouteCollectionBuilderTest extends TestCase public function testImportAddResources() { - $routeCollectionBuilder = new RouteCollectionBuilder(new YamlFileLoader(new FileLocator(array(__DIR__.'/Fixtures/')))); + $routeCollectionBuilder = new RouteCollectionBuilder(new YamlFileLoader(new FileLocator([__DIR__.'/Fixtures/']))); $routeCollectionBuilder->import('file_resource.yml'); $routeCollection = $routeCollectionBuilder->build(); @@ -131,13 +131,13 @@ class RouteCollectionBuilderTest extends TestCase $this->assertCount(5, $actualCollection); $actualRouteNames = array_keys($actualCollection->all()); - $this->assertEquals(array( + $this->assertEquals([ 'checkout_route', 'imported_route1', 'imported_route2', 'homepage', 'admin_dashboard', - ), $actualRouteNames); + ], $actualRouteNames); // make sure the defaults were set $checkoutRoute = $actualCollection->get('checkout_route'); @@ -154,18 +154,18 @@ class RouteCollectionBuilderTest extends TestCase $collectionBuilder->add('/admin', 'AppBundle:Admin:dashboard', 'admin_dashboard'); // add an unnamed route $collectionBuilder->add('/blogs', 'AppBundle:Blog:list') - ->setMethods(array('GET')); + ->setMethods(['GET']); // integer route names are allowed - they don't confuse things $collectionBuilder->add('/products', 'AppBundle:Product:list', 100); $actualCollection = $collectionBuilder->build(); $actualRouteNames = array_keys($actualCollection->all()); - $this->assertEquals(array( + $this->assertEquals([ 'admin_dashboard', 'GET_blogs', '100', - ), $actualRouteNames); + ], $actualRouteNames); } public function testFlushSetsDetailsOnChildrenRoutes() @@ -183,8 +183,8 @@ class RouteCollectionBuilderTest extends TestCase ->setOption('fooBar', true) ->setHost('example.com') ->setCondition('request.isSecure()') - ->setSchemes(array('https')) - ->setMethods(array('POST')); + ->setSchemes(['https']) + ->setMethods(['POST']); // a simple route, nothing added to it $routes->add('/blogs/{id}', 'editAction', 'blog_edit'); @@ -201,8 +201,8 @@ class RouteCollectionBuilderTest extends TestCase ->setDefault('_locale', 'fr') ->setRequirement('_locale', 'fr|en') ->setOption('niceRoute', true) - ->setSchemes(array('http')) - ->setMethods(array('GET', 'POST')); + ->setSchemes(['http']) + ->setMethods(['GET', 'POST']); $collection = $routes->build(); $actualListRoute = $collection->get('blog_list'); @@ -216,8 +216,8 @@ class RouteCollectionBuilderTest extends TestCase $this->assertTrue($actualListRoute->getOption('fooBar')); $this->assertEquals('example.com', $actualListRoute->getHost()); $this->assertEquals('request.isSecure()', $actualListRoute->getCondition()); - $this->assertEquals(array('https'), $actualListRoute->getSchemes()); - $this->assertEquals(array('POST'), $actualListRoute->getMethods()); + $this->assertEquals(['https'], $actualListRoute->getSchemes()); + $this->assertEquals(['POST'], $actualListRoute->getMethods()); // inherited from the main collection $this->assertEquals('fr', $actualListRoute->getDefault('_locale')); $this->assertEquals('fr|en', $actualListRoute->getRequirement('_locale')); @@ -227,8 +227,8 @@ class RouteCollectionBuilderTest extends TestCase // inherited from the collection $this->assertEquals('symfony.com', $actualEditRoute->getHost()); $this->assertEquals('request.query.get("page")==1', $actualEditRoute->getCondition()); - $this->assertEquals(array('http'), $actualEditRoute->getSchemes()); - $this->assertEquals(array('GET', 'POST'), $actualEditRoute->getMethods()); + $this->assertEquals(['http'], $actualEditRoute->getSchemes()); + $this->assertEquals(['GET', 'POST'], $actualEditRoute->getMethods()); } /** @@ -250,16 +250,16 @@ class RouteCollectionBuilderTest extends TestCase public function providePrefixTests() { - $tests = array(); + $tests = []; // empty prefix is of course ok - $tests[] = array('', '/foo', '/foo'); + $tests[] = ['', '/foo', '/foo']; // normal prefix - does not matter if it's a wildcard - $tests[] = array('/{admin}', '/foo', '/{admin}/foo'); + $tests[] = ['/{admin}', '/foo', '/{admin}/foo']; // shows that a prefix will always be given the starting slash - $tests[] = array('0', '/foo', '/0/foo'); + $tests[] = ['0', '/foo', '/0/foo']; // spaces are ok, and double slahses at the end are cleaned - $tests[] = array('/ /', '/foo', '/ /foo'); + $tests[] = ['/ /', '/foo', '/ /foo']; return $tests; } @@ -323,10 +323,10 @@ class RouteCollectionBuilderTest extends TestCase $accountRoutes = $routes->createBuilder(); // route 2 $accountRoutes->add('/dashboard', '') - ->setMethods(array('GET')); + ->setMethods(['GET']); // route 3 $accountRoutes->add('/dashboard', '') - ->setMethods(array('POST')); + ->setMethods(['POST']); $routes->mount('/admin', $adminRoutes); $routes->mount('/account', $accountRoutes); @@ -351,7 +351,7 @@ class RouteCollectionBuilderTest extends TestCase $loader ->expects($this->any()) ->method('load') - ->will($this->returnValue(array($firstCollection, $secondCollection))); + ->will($this->returnValue([$firstCollection, $secondCollection])); $routeCollectionBuilder = new RouteCollectionBuilder($loader); $routeCollectionBuilder->import('/directory/recurse/*', '/other/', 'glob'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCollectionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCollectionTest.php index 78eb5ba5..2d29d329 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCollectionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCollectionTest.php @@ -23,7 +23,7 @@ class RouteCollectionTest extends TestCase $collection = new RouteCollection(); $route = new Route('/foo'); $collection->add('foo', $route); - $this->assertEquals(array('foo' => $route), $collection->all(), '->add() adds a route'); + $this->assertEquals(['foo' => $route], $collection->all(), '->add() adds a route'); $this->assertEquals($route, $collection->get('foo'), '->get() returns a route by name'); $this->assertNull($collection->get('bar'), '->get() returns null if a route does not exist'); } @@ -67,7 +67,7 @@ class RouteCollectionTest extends TestCase $collection->add('last', $last = new Route('/last')); $this->assertInstanceOf('\ArrayIterator', $collection->getIterator()); - $this->assertSame(array('bar' => $bar, 'foo' => $foo, 'last' => $last), $collection->getIterator()->getArrayCopy()); + $this->assertSame(['bar' => $bar, 'foo' => $foo, 'last' => $last], $collection->getIterator()->getArrayCopy()); } public function testCount() @@ -98,7 +98,7 @@ class RouteCollectionTest extends TestCase $collection->addCollection($collection1); $collection->add('last', $last = new Route('/last')); - $this->assertSame(array('bar' => $bar, 'foo' => $foo, 'grandchild' => $grandchild, 'last' => $last), $collection->all(), + $this->assertSame(['bar' => $bar, 'foo' => $foo, 'grandchild' => $grandchild, 'last' => $last], $collection->all(), '->addCollection() imports routes of another collection, overrides if necessary and adds them at the end'); } @@ -109,7 +109,7 @@ class RouteCollectionTest extends TestCase $collection1 = new RouteCollection(); $collection1->addResource($foo1 = new FileResource(__DIR__.'/Fixtures/foo1.xml')); $collection->addCollection($collection1); - $this->assertEquals(array($foo, $foo1), $collection->getResources(), '->addCollection() merges resources'); + $this->assertEquals([$foo, $foo1], $collection->getResources(), '->addCollection() merges resources'); } public function testAddDefaultsAndRequirementsAndOptions() @@ -118,23 +118,23 @@ class RouteCollectionTest extends TestCase $collection->add('foo', new Route('/{placeholder}')); $collection1 = new RouteCollection(); $collection1->add('bar', new Route('/{placeholder}', - array('_controller' => 'fixed', 'placeholder' => 'default'), array('placeholder' => '.+'), array('option' => 'value')) + ['_controller' => 'fixed', 'placeholder' => 'default'], ['placeholder' => '.+'], ['option' => 'value']) ); $collection->addCollection($collection1); - $collection->addDefaults(array('placeholder' => 'new-default')); - $this->assertEquals(array('placeholder' => 'new-default'), $collection->get('foo')->getDefaults(), '->addDefaults() adds defaults to all routes'); - $this->assertEquals(array('_controller' => 'fixed', 'placeholder' => 'new-default'), $collection->get('bar')->getDefaults(), + $collection->addDefaults(['placeholder' => 'new-default']); + $this->assertEquals(['placeholder' => 'new-default'], $collection->get('foo')->getDefaults(), '->addDefaults() adds defaults to all routes'); + $this->assertEquals(['_controller' => 'fixed', 'placeholder' => 'new-default'], $collection->get('bar')->getDefaults(), '->addDefaults() adds defaults to all routes and overwrites existing ones'); - $collection->addRequirements(array('placeholder' => '\d+')); - $this->assertEquals(array('placeholder' => '\d+'), $collection->get('foo')->getRequirements(), '->addRequirements() adds requirements to all routes'); - $this->assertEquals(array('placeholder' => '\d+'), $collection->get('bar')->getRequirements(), + $collection->addRequirements(['placeholder' => '\d+']); + $this->assertEquals(['placeholder' => '\d+'], $collection->get('foo')->getRequirements(), '->addRequirements() adds requirements to all routes'); + $this->assertEquals(['placeholder' => '\d+'], $collection->get('bar')->getRequirements(), '->addRequirements() adds requirements to all routes and overwrites existing ones'); - $collection->addOptions(array('option' => 'new-value')); + $collection->addOptions(['option' => 'new-value']); $this->assertEquals( - array('option' => 'new-value', 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler'), + ['option' => 'new-value', 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler'], $collection->get('bar')->getOptions(), '->addOptions() adds options to all routes and overwrites existing ones' ); } @@ -148,13 +148,13 @@ class RouteCollectionTest extends TestCase $collection->addCollection($collection2); $collection->addPrefix(' / '); $this->assertSame('/foo', $collection->get('foo')->getPath(), '->addPrefix() trims the prefix and a single slash has no effect'); - $collection->addPrefix('/{admin}', array('admin' => 'admin'), array('admin' => '\d+')); + $collection->addPrefix('/{admin}', ['admin' => 'admin'], ['admin' => '\d+']); $this->assertEquals('/{admin}/foo', $collection->get('foo')->getPath(), '->addPrefix() adds a prefix to all routes'); $this->assertEquals('/{admin}/bar', $collection->get('bar')->getPath(), '->addPrefix() adds a prefix to all routes'); - $this->assertEquals(array('admin' => 'admin'), $collection->get('foo')->getDefaults(), '->addPrefix() adds defaults to all routes'); - $this->assertEquals(array('admin' => 'admin'), $collection->get('bar')->getDefaults(), '->addPrefix() adds defaults to all routes'); - $this->assertEquals(array('admin' => '\d+'), $collection->get('foo')->getRequirements(), '->addPrefix() adds requirements to all routes'); - $this->assertEquals(array('admin' => '\d+'), $collection->get('bar')->getRequirements(), '->addPrefix() adds requirements to all routes'); + $this->assertEquals(['admin' => 'admin'], $collection->get('foo')->getDefaults(), '->addPrefix() adds defaults to all routes'); + $this->assertEquals(['admin' => 'admin'], $collection->get('bar')->getDefaults(), '->addPrefix() adds defaults to all routes'); + $this->assertEquals(['admin' => '\d+'], $collection->get('foo')->getRequirements(), '->addPrefix() adds requirements to all routes'); + $this->assertEquals(['admin' => '\d+'], $collection->get('bar')->getRequirements(), '->addPrefix() adds requirements to all routes'); $collection->addPrefix('0'); $this->assertEquals('/0/{admin}/foo', $collection->get('foo')->getPath(), '->addPrefix() ensures a prefix must start with a slash and must not end with a slash'); $collection->addPrefix('/ /'); @@ -166,8 +166,8 @@ class RouteCollectionTest extends TestCase { $collection = new RouteCollection(); $collection->add('foo', $foo = new Route('/foo.{_format}')); - $collection->add('bar', $bar = new Route('/bar.{_format}', array(), array('_format' => 'json'))); - $collection->addPrefix('/admin', array(), array('_format' => 'html')); + $collection->add('bar', $bar = new Route('/bar.{_format}', [], ['_format' => 'json'])); + $collection->addPrefix('/admin', [], ['_format' => 'html']); $this->assertEquals('html', $collection->get('foo')->getRequirement('_format'), '->addPrefix() overrides existing requirements'); $this->assertEquals('html', $collection->get('bar')->getRequirement('_format'), '->addPrefix() overrides existing requirements'); @@ -180,7 +180,7 @@ class RouteCollectionTest extends TestCase $collection->addResource($bar = new FileResource(__DIR__.'/Fixtures/bar.xml')); $collection->addResource(new FileResource(__DIR__.'/Fixtures/foo.xml')); - $this->assertEquals(array($foo, $bar), $collection->getResources(), + $this->assertEquals([$foo, $bar], $collection->getResources(), '->addResource() adds a resource and getResources() only returns unique ones by comparing the string representation'); } @@ -227,16 +227,16 @@ class RouteCollectionTest extends TestCase $collection->add('last', $last = new Route('/last')); $collection->remove('foo'); - $this->assertSame(array('bar' => $bar, 'last' => $last), $collection->all(), '->remove() can remove a single route'); - $collection->remove(array('bar', 'last')); - $this->assertSame(array(), $collection->all(), '->remove() accepts an array and can remove multiple routes at once'); + $this->assertSame(['bar' => $bar, 'last' => $last], $collection->all(), '->remove() can remove a single route'); + $collection->remove(['bar', 'last']); + $this->assertSame([], $collection->all(), '->remove() accepts an array and can remove multiple routes at once'); } public function testSetHost() { $collection = new RouteCollection(); $routea = new Route('/a'); - $routeb = new Route('/b', array(), array(), array(), '{locale}.example.net'); + $routeb = new Route('/b', [], [], [], '{locale}.example.net'); $collection->add('a', $routea); $collection->add('b', $routeb); @@ -250,7 +250,7 @@ class RouteCollectionTest extends TestCase { $collection = new RouteCollection(); $routea = new Route('/a'); - $routeb = new Route('/b', array(), array(), array(), '{locale}.example.net', array(), array(), 'context.getMethod() == "GET"'); + $routeb = new Route('/b', [], [], [], '{locale}.example.net', [], [], 'context.getMethod() == "GET"'); $collection->add('a', $routea); $collection->add('b', $routeb); @@ -264,7 +264,7 @@ class RouteCollectionTest extends TestCase { $collection = new RouteCollection(); $collection->add('a', new Route('/a')); - $collection->add('b', new Route('/b', array('placeholder' => 'default'), array('placeholder' => '.+'))); + $collection->add('b', new Route('/b', ['placeholder' => 'default'], ['placeholder' => '.+'])); $clonedCollection = clone $collection; @@ -278,28 +278,28 @@ class RouteCollectionTest extends TestCase public function testSetSchemes() { $collection = new RouteCollection(); - $routea = new Route('/a', array(), array(), array(), '', 'http'); + $routea = new Route('/a', [], [], [], '', 'http'); $routeb = new Route('/b'); $collection->add('a', $routea); $collection->add('b', $routeb); - $collection->setSchemes(array('http', 'https')); + $collection->setSchemes(['http', 'https']); - $this->assertEquals(array('http', 'https'), $routea->getSchemes()); - $this->assertEquals(array('http', 'https'), $routeb->getSchemes()); + $this->assertEquals(['http', 'https'], $routea->getSchemes()); + $this->assertEquals(['http', 'https'], $routeb->getSchemes()); } public function testSetMethods() { $collection = new RouteCollection(); - $routea = new Route('/a', array(), array(), array(), '', array(), array('GET', 'POST')); + $routea = new Route('/a', [], [], [], '', [], ['GET', 'POST']); $routeb = new Route('/b'); $collection->add('a', $routea); $collection->add('b', $routeb); $collection->setMethods('PUT'); - $this->assertEquals(array('PUT'), $routea->getMethods()); - $this->assertEquals(array('PUT'), $routeb->getMethods()); + $this->assertEquals(['PUT'], $routea->getMethods()); + $this->assertEquals(['PUT'], $routeb->getMethods()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php index dc304e3e..d9783147 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php @@ -34,153 +34,153 @@ class RouteCompilerTest extends TestCase public function provideCompileData() { - return array( - array( + return [ + [ 'Static route', - array('/foo'), - '/foo', '#^/foo$#sD', array(), array( - array('text', '/foo'), - ), - ), + ['/foo'], + '/foo', '#^/foo$#sD', [], [ + ['text', '/foo'], + ], + ], - array( + [ 'Route with a variable', - array('/foo/{bar}'), - '/foo', '#^/foo/(?P[^/]++)$#sD', array('bar'), array( - array('variable', '/', '[^/]++', 'bar'), - array('text', '/foo'), - ), - ), + ['/foo/{bar}'], + '/foo', '#^/foo/(?P[^/]++)$#sD', ['bar'], [ + ['variable', '/', '[^/]++', 'bar'], + ['text', '/foo'], + ], + ], - array( + [ 'Route with a variable that has a default value', - array('/foo/{bar}', array('bar' => 'bar')), - '/foo', '#^/foo(?:/(?P[^/]++))?$#sD', array('bar'), array( - array('variable', '/', '[^/]++', 'bar'), - array('text', '/foo'), - ), - ), + ['/foo/{bar}', ['bar' => 'bar']], + '/foo', '#^/foo(?:/(?P[^/]++))?$#sD', ['bar'], [ + ['variable', '/', '[^/]++', 'bar'], + ['text', '/foo'], + ], + ], - array( + [ 'Route with several variables', - array('/foo/{bar}/{foobar}'), - '/foo', '#^/foo/(?P[^/]++)/(?P[^/]++)$#sD', array('bar', 'foobar'), array( - array('variable', '/', '[^/]++', 'foobar'), - array('variable', '/', '[^/]++', 'bar'), - array('text', '/foo'), - ), - ), + ['/foo/{bar}/{foobar}'], + '/foo', '#^/foo/(?P[^/]++)/(?P[^/]++)$#sD', ['bar', 'foobar'], [ + ['variable', '/', '[^/]++', 'foobar'], + ['variable', '/', '[^/]++', 'bar'], + ['text', '/foo'], + ], + ], - array( + [ 'Route with several variables that have default values', - array('/foo/{bar}/{foobar}', array('bar' => 'bar', 'foobar' => '')), - '/foo', '#^/foo(?:/(?P[^/]++)(?:/(?P[^/]++))?)?$#sD', array('bar', 'foobar'), array( - array('variable', '/', '[^/]++', 'foobar'), - array('variable', '/', '[^/]++', 'bar'), - array('text', '/foo'), - ), - ), + ['/foo/{bar}/{foobar}', ['bar' => 'bar', 'foobar' => '']], + '/foo', '#^/foo(?:/(?P[^/]++)(?:/(?P[^/]++))?)?$#sD', ['bar', 'foobar'], [ + ['variable', '/', '[^/]++', 'foobar'], + ['variable', '/', '[^/]++', 'bar'], + ['text', '/foo'], + ], + ], - array( + [ 'Route with several variables but some of them have no default values', - array('/foo/{bar}/{foobar}', array('bar' => 'bar')), - '/foo', '#^/foo/(?P[^/]++)/(?P[^/]++)$#sD', array('bar', 'foobar'), array( - array('variable', '/', '[^/]++', 'foobar'), - array('variable', '/', '[^/]++', 'bar'), - array('text', '/foo'), - ), - ), + ['/foo/{bar}/{foobar}', ['bar' => 'bar']], + '/foo', '#^/foo/(?P[^/]++)/(?P[^/]++)$#sD', ['bar', 'foobar'], [ + ['variable', '/', '[^/]++', 'foobar'], + ['variable', '/', '[^/]++', 'bar'], + ['text', '/foo'], + ], + ], - array( + [ 'Route with an optional variable as the first segment', - array('/{bar}', array('bar' => 'bar')), - '', '#^/(?P[^/]++)?$#sD', array('bar'), array( - array('variable', '/', '[^/]++', 'bar'), - ), - ), + ['/{bar}', ['bar' => 'bar']], + '', '#^/(?P[^/]++)?$#sD', ['bar'], [ + ['variable', '/', '[^/]++', 'bar'], + ], + ], - array( + [ 'Route with a requirement of 0', - array('/{bar}', array('bar' => null), array('bar' => '0')), - '', '#^/(?P0)?$#sD', array('bar'), array( - array('variable', '/', '0', 'bar'), - ), - ), + ['/{bar}', ['bar' => null], ['bar' => '0']], + '', '#^/(?P0)?$#sD', ['bar'], [ + ['variable', '/', '0', 'bar'], + ], + ], - array( + [ 'Route with an optional variable as the first segment with requirements', - array('/{bar}', array('bar' => 'bar'), array('bar' => '(foo|bar)')), - '', '#^/(?P(foo|bar))?$#sD', array('bar'), array( - array('variable', '/', '(foo|bar)', 'bar'), - ), - ), + ['/{bar}', ['bar' => 'bar'], ['bar' => '(foo|bar)']], + '', '#^/(?P(foo|bar))?$#sD', ['bar'], [ + ['variable', '/', '(foo|bar)', 'bar'], + ], + ], - array( + [ 'Route with only optional variables', - array('/{foo}/{bar}', array('foo' => 'foo', 'bar' => 'bar')), - '', '#^/(?P[^/]++)?(?:/(?P[^/]++))?$#sD', array('foo', 'bar'), array( - array('variable', '/', '[^/]++', 'bar'), - array('variable', '/', '[^/]++', 'foo'), - ), - ), + ['/{foo}/{bar}', ['foo' => 'foo', 'bar' => 'bar']], + '', '#^/(?P[^/]++)?(?:/(?P[^/]++))?$#sD', ['foo', 'bar'], [ + ['variable', '/', '[^/]++', 'bar'], + ['variable', '/', '[^/]++', 'foo'], + ], + ], - array( + [ 'Route with a variable in last position', - array('/foo-{bar}'), - '/foo-', '#^/foo\-(?P[^/]++)$#sD', array('bar'), array( - array('variable', '-', '[^/]++', 'bar'), - array('text', '/foo'), - ), - ), + ['/foo-{bar}'], + '/foo-', '#^/foo\-(?P[^/]++)$#sD', ['bar'], [ + ['variable', '-', '[^/]++', 'bar'], + ['text', '/foo'], + ], + ], - array( + [ 'Route with nested placeholders', - array('/{static{var}static}'), - '/{static', '#^/\{static(?P[^/]+)static\}$#sD', array('var'), array( - array('text', 'static}'), - array('variable', '', '[^/]+', 'var'), - array('text', '/{static'), - ), - ), + ['/{static{var}static}'], + '/{static', '#^/\{static(?P[^/]+)static\}$#sD', ['var'], [ + ['text', 'static}'], + ['variable', '', '[^/]+', 'var'], + ['text', '/{static'], + ], + ], - array( + [ 'Route without separator between variables', - array('/{w}{x}{y}{z}.{_format}', array('z' => 'default-z', '_format' => 'html'), array('y' => '(y|Y)')), - '', '#^/(?P[^/\.]+)(?P[^/\.]+)(?P(y|Y))(?:(?P[^/\.]++)(?:\.(?P<_format>[^/]++))?)?$#sD', array('w', 'x', 'y', 'z', '_format'), array( - array('variable', '.', '[^/]++', '_format'), - array('variable', '', '[^/\.]++', 'z'), - array('variable', '', '(y|Y)', 'y'), - array('variable', '', '[^/\.]+', 'x'), - array('variable', '/', '[^/\.]+', 'w'), - ), - ), + ['/{w}{x}{y}{z}.{_format}', ['z' => 'default-z', '_format' => 'html'], ['y' => '(y|Y)']], + '', '#^/(?P[^/\.]+)(?P[^/\.]+)(?P(y|Y))(?:(?P[^/\.]++)(?:\.(?P<_format>[^/]++))?)?$#sD', ['w', 'x', 'y', 'z', '_format'], [ + ['variable', '.', '[^/]++', '_format'], + ['variable', '', '[^/\.]++', 'z'], + ['variable', '', '(y|Y)', 'y'], + ['variable', '', '[^/\.]+', 'x'], + ['variable', '/', '[^/\.]+', 'w'], + ], + ], - array( + [ 'Route with a format', - array('/foo/{bar}.{_format}'), - '/foo', '#^/foo/(?P[^/\.]++)\.(?P<_format>[^/]++)$#sD', array('bar', '_format'), array( - array('variable', '.', '[^/]++', '_format'), - array('variable', '/', '[^/\.]++', 'bar'), - array('text', '/foo'), - ), - ), + ['/foo/{bar}.{_format}'], + '/foo', '#^/foo/(?P[^/\.]++)\.(?P<_format>[^/]++)$#sD', ['bar', '_format'], [ + ['variable', '.', '[^/]++', '_format'], + ['variable', '/', '[^/\.]++', 'bar'], + ['text', '/foo'], + ], + ], - array( + [ 'Static non UTF-8 route', - array("/fo\xE9"), - "/fo\xE9", "#^/fo\xE9$#sD", array(), array( - array('text', "/fo\xE9"), - ), - ), + ["/fo\xE9"], + "/fo\xE9", "#^/fo\xE9$#sD", [], [ + ['text', "/fo\xE9"], + ], + ], - array( + [ 'Route with an explicit UTF-8 requirement', - array('/{bar}', array('bar' => null), array('bar' => '.'), array('utf8' => true)), - '', '#^/(?P.)?$#sDu', array('bar'), array( - array('variable', '/', '.', 'bar', true), - ), - ), - ); + ['/{bar}', ['bar' => null], ['bar' => '.'], ['utf8' => true]], + '', '#^/(?P.)?$#sDu', ['bar'], [ + ['variable', '/', '.', 'bar', true], + ], + ], + ]; } /** @@ -202,45 +202,45 @@ class RouteCompilerTest extends TestCase public function provideCompileImplicitUtf8Data() { - return array( - array( + return [ + [ 'Static UTF-8 route', - array('/foé'), - '/foé', '#^/foé$#sDu', array(), array( - array('text', '/foé'), - ), + ['/foé'], + '/foé', '#^/foé$#sDu', [], [ + ['text', '/foé'], + ], 'patterns', - ), + ], - array( + [ 'Route with an implicit UTF-8 requirement', - array('/{bar}', array('bar' => null), array('bar' => 'é')), - '', '#^/(?Pé)?$#sDu', array('bar'), array( - array('variable', '/', 'é', 'bar', true), - ), + ['/{bar}', ['bar' => null], ['bar' => 'é']], + '', '#^/(?Pé)?$#sDu', ['bar'], [ + ['variable', '/', 'é', 'bar', true], + ], 'requirements', - ), + ], - array( + [ 'Route with a UTF-8 class requirement', - array('/{bar}', array('bar' => null), array('bar' => '\pM')), - '', '#^/(?P\pM)?$#sDu', array('bar'), array( - array('variable', '/', '\pM', 'bar', true), - ), + ['/{bar}', ['bar' => null], ['bar' => '\pM']], + '', '#^/(?P\pM)?$#sDu', ['bar'], [ + ['variable', '/', '\pM', 'bar', true], + ], 'requirements', - ), + ], - array( + [ 'Route with a UTF-8 separator', - array('/foo/{bar}§{_format}', array(), array(), array('compiler_class' => Utf8RouteCompiler::class)), - '/foo', '#^/foo/(?P[^/§]++)§(?P<_format>[^/]++)$#sDu', array('bar', '_format'), array( - array('variable', '§', '[^/]++', '_format', true), - array('variable', '/', '[^/§]++', 'bar', true), - array('text', '/foo'), - ), + ['/foo/{bar}§{_format}', [], [], ['compiler_class' => Utf8RouteCompiler::class]], + '/foo', '#^/foo/(?P[^/§]++)§(?P<_format>[^/]++)$#sDu', ['bar', '_format'], [ + ['variable', '§', '[^/]++', '_format', true], + ['variable', '/', '[^/§]++', 'bar', true], + ['text', '/foo'], + ], 'patterns', - ), - ); + ], + ]; } /** @@ -258,7 +258,7 @@ class RouteCompilerTest extends TestCase */ public function testRouteCharsetMismatch() { - $route = new Route("/\xE9/{bar}", array(), array('bar' => '.'), array('utf8' => true)); + $route = new Route("/\xE9/{bar}", [], ['bar' => '.'], ['utf8' => true]); $compiled = $route->compile(); } @@ -268,7 +268,7 @@ class RouteCompilerTest extends TestCase */ public function testRequirementCharsetMismatch() { - $route = new Route('/foo/{bar}', array(), array('bar' => "\xE9"), array('utf8' => true)); + $route = new Route('/foo/{bar}', [], ['bar' => "\xE9"], ['utf8' => true]); $compiled = $route->compile(); } @@ -295,11 +295,11 @@ class RouteCompilerTest extends TestCase public function getVariableNamesStartingWithADigit() { - return array( - array('09'), - array('123'), - array('1e2'), - ); + return [ + ['09'], + ['123'], + ['1e2'], + ]; } /** @@ -312,65 +312,65 @@ class RouteCompilerTest extends TestCase $compiled = $route->compile(); $this->assertEquals($prefix, $compiled->getStaticPrefix(), $name.' (static prefix)'); - $this->assertEquals($regex, str_replace(array("\n", ' '), '', $compiled->getRegex()), $name.' (regex)'); + $this->assertEquals($regex, str_replace(["\n", ' '], '', $compiled->getRegex()), $name.' (regex)'); $this->assertEquals($variables, $compiled->getVariables(), $name.' (variables)'); $this->assertEquals($pathVariables, $compiled->getPathVariables(), $name.' (path variables)'); $this->assertEquals($tokens, $compiled->getTokens(), $name.' (tokens)'); - $this->assertEquals($hostRegex, str_replace(array("\n", ' '), '', $compiled->getHostRegex()), $name.' (host regex)'); + $this->assertEquals($hostRegex, str_replace(["\n", ' '], '', $compiled->getHostRegex()), $name.' (host regex)'); $this->assertEquals($hostVariables, $compiled->getHostVariables(), $name.' (host variables)'); $this->assertEquals($hostTokens, $compiled->getHostTokens(), $name.' (host tokens)'); } public function provideCompileWithHostData() { - return array( - array( + return [ + [ 'Route with host pattern', - array('/hello', array(), array(), array(), 'www.example.com'), - '/hello', '#^/hello$#sD', array(), array(), array( - array('text', '/hello'), - ), - '#^www\.example\.com$#sDi', array(), array( - array('text', 'www.example.com'), - ), - ), - array( + ['/hello', [], [], [], 'www.example.com'], + '/hello', '#^/hello$#sD', [], [], [ + ['text', '/hello'], + ], + '#^www\.example\.com$#sDi', [], [ + ['text', 'www.example.com'], + ], + ], + [ 'Route with host pattern and some variables', - array('/hello/{name}', array(), array(), array(), 'www.example.{tld}'), - '/hello', '#^/hello/(?P[^/]++)$#sD', array('tld', 'name'), array('name'), array( - array('variable', '/', '[^/]++', 'name'), - array('text', '/hello'), - ), - '#^www\.example\.(?P[^\.]++)$#sDi', array('tld'), array( - array('variable', '.', '[^\.]++', 'tld'), - array('text', 'www.example'), - ), - ), - array( + ['/hello/{name}', [], [], [], 'www.example.{tld}'], + '/hello', '#^/hello/(?P[^/]++)$#sD', ['tld', 'name'], ['name'], [ + ['variable', '/', '[^/]++', 'name'], + ['text', '/hello'], + ], + '#^www\.example\.(?P[^\.]++)$#sDi', ['tld'], [ + ['variable', '.', '[^\.]++', 'tld'], + ['text', 'www.example'], + ], + ], + [ 'Route with variable at beginning of host', - array('/hello', array(), array(), array(), '{locale}.example.{tld}'), - '/hello', '#^/hello$#sD', array('locale', 'tld'), array(), array( - array('text', '/hello'), - ), - '#^(?P[^\.]++)\.example\.(?P[^\.]++)$#sDi', array('locale', 'tld'), array( - array('variable', '.', '[^\.]++', 'tld'), - array('text', '.example'), - array('variable', '', '[^\.]++', 'locale'), - ), - ), - array( + ['/hello', [], [], [], '{locale}.example.{tld}'], + '/hello', '#^/hello$#sD', ['locale', 'tld'], [], [ + ['text', '/hello'], + ], + '#^(?P[^\.]++)\.example\.(?P[^\.]++)$#sDi', ['locale', 'tld'], [ + ['variable', '.', '[^\.]++', 'tld'], + ['text', '.example'], + ['variable', '', '[^\.]++', 'locale'], + ], + ], + [ 'Route with host variables that has a default value', - array('/hello', array('locale' => 'a', 'tld' => 'b'), array(), array(), '{locale}.example.{tld}'), - '/hello', '#^/hello$#sD', array('locale', 'tld'), array(), array( - array('text', '/hello'), - ), - '#^(?P[^\.]++)\.example\.(?P[^\.]++)$#sDi', array('locale', 'tld'), array( - array('variable', '.', '[^\.]++', 'tld'), - array('text', '.example'), - array('variable', '', '[^\.]++', 'locale'), - ), - ), - ); + ['/hello', ['locale' => 'a', 'tld' => 'b'], [], [], '{locale}.example.{tld}'], + '/hello', '#^/hello$#sD', ['locale', 'tld'], [], [ + ['text', '/hello'], + ], + '#^(?P[^\.]++)\.example\.(?P[^\.]++)$#sDi', ['locale', 'tld'], [ + ['variable', '.', '[^\.]++', 'tld'], + ['text', '.example'], + ['variable', '', '[^\.]++', 'locale'], + ], + ], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteTest.php index c7af058e..179f4880 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteTest.php @@ -18,21 +18,21 @@ class RouteTest extends TestCase { public function testConstructor() { - $route = new Route('/{foo}', array('foo' => 'bar'), array('foo' => '\d+'), array('foo' => 'bar'), '{locale}.example.com'); + $route = new Route('/{foo}', ['foo' => 'bar'], ['foo' => '\d+'], ['foo' => 'bar'], '{locale}.example.com'); $this->assertEquals('/{foo}', $route->getPath(), '__construct() takes a path as its first argument'); - $this->assertEquals(array('foo' => 'bar'), $route->getDefaults(), '__construct() takes defaults as its second argument'); - $this->assertEquals(array('foo' => '\d+'), $route->getRequirements(), '__construct() takes requirements as its third argument'); + $this->assertEquals(['foo' => 'bar'], $route->getDefaults(), '__construct() takes defaults as its second argument'); + $this->assertEquals(['foo' => '\d+'], $route->getRequirements(), '__construct() takes requirements as its third argument'); $this->assertEquals('bar', $route->getOption('foo'), '__construct() takes options as its fourth argument'); $this->assertEquals('{locale}.example.com', $route->getHost(), '__construct() takes a host pattern as its fifth argument'); - $route = new Route('/', array(), array(), array(), '', array('Https'), array('POST', 'put'), 'context.getMethod() == "GET"'); - $this->assertEquals(array('https'), $route->getSchemes(), '__construct() takes schemes as its sixth argument and lowercases it'); - $this->assertEquals(array('POST', 'PUT'), $route->getMethods(), '__construct() takes methods as its seventh argument and uppercases it'); + $route = new Route('/', [], [], [], '', ['Https'], ['POST', 'put'], 'context.getMethod() == "GET"'); + $this->assertEquals(['https'], $route->getSchemes(), '__construct() takes schemes as its sixth argument and lowercases it'); + $this->assertEquals(['POST', 'PUT'], $route->getMethods(), '__construct() takes methods as its seventh argument and uppercases it'); $this->assertEquals('context.getMethod() == "GET"', $route->getCondition(), '__construct() takes a condition as its eight argument'); - $route = new Route('/', array(), array(), array(), '', 'Https', 'Post'); - $this->assertEquals(array('https'), $route->getSchemes(), '__construct() takes a single scheme as its sixth argument'); - $this->assertEquals(array('POST'), $route->getMethods(), '__construct() takes a single method as its seventh argument'); + $route = new Route('/', [], [], [], '', 'Https', 'Post'); + $this->assertEquals(['https'], $route->getSchemes(), '__construct() takes a single scheme as its sixth argument'); + $this->assertEquals(['POST'], $route->getMethods(), '__construct() takes a single method as its seventh argument'); } public function testPath() @@ -52,16 +52,16 @@ class RouteTest extends TestCase public function testOptions() { $route = new Route('/{foo}'); - $route->setOptions(array('foo' => 'bar')); - $this->assertEquals(array_merge(array( + $route->setOptions(['foo' => 'bar']); + $this->assertEquals(array_merge([ 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler', - ), array('foo' => 'bar')), $route->getOptions(), '->setOptions() sets the options'); - $this->assertEquals($route, $route->setOptions(array()), '->setOptions() implements a fluent interface'); + ], ['foo' => 'bar']), $route->getOptions(), '->setOptions() sets the options'); + $this->assertEquals($route, $route->setOptions([]), '->setOptions() implements a fluent interface'); - $route->setOptions(array('foo' => 'foo')); - $route->addOptions(array('bar' => 'bar')); - $this->assertEquals($route, $route->addOptions(array()), '->addOptions() implements a fluent interface'); - $this->assertEquals(array('foo' => 'foo', 'bar' => 'bar', 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler'), $route->getOptions(), '->addDefaults() keep previous defaults'); + $route->setOptions(['foo' => 'foo']); + $route->addOptions(['bar' => 'bar']); + $this->assertEquals($route, $route->addOptions([]), '->addOptions() implements a fluent interface'); + $this->assertEquals(['foo' => 'foo', 'bar' => 'bar', 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler'], $route->getOptions(), '->addDefaults() keep previous defaults'); } public function testOption() @@ -76,9 +76,9 @@ class RouteTest extends TestCase public function testDefaults() { $route = new Route('/{foo}'); - $route->setDefaults(array('foo' => 'bar')); - $this->assertEquals(array('foo' => 'bar'), $route->getDefaults(), '->setDefaults() sets the defaults'); - $this->assertEquals($route, $route->setDefaults(array()), '->setDefaults() implements a fluent interface'); + $route->setDefaults(['foo' => 'bar']); + $this->assertEquals(['foo' => 'bar'], $route->getDefaults(), '->setDefaults() sets the defaults'); + $this->assertEquals($route, $route->setDefaults([]), '->setDefaults() implements a fluent interface'); $route->setDefault('foo', 'bar'); $this->assertEquals('bar', $route->getDefault('foo'), '->setDefault() sets a default value'); @@ -90,27 +90,27 @@ class RouteTest extends TestCase $route->setDefault('_controller', $closure = function () { return 'Hello'; }); $this->assertEquals($closure, $route->getDefault('_controller'), '->setDefault() sets a default value'); - $route->setDefaults(array('foo' => 'foo')); - $route->addDefaults(array('bar' => 'bar')); - $this->assertEquals($route, $route->addDefaults(array()), '->addDefaults() implements a fluent interface'); - $this->assertEquals(array('foo' => 'foo', 'bar' => 'bar'), $route->getDefaults(), '->addDefaults() keep previous defaults'); + $route->setDefaults(['foo' => 'foo']); + $route->addDefaults(['bar' => 'bar']); + $this->assertEquals($route, $route->addDefaults([]), '->addDefaults() implements a fluent interface'); + $this->assertEquals(['foo' => 'foo', 'bar' => 'bar'], $route->getDefaults(), '->addDefaults() keep previous defaults'); } public function testRequirements() { $route = new Route('/{foo}'); - $route->setRequirements(array('foo' => '\d+')); - $this->assertEquals(array('foo' => '\d+'), $route->getRequirements(), '->setRequirements() sets the requirements'); + $route->setRequirements(['foo' => '\d+']); + $this->assertEquals(['foo' => '\d+'], $route->getRequirements(), '->setRequirements() sets the requirements'); $this->assertEquals('\d+', $route->getRequirement('foo'), '->getRequirement() returns a requirement'); $this->assertNull($route->getRequirement('bar'), '->getRequirement() returns null if a requirement is not defined'); - $route->setRequirements(array('foo' => '^\d+$')); + $route->setRequirements(['foo' => '^\d+$']); $this->assertEquals('\d+', $route->getRequirement('foo'), '->getRequirement() removes ^ and $ from the path'); - $this->assertEquals($route, $route->setRequirements(array()), '->setRequirements() implements a fluent interface'); + $this->assertEquals($route, $route->setRequirements([]), '->setRequirements() implements a fluent interface'); - $route->setRequirements(array('foo' => '\d+')); - $route->addRequirements(array('bar' => '\d+')); - $this->assertEquals($route, $route->addRequirements(array()), '->addRequirements() implements a fluent interface'); - $this->assertEquals(array('foo' => '\d+', 'bar' => '\d+'), $route->getRequirements(), '->addRequirement() keep previous requirements'); + $route->setRequirements(['foo' => '\d+']); + $route->addRequirements(['bar' => '\d+']); + $this->assertEquals($route, $route->addRequirements([]), '->addRequirements() implements a fluent interface'); + $this->assertEquals(['foo' => '\d+', 'bar' => '\d+'], $route->getRequirements(), '->addRequirement() keep previous requirements'); } public function testRequirement() @@ -134,13 +134,13 @@ class RouteTest extends TestCase public function getInvalidRequirements() { - return array( - array(''), - array(array()), - array('^$'), - array('^'), - array('$'), - ); + return [ + [''], + [[]], + ['^$'], + ['^'], + ['$'], + ]; } public function testHost() @@ -153,14 +153,14 @@ class RouteTest extends TestCase public function testScheme() { $route = new Route('/'); - $this->assertEquals(array(), $route->getSchemes(), 'schemes is initialized with array()'); + $this->assertEquals([], $route->getSchemes(), 'schemes is initialized with []'); $this->assertFalse($route->hasScheme('http')); $route->setSchemes('hTTp'); - $this->assertEquals(array('http'), $route->getSchemes(), '->setSchemes() accepts a single scheme string and lowercases it'); + $this->assertEquals(['http'], $route->getSchemes(), '->setSchemes() accepts a single scheme string and lowercases it'); $this->assertTrue($route->hasScheme('htTp')); $this->assertFalse($route->hasScheme('httpS')); - $route->setSchemes(array('HttpS', 'hTTp')); - $this->assertEquals(array('https', 'http'), $route->getSchemes(), '->setSchemes() accepts an array of schemes and lowercases them'); + $route->setSchemes(['HttpS', 'hTTp']); + $this->assertEquals(['https', 'http'], $route->getSchemes(), '->setSchemes() accepts an array of schemes and lowercases them'); $this->assertTrue($route->hasScheme('htTp')); $this->assertTrue($route->hasScheme('httpS')); } @@ -168,11 +168,11 @@ class RouteTest extends TestCase public function testMethod() { $route = new Route('/'); - $this->assertEquals(array(), $route->getMethods(), 'methods is initialized with array()'); + $this->assertEquals([], $route->getMethods(), 'methods is initialized with []'); $route->setMethods('gEt'); - $this->assertEquals(array('GET'), $route->getMethods(), '->setMethods() accepts a single method string and uppercases it'); - $route->setMethods(array('gEt', 'PosT')); - $this->assertEquals(array('GET', 'POST'), $route->getMethods(), '->setMethods() accepts an array of methods and uppercases them'); + $this->assertEquals(['GET'], $route->getMethods(), '->setMethods() accepts a single method string and uppercases it'); + $route->setMethods(['gEt', 'PosT']); + $this->assertEquals(['GET', 'POST'], $route->getMethods(), '->setMethods() accepts an array of methods and uppercases them'); } public function testCondition() @@ -194,7 +194,7 @@ class RouteTest extends TestCase public function testSerialize() { - $route = new Route('/prefix/{foo}', array('foo' => 'default'), array('foo' => '\d+')); + $route = new Route('/prefix/{foo}', ['foo' => 'default'], ['foo' => '\d+']); $serialized = serialize($route); $unserialized = unserialize($serialized); @@ -209,7 +209,7 @@ class RouteTest extends TestCase */ public function testSerializeWhenCompiled() { - $route = new Route('/prefix/{foo}', array('foo' => 'default'), array('foo' => '\d+')); + $route = new Route('/prefix/{foo}', ['foo' => 'default'], ['foo' => '\d+']); $route->setHost('{locale}.example.net'); $route->compile(); @@ -226,7 +226,7 @@ class RouteTest extends TestCase */ public function testSerializeWhenCompiledWithClass() { - $route = new Route('/', array(), array(), array('compiler_class' => '\Symfony\Component\Routing\Tests\Fixtures\CustomRouteCompiler')); + $route = new Route('/', [], [], ['compiler_class' => '\Symfony\Component\Routing\Tests\Fixtures\CustomRouteCompiler']); $this->assertInstanceOf('\Symfony\Component\Routing\Tests\Fixtures\CustomCompiledRoute', $route->compile(), '->compile() returned a proper route'); $serialized = serialize($route); @@ -248,7 +248,7 @@ class RouteTest extends TestCase $serialized = 'C:31:"Symfony\Component\Routing\Route":936:{a:8:{s:4:"path";s:13:"/prefix/{foo}";s:4:"host";s:20:"{locale}.example.net";s:8:"defaults";a:1:{s:3:"foo";s:7:"default";}s:12:"requirements";a:1:{s:3:"foo";s:3:"\d+";}s:7:"options";a:1:{s:14:"compiler_class";s:39:"Symfony\Component\Routing\RouteCompiler";}s:7:"schemes";a:0:{}s:7:"methods";a:0:{}s:8:"compiled";C:39:"Symfony\Component\Routing\CompiledRoute":571:{a:8:{s:4:"vars";a:2:{i:0;s:6:"locale";i:1;s:3:"foo";}s:11:"path_prefix";s:7:"/prefix";s:10:"path_regex";s:31:"#^/prefix(?:/(?P\d+))?$#sD";s:11:"path_tokens";a:2:{i:0;a:4:{i:0;s:8:"variable";i:1;s:1:"/";i:2;s:3:"\d+";i:3;s:3:"foo";}i:1;a:2:{i:0;s:4:"text";i:1;s:7:"/prefix";}}s:9:"path_vars";a:1:{i:0;s:3:"foo";}s:10:"host_regex";s:40:"#^(?P[^\.]++)\.example\.net$#sDi";s:11:"host_tokens";a:2:{i:0;a:2:{i:0;s:4:"text";i:1;s:12:".example.net";}i:1;a:4:{i:0;s:8:"variable";i:1;s:0:"";i:2;s:7:"[^\.]++";i:3;s:6:"locale";}}s:9:"host_vars";a:1:{i:0;s:6:"locale";}}}}}'; $unserialized = unserialize($serialized); - $route = new Route('/prefix/{foo}', array('foo' => 'default'), array('foo' => '\d+')); + $route = new Route('/prefix/{foo}', ['foo' => 'default'], ['foo' => '\d+']); $route->setHost('{locale}.example.net'); $route->compile(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouterTest.php index e01bd9c6..589ce540 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouterTest.php @@ -30,11 +30,11 @@ class RouterTest extends TestCase public function testSetOptionsWithSupportedOptions() { - $this->router->setOptions(array( + $this->router->setOptions([ 'cache_dir' => './cache', 'debug' => true, 'resource_type' => 'ResourceType', - )); + ]); $this->assertSame('./cache', $this->router->getOption('cache_dir')); $this->assertTrue($this->router->getOption('debug')); @@ -47,12 +47,12 @@ class RouterTest extends TestCase */ public function testSetOptionsWithUnsupportedOptions() { - $this->router->setOptions(array( + $this->router->setOptions([ 'cache_dir' => './cache', 'option_foo' => true, 'option_bar' => 'baz', 'resource_type' => 'ResourceType', - )); + ]); } public function testSetOptionWithSupportedOption() @@ -109,10 +109,10 @@ class RouterTest extends TestCase public function provideMatcherOptionsPreventingCaching() { - return array( - array('cache_dir'), - array('matcher_cache_class'), - ); + return [ + ['cache_dir'], + ['matcher_cache_class'], + ]; } /** @@ -131,10 +131,10 @@ class RouterTest extends TestCase public function provideGeneratorOptionsPreventingCaching() { - return array( - array('cache_dir'), - array('generator_cache_class'), - ); + return [ + ['cache_dir'], + ['generator_cache_class'], + ]; } public function testMatchRequestWithUrlMatcherInterface() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProvider.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProvider.php index 719d7a16..71e3b6a8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProvider.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProvider.php @@ -20,7 +20,7 @@ use Symfony\Component\Security\Core\Exception\TokenNotFoundException; */ class InMemoryTokenProvider implements TokenProviderInterface { - private $tokens = array(); + private $tokens = []; /** * {@inheritdoc} diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php index 516a61fe..f3f5b4e5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php @@ -26,16 +26,16 @@ use Symfony\Component\Security\Core\User\UserInterface; abstract class AbstractToken implements TokenInterface { private $user; - private $roles = array(); + private $roles = []; private $authenticated = false; - private $attributes = array(); + private $attributes = []; /** * @param (RoleInterface|string)[] $roles An array of roles * * @throws \InvalidArgumentException */ - public function __construct(array $roles = array()) + public function __construct(array $roles = []) { foreach ($roles as $role) { if (\is_string($role)) { @@ -137,14 +137,9 @@ abstract class AbstractToken implements TokenInterface */ public function serialize() { - return serialize( - array( - \is_object($this->user) ? clone $this->user : $this->user, - $this->authenticated, - array_map(function ($role) { return clone $role; }, $this->roles), - $this->attributes, - ) - ); + $serialized = [$this->user, $this->authenticated, $this->roles, $this->attributes]; + + return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null); } /** @@ -152,7 +147,7 @@ abstract class AbstractToken implements TokenInterface */ public function unserialize($serialized) { - list($this->user, $this->authenticated, $this->roles, $this->attributes) = unserialize($serialized); + list($this->user, $this->authenticated, $this->roles, $this->attributes) = \is_array($serialized) ? $serialized : unserialize($serialized); } /** @@ -184,7 +179,7 @@ abstract class AbstractToken implements TokenInterface */ public function hasAttribute($name) { - return array_key_exists($name, $this->attributes); + return \array_key_exists($name, $this->attributes); } /** @@ -198,7 +193,7 @@ abstract class AbstractToken implements TokenInterface */ public function getAttribute($name) { - if (!array_key_exists($name, $this->attributes)) { + if (!\array_key_exists($name, $this->attributes)) { throw new \InvalidArgumentException(sprintf('This token has no "%s" attribute.', $name)); } @@ -224,7 +219,7 @@ abstract class AbstractToken implements TokenInterface $class = \get_class($this); $class = substr($class, strrpos($class, '\\') + 1); - $roles = array(); + $roles = []; foreach ($this->roles as $role) { $roles[] = $role->getRole(); } @@ -232,6 +227,19 @@ abstract class AbstractToken implements TokenInterface return sprintf('%s(user="%s", authenticated=%s, roles="%s")', $class, $this->getUsername(), json_encode($this->authenticated), implode(', ', $roles)); } + /** + * @internal + */ + protected function doSerialize($serialized, $isCalledFromOverridingMethod) + { + if (null === $isCalledFromOverridingMethod) { + $trace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 3); + $isCalledFromOverridingMethod = isset($trace[2]['function'], $trace[2]['object']) && 'serialize' === $trace[2]['function'] && $this === $trace[2]['object']; + } + + return $isCalledFromOverridingMethod ? $serialized : serialize($serialized); + } + private function hasUserChanged(UserInterface $user) { if (!($this->user instanceof UserInterface)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php index 3c93664e..1ee85363 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php @@ -27,7 +27,7 @@ class AnonymousToken extends AbstractToken * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string * @param Role[] $roles An array of roles */ - public function __construct($secret, $user, array $roles = array()) + public function __construct($secret, $user, array $roles = []) { parent::__construct($roles); @@ -59,7 +59,9 @@ class AnonymousToken extends AbstractToken */ public function serialize() { - return serialize(array($this->secret, parent::serialize())); + $serialized = [$this->secret, parent::serialize(true)]; + + return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null); } /** @@ -67,7 +69,7 @@ class AnonymousToken extends AbstractToken */ public function unserialize($serialized) { - list($this->secret, $parentStr) = unserialize($serialized); + list($this->secret, $parentStr) = \is_array($serialized) ? $serialized : unserialize($serialized); parent::unserialize($parentStr); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php index 84fdb4b0..ddad0a53 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php @@ -29,7 +29,7 @@ class PreAuthenticatedToken extends AbstractToken * @param string $providerKey The provider key * @param (RoleInterface|string)[] $roles An array of roles */ - public function __construct($user, $credentials, $providerKey, array $roles = array()) + public function __construct($user, $credentials, $providerKey, array $roles = []) { parent::__construct($roles); @@ -79,7 +79,9 @@ class PreAuthenticatedToken extends AbstractToken */ public function serialize() { - return serialize(array($this->credentials, $this->providerKey, parent::serialize())); + $serialized = [$this->credentials, $this->providerKey, parent::serialize(true)]; + + return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null); } /** @@ -87,7 +89,7 @@ class PreAuthenticatedToken extends AbstractToken */ public function unserialize($str) { - list($this->credentials, $this->providerKey, $parentStr) = unserialize($str); + list($this->credentials, $this->providerKey, $parentStr) = \is_array($str) ? $str : unserialize($str); parent::unserialize($parentStr); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php index 4130a437..031e4c6b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php @@ -94,11 +94,9 @@ class RememberMeToken extends AbstractToken */ public function serialize() { - return serialize(array( - $this->secret, - $this->providerKey, - parent::serialize(), - )); + $serialized = [$this->secret, $this->providerKey, parent::serialize(true)]; + + return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null); } /** @@ -106,7 +104,7 @@ class RememberMeToken extends AbstractToken */ public function unserialize($serialized) { - list($this->secret, $this->providerKey, $parentStr) = unserialize($serialized); + list($this->secret, $this->providerKey, $parentStr) = \is_array($serialized) ? $serialized : unserialize($serialized); parent::unserialize($parentStr); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php index 2df1472d..3c052722 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php @@ -31,7 +31,7 @@ class UsernamePasswordToken extends AbstractToken * * @throws \InvalidArgumentException */ - public function __construct($user, $credentials, $providerKey, array $roles = array()) + public function __construct($user, $credentials, $providerKey, array $roles = []) { parent::__construct($roles); @@ -91,7 +91,9 @@ class UsernamePasswordToken extends AbstractToken */ public function serialize() { - return serialize(array($this->credentials, $this->providerKey, parent::serialize())); + $serialized = [$this->credentials, $this->providerKey, parent::serialize(true)]; + + return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null); } /** @@ -99,7 +101,7 @@ class UsernamePasswordToken extends AbstractToken */ public function unserialize($serialized) { - list($this->credentials, $this->providerKey, $parentStr) = unserialize($serialized); + list($this->credentials, $this->providerKey, $parentStr) = \is_array($serialized) ? $serialized : unserialize($serialized); parent::unserialize($parentStr); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php index 3ead6dfe..82e7cd45 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php @@ -40,10 +40,10 @@ class AccessDecisionManager implements AccessDecisionManagerInterface * * @throws \InvalidArgumentException */ - public function __construct($voters = array(), $strategy = self::STRATEGY_AFFIRMATIVE, $allowIfAllAbstainDecisions = false, $allowIfEqualGrantedDeniedDecisions = true) + public function __construct($voters = [], $strategy = self::STRATEGY_AFFIRMATIVE, $allowIfAllAbstainDecisions = false, $allowIfEqualGrantedDeniedDecisions = true) { $strategyMethod = 'decide'.ucfirst($strategy); - if (!\is_callable(array($this, $strategyMethod))) { + if ('' === $strategy || !\is_callable([$this, $strategyMethod])) { throw new \InvalidArgumentException(sprintf('The strategy "%s" is not supported.', $strategy)); } @@ -167,7 +167,7 @@ class AccessDecisionManager implements AccessDecisionManagerInterface $grant = 0; foreach ($this->voters as $voter) { foreach ($attributes as $attribute) { - $result = $this->vote($voter, $token, $object, array($attribute)); + $result = $this->vote($voter, $token, $object, [$attribute]); switch ($result) { case VoterInterface::ACCESS_GRANTED: diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php index ff37531c..31744d34 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php @@ -60,7 +60,7 @@ class AuthorizationChecker implements AuthorizationCheckerInterface } if (!\is_array($attributes)) { - $attributes = array($attributes); + $attributes = [$attributes]; } return $this->accessDecisionManager->decide($token, $attributes, $subject); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguage.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguage.php index 0778ba78..950d082a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguage.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguage.php @@ -28,7 +28,7 @@ if (!class_exists(BaseExpressionLanguage::class)) { /** * {@inheritdoc} */ - public function __construct($cache = null, array $providers = array()) + public function __construct($cache = null, array $providers = []) { // prepend the default provider to let users override it easily array_unshift($providers, new ExpressionLanguageProvider()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguageProvider.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguageProvider.php index 388040d5..d8707525 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguageProvider.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguageProvider.php @@ -23,7 +23,7 @@ class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface { public function getFunctions() { - return array( + return [ new ExpressionFunction('is_anonymous', function () { return '$trust_resolver->isAnonymous($token)'; }, function (array $variables) { @@ -53,6 +53,6 @@ class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface }, function (array $variables, $role) { return \in_array($role, $variables['roles']); }), - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/TraceableAccessDecisionManager.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/TraceableAccessDecisionManager.php index dc77ab2d..81cdfd76 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/TraceableAccessDecisionManager.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/TraceableAccessDecisionManager.php @@ -26,8 +26,8 @@ class TraceableAccessDecisionManager implements AccessDecisionManagerInterface { private $manager; private $strategy; - private $voters = array(); - private $decisionLog = array(); + private $voters = []; + private $decisionLog = []; public function __construct(AccessDecisionManagerInterface $manager) { @@ -51,11 +51,11 @@ class TraceableAccessDecisionManager implements AccessDecisionManagerInterface { $result = $this->manager->decide($token, $attributes, $object); - $this->decisionLog[] = array( + $this->decisionLog[] = [ 'attributes' => $attributes, 'object' => $object, 'result' => $result, - ); + ]; return $result; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php index 40f1196f..42b93678 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php @@ -75,14 +75,14 @@ class ExpressionVoter implements VoterInterface $roles = $token->getRoles(); } - $variables = array( + $variables = [ 'token' => $token, 'user' => $token->getUser(), 'object' => $subject, 'subject' => $subject, 'roles' => array_map(function ($role) { return $role->getRole(); }, $roles), 'trust_resolver' => $this->trustResolver, - ); + ]; // this is mainly to propose a better experience when the expression is used // in an access control rule, as the developer does not know that it's going diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/Argon2iPasswordEncoder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/Argon2iPasswordEncoder.php index 0362ccc4..6f8a43b0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/Argon2iPasswordEncoder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/Argon2iPasswordEncoder.php @@ -60,7 +60,9 @@ class Argon2iPasswordEncoder extends BasePasswordEncoder implements SelfSaltingE */ public function isPasswordValid($encoded, $raw, $salt) { - if (\PHP_VERSION_ID >= 70200 && \defined('PASSWORD_ARGON2I')) { + // If $encoded was created via "sodium_crypto_pwhash_str()", the hashing algorithm may be "argon2id" instead of "argon2i". + // In this case, "password_verify()" cannot be used. + if (\PHP_VERSION_ID >= 70200 && \defined('PASSWORD_ARGON2I') && (false === strpos($encoded, '$argon2id$'))) { return !$this->isPasswordTooLong($raw) && password_verify($raw, $encoded); } if (\function_exists('sodium_crypto_pwhash_str_verify')) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php index d85afccd..1a7be2b4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php @@ -65,7 +65,7 @@ class BCryptPasswordEncoder extends BasePasswordEncoder implements SelfSaltingEn throw new BadCredentialsException('Invalid password.'); } - $options = array('cost' => $this->cost); + $options = ['cost' => $this->cost]; if ($salt) { // Ignore $salt, the auto-generated one is always the best diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php index 75c4db89..3c3ea1aa 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php @@ -30,7 +30,7 @@ abstract class BasePasswordEncoder implements PasswordEncoderInterface protected function demergePasswordAndSalt($mergedPasswordSalt) { if (empty($mergedPasswordSalt)) { - return array('', ''); + return ['', '']; } $password = $mergedPasswordSalt; @@ -42,7 +42,7 @@ abstract class BasePasswordEncoder implements PasswordEncoderInterface $password = substr($mergedPasswordSalt, 0, $saltBegins); } - return array($password, $salt); + return [$password, $salt]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php index 2c5fd477..f79eed19 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php @@ -33,7 +33,7 @@ class EncoderFactory implements EncoderFactoryInterface $encoderKey = null; if ($user instanceof EncoderAwareInterface && (null !== $encoderName = $user->getEncoderName())) { - if (!array_key_exists($encoderName, $this->encoders)) { + if (!\array_key_exists($encoderName, $this->encoders)) { throw new \RuntimeException(sprintf('The encoder "%s" was not configured.', $encoderName)); } @@ -86,42 +86,42 @@ class EncoderFactory implements EncoderFactoryInterface { switch ($config['algorithm']) { case 'plaintext': - return array( + return [ 'class' => PlaintextPasswordEncoder::class, - 'arguments' => array($config['ignore_case']), - ); + 'arguments' => [$config['ignore_case']], + ]; case 'pbkdf2': - return array( + return [ 'class' => Pbkdf2PasswordEncoder::class, - 'arguments' => array( + 'arguments' => [ $config['hash_algorithm'], $config['encode_as_base64'], $config['iterations'], $config['key_length'], - ), - ); + ], + ]; case 'bcrypt': - return array( + return [ 'class' => BCryptPasswordEncoder::class, - 'arguments' => array($config['cost']), - ); + 'arguments' => [$config['cost']], + ]; case 'argon2i': - return array( + return [ 'class' => Argon2iPasswordEncoder::class, - 'arguments' => array(), - ); + 'arguments' => [], + ]; } - return array( + return [ 'class' => MessageDigestPasswordEncoder::class, - 'arguments' => array( + 'arguments' => [ $config['algorithm'], $config['encode_as_base64'], $config['iterations'], - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php index 8c018be2..e0573051 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Security\Core\Encoder; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; + /** * PasswordEncoderInterface is the interface for all encoders. * @@ -25,6 +27,9 @@ interface PasswordEncoderInterface * @param string $salt The salt * * @return string The encoded password + * + * @throws BadCredentialsException If the raw password is invalid, e.g. excessively long + * @throws \InvalidArgumentException If the salt is invalid */ public function encodePassword($raw, $salt); @@ -36,6 +41,8 @@ interface PasswordEncoderInterface * @param string $salt The salt * * @return bool true if the password is valid, false otherwise + * + * @throws \InvalidArgumentException If the salt is invalid */ public function isPasswordValid($encoded, $raw, $salt); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AccessDeniedException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AccessDeniedException.php index a16044ff..bafcacbe 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AccessDeniedException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AccessDeniedException.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Security\Core\Exception; */ class AccessDeniedException extends \RuntimeException { - private $attributes = array(); + private $attributes = []; private $subject; public function __construct($message = 'Access Denied.', \Exception $previous = null) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php index 034ab792..cb91b423 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php @@ -44,10 +44,9 @@ abstract class AccountStatusException extends AuthenticationException */ public function serialize() { - return serialize(array( - $this->user, - parent::serialize(), - )); + $serialized = [$this->user, parent::serialize(true)]; + + return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null); } /** @@ -55,7 +54,7 @@ abstract class AccountStatusException extends AuthenticationException */ public function unserialize($str) { - list($this->user, $parentData) = unserialize($str); + list($this->user, $parentData) = \is_array($str) ? $str : unserialize($str); parent::unserialize($parentData); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php index 8beb87bd..2c6c7344 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php @@ -38,15 +38,33 @@ class AuthenticationException extends \RuntimeException implements \Serializable $this->token = $token; } + /** + * {@inheritdoc} + */ public function serialize() { - return serialize(array( + $serialized = [ $this->token, $this->code, $this->message, $this->file, $this->line, - )); + ]; + + return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null); + } + + /** + * @internal + */ + protected function doSerialize($serialized, $isCalledFromOverridingMethod) + { + if (null === $isCalledFromOverridingMethod) { + $trace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 3); + $isCalledFromOverridingMethod = isset($trace[2]['function'], $trace[2]['object']) && 'serialize' === $trace[2]['function'] && $this === $trace[2]['object']; + } + + return $isCalledFromOverridingMethod ? $serialized : serialize($serialized); } public function unserialize($str) @@ -57,7 +75,7 @@ class AuthenticationException extends \RuntimeException implements \Serializable $this->message, $this->file, $this->line - ) = unserialize($str); + ) = \is_array($str) ? $str : unserialize($str); } /** @@ -77,6 +95,6 @@ class AuthenticationException extends \RuntimeException implements \Serializable */ public function getMessageData() { - return array(); + return []; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/CustomUserMessageAuthenticationException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/CustomUserMessageAuthenticationException.php index 9f5071f4..ed9fb1bd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/CustomUserMessageAuthenticationException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/CustomUserMessageAuthenticationException.php @@ -24,9 +24,9 @@ class CustomUserMessageAuthenticationException extends AuthenticationException { private $messageKey; - private $messageData = array(); + private $messageData = []; - public function __construct($message = '', array $messageData = array(), $code = 0, \Exception $previous = null) + public function __construct($message = '', array $messageData = [], $code = 0, \Exception $previous = null) { parent::__construct($message, $code, $previous); @@ -39,7 +39,7 @@ class CustomUserMessageAuthenticationException extends AuthenticationException * @param string $messageKey The message or message key * @param array $messageData Data to be passed into the translator */ - public function setSafeMessage($messageKey, array $messageData = array()) + public function setSafeMessage($messageKey, array $messageData = []) { $this->messageKey = $messageKey; $this->messageData = $messageData; @@ -60,11 +60,9 @@ class CustomUserMessageAuthenticationException extends AuthenticationException */ public function serialize() { - return serialize(array( - parent::serialize(), - $this->messageKey, - $this->messageData, - )); + $serialized = [parent::serialize(true), $this->messageKey, $this->messageData]; + + return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null); } /** @@ -72,7 +70,7 @@ class CustomUserMessageAuthenticationException extends AuthenticationException */ public function unserialize($str) { - list($parentData, $this->messageKey, $this->messageData) = unserialize($str); + list($parentData, $this->messageKey, $this->messageData) = \is_array($str) ? $str : unserialize($str); parent::unserialize($parentData); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/UsernameNotFoundException.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/UsernameNotFoundException.php index 6979389a..b4b8047f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/UsernameNotFoundException.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/UsernameNotFoundException.php @@ -54,10 +54,9 @@ class UsernameNotFoundException extends AuthenticationException */ public function serialize() { - return serialize(array( - $this->username, - parent::serialize(), - )); + $serialized = [$this->username, parent::serialize(true)]; + + return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null); } /** @@ -65,7 +64,7 @@ class UsernameNotFoundException extends AuthenticationException */ public function unserialize($str) { - list($this->username, $parentData) = unserialize($str); + list($this->username, $parentData) = \is_array($str) ? $str : unserialize($str); parent::unserialize($parentData); } @@ -75,6 +74,6 @@ class UsernameNotFoundException extends AuthenticationException */ public function getMessageData() { - return array('{{ username }}' => $this->username); + return ['{{ username }}' => $this->username]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.nb.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.nb.xlf index 36359169..a01db397 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.nb.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.nb.xlf @@ -16,7 +16,7 @@ Invalid credentials. - Ugyldig påloggingsinformasjonen. + Ugyldig påloggingsinformasjon. Cookie has already been used by someone else. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.no.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.no.xlf index 36359169..a01db397 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.no.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.no.xlf @@ -16,7 +16,7 @@ Invalid credentials. - Ugyldig påloggingsinformasjonen. + Ugyldig påloggingsinformasjon. Cookie has already been used by someone else. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.vi.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.vi.xlf index b85a4399..93723bb4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.vi.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.vi.xlf @@ -48,7 +48,7 @@ Username could not be found. - Không tìm thấy tên người dùng username. + Không tìm thấy tên người dùng. Account has expired. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php index ff487f25..f4a2e5b6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php @@ -52,10 +52,10 @@ class RoleHierarchy implements RoleHierarchyInterface protected function buildRoleMap() { - $this->map = array(); + $this->map = []; foreach ($this->hierarchy as $main => $roles) { $this->map[$main] = $roles; - $visited = array(); + $visited = []; $additionalRoles = $roles; while ($role = array_shift($additionalRoles)) { if (!isset($this->hierarchy[$role])) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Security.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Security.php index 5d6bf51a..9d771b58 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Security.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Security.php @@ -17,8 +17,10 @@ use Symfony\Component\Security\Core\User\UserInterface; /** * Helper class for commonly-needed security tasks. + * + * @final */ -final class Security +class Security { const ACCESS_DENIED_ERROR = '_security.403_error'; const AUTHENTICATION_ERROR = '_security.last_error'; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php index 947bd4f6..fd2de0ca 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php @@ -29,7 +29,7 @@ class AuthenticationProviderManagerTest extends TestCase */ public function testAuthenticateWithoutProviders() { - new AuthenticationProviderManager(array()); + new AuthenticationProviderManager([]); } /** @@ -37,16 +37,16 @@ class AuthenticationProviderManagerTest extends TestCase */ public function testAuthenticateWithProvidersWithIncorrectInterface() { - (new AuthenticationProviderManager(array( + (new AuthenticationProviderManager([ new \stdClass(), - )))->authenticate($this->getMockBuilder(TokenInterface::class)->getMock()); + ]))->authenticate($this->getMockBuilder(TokenInterface::class)->getMock()); } public function testAuthenticateWhenNoProviderSupportsToken() { - $manager = new AuthenticationProviderManager(array( + $manager = new AuthenticationProviderManager([ $this->getAuthenticationProvider(false), - )); + ]); try { $manager->authenticate($token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); @@ -58,9 +58,9 @@ class AuthenticationProviderManagerTest extends TestCase public function testAuthenticateWhenProviderReturnsAccountStatusException() { - $manager = new AuthenticationProviderManager(array( + $manager = new AuthenticationProviderManager([ $this->getAuthenticationProvider(true, null, 'Symfony\Component\Security\Core\Exception\AccountStatusException'), - )); + ]); try { $manager->authenticate($token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); @@ -72,9 +72,9 @@ class AuthenticationProviderManagerTest extends TestCase public function testAuthenticateWhenProviderReturnsAuthenticationException() { - $manager = new AuthenticationProviderManager(array( + $manager = new AuthenticationProviderManager([ $this->getAuthenticationProvider(true, null, 'Symfony\Component\Security\Core\Exception\AuthenticationException'), - )); + ]); try { $manager->authenticate($token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); @@ -86,10 +86,10 @@ class AuthenticationProviderManagerTest extends TestCase public function testAuthenticateWhenOneReturnsAuthenticationExceptionButNotAll() { - $manager = new AuthenticationProviderManager(array( + $manager = new AuthenticationProviderManager([ $this->getAuthenticationProvider(true, null, 'Symfony\Component\Security\Core\Exception\AuthenticationException'), $this->getAuthenticationProvider(true, $expected = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()), - )); + ]); $token = $manager->authenticate($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); $this->assertSame($expected, $token); @@ -102,10 +102,10 @@ class AuthenticationProviderManagerTest extends TestCase ->expects($this->never()) ->method('supports') ; - $manager = new AuthenticationProviderManager(array( + $manager = new AuthenticationProviderManager([ $this->getAuthenticationProvider(true, $expected = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()), $second, - )); + ]); $token = $manager->authenticate($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); $this->assertSame($expected, $token); @@ -113,16 +113,16 @@ class AuthenticationProviderManagerTest extends TestCase public function testEraseCredentialFlag() { - $manager = new AuthenticationProviderManager(array( + $manager = new AuthenticationProviderManager([ $this->getAuthenticationProvider(true, $token = new UsernamePasswordToken('foo', 'bar', 'key')), - )); + ]); $token = $manager->authenticate($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); $this->assertEquals('', $token->getCredentials()); - $manager = new AuthenticationProviderManager(array( + $manager = new AuthenticationProviderManager([ $this->getAuthenticationProvider(true, $token = new UsernamePasswordToken('foo', 'bar', 'key')), - ), false); + ], false); $token = $manager->authenticate($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); $this->assertEquals('bar', $token->getCredentials()); @@ -141,7 +141,7 @@ class AuthenticationProviderManagerTest extends TestCase ->method('dispatch') ->with(AuthenticationEvents::AUTHENTICATION_FAILURE, $this->equalTo(new AuthenticationFailureEvent($token, $exception))); - $manager = new AuthenticationProviderManager(array($provider)); + $manager = new AuthenticationProviderManager([$provider]); $manager->setEventDispatcher($dispatcher); try { @@ -166,7 +166,7 @@ class AuthenticationProviderManagerTest extends TestCase ->method('dispatch') ->with(AuthenticationEvents::AUTHENTICATION_SUCCESS, $this->equalTo(new AuthenticationEvent($token))); - $manager = new AuthenticationProviderManager(array($provider)); + $manager = new AuthenticationProviderManager([$provider]); $manager->setEventDispatcher($dispatcher); $this->assertSame($token, $manager->authenticate($token)); @@ -188,7 +188,7 @@ class AuthenticationProviderManagerTest extends TestCase } elseif (null !== $exception) { $provider->expects($this->once()) ->method('authenticate') - ->will($this->throwException($this->getMockBuilder($exception)->setMethods(null)->getMock())) + ->willThrowException($this->getMockBuilder($exception)->setMethods(null)->getMock()) ; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationTrustResolverTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationTrustResolverTest.php index 55ca05b4..1ae0d42f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationTrustResolverTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationTrustResolverTest.php @@ -53,12 +53,12 @@ class AuthenticationTrustResolverTest extends TestCase protected function getAnonymousToken() { - return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken')->setConstructorArgs(array('', ''))->getMock(); + return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken')->setConstructorArgs(['', ''])->getMock(); } protected function getRememberMeToken() { - return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken')->setMethods(array('setPersistent'))->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken')->setMethods(['setPersistent'])->disableOriginalConstructor()->getMock(); } protected function getResolver() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php index e6c0f685..92441ba5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php @@ -55,7 +55,7 @@ class AnonymousAuthenticationProviderTest extends TestCase protected function getSupportedToken($secret) { - $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken')->setMethods(array('getSecret'))->disableOriginalConstructor()->getMock(); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken')->setMethods(['getSecret'])->disableOriginalConstructor()->getMock(); $token->expects($this->any()) ->method('getSecret') ->will($this->returnValue($secret)) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php index 10e6eb78..55814a99 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php @@ -38,7 +38,7 @@ class DaoAuthenticationProviderTest extends TestCase $userProvider = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface')->getMock(); $userProvider->expects($this->once()) ->method('loadUserByUsername') - ->will($this->throwException(new UsernameNotFoundException())) + ->willThrowException(new UsernameNotFoundException()) ; $provider = new DaoAuthenticationProvider($userProvider, $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface')->getMock(), 'key', $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface')->getMock()); @@ -56,7 +56,7 @@ class DaoAuthenticationProviderTest extends TestCase $userProvider = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface')->getMock(); $userProvider->expects($this->once()) ->method('loadUserByUsername') - ->will($this->throwException(new \RuntimeException())) + ->willThrowException(new \RuntimeException()) ; $provider = new DaoAuthenticationProvider($userProvider, $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface')->getMock(), 'key', $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface')->getMock()); @@ -261,7 +261,7 @@ class DaoAuthenticationProviderTest extends TestCase protected function getSupportedToken() { - $mock = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken')->setMethods(array('getCredentials', 'getUser', 'getProviderKey'))->disableOriginalConstructor()->getMock(); + $mock = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken')->setMethods(['getCredentials', 'getUser', 'getProviderKey'])->disableOriginalConstructor()->getMock(); $mock ->expects($this->any()) ->method('getProviderKey') diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php index 68b4657f..ef19bc2c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php @@ -73,7 +73,7 @@ class LdapBindAuthenticationProviderTest extends TestCase $ldap ->expects($this->once()) ->method('bind') - ->will($this->throwException(new ConnectionException())) + ->willThrowException(new ConnectionException()) ; $userChecker = $this->getMockBuilder(UserCheckerInterface::class)->getMock(); @@ -107,7 +107,7 @@ class LdapBindAuthenticationProviderTest extends TestCase { $userProvider = $this->getMockBuilder(UserProviderInterface::class)->getMock(); - $collection = new \ArrayIterator(array(new Entry(''))); + $collection = new \ArrayIterator([new Entry('')]); $query = $this->getMockBuilder(QueryInterface::class)->getMock(); $query diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php index 5a6b04d5..a101208d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php @@ -62,7 +62,7 @@ class PreAuthenticatedAuthenticationProviderTest extends TestCase $user ->expects($this->once()) ->method('getRoles') - ->will($this->returnValue(array())) + ->will($this->returnValue([])) ; $provider = $this->getProvider($user); @@ -70,8 +70,8 @@ class PreAuthenticatedAuthenticationProviderTest extends TestCase $this->assertInstanceOf('Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken', $token); $this->assertEquals('pass', $token->getCredentials()); $this->assertEquals('key', $token->getProviderKey()); - $this->assertEquals(array(), $token->getRoles()); - $this->assertEquals(array('foo' => 'bar'), $token->getAttributes(), '->authenticate() copies token attributes'); + $this->assertEquals([], $token->getRoles()); + $this->assertEquals(['foo' => 'bar'], $token->getAttributes(), '->authenticate() copies token attributes'); $this->assertSame($user, $token->getUser()); } @@ -85,7 +85,7 @@ class PreAuthenticatedAuthenticationProviderTest extends TestCase $userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); $userChecker->expects($this->once()) ->method('checkPostAuth') - ->will($this->throwException(new LockedException())) + ->willThrowException(new LockedException()) ; $provider = $this->getProvider($user, $userChecker); @@ -95,7 +95,7 @@ class PreAuthenticatedAuthenticationProviderTest extends TestCase protected function getSupportedToken($user = false, $credentials = false) { - $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken')->setMethods(array('getUser', 'getCredentials', 'getProviderKey'))->disableOriginalConstructor()->getMock(); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken')->setMethods(['getUser', 'getCredentials', 'getProviderKey'])->disableOriginalConstructor()->getMock(); if (false !== $user) { $token->expects($this->once()) ->method('getUser') @@ -115,7 +115,7 @@ class PreAuthenticatedAuthenticationProviderTest extends TestCase ->will($this->returnValue('key')) ; - $token->setAttributes(array('foo' => 'bar')); + $token->setAttributes(['foo' => 'bar']); return $token; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php index 497f315c..26287693 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php @@ -57,7 +57,7 @@ class RememberMeAuthenticationProviderTest extends TestCase $userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); $userChecker->expects($this->once()) ->method('checkPreAuth') - ->will($this->throwException(new DisabledException())); + ->willThrowException(new DisabledException()); $provider = $this->getProvider($userChecker); @@ -69,7 +69,7 @@ class RememberMeAuthenticationProviderTest extends TestCase $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); $user->expects($this->exactly(2)) ->method('getRoles') - ->will($this->returnValue(array('ROLE_FOO'))); + ->will($this->returnValue(['ROLE_FOO'])); $provider = $this->getProvider(); @@ -78,7 +78,7 @@ class RememberMeAuthenticationProviderTest extends TestCase $this->assertInstanceOf('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken', $authToken); $this->assertSame($user, $authToken->getUser()); - $this->assertEquals(array(new Role('ROLE_FOO')), $authToken->getRoles()); + $this->assertEquals([new Role('ROLE_FOO')], $authToken->getRoles()); $this->assertEquals('', $authToken->getCredentials()); } @@ -89,10 +89,10 @@ class RememberMeAuthenticationProviderTest extends TestCase $user ->expects($this->any()) ->method('getRoles') - ->will($this->returnValue(array())); + ->will($this->returnValue([])); } - $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken')->setMethods(array('getProviderKey'))->setConstructorArgs(array($user, 'foo', $secret))->getMock(); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken')->setMethods(['getProviderKey'])->setConstructorArgs([$user, 'foo', $secret])->getMock(); $token ->expects($this->once()) ->method('getProviderKey') diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/SimpleAuthenticationProviderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/SimpleAuthenticationProviderTest.php index 3694d996..661d23a4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/SimpleAuthenticationProviderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/SimpleAuthenticationProviderTest.php @@ -34,7 +34,7 @@ class SimpleAuthenticationProviderTest extends TestCase $userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); $userChecker->expects($this->once()) ->method('checkPreAuth') - ->will($this->throwException(new DisabledException())); + ->willThrowException(new DisabledException()); $authenticator = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface')->getMock(); $authenticator->expects($this->once()) @@ -61,7 +61,7 @@ class SimpleAuthenticationProviderTest extends TestCase $userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); $userChecker->expects($this->once()) ->method('checkPostAuth') - ->will($this->throwException(new LockedException())); + ->willThrowException(new LockedException()); $authenticator = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface')->getMock(); $authenticator->expects($this->once()) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php index a08ca3f8..7c306d2f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php @@ -48,7 +48,7 @@ class UserAuthenticationProviderTest extends TestCase $provider = $this->getProvider(false, false); $provider->expects($this->once()) ->method('retrieveUser') - ->will($this->throwException(new UsernameNotFoundException())) + ->willThrowException(new UsernameNotFoundException()) ; $provider->authenticate($this->getSupportedToken()); @@ -62,7 +62,7 @@ class UserAuthenticationProviderTest extends TestCase $provider = $this->getProvider(false, true); $provider->expects($this->once()) ->method('retrieveUser') - ->will($this->throwException(new UsernameNotFoundException())) + ->willThrowException(new UsernameNotFoundException()) ; $provider->authenticate($this->getSupportedToken()); @@ -90,7 +90,7 @@ class UserAuthenticationProviderTest extends TestCase $userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); $userChecker->expects($this->once()) ->method('checkPreAuth') - ->will($this->throwException(new CredentialsExpiredException())) + ->willThrowException(new CredentialsExpiredException()) ; $provider = $this->getProvider($userChecker); @@ -110,7 +110,7 @@ class UserAuthenticationProviderTest extends TestCase $userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); $userChecker->expects($this->once()) ->method('checkPostAuth') - ->will($this->throwException(new AccountExpiredException())) + ->willThrowException(new AccountExpiredException()) ; $provider = $this->getProvider($userChecker); @@ -135,7 +135,7 @@ class UserAuthenticationProviderTest extends TestCase ; $provider->expects($this->once()) ->method('checkAuthentication') - ->will($this->throwException(new BadCredentialsException())) + ->willThrowException(new BadCredentialsException()) ; $provider->authenticate($this->getSupportedToken()); @@ -154,7 +154,7 @@ class UserAuthenticationProviderTest extends TestCase ; $provider->expects($this->once()) ->method('checkAuthentication') - ->will($this->throwException(new BadCredentialsException('Foo'))) + ->willThrowException(new BadCredentialsException('Foo')) ; $provider->authenticate($this->getSupportedToken()); @@ -165,7 +165,7 @@ class UserAuthenticationProviderTest extends TestCase $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); $user->expects($this->once()) ->method('getRoles') - ->will($this->returnValue(array('ROLE_FOO'))) + ->will($this->returnValue(['ROLE_FOO'])) ; $provider = $this->getProvider(); @@ -182,16 +182,16 @@ class UserAuthenticationProviderTest extends TestCase $token->expects($this->once()) ->method('getRoles') - ->will($this->returnValue(array())) + ->will($this->returnValue([])) ; $authToken = $provider->authenticate($token); $this->assertInstanceOf('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken', $authToken); $this->assertSame($user, $authToken->getUser()); - $this->assertEquals(array(new Role('ROLE_FOO')), $authToken->getRoles()); + $this->assertEquals([new Role('ROLE_FOO')], $authToken->getRoles()); $this->assertEquals('foo', $authToken->getCredentials()); - $this->assertEquals(array('foo' => 'bar'), $authToken->getAttributes(), '->authenticate() copies token attributes'); + $this->assertEquals(['foo' => 'bar'], $authToken->getAttributes(), '->authenticate() copies token attributes'); } public function testAuthenticateWithPreservingRoleSwitchUserRole() @@ -199,7 +199,7 @@ class UserAuthenticationProviderTest extends TestCase $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); $user->expects($this->once()) ->method('getRoles') - ->will($this->returnValue(array('ROLE_FOO'))) + ->will($this->returnValue(['ROLE_FOO'])) ; $provider = $this->getProvider(); @@ -217,7 +217,7 @@ class UserAuthenticationProviderTest extends TestCase $switchUserRole = new SwitchUserRole('foo', $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); $token->expects($this->once()) ->method('getRoles') - ->will($this->returnValue(array($switchUserRole))) + ->will($this->returnValue([$switchUserRole])) ; $authToken = $provider->authenticate($token); @@ -227,19 +227,19 @@ class UserAuthenticationProviderTest extends TestCase $this->assertContains(new Role('ROLE_FOO'), $authToken->getRoles(), '', false, false); $this->assertContains($switchUserRole, $authToken->getRoles(), '', false, false); $this->assertEquals('foo', $authToken->getCredentials()); - $this->assertEquals(array('foo' => 'bar'), $authToken->getAttributes(), '->authenticate() copies token attributes'); + $this->assertEquals(['foo' => 'bar'], $authToken->getAttributes(), '->authenticate() copies token attributes'); } protected function getSupportedToken() { - $mock = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken')->setMethods(array('getCredentials', 'getProviderKey', 'getRoles'))->disableOriginalConstructor()->getMock(); + $mock = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken')->setMethods(['getCredentials', 'getProviderKey', 'getRoles'])->disableOriginalConstructor()->getMock(); $mock ->expects($this->any()) ->method('getProviderKey') ->will($this->returnValue('key')) ; - $mock->setAttributes(array('foo' => 'bar')); + $mock->setAttributes(['foo' => 'bar']); return $mock; } @@ -250,6 +250,6 @@ class UserAuthenticationProviderTest extends TestCase $userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); } - return $this->getMockForAbstractClass('Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider', array($userChecker, 'key', $hide)); + return $this->getMockForAbstractClass('Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider', [$userChecker, 'key', $hide]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php index 4cdf9826..8280366d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php @@ -36,16 +36,21 @@ class ConcreteToken extends AbstractToken { private $credentials = 'credentials_value'; - public function __construct($user, array $roles = array()) + public function __construct($user, array $roles = []) { parent::__construct($roles); $this->setUser($user); } + /** + * {@inheritdoc} + */ public function serialize() { - return serialize(array($this->credentials, parent::serialize())); + $serialized = [$this->credentials, parent::serialize(true)]; + + return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null); } public function unserialize($serialized) @@ -64,7 +69,7 @@ class AbstractTokenTest extends TestCase { public function testGetUsername() { - $token = $this->getToken(array('ROLE_FOO')); + $token = $this->getToken(['ROLE_FOO']); $token->setUser('fabien'); $this->assertEquals('fabien', $token->getUsername()); @@ -79,7 +84,7 @@ class AbstractTokenTest extends TestCase public function testEraseCredentials() { - $token = $this->getToken(array('ROLE_FOO')); + $token = $this->getToken(['ROLE_FOO']); $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); $user->expects($this->once())->method('eraseCredentials'); @@ -90,8 +95,8 @@ class AbstractTokenTest extends TestCase public function testSerialize() { - $token = $this->getToken(array('ROLE_FOO', new Role('ROLE_BAR'))); - $token->setAttributes(array('foo' => 'bar')); + $token = $this->getToken(['ROLE_FOO', new Role('ROLE_BAR')]); + $token->setAttributes(['foo' => 'bar']); $uToken = unserialize(serialize($token)); @@ -101,7 +106,7 @@ class AbstractTokenTest extends TestCase public function testSerializeWithRoleObjects() { - $user = new User('name', 'password', array(new Role('ROLE_FOO'), new Role('ROLE_BAR'))); + $user = new User('name', 'password', [new Role('ROLE_FOO'), new Role('ROLE_BAR')]); $token = new ConcreteToken($user, $user->getRoles()); $serialized = serialize($token); @@ -115,9 +120,9 @@ class AbstractTokenTest extends TestCase public function testSerializeParent() { $user = new TestUser('fabien'); - $token = new ConcreteToken($user, array('ROLE_FOO')); + $token = new ConcreteToken($user, ['ROLE_FOO']); - $parentToken = new ConcreteToken($user, array(new SwitchUserRole('ROLE_PREVIOUS', $token))); + $parentToken = new ConcreteToken($user, [new SwitchUserRole('ROLE_PREVIOUS', $token)]); $uToken = unserialize(serialize($parentToken)); $this->assertEquals( @@ -128,14 +133,14 @@ class AbstractTokenTest extends TestCase public function testConstructor() { - $token = $this->getToken(array('ROLE_FOO')); - $this->assertEquals(array(new Role('ROLE_FOO')), $token->getRoles()); + $token = $this->getToken(['ROLE_FOO']); + $this->assertEquals([new Role('ROLE_FOO')], $token->getRoles()); - $token = $this->getToken(array(new Role('ROLE_FOO'))); - $this->assertEquals(array(new Role('ROLE_FOO')), $token->getRoles()); + $token = $this->getToken([new Role('ROLE_FOO')]); + $this->assertEquals([new Role('ROLE_FOO')], $token->getRoles()); - $token = $this->getToken(array(new Role('ROLE_FOO'), 'ROLE_BAR')); - $this->assertEquals(array(new Role('ROLE_FOO'), new Role('ROLE_BAR')), $token->getRoles()); + $token = $this->getToken([new Role('ROLE_FOO'), 'ROLE_BAR']); + $this->assertEquals([new Role('ROLE_FOO'), new Role('ROLE_BAR')], $token->getRoles()); } public function testAuthenticatedFlag() @@ -152,7 +157,7 @@ class AbstractTokenTest extends TestCase public function testAttributes() { - $attributes = array('foo' => 'bar'); + $attributes = ['foo' => 'bar']; $token = $this->getToken(); $token->setAttributes($attributes); @@ -187,12 +192,12 @@ class AbstractTokenTest extends TestCase $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); $advancedUser = $this->getMockBuilder('Symfony\Component\Security\Core\User\AdvancedUserInterface')->getMock(); - return array( - array($advancedUser), - array($user), - array(new TestUser('foo')), - array('foo'), - ); + return [ + [$advancedUser], + [$user], + [new TestUser('foo')], + ['foo'], + ]; } /** @@ -216,50 +221,50 @@ class AbstractTokenTest extends TestCase $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); $advancedUser = $this->getMockBuilder('Symfony\Component\Security\Core\User\AdvancedUserInterface')->getMock(); - return array( - array( + return [ + [ 'foo', 'bar', - ), - array( + ], + [ 'foo', new TestUser('bar'), - ), - array( + ], + [ 'foo', $user, - ), - array( + ], + [ 'foo', $advancedUser, - ), - array( + ], + [ $user, 'foo', - ), - array( + ], + [ $advancedUser, 'foo', - ), - array( + ], + [ $user, new TestUser('foo'), - ), - array( + ], + [ $advancedUser, new TestUser('foo'), - ), - array( + ], + [ new TestUser('foo'), new TestUser('bar'), - ), - array( + ], + [ new TestUser('foo'), 'bar', - ), - array( + ], + [ new TestUser('foo'), $user, - ), - array( + ], + [ new TestUser('foo'), $advancedUser, - ), - array( + ], + [ $user, $advancedUser, - ), - array( + ], + [ $advancedUser, $user, - ), - ); + ], + ]; } /** @@ -278,8 +283,8 @@ class AbstractTokenTest extends TestCase $this->assertTrue($token->isAuthenticated()); } - protected function getToken(array $roles = array()) + protected function getToken(array $roles = []) { - return $this->getMockForAbstractClass('Symfony\Component\Security\Core\Authentication\Token\AbstractToken', array($roles)); + return $this->getMockForAbstractClass('Symfony\Component\Security\Core\Authentication\Token\AbstractToken', [$roles]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AnonymousTokenTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AnonymousTokenTest.php index 1409752a..7024cc53 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AnonymousTokenTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AnonymousTokenTest.php @@ -22,8 +22,8 @@ class AnonymousTokenTest extends TestCase $token = new AnonymousToken('foo', 'bar'); $this->assertTrue($token->isAuthenticated()); - $token = new AnonymousToken('foo', 'bar', array('ROLE_FOO')); - $this->assertEquals(array(new Role('ROLE_FOO')), $token->getRoles()); + $token = new AnonymousToken('foo', 'bar', ['ROLE_FOO']); + $this->assertEquals([new Role('ROLE_FOO')], $token->getRoles()); } public function testGetKey() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/PreAuthenticatedTokenTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/PreAuthenticatedTokenTest.php index 5b2b1c07..7e64aa1a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/PreAuthenticatedTokenTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/PreAuthenticatedTokenTest.php @@ -22,9 +22,9 @@ class PreAuthenticatedTokenTest extends TestCase $token = new PreAuthenticatedToken('foo', 'bar', 'key'); $this->assertFalse($token->isAuthenticated()); - $token = new PreAuthenticatedToken('foo', 'bar', 'key', array('ROLE_FOO')); + $token = new PreAuthenticatedToken('foo', 'bar', 'key', ['ROLE_FOO']); $this->assertTrue($token->isAuthenticated()); - $this->assertEquals(array(new Role('ROLE_FOO')), $token->getRoles()); + $this->assertEquals([new Role('ROLE_FOO')], $token->getRoles()); $this->assertEquals('key', $token->getProviderKey()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/RememberMeTokenTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/RememberMeTokenTest.php index 1b233cd9..0bdd54dc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/RememberMeTokenTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/RememberMeTokenTest.php @@ -24,7 +24,7 @@ class RememberMeTokenTest extends TestCase $this->assertEquals('fookey', $token->getProviderKey()); $this->assertEquals('foo', $token->getSecret()); - $this->assertEquals(array(new Role('ROLE_FOO')), $token->getRoles()); + $this->assertEquals([new Role('ROLE_FOO')], $token->getRoles()); $this->assertSame($user, $token->getUser()); $this->assertTrue($token->isAuthenticated()); } @@ -53,7 +53,7 @@ class RememberMeTokenTest extends TestCase ); } - protected function getUser($roles = array('ROLE_FOO')) + protected function getUser($roles = ['ROLE_FOO']) { $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); $user diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/UsernamePasswordTokenTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/UsernamePasswordTokenTest.php index 12897ab1..87dceea3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/UsernamePasswordTokenTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/UsernamePasswordTokenTest.php @@ -22,8 +22,8 @@ class UsernamePasswordTokenTest extends TestCase $token = new UsernamePasswordToken('foo', 'bar', 'key'); $this->assertFalse($token->isAuthenticated()); - $token = new UsernamePasswordToken('foo', 'bar', 'key', array('ROLE_FOO')); - $this->assertEquals(array(new Role('ROLE_FOO')), $token->getRoles()); + $token = new UsernamePasswordToken('foo', 'bar', 'key', ['ROLE_FOO']); + $this->assertEquals([new Role('ROLE_FOO')], $token->getRoles()); $this->assertTrue($token->isAuthenticated()); $this->assertEquals('key', $token->getProviderKey()); } @@ -53,7 +53,7 @@ class UsernamePasswordTokenTest extends TestCase public function testToString() { - $token = new UsernamePasswordToken('foo', '', 'foo', array('A', 'B')); + $token = new UsernamePasswordToken('foo', '', 'foo', ['A', 'B']); $this->assertEquals('UsernamePasswordToken(user="foo", authenticated=true, roles="A, B")', (string) $token); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php index 61d85274..9ee86a07 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php @@ -25,7 +25,7 @@ class AccessDecisionManagerTest extends TestCase */ public function testSetUnsupportedStrategy() { - new AccessDecisionManager(array($this->getVoter(VoterInterface::ACCESS_GRANTED)), 'fooBar'); + new AccessDecisionManager([$this->getVoter(VoterInterface::ACCESS_GRANTED)], 'fooBar'); } /** @@ -36,7 +36,7 @@ class AccessDecisionManagerTest extends TestCase $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); $manager = new AccessDecisionManager($voters, $strategy, $allowIfAllAbstainDecisions, $allowIfEqualGrantedDeniedDecisions); - $this->assertSame($expected, $manager->decide($token, array('ROLE_FOO'))); + $this->assertSame($expected, $manager->decide($token, ['ROLE_FOO'])); } /** @@ -44,27 +44,27 @@ class AccessDecisionManagerTest extends TestCase */ public function testStrategiesWith2Roles($token, $strategy, $voter, $expected) { - $manager = new AccessDecisionManager(array($voter), $strategy); + $manager = new AccessDecisionManager([$voter], $strategy); - $this->assertSame($expected, $manager->decide($token, array('ROLE_FOO', 'ROLE_BAR'))); + $this->assertSame($expected, $manager->decide($token, ['ROLE_FOO', 'ROLE_BAR'])); } public function getStrategiesWith2RolesTests() { $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); - return array( - array($token, 'affirmative', $this->getVoter(VoterInterface::ACCESS_DENIED), false), - array($token, 'affirmative', $this->getVoter(VoterInterface::ACCESS_GRANTED), true), + return [ + [$token, 'affirmative', $this->getVoter(VoterInterface::ACCESS_DENIED), false], + [$token, 'affirmative', $this->getVoter(VoterInterface::ACCESS_GRANTED), true], - array($token, 'consensus', $this->getVoter(VoterInterface::ACCESS_DENIED), false), - array($token, 'consensus', $this->getVoter(VoterInterface::ACCESS_GRANTED), true), + [$token, 'consensus', $this->getVoter(VoterInterface::ACCESS_DENIED), false], + [$token, 'consensus', $this->getVoter(VoterInterface::ACCESS_GRANTED), true], - array($token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_DENIED, VoterInterface::ACCESS_DENIED), false), - array($token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_DENIED, VoterInterface::ACCESS_GRANTED), false), - array($token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_GRANTED, VoterInterface::ACCESS_DENIED), false), - array($token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_GRANTED, VoterInterface::ACCESS_GRANTED), true), - ); + [$token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_DENIED, VoterInterface::ACCESS_DENIED), false], + [$token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_DENIED, VoterInterface::ACCESS_GRANTED), false], + [$token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_GRANTED, VoterInterface::ACCESS_DENIED), false], + [$token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_GRANTED, VoterInterface::ACCESS_GRANTED), true], + ]; } protected function getVoterFor2Roles($token, $vote1, $vote2) @@ -72,10 +72,10 @@ class AccessDecisionManagerTest extends TestCase $voter = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\Voter\VoterInterface')->getMock(); $voter->expects($this->any()) ->method('vote') - ->will($this->returnValueMap(array( - array($token, null, array('ROLE_FOO'), $vote1), - array($token, null, array('ROLE_BAR'), $vote2), - ))) + ->will($this->returnValueMap([ + [$token, null, ['ROLE_FOO'], $vote1], + [$token, null, ['ROLE_BAR'], $vote2], + ])) ; return $voter; @@ -83,42 +83,42 @@ class AccessDecisionManagerTest extends TestCase public function getStrategyTests() { - return array( + return [ // affirmative - array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(1, 0, 0), false, true, true), - array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(1, 2, 0), false, true, true), - array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(0, 1, 0), false, true, false), - array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(0, 0, 1), false, true, false), - array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(0, 0, 1), true, true, true), + [AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(1, 0, 0), false, true, true], + [AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(1, 2, 0), false, true, true], + [AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(0, 1, 0), false, true, false], + [AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(0, 0, 1), false, true, false], + [AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(0, 0, 1), true, true, true], // consensus - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(1, 0, 0), false, true, true), - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(1, 2, 0), false, true, false), - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 1, 0), false, true, true), + [AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(1, 0, 0), false, true, true], + [AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(1, 2, 0), false, true, false], + [AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 1, 0), false, true, true], - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(0, 0, 1), false, true, false), + [AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(0, 0, 1), false, true, false], - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(0, 0, 1), true, true, true), + [AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(0, 0, 1), true, true, true], - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 0), false, true, true), - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 1), false, true, true), + [AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 0), false, true, true], + [AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 1), false, true, true], - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 0), false, false, false), - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 1), false, false, false), + [AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 0), false, false, false], + [AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 1), false, false, false], // unanimous - array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(1, 0, 0), false, true, true), - array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(1, 0, 1), false, true, true), - array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(1, 1, 0), false, true, false), + [AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(1, 0, 0), false, true, true], + [AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(1, 0, 1), false, true, true], + [AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(1, 1, 0), false, true, false], - array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(0, 0, 2), false, true, false), - array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(0, 0, 2), true, true, true), - ); + [AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(0, 0, 2), false, true, false], + [AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(0, 0, 2), true, true, true], + ]; } protected function getVoters($grants, $denies, $abstains) { - $voters = array(); + $voters = []; for ($i = 0; $i < $grants; ++$i) { $voters[] = $this->getVoter(VoterInterface::ACCESS_GRANTED); } @@ -154,10 +154,10 @@ class AccessDecisionManagerTest extends TestCase $this->setExpectedException($exception, $message); } - $adm = new AccessDecisionManager(array(new \stdClass())); + $adm = new AccessDecisionManager([new \stdClass()]); $token = $this->getMockBuilder(TokenInterface::class)->getMock(); - $adm->decide($token, array('TEST')); + $adm->decide($token, ['TEST']); } /** @@ -166,9 +166,9 @@ class AccessDecisionManagerTest extends TestCase */ public function testVotingWrongTypeWithVote() { - $adm = new AccessDecisionManager(array(new VoterWithoutInterface())); + $adm = new AccessDecisionManager([new VoterWithoutInterface()]); $token = $this->getMockBuilder(TokenInterface::class)->getMock(); - $adm->decide($token, array('TEST')); + $adm->decide($token, ['TEST']); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php index e3e1c447..6a07c94f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php @@ -95,6 +95,6 @@ class AuthorizationCheckerTest extends TestCase public function isGrantedProvider() { - return array(array(true), array(false)); + return [[true], [false]]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php index 873d9d57..1b6ef1fd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php @@ -24,14 +24,14 @@ class ExpressionLanguageTest extends TestCase /** * @dataProvider provider */ - public function testIsAuthenticated($token, $expression, $result, array $roles = array()) + public function testIsAuthenticated($token, $expression, $result, array $roles = []) { $anonymousTokenClass = 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\AnonymousToken'; $rememberMeTokenClass = 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\RememberMeToken'; $expressionLanguage = new ExpressionLanguage(); $trustResolver = new AuthenticationTrustResolver($anonymousTokenClass, $rememberMeTokenClass); - $context = array(); + $context = []; $context['trust_resolver'] = $trustResolver; $context['token'] = $token; $context['roles'] = $roles; @@ -41,7 +41,7 @@ class ExpressionLanguageTest extends TestCase public function provider() { - $roles = array('ROLE_USER', 'ROLE_ADMIN'); + $roles = ['ROLE_USER', 'ROLE_ADMIN']; $user = new User('username', 'password', $roles); $noToken = null; @@ -49,32 +49,32 @@ class ExpressionLanguageTest extends TestCase $rememberMeToken = new RememberMeToken($user, 'providerkey', 'firewall'); $usernamePasswordToken = new UsernamePasswordToken('username', 'password', 'providerkey', $roles); - return array( - array($noToken, 'is_anonymous()', false), - array($noToken, 'is_authenticated()', false), - array($noToken, 'is_fully_authenticated()', false), - array($noToken, 'is_remember_me()', false), - array($noToken, "has_role('ROLE_USER')", false), + return [ + [$noToken, 'is_anonymous()', false], + [$noToken, 'is_authenticated()', false], + [$noToken, 'is_fully_authenticated()', false], + [$noToken, 'is_remember_me()', false], + [$noToken, "has_role('ROLE_USER')", false], - array($anonymousToken, 'is_anonymous()', true), - array($anonymousToken, 'is_authenticated()', false), - array($anonymousToken, 'is_fully_authenticated()', false), - array($anonymousToken, 'is_remember_me()', false), - array($anonymousToken, "has_role('ROLE_USER')", false), + [$anonymousToken, 'is_anonymous()', true], + [$anonymousToken, 'is_authenticated()', false], + [$anonymousToken, 'is_fully_authenticated()', false], + [$anonymousToken, 'is_remember_me()', false], + [$anonymousToken, "has_role('ROLE_USER')", false], - array($rememberMeToken, 'is_anonymous()', false), - array($rememberMeToken, 'is_authenticated()', true), - array($rememberMeToken, 'is_fully_authenticated()', false), - array($rememberMeToken, 'is_remember_me()', true), - array($rememberMeToken, "has_role('ROLE_FOO')", false, $roles), - array($rememberMeToken, "has_role('ROLE_USER')", true, $roles), + [$rememberMeToken, 'is_anonymous()', false], + [$rememberMeToken, 'is_authenticated()', true], + [$rememberMeToken, 'is_fully_authenticated()', false], + [$rememberMeToken, 'is_remember_me()', true], + [$rememberMeToken, "has_role('ROLE_FOO')", false, $roles], + [$rememberMeToken, "has_role('ROLE_USER')", true, $roles], - array($usernamePasswordToken, 'is_anonymous()', false), - array($usernamePasswordToken, 'is_authenticated()', true), - array($usernamePasswordToken, 'is_fully_authenticated()', true), - array($usernamePasswordToken, 'is_remember_me()', false), - array($usernamePasswordToken, "has_role('ROLE_FOO')", false, $roles), - array($usernamePasswordToken, "has_role('ROLE_USER')", true, $roles), - ); + [$usernamePasswordToken, 'is_anonymous()', false], + [$usernamePasswordToken, 'is_authenticated()', true], + [$usernamePasswordToken, 'is_fully_authenticated()', true], + [$usernamePasswordToken, 'is_remember_me()', false], + [$usernamePasswordToken, "has_role('ROLE_FOO')", false, $roles], + [$usernamePasswordToken, "has_role('ROLE_USER')", true, $roles], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php index 100a4dd4..c9ad61a6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php @@ -25,7 +25,7 @@ class TraceableAccessDecisionManagerTest extends TestCase public function testDecideLog($expectedLog, $object) { $adm = new TraceableAccessDecisionManager(new AccessDecisionManager()); - $adm->decide($this->getMockBuilder(TokenInterface::class)->getMock(), array('ATTRIBUTE_1'), $object); + $adm->decide($this->getMockBuilder(TokenInterface::class)->getMock(), ['ATTRIBUTE_1'], $object); $this->assertSame($expectedLog, $adm->getDecisionLog()); } @@ -34,13 +34,13 @@ class TraceableAccessDecisionManagerTest extends TestCase { $object = new \stdClass(); - yield array(array(array('attributes' => array('ATTRIBUTE_1'), 'object' => null, 'result' => false)), null); - yield array(array(array('attributes' => array('ATTRIBUTE_1'), 'object' => true, 'result' => false)), true); - yield array(array(array('attributes' => array('ATTRIBUTE_1'), 'object' => 'jolie string', 'result' => false)), 'jolie string'); - yield array(array(array('attributes' => array('ATTRIBUTE_1'), 'object' => 12345, 'result' => false)), 12345); - yield array(array(array('attributes' => array('ATTRIBUTE_1'), 'object' => $x = fopen(__FILE__, 'r'), 'result' => false)), $x); - yield array(array(array('attributes' => array('ATTRIBUTE_1'), 'object' => $x = array(), 'result' => false)), $x); - yield array(array(array('attributes' => array('ATTRIBUTE_1'), 'object' => $object, 'result' => false)), $object); + yield [[['attributes' => ['ATTRIBUTE_1'], 'object' => null, 'result' => false]], null]; + yield [[['attributes' => ['ATTRIBUTE_1'], 'object' => true, 'result' => false]], true]; + yield [[['attributes' => ['ATTRIBUTE_1'], 'object' => 'jolie string', 'result' => false]], 'jolie string']; + yield [[['attributes' => ['ATTRIBUTE_1'], 'object' => 12345, 'result' => false]], 12345]; + yield [[['attributes' => ['ATTRIBUTE_1'], 'object' => $x = fopen(__FILE__, 'r'), 'result' => false]], $x]; + yield [[['attributes' => ['ATTRIBUTE_1'], 'object' => $x = [], 'result' => false]], $x]; + yield [[['attributes' => ['ATTRIBUTE_1'], 'object' => $object, 'result' => false]], $object]; } public function testDebugAccessDecisionManagerAliasExistsForBC() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php index 1ba7e391..6bbe07cf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php @@ -30,26 +30,26 @@ class AuthenticatedVoterTest extends TestCase public function getVoteTests() { - return array( - array('fully', array(), VoterInterface::ACCESS_ABSTAIN), - array('fully', array('FOO'), VoterInterface::ACCESS_ABSTAIN), - array('remembered', array(), VoterInterface::ACCESS_ABSTAIN), - array('remembered', array('FOO'), VoterInterface::ACCESS_ABSTAIN), - array('anonymously', array(), VoterInterface::ACCESS_ABSTAIN), - array('anonymously', array('FOO'), VoterInterface::ACCESS_ABSTAIN), + return [ + ['fully', [], VoterInterface::ACCESS_ABSTAIN], + ['fully', ['FOO'], VoterInterface::ACCESS_ABSTAIN], + ['remembered', [], VoterInterface::ACCESS_ABSTAIN], + ['remembered', ['FOO'], VoterInterface::ACCESS_ABSTAIN], + ['anonymously', [], VoterInterface::ACCESS_ABSTAIN], + ['anonymously', ['FOO'], VoterInterface::ACCESS_ABSTAIN], - array('fully', array('IS_AUTHENTICATED_ANONYMOUSLY'), VoterInterface::ACCESS_GRANTED), - array('remembered', array('IS_AUTHENTICATED_ANONYMOUSLY'), VoterInterface::ACCESS_GRANTED), - array('anonymously', array('IS_AUTHENTICATED_ANONYMOUSLY'), VoterInterface::ACCESS_GRANTED), + ['fully', ['IS_AUTHENTICATED_ANONYMOUSLY'], VoterInterface::ACCESS_GRANTED], + ['remembered', ['IS_AUTHENTICATED_ANONYMOUSLY'], VoterInterface::ACCESS_GRANTED], + ['anonymously', ['IS_AUTHENTICATED_ANONYMOUSLY'], VoterInterface::ACCESS_GRANTED], - array('fully', array('IS_AUTHENTICATED_REMEMBERED'), VoterInterface::ACCESS_GRANTED), - array('remembered', array('IS_AUTHENTICATED_REMEMBERED'), VoterInterface::ACCESS_GRANTED), - array('anonymously', array('IS_AUTHENTICATED_REMEMBERED'), VoterInterface::ACCESS_DENIED), + ['fully', ['IS_AUTHENTICATED_REMEMBERED'], VoterInterface::ACCESS_GRANTED], + ['remembered', ['IS_AUTHENTICATED_REMEMBERED'], VoterInterface::ACCESS_GRANTED], + ['anonymously', ['IS_AUTHENTICATED_REMEMBERED'], VoterInterface::ACCESS_DENIED], - array('fully', array('IS_AUTHENTICATED_FULLY'), VoterInterface::ACCESS_GRANTED), - array('remembered', array('IS_AUTHENTICATED_FULLY'), VoterInterface::ACCESS_DENIED), - array('anonymously', array('IS_AUTHENTICATED_FULLY'), VoterInterface::ACCESS_DENIED), - ); + ['fully', ['IS_AUTHENTICATED_FULLY'], VoterInterface::ACCESS_GRANTED], + ['remembered', ['IS_AUTHENTICATED_FULLY'], VoterInterface::ACCESS_DENIED], + ['anonymously', ['IS_AUTHENTICATED_FULLY'], VoterInterface::ACCESS_DENIED], + ]; } protected function getResolver() @@ -65,9 +65,9 @@ class AuthenticatedVoterTest extends TestCase if ('fully' === $authenticated) { return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); } elseif ('remembered' === $authenticated) { - return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken')->setMethods(array('setPersistent'))->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken')->setMethods(['setPersistent'])->disableOriginalConstructor()->getMock(); } else { - return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken')->setConstructorArgs(array('', ''))->getMock(); + return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken')->setConstructorArgs(['', ''])->getMock(); } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ExpressionVoterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ExpressionVoterTest.php index 79626835..7e435687 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ExpressionVoterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ExpressionVoterTest.php @@ -30,15 +30,15 @@ class ExpressionVoterTest extends TestCase public function getVoteTests() { - return array( - array(array(), array(), VoterInterface::ACCESS_ABSTAIN, false, false), - array(array(), array('FOO'), VoterInterface::ACCESS_ABSTAIN, false, false), + return [ + [[], [], VoterInterface::ACCESS_ABSTAIN, false, false], + [[], ['FOO'], VoterInterface::ACCESS_ABSTAIN, false, false], - array(array(), array($this->createExpression()), VoterInterface::ACCESS_DENIED, true, false), + [[], [$this->createExpression()], VoterInterface::ACCESS_DENIED, true, false], - array(array('ROLE_FOO'), array($this->createExpression(), $this->createExpression()), VoterInterface::ACCESS_GRANTED), - array(array('ROLE_BAR', 'ROLE_FOO'), array($this->createExpression()), VoterInterface::ACCESS_GRANTED), - ); + [['ROLE_FOO'], [$this->createExpression(), $this->createExpression()], VoterInterface::ACCESS_GRANTED], + [['ROLE_BAR', 'ROLE_FOO'], [$this->createExpression()], VoterInterface::ACCESS_GRANTED], + ]; } protected function getToken(array $roles, $tokenExpectsGetRoles = true) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php index 4b03bacd..14705fbf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php @@ -22,16 +22,16 @@ class RoleHierarchyVoterTest extends RoleVoterTest */ public function testVote($roles, $attributes, $expected) { - $voter = new RoleHierarchyVoter(new RoleHierarchy(array('ROLE_FOO' => array('ROLE_FOOBAR')))); + $voter = new RoleHierarchyVoter(new RoleHierarchy(['ROLE_FOO' => ['ROLE_FOOBAR']])); $this->assertSame($expected, $voter->vote($this->getToken($roles), null, $attributes)); } public function getVoteTests() { - return array_merge(parent::getVoteTests(), array( - array(array('ROLE_FOO'), array('ROLE_FOOBAR'), VoterInterface::ACCESS_GRANTED), - )); + return array_merge(parent::getVoteTests(), [ + [['ROLE_FOO'], ['ROLE_FOOBAR'], VoterInterface::ACCESS_GRANTED], + ]); } /** @@ -39,7 +39,7 @@ class RoleHierarchyVoterTest extends RoleVoterTest */ public function testVoteWithEmptyHierarchy($roles, $attributes, $expected) { - $voter = new RoleHierarchyVoter(new RoleHierarchy(array())); + $voter = new RoleHierarchyVoter(new RoleHierarchy([])); $this->assertSame($expected, $voter->vote($this->getToken($roles), null, $attributes)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php index 242a2f58..5fb45e08 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php @@ -30,20 +30,20 @@ class RoleVoterTest extends TestCase public function getVoteTests() { - return array( - array(array(), array(), VoterInterface::ACCESS_ABSTAIN), - array(array(), array('FOO'), VoterInterface::ACCESS_ABSTAIN), - array(array(), array('ROLE_FOO'), VoterInterface::ACCESS_DENIED), - array(array('ROLE_FOO'), array('ROLE_FOO'), VoterInterface::ACCESS_GRANTED), - array(array('ROLE_FOO'), array('FOO', 'ROLE_FOO'), VoterInterface::ACCESS_GRANTED), - array(array('ROLE_BAR', 'ROLE_FOO'), array('ROLE_FOO'), VoterInterface::ACCESS_GRANTED), + return [ + [[], [], VoterInterface::ACCESS_ABSTAIN], + [[], ['FOO'], VoterInterface::ACCESS_ABSTAIN], + [[], ['ROLE_FOO'], VoterInterface::ACCESS_DENIED], + [['ROLE_FOO'], ['ROLE_FOO'], VoterInterface::ACCESS_GRANTED], + [['ROLE_FOO'], ['FOO', 'ROLE_FOO'], VoterInterface::ACCESS_GRANTED], + [['ROLE_BAR', 'ROLE_FOO'], ['ROLE_FOO'], VoterInterface::ACCESS_GRANTED], // Test mixed Types - array(array(), array(array()), VoterInterface::ACCESS_ABSTAIN), - array(array(), array(new \stdClass()), VoterInterface::ACCESS_ABSTAIN), - array(array('ROLE_BAR'), array(new Role('ROLE_BAR')), VoterInterface::ACCESS_GRANTED), - array(array('ROLE_BAR'), array(new Role('ROLE_FOO')), VoterInterface::ACCESS_DENIED), - ); + [[], [[]], VoterInterface::ACCESS_ABSTAIN], + [[], [new \stdClass()], VoterInterface::ACCESS_ABSTAIN], + [['ROLE_BAR'], [new Role('ROLE_BAR')], VoterInterface::ACCESS_GRANTED], + [['ROLE_BAR'], [new Role('ROLE_FOO')], VoterInterface::ACCESS_DENIED], + ]; } protected function getToken(array $roles) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php index f0e10cde..50dc84e4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php @@ -27,23 +27,23 @@ class VoterTest extends TestCase public function getTests() { - return array( - array(array('EDIT'), VoterInterface::ACCESS_GRANTED, new \stdClass(), 'ACCESS_GRANTED if attribute and class are supported and attribute grants access'), - array(array('CREATE'), VoterInterface::ACCESS_DENIED, new \stdClass(), 'ACCESS_DENIED if attribute and class are supported and attribute does not grant access'), + return [ + [['EDIT'], VoterInterface::ACCESS_GRANTED, new \stdClass(), 'ACCESS_GRANTED if attribute and class are supported and attribute grants access'], + [['CREATE'], VoterInterface::ACCESS_DENIED, new \stdClass(), 'ACCESS_DENIED if attribute and class are supported and attribute does not grant access'], - array(array('DELETE', 'EDIT'), VoterInterface::ACCESS_GRANTED, new \stdClass(), 'ACCESS_GRANTED if one attribute is supported and grants access'), - array(array('DELETE', 'CREATE'), VoterInterface::ACCESS_DENIED, new \stdClass(), 'ACCESS_DENIED if one attribute is supported and denies access'), + [['DELETE', 'EDIT'], VoterInterface::ACCESS_GRANTED, new \stdClass(), 'ACCESS_GRANTED if one attribute is supported and grants access'], + [['DELETE', 'CREATE'], VoterInterface::ACCESS_DENIED, new \stdClass(), 'ACCESS_DENIED if one attribute is supported and denies access'], - array(array('CREATE', 'EDIT'), VoterInterface::ACCESS_GRANTED, new \stdClass(), 'ACCESS_GRANTED if one attribute grants access'), + [['CREATE', 'EDIT'], VoterInterface::ACCESS_GRANTED, new \stdClass(), 'ACCESS_GRANTED if one attribute grants access'], - array(array('DELETE'), VoterInterface::ACCESS_ABSTAIN, new \stdClass(), 'ACCESS_ABSTAIN if no attribute is supported'), + [['DELETE'], VoterInterface::ACCESS_ABSTAIN, new \stdClass(), 'ACCESS_ABSTAIN if no attribute is supported'], - array(array('EDIT'), VoterInterface::ACCESS_ABSTAIN, $this, 'ACCESS_ABSTAIN if class is not supported'), + [['EDIT'], VoterInterface::ACCESS_ABSTAIN, $this, 'ACCESS_ABSTAIN if class is not supported'], - array(array('EDIT'), VoterInterface::ACCESS_ABSTAIN, null, 'ACCESS_ABSTAIN if object is null'), + [['EDIT'], VoterInterface::ACCESS_ABSTAIN, null, 'ACCESS_ABSTAIN if object is null'], - array(array(), VoterInterface::ACCESS_ABSTAIN, new \stdClass(), 'ACCESS_ABSTAIN if no attributes were provided'), - ); + [[], VoterInterface::ACCESS_ABSTAIN, new \stdClass(), 'ACCESS_ABSTAIN if no attributes were provided'], + ]; } /** @@ -66,6 +66,6 @@ class VoterTest_Voter extends Voter protected function supports($attribute, $object) { - return $object instanceof \stdClass && \in_array($attribute, array('EDIT', 'CREATE')); + return $object instanceof \stdClass && \in_array($attribute, ['EDIT', 'CREATE']); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/BCryptPasswordEncoderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/BCryptPasswordEncoderTest.php index 55590ffc..7f9dbe7f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/BCryptPasswordEncoderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/BCryptPasswordEncoderTest.php @@ -49,7 +49,7 @@ class BCryptPasswordEncoderTest extends TestCase public function validRangeData() { $costs = range(4, 31); - array_walk($costs, function (&$cost) { $cost = array($cost); }); + array_walk($costs, function (&$cost) { $cost = [$cost]; }); return $costs; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/BasePasswordEncoderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/BasePasswordEncoderTest.php index 0742f421..2251cfdf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/BasePasswordEncoderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/BasePasswordEncoderTest.php @@ -35,9 +35,9 @@ class BasePasswordEncoderTest extends TestCase public function testDemergePasswordAndSalt() { - $this->assertEquals(array('password', 'salt'), $this->invokeDemergePasswordAndSalt('password{salt}')); - $this->assertEquals(array('password', ''), $this->invokeDemergePasswordAndSalt('password')); - $this->assertEquals(array('', ''), $this->invokeDemergePasswordAndSalt('')); + $this->assertEquals(['password', 'salt'], $this->invokeDemergePasswordAndSalt('password{salt}')); + $this->assertEquals(['password', ''], $this->invokeDemergePasswordAndSalt('password')); + $this->assertEquals(['', ''], $this->invokeDemergePasswordAndSalt('')); } public function testMergePasswordAndSalt() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php index 9a56b838..ae8467af 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php @@ -22,10 +22,10 @@ class EncoderFactoryTest extends TestCase { public function testGetEncoderWithMessageDigestEncoder() { - $factory = new EncoderFactory(array('Symfony\Component\Security\Core\User\UserInterface' => array( + $factory = new EncoderFactory(['Symfony\Component\Security\Core\User\UserInterface' => [ 'class' => 'Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder', - 'arguments' => array('sha512', true, 5), - ))); + 'arguments' => ['sha512', true, 5], + ]]); $encoder = $factory->getEncoder($this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock()); $expectedEncoder = new MessageDigestPasswordEncoder('sha512', true, 5); @@ -35,9 +35,9 @@ class EncoderFactoryTest extends TestCase public function testGetEncoderWithService() { - $factory = new EncoderFactory(array( + $factory = new EncoderFactory([ 'Symfony\Component\Security\Core\User\UserInterface' => new MessageDigestPasswordEncoder('sha1'), - )); + ]); $encoder = $factory->getEncoder($this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock()); $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); @@ -50,9 +50,9 @@ class EncoderFactoryTest extends TestCase public function testGetEncoderWithClassName() { - $factory = new EncoderFactory(array( + $factory = new EncoderFactory([ 'Symfony\Component\Security\Core\User\UserInterface' => new MessageDigestPasswordEncoder('sha1'), - )); + ]); $encoder = $factory->getEncoder('Symfony\Component\Security\Core\Tests\Encoder\SomeChildUser'); $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); @@ -61,9 +61,9 @@ class EncoderFactoryTest extends TestCase public function testGetEncoderConfiguredForConcreteClassWithService() { - $factory = new EncoderFactory(array( + $factory = new EncoderFactory([ 'Symfony\Component\Security\Core\User\User' => new MessageDigestPasswordEncoder('sha1'), - )); + ]); $encoder = $factory->getEncoder(new User('user', 'pass')); $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); @@ -72,9 +72,9 @@ class EncoderFactoryTest extends TestCase public function testGetEncoderConfiguredForConcreteClassWithClassName() { - $factory = new EncoderFactory(array( + $factory = new EncoderFactory([ 'Symfony\Component\Security\Core\Tests\Encoder\SomeUser' => new MessageDigestPasswordEncoder('sha1'), - )); + ]); $encoder = $factory->getEncoder('Symfony\Component\Security\Core\Tests\Encoder\SomeChildUser'); $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); @@ -83,10 +83,10 @@ class EncoderFactoryTest extends TestCase public function testGetNamedEncoderForEncoderAware() { - $factory = new EncoderFactory(array( + $factory = new EncoderFactory([ 'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha256'), 'encoder_name' => new MessageDigestPasswordEncoder('sha1'), - )); + ]); $encoder = $factory->getEncoder(new EncAwareUser('user', 'pass')); $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); @@ -95,10 +95,10 @@ class EncoderFactoryTest extends TestCase public function testGetNullNamedEncoderForEncoderAware() { - $factory = new EncoderFactory(array( + $factory = new EncoderFactory([ 'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha1'), 'encoder_name' => new MessageDigestPasswordEncoder('sha256'), - )); + ]); $user = new EncAwareUser('user', 'pass'); $user->encoderName = null; @@ -112,10 +112,10 @@ class EncoderFactoryTest extends TestCase */ public function testGetInvalidNamedEncoderForEncoderAware() { - $factory = new EncoderFactory(array( + $factory = new EncoderFactory([ 'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha1'), 'encoder_name' => new MessageDigestPasswordEncoder('sha256'), - )); + ]); $user = new EncAwareUser('user', 'pass'); $user->encoderName = 'invalid_encoder_name'; @@ -124,10 +124,10 @@ class EncoderFactoryTest extends TestCase public function testGetEncoderForEncoderAwareWithClassName() { - $factory = new EncoderFactory(array( + $factory = new EncoderFactory([ 'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha1'), 'encoder_name' => new MessageDigestPasswordEncoder('sha256'), - )); + ]); $encoder = $factory->getEncoder('Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser'); $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Exception/CustomUserMessageAuthenticationExceptionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Exception/CustomUserMessageAuthenticationExceptionTest.php index 5776a991..32c76a45 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Exception/CustomUserMessageAuthenticationExceptionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Exception/CustomUserMessageAuthenticationExceptionTest.php @@ -12,16 +12,60 @@ namespace Symfony\Component\Security\Core\Tests\Exception; use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException; +class ChildCustomUserMessageAuthenticationException extends CustomUserMessageAuthenticationException +{ + public function serialize() + { + return serialize([$this->childMember, parent::serialize()]); + } + + public function unserialize($str) + { + list($this->childMember, $parentData) = unserialize($str); + + parent::unserialize($parentData); + } +} + class CustomUserMessageAuthenticationExceptionTest extends TestCase { public function testConstructWithSAfeMessage() { - $e = new CustomUserMessageAuthenticationException('SAFE MESSAGE', array('foo' => true)); + $e = new CustomUserMessageAuthenticationException('SAFE MESSAGE', ['foo' => true]); $this->assertEquals('SAFE MESSAGE', $e->getMessageKey()); - $this->assertEquals(array('foo' => true), $e->getMessageData()); + $this->assertEquals(['foo' => true], $e->getMessageData()); $this->assertEquals('SAFE MESSAGE', $e->getMessage()); } + + public function testSharedSerializedData() + { + $token = new AnonymousToken('foo', 'bar'); + + $exception = new CustomUserMessageAuthenticationException(); + $exception->setToken($token); + $exception->setSafeMessage('message', ['token' => $token]); + + $processed = unserialize(serialize($exception)); + $this->assertEquals($token, $processed->getToken()); + $this->assertEquals($token, $processed->getMessageData()['token']); + $this->assertSame($processed->getToken(), $processed->getMessageData()['token']); + } + + public function testSharedSerializedDataFromChild() + { + $token = new AnonymousToken('foo', 'bar'); + + $exception = new ChildCustomUserMessageAuthenticationException(); + $exception->childMember = $token; + $exception->setToken($token); + + $processed = unserialize(serialize($exception)); + $this->assertEquals($token, $processed->childMember); + $this->assertEquals($token, $processed->getToken()); + $this->assertSame($processed->getToken(), $processed->childMember); + } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Exception/UsernameNotFoundExceptionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Exception/UsernameNotFoundExceptionTest.php index b7e5c556..8e256aac 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Exception/UsernameNotFoundExceptionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Exception/UsernameNotFoundExceptionTest.php @@ -19,8 +19,8 @@ class UsernameNotFoundExceptionTest extends TestCase public function testGetMessageData() { $exception = new UsernameNotFoundException('Username could not be found.'); - $this->assertEquals(array('{{ username }}' => null), $exception->getMessageData()); + $this->assertEquals(['{{ username }}' => null], $exception->getMessageData()); $exception->setUsername('username'); - $this->assertEquals(array('{{ username }}' => 'username'), $exception->getMessageData()); + $this->assertEquals(['{{ username }}' => 'username'], $exception->getMessageData()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Role/RoleHierarchyTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Role/RoleHierarchyTest.php index 9e6b9d3a..4451f391 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Role/RoleHierarchyTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Role/RoleHierarchyTest.php @@ -19,15 +19,15 @@ class RoleHierarchyTest extends TestCase { public function testGetReachableRoles() { - $role = new RoleHierarchy(array( - 'ROLE_ADMIN' => array('ROLE_USER'), - 'ROLE_SUPER_ADMIN' => array('ROLE_ADMIN', 'ROLE_FOO'), - )); + $role = new RoleHierarchy([ + 'ROLE_ADMIN' => ['ROLE_USER'], + 'ROLE_SUPER_ADMIN' => ['ROLE_ADMIN', 'ROLE_FOO'], + ]); - $this->assertEquals(array(new Role('ROLE_USER')), $role->getReachableRoles(array(new Role('ROLE_USER')))); - $this->assertEquals(array(new Role('ROLE_FOO')), $role->getReachableRoles(array(new Role('ROLE_FOO')))); - $this->assertEquals(array(new Role('ROLE_ADMIN'), new Role('ROLE_USER')), $role->getReachableRoles(array(new Role('ROLE_ADMIN')))); - $this->assertEquals(array(new Role('ROLE_FOO'), new Role('ROLE_ADMIN'), new Role('ROLE_USER')), $role->getReachableRoles(array(new Role('ROLE_FOO'), new Role('ROLE_ADMIN')))); - $this->assertEquals(array(new Role('ROLE_SUPER_ADMIN'), new Role('ROLE_ADMIN'), new Role('ROLE_FOO'), new Role('ROLE_USER')), $role->getReachableRoles(array(new Role('ROLE_SUPER_ADMIN')))); + $this->assertEquals([new Role('ROLE_USER')], $role->getReachableRoles([new Role('ROLE_USER')])); + $this->assertEquals([new Role('ROLE_FOO')], $role->getReachableRoles([new Role('ROLE_FOO')])); + $this->assertEquals([new Role('ROLE_ADMIN'), new Role('ROLE_USER')], $role->getReachableRoles([new Role('ROLE_ADMIN')])); + $this->assertEquals([new Role('ROLE_FOO'), new Role('ROLE_ADMIN'), new Role('ROLE_USER')], $role->getReachableRoles([new Role('ROLE_FOO'), new Role('ROLE_ADMIN')])); + $this->assertEquals([new Role('ROLE_SUPER_ADMIN'), new Role('ROLE_ADMIN'), new Role('ROLE_FOO'), new Role('ROLE_USER')], $role->getReachableRoles([new Role('ROLE_SUPER_ADMIN')])); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/SecurityTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/SecurityTest.php index b2ba5d0d..7a1b572f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/SecurityTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/SecurityTest.php @@ -60,12 +60,12 @@ class SecurityTest extends TestCase public function getUserTests() { - yield array(null, null); + yield [null, null]; - yield array('string_username', null); + yield ['string_username', null]; $user = new User('nice_user', 'foo'); - yield array($user, $user); + yield [$user, $user]; } public function testIsGranted() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/ChainUserProviderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/ChainUserProviderTest.php index 37592735..067eef24 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/ChainUserProviderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/ChainUserProviderTest.php @@ -25,7 +25,7 @@ class ChainUserProviderTest extends TestCase ->expects($this->once()) ->method('loadUserByUsername') ->with($this->equalTo('foo')) - ->will($this->throwException(new UsernameNotFoundException('not found'))) + ->willThrowException(new UsernameNotFoundException('not found')) ; $provider2 = $this->getProvider(); @@ -36,7 +36,7 @@ class ChainUserProviderTest extends TestCase ->will($this->returnValue($account = $this->getAccount())) ; - $provider = new ChainUserProvider(array($provider1, $provider2)); + $provider = new ChainUserProvider([$provider1, $provider2]); $this->assertSame($account, $provider->loadUserByUsername('foo')); } @@ -50,7 +50,7 @@ class ChainUserProviderTest extends TestCase ->expects($this->once()) ->method('loadUserByUsername') ->with($this->equalTo('foo')) - ->will($this->throwException(new UsernameNotFoundException('not found'))) + ->willThrowException(new UsernameNotFoundException('not found')) ; $provider2 = $this->getProvider(); @@ -58,10 +58,10 @@ class ChainUserProviderTest extends TestCase ->expects($this->once()) ->method('loadUserByUsername') ->with($this->equalTo('foo')) - ->will($this->throwException(new UsernameNotFoundException('not found'))) + ->willThrowException(new UsernameNotFoundException('not found')) ; - $provider = new ChainUserProvider(array($provider1, $provider2)); + $provider = new ChainUserProvider([$provider1, $provider2]); $provider->loadUserByUsername('foo'); } @@ -71,7 +71,7 @@ class ChainUserProviderTest extends TestCase $provider1 ->expects($this->once()) ->method('refreshUser') - ->will($this->throwException(new UnsupportedUserException('unsupported'))) + ->willThrowException(new UnsupportedUserException('unsupported')) ; $provider2 = $this->getProvider(); @@ -81,7 +81,7 @@ class ChainUserProviderTest extends TestCase ->will($this->returnValue($account = $this->getAccount())) ; - $provider = new ChainUserProvider(array($provider1, $provider2)); + $provider = new ChainUserProvider([$provider1, $provider2]); $this->assertSame($account, $provider->refreshUser($this->getAccount())); } @@ -91,7 +91,7 @@ class ChainUserProviderTest extends TestCase $provider1 ->expects($this->once()) ->method('refreshUser') - ->will($this->throwException(new UsernameNotFoundException('not found'))) + ->willThrowException(new UsernameNotFoundException('not found')) ; $provider2 = $this->getProvider(); @@ -101,7 +101,7 @@ class ChainUserProviderTest extends TestCase ->will($this->returnValue($account = $this->getAccount())) ; - $provider = new ChainUserProvider(array($provider1, $provider2)); + $provider = new ChainUserProvider([$provider1, $provider2]); $this->assertSame($account, $provider->refreshUser($this->getAccount())); } @@ -114,17 +114,17 @@ class ChainUserProviderTest extends TestCase $provider1 ->expects($this->once()) ->method('refreshUser') - ->will($this->throwException(new UnsupportedUserException('unsupported'))) + ->willThrowException(new UnsupportedUserException('unsupported')) ; $provider2 = $this->getProvider(); $provider2 ->expects($this->once()) ->method('refreshUser') - ->will($this->throwException(new UnsupportedUserException('unsupported'))) + ->willThrowException(new UnsupportedUserException('unsupported')) ; - $provider = new ChainUserProvider(array($provider1, $provider2)); + $provider = new ChainUserProvider([$provider1, $provider2]); $provider->refreshUser($this->getAccount()); } @@ -146,7 +146,7 @@ class ChainUserProviderTest extends TestCase ->will($this->returnValue(true)) ; - $provider = new ChainUserProvider(array($provider1, $provider2)); + $provider = new ChainUserProvider([$provider1, $provider2]); $this->assertTrue($provider->supportsClass('foo')); } @@ -168,7 +168,7 @@ class ChainUserProviderTest extends TestCase ->will($this->returnValue(false)) ; - $provider = new ChainUserProvider(array($provider1, $provider2)); + $provider = new ChainUserProvider([$provider1, $provider2]); $this->assertFalse($provider->supportsClass('foo')); } @@ -178,7 +178,7 @@ class ChainUserProviderTest extends TestCase $provider1 ->expects($this->once()) ->method('refreshUser') - ->will($this->throwException(new UnsupportedUserException('unsupported'))) + ->willThrowException(new UnsupportedUserException('unsupported')) ; $provider2 = $this->getProvider(); @@ -188,7 +188,7 @@ class ChainUserProviderTest extends TestCase ->will($this->returnValue($account = $this->getAccount())) ; - $provider = new ChainUserProvider(new \ArrayObject(array($provider1, $provider2))); + $provider = new ChainUserProvider(new \ArrayObject([$provider1, $provider2])); $this->assertSame($account, $provider->refreshUser($this->getAccount())); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/InMemoryUserProviderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/InMemoryUserProviderTest.php index 6647a76a..b1ff3b66 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/InMemoryUserProviderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/InMemoryUserProviderTest.php @@ -23,7 +23,7 @@ class InMemoryUserProviderTest extends TestCase $user = $provider->loadUserByUsername('fabien'); $this->assertEquals('foo', $user->getPassword()); - $this->assertEquals(array('ROLE_USER'), $user->getRoles()); + $this->assertEquals(['ROLE_USER'], $user->getRoles()); $this->assertFalse($user->isEnabled()); } @@ -35,7 +35,7 @@ class InMemoryUserProviderTest extends TestCase $refreshedUser = $provider->refreshUser($user); $this->assertEquals('foo', $refreshedUser->getPassword()); - $this->assertEquals(array('ROLE_USER'), $refreshedUser->getRoles()); + $this->assertEquals(['ROLE_USER'], $refreshedUser->getRoles()); $this->assertFalse($refreshedUser->isEnabled()); $this->assertFalse($refreshedUser->isCredentialsNonExpired()); } @@ -45,13 +45,13 @@ class InMemoryUserProviderTest extends TestCase */ protected function createProvider() { - return new InMemoryUserProvider(array( - 'fabien' => array( + return new InMemoryUserProvider([ + 'fabien' => [ 'password' => 'foo', 'enabled' => false, - 'roles' => array('ROLE_USER'), - ), - )); + 'roles' => ['ROLE_USER'], + ], + ]); } public function testCreateUser() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/LdapUserProviderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/LdapUserProviderTest.php index 7d1da7c4..418475ac 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/LdapUserProviderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/LdapUserProviderTest.php @@ -33,7 +33,7 @@ class LdapUserProviderTest extends TestCase $ldap ->expects($this->once()) ->method('bind') - ->will($this->throwException(new ConnectionException())) + ->willThrowException(new ConnectionException()) ; $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com'); @@ -123,10 +123,10 @@ class LdapUserProviderTest extends TestCase ->expects($this->once()) ->method('offsetGet') ->with(0) - ->will($this->returnValue(new Entry('foo', array( - 'sAMAccountName' => array('foo'), - 'userpassword' => array('bar', 'baz'), - ) + ->will($this->returnValue(new Entry('foo', [ + 'sAMAccountName' => ['foo'], + 'userpassword' => ['bar', 'baz'], + ] ))) ; $result @@ -145,7 +145,7 @@ class LdapUserProviderTest extends TestCase ->will($this->returnValue($query)) ; - $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com', null, null, array(), 'sAMAccountName', '({uid_key}={username})', 'userpassword'); + $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com', null, null, [], 'sAMAccountName', '({uid_key}={username})', 'userpassword'); $this->assertInstanceOf( 'Symfony\Component\Security\Core\User\User', $provider->loadUserByUsername('foo') @@ -166,7 +166,7 @@ class LdapUserProviderTest extends TestCase ->expects($this->once()) ->method('offsetGet') ->with(0) - ->will($this->returnValue(new Entry('foo', array()))) + ->will($this->returnValue(new Entry('foo', []))) ; $result ->expects($this->once()) @@ -184,7 +184,7 @@ class LdapUserProviderTest extends TestCase ->will($this->returnValue($query)) ; - $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com', null, null, array(), 'sAMAccountName', '({uid_key}={username})'); + $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com', null, null, [], 'sAMAccountName', '({uid_key}={username})'); $this->assertInstanceOf( 'Symfony\Component\Security\Core\User\User', $provider->loadUserByUsername('foo') @@ -208,9 +208,9 @@ class LdapUserProviderTest extends TestCase ->expects($this->once()) ->method('offsetGet') ->with(0) - ->will($this->returnValue(new Entry('foo', array( - 'sAMAccountName' => array('foo'), - ) + ->will($this->returnValue(new Entry('foo', [ + 'sAMAccountName' => ['foo'], + ] ))) ; $result @@ -229,7 +229,7 @@ class LdapUserProviderTest extends TestCase ->will($this->returnValue($query)) ; - $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com', null, null, array(), 'sAMAccountName', '({uid_key}={username})', 'userpassword'); + $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com', null, null, [], 'sAMAccountName', '({uid_key}={username})', 'userpassword'); $this->assertInstanceOf( 'Symfony\Component\Security\Core\User\User', $provider->loadUserByUsername('foo') @@ -250,9 +250,9 @@ class LdapUserProviderTest extends TestCase ->expects($this->once()) ->method('offsetGet') ->with(0) - ->will($this->returnValue(new Entry('foo', array( - 'sAMAccountName' => array('foo'), - ) + ->will($this->returnValue(new Entry('foo', [ + 'sAMAccountName' => ['foo'], + ] ))) ; $result @@ -292,9 +292,9 @@ class LdapUserProviderTest extends TestCase ->expects($this->once()) ->method('offsetGet') ->with(0) - ->will($this->returnValue(new Entry('foo', array( - 'sAMAccountName' => array('foo'), - ) + ->will($this->returnValue(new Entry('foo', [ + 'sAMAccountName' => ['foo'], + ] ))) ; $result @@ -331,10 +331,10 @@ class LdapUserProviderTest extends TestCase ->expects($this->once()) ->method('offsetGet') ->with(0) - ->will($this->returnValue(new Entry('foo', array( - 'sAMAccountName' => array('foo'), - 'userpassword' => array('bar'), - ) + ->will($this->returnValue(new Entry('foo', [ + 'sAMAccountName' => ['foo'], + 'userpassword' => ['bar'], + ] ))) ; $result @@ -353,7 +353,7 @@ class LdapUserProviderTest extends TestCase ->will($this->returnValue($query)) ; - $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com', null, null, array(), 'sAMAccountName', '({uid_key}={username})', 'userpassword'); + $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com', null, null, [], 'sAMAccountName', '({uid_key}={username})', 'userpassword'); $this->assertInstanceOf( 'Symfony\Component\Security\Core\User\User', $provider->loadUserByUsername('foo') diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/UserTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/UserTest.php index fa9f3310..9a8d65d5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/UserTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/UserTest.php @@ -27,10 +27,10 @@ class UserTest extends TestCase public function testGetRoles() { $user = new User('fabien', 'superpass'); - $this->assertEquals(array(), $user->getRoles()); + $this->assertEquals([], $user->getRoles()); - $user = new User('fabien', 'superpass', array('ROLE_ADMIN')); - $this->assertEquals(array('ROLE_ADMIN'), $user->getRoles()); + $user = new User('fabien', 'superpass', ['ROLE_ADMIN']); + $this->assertEquals(['ROLE_ADMIN'], $user->getRoles()); } public function testGetPassword() @@ -56,7 +56,7 @@ class UserTest extends TestCase $user = new User('fabien', 'superpass'); $this->assertTrue($user->isAccountNonExpired()); - $user = new User('fabien', 'superpass', array(), true, false); + $user = new User('fabien', 'superpass', [], true, false); $this->assertFalse($user->isAccountNonExpired()); } @@ -65,7 +65,7 @@ class UserTest extends TestCase $user = new User('fabien', 'superpass'); $this->assertTrue($user->isCredentialsNonExpired()); - $user = new User('fabien', 'superpass', array(), true, true, false); + $user = new User('fabien', 'superpass', [], true, true, false); $this->assertFalse($user->isCredentialsNonExpired()); } @@ -74,7 +74,7 @@ class UserTest extends TestCase $user = new User('fabien', 'superpass'); $this->assertTrue($user->isAccountNonLocked()); - $user = new User('fabien', 'superpass', array(), true, true, true, false); + $user = new User('fabien', 'superpass', [], true, true, true, false); $this->assertFalse($user->isAccountNonLocked()); } @@ -83,7 +83,7 @@ class UserTest extends TestCase $user = new User('fabien', 'superpass'); $this->assertTrue($user->isEnabled()); - $user = new User('fabien', 'superpass', array(), false); + $user = new User('fabien', 'superpass', [], false); $this->assertFalse($user->isEnabled()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php index 22bed799..24c2c7ad 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php @@ -58,9 +58,9 @@ abstract class UserPasswordValidatorTest extends ConstraintValidatorTestCase public function testPasswordIsValid() { - $constraint = new UserPassword(array( + $constraint = new UserPassword([ 'message' => 'myMessage', - )); + ]); $this->encoder->expects($this->once()) ->method('isPasswordValid') @@ -74,9 +74,9 @@ abstract class UserPasswordValidatorTest extends ConstraintValidatorTestCase public function testPasswordIsNotValid() { - $constraint = new UserPassword(array( + $constraint = new UserPassword([ 'message' => 'myMessage', - )); + ]); $this->encoder->expects($this->once()) ->method('isPasswordValid') @@ -94,9 +94,9 @@ abstract class UserPasswordValidatorTest extends ConstraintValidatorTestCase */ public function testEmptyPasswordsAreNotValid($password) { - $constraint = new UserPassword(array( + $constraint = new UserPassword([ 'message' => 'myMessage', - )); + ]); $this->validator->validate($password, $constraint); @@ -106,10 +106,10 @@ abstract class UserPasswordValidatorTest extends ConstraintValidatorTestCase public function emptyPasswordData() { - return array( - array(null), - array(''), - ); + return [ + [null], + [''], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php index 199d95f9..a5ad3f10 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php @@ -32,12 +32,12 @@ class InMemoryUserProvider implements UserProviderInterface * * @param array $users An array of users */ - public function __construct(array $users = array()) + public function __construct(array $users = []) { foreach ($users as $username => $attributes) { $password = isset($attributes['password']) ? $attributes['password'] : null; $enabled = isset($attributes['enabled']) ? $attributes['enabled'] : true; - $roles = isset($attributes['roles']) ? $attributes['roles'] : array(); + $roles = isset($attributes['roles']) ? $attributes['roles'] : []; $user = new User($username, $password, $roles, $enabled, true, true, true); $this->createUser($user); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/LdapUserProvider.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/LdapUserProvider.php index e208c96f..f840024a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/LdapUserProvider.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/LdapUserProvider.php @@ -45,7 +45,7 @@ class LdapUserProvider implements UserProviderInterface * @param string $filter * @param string $passwordAttribute */ - public function __construct(LdapInterface $ldap, $baseDn, $searchDn = null, $searchPassword = null, array $defaultRoles = array(), $uidKey = 'sAMAccountName', $filter = '({uid_key}={username})', $passwordAttribute = null) + public function __construct(LdapInterface $ldap, $baseDn, $searchDn = null, $searchPassword = null, array $defaultRoles = [], $uidKey = 'sAMAccountName', $filter = '({uid_key}={username})', $passwordAttribute = null) { if (null === $uidKey) { $uidKey = 'sAMAccountName'; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/User.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/User.php index bc81f7ff..5998ec29 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/User.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/User.php @@ -28,7 +28,7 @@ final class User implements AdvancedUserInterface private $accountNonLocked; private $roles; - public function __construct($username, $password, array $roles = array(), $enabled = true, $userNonExpired = true, $credentialsNonExpired = true, $userNonLocked = true) + public function __construct($username, $password, array $roles = [], $enabled = true, $userNonExpired = true, $credentialsNonExpired = true, $userNonLocked = true) { if ('' === $username || null === $username) { throw new \InvalidArgumentException('The username cannot be empty.'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/UserInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/UserInterface.php index 613db8ec..264e0c1a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/UserInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/UserInterface.php @@ -38,7 +38,7 @@ interface UserInterface * * public function getRoles() * { - * return array('ROLE_USER'); + * return ['ROLE_USER']; * } * * Alternatively, the roles might be stored on a ``roles`` property, diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/CsrfTokenManagerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/CsrfTokenManagerTest.php index 2ec28214..b954fc03 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/CsrfTokenManagerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/CsrfTokenManagerTest.php @@ -163,7 +163,7 @@ class CsrfTokenManagerTest extends TestCase $storage = $this->getMockBuilder('Symfony\Component\Security\Csrf\TokenStorage\TokenStorageInterface')->getMock(); $requestStack = new RequestStack(); - $requestStack->push(new Request(array(), array(), array(), array(), array(), array('HTTPS' => 'on'))); + $requestStack->push(new Request([], [], [], [], [], ['HTTPS' => 'on'])); $manager = new CsrfTokenManager($generator, $storage, null, $requestStack); @@ -173,41 +173,41 @@ class CsrfTokenManagerTest extends TestCase public function getManagerGeneratorAndStorage() { - $data = array(); + $data = []; list($generator, $storage) = $this->getGeneratorAndStorage(); - $data[] = array('', new CsrfTokenManager($generator, $storage, ''), $storage, $generator); + $data[] = ['', new CsrfTokenManager($generator, $storage, ''), $storage, $generator]; list($generator, $storage) = $this->getGeneratorAndStorage(); - $data[] = array('https-', new CsrfTokenManager($generator, $storage), $storage, $generator); + $data[] = ['https-', new CsrfTokenManager($generator, $storage), $storage, $generator]; list($generator, $storage) = $this->getGeneratorAndStorage(); - $data[] = array('aNamespace-', new CsrfTokenManager($generator, $storage, 'aNamespace-'), $storage, $generator); + $data[] = ['aNamespace-', new CsrfTokenManager($generator, $storage, 'aNamespace-'), $storage, $generator]; $requestStack = new RequestStack(); - $requestStack->push(new Request(array(), array(), array(), array(), array(), array('HTTPS' => 'on'))); + $requestStack->push(new Request([], [], [], [], [], ['HTTPS' => 'on'])); list($generator, $storage) = $this->getGeneratorAndStorage(); - $data[] = array('https-', new CsrfTokenManager($generator, $storage, $requestStack), $storage, $generator); + $data[] = ['https-', new CsrfTokenManager($generator, $storage, $requestStack), $storage, $generator]; list($generator, $storage) = $this->getGeneratorAndStorage(); - $data[] = array('generated-', new CsrfTokenManager($generator, $storage, function () { + $data[] = ['generated-', new CsrfTokenManager($generator, $storage, function () { return 'generated-'; - }), $storage, $generator); + }), $storage, $generator]; $requestStack = new RequestStack(); $requestStack->push(new Request()); list($generator, $storage) = $this->getGeneratorAndStorage(); - $data[] = array('', new CsrfTokenManager($generator, $storage, $requestStack), $storage, $generator); + $data[] = ['', new CsrfTokenManager($generator, $storage, $requestStack), $storage, $generator]; return $data; } private function getGeneratorAndStorage() { - return array( + return [ $this->getMockBuilder('Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface')->getMock(), $this->getMockBuilder('Symfony\Component\Security\Csrf\TokenStorage\TokenStorageInterface')->getMock(), - ); + ]; } protected function setUp() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php index c8d31093..86fb6e6b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php @@ -31,7 +31,7 @@ class NativeSessionTokenStorageTest extends TestCase protected function setUp() { - $_SESSION = array(); + $_SESSION = []; $this->storage = new NativeSessionTokenStorage(self::SESSION_NAMESPACE); } @@ -40,7 +40,7 @@ class NativeSessionTokenStorageTest extends TestCase { $this->storage->setToken('token_id', 'TOKEN'); - $this->assertSame(array(self::SESSION_NAMESPACE => array('token_id' => 'TOKEN')), $_SESSION); + $this->assertSame([self::SESSION_NAMESPACE => ['token_id' => 'TOKEN']], $_SESSION); } public function testStoreTokenInClosedSessionWithExistingSessionId() @@ -52,7 +52,7 @@ class NativeSessionTokenStorageTest extends TestCase $this->storage->setToken('token_id', 'TOKEN'); $this->assertSame(PHP_SESSION_ACTIVE, session_status()); - $this->assertSame(array(self::SESSION_NAMESPACE => array('token_id' => 'TOKEN')), $_SESSION); + $this->assertSame([self::SESSION_NAMESPACE => ['token_id' => 'TOKEN']], $_SESSION); } public function testStoreTokenInActiveSession() @@ -61,7 +61,7 @@ class NativeSessionTokenStorageTest extends TestCase $this->storage->setToken('token_id', 'TOKEN'); - $this->assertSame(array(self::SESSION_NAMESPACE => array('token_id' => 'TOKEN')), $_SESSION); + $this->assertSame([self::SESSION_NAMESPACE => ['token_id' => 'TOKEN']], $_SESSION); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/AuthenticatorInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/AuthenticatorInterface.php index f68b8d6f..90df7610 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/AuthenticatorInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/AuthenticatorInterface.php @@ -44,14 +44,14 @@ interface AuthenticatorInterface extends GuardAuthenticatorInterface * * For example, for a form login, you might: * - * return array( + * return [ * 'username' => $request->request->get('_username'), * 'password' => $request->request->get('_password'), - * ); + * ]; * * Or for an API token that's on a header, you might use: * - * return array('api_key' => $request->headers->get('X-API-TOKEN')); + * return ['api_key' => $request->headers->get('X-API-TOKEN')]; * * @param Request $request * diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php index 02864f37..ed21e997 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php @@ -67,7 +67,7 @@ class GuardAuthenticationListener implements ListenerInterface public function handle(GetResponseEvent $event) { if (null !== $this->logger) { - $context = array('firewall_key' => $this->providerKey); + $context = ['firewall_key' => $this->providerKey]; if ($this->guardAuthenticators instanceof \Countable || \is_array($this->guardAuthenticators)) { $context['authenticators'] = \count($this->guardAuthenticators); @@ -85,7 +85,7 @@ class GuardAuthenticationListener implements ListenerInterface if ($event->hasResponse()) { if (null !== $this->logger) { - $this->logger->debug('The "{authenticator}" authenticator set the response. Any later authenticator will not be called', array('authenticator' => \get_class($guardAuthenticator))); + $this->logger->debug('The "{authenticator}" authenticator set the response. Any later authenticator will not be called', ['authenticator' => \get_class($guardAuthenticator)]); } break; @@ -97,13 +97,17 @@ class GuardAuthenticationListener implements ListenerInterface { $request = $event->getRequest(); try { - if (null !== $this->logger) { - $this->logger->debug('Calling getCredentials() on guard authenticator.', array('firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator))); - } - // abort the execution of the authenticator if it doesn't support the request if ($guardAuthenticator instanceof AuthenticatorInterface) { + if (null !== $this->logger) { + $this->logger->debug('Checking support on guard authenticator.', ['firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator)]); + } + if (!$guardAuthenticator->supports($request)) { + if (null !== $this->logger) { + $this->logger->debug('Guard authenticator does not support the request.', ['firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator)]); + } + return; } // as there was a support for given request, @@ -114,6 +118,10 @@ class GuardAuthenticationListener implements ListenerInterface $credentialsCanBeNull = true; } + if (null !== $this->logger) { + $this->logger->debug('Calling getCredentials() on guard authenticator.', ['firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator)]); + } + // allow the authenticator to fetch authentication info from the request $credentials = $guardAuthenticator->getCredentials($request); @@ -136,14 +144,14 @@ class GuardAuthenticationListener implements ListenerInterface $token = new PreAuthenticationGuardToken($credentials, $uniqueGuardKey); if (null !== $this->logger) { - $this->logger->debug('Passing guard token information to the GuardAuthenticationProvider', array('firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator))); + $this->logger->debug('Passing guard token information to the GuardAuthenticationProvider', ['firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator)]); } // pass the token into the AuthenticationManager system // this indirectly calls GuardAuthenticationProvider::authenticate() $token = $this->authenticationManager->authenticate($token); if (null !== $this->logger) { - $this->logger->info('Guard authentication successful!', array('token' => $token, 'authenticator' => \get_class($guardAuthenticator))); + $this->logger->info('Guard authentication successful!', ['token' => $token, 'authenticator' => \get_class($guardAuthenticator)]); } // sets the token on the token storage, etc @@ -152,7 +160,7 @@ class GuardAuthenticationListener implements ListenerInterface // oh no! Authentication failed! if (null !== $this->logger) { - $this->logger->info('Guard authentication failed.', array('exception' => $e, 'authenticator' => \get_class($guardAuthenticator))); + $this->logger->info('Guard authentication failed.', ['exception' => $e, 'authenticator' => \get_class($guardAuthenticator)]); } $response = $this->guardHandler->handleAuthenticationFailure($e, $request, $guardAuthenticator, $this->providerKey); @@ -168,13 +176,13 @@ class GuardAuthenticationListener implements ListenerInterface $response = $this->guardHandler->handleAuthenticationSuccess($token, $request, $guardAuthenticator, $this->providerKey); if ($response instanceof Response) { if (null !== $this->logger) { - $this->logger->debug('Guard authenticator set success response.', array('response' => $response, 'authenticator' => \get_class($guardAuthenticator))); + $this->logger->debug('Guard authenticator set success response.', ['response' => $response, 'authenticator' => \get_class($guardAuthenticator)]); } $event->setResponse($response); } else { if (null !== $this->logger) { - $this->logger->debug('Guard authenticator set no success response: request continues.', array('authenticator' => \get_class($guardAuthenticator))); + $this->logger->debug('Guard authenticator set no success response: request continues.', ['authenticator' => \get_class($guardAuthenticator)]); } } @@ -198,7 +206,7 @@ class GuardAuthenticationListener implements ListenerInterface { if (null === $this->rememberMeServices) { if (null !== $this->logger) { - $this->logger->debug('Remember me skipped: it is not configured for the firewall.', array('authenticator' => \get_class($guardAuthenticator))); + $this->logger->debug('Remember me skipped: it is not configured for the firewall.', ['authenticator' => \get_class($guardAuthenticator)]); } return; @@ -206,7 +214,7 @@ class GuardAuthenticationListener implements ListenerInterface if (!$guardAuthenticator->supportsRememberMe()) { if (null !== $this->logger) { - $this->logger->debug('Remember me skipped: your authenticator does not support it.', array('authenticator' => \get_class($guardAuthenticator))); + $this->logger->debug('Remember me skipped: your authenticator does not support it.', ['authenticator' => \get_class($guardAuthenticator)]); } return; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php index b962b7f1..1cdcf6b9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php @@ -42,7 +42,7 @@ class GuardAuthenticatorHandler /** * @param array $statelessProviderKeys An array of provider/firewall keys that are "stateless" and so do not need the session migrated on success */ - public function __construct(TokenStorageInterface $tokenStorage, EventDispatcherInterface $eventDispatcher = null, array $statelessProviderKeys = array()) + public function __construct(TokenStorageInterface $tokenStorage, EventDispatcherInterface $eventDispatcher = null, array $statelessProviderKeys = []) { $this->tokenStorage = $tokenStorage; $this->dispatcher = $eventDispatcher; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/GuardAuthenticatorInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/GuardAuthenticatorInterface.php index 5f6b6bd3..3a9828df 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/GuardAuthenticatorInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/GuardAuthenticatorInterface.php @@ -43,17 +43,17 @@ interface GuardAuthenticatorInterface extends AuthenticationEntryPointInterface * For example, for a form login, you might: * * if ($request->request->has('_username')) { - * return array( + * return [ * 'username' => $request->request->get('_username'), * 'password' => $request->request->get('_password'), - * ); + * ]; * } else { * return; * } * * Or for an API token that's on a header, you might use: * - * return array('api_key' => $request->headers->get('X-API-TOKEN')); + * return ['api_key' => $request->headers->get('X-API-TOKEN')]; * * @param Request $request * diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Authenticator/FormLoginAuthenticatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Authenticator/FormLoginAuthenticatorTest.php index db26bc2e..ca472f87 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Authenticator/FormLoginAuthenticatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Authenticator/FormLoginAuthenticatorTest.php @@ -129,8 +129,8 @@ class FormLoginAuthenticatorTest extends TestCase protected function setUp() { - $this->requestWithoutSession = new Request(array(), array(), array(), array(), array(), array()); - $this->requestWithSession = new Request(array(), array(), array(), array(), array(), array()); + $this->requestWithoutSession = new Request([], [], [], [], [], []); + $this->requestWithSession = new Request([], [], [], [], [], []); $session = $this->getMockBuilder('Symfony\\Component\\HttpFoundation\\Session\\SessionInterface') ->disableOriginalConstructor() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php index ba874bcb..fa4e9ef6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php @@ -41,7 +41,7 @@ class GuardAuthenticationListenerTest extends TestCase $authenticateToken = $this->getMockBuilder(TokenInterface::class)->getMock(); $providerKey = 'my_firewall'; - $credentials = array('username' => 'weaverryan', 'password' => 'all_your_base'); + $credentials = ['username' => 'weaverryan', 'password' => 'all_your_base']; $authenticator ->expects($this->once()) @@ -77,7 +77,7 @@ class GuardAuthenticationListenerTest extends TestCase $this->guardAuthenticatorHandler, $this->authenticationManager, $providerKey, - array($authenticator), + [$authenticator], $this->logger ); @@ -117,7 +117,7 @@ class GuardAuthenticationListenerTest extends TestCase $this->guardAuthenticatorHandler, $this->authenticationManager, 'my_firewall', - array($authenticator1, $authenticator2), + [$authenticator1, $authenticator2], $this->logger ); @@ -139,7 +139,7 @@ class GuardAuthenticationListenerTest extends TestCase ->expects($this->once()) ->method('getCredentials') ->with($this->equalTo($this->request)) - ->will($this->returnValue(array('username' => 'anything_not_empty'))); + ->will($this->returnValue(['username' => 'anything_not_empty'])); $this->authenticationManager ->expects($this->once()) @@ -156,7 +156,7 @@ class GuardAuthenticationListenerTest extends TestCase $this->guardAuthenticatorHandler, $this->authenticationManager, $providerKey, - array($authenticator), + [$authenticator], $this->logger ); @@ -185,7 +185,7 @@ class GuardAuthenticationListenerTest extends TestCase $authenticator ->expects($this->once()) ->method('getCredentials') - ->will($this->throwException($authException)); + ->willThrowException($authException); // this is not called $this->authenticationManager @@ -201,7 +201,7 @@ class GuardAuthenticationListenerTest extends TestCase $this->guardAuthenticatorHandler, $this->authenticationManager, $providerKey, - array($authenticator), + [$authenticator], $this->logger ); @@ -234,7 +234,7 @@ class GuardAuthenticationListenerTest extends TestCase $this->guardAuthenticatorHandler, $this->authenticationManager, $providerKey, - array($authenticatorA), + [$authenticatorA], $this->logger ); @@ -250,7 +250,7 @@ class GuardAuthenticationListenerTest extends TestCase $authenticateToken = $this->getMockBuilder(TokenInterface::class)->getMock(); $providerKey = 'my_firewall'; - $credentials = array('username' => 'weaverryan', 'password' => 'all_your_base'); + $credentials = ['username' => 'weaverryan', 'password' => 'all_your_base']; $authenticator ->expects($this->once()) @@ -282,7 +282,7 @@ class GuardAuthenticationListenerTest extends TestCase $this->guardAuthenticatorHandler, $this->authenticationManager, $providerKey, - array($authenticator), + [$authenticator], $this->logger ); @@ -326,7 +326,7 @@ class GuardAuthenticationListenerTest extends TestCase $this->guardAuthenticatorHandler, $this->authenticationManager, $providerKey, - array($authenticatorA, $authenticatorB), + [$authenticatorA, $authenticatorB], $this->logger ); @@ -352,7 +352,7 @@ class GuardAuthenticationListenerTest extends TestCase $this->guardAuthenticatorHandler, $this->authenticationManager, $providerKey, - array($authenticator), + [$authenticator], $this->logger ); @@ -382,7 +382,7 @@ class GuardAuthenticationListenerTest extends TestCase $this->guardAuthenticatorHandler, $this->authenticationManager, $providerKey, - array($authenticator), + [$authenticator], $this->logger ); @@ -413,7 +413,7 @@ class GuardAuthenticationListenerTest extends TestCase $this->guardAuthenticatorHandler, $this->authenticationManager, $providerKey, - array($authenticator), + [$authenticator], $this->logger ); @@ -430,11 +430,11 @@ class GuardAuthenticationListenerTest extends TestCase ->disableOriginalConstructor() ->getMock(); - $this->request = new Request(array(), array(), array(), array(), array(), array()); + $this->request = new Request([], [], [], [], [], []); $this->event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent') ->disableOriginalConstructor() - ->setMethods(array('getRequest')) + ->setMethods(['getRequest']) ->getMock(); $this->event ->expects($this->any()) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/GuardAuthenticatorHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/GuardAuthenticatorHandlerTest.php index 6f0bb624..9950426d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/GuardAuthenticatorHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/GuardAuthenticatorHandlerTest.php @@ -110,11 +110,11 @@ class GuardAuthenticatorHandlerTest extends TestCase public function getTokenClearingTests() { - $tests = array(); + $tests = []; // correct token class and matching firewall => clear the token - $tests[] = array('Symfony\Component\Security\Guard\Token\PostAuthenticationGuardToken', 'the_firewall_key', 'the_firewall_key'); - $tests[] = array('Symfony\Component\Security\Guard\Token\PostAuthenticationGuardToken', 'the_firewall_key', 'different_key'); - $tests[] = array('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken', 'the_firewall_key', 'the_firewall_key'); + $tests[] = ['Symfony\Component\Security\Guard\Token\PostAuthenticationGuardToken', 'the_firewall_key', 'the_firewall_key']; + $tests[] = ['Symfony\Component\Security\Guard\Token\PostAuthenticationGuardToken', 'the_firewall_key', 'different_key']; + $tests[] = ['Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken', 'the_firewall_key', 'the_firewall_key']; return $tests; } @@ -151,7 +151,7 @@ class GuardAuthenticatorHandlerTest extends TestCase $this->sessionStrategy->expects($this->never()) ->method('onAuthentication'); - $handler = new GuardAuthenticatorHandler($this->tokenStorage, $this->dispatcher, array('some_provider_key')); + $handler = new GuardAuthenticatorHandler($this->tokenStorage, $this->dispatcher, ['some_provider_key']); $handler->setSessionAuthenticationStrategy($this->sessionStrategy); $handler->authenticateWithToken($this->token, $this->request, 'some_provider_key'); } @@ -161,7 +161,7 @@ class GuardAuthenticatorHandlerTest extends TestCase $this->tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); $this->token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); - $this->request = new Request(array(), array(), array(), array(), array(), array()); + $this->request = new Request([], [], [], [], [], []); $this->sessionStrategy = $this->getMockBuilder('Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface')->getMock(); $this->guardAuthenticator = $this->getMockBuilder(AuthenticatorInterface::class)->getMock(); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.php index 04c16dfd..a6636dd2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.php @@ -35,7 +35,7 @@ class GuardAuthenticationProviderTest extends TestCase $authenticatorA = $this->getMockBuilder(AuthenticatorInterface::class)->getMock(); $authenticatorB = $this->getMockBuilder(AuthenticatorInterface::class)->getMock(); $authenticatorC = $this->getMockBuilder(AuthenticatorInterface::class)->getMock(); - $authenticators = array($authenticatorA, $authenticatorB, $authenticatorC); + $authenticators = [$authenticatorA, $authenticatorB, $authenticatorC]; // called 2 times - for authenticator A and B (stops on B because of match) $this->preAuthenticationToken->expects($this->exactly(2)) @@ -43,10 +43,10 @@ class GuardAuthenticationProviderTest extends TestCase // it will return the "1" index, which will match authenticatorB ->will($this->returnValue('my_cool_firewall_1')); - $enteredCredentials = array( + $enteredCredentials = [ 'username' => '_weaverryan_test_user', 'password' => 'guard_auth_ftw', - ); + ]; $this->preAuthenticationToken->expects($this->atLeastOnce()) ->method('getCredentials') ->will($this->returnValue($enteredCredentials)); @@ -97,7 +97,7 @@ class GuardAuthenticationProviderTest extends TestCase $authenticatorA = $this->getMockBuilder('Symfony\Component\Security\Guard\GuardAuthenticatorInterface')->getMock(); $authenticatorB = $this->getMockBuilder('Symfony\Component\Security\Guard\GuardAuthenticatorInterface')->getMock(); $authenticatorC = $this->getMockBuilder('Symfony\Component\Security\Guard\GuardAuthenticatorInterface')->getMock(); - $authenticators = array($authenticatorA, $authenticatorB, $authenticatorC); + $authenticators = [$authenticatorA, $authenticatorB, $authenticatorC]; // called 2 times - for authenticator A and B (stops on B because of match) $this->preAuthenticationToken->expects($this->exactly(2)) @@ -105,10 +105,10 @@ class GuardAuthenticationProviderTest extends TestCase // it will return the "1" index, which will match authenticatorB ->will($this->returnValue('my_cool_firewall_1')); - $enteredCredentials = array( + $enteredCredentials = [ 'username' => '_weaverryan_test_user', 'password' => 'guard_auth_ftw', - ); + ]; $this->preAuthenticationToken->expects($this->atLeastOnce()) ->method('getCredentials') ->will($this->returnValue($enteredCredentials)); @@ -178,7 +178,7 @@ class GuardAuthenticationProviderTest extends TestCase // authentication fails :( ->will($this->returnValue(null)); - $provider = new GuardAuthenticationProvider(array($authenticator), $this->userProvider, $providerKey, $this->userChecker); + $provider = new GuardAuthenticationProvider([$authenticator], $this->userProvider, $providerKey, $this->userChecker); $provider->authenticate($this->preAuthenticationToken); } @@ -192,10 +192,10 @@ class GuardAuthenticationProviderTest extends TestCase // create a token and mark it as NOT authenticated anymore // this mimics what would happen if a user "changed" between request $mockedUser = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); - $token = new PostAuthenticationGuardToken($mockedUser, $providerKey, array('ROLE_USER')); + $token = new PostAuthenticationGuardToken($mockedUser, $providerKey, ['ROLE_USER']); $token->setAuthenticated(false); - $provider = new GuardAuthenticationProvider(array(), $this->userProvider, $providerKey, $this->userChecker); + $provider = new GuardAuthenticationProvider([], $this->userProvider, $providerKey, $this->userChecker); $actualToken = $provider->authenticate($token); } @@ -203,7 +203,7 @@ class GuardAuthenticationProviderTest extends TestCase { $authenticatorA = $this->getMockBuilder(AuthenticatorInterface::class)->getMock(); $authenticatorB = $this->getMockBuilder(AuthenticatorInterface::class)->getMock(); - $authenticators = array($authenticatorA, $authenticatorB); + $authenticators = [$authenticatorA, $authenticatorB]; $mockedUser = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); $provider = new GuardAuthenticationProvider($authenticators, $this->userProvider, 'first_firewall', $this->userChecker); @@ -224,7 +224,7 @@ class GuardAuthenticationProviderTest extends TestCase public function testAuthenticateFailsOnNonOriginatingToken() { $authenticatorA = $this->getMockBuilder(AuthenticatorInterface::class)->getMock(); - $authenticators = array($authenticatorA); + $authenticators = [$authenticatorA]; $mockedUser = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); $provider = new GuardAuthenticationProvider($authenticators, $this->userProvider, 'first_firewall', $this->userChecker); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Token/PostAuthenticationGuardToken.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Token/PostAuthenticationGuardToken.php index f566b712..17e01ebf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Token/PostAuthenticationGuardToken.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Token/PostAuthenticationGuardToken.php @@ -58,7 +58,7 @@ class PostAuthenticationGuardToken extends AbstractToken implements GuardTokenIn */ public function getCredentials() { - return array(); + return []; } /** @@ -76,7 +76,9 @@ class PostAuthenticationGuardToken extends AbstractToken implements GuardTokenIn */ public function serialize() { - return serialize(array($this->providerKey, parent::serialize())); + $serialized = [$this->providerKey, parent::serialize(true)]; + + return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null); } /** @@ -84,7 +86,7 @@ class PostAuthenticationGuardToken extends AbstractToken implements GuardTokenIn */ public function unserialize($serialized) { - list($this->providerKey, $parentStr) = unserialize($serialized); + list($this->providerKey, $parentStr) = \is_array($serialized) ? $serialized : unserialize($serialized); parent::unserialize($parentStr); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Token/PreAuthenticationGuardToken.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Token/PreAuthenticationGuardToken.php index e1b39417..b9aa53bf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Token/PreAuthenticationGuardToken.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Token/PreAuthenticationGuardToken.php @@ -36,7 +36,7 @@ class PreAuthenticationGuardToken extends AbstractToken implements GuardTokenInt $this->credentials = $credentials; $this->guardProviderKey = $guardProviderKey; - parent::__construct(array()); + parent::__construct([]); // never authenticated parent::setAuthenticated(false); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/composer.json b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/composer.json index de14c9b5..5d38065f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/composer.json +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/composer.json @@ -17,7 +17,7 @@ ], "require": { "php": "^5.5.9|>=7.0.8", - "symfony/security-core": "~2.8|~3.0|~4.0", + "symfony/security-core": "~3.4.22|^4.2.3", "symfony/security-http": "^3.3.13|~4.0" }, "require-dev": { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/AccessMap.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/AccessMap.php index 2f375733..04c06da1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/AccessMap.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/AccessMap.php @@ -22,16 +22,16 @@ use Symfony\Component\HttpFoundation\RequestMatcherInterface; */ class AccessMap implements AccessMapInterface { - private $map = array(); + private $map = []; /** * @param RequestMatcherInterface $requestMatcher A RequestMatcherInterface instance * @param array $attributes An array of attributes to pass to the access decision manager (like roles) * @param string|null $channel The channel to enforce (http, https, or null) */ - public function add(RequestMatcherInterface $requestMatcher, array $attributes = array(), $channel = null) + public function add(RequestMatcherInterface $requestMatcher, array $attributes = [], $channel = null) { - $this->map[] = array($requestMatcher, $attributes, $channel); + $this->map[] = [$requestMatcher, $attributes, $channel]; } /** @@ -41,10 +41,10 @@ class AccessMap implements AccessMapInterface { foreach ($this->map as $elements) { if (null === $elements[0] || $elements[0]->matches($request)) { - return array($elements[1], $elements[2]); + return [$elements[1], $elements[2]]; } } - return array(null, null); + return [null, null]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php index ad1e4cb1..cca62fd4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php @@ -35,14 +35,14 @@ class DefaultAuthenticationFailureHandler implements AuthenticationFailureHandle protected $httpUtils; protected $logger; protected $options; - protected $defaultOptions = array( + protected $defaultOptions = [ 'failure_path' => null, 'failure_forward' => false, 'login_path' => '/login', 'failure_path_parameter' => '_failure_path', - ); + ]; - public function __construct(HttpKernelInterface $httpKernel, HttpUtils $httpUtils, array $options = array(), LoggerInterface $logger = null) + public function __construct(HttpKernelInterface $httpKernel, HttpUtils $httpUtils, array $options = [], LoggerInterface $logger = null) { $this->httpKernel = $httpKernel; $this->httpUtils = $httpUtils; @@ -80,7 +80,7 @@ class DefaultAuthenticationFailureHandler implements AuthenticationFailureHandle if ($this->options['failure_forward']) { if (null !== $this->logger) { - $this->logger->debug('Authentication failure, forward triggered.', array('failure_path' => $this->options['failure_path'])); + $this->logger->debug('Authentication failure, forward triggered.', ['failure_path' => $this->options['failure_path']]); } $subRequest = $this->httpUtils->createRequest($request, $this->options['failure_path']); @@ -90,7 +90,7 @@ class DefaultAuthenticationFailureHandler implements AuthenticationFailureHandle } if (null !== $this->logger) { - $this->logger->debug('Authentication failure, redirect triggered.', array('failure_path' => $this->options['failure_path'])); + $this->logger->debug('Authentication failure, redirect triggered.', ['failure_path' => $this->options['failure_path']]); } $request->getSession()->set(Security::AUTHENTICATION_ERROR, $exception); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php index 38d16a6f..8b65dc9e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php @@ -31,19 +31,19 @@ class DefaultAuthenticationSuccessHandler implements AuthenticationSuccessHandle protected $httpUtils; protected $options; protected $providerKey; - protected $defaultOptions = array( + protected $defaultOptions = [ 'always_use_default_target_path' => false, 'default_target_path' => '/', 'login_path' => '/login', 'target_path_parameter' => '_target_path', 'use_referer' => false, - ); + ]; /** * @param HttpUtils $httpUtils * @param array $options Options for processing a successful authentication attempt */ - public function __construct(HttpUtils $httpUtils, array $options = array()) + public function __construct(HttpUtils $httpUtils, array $options = []) { $this->httpUtils = $httpUtils; $this->setOptions($options); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/SimpleAuthenticationHandler.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/SimpleAuthenticationHandler.php index 484e60fe..1d03e23a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/SimpleAuthenticationHandler.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/SimpleAuthenticationHandler.php @@ -55,7 +55,7 @@ class SimpleAuthenticationHandler implements AuthenticationFailureHandlerInterfa { if ($this->simpleAuthenticator instanceof AuthenticationSuccessHandlerInterface) { if ($this->logger) { - $this->logger->debug('Selected an authentication success handler.', array('handler' => \get_class($this->simpleAuthenticator))); + $this->logger->debug('Selected an authentication success handler.', ['handler' => \get_class($this->simpleAuthenticator)]); } $response = $this->simpleAuthenticator->onAuthenticationSuccess($request, $token); @@ -82,7 +82,7 @@ class SimpleAuthenticationHandler implements AuthenticationFailureHandlerInterfa { if ($this->simpleAuthenticator instanceof AuthenticationFailureHandlerInterface) { if ($this->logger) { - $this->logger->debug('Selected an authentication failure handler.', array('handler' => \get_class($this->simpleAuthenticator))); + $this->logger->debug('Selected an authentication failure handler.', ['handler' => \get_class($this->simpleAuthenticator)]); } $response = $this->simpleAuthenticator->onAuthenticationFailure($request, $exception); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php index b3b7fa5a..160cd927 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php @@ -58,7 +58,7 @@ class DigestAuthenticationEntryPoint implements AuthenticationEntryPointInterfac } if (null !== $this->logger) { - $this->logger->debug('WWW-Authenticate header sent.', array('header' => $authenticateHeader)); + $this->logger->debug('WWW-Authenticate header sent.', ['header' => $authenticateHeader]); } $response = new Response(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall.php index a0a2aa84..112604c2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall.php @@ -99,10 +99,10 @@ class Firewall implements EventSubscriberInterface */ public static function getSubscribedEvents() { - return array( - KernelEvents::REQUEST => array('onKernelRequest', 8), + return [ + KernelEvents::REQUEST => ['onKernelRequest', 8], KernelEvents::FINISH_REQUEST => 'onKernelFinishRequest', - ); + ]; } protected function handleRequest(GetResponseEvent $event, $listeners) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php index 1227c116..252669a8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php @@ -78,7 +78,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface * * @throws \InvalidArgumentException */ - public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, $providerKey, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options = array(), LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null) + public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, $providerKey, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options = [], LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null) { if (empty($providerKey)) { throw new \InvalidArgumentException('$providerKey must not be empty.'); @@ -90,7 +90,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface $this->providerKey = $providerKey; $this->successHandler = $successHandler; $this->failureHandler = $failureHandler; - $this->options = array_merge(array( + $this->options = array_merge([ 'check_path' => '/login_check', 'login_path' => '/login', 'always_use_default_target_path' => false, @@ -100,7 +100,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface 'failure_path' => null, 'failure_forward' => false, 'require_previous_session' => true, - ), $options); + ], $options); $this->logger = $logger; $this->dispatcher = $dispatcher; $this->httpUtils = $httpUtils; @@ -183,7 +183,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface private function onFailure(Request $request, AuthenticationException $failed) { if (null !== $this->logger) { - $this->logger->info('Authentication request failed.', array('exception' => $failed)); + $this->logger->info('Authentication request failed.', ['exception' => $failed]); } $token = $this->tokenStorage->getToken(); @@ -203,7 +203,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface private function onSuccess(Request $request, TokenInterface $token) { if (null !== $this->logger) { - $this->logger->info('User has been authenticated successfully.', array('username' => $token->getUsername())); + $this->logger->info('User has been authenticated successfully.', ['username' => $token->getUsername()]); } $this->tokenStorage->setToken($token); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php index 7e580e7d..3bf597b6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php @@ -66,7 +66,7 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface } if (null !== $this->logger) { - $this->logger->debug('Checking current security token.', array('token' => (string) $this->tokenStorage->getToken())); + $this->logger->debug('Checking current security token.', ['token' => (string) $this->tokenStorage->getToken()]); } if (null !== $token = $this->tokenStorage->getToken()) { @@ -76,14 +76,14 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface } if (null !== $this->logger) { - $this->logger->debug('Trying to pre-authenticate user.', array('username' => (string) $user)); + $this->logger->debug('Trying to pre-authenticate user.', ['username' => (string) $user]); } try { $token = $this->authenticationManager->authenticate(new PreAuthenticatedToken($user, $credentials, $this->providerKey)); if (null !== $this->logger) { - $this->logger->info('Pre-authentication successful.', array('token' => (string) $token)); + $this->logger->info('Pre-authentication successful.', ['token' => (string) $token]); } $this->migrateSession($request, $token); @@ -119,7 +119,7 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface $this->tokenStorage->setToken(null); if (null !== $this->logger) { - $this->logger->info('Cleared security token due to an exception.', array('exception' => $exception)); + $this->logger->info('Cleared security token due to an exception.', ['exception' => $exception]); } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php index efd92f8c..cfa5a9f0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php @@ -49,7 +49,7 @@ class AnonymousAuthenticationListener implements ListenerInterface } try { - $token = new AnonymousToken($this->secret, 'anon.', array()); + $token = new AnonymousToken($this->secret, 'anon.', []); if (null !== $this->authenticationManager) { $token = $this->authenticationManager->authenticate($token); } @@ -61,7 +61,7 @@ class AnonymousAuthenticationListener implements ListenerInterface } } catch (AuthenticationException $failed) { if (null !== $this->logger) { - $this->logger->info('Anonymous authentication failed.', array('exception' => $failed)); + $this->logger->info('Anonymous authentication failed.', ['exception' => $failed]); } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php index d1f79c16..9329385f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php @@ -69,7 +69,7 @@ class BasicAuthenticationListener implements ListenerInterface } if (null !== $this->logger) { - $this->logger->info('Basic authentication Authorization header found for user.', array('username' => $username)); + $this->logger->info('Basic authentication Authorization header found for user.', ['username' => $username]); } try { @@ -85,7 +85,7 @@ class BasicAuthenticationListener implements ListenerInterface } if (null !== $this->logger) { - $this->logger->info('Basic authentication failed for user.', array('username' => $username, 'exception' => $e)); + $this->logger->info('Basic authentication failed for user.', ['username' => $username, 'exception' => $e]); } if ($this->ignoreFailure) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ContextListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ContextListener.php index cdaebbca..c6b89793 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ContextListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ContextListener.php @@ -79,7 +79,7 @@ class ContextListener implements ListenerInterface public function handle(GetResponseEvent $event) { if (!$this->registered && null !== $this->dispatcher && $event->isMasterRequest()) { - $this->dispatcher->addListener(KernelEvents::RESPONSE, array($this, 'onKernelResponse')); + $this->dispatcher->addListener(KernelEvents::RESPONSE, [$this, 'onKernelResponse']); $this->registered = true; } @@ -95,17 +95,17 @@ class ContextListener implements ListenerInterface $token = $this->safelyUnserialize($token); if (null !== $this->logger) { - $this->logger->debug('Read existing security token from the session.', array( + $this->logger->debug('Read existing security token from the session.', [ 'key' => $this->sessionKey, 'token_class' => \is_object($token) ? \get_class($token) : null, - )); + ]); } if ($token instanceof TokenInterface) { $token = $this->refreshUser($token); } elseif (null !== $token) { if (null !== $this->logger) { - $this->logger->warning('Expected a security token from the session, got something else.', array('key' => $this->sessionKey, 'received' => $token)); + $this->logger->warning('Expected a security token from the session, got something else.', ['key' => $this->sessionKey, 'received' => $token]); } $token = null; @@ -129,7 +129,7 @@ class ContextListener implements ListenerInterface return; } - $this->dispatcher->removeListener(KernelEvents::RESPONSE, array($this, 'onKernelResponse')); + $this->dispatcher->removeListener(KernelEvents::RESPONSE, [$this, 'onKernelResponse']); $this->registered = false; $session = $request->getSession(); @@ -141,7 +141,7 @@ class ContextListener implements ListenerInterface $session->set($this->sessionKey, serialize($token)); if (null !== $this->logger) { - $this->logger->debug('Stored the security token in the session.', array('key' => $this->sessionKey)); + $this->logger->debug('Stored the security token in the session.', ['key' => $this->sessionKey]); } } } @@ -170,7 +170,7 @@ class ContextListener implements ListenerInterface try { $refreshedUser = $provider->refreshUser($user); - $newToken = unserialize(serialize($token)); + $newToken = clone $token; $newToken->setUser($refreshedUser); // tokens can be deauthenticated if the user has been changed. @@ -179,7 +179,7 @@ class ContextListener implements ListenerInterface $userDeauthenticated = true; if (null !== $this->logger) { - $this->logger->debug('Cannot refresh token because user has changed.', array('username' => $refreshedUser->getUsername(), 'provider' => \get_class($provider))); + $this->logger->debug('Cannot refresh token because user has changed.', ['username' => $refreshedUser->getUsername(), 'provider' => \get_class($provider)]); } continue; @@ -191,7 +191,7 @@ class ContextListener implements ListenerInterface $token->setUser($refreshedUser); if (null !== $this->logger) { - $context = array('provider' => \get_class($provider), 'username' => $refreshedUser->getUsername()); + $context = ['provider' => \get_class($provider), 'username' => $refreshedUser->getUsername()]; foreach ($token->getRoles() as $role) { if ($role instanceof SwitchUserRole) { @@ -208,7 +208,7 @@ class ContextListener implements ListenerInterface // let's try the next user provider } catch (UsernameNotFoundException $e) { if (null !== $this->logger) { - $this->logger->warning('Username could not be found in the selected user provider.', array('username' => $e->getUsername(), 'provider' => \get_class($provider))); + $this->logger->warning('Username could not be found in the selected user provider.', ['username' => $e->getUsername(), 'provider' => \get_class($provider)]); } $userNotFoundByProvider = true; @@ -234,7 +234,7 @@ class ContextListener implements ListenerInterface { $e = $token = null; $prevUnserializeHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback'); - $prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = array()) use (&$prevErrorHandler) { + $prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler) { if (__FILE__ === $file) { throw new \UnexpectedValueException($msg, 0x37313bc); } @@ -254,7 +254,7 @@ class ContextListener implements ListenerInterface throw $e; } if ($this->logger) { - $this->logger->warning('Failed to unserialize the security token from the session.', array('key' => $this->sessionKey, 'received' => $serializedToken, 'exception' => $e)); + $this->logger->warning('Failed to unserialize the security token from the session.', ['key' => $this->sessionKey, 'received' => $serializedToken, 'exception' => $e]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php index 43754b52..693dbcd5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php @@ -79,7 +79,7 @@ class DigestAuthenticationListener implements ListenerInterface } if (null !== $this->logger) { - $this->logger->debug('Digest Authorization header received from user agent.', array('header' => $header)); + $this->logger->debug('Digest Authorization header received from user agent.', ['header' => $header]); } try { @@ -106,7 +106,7 @@ class DigestAuthenticationListener implements ListenerInterface if (!hash_equals($serverDigestMd5, $digestAuth->getResponse())) { if (null !== $this->logger) { - $this->logger->debug('Unexpected response from the DigestAuth received; is the header returning a clear text passwords?', array('expected' => $serverDigestMd5, 'received' => $digestAuth->getResponse())); + $this->logger->debug('Unexpected response from the DigestAuth received; is the header returning a clear text passwords?', ['expected' => $serverDigestMd5, 'received' => $digestAuth->getResponse()]); } $this->fail($event, $request, new BadCredentialsException('Incorrect response')); @@ -121,7 +121,7 @@ class DigestAuthenticationListener implements ListenerInterface } if (null !== $this->logger) { - $this->logger->info('Digest authentication successful.', array('username' => $digestAuth->getUsername(), 'received' => $digestAuth->getResponse())); + $this->logger->info('Digest authentication successful.', ['username' => $digestAuth->getUsername(), 'received' => $digestAuth->getResponse()]); } $token = new UsernamePasswordToken($user, $user->getPassword(), $this->providerKey); @@ -148,7 +148,7 @@ class DigestAuthenticationListener implements ListenerInterface } if (null !== $this->logger) { - $this->logger->info('Digest authentication failed.', array('exception' => $authException)); + $this->logger->info('Digest authentication failed.', ['exception' => $authException]); } $event->setResponse($this->authenticationEntryPoint->start($request, $authException)); @@ -169,7 +169,7 @@ class DigestAuthenticationListener implements ListenerInterface */ class DigestData { - private $elements = array(); + private $elements = []; private $header; private $nonceExpiryTime; @@ -193,12 +193,12 @@ class DigestData public function getUsername() { - return strtr($this->elements['username'], array('\\"' => '"', '\\\\' => '\\')); + return strtr($this->elements['username'], ['\\"' => '"', '\\\\' => '\\']); } public function validateAndDecode($entryPointKey, $expectedRealm) { - if ($keys = array_diff(array('username', 'realm', 'nonce', 'uri', 'response'), array_keys($this->elements))) { + if ($keys = array_diff(['username', 'realm', 'nonce', 'uri', 'response'], array_keys($this->elements))) { throw new BadCredentialsException(sprintf('Missing mandatory digest value; received header "%s" (%s)', $this->header, implode(', ', $keys))); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php index e23d4e2a..d1077214 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php @@ -71,7 +71,7 @@ class ExceptionListener */ public function register(EventDispatcherInterface $dispatcher) { - $dispatcher->addListener(KernelEvents::EXCEPTION, array($this, 'onKernelException'), 1); + $dispatcher->addListener(KernelEvents::EXCEPTION, [$this, 'onKernelException'], 1); } /** @@ -79,7 +79,7 @@ class ExceptionListener */ public function unregister(EventDispatcherInterface $dispatcher) { - $dispatcher->removeListener(KernelEvents::EXCEPTION, array($this, 'onKernelException')); + $dispatcher->removeListener(KernelEvents::EXCEPTION, [$this, 'onKernelException']); } /** @@ -102,7 +102,7 @@ class ExceptionListener private function handleAuthenticationException(GetResponseForExceptionEvent $event, AuthenticationException $exception) { if (null !== $this->logger) { - $this->logger->info('An AuthenticationException was thrown; redirecting to authentication entry point.', array('exception' => $exception)); + $this->logger->info('An AuthenticationException was thrown; redirecting to authentication entry point.', ['exception' => $exception]); } try { @@ -120,7 +120,7 @@ class ExceptionListener $token = $this->tokenStorage->getToken(); if (!$this->authenticationTrustResolver->isFullFledged($token)) { if (null !== $this->logger) { - $this->logger->debug('Access denied, the user is not fully authenticated; redirecting to authentication entry point.', array('exception' => $exception)); + $this->logger->debug('Access denied, the user is not fully authenticated; redirecting to authentication entry point.', ['exception' => $exception]); } try { @@ -136,7 +136,7 @@ class ExceptionListener } if (null !== $this->logger) { - $this->logger->debug('Access denied, the user is neither anonymous, nor remember-me.', array('exception' => $exception)); + $this->logger->debug('Access denied, the user is neither anonymous, nor remember-me.', ['exception' => $exception]); } try { @@ -155,7 +155,7 @@ class ExceptionListener } } catch (\Exception $e) { if (null !== $this->logger) { - $this->logger->error('An exception was thrown when handling an AccessDeniedException.', array('exception' => $e)); + $this->logger->error('An exception was thrown when handling an AccessDeniedException.', ['exception' => $e]); } $event->setException(new \RuntimeException('Exception thrown when handling an exception.', 0, $e)); @@ -165,7 +165,7 @@ class ExceptionListener private function handleLogoutException(LogoutException $exception) { if (null !== $this->logger) { - $this->logger->info('A LogoutException was thrown.', array('exception' => $exception)); + $this->logger->info('A LogoutException was thrown.', ['exception' => $exception]); } } @@ -177,7 +177,7 @@ class ExceptionListener private function startAuthentication(Request $request, AuthenticationException $authException) { if (null === $this->authenticationEntryPoint) { - throw new HttpException(Response::HTTP_UNAUTHORIZED, $authException->getMessage(), $authException, array(), $authException->getCode()); + throw new HttpException(Response::HTTP_UNAUTHORIZED, $authException->getMessage(), $authException, [], $authException->getCode()); } if (null !== $this->logger) { @@ -193,7 +193,7 @@ class ExceptionListener $this->tokenStorage->setToken(null); if (null !== $this->logger) { - $this->logger->info('The security token was removed due to an AccountStatusException.', array('exception' => $authException)); + $this->logger->info('The security token was removed due to an AccountStatusException.', ['exception' => $authException]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php index 21819ce4..6a762e1f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php @@ -44,18 +44,18 @@ class LogoutListener implements ListenerInterface * @param array $options An array of options to process a logout attempt * @param CsrfTokenManagerInterface|null $csrfTokenManager A CsrfTokenManagerInterface instance */ - public function __construct(TokenStorageInterface $tokenStorage, HttpUtils $httpUtils, LogoutSuccessHandlerInterface $successHandler, array $options = array(), CsrfTokenManagerInterface $csrfTokenManager = null) + public function __construct(TokenStorageInterface $tokenStorage, HttpUtils $httpUtils, LogoutSuccessHandlerInterface $successHandler, array $options = [], CsrfTokenManagerInterface $csrfTokenManager = null) { $this->tokenStorage = $tokenStorage; $this->httpUtils = $httpUtils; - $this->options = array_merge(array( + $this->options = array_merge([ 'csrf_parameter' => '_csrf_token', 'csrf_token_id' => 'logout', 'logout_path' => '/logout', - ), $options); + ], $options); $this->successHandler = $successHandler; $this->csrfTokenManager = $csrfTokenManager; - $this->handlers = array(); + $this->handlers = []; } public function addHandler(LogoutHandlerInterface $handler) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php index d5c457b5..17d40a0e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php @@ -77,7 +77,7 @@ class RememberMeListener implements ListenerInterface $this->logger->warning( 'The token storage was not populated with remember-me token as the' .' RememberMeServices was not able to create a token from the remember' - .' me information.', array('exception' => $e) + .' me information.', ['exception' => $e] ); } @@ -110,7 +110,7 @@ class RememberMeListener implements ListenerInterface $this->logger->warning( 'The token storage was not populated with remember-me token as the' .' AuthenticationManager rejected the AuthenticationToken returned' - .' by the RememberMeServices.', array('exception' => $e) + .' by the RememberMeServices.', ['exception' => $e] ); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/RemoteUserAuthenticationListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/RemoteUserAuthenticationListener.php index af692ed1..fbba95db 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/RemoteUserAuthenticationListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/RemoteUserAuthenticationListener.php @@ -44,6 +44,6 @@ class RemoteUserAuthenticationListener extends AbstractPreAuthenticatedListener throw new BadCredentialsException(sprintf('User key was not found: %s', $this->userKey)); } - return array($request->server->get($this->userKey), null); + return [$request->server->get($this->userKey), null]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SimpleFormAuthenticationListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SimpleFormAuthenticationListener.php index a0f0863a..99c8fcab 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SimpleFormAuthenticationListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SimpleFormAuthenticationListener.php @@ -54,7 +54,7 @@ class SimpleFormAuthenticationListener extends AbstractAuthenticationListener * * @throws \InvalidArgumentException In case no simple authenticator is provided */ - public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, $providerKey, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options = array(), LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, CsrfTokenManagerInterface $csrfTokenManager = null, SimpleFormAuthenticatorInterface $simpleAuthenticator = null) + public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, $providerKey, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options = [], LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, CsrfTokenManagerInterface $csrfTokenManager = null, SimpleFormAuthenticatorInterface $simpleAuthenticator = null) { if (!$simpleAuthenticator) { throw new \InvalidArgumentException('Missing simple authenticator'); @@ -63,13 +63,13 @@ class SimpleFormAuthenticationListener extends AbstractAuthenticationListener $this->simpleAuthenticator = $simpleAuthenticator; $this->csrfTokenManager = $csrfTokenManager; - $options = array_merge(array( + $options = array_merge([ 'username_parameter' => '_username', 'password_parameter' => '_password', 'csrf_parameter' => '_csrf_token', 'csrf_token_id' => 'authenticate', 'post_only' => true, - ), $options); + ], $options); parent::__construct($tokenStorage, $authenticationManager, $sessionStrategy, $httpUtils, $providerKey, $successHandler, $failureHandler, $options, $logger, $dispatcher); } @@ -107,7 +107,7 @@ class SimpleFormAuthenticationListener extends AbstractAuthenticationListener $password = ParameterBagUtils::getRequestParameterValue($request, $this->options['password_parameter']); } - if (!\is_string($username) || (\is_object($username) && !\method_exists($username, '__toString'))) { + if (!\is_string($username) && (!\is_object($username) || !\method_exists($username, '__toString'))) { throw new BadRequestHttpException(sprintf('The key "%s" must be a string, "%s" given.', $this->options['username_parameter'], \gettype($username))); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SimplePreAuthenticationListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SimplePreAuthenticationListener.php index 60e19ee6..7e376f5e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SimplePreAuthenticationListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SimplePreAuthenticationListener.php @@ -83,7 +83,7 @@ class SimplePreAuthenticationListener implements ListenerInterface $request = $event->getRequest(); if (null !== $this->logger) { - $this->logger->info('Attempting SimplePreAuthentication.', array('key' => $this->providerKey, 'authenticator' => \get_class($this->simpleAuthenticator))); + $this->logger->info('Attempting SimplePreAuthentication.', ['key' => $this->providerKey, 'authenticator' => \get_class($this->simpleAuthenticator)]); } if (null !== $this->tokenStorage->getToken() && !$this->tokenStorage->getToken() instanceof AnonymousToken) { @@ -112,7 +112,7 @@ class SimplePreAuthenticationListener implements ListenerInterface $this->tokenStorage->setToken(null); if (null !== $this->logger) { - $this->logger->info('SimplePreAuthentication request failed.', array('exception' => $e, 'authenticator' => \get_class($this->simpleAuthenticator))); + $this->logger->info('SimplePreAuthentication request failed.', ['exception' => $e, 'authenticator' => \get_class($this->simpleAuthenticator)]); } if ($this->simpleAuthenticator instanceof AuthenticationFailureHandlerInterface) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php index 21c0bf70..f80d2ec2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php @@ -83,6 +83,10 @@ class SwitchUserListener implements ListenerInterface return; } + if (null === $this->tokenStorage->getToken()) { + throw new AuthenticationCredentialsNotFoundException('Could not find original Token object.'); + } + if (self::EXIT_VALUE === $username) { $this->tokenStorage->setToken($this->attemptExitUser($request)); } else { @@ -126,7 +130,7 @@ class SwitchUserListener implements ListenerInterface throw new \LogicException(sprintf('You are already switched to "%s" user.', $token->getUsername())); } - if (false === $this->accessDecisionManager->decide($token, array($this->role))) { + if (false === $this->accessDecisionManager->decide($token, [$this->role])) { $exception = new AccessDeniedException(); $exception->setAttributes($this->role); @@ -134,7 +138,7 @@ class SwitchUserListener implements ListenerInterface } if (null !== $this->logger) { - $this->logger->info('Attempting to switch to user.', array('username' => $username)); + $this->logger->info('Attempting to switch to user.', ['username' => $username]); } $user = $this->provider->loadUserByUsername($username); @@ -164,7 +168,7 @@ class SwitchUserListener implements ListenerInterface */ private function attemptExitUser(Request $request) { - if (null === ($currentToken = $this->tokenStorage->getToken()) || false === $original = $this->getOriginalToken($currentToken)) { + if (false === $original = $this->getOriginalToken($this->tokenStorage->getToken())) { throw new AuthenticationCredentialsNotFoundException('Could not find original Token object.'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php index 11ec77de..2f541567 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php @@ -39,15 +39,15 @@ class UsernamePasswordFormAuthenticationListener extends AbstractAuthenticationL { private $csrfTokenManager; - public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, $providerKey, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options = array(), LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, CsrfTokenManagerInterface $csrfTokenManager = null) + public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, $providerKey, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options = [], LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, CsrfTokenManagerInterface $csrfTokenManager = null) { - parent::__construct($tokenStorage, $authenticationManager, $sessionStrategy, $httpUtils, $providerKey, $successHandler, $failureHandler, array_merge(array( + parent::__construct($tokenStorage, $authenticationManager, $sessionStrategy, $httpUtils, $providerKey, $successHandler, $failureHandler, array_merge([ 'username_parameter' => '_username', 'password_parameter' => '_password', 'csrf_parameter' => '_csrf_token', 'csrf_token_id' => 'authenticate', 'post_only' => true, - ), $options), $logger, $dispatcher); + ], $options), $logger, $dispatcher); $this->csrfTokenManager = $csrfTokenManager; } @@ -85,7 +85,7 @@ class UsernamePasswordFormAuthenticationListener extends AbstractAuthenticationL $password = ParameterBagUtils::getRequestParameterValue($request, $this->options['password_parameter']); } - if (!\is_string($username) || (\is_object($username) && !\method_exists($username, '__toString'))) { + if (!\is_string($username) && (!\is_object($username) || !\method_exists($username, '__toString'))) { throw new BadRequestHttpException(sprintf('The key "%s" must be a string, "%s" given.', $this->options['username_parameter'], \gettype($username))); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordJsonAuthenticationListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordJsonAuthenticationListener.php index e16afd28..fe830b25 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordJsonAuthenticationListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordJsonAuthenticationListener.php @@ -55,7 +55,7 @@ class UsernamePasswordJsonAuthenticationListener implements ListenerInterface private $propertyAccessor; private $sessionStrategy; - public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, HttpUtils $httpUtils, $providerKey, AuthenticationSuccessHandlerInterface $successHandler = null, AuthenticationFailureHandlerInterface $failureHandler = null, array $options = array(), LoggerInterface $logger = null, EventDispatcherInterface $eventDispatcher = null, PropertyAccessorInterface $propertyAccessor = null) + public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, HttpUtils $httpUtils, $providerKey, AuthenticationSuccessHandlerInterface $successHandler = null, AuthenticationFailureHandlerInterface $failureHandler = null, array $options = [], LoggerInterface $logger = null, EventDispatcherInterface $eventDispatcher = null, PropertyAccessorInterface $propertyAccessor = null) { $this->tokenStorage = $tokenStorage; $this->authenticationManager = $authenticationManager; @@ -65,7 +65,7 @@ class UsernamePasswordJsonAuthenticationListener implements ListenerInterface $this->failureHandler = $failureHandler; $this->logger = $logger; $this->eventDispatcher = $eventDispatcher; - $this->options = array_merge(array('username_path' => 'username', 'password_path' => 'password'), $options); + $this->options = array_merge(['username_path' => 'username', 'password_path' => 'password'], $options); $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); } @@ -138,7 +138,7 @@ class UsernamePasswordJsonAuthenticationListener implements ListenerInterface private function onSuccess(Request $request, TokenInterface $token) { if (null !== $this->logger) { - $this->logger->info('User has been authenticated successfully.', array('username' => $token->getUsername())); + $this->logger->info('User has been authenticated successfully.', ['username' => $token->getUsername()]); } $this->migrateSession($request, $token); @@ -166,7 +166,7 @@ class UsernamePasswordJsonAuthenticationListener implements ListenerInterface private function onFailure(Request $request, AuthenticationException $failed) { if (null !== $this->logger) { - $this->logger->info('Authentication request failed.', array('exception' => $failed)); + $this->logger->info('Authentication request failed.', ['exception' => $failed]); } $token = $this->tokenStorage->getToken(); @@ -175,7 +175,7 @@ class UsernamePasswordJsonAuthenticationListener implements ListenerInterface } if (!$this->failureHandler) { - return new JsonResponse(array('error' => $failed->getMessageKey()), 401); + return new JsonResponse(['error' => $failed->getMessageKey()], 401); } $response = $this->failureHandler->onAuthenticationFailure($request, $failed); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/X509AuthenticationListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/X509AuthenticationListener.php index d9a18624..d17ef746 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/X509AuthenticationListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/X509AuthenticationListener.php @@ -52,6 +52,6 @@ class X509AuthenticationListener extends AbstractPreAuthenticatedListener throw new BadCredentialsException(sprintf('SSL credentials not found: %s, %s', $this->userKey, $this->credentialKey)); } - return array($user, $request->server->get($this->credentialKey, '')); + return [$user, $request->server->get($this->credentialKey, '')]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/FirewallMap.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/FirewallMap.php index 0f0c1fbe..0ffd068d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/FirewallMap.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/FirewallMap.php @@ -24,11 +24,11 @@ use Symfony\Component\Security\Http\Firewall\LogoutListener; */ class FirewallMap implements FirewallMapInterface { - private $map = array(); + private $map = []; - public function add(RequestMatcherInterface $requestMatcher = null, array $listeners = array(), ExceptionListener $exceptionListener = null, LogoutListener $logoutListener = null) + public function add(RequestMatcherInterface $requestMatcher = null, array $listeners = [], ExceptionListener $exceptionListener = null, LogoutListener $logoutListener = null) { - $this->map[] = array($requestMatcher, $listeners, $exceptionListener, $logoutListener); + $this->map[] = [$requestMatcher, $listeners, $exceptionListener, $logoutListener]; } /** @@ -38,10 +38,10 @@ class FirewallMap implements FirewallMapInterface { foreach ($this->map as $elements) { if (null === $elements[0] || $elements[0]->matches($request)) { - return array($elements[1], $elements[2], $elements[3]); + return [$elements[1], $elements[2], $elements[3]]; } } - return array(array(), null, null); + return [[], null, null]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/FirewallMapInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/FirewallMapInterface.php index ebdd4981..5517e1d1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/FirewallMapInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/FirewallMapInterface.php @@ -30,7 +30,7 @@ interface FirewallMapInterface * If there is no exception listener, the second element of the outer array * must be null. * - * @return array of the format array(array(AuthenticationListener), ExceptionListener) + * @return array of the format [[AuthenticationListener], ExceptionListener] */ public function getListeners(Request $request); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/HttpUtils.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/HttpUtils.php index a6bcffe4..0ed28f49 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/HttpUtils.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/HttpUtils.php @@ -59,7 +59,7 @@ class HttpUtils */ public function createRedirectResponse(Request $request, $path, $status = 302) { - if (null !== $this->domainRegexp && preg_match('#^https?://[^/]++#i', $path, $host) && !preg_match(sprintf($this->domainRegexp, preg_quote($request->getHttpHost())), $host[0])) { + if (null !== $this->domainRegexp && preg_match('#^https?:[/\\\\]{2,}+[^/]++#i', $path, $host) && !preg_match(sprintf($this->domainRegexp, preg_quote($request->getHttpHost())), $host[0])) { $path = '/'; } @@ -76,7 +76,7 @@ class HttpUtils */ public function createRequest(Request $request, $path) { - $newRequest = Request::create($this->generateUri($request, $path), 'get', array(), $request->cookies->all(), array(), $request->server->all()); + $newRequest = Request::create($this->generateUri($request, $path), 'get', [], $request->cookies->all(), [], $request->server->all()); if ($request->hasSession()) { $newRequest->setSession($request->getSession()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php index d7eeb03b..2e531bbb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php @@ -28,7 +28,7 @@ class LogoutUrlGenerator private $requestStack; private $router; private $tokenStorage; - private $listeners = array(); + private $listeners = []; private $currentFirewall; public function __construct(RequestStack $requestStack = null, UrlGeneratorInterface $router = null, TokenStorageInterface $tokenStorage = null) @@ -63,7 +63,7 @@ class LogoutUrlGenerator $context = null; } - $this->listeners[$key] = array($logoutPath, $csrfTokenId, $csrfParameter, $csrfTokenManager, $context); + $this->listeners[$key] = [$logoutPath, $csrfTokenId, $csrfParameter, $csrfTokenManager, $context]; } /** @@ -96,7 +96,7 @@ class LogoutUrlGenerator */ public function setCurrentFirewall($key, $context = null) { - $this->currentFirewall = array($key, $context); + $this->currentFirewall = [$key, $context]; } /** @@ -115,7 +115,7 @@ class LogoutUrlGenerator throw new \LogicException('Unable to generate the logout URL without a path.'); } - $parameters = null !== $csrfTokenManager ? array($csrfParameter => (string) $csrfTokenManager->getToken($csrfTokenId)) : array(); + $parameters = null !== $csrfTokenManager ? [$csrfParameter => (string) $csrfTokenManager->getToken($csrfTokenId)] : []; if ('/' === $logoutPath[0]) { if (!$this->requestStack) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php index f17d573a..54c91348 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php @@ -35,10 +35,10 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface const COOKIE_DELIMITER = ':'; protected $logger; - protected $options = array( + protected $options = [ 'secure' => false, 'httponly' => true, - ); + ]; private $providerKey; private $secret; private $userProviders; @@ -52,7 +52,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface * * @throws \InvalidArgumentException */ - public function __construct(array $userProviders, $secret, $providerKey, array $options = array(), LoggerInterface $logger = null) + public function __construct(array $userProviders, $secret, $providerKey, array $options = [], LoggerInterface $logger = null) { if (empty($secret)) { throw new \InvalidArgumentException('$secret must not be empty.'); @@ -129,19 +129,19 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface throw $e; } catch (UsernameNotFoundException $e) { if (null !== $this->logger) { - $this->logger->info('User for remember-me cookie not found.', array('exception' => $e)); + $this->logger->info('User for remember-me cookie not found.', ['exception' => $e]); } $this->loginFail($request, $e); } catch (UnsupportedUserException $e) { if (null !== $this->logger) { - $this->logger->warning('User class for remember-me cookie not supported.', array('exception' => $e)); + $this->logger->warning('User class for remember-me cookie not supported.', ['exception' => $e]); } $this->loginFail($request, $e); } catch (AuthenticationException $e) { if (null !== $this->logger) { - $this->logger->debug('Remember-Me authentication failed.', array('exception' => $e)); + $this->logger->debug('Remember-Me authentication failed.', ['exception' => $e]); } $this->loginFail($request, $e); @@ -274,7 +274,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface protected function cancelCookie(Request $request) { if (null !== $this->logger) { - $this->logger->debug('Clearing remember-me cookie.', array('name' => $this->options['name'])); + $this->logger->debug('Clearing remember-me cookie.', ['name' => $this->options['name']]); } $request->attributes->set(self::COOKIE_ATTR_NAME, new Cookie($this->options['name'], null, 1, $this->options['path'], $this->options['domain'], $this->options['secure'], $this->options['httponly'])); @@ -294,7 +294,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface $parameter = ParameterBagUtils::getRequestParameterValue($request, $this->options['remember_me_parameter']); if (null === $parameter && null !== $this->logger) { - $this->logger->debug('Did not send remember-me cookie.', array('parameter' => $this->options['remember_me_parameter'])); + $this->logger->debug('Did not send remember-me cookie.', ['parameter' => $this->options['remember_me_parameter']]); } return 'true' === $parameter || 'on' === $parameter || '1' === $parameter || 'yes' === $parameter || true === $parameter; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php index dcb7e1e6..272a5cc2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php @@ -79,7 +79,7 @@ class PersistentTokenBasedRememberMeServices extends AbstractRememberMeServices $request->attributes->set(self::COOKIE_ATTR_NAME, new Cookie( $this->options['name'], - $this->encodeCookie(array($series, $tokenValue)), + $this->encodeCookie([$series, $tokenValue]), time() + $this->options['lifetime'], $this->options['path'], $this->options['domain'], @@ -112,7 +112,7 @@ class PersistentTokenBasedRememberMeServices extends AbstractRememberMeServices $response->headers->setCookie( new Cookie( $this->options['name'], - $this->encodeCookie(array($series, $tokenValue)), + $this->encodeCookie([$series, $tokenValue]), time() + $this->options['lifetime'], $this->options['path'], $this->options['domain'], diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/ResponseListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/ResponseListener.php index 5467e023..7d931166 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/ResponseListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/ResponseListener.php @@ -41,6 +41,6 @@ class ResponseListener implements EventSubscriberInterface */ public static function getSubscribedEvents() { - return array(KernelEvents::RESPONSE => 'onKernelResponse'); + return [KernelEvents::RESPONSE => 'onKernelResponse']; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php index dce2026f..48d88e57 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php @@ -100,12 +100,12 @@ class TokenBasedRememberMeServices extends AbstractRememberMeServices { // $username is encoded because it might contain COOKIE_DELIMITER, // we assume other values don't - return $this->encodeCookie(array( + return $this->encodeCookie([ $class, base64_encode($username), $expires, $this->generateCookieHash($class, $username, $expires, $password), - )); + ]); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/AccessMapTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/AccessMapTest.php index 822043d6..8ae9581e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/AccessMapTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/AccessMapTest.php @@ -23,10 +23,10 @@ class AccessMapTest extends TestCase $requestMatcher2 = $this->getRequestMatcher($request, true); $map = new AccessMap(); - $map->add($requestMatcher1, array('ROLE_ADMIN'), 'http'); - $map->add($requestMatcher2, array('ROLE_USER'), 'https'); + $map->add($requestMatcher1, ['ROLE_ADMIN'], 'http'); + $map->add($requestMatcher2, ['ROLE_USER'], 'https'); - $this->assertSame(array(array('ROLE_USER'), 'https'), $map->getPatterns($request)); + $this->assertSame([['ROLE_USER'], 'https'], $map->getPatterns($request)); } public function testReturnsEmptyPatternIfNoneMatched() @@ -35,9 +35,9 @@ class AccessMapTest extends TestCase $requestMatcher = $this->getRequestMatcher($request, false); $map = new AccessMap(); - $map->add($requestMatcher, array('ROLE_USER'), 'https'); + $map->add($requestMatcher, ['ROLE_USER'], 'https'); - $this->assertSame(array(null, null), $map->getPatterns($request)); + $this->assertSame([null, null], $map->getPatterns($request)); } private function getRequestMatcher($request, $matches) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php index cc2f504b..a9c18f34 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php @@ -35,12 +35,12 @@ class DefaultAuthenticationFailureHandlerTest extends TestCase $this->session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock(); $this->request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); $this->request->expects($this->any())->method('getSession')->will($this->returnValue($this->session)); - $this->exception = $this->getMockBuilder('Symfony\Component\Security\Core\Exception\AuthenticationException')->setMethods(array('getMessage'))->getMock(); + $this->exception = $this->getMockBuilder('Symfony\Component\Security\Core\Exception\AuthenticationException')->setMethods(['getMessage'])->getMock(); } public function testForward() { - $options = array('failure_forward' => true); + $options = ['failure_forward' => true]; $subRequest = $this->getRequest(); $subRequest->attributes->expects($this->once()) @@ -67,7 +67,7 @@ class DefaultAuthenticationFailureHandlerTest extends TestCase ->method('createRedirectResponse')->with($this->request, '/login') ->will($this->returnValue($response)); - $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, array(), $this->logger); + $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, [], $this->logger); $result = $handler->onAuthenticationFailure($this->request, $this->exception); $this->assertSame($response, $result); @@ -78,13 +78,13 @@ class DefaultAuthenticationFailureHandlerTest extends TestCase $this->session->expects($this->once()) ->method('set')->with(Security::AUTHENTICATION_ERROR, $this->exception); - $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, array(), $this->logger); + $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, [], $this->logger); $handler->onAuthenticationFailure($this->request, $this->exception); } public function testExceptionIsPassedInRequestOnForward() { - $options = array('failure_forward' => true); + $options = ['failure_forward' => true]; $subRequest = $this->getRequest(); $subRequest->attributes->expects($this->once()) @@ -105,15 +105,15 @@ class DefaultAuthenticationFailureHandlerTest extends TestCase $this->logger ->expects($this->once()) ->method('debug') - ->with('Authentication failure, redirect triggered.', array('failure_path' => '/login')); + ->with('Authentication failure, redirect triggered.', ['failure_path' => '/login']); - $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, array(), $this->logger); + $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, [], $this->logger); $handler->onAuthenticationFailure($this->request, $this->exception); } public function testForwardIsLogged() { - $options = array('failure_forward' => true); + $options = ['failure_forward' => true]; $this->httpUtils->expects($this->once()) ->method('createRequest')->with($this->request, '/login') @@ -122,7 +122,7 @@ class DefaultAuthenticationFailureHandlerTest extends TestCase $this->logger ->expects($this->once()) ->method('debug') - ->with('Authentication failure, forward triggered.', array('failure_path' => '/login')); + ->with('Authentication failure, forward triggered.', ['failure_path' => '/login']); $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, $options, $this->logger); $handler->onAuthenticationFailure($this->request, $this->exception); @@ -130,7 +130,7 @@ class DefaultAuthenticationFailureHandlerTest extends TestCase public function testFailurePathCanBeOverwritten() { - $options = array('failure_path' => '/auth/login'); + $options = ['failure_path' => '/auth/login']; $this->httpUtils->expects($this->once()) ->method('createRedirectResponse')->with($this->request, '/auth/login'); @@ -148,7 +148,7 @@ class DefaultAuthenticationFailureHandlerTest extends TestCase $this->httpUtils->expects($this->once()) ->method('createRedirectResponse')->with($this->request, '/auth/login'); - $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, array(), $this->logger); + $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, [], $this->logger); $handler->onAuthenticationFailure($this->request, $this->exception); } @@ -156,18 +156,18 @@ class DefaultAuthenticationFailureHandlerTest extends TestCase { $this->request->expects($this->once()) ->method('get')->with('_failure_path') - ->will($this->returnValue(array('value' => '/auth/login'))); + ->will($this->returnValue(['value' => '/auth/login'])); $this->httpUtils->expects($this->once()) ->method('createRedirectResponse')->with($this->request, '/auth/login'); - $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, array('failure_path_parameter' => '_failure_path[value]'), $this->logger); + $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, ['failure_path_parameter' => '_failure_path[value]'], $this->logger); $handler->onAuthenticationFailure($this->request, $this->exception); } public function testFailurePathParameterCanBeOverwritten() { - $options = array('failure_path_parameter' => '_my_failure_path'); + $options = ['failure_path_parameter' => '_my_failure_path']; $this->request->expects($this->once()) ->method('get')->with('_my_failure_path') diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php index a7b8547b..531d4922 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php @@ -42,72 +42,72 @@ class DefaultAuthenticationSuccessHandlerTest extends TestCase $requestWithSession = Request::create('/'); $requestWithSession->setSession($session); - return array( - 'default' => array( + return [ + 'default' => [ Request::create('/'), - array(), + [], '/', - ), - 'forced target path' => array( + ], + 'forced target path' => [ Request::create('/'), - array('always_use_default_target_path' => true, 'default_target_path' => '/dashboard'), + ['always_use_default_target_path' => true, 'default_target_path' => '/dashboard'], '/dashboard', - ), - 'target path as query string' => array( + ], + 'target path as query string' => [ Request::create('/?_target_path=/dashboard'), - array(), + [], '/dashboard', - ), - 'target path name as query string is customized' => array( + ], + 'target path name as query string is customized' => [ Request::create('/?_my_target_path=/dashboard'), - array('target_path_parameter' => '_my_target_path'), + ['target_path_parameter' => '_my_target_path'], '/dashboard', - ), - 'target path name as query string is customized and nested' => array( + ], + 'target path name as query string is customized and nested' => [ Request::create('/?_target_path[value]=/dashboard'), - array('target_path_parameter' => '_target_path[value]'), + ['target_path_parameter' => '_target_path[value]'], '/dashboard', - ), - 'target path in session' => array( + ], + 'target path in session' => [ $requestWithSession, - array(), + [], '/admin/dashboard', - ), - 'target path as referer' => array( - Request::create('/', 'GET', array(), array(), array(), array('HTTP_REFERER' => 'http://localhost/dashboard')), - array('use_referer' => true), + ], + 'target path as referer' => [ + Request::create('/', 'GET', [], [], [], ['HTTP_REFERER' => 'http://localhost/dashboard']), + ['use_referer' => true], '/dashboard', - ), - 'target path as referer is ignored if not configured' => array( - Request::create('/', 'GET', array(), array(), array(), array('HTTP_REFERER' => 'http://localhost/dashboard')), - array(), + ], + 'target path as referer is ignored if not configured' => [ + Request::create('/', 'GET', [], [], [], ['HTTP_REFERER' => 'http://localhost/dashboard']), + [], '/', - ), - 'target path as referer when referer not set' => array( + ], + 'target path as referer when referer not set' => [ Request::create('/'), - array('use_referer' => true), + ['use_referer' => true], '/', - ), - 'target path as referer when referer is ?' => array( - Request::create('/', 'GET', array(), array(), array(), array('HTTP_REFERER' => '?')), - array('use_referer' => true), + ], + 'target path as referer when referer is ?' => [ + Request::create('/', 'GET', [], [], [], ['HTTP_REFERER' => '?']), + ['use_referer' => true], '/', - ), - 'target path should be different than login URL' => array( - Request::create('/', 'GET', array(), array(), array(), array('HTTP_REFERER' => 'http://localhost/login')), - array('use_referer' => true, 'login_path' => '/login'), + ], + 'target path should be different than login URL' => [ + Request::create('/', 'GET', [], [], [], ['HTTP_REFERER' => 'http://localhost/login']), + ['use_referer' => true, 'login_path' => '/login'], '/', - ), - 'target path should be different than login URL (query string does not matter)' => array( - Request::create('/', 'GET', array(), array(), array(), array('HTTP_REFERER' => 'http://localhost/login?t=1&p=2')), - array('use_referer' => true, 'login_path' => '/login'), + ], + 'target path should be different than login URL (query string does not matter)' => [ + Request::create('/', 'GET', [], [], [], ['HTTP_REFERER' => 'http://localhost/login?t=1&p=2']), + ['use_referer' => true, 'login_path' => '/login'], '/', - ), - 'target path should be different than login URL (login_path as a route)' => array( - Request::create('/', 'GET', array(), array(), array(), array('HTTP_REFERER' => 'http://localhost/login?t=1&p=2')), - array('use_referer' => true, 'login_path' => 'login_route'), + ], + 'target path should be different than login URL (login_path as a route)' => [ + Request::create('/', 'GET', [], [], [], ['HTTP_REFERER' => 'http://localhost/login?t=1&p=2']), + ['use_referer' => true, 'login_path' => 'login_route'], '/', - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/EntryPoint/RetryAuthenticationEntryPointTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/EntryPoint/RetryAuthenticationEntryPointTest.php index abd90fb4..05c85f23 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/EntryPoint/RetryAuthenticationEntryPointTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/EntryPoint/RetryAuthenticationEntryPointTest.php @@ -32,34 +32,34 @@ class RetryAuthenticationEntryPointTest extends TestCase public function dataForStart() { if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - return array(array()); + return [[]]; } - return array( - array( + return [ + [ 80, 443, Request::create('http://localhost/foo/bar?baz=bat'), 'https://localhost/foo/bar?baz=bat', - ), - array( + ], + [ 80, 443, Request::create('https://localhost/foo/bar?baz=bat'), 'http://localhost/foo/bar?baz=bat', - ), - array( + ], + [ 80, 123, Request::create('http://localhost/foo/bar?baz=bat'), 'https://localhost:123/foo/bar?baz=bat', - ), - array( + ], + [ 8080, 443, Request::create('https://localhost/foo/bar?baz=bat'), 'http://localhost:8080/foo/bar?baz=bat', - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AbstractPreAuthenticatedListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AbstractPreAuthenticatedListenerTest.php index dd7f75e6..44bbf442 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AbstractPreAuthenticatedListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AbstractPreAuthenticatedListenerTest.php @@ -21,9 +21,9 @@ class AbstractPreAuthenticatedListenerTest extends TestCase { public function testHandleWithValidValues() { - $userCredentials = array('TheUser', 'TheCredentials'); + $userCredentials = ['TheUser', 'TheCredentials']; - $request = new Request(array(), array(), array(), array(), array(), array()); + $request = new Request([], [], [], [], [], []); $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); @@ -47,11 +47,11 @@ class AbstractPreAuthenticatedListenerTest extends TestCase ->will($this->returnValue($token)) ; - $listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array( + $listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', [ $tokenStorage, $authenticationManager, 'TheProviderKey', - )); + ]); $listener ->expects($this->once()) ->method('getPreAuthenticatedData') @@ -69,9 +69,9 @@ class AbstractPreAuthenticatedListenerTest extends TestCase public function testHandleWhenAuthenticationFails() { - $userCredentials = array('TheUser', 'TheCredentials'); + $userCredentials = ['TheUser', 'TheCredentials']; - $request = new Request(array(), array(), array(), array(), array(), array()); + $request = new Request([], [], [], [], [], []); $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); $tokenStorage @@ -90,14 +90,14 @@ class AbstractPreAuthenticatedListenerTest extends TestCase ->expects($this->once()) ->method('authenticate') ->with($this->isInstanceOf('Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken')) - ->will($this->throwException($exception)) + ->willThrowException($exception) ; - $listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array( + $listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', [ $tokenStorage, $authenticationManager, 'TheProviderKey', - )); + ]); $listener ->expects($this->once()) ->method('getPreAuthenticatedData') @@ -115,11 +115,11 @@ class AbstractPreAuthenticatedListenerTest extends TestCase public function testHandleWhenAuthenticationFailsWithDifferentToken() { - $userCredentials = array('TheUser', 'TheCredentials'); + $userCredentials = ['TheUser', 'TheCredentials']; - $token = new UsernamePasswordToken('TheUsername', 'ThePassword', 'TheProviderKey', array('ROLE_FOO')); + $token = new UsernamePasswordToken('TheUsername', 'ThePassword', 'TheProviderKey', ['ROLE_FOO']); - $request = new Request(array(), array(), array(), array(), array(), array()); + $request = new Request([], [], [], [], [], []); $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); $tokenStorage @@ -138,14 +138,14 @@ class AbstractPreAuthenticatedListenerTest extends TestCase ->expects($this->once()) ->method('authenticate') ->with($this->isInstanceOf('Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken')) - ->will($this->throwException($exception)) + ->willThrowException($exception) ; - $listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array( + $listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', [ $tokenStorage, $authenticationManager, 'TheProviderKey', - )); + ]); $listener ->expects($this->once()) ->method('getPreAuthenticatedData') @@ -163,11 +163,11 @@ class AbstractPreAuthenticatedListenerTest extends TestCase public function testHandleWithASimilarAuthenticatedToken() { - $userCredentials = array('TheUser', 'TheCredentials'); + $userCredentials = ['TheUser', 'TheCredentials']; - $request = new Request(array(), array(), array(), array(), array(), array()); + $request = new Request([], [], [], [], [], []); - $token = new PreAuthenticatedToken('TheUser', 'TheCredentials', 'TheProviderKey', array('ROLE_FOO')); + $token = new PreAuthenticatedToken('TheUser', 'TheCredentials', 'TheProviderKey', ['ROLE_FOO']); $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); $tokenStorage @@ -182,11 +182,11 @@ class AbstractPreAuthenticatedListenerTest extends TestCase ->method('authenticate') ; - $listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array( + $listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', [ $tokenStorage, $authenticationManager, 'TheProviderKey', - )); + ]); $listener ->expects($this->once()) ->method('getPreAuthenticatedData') @@ -204,11 +204,11 @@ class AbstractPreAuthenticatedListenerTest extends TestCase public function testHandleWithAnInvalidSimilarToken() { - $userCredentials = array('TheUser', 'TheCredentials'); + $userCredentials = ['TheUser', 'TheCredentials']; - $request = new Request(array(), array(), array(), array(), array(), array()); + $request = new Request([], [], [], [], [], []); - $token = new PreAuthenticatedToken('AnotherUser', 'TheCredentials', 'TheProviderKey', array('ROLE_FOO')); + $token = new PreAuthenticatedToken('AnotherUser', 'TheCredentials', 'TheProviderKey', ['ROLE_FOO']); $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); $tokenStorage @@ -228,14 +228,14 @@ class AbstractPreAuthenticatedListenerTest extends TestCase ->expects($this->once()) ->method('authenticate') ->with($this->isInstanceOf('Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken')) - ->will($this->throwException($exception)) + ->willThrowException($exception) ; - $listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array( + $listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', [ $tokenStorage, $authenticationManager, 'TheProviderKey', - )); + ]); $listener ->expects($this->once()) ->method('getPreAuthenticatedData') diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AccessListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AccessListenerTest.php index c49527bc..92b22708 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AccessListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AccessListenerTest.php @@ -28,7 +28,7 @@ class AccessListenerTest extends TestCase ->expects($this->any()) ->method('getPatterns') ->with($this->equalTo($request)) - ->will($this->returnValue(array(array('foo' => 'bar'), null))) + ->will($this->returnValue([['foo' => 'bar'], null])) ; $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); @@ -49,7 +49,7 @@ class AccessListenerTest extends TestCase $accessDecisionManager ->expects($this->once()) ->method('decide') - ->with($this->equalTo($token), $this->equalTo(array('foo' => 'bar')), $this->equalTo($request)) + ->with($this->equalTo($token), $this->equalTo(['foo' => 'bar']), $this->equalTo($request)) ->will($this->returnValue(false)) ; @@ -79,7 +79,7 @@ class AccessListenerTest extends TestCase ->expects($this->any()) ->method('getPatterns') ->with($this->equalTo($request)) - ->will($this->returnValue(array(array('foo' => 'bar'), null))) + ->will($this->returnValue([['foo' => 'bar'], null])) ; $notAuthenticatedToken = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); @@ -120,7 +120,7 @@ class AccessListenerTest extends TestCase $accessDecisionManager ->expects($this->once()) ->method('decide') - ->with($this->equalTo($authenticatedToken), $this->equalTo(array('foo' => 'bar')), $this->equalTo($request)) + ->with($this->equalTo($authenticatedToken), $this->equalTo(['foo' => 'bar']), $this->equalTo($request)) ->will($this->returnValue(true)) ; @@ -150,7 +150,7 @@ class AccessListenerTest extends TestCase ->expects($this->any()) ->method('getPatterns') ->with($this->equalTo($request)) - ->will($this->returnValue(array(null, null))) + ->will($this->returnValue([null, null])) ; $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AnonymousAuthenticationListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AnonymousAuthenticationListenerTest.php index 5bd0c808..f6f36415 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AnonymousAuthenticationListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AnonymousAuthenticationListenerTest.php @@ -49,7 +49,7 @@ class AnonymousAuthenticationListenerTest extends TestCase ->will($this->returnValue(null)) ; - $anonymousToken = new AnonymousToken('TheSecret', 'anon.', array()); + $anonymousToken = new AnonymousToken('TheSecret', 'anon.', []); $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); $authenticationManager diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/BasicAuthenticationListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/BasicAuthenticationListenerTest.php index 269dbaee..2eec46b1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/BasicAuthenticationListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/BasicAuthenticationListenerTest.php @@ -23,10 +23,10 @@ class BasicAuthenticationListenerTest extends TestCase { public function testHandleWithValidUsernameAndPasswordServerParameters() { - $request = new Request(array(), array(), array(), array(), array(), array( + $request = new Request([], [], [], [], [], [ 'PHP_AUTH_USER' => 'TheUsername', 'PHP_AUTH_PW' => 'ThePassword', - )); + ]); $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); @@ -69,10 +69,10 @@ class BasicAuthenticationListenerTest extends TestCase public function testHandleWhenAuthenticationFails() { - $request = new Request(array(), array(), array(), array(), array(), array( + $request = new Request([], [], [], [], [], [ 'PHP_AUTH_USER' => 'TheUsername', 'PHP_AUTH_PW' => 'ThePassword', - )); + ]); $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); @@ -99,7 +99,7 @@ class BasicAuthenticationListenerTest extends TestCase $listener = new BasicAuthenticationListener( $tokenStorage, - new AuthenticationProviderManager(array($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface')->getMock())), + new AuthenticationProviderManager([$this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface')->getMock()]), 'TheProviderKey', $authenticationEntryPoint ); @@ -148,9 +148,9 @@ class BasicAuthenticationListenerTest extends TestCase public function testHandleWithASimilarAuthenticatedToken() { - $request = new Request(array(), array(), array(), array(), array(), array('PHP_AUTH_USER' => 'TheUsername')); + $request = new Request([], [], [], [], [], ['PHP_AUTH_USER' => 'TheUsername']); - $token = new UsernamePasswordToken('TheUsername', 'ThePassword', 'TheProviderKey', array('ROLE_FOO')); + $token = new UsernamePasswordToken('TheUsername', 'ThePassword', 'TheProviderKey', ['ROLE_FOO']); $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); $tokenStorage @@ -198,12 +198,12 @@ class BasicAuthenticationListenerTest extends TestCase public function testHandleWithADifferentAuthenticatedToken() { - $request = new Request(array(), array(), array(), array(), array(), array( + $request = new Request([], [], [], [], [], [ 'PHP_AUTH_USER' => 'TheUsername', 'PHP_AUTH_PW' => 'ThePassword', - )); + ]); - $token = new PreAuthenticatedToken('TheUser', 'TheCredentials', 'TheProviderKey', array('ROLE_FOO')); + $token = new PreAuthenticatedToken('TheUser', 'TheCredentials', 'TheProviderKey', ['ROLE_FOO']); $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); $tokenStorage @@ -228,7 +228,7 @@ class BasicAuthenticationListenerTest extends TestCase $listener = new BasicAuthenticationListener( $tokenStorage, - new AuthenticationProviderManager(array($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface')->getMock())), + new AuthenticationProviderManager([$this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface')->getMock()]), 'TheProviderKey', $authenticationEntryPoint ); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ChannelListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ChannelListenerTest.php index 3016269c..3740faec 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ChannelListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ChannelListenerTest.php @@ -31,7 +31,7 @@ class ChannelListenerTest extends TestCase ->expects($this->any()) ->method('getPatterns') ->with($this->equalTo($request)) - ->will($this->returnValue(array(array(), 'http'))) + ->will($this->returnValue([[], 'http'])) ; $entryPoint = $this->getMockBuilder('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')->getMock(); @@ -69,7 +69,7 @@ class ChannelListenerTest extends TestCase ->expects($this->any()) ->method('getPatterns') ->with($this->equalTo($request)) - ->will($this->returnValue(array(array(), 'https'))) + ->will($this->returnValue([[], 'https'])) ; $entryPoint = $this->getMockBuilder('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')->getMock(); @@ -109,7 +109,7 @@ class ChannelListenerTest extends TestCase ->expects($this->any()) ->method('getPatterns') ->with($this->equalTo($request)) - ->will($this->returnValue(array(array(), 'https'))) + ->will($this->returnValue([[], 'https'])) ; $entryPoint = $this->getMockBuilder('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')->getMock(); @@ -152,7 +152,7 @@ class ChannelListenerTest extends TestCase ->expects($this->any()) ->method('getPatterns') ->with($this->equalTo($request)) - ->will($this->returnValue(array(array(), 'http'))) + ->will($this->returnValue([[], 'http'])) ; $entryPoint = $this->getMockBuilder('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')->getMock(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php index bb49d039..8df2f40a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php @@ -42,7 +42,7 @@ class ContextListenerTest extends TestCase { new ContextListener( $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(), - array(), + [], '' ); } @@ -53,7 +53,7 @@ class ContextListenerTest extends TestCase */ public function testUserProvidersNeedToImplementAnInterface() { - $this->handleEventWithPreviousSession(new TokenStorage(), array(new \stdClass())); + $this->handleEventWithPreviousSession(new TokenStorage(), [new \stdClass()]); } public function testOnKernelResponseWillAddSession() @@ -112,7 +112,7 @@ class ContextListenerTest extends TestCase new Response() ); - $listener = new ContextListener($tokenStorage, array(), 'session', null, new EventDispatcher()); + $listener = new ContextListener($tokenStorage, [], 'session', null, new EventDispatcher()); $listener->onKernelResponse($event); $this->assertTrue($session->isStarted()); @@ -131,7 +131,7 @@ class ContextListenerTest extends TestCase new Response() ); - $listener = new ContextListener(new TokenStorage(), array(), 'session', null, new EventDispatcher()); + $listener = new ContextListener(new TokenStorage(), [], 'session', null, new EventDispatcher()); $listener->onKernelResponse($event); $this->assertFalse($session->isStarted()); @@ -166,19 +166,19 @@ class ContextListenerTest extends TestCase ->method('setToken') ->with(null); - $listener = new ContextListener($tokenStorage, array(), 'key123'); + $listener = new ContextListener($tokenStorage, [], 'key123'); $listener->handle($event); } public function provideInvalidToken() { - return array( - array('foo'), - array('O:8:"NotFound":0:{}'), - array(serialize(new \__PHP_Incomplete_Class())), - array(serialize(null)), - array(null), - ); + return [ + ['foo'], + ['O:8:"NotFound":0:{}'], + [serialize(new \__PHP_Incomplete_Class())], + [serialize(null)], + [null], + ]; } public function testHandleAddsKernelResponseListener() @@ -189,7 +189,7 @@ class ContextListenerTest extends TestCase ->disableOriginalConstructor() ->getMock(); - $listener = new ContextListener($tokenStorage, array(), 'key123', null, $dispatcher); + $listener = new ContextListener($tokenStorage, [], 'key123', null, $dispatcher); $event->expects($this->any()) ->method('isMasterRequest') @@ -200,7 +200,7 @@ class ContextListenerTest extends TestCase $dispatcher->expects($this->once()) ->method('addListener') - ->with(KernelEvents::RESPONSE, array($listener, 'onKernelResponse')); + ->with(KernelEvents::RESPONSE, [$listener, 'onKernelResponse']); $listener->handle($event); } @@ -213,7 +213,7 @@ class ContextListenerTest extends TestCase ->disableOriginalConstructor() ->getMock(); - $listener = new ContextListener($tokenStorage, array(), 'key123', null, $dispatcher); + $listener = new ContextListener($tokenStorage, [], 'key123', null, $dispatcher); $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); $request->expects($this->any()) @@ -229,7 +229,7 @@ class ContextListenerTest extends TestCase $dispatcher->expects($this->once()) ->method('removeListener') - ->with(KernelEvents::RESPONSE, array($listener, 'onKernelResponse')); + ->with(KernelEvents::RESPONSE, [$listener, 'onKernelResponse']); $listener->onKernelResponse($event); } @@ -247,7 +247,7 @@ class ContextListenerTest extends TestCase $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); $tokenStorage->expects($this->once())->method('setToken')->with(null); - $listener = new ContextListener($tokenStorage, array(), 'key123'); + $listener = new ContextListener($tokenStorage, [], 'key123'); $listener->handle($event); } @@ -259,7 +259,7 @@ class ContextListenerTest extends TestCase { $tokenStorage = new TokenStorage(); $refreshedUser = new User('foobar', 'baz'); - $this->handleEventWithPreviousSession($tokenStorage, array(new NotSupportingUserProvider(), new SupportingUserProvider($refreshedUser))); + $this->handleEventWithPreviousSession($tokenStorage, [new NotSupportingUserProvider(), new SupportingUserProvider($refreshedUser)]); $this->assertSame($refreshedUser, $tokenStorage->getToken()->getUser()); } @@ -268,7 +268,7 @@ class ContextListenerTest extends TestCase { $tokenStorage = new TokenStorage(); $refreshedUser = new User('foobar', 'baz'); - $this->handleEventWithPreviousSession($tokenStorage, array(new NotSupportingUserProvider(), new SupportingUserProvider($refreshedUser)), null, true); + $this->handleEventWithPreviousSession($tokenStorage, [new NotSupportingUserProvider(), new SupportingUserProvider($refreshedUser)], null, true); $this->assertNull($tokenStorage->getToken()); } @@ -278,7 +278,7 @@ class ContextListenerTest extends TestCase $tokenStorage = new TokenStorage(); $badRefreshedUser = new User('foobar', 'baz'); $goodRefreshedUser = new User('foobar', 'bar'); - $this->handleEventWithPreviousSession($tokenStorage, array(new SupportingUserProvider($badRefreshedUser), new SupportingUserProvider($goodRefreshedUser)), $goodRefreshedUser, true); + $this->handleEventWithPreviousSession($tokenStorage, [new SupportingUserProvider($badRefreshedUser), new SupportingUserProvider($goodRefreshedUser)], $goodRefreshedUser, true); $this->assertSame($goodRefreshedUser, $tokenStorage->getToken()->getUser()); } @@ -286,7 +286,7 @@ class ContextListenerTest extends TestCase { $tokenStorage = new TokenStorage(); $refreshedUser = new User('foobar', 'baz'); - $this->handleEventWithPreviousSession($tokenStorage, array(new NotSupportingUserProvider(), new SupportingUserProvider($refreshedUser)), $refreshedUser); + $this->handleEventWithPreviousSession($tokenStorage, [new NotSupportingUserProvider(), new SupportingUserProvider($refreshedUser)], $refreshedUser); $this->assertSame($refreshedUser, $tokenStorage->getToken()->getUser()); } @@ -295,7 +295,7 @@ class ContextListenerTest extends TestCase { $tokenStorage = new TokenStorage(); $refreshedUser = new User('foobar', 'baz'); - $this->handleEventWithPreviousSession($tokenStorage, array(new SupportingUserProvider(), new SupportingUserProvider($refreshedUser)), $refreshedUser); + $this->handleEventWithPreviousSession($tokenStorage, [new SupportingUserProvider(), new SupportingUserProvider($refreshedUser)], $refreshedUser); $this->assertSame($refreshedUser, $tokenStorage->getToken()->getUser()); } @@ -303,7 +303,7 @@ class ContextListenerTest extends TestCase public function testTokenIsSetToNullIfNoUserWasLoadedByTheRegisteredUserProviders() { $tokenStorage = new TokenStorage(); - $this->handleEventWithPreviousSession($tokenStorage, array(new NotSupportingUserProvider(), new SupportingUserProvider())); + $this->handleEventWithPreviousSession($tokenStorage, [new NotSupportingUserProvider(), new SupportingUserProvider()]); $this->assertNull($tokenStorage->getToken()); } @@ -313,14 +313,14 @@ class ContextListenerTest extends TestCase */ public function testRuntimeExceptionIsThrownIfNoSupportingUserProviderWasRegistered() { - $this->handleEventWithPreviousSession(new TokenStorage(), array(new NotSupportingUserProvider(), new NotSupportingUserProvider())); + $this->handleEventWithPreviousSession(new TokenStorage(), [new NotSupportingUserProvider(), new NotSupportingUserProvider()]); } public function testAcceptsProvidersAsTraversable() { $tokenStorage = new TokenStorage(); $refreshedUser = new User('foobar', 'baz'); - $this->handleEventWithPreviousSession($tokenStorage, new \ArrayObject(array(new NotSupportingUserProvider(), new SupportingUserProvider($refreshedUser))), $refreshedUser); + $this->handleEventWithPreviousSession($tokenStorage, new \ArrayObject([new NotSupportingUserProvider(), new SupportingUserProvider($refreshedUser)]), $refreshedUser); $this->assertSame($refreshedUser, $tokenStorage->getToken()->getUser()); } @@ -347,7 +347,7 @@ class ContextListenerTest extends TestCase new Response() ); - $listener = new ContextListener($tokenStorage, array(), 'session', null, new EventDispatcher()); + $listener = new ContextListener($tokenStorage, [], 'session', null, new EventDispatcher()); $listener->onKernelResponse($event); return $session; @@ -357,7 +357,7 @@ class ContextListenerTest extends TestCase { $user = $user ?: new User('foo', 'bar'); $session = new Session(new MockArraySessionStorage()); - $session->set('_security_context_key', serialize(new UsernamePasswordToken($user, '', 'context_key', array('ROLE_USER')))); + $session->set('_security_context_key', serialize(new UsernamePasswordToken($user, '', 'context_key', ['ROLE_USER']))); $request = new Request(); $request->setSession($session); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/DigestAuthenticationListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/DigestAuthenticationListenerTest.php index b6f7efa8..b5378902 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/DigestAuthenticationListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/DigestAuthenticationListenerTest.php @@ -34,7 +34,7 @@ class DigestAuthenticationListenerTest extends TestCase 'response="'.$serverDigest.'"' ; - $request = new Request(array(), array(), array(), array(), array(), array('PHP_AUTH_DIGEST' => $digestData)); + $request = new Request([], [], [], [], [], ['PHP_AUTH_DIGEST' => $digestData]); $entryPoint = new DigestAuthenticationEntryPoint($realm, $secret); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php index 08662acf..53fedebc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php @@ -63,13 +63,13 @@ class ExceptionListenerTest extends TestCase public function getAuthenticationExceptionProvider() { - return array( - array($e = new AuthenticationException(), new HttpException(Response::HTTP_UNAUTHORIZED, '', $e, array(), 0)), - array(new \LogicException('random', 0, $e = new AuthenticationException()), new HttpException(Response::HTTP_UNAUTHORIZED, '', $e, array(), 0)), - array(new \LogicException('random', 0, $e = new AuthenticationException('embed', 0, new AuthenticationException())), new HttpException(Response::HTTP_UNAUTHORIZED, 'embed', $e, array(), 0)), - array(new \LogicException('random', 0, $e = new AuthenticationException('embed', 0, new AccessDeniedException())), new HttpException(Response::HTTP_UNAUTHORIZED, 'embed', $e, array(), 0)), - array($e = new AuthenticationException('random', 0, new \LogicException()), new HttpException(Response::HTTP_UNAUTHORIZED, 'random', $e, array(), 0)), - ); + return [ + [$e = new AuthenticationException(), new HttpException(Response::HTTP_UNAUTHORIZED, '', $e, [], 0)], + [new \LogicException('random', 0, $e = new AuthenticationException()), new HttpException(Response::HTTP_UNAUTHORIZED, '', $e, [], 0)], + [new \LogicException('random', 0, $e = new AuthenticationException('embed', 0, new AuthenticationException())), new HttpException(Response::HTTP_UNAUTHORIZED, 'embed', $e, [], 0)], + [new \LogicException('random', 0, $e = new AuthenticationException('embed', 0, new AccessDeniedException())), new HttpException(Response::HTTP_UNAUTHORIZED, 'embed', $e, [], 0)], + [$e = new AuthenticationException('random', 0, new \LogicException()), new HttpException(Response::HTTP_UNAUTHORIZED, 'random', $e, [], 0)], + ]; } public function testExceptionWhenEntryPointReturnsBadValue() @@ -159,13 +159,13 @@ class ExceptionListenerTest extends TestCase public function getAccessDeniedExceptionProvider() { - return array( - array(new AccessDeniedException()), - array(new \LogicException('random', 0, $e = new AccessDeniedException()), $e), - array(new \LogicException('random', 0, $e = new AccessDeniedException('embed', new AccessDeniedException())), $e), - array(new \LogicException('random', 0, $e = new AccessDeniedException('embed', new AuthenticationException())), $e), - array(new AccessDeniedException('random', new \LogicException())), - ); + return [ + [new AccessDeniedException()], + [new \LogicException('random', 0, $e = new AccessDeniedException()), $e], + [new \LogicException('random', 0, $e = new AccessDeniedException('embed', new AccessDeniedException())), $e], + [new \LogicException('random', 0, $e = new AccessDeniedException('embed', new AuthenticationException())), $e], + [new AccessDeniedException('random', new \LogicException())], + ]; } private function createEntryPoint(Response $response = null) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php index c909c58e..fbcea3d7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php @@ -191,7 +191,7 @@ class LogoutListenerTest extends TestCase ->method('getRequest') ->will($this->returnValue($request = new Request())); - return array($event, $request); + return [$event, $request]; } private function getHandler() @@ -212,16 +212,16 @@ class LogoutListenerTest extends TestCase $tokenStorage = $this->getTokenStorage(), $httpUtils = $this->getHttpUtils(), $successHandler ?: $this->getSuccessHandler(), - $options = array( + $options = [ 'csrf_parameter' => '_csrf_token', 'csrf_token_id' => 'logout', 'logout_path' => '/logout', 'target_url' => '/', - ), + ], $tokenManager ); - return array($listener, $tokenStorage, $httpUtils, $options); + return [$listener, $tokenStorage, $httpUtils, $options]; } private function getSuccessHandler() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php index 9acb8041..686c7231 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php @@ -90,7 +90,7 @@ class RememberMeListenerTest extends TestCase $manager ->expects($this->once()) ->method('authenticate') - ->will($this->throwException($exception)) + ->willThrowException($exception) ; $event = $this->getGetResponseEvent(); @@ -132,7 +132,7 @@ class RememberMeListenerTest extends TestCase $manager ->expects($this->once()) ->method('authenticate') - ->will($this->throwException($exception)) + ->willThrowException($exception) ; $event = $this->getGetResponseEvent(); @@ -159,7 +159,7 @@ class RememberMeListenerTest extends TestCase $service ->expects($this->once()) ->method('autoLogin') - ->will($this->throwException($exception)) + ->willThrowException($exception) ; $service @@ -420,7 +420,7 @@ class RememberMeListenerTest extends TestCase $sessionStrategy = ($withSessionStrategy ? $this->getSessionStrategy() : null) ); - return array($listener, $tokenStorage, $service, $manager, $logger, $dispatcher, $sessionStrategy); + return [$listener, $tokenStorage, $service, $manager, $logger, $dispatcher, $sessionStrategy]; } protected function getLogger() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/RemoteUserAuthenticationListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/RemoteUserAuthenticationListenerTest.php index c02812f6..ee5334c1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/RemoteUserAuthenticationListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/RemoteUserAuthenticationListenerTest.php @@ -19,11 +19,11 @@ class RemoteUserAuthenticationListenerTest extends TestCase { public function testGetPreAuthenticatedData() { - $serverVars = array( + $serverVars = [ 'REMOTE_USER' => 'TheUser', - ); + ]; - $request = new Request(array(), array(), array(), array(), array(), $serverVars); + $request = new Request([], [], [], [], [], $serverVars); $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); @@ -38,8 +38,8 @@ class RemoteUserAuthenticationListenerTest extends TestCase $method = new \ReflectionMethod($listener, 'getPreAuthenticatedData'); $method->setAccessible(true); - $result = $method->invokeArgs($listener, array($request)); - $this->assertSame($result, array('TheUser', null)); + $result = $method->invokeArgs($listener, [$request]); + $this->assertSame($result, ['TheUser', null]); } /** @@ -47,7 +47,7 @@ class RemoteUserAuthenticationListenerTest extends TestCase */ public function testGetPreAuthenticatedDataNoUser() { - $request = new Request(array(), array(), array(), array(), array(), array()); + $request = new Request([], [], [], [], [], []); $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); @@ -62,16 +62,16 @@ class RemoteUserAuthenticationListenerTest extends TestCase $method = new \ReflectionMethod($listener, 'getPreAuthenticatedData'); $method->setAccessible(true); - $result = $method->invokeArgs($listener, array($request)); + $result = $method->invokeArgs($listener, [$request]); } public function testGetPreAuthenticatedDataWithDifferentKeys() { - $userCredentials = array('TheUser', null); + $userCredentials = ['TheUser', null]; - $request = new Request(array(), array(), array(), array(), array(), array( + $request = new Request([], [], [], [], [], [ 'TheUserKey' => 'TheUser', - )); + ]); $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); @@ -86,7 +86,7 @@ class RemoteUserAuthenticationListenerTest extends TestCase $method = new \ReflectionMethod($listener, 'getPreAuthenticatedData'); $method->setAccessible(true); - $result = $method->invokeArgs($listener, array($request)); + $result = $method->invokeArgs($listener, [$request]); $this->assertSame($result, $userCredentials); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php index 0c422985..8739e1b6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php @@ -72,7 +72,7 @@ class SimplePreAuthenticationListenerTest extends TestCase ->expects($this->once()) ->method('authenticate') ->with($this->equalTo($this->token)) - ->will($this->throwException($exception)) + ->willThrowException($exception) ; $this->tokenStorage->expects($this->once()) @@ -102,7 +102,7 @@ class SimplePreAuthenticationListenerTest extends TestCase $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); - $this->request = new Request(array(), array(), array(), array(), array(), array()); + $this->request = new Request([], [], [], [], [], []); $this->event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); $this->event diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php index 0e61ee20..709bc4c8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php @@ -81,7 +81,7 @@ class SwitchUserListenerTest extends TestCase */ public function testExitUserThrowsAuthenticationExceptionIfOriginalTokenCannotBeFound() { - $token = new UsernamePasswordToken('username', '', 'key', array('ROLE_FOO')); + $token = new UsernamePasswordToken('username', '', 'key', ['ROLE_FOO']); $this->tokenStorage->setToken($token); $this->request->query->set('_switch_user', SwitchUserListener::EXIT_VALUE); @@ -92,15 +92,15 @@ class SwitchUserListenerTest extends TestCase public function testExitUserUpdatesToken() { - $originalToken = new UsernamePasswordToken('username', '', 'key', array()); - $this->tokenStorage->setToken(new UsernamePasswordToken('username', '', 'key', array(new SwitchUserRole('ROLE_PREVIOUS', $originalToken)))); + $originalToken = new UsernamePasswordToken('username', '', 'key', []); + $this->tokenStorage->setToken(new UsernamePasswordToken('username', '', 'key', [new SwitchUserRole('ROLE_PREVIOUS', $originalToken)])); $this->request->query->set('_switch_user', SwitchUserListener::EXIT_VALUE); $listener = new SwitchUserListener($this->tokenStorage, $this->userProvider, $this->userChecker, 'provider123', $this->accessDecisionManager); $listener->handle($this->event); - $this->assertSame(array(), $this->request->query->all()); + $this->assertSame([], $this->request->query->all()); $this->assertSame('', $this->request->server->get('QUERY_STRING')); $this->assertInstanceOf('Symfony\Component\HttpFoundation\RedirectResponse', $this->event->getResponse()); $this->assertSame($this->request->getUri(), $this->event->getResponse()->getTargetUrl()); @@ -118,7 +118,7 @@ class SwitchUserListenerTest extends TestCase ->with($originalUser) ->willReturn($refreshedUser); $originalToken = new UsernamePasswordToken($originalUser, '', 'key'); - $this->tokenStorage->setToken(new UsernamePasswordToken('username', '', 'key', array(new SwitchUserRole('ROLE_PREVIOUS', $originalToken)))); + $this->tokenStorage->setToken(new UsernamePasswordToken('username', '', 'key', [new SwitchUserRole('ROLE_PREVIOUS', $originalToken)])); $this->request->query->set('_switch_user', SwitchUserListener::EXIT_VALUE); $dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); @@ -142,7 +142,7 @@ class SwitchUserListenerTest extends TestCase ->expects($this->never()) ->method('refreshUser'); $originalToken = new UsernamePasswordToken($originalUser, '', 'key'); - $this->tokenStorage->setToken(new UsernamePasswordToken('username', '', 'key', array(new SwitchUserRole('ROLE_PREVIOUS', $originalToken)))); + $this->tokenStorage->setToken(new UsernamePasswordToken('username', '', 'key', [new SwitchUserRole('ROLE_PREVIOUS', $originalToken)])); $this->request->query->set('_switch_user', SwitchUserListener::EXIT_VALUE); $dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); @@ -160,13 +160,13 @@ class SwitchUserListenerTest extends TestCase */ public function testSwitchUserIsDisallowed() { - $token = new UsernamePasswordToken('username', '', 'key', array('ROLE_FOO')); + $token = new UsernamePasswordToken('username', '', 'key', ['ROLE_FOO']); $this->tokenStorage->setToken($token); $this->request->query->set('_switch_user', 'kuba'); $this->accessDecisionManager->expects($this->once()) - ->method('decide')->with($token, array('ROLE_ALLOWED_TO_SWITCH')) + ->method('decide')->with($token, ['ROLE_ALLOWED_TO_SWITCH']) ->will($this->returnValue(false)); $listener = new SwitchUserListener($this->tokenStorage, $this->userProvider, $this->userChecker, 'provider123', $this->accessDecisionManager); @@ -175,14 +175,14 @@ class SwitchUserListenerTest extends TestCase public function testSwitchUser() { - $token = new UsernamePasswordToken('username', '', 'key', array('ROLE_FOO')); - $user = new User('username', 'password', array()); + $token = new UsernamePasswordToken('username', '', 'key', ['ROLE_FOO']); + $user = new User('username', 'password', []); $this->tokenStorage->setToken($token); $this->request->query->set('_switch_user', 'kuba'); $this->accessDecisionManager->expects($this->once()) - ->method('decide')->with($token, array('ROLE_ALLOWED_TO_SWITCH')) + ->method('decide')->with($token, ['ROLE_ALLOWED_TO_SWITCH']) ->will($this->returnValue(true)); $this->userProvider->expects($this->once()) @@ -194,25 +194,25 @@ class SwitchUserListenerTest extends TestCase $listener = new SwitchUserListener($this->tokenStorage, $this->userProvider, $this->userChecker, 'provider123', $this->accessDecisionManager); $listener->handle($this->event); - $this->assertSame(array(), $this->request->query->all()); + $this->assertSame([], $this->request->query->all()); $this->assertSame('', $this->request->server->get('QUERY_STRING')); $this->assertInstanceOf('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken', $this->tokenStorage->getToken()); } public function testSwitchUserKeepsOtherQueryStringParameters() { - $token = new UsernamePasswordToken('username', '', 'key', array('ROLE_FOO')); - $user = new User('username', 'password', array()); + $token = new UsernamePasswordToken('username', '', 'key', ['ROLE_FOO']); + $user = new User('username', 'password', []); $this->tokenStorage->setToken($token); - $this->request->query->replace(array( + $this->request->query->replace([ '_switch_user' => 'kuba', 'page' => 3, 'section' => 2, - )); + ]); $this->accessDecisionManager->expects($this->once()) - ->method('decide')->with($token, array('ROLE_ALLOWED_TO_SWITCH')) + ->method('decide')->with($token, ['ROLE_ALLOWED_TO_SWITCH']) ->will($this->returnValue(true)); $this->userProvider->expects($this->once()) @@ -230,17 +230,17 @@ class SwitchUserListenerTest extends TestCase public function testSwitchUserWithReplacedToken() { - $user = new User('username', 'password', array()); - $token = new UsernamePasswordToken($user, '', 'provider123', array('ROLE_FOO')); + $user = new User('username', 'password', []); + $token = new UsernamePasswordToken($user, '', 'provider123', ['ROLE_FOO']); - $user = new User('replaced', 'password', array()); - $replacedToken = new UsernamePasswordToken($user, '', 'provider123', array('ROLE_BAR')); + $user = new User('replaced', 'password', []); + $replacedToken = new UsernamePasswordToken($user, '', 'provider123', ['ROLE_BAR']); $this->tokenStorage->setToken($token); $this->request->query->set('_switch_user', 'kuba'); $this->accessDecisionManager->expects($this->any()) - ->method('decide')->with($token, array('ROLE_ALLOWED_TO_SWITCH')) + ->method('decide')->with($token, ['ROLE_ALLOWED_TO_SWITCH']) ->will($this->returnValue(true)); $this->userProvider->expects($this->any()) @@ -267,16 +267,27 @@ class SwitchUserListenerTest extends TestCase $this->assertSame($replacedToken, $this->tokenStorage->getToken()); } + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException + */ + public function testSwitchtUserThrowsAuthenticationExceptionIfNoCurrentToken() + { + $this->tokenStorage->setToken(null); + $this->request->query->set('_switch_user', 'username'); + $listener = new SwitchUserListener($this->tokenStorage, $this->userProvider, $this->userChecker, 'provider123', $this->accessDecisionManager); + $listener->handle($this->event); + } + public function testSwitchUserStateless() { - $token = new UsernamePasswordToken('username', '', 'key', array('ROLE_FOO')); - $user = new User('username', 'password', array()); + $token = new UsernamePasswordToken('username', '', 'key', ['ROLE_FOO']); + $user = new User('username', 'password', []); $this->tokenStorage->setToken($token); $this->request->query->set('_switch_user', 'kuba'); $this->accessDecisionManager->expects($this->once()) - ->method('decide')->with($token, array('ROLE_ALLOWED_TO_SWITCH')) + ->method('decide')->with($token, ['ROLE_ALLOWED_TO_SWITCH']) ->will($this->returnValue(true)); $this->userProvider->expects($this->once()) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordFormAuthenticationListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordFormAuthenticationListenerTest.php index 6ab54322..f1536db6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordFormAuthenticationListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordFormAuthenticationListenerTest.php @@ -31,7 +31,7 @@ class UsernamePasswordFormAuthenticationListenerTest extends TestCase */ public function testHandleWhenUsernameLength($username, $ok) { - $request = Request::create('/login_check', 'POST', array('_username' => $username)); + $request = Request::create('/login_check', 'POST', ['_username' => $username]); $request->setSession($this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock()); $httpUtils = $this->getMockBuilder('Symfony\Component\Security\Http\HttpUtils')->getMock(); @@ -63,7 +63,7 @@ class UsernamePasswordFormAuthenticationListenerTest extends TestCase 'TheProviderKey', $this->getMockBuilder('Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface')->getMock(), $failureHandler, - array('require_previous_session' => false) + ['require_previous_session' => false] ); $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); @@ -81,9 +81,9 @@ class UsernamePasswordFormAuthenticationListenerTest extends TestCase * @expectedException \Symfony\Component\HttpKernel\Exception\BadRequestHttpException * @expectedExceptionMessage The key "_username" must be a string, "array" given. */ - public function testHandleNonStringUsername($postOnly) + public function testHandleNonStringUsernameWithArray($postOnly) { - $request = Request::create('/login_check', 'POST', array('_username' => array())); + $request = Request::create('/login_check', 'POST', ['_username' => []]); $request->setSession($this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock()); $listener = new UsernamePasswordFormAuthenticationListener( new TokenStorage(), @@ -93,7 +93,80 @@ class UsernamePasswordFormAuthenticationListenerTest extends TestCase 'foo', new DefaultAuthenticationSuccessHandler($httpUtils), new DefaultAuthenticationFailureHandler($this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), $httpUtils), - array('require_previous_session' => false, 'post_only' => $postOnly) + ['require_previous_session' => false, 'post_only' => $postOnly] + ); + $event = new GetResponseEvent($this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), $request, HttpKernelInterface::MASTER_REQUEST); + $listener->handle($event); + } + + /** + * @dataProvider postOnlyDataProvider + * @expectedException \Symfony\Component\HttpKernel\Exception\BadRequestHttpException + * @expectedExceptionMessage The key "_username" must be a string, "integer" given. + */ + public function testHandleNonStringUsernameWithInt($postOnly) + { + $request = Request::create('/login_check', 'POST', ['_username' => 42]); + $request->setSession($this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock()); + $listener = new UsernamePasswordFormAuthenticationListener( + new TokenStorage(), + $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(), + new SessionAuthenticationStrategy(SessionAuthenticationStrategy::NONE), + $httpUtils = new HttpUtils(), + 'foo', + new DefaultAuthenticationSuccessHandler($httpUtils), + new DefaultAuthenticationFailureHandler($this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), $httpUtils), + ['require_previous_session' => false, 'post_only' => $postOnly] + ); + $event = new GetResponseEvent($this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), $request, HttpKernelInterface::MASTER_REQUEST); + $listener->handle($event); + } + + /** + * @dataProvider postOnlyDataProvider + * @expectedException \Symfony\Component\HttpKernel\Exception\BadRequestHttpException + * @expectedExceptionMessage The key "_username" must be a string, "object" given. + */ + public function testHandleNonStringUsernameWithObject($postOnly) + { + $request = Request::create('/login_check', 'POST', ['_username' => new \stdClass()]); + $request->setSession($this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock()); + $listener = new UsernamePasswordFormAuthenticationListener( + new TokenStorage(), + $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(), + new SessionAuthenticationStrategy(SessionAuthenticationStrategy::NONE), + $httpUtils = new HttpUtils(), + 'foo', + new DefaultAuthenticationSuccessHandler($httpUtils), + new DefaultAuthenticationFailureHandler($this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), $httpUtils), + ['require_previous_session' => false, 'post_only' => $postOnly] + ); + $event = new GetResponseEvent($this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), $request, HttpKernelInterface::MASTER_REQUEST); + $listener->handle($event); + } + + /** + * @dataProvider postOnlyDataProvider + */ + public function testHandleNonStringUsernameWith__toString($postOnly) + { + $usernameClass = $this->getMockBuilder(DummyUserClass::class)->getMock(); + $usernameClass + ->expects($this->atLeastOnce()) + ->method('__toString') + ->will($this->returnValue('someUsername')); + + $request = Request::create('/login_check', 'POST', ['_username' => $usernameClass]); + $request->setSession($this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock()); + $listener = new UsernamePasswordFormAuthenticationListener( + new TokenStorage(), + $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(), + new SessionAuthenticationStrategy(SessionAuthenticationStrategy::NONE), + $httpUtils = new HttpUtils(), + 'foo', + new DefaultAuthenticationSuccessHandler($httpUtils), + new DefaultAuthenticationFailureHandler($this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), $httpUtils), + ['require_previous_session' => false, 'post_only' => $postOnly] ); $event = new GetResponseEvent($this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), $request, HttpKernelInterface::MASTER_REQUEST); $listener->handle($event); @@ -101,17 +174,25 @@ class UsernamePasswordFormAuthenticationListenerTest extends TestCase public function postOnlyDataProvider() { - return array( - array(true), - array(false), - ); + return [ + [true], + [false], + ]; } public function getUsernameForLength() { - return array( - array(str_repeat('x', Security::MAX_USERNAME_LENGTH + 1), false), - array(str_repeat('x', Security::MAX_USERNAME_LENGTH - 1), true), - ); + return [ + [str_repeat('x', Security::MAX_USERNAME_LENGTH + 1), false], + [str_repeat('x', Security::MAX_USERNAME_LENGTH - 1), true], + ]; + } +} + +class DummyUserClass +{ + public function __toString() + { + return ''; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordJsonAuthenticationListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordJsonAuthenticationListenerTest.php index d8bb77bb..ed7acfbe 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordJsonAuthenticationListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordJsonAuthenticationListenerTest.php @@ -36,7 +36,7 @@ class UsernamePasswordJsonAuthenticationListenerTest extends TestCase */ private $listener; - private function createListener(array $options = array(), $success = true, $matchCheckPath = true) + private function createListener(array $options = [], $success = true, $matchCheckPath = true) { $tokenStorage = $this->getMockBuilder(TokenStorageInterface::class)->getMock(); $httpUtils = $this->getMockBuilder(HttpUtils::class)->getMock(); @@ -66,7 +66,7 @@ class UsernamePasswordJsonAuthenticationListenerTest extends TestCase public function testHandleSuccessIfRequestContentTypeIsJson() { $this->createListener(); - $request = new Request(array(), array(), array(), array(), array(), array('HTTP_CONTENT_TYPE' => 'application/json'), '{"username": "dunglas", "password": "foo"}'); + $request = new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json'], '{"username": "dunglas", "password": "foo"}'); $event = new GetResponseEvent($this->getMockBuilder(KernelInterface::class)->getMock(), $request, KernelInterface::MASTER_REQUEST); $this->listener->handle($event); @@ -76,7 +76,7 @@ class UsernamePasswordJsonAuthenticationListenerTest extends TestCase public function testSuccessIfRequestFormatIsJsonLD() { $this->createListener(); - $request = new Request(array(), array(), array(), array(), array(), array(), '{"username": "dunglas", "password": "foo"}'); + $request = new Request([], [], [], [], [], [], '{"username": "dunglas", "password": "foo"}'); $request->setRequestFormat('json-ld'); $event = new GetResponseEvent($this->getMockBuilder(KernelInterface::class)->getMock(), $request, KernelInterface::MASTER_REQUEST); @@ -86,8 +86,8 @@ class UsernamePasswordJsonAuthenticationListenerTest extends TestCase public function testHandleFailure() { - $this->createListener(array(), false); - $request = new Request(array(), array(), array(), array(), array(), array('HTTP_CONTENT_TYPE' => 'application/json'), '{"username": "dunglas", "password": "foo"}'); + $this->createListener([], false); + $request = new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json'], '{"username": "dunglas", "password": "foo"}'); $event = new GetResponseEvent($this->getMockBuilder(KernelInterface::class)->getMock(), $request, KernelInterface::MASTER_REQUEST); $this->listener->handle($event); @@ -96,8 +96,8 @@ class UsernamePasswordJsonAuthenticationListenerTest extends TestCase public function testUsePath() { - $this->createListener(array('username_path' => 'user.login', 'password_path' => 'user.pwd')); - $request = new Request(array(), array(), array(), array(), array(), array('HTTP_CONTENT_TYPE' => 'application/json'), '{"user": {"login": "dunglas", "pwd": "foo"}}'); + $this->createListener(['username_path' => 'user.login', 'password_path' => 'user.pwd']); + $request = new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json'], '{"user": {"login": "dunglas", "pwd": "foo"}}'); $event = new GetResponseEvent($this->getMockBuilder(KernelInterface::class)->getMock(), $request, KernelInterface::MASTER_REQUEST); $this->listener->handle($event); @@ -125,7 +125,7 @@ class UsernamePasswordJsonAuthenticationListenerTest extends TestCase public function testAttemptAuthenticationNoUsername() { $this->createListener(); - $request = new Request(array(), array(), array(), array(), array(), array('HTTP_CONTENT_TYPE' => 'application/json'), '{"usr": "dunglas", "password": "foo"}'); + $request = new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json'], '{"usr": "dunglas", "password": "foo"}'); $event = new GetResponseEvent($this->getMockBuilder(KernelInterface::class)->getMock(), $request, KernelInterface::MASTER_REQUEST); $this->listener->handle($event); @@ -138,7 +138,7 @@ class UsernamePasswordJsonAuthenticationListenerTest extends TestCase public function testAttemptAuthenticationNoPassword() { $this->createListener(); - $request = new Request(array(), array(), array(), array(), array(), array('HTTP_CONTENT_TYPE' => 'application/json'), '{"username": "dunglas", "pass": "foo"}'); + $request = new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json'], '{"username": "dunglas", "pass": "foo"}'); $event = new GetResponseEvent($this->getMockBuilder(KernelInterface::class)->getMock(), $request, KernelInterface::MASTER_REQUEST); $this->listener->handle($event); @@ -151,7 +151,7 @@ class UsernamePasswordJsonAuthenticationListenerTest extends TestCase public function testAttemptAuthenticationUsernameNotAString() { $this->createListener(); - $request = new Request(array(), array(), array(), array(), array(), array('HTTP_CONTENT_TYPE' => 'application/json'), '{"username": 1, "password": "foo"}'); + $request = new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json'], '{"username": 1, "password": "foo"}'); $event = new GetResponseEvent($this->getMockBuilder(KernelInterface::class)->getMock(), $request, KernelInterface::MASTER_REQUEST); $this->listener->handle($event); @@ -164,7 +164,7 @@ class UsernamePasswordJsonAuthenticationListenerTest extends TestCase public function testAttemptAuthenticationPasswordNotAString() { $this->createListener(); - $request = new Request(array(), array(), array(), array(), array(), array('HTTP_CONTENT_TYPE' => 'application/json'), '{"username": "dunglas", "password": 1}'); + $request = new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json'], '{"username": "dunglas", "password": 1}'); $event = new GetResponseEvent($this->getMockBuilder(KernelInterface::class)->getMock(), $request, KernelInterface::MASTER_REQUEST); $this->listener->handle($event); @@ -174,7 +174,7 @@ class UsernamePasswordJsonAuthenticationListenerTest extends TestCase { $this->createListener(); $username = str_repeat('x', Security::MAX_USERNAME_LENGTH + 1); - $request = new Request(array(), array(), array(), array(), array(), array('HTTP_CONTENT_TYPE' => 'application/json'), sprintf('{"username": "%s", "password": 1}', $username)); + $request = new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json'], sprintf('{"username": "%s", "password": 1}', $username)); $event = new GetResponseEvent($this->getMockBuilder(KernelInterface::class)->getMock(), $request, KernelInterface::MASTER_REQUEST); $this->listener->handle($event); @@ -183,8 +183,8 @@ class UsernamePasswordJsonAuthenticationListenerTest extends TestCase public function testDoesNotAttemptAuthenticationIfRequestPathDoesNotMatchCheckPath() { - $this->createListener(array('check_path' => '/'), true, false); - $request = new Request(array(), array(), array(), array(), array(), array('HTTP_CONTENT_TYPE' => 'application/json')); + $this->createListener(['check_path' => '/'], true, false); + $request = new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json']); $event = new GetResponseEvent($this->getMockBuilder(KernelInterface::class)->getMock(), $request, KernelInterface::MASTER_REQUEST); $event->setResponse(new Response('original')); @@ -195,7 +195,7 @@ class UsernamePasswordJsonAuthenticationListenerTest extends TestCase public function testDoesNotAttemptAuthenticationIfRequestContentTypeIsNotJson() { $this->createListener(); - $request = new Request(array(), array(), array(), array(), array(), array(), '{"username": "dunglas", "password": "foo"}'); + $request = new Request([], [], [], [], [], [], '{"username": "dunglas", "password": "foo"}'); $event = new GetResponseEvent($this->getMockBuilder(KernelInterface::class)->getMock(), $request, KernelInterface::MASTER_REQUEST); $event->setResponse(new Response('original')); @@ -205,8 +205,8 @@ class UsernamePasswordJsonAuthenticationListenerTest extends TestCase public function testAttemptAuthenticationIfRequestPathMatchesCheckPath() { - $this->createListener(array('check_path' => '/')); - $request = new Request(array(), array(), array(), array(), array(), array('HTTP_CONTENT_TYPE' => 'application/json'), '{"username": "dunglas", "password": "foo"}'); + $this->createListener(['check_path' => '/']); + $request = new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json'], '{"username": "dunglas", "password": "foo"}'); $event = new GetResponseEvent($this->getMockBuilder(KernelInterface::class)->getMock(), $request, KernelInterface::MASTER_REQUEST); $this->listener->handle($event); @@ -216,7 +216,7 @@ class UsernamePasswordJsonAuthenticationListenerTest extends TestCase public function testNoErrorOnMissingSessionStrategy() { $this->createListener(); - $request = new Request(array(), array(), array(), array(), array(), array('HTTP_CONTENT_TYPE' => 'application/json'), '{"username": "dunglas", "password": "foo"}'); + $request = new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json'], '{"username": "dunglas", "password": "foo"}'); $this->configurePreviousSession($request); $event = new GetResponseEvent($this->getMockBuilder(KernelInterface::class)->getMock(), $request, KernelInterface::MASTER_REQUEST); @@ -227,7 +227,7 @@ class UsernamePasswordJsonAuthenticationListenerTest extends TestCase public function testMigratesViaSessionStrategy() { $this->createListener(); - $request = new Request(array(), array(), array(), array(), array(), array('HTTP_CONTENT_TYPE' => 'application/json'), '{"username": "dunglas", "password": "foo"}'); + $request = new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json'], '{"username": "dunglas", "password": "foo"}'); $this->configurePreviousSession($request); $event = new GetResponseEvent($this->getMockBuilder(KernelInterface::class)->getMock(), $request, KernelInterface::MASTER_REQUEST); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/X509AuthenticationListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/X509AuthenticationListenerTest.php index 07206202..c55eaae0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/X509AuthenticationListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/X509AuthenticationListenerTest.php @@ -22,7 +22,7 @@ class X509AuthenticationListenerTest extends TestCase */ public function testGetPreAuthenticatedData($user, $credentials) { - $serverVars = array(); + $serverVars = []; if ('' !== $user) { $serverVars['SSL_CLIENT_S_DN_Email'] = $user; } @@ -30,7 +30,7 @@ class X509AuthenticationListenerTest extends TestCase $serverVars['SSL_CLIENT_S_DN'] = $credentials; } - $request = new Request(array(), array(), array(), array(), array(), $serverVars); + $request = new Request([], [], [], [], [], $serverVars); $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); @@ -41,16 +41,16 @@ class X509AuthenticationListenerTest extends TestCase $method = new \ReflectionMethod($listener, 'getPreAuthenticatedData'); $method->setAccessible(true); - $result = $method->invokeArgs($listener, array($request)); - $this->assertSame($result, array($user, $credentials)); + $result = $method->invokeArgs($listener, [$request]); + $this->assertSame($result, [$user, $credentials]); } public static function dataProviderGetPreAuthenticatedData() { - return array( - 'validValues' => array('TheUser', 'TheCredentials'), - 'noCredentials' => array('TheUser', ''), - ); + return [ + 'validValues' => ['TheUser', 'TheCredentials'], + 'noCredentials' => ['TheUser', ''], + ]; } /** @@ -59,7 +59,7 @@ class X509AuthenticationListenerTest extends TestCase public function testGetPreAuthenticatedDataNoUser($emailAddress) { $credentials = 'CN=Sample certificate DN/emailAddress='.$emailAddress; - $request = new Request(array(), array(), array(), array(), array(), array('SSL_CLIENT_S_DN' => $credentials)); + $request = new Request([], [], [], [], [], ['SSL_CLIENT_S_DN' => $credentials]); $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); @@ -70,16 +70,16 @@ class X509AuthenticationListenerTest extends TestCase $method = new \ReflectionMethod($listener, 'getPreAuthenticatedData'); $method->setAccessible(true); - $result = $method->invokeArgs($listener, array($request)); - $this->assertSame($result, array($emailAddress, $credentials)); + $result = $method->invokeArgs($listener, [$request]); + $this->assertSame($result, [$emailAddress, $credentials]); } public static function dataProviderGetPreAuthenticatedDataNoUser() { - return array( - 'basicEmailAddress' => array('cert@example.com'), - 'emailAddressWithPlusSign' => array('cert+something@example.com'), - ); + return [ + 'basicEmailAddress' => ['cert@example.com'], + 'emailAddressWithPlusSign' => ['cert+something@example.com'], + ]; } /** @@ -87,7 +87,7 @@ class X509AuthenticationListenerTest extends TestCase */ public function testGetPreAuthenticatedDataNoData() { - $request = new Request(array(), array(), array(), array(), array(), array()); + $request = new Request([], [], [], [], [], []); $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); @@ -98,17 +98,17 @@ class X509AuthenticationListenerTest extends TestCase $method = new \ReflectionMethod($listener, 'getPreAuthenticatedData'); $method->setAccessible(true); - $result = $method->invokeArgs($listener, array($request)); + $result = $method->invokeArgs($listener, [$request]); } public function testGetPreAuthenticatedDataWithDifferentKeys() { - $userCredentials = array('TheUser', 'TheCredentials'); + $userCredentials = ['TheUser', 'TheCredentials']; - $request = new Request(array(), array(), array(), array(), array(), array( + $request = new Request([], [], [], [], [], [ 'TheUserKey' => 'TheUser', 'TheCredentialsKey' => 'TheCredentials', - )); + ]); $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); @@ -118,7 +118,7 @@ class X509AuthenticationListenerTest extends TestCase $method = new \ReflectionMethod($listener, 'getPreAuthenticatedData'); $method->setAccessible(true); - $result = $method->invokeArgs($listener, array($request)); + $result = $method->invokeArgs($listener, [$request]); $this->assertSame($result, $userCredentials); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/FirewallMapTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/FirewallMapTest.php index 5cd9d7de..04fe3b4e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/FirewallMapTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/FirewallMapTest.php @@ -31,7 +31,7 @@ class FirewallMapTest extends TestCase ->will($this->returnValue(false)) ; - $map->add($notMatchingMatcher, array($this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock())); + $map->add($notMatchingMatcher, [$this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock()]); $matchingMatcher = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcher')->getMock(); $matchingMatcher @@ -43,7 +43,7 @@ class FirewallMapTest extends TestCase $theListener = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock(); $theException = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ExceptionListener')->disableOriginalConstructor()->getMock(); - $map->add($matchingMatcher, array($theListener), $theException); + $map->add($matchingMatcher, [$theListener], $theException); $tooLateMatcher = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcher')->getMock(); $tooLateMatcher @@ -51,11 +51,11 @@ class FirewallMapTest extends TestCase ->method('matches') ; - $map->add($tooLateMatcher, array($this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock())); + $map->add($tooLateMatcher, [$this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock()]); list($listeners, $exception) = $map->getListeners($request); - $this->assertEquals(array($theListener), $listeners); + $this->assertEquals([$theListener], $listeners); $this->assertEquals($theException, $exception); } @@ -73,12 +73,12 @@ class FirewallMapTest extends TestCase ->will($this->returnValue(false)) ; - $map->add($notMatchingMatcher, array($this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock())); + $map->add($notMatchingMatcher, [$this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock()]); $theListener = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock(); $theException = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ExceptionListener')->disableOriginalConstructor()->getMock(); - $map->add(null, array($theListener), $theException); + $map->add(null, [$theListener], $theException); $tooLateMatcher = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcher')->getMock(); $tooLateMatcher @@ -86,11 +86,11 @@ class FirewallMapTest extends TestCase ->method('matches') ; - $map->add($tooLateMatcher, array($this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock())); + $map->add($tooLateMatcher, [$this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock()]); list($listeners, $exception) = $map->getListeners($request); - $this->assertEquals(array($theListener), $listeners); + $this->assertEquals([$theListener], $listeners); $this->assertEquals($theException, $exception); } @@ -108,11 +108,11 @@ class FirewallMapTest extends TestCase ->will($this->returnValue(false)) ; - $map->add($notMatchingMatcher, array($this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock())); + $map->add($notMatchingMatcher, [$this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock()]); list($listeners, $exception) = $map->getListeners($request); - $this->assertEquals(array(), $listeners); + $this->assertEquals([], $listeners); $this->assertNull($exception); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/FirewallTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/FirewallTest.php index 66dad461..9113890b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/FirewallTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/FirewallTest.php @@ -37,7 +37,7 @@ class FirewallTest extends TestCase ->expects($this->once()) ->method('getListeners') ->with($this->equalTo($request)) - ->will($this->returnValue(array(array(), $listener))) + ->will($this->returnValue([[], $listener])) ; $event = new GetResponseEvent($this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), $request, HttpKernelInterface::MASTER_REQUEST); @@ -66,16 +66,16 @@ class FirewallTest extends TestCase $map ->expects($this->once()) ->method('getListeners') - ->will($this->returnValue(array(array($first, $second), null))) + ->will($this->returnValue([[$first, $second], null])) ; $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent') - ->setMethods(array('hasResponse')) - ->setConstructorArgs(array( + ->setMethods(['hasResponse']) + ->setConstructorArgs([ $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->disableOriginalConstructor()->disableOriginalClone()->getMock(), HttpKernelInterface::MASTER_REQUEST, - )) + ]) ->getMock() ; $event diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php index 28b24299..5368f468 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php @@ -54,14 +54,28 @@ class HttpUtilsTest extends TestCase $this->assertTrue($response->isRedirect('http://localhost/blog')); } - public function testCreateRedirectResponseWithBadRequestsDomain() + /** + * @dataProvider badRequestDomainUrls + */ + public function testCreateRedirectResponseWithBadRequestsDomain($url) { $utils = new HttpUtils($this->getUrlGenerator(), null, '#^https?://%s$#i'); - $response = $utils->createRedirectResponse($this->getRequest(), 'http://pirate.net/foo'); + $response = $utils->createRedirectResponse($this->getRequest(), $url); $this->assertTrue($response->isRedirect('http://localhost/')); } + public function badRequestDomainUrls() + { + return [ + ['http://pirate.net/foo'], + ['http:\\\\pirate.net/foo'], + ['http:/\\pirate.net/foo'], + ['http:\\/pirate.net/foo'], + ['http://////pirate.net/foo'], + ]; + } + public function testCreateRedirectResponseWithProtocolRelativeTarget() { $utils = new HttpUtils($this->getUrlGenerator(), null, '#^https?://%s$#i'); @@ -77,7 +91,7 @@ class HttpUtilsTest extends TestCase $urlGenerator ->expects($this->any()) ->method('generate') - ->with('foobar', array(), UrlGeneratorInterface::ABSOLUTE_URL) + ->with('foobar', [], UrlGeneratorInterface::ABSOLUTE_URL) ->will($this->returnValue('http://localhost/foo/bar')) ; $urlGenerator @@ -159,11 +173,11 @@ class HttpUtilsTest extends TestCase public function provideSecurityContextAttributes() { - return array( - array(Security::AUTHENTICATION_ERROR), - array(Security::ACCESS_DENIED_ERROR), - array(Security::LAST_USERNAME), - ); + return [ + [Security::AUTHENTICATION_ERROR], + [Security::ACCESS_DENIED_ERROR], + [Security::LAST_USERNAME], + ]; } public function testCheckRequestPath() @@ -186,7 +200,7 @@ class HttpUtilsTest extends TestCase ->expects($this->any()) ->method('match') ->with('/') - ->will($this->throwException(new ResourceNotFoundException())) + ->willThrowException(new ResourceNotFoundException()) ; $utils = new HttpUtils(null, $urlMatcher); @@ -201,7 +215,7 @@ class HttpUtilsTest extends TestCase ->expects($this->any()) ->method('matchRequest') ->with($request) - ->will($this->throwException(new MethodNotAllowedException(array()))) + ->willThrowException(new MethodNotAllowedException([])) ; $utils = new HttpUtils(null, $urlMatcher); @@ -215,7 +229,7 @@ class HttpUtilsTest extends TestCase ->expects($this->any()) ->method('match') ->with('/foo/bar') - ->will($this->returnValue(array('_route' => 'foobar'))) + ->will($this->returnValue(['_route' => 'foobar'])) ; $utils = new HttpUtils(null, $urlMatcher); @@ -230,7 +244,7 @@ class HttpUtilsTest extends TestCase ->expects($this->any()) ->method('matchRequest') ->with($request) - ->will($this->returnValue(array('_route' => 'foobar'))) + ->will($this->returnValue(['_route' => 'foobar'])) ; $utils = new HttpUtils(null, $urlMatcher); @@ -246,7 +260,7 @@ class HttpUtilsTest extends TestCase $urlMatcher ->expects($this->any()) ->method('match') - ->will($this->throwException(new \RuntimeException())) + ->willThrowException(new \RuntimeException()) ; $utils = new HttpUtils(null, $urlMatcher); @@ -259,7 +273,7 @@ class HttpUtilsTest extends TestCase $urlMatcher ->expects($this->any()) ->method('match') - ->willReturn(array('_controller' => 'PathController')) + ->willReturn(['_controller' => 'PathController']) ; $utils = new HttpUtils(null, $urlMatcher); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Logout/CookieClearingLogoutHandlerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Logout/CookieClearingLogoutHandlerTest.php index f199d0ee..8dcc1033 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Logout/CookieClearingLogoutHandlerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Logout/CookieClearingLogoutHandlerTest.php @@ -25,7 +25,7 @@ class CookieClearingLogoutHandlerTest extends TestCase $response = new Response(); $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); - $handler = new CookieClearingLogoutHandler(array('foo' => array('path' => '/foo', 'domain' => 'foo.foo'), 'foo2' => array('path' => null, 'domain' => null))); + $handler = new CookieClearingLogoutHandler(['foo' => ['path' => '/foo', 'domain' => 'foo.foo'], 'foo2' => ['path' => null, 'domain' => null]]); $cookies = $response->headers->getCookies(); $this->assertCount(0, $cookies); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php index 5a35dd09..38b8474f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php @@ -21,7 +21,7 @@ class AbstractRememberMeServicesTest extends TestCase { public function testGetRememberMeParameter() { - $service = $this->getService(null, array('remember_me_parameter' => 'foo')); + $service = $this->getService(null, ['remember_me_parameter' => 'foo']); $this->assertEquals('foo', $service->getRememberMeParameter()); } @@ -34,7 +34,7 @@ class AbstractRememberMeServicesTest extends TestCase public function testAutoLoginReturnsNullWhenNoCookie() { - $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null)); + $service = $this->getService(null, ['name' => 'foo', 'path' => null, 'domain' => null]); $this->assertNull($service->autoLogin(new Request())); } @@ -44,7 +44,7 @@ class AbstractRememberMeServicesTest extends TestCase */ public function testAutoLoginThrowsExceptionWhenImplementationDoesNotReturnUserInterface() { - $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null)); + $service = $this->getService(null, ['name' => 'foo', 'path' => null, 'domain' => null]); $request = new Request(); $request->cookies->set('foo', 'foo'); @@ -59,7 +59,7 @@ class AbstractRememberMeServicesTest extends TestCase public function testAutoLogin() { - $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null)); + $service = $this->getService(null, ['name' => 'foo', 'path' => null, 'domain' => null]); $request = new Request(); $request->cookies->set('foo', 'foo'); @@ -67,7 +67,7 @@ class AbstractRememberMeServicesTest extends TestCase $user ->expects($this->once()) ->method('getRoles') - ->will($this->returnValue(array())) + ->will($this->returnValue([])) ; $service @@ -105,15 +105,15 @@ class AbstractRememberMeServicesTest extends TestCase public function provideOptionsForLogout() { - return array( - array(array('name' => 'foo', 'path' => '/', 'domain' => null, 'secure' => false, 'httponly' => true)), - array(array('name' => 'foo', 'path' => '/bar', 'domain' => 'baz.com', 'secure' => true, 'httponly' => false)), - ); + return [ + [['name' => 'foo', 'path' => '/', 'domain' => null, 'secure' => false, 'httponly' => true]], + [['name' => 'foo', 'path' => '/bar', 'domain' => 'baz.com', 'secure' => true, 'httponly' => false]], + ]; } public function testLoginFail() { - $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null)); + $service = $this->getService(null, ['name' => 'foo', 'path' => null, 'domain' => null]); $request = new Request(); $service->loginFail($request); @@ -123,7 +123,7 @@ class AbstractRememberMeServicesTest extends TestCase public function testLoginSuccessIsNotProcessedWhenTokenDoesNotContainUserInterfaceImplementation() { - $service = $this->getService(null, array('name' => 'foo', 'always_remember_me' => true, 'path' => null, 'domain' => null)); + $service = $this->getService(null, ['name' => 'foo', 'always_remember_me' => true, 'path' => null, 'domain' => null]); $request = new Request(); $response = new Response(); $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); @@ -146,7 +146,7 @@ class AbstractRememberMeServicesTest extends TestCase public function testLoginSuccessIsNotProcessedWhenRememberMeIsNotRequested() { - $service = $this->getService(null, array('name' => 'foo', 'always_remember_me' => false, 'remember_me_parameter' => 'foo', 'path' => null, 'domain' => null)); + $service = $this->getService(null, ['name' => 'foo', 'always_remember_me' => false, 'remember_me_parameter' => 'foo', 'path' => null, 'domain' => null]); $request = new Request(); $response = new Response(); $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); @@ -170,7 +170,7 @@ class AbstractRememberMeServicesTest extends TestCase public function testLoginSuccessWhenRememberMeAlwaysIsTrue() { - $service = $this->getService(null, array('name' => 'foo', 'always_remember_me' => true, 'path' => null, 'domain' => null)); + $service = $this->getService(null, ['name' => 'foo', 'always_remember_me' => true, 'path' => null, 'domain' => null]); $request = new Request(); $response = new Response(); $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); @@ -195,10 +195,10 @@ class AbstractRememberMeServicesTest extends TestCase */ public function testLoginSuccessWhenRememberMeParameterWithPathIsPositive($value) { - $service = $this->getService(null, array('name' => 'foo', 'always_remember_me' => false, 'remember_me_parameter' => 'foo[bar]', 'path' => null, 'domain' => null)); + $service = $this->getService(null, ['name' => 'foo', 'always_remember_me' => false, 'remember_me_parameter' => 'foo[bar]', 'path' => null, 'domain' => null]); $request = new Request(); - $request->request->set('foo', array('bar' => $value)); + $request->request->set('foo', ['bar' => $value]); $response = new Response(); $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); @@ -222,7 +222,7 @@ class AbstractRememberMeServicesTest extends TestCase */ public function testLoginSuccessWhenRememberMeParameterIsPositive($value) { - $service = $this->getService(null, array('name' => 'foo', 'always_remember_me' => false, 'remember_me_parameter' => 'foo', 'path' => null, 'domain' => null)); + $service = $this->getService(null, ['name' => 'foo', 'always_remember_me' => false, 'remember_me_parameter' => 'foo', 'path' => null, 'domain' => null]); $request = new Request(); $request->request->set('foo', $value); @@ -246,24 +246,24 @@ class AbstractRememberMeServicesTest extends TestCase public function getPositiveRememberMeParameterValues() { - return array( - array('true'), - array('1'), - array('on'), - array('yes'), - array(true), - ); + return [ + ['true'], + ['1'], + ['on'], + ['yes'], + [true], + ]; } public function testEncodeCookieAndDecodeCookieAreInvertible() { - $cookieParts = array('aa', 'bb', 'cc'); + $cookieParts = ['aa', 'bb', 'cc']; $service = $this->getService(); - $encoded = $this->callProtected($service, 'encodeCookie', array($cookieParts)); + $encoded = $this->callProtected($service, 'encodeCookie', [$cookieParts]); $this->assertInternalType('string', $encoded); - $decoded = $this->callProtected($service, 'decodeCookie', array($encoded)); + $decoded = $this->callProtected($service, 'decodeCookie', [$encoded]); $this->assertSame($cookieParts, $decoded); } @@ -273,21 +273,21 @@ class AbstractRememberMeServicesTest extends TestCase */ public function testThereShouldBeNoCookieDelimiterInCookieParts() { - $cookieParts = array('aa', 'b'.AbstractRememberMeServices::COOKIE_DELIMITER.'b', 'cc'); + $cookieParts = ['aa', 'b'.AbstractRememberMeServices::COOKIE_DELIMITER.'b', 'cc']; $service = $this->getService(); - $this->callProtected($service, 'encodeCookie', array($cookieParts)); + $this->callProtected($service, 'encodeCookie', [$cookieParts]); } - protected function getService($userProvider = null, $options = array(), $logger = null) + protected function getService($userProvider = null, $options = [], $logger = null) { if (null === $userProvider) { $userProvider = $this->getProvider(); } - return $this->getMockForAbstractClass('Symfony\Component\Security\Http\RememberMe\AbstractRememberMeServices', array( - array($userProvider), 'foosecret', 'fookey', $options, $logger, - )); + return $this->getMockForAbstractClass('Symfony\Component\Security\Http\RememberMe\AbstractRememberMeServices', [ + [$userProvider], 'foosecret', 'fookey', $options, $logger, + ]); } protected function getProvider() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php index cf142ea2..529b050c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php @@ -35,14 +35,14 @@ class PersistentTokenBasedRememberMeServicesTest extends TestCase public function testAutoLoginReturnsNullWhenNoCookie() { - $service = $this->getService(null, array('name' => 'foo')); + $service = $this->getService(null, ['name' => 'foo']); $this->assertNull($service->autoLogin(new Request())); } public function testAutoLoginThrowsExceptionOnInvalidCookie() { - $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => false, 'remember_me_parameter' => 'foo')); + $service = $this->getService(null, ['name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => false, 'remember_me_parameter' => 'foo']); $request = new Request(); $request->request->set('foo', 'true'); $request->cookies->set('foo', 'foo'); @@ -53,19 +53,19 @@ class PersistentTokenBasedRememberMeServicesTest extends TestCase public function testAutoLoginThrowsExceptionOnNonExistentToken() { - $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => false, 'remember_me_parameter' => 'foo')); + $service = $this->getService(null, ['name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => false, 'remember_me_parameter' => 'foo']); $request = new Request(); $request->request->set('foo', 'true'); - $request->cookies->set('foo', $this->encodeCookie(array( + $request->cookies->set('foo', $this->encodeCookie([ $series = 'fooseries', $tokenValue = 'foovalue', - ))); + ])); $tokenProvider = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface')->getMock(); $tokenProvider ->expects($this->once()) ->method('loadTokenBySeries') - ->will($this->throwException(new TokenNotFoundException('Token not found.'))) + ->willThrowException(new TokenNotFoundException('Token not found.')) ; $service->setTokenProvider($tokenProvider); @@ -76,9 +76,9 @@ class PersistentTokenBasedRememberMeServicesTest extends TestCase public function testAutoLoginReturnsNullOnNonExistentUser() { $userProvider = $this->getProvider(); - $service = $this->getService($userProvider, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true, 'lifetime' => 3600, 'secure' => false, 'httponly' => false)); + $service = $this->getService($userProvider, ['name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true, 'lifetime' => 3600, 'secure' => false, 'httponly' => false]); $request = new Request(); - $request->cookies->set('foo', $this->encodeCookie(array('fooseries', 'foovalue'))); + $request->cookies->set('foo', $this->encodeCookie(['fooseries', 'foovalue'])); $tokenProvider = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface')->getMock(); $tokenProvider @@ -91,7 +91,7 @@ class PersistentTokenBasedRememberMeServicesTest extends TestCase $userProvider ->expects($this->once()) ->method('loadUserByUsername') - ->will($this->throwException(new UsernameNotFoundException('user not found'))) + ->willThrowException(new UsernameNotFoundException('user not found')) ; $this->assertNull($service->autoLogin($request)); @@ -101,9 +101,9 @@ class PersistentTokenBasedRememberMeServicesTest extends TestCase public function testAutoLoginThrowsExceptionOnStolenCookieAndRemovesItFromThePersistentBackend() { $userProvider = $this->getProvider(); - $service = $this->getService($userProvider, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true)); + $service = $this->getService($userProvider, ['name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true]); $request = new Request(); - $request->cookies->set('foo', $this->encodeCookie(array('fooseries', 'foovalue'))); + $request->cookies->set('foo', $this->encodeCookie(['fooseries', 'foovalue'])); $tokenProvider = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface')->getMock(); $service->setTokenProvider($tokenProvider); @@ -132,9 +132,9 @@ class PersistentTokenBasedRememberMeServicesTest extends TestCase public function testAutoLoginDoesNotAcceptAnExpiredCookie() { - $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true, 'lifetime' => 3600)); + $service = $this->getService(null, ['name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true, 'lifetime' => 3600]); $request = new Request(); - $request->cookies->set('foo', $this->encodeCookie(array('fooseries', 'foovalue'))); + $request->cookies->set('foo', $this->encodeCookie(['fooseries', 'foovalue'])); $tokenProvider = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface')->getMock(); $tokenProvider @@ -155,7 +155,7 @@ class PersistentTokenBasedRememberMeServicesTest extends TestCase $user ->expects($this->once()) ->method('getRoles') - ->will($this->returnValue(array('ROLE_FOO'))) + ->will($this->returnValue(['ROLE_FOO'])) ; $userProvider = $this->getProvider(); @@ -166,9 +166,9 @@ class PersistentTokenBasedRememberMeServicesTest extends TestCase ->will($this->returnValue($user)) ; - $service = $this->getService($userProvider, array('name' => 'foo', 'path' => null, 'domain' => null, 'secure' => false, 'httponly' => false, 'always_remember_me' => true, 'lifetime' => 3600)); + $service = $this->getService($userProvider, ['name' => 'foo', 'path' => null, 'domain' => null, 'secure' => false, 'httponly' => false, 'always_remember_me' => true, 'lifetime' => 3600]); $request = new Request(); - $request->cookies->set('foo', $this->encodeCookie(array('fooseries', 'foovalue'))); + $request->cookies->set('foo', $this->encodeCookie(['fooseries', 'foovalue'])); $tokenProvider = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface')->getMock(); $tokenProvider @@ -189,9 +189,9 @@ class PersistentTokenBasedRememberMeServicesTest extends TestCase public function testLogout() { - $service = $this->getService(null, array('name' => 'foo', 'path' => '/foo', 'domain' => 'foodomain.foo', 'secure' => true, 'httponly' => false)); + $service = $this->getService(null, ['name' => 'foo', 'path' => '/foo', 'domain' => 'foodomain.foo', 'secure' => true, 'httponly' => false]); $request = new Request(); - $request->cookies->set('foo', $this->encodeCookie(array('fooseries', 'foovalue'))); + $request->cookies->set('foo', $this->encodeCookie(['fooseries', 'foovalue'])); $response = new Response(); $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); @@ -216,7 +216,7 @@ class PersistentTokenBasedRememberMeServicesTest extends TestCase public function testLogoutSimplyIgnoresNonSetRequestCookie() { - $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null)); + $service = $this->getService(null, ['name' => 'foo', 'path' => null, 'domain' => null]); $request = new Request(); $response = new Response(); $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); @@ -238,7 +238,7 @@ class PersistentTokenBasedRememberMeServicesTest extends TestCase public function testLogoutSimplyIgnoresInvalidCookie() { - $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null)); + $service = $this->getService(null, ['name' => 'foo', 'path' => null, 'domain' => null]); $request = new Request(); $request->cookies->set('foo', 'somefoovalue'); $response = new Response(); @@ -258,7 +258,7 @@ class PersistentTokenBasedRememberMeServicesTest extends TestCase public function testLoginFail() { - $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null)); + $service = $this->getService(null, ['name' => 'foo', 'path' => null, 'domain' => null]); $request = new Request(); $this->assertFalse($request->attributes->has(RememberMeServicesInterface::COOKIE_ATTR_NAME)); @@ -268,7 +268,7 @@ class PersistentTokenBasedRememberMeServicesTest extends TestCase public function testLoginSuccessSetsCookieWhenLoggedInWithNonRememberMeTokenInterfaceImplementation() { - $service = $this->getService(null, array('name' => 'foo', 'domain' => 'myfoodomain.foo', 'path' => '/foo/path', 'secure' => true, 'httponly' => true, 'lifetime' => 3600, 'always_remember_me' => true)); + $service = $this->getService(null, ['name' => 'foo', 'domain' => 'myfoodomain.foo', 'path' => '/foo/path', 'secure' => true, 'httponly' => true, 'lifetime' => 3600, 'always_remember_me' => true]); $request = new Request(); $response = new Response(); @@ -316,13 +316,13 @@ class PersistentTokenBasedRememberMeServicesTest extends TestCase return $r->invoke($service, $parts); } - protected function getService($userProvider = null, $options = array(), $logger = null) + protected function getService($userProvider = null, $options = [], $logger = null) { if (null === $userProvider) { $userProvider = $this->getProvider(); } - return new PersistentTokenBasedRememberMeServices(array($userProvider), 'foosecret', 'fookey', $options, $logger); + return new PersistentTokenBasedRememberMeServices([$userProvider], 'foosecret', 'fookey', $options, $logger); } protected function getProvider() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/ResponseListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/ResponseListenerTest.php index ba590683..501d3850 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/ResponseListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/ResponseListenerTest.php @@ -26,9 +26,9 @@ class ResponseListenerTest extends TestCase { $cookie = new Cookie('rememberme'); - $request = $this->getRequest(array( + $request = $this->getRequest([ RememberMeServicesInterface::COOKIE_ATTR_NAME => $cookie, - )); + ]); $response = $this->getResponse(); $response->headers->expects($this->once())->method('setCookie')->with($cookie); @@ -41,9 +41,9 @@ class ResponseListenerTest extends TestCase { $cookie = new Cookie('rememberme'); - $request = $this->getRequest(array( + $request = $this->getRequest([ RememberMeServicesInterface::COOKIE_ATTR_NAME => $cookie, - )); + ]); $response = $this->getResponse(); $response->headers->expects($this->never())->method('setCookie'); @@ -67,10 +67,10 @@ class ResponseListenerTest extends TestCase { $listener = new ResponseListener(); - $this->assertSame(array(KernelEvents::RESPONSE => 'onKernelResponse'), ResponseListener::getSubscribedEvents()); + $this->assertSame([KernelEvents::RESPONSE => 'onKernelResponse'], ResponseListener::getSubscribedEvents()); } - private function getRequest(array $attributes = array()) + private function getRequest(array $attributes = []) { $request = new Request(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php index e30d68ba..f0d938de 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php @@ -23,14 +23,14 @@ class TokenBasedRememberMeServicesTest extends TestCase { public function testAutoLoginReturnsNullWhenNoCookie() { - $service = $this->getService(null, array('name' => 'foo')); + $service = $this->getService(null, ['name' => 'foo']); $this->assertNull($service->autoLogin(new Request())); } public function testAutoLoginThrowsExceptionOnInvalidCookie() { - $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => false, 'remember_me_parameter' => 'foo')); + $service = $this->getService(null, ['name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => false, 'remember_me_parameter' => 'foo']); $request = new Request(); $request->request->set('foo', 'true'); $request->cookies->set('foo', 'foo'); @@ -42,14 +42,14 @@ class TokenBasedRememberMeServicesTest extends TestCase public function testAutoLoginThrowsExceptionOnNonExistentUser() { $userProvider = $this->getProvider(); - $service = $this->getService($userProvider, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true, 'lifetime' => 3600)); + $service = $this->getService($userProvider, ['name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true, 'lifetime' => 3600]); $request = new Request(); $request->cookies->set('foo', $this->getCookie('fooclass', 'foouser', time() + 3600, 'foopass')); $userProvider ->expects($this->once()) ->method('loadUserByUsername') - ->will($this->throwException(new UsernameNotFoundException('user not found'))) + ->willThrowException(new UsernameNotFoundException('user not found')) ; $this->assertNull($service->autoLogin($request)); @@ -59,7 +59,7 @@ class TokenBasedRememberMeServicesTest extends TestCase public function testAutoLoginDoesNotAcceptCookieWithInvalidHash() { $userProvider = $this->getProvider(); - $service = $this->getService($userProvider, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true, 'lifetime' => 3600)); + $service = $this->getService($userProvider, ['name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true, 'lifetime' => 3600]); $request = new Request(); $request->cookies->set('foo', base64_encode('class:'.base64_encode('foouser').':123456789:fooHash')); @@ -84,7 +84,7 @@ class TokenBasedRememberMeServicesTest extends TestCase public function testAutoLoginDoesNotAcceptAnExpiredCookie() { $userProvider = $this->getProvider(); - $service = $this->getService($userProvider, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true, 'lifetime' => 3600)); + $service = $this->getService($userProvider, ['name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true, 'lifetime' => 3600]); $request = new Request(); $request->cookies->set('foo', $this->getCookie('fooclass', 'foouser', time() - 1, 'foopass')); @@ -117,7 +117,7 @@ class TokenBasedRememberMeServicesTest extends TestCase $user ->expects($this->once()) ->method('getRoles') - ->will($this->returnValue(array('ROLE_FOO'))) + ->will($this->returnValue(['ROLE_FOO'])) ; $user ->expects($this->once()) @@ -133,7 +133,7 @@ class TokenBasedRememberMeServicesTest extends TestCase ->will($this->returnValue($user)) ; - $service = $this->getService($userProvider, array('name' => 'foo', 'always_remember_me' => true, 'lifetime' => 3600)); + $service = $this->getService($userProvider, ['name' => 'foo', 'always_remember_me' => true, 'lifetime' => 3600]); $request = new Request(); $request->cookies->set('foo', $this->getCookie('fooclass', $username, time() + 3600, 'foopass')); @@ -146,15 +146,15 @@ class TokenBasedRememberMeServicesTest extends TestCase public function provideUsernamesForAutoLogin() { - return array( - array('foouser', 'Simple username'), - array('foo'.TokenBasedRememberMeServices::COOKIE_DELIMITER.'user', 'Username might contain the delimiter'), - ); + return [ + ['foouser', 'Simple username'], + ['foo'.TokenBasedRememberMeServices::COOKIE_DELIMITER.'user', 'Username might contain the delimiter'], + ]; } public function testLogout() { - $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null, 'secure' => true, 'httponly' => false)); + $service = $this->getService(null, ['name' => 'foo', 'path' => null, 'domain' => null, 'secure' => true, 'httponly' => false]); $request = new Request(); $response = new Response(); $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); @@ -171,7 +171,7 @@ class TokenBasedRememberMeServicesTest extends TestCase public function testLoginFail() { - $service = $this->getService(null, array('name' => 'foo', 'path' => '/foo', 'domain' => 'foodomain.foo')); + $service = $this->getService(null, ['name' => 'foo', 'path' => '/foo', 'domain' => 'foodomain.foo']); $request = new Request(); $service->loginFail($request); @@ -184,7 +184,7 @@ class TokenBasedRememberMeServicesTest extends TestCase public function testLoginSuccessIgnoresTokensWhichDoNotContainAnUserInterfaceImplementation() { - $service = $this->getService(null, array('name' => 'foo', 'always_remember_me' => true, 'path' => null, 'domain' => null)); + $service = $this->getService(null, ['name' => 'foo', 'always_remember_me' => true, 'path' => null, 'domain' => null]); $request = new Request(); $response = new Response(); $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); @@ -205,7 +205,7 @@ class TokenBasedRememberMeServicesTest extends TestCase public function testLoginSuccess() { - $service = $this->getService(null, array('name' => 'foo', 'domain' => 'myfoodomain.foo', 'path' => '/foo/path', 'secure' => true, 'httponly' => true, 'lifetime' => 3600, 'always_remember_me' => true)); + $service = $this->getService(null, ['name' => 'foo', 'domain' => 'myfoodomain.foo', 'path' => '/foo/path', 'secure' => true, 'httponly' => true, 'lifetime' => 3600, 'always_remember_me' => true]); $request = new Request(); $response = new Response(); @@ -260,13 +260,13 @@ class TokenBasedRememberMeServicesTest extends TestCase return $r->invoke($service, $parts); } - protected function getService($userProvider = null, $options = array(), $logger = null) + protected function getService($userProvider = null, $options = [], $logger = null) { if (null === $userProvider) { $userProvider = $this->getProvider(); } - $service = new TokenBasedRememberMeServices(array($userProvider), 'foosecret', 'fookey', $options, $logger); + $service = new TokenBasedRememberMeServices([$userProvider], 'foosecret', 'fookey', $options, $logger); return $service; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Util/TargetPathTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Util/TargetPathTrait.php index 986adb0c..87ff333e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Util/TargetPathTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Util/TargetPathTrait.php @@ -38,7 +38,7 @@ trait TargetPathTrait * @param SessionInterface $session * @param string $providerKey The name of your firewall * - * @return string + * @return string|null */ private function getTargetPath(SessionInterface $session, $providerKey) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Security/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php index 71af8ead..1c76fe4b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php @@ -24,10 +24,10 @@ use Symfony\Component\Serializer\Exception\RuntimeException; */ class ChainDecoder implements DecoderInterface /*, ContextAwareDecoderInterface*/ { - protected $decoders = array(); - protected $decoderByFormat = array(); + protected $decoders = []; + protected $decoderByFormat = []; - public function __construct(array $decoders = array()) + public function __construct(array $decoders = []) { $this->decoders = $decoders; } @@ -35,7 +35,7 @@ class ChainDecoder implements DecoderInterface /*, ContextAwareDecoderInterface* /** * {@inheritdoc} */ - final public function decode($data, $format, array $context = array()) + final public function decode($data, $format, array $context = []) { return $this->getDecoder($format, $context)->decode($data, $format, $context); } @@ -43,9 +43,9 @@ class ChainDecoder implements DecoderInterface /*, ContextAwareDecoderInterface* /** * {@inheritdoc} */ - public function supportsDecoding($format/*, array $context = array()*/) + public function supportsDecoding($format/*, array $context = []*/) { - $context = \func_num_args() > 1 ? func_get_arg(1) : array(); + $context = \func_num_args() > 1 ? func_get_arg(1) : []; try { $this->getDecoder($format, $context); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php index 6e2b85bf..a0a71835 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php @@ -24,10 +24,10 @@ use Symfony\Component\Serializer\Exception\RuntimeException; */ class ChainEncoder implements EncoderInterface /*, ContextAwareEncoderInterface*/ { - protected $encoders = array(); - protected $encoderByFormat = array(); + protected $encoders = []; + protected $encoderByFormat = []; - public function __construct(array $encoders = array()) + public function __construct(array $encoders = []) { $this->encoders = $encoders; } @@ -35,7 +35,7 @@ class ChainEncoder implements EncoderInterface /*, ContextAwareEncoderInterface* /** * {@inheritdoc} */ - final public function encode($data, $format, array $context = array()) + final public function encode($data, $format, array $context = []) { return $this->getEncoder($format, $context)->encode($data, $format, $context); } @@ -43,9 +43,9 @@ class ChainEncoder implements EncoderInterface /*, ContextAwareEncoderInterface* /** * {@inheritdoc} */ - public function supportsEncoding($format/*, array $context = array()*/) + public function supportsEncoding($format/*, array $context = []*/) { - $context = \func_num_args() > 1 ? func_get_arg(1) : array(); + $context = \func_num_args() > 1 ? func_get_arg(1) : []; try { $this->getEncoder($format, $context); @@ -64,9 +64,9 @@ class ChainEncoder implements EncoderInterface /*, ContextAwareEncoderInterface* * * @return bool */ - public function needsNormalization($format/*, array $context = array()*/) + public function needsNormalization($format/*, array $context = []*/) { - $context = \func_num_args() > 1 ? func_get_arg(1) : array(); + $context = \func_num_args() > 1 ? func_get_arg(1) : []; $encoder = $this->getEncoder($format, $context); if (!$encoder instanceof NormalizationAwareInterface) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ContextAwareDecoderInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ContextAwareDecoderInterface.php index eefea0ec..5ef89d55 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ContextAwareDecoderInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ContextAwareDecoderInterface.php @@ -23,5 +23,5 @@ interface ContextAwareDecoderInterface extends DecoderInterface * * @param array $context options that decoders have access to */ - public function supportsDecoding($format, array $context = array()); + public function supportsDecoding($format, array $context = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ContextAwareEncoderInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ContextAwareEncoderInterface.php index 0268df3d..a8893a80 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ContextAwareEncoderInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ContextAwareEncoderInterface.php @@ -23,5 +23,5 @@ interface ContextAwareEncoderInterface extends EncoderInterface * * @param array $context options that encoders have access to */ - public function supportsEncoding($format, array $context = array()); + public function supportsEncoding($format, array $context = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php index c2a70eed..1e47d35f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php @@ -50,20 +50,20 @@ class CsvEncoder implements EncoderInterface, DecoderInterface /** * {@inheritdoc} */ - public function encode($data, $format, array $context = array()) + public function encode($data, $format, array $context = []) { $handle = fopen('php://temp,', 'w+'); if (!\is_array($data)) { - $data = array(array($data)); + $data = [[$data]]; } elseif (empty($data)) { - $data = array(array()); + $data = [[]]; } else { // Sequential arrays of arrays are considered as collections $i = 0; foreach ($data as $key => $value) { if ($i !== $key || !\is_array($value)) { - $data = array($data); + $data = [$data]; break; } @@ -74,7 +74,7 @@ class CsvEncoder implements EncoderInterface, DecoderInterface list($delimiter, $enclosure, $escapeChar, $keySeparator, $headers) = $this->getCsvOptions($context); foreach ($data as &$value) { - $flattened = array(); + $flattened = []; $this->flatten($value, $flattened, $keySeparator); $value = $flattened; } @@ -107,7 +107,7 @@ class CsvEncoder implements EncoderInterface, DecoderInterface /** * {@inheritdoc} */ - public function decode($data, $format, array $context = array()) + public function decode($data, $format, array $context = []) { $handle = fopen('php://temp', 'r+'); fwrite($handle, $data); @@ -115,8 +115,8 @@ class CsvEncoder implements EncoderInterface, DecoderInterface $headers = null; $nbHeaders = 0; - $headerCount = array(); - $result = array(); + $headerCount = []; + $result = []; list($delimiter, $enclosure, $escapeChar, $keySeparator) = $this->getCsvOptions($context); @@ -135,7 +135,7 @@ class CsvEncoder implements EncoderInterface, DecoderInterface continue; } - $item = array(); + $item = []; for ($i = 0; ($i < $nbCols) && ($i < $nbHeaders); ++$i) { $depth = $headerCount[$i]; $arr = &$item; @@ -148,7 +148,7 @@ class CsvEncoder implements EncoderInterface, DecoderInterface } if (!isset($arr[$headers[$i][$j]])) { - $arr[$headers[$i][$j]] = array(); + $arr[$headers[$i][$j]] = []; } $arr = &$arr[$headers[$i][$j]]; @@ -200,13 +200,13 @@ class CsvEncoder implements EncoderInterface, DecoderInterface $enclosure = isset($context[self::ENCLOSURE_KEY]) ? $context[self::ENCLOSURE_KEY] : $this->enclosure; $escapeChar = isset($context[self::ESCAPE_CHAR_KEY]) ? $context[self::ESCAPE_CHAR_KEY] : $this->escapeChar; $keySeparator = isset($context[self::KEY_SEPARATOR_KEY]) ? $context[self::KEY_SEPARATOR_KEY] : $this->keySeparator; - $headers = isset($context[self::HEADERS_KEY]) ? $context[self::HEADERS_KEY] : array(); + $headers = isset($context[self::HEADERS_KEY]) ? $context[self::HEADERS_KEY] : []; if (!\is_array($headers)) { throw new InvalidArgumentException(sprintf('The "%s" context variable must be an array or null, given "%s".', self::HEADERS_KEY, \gettype($headers))); } - return array($delimiter, $enclosure, $escapeChar, $keySeparator, $headers); + return [$delimiter, $enclosure, $escapeChar, $keySeparator, $headers]; } /** @@ -214,8 +214,8 @@ class CsvEncoder implements EncoderInterface, DecoderInterface */ private function extractHeaders(array $data) { - $headers = array(); - $flippedHeaders = array(); + $headers = []; + $flippedHeaders = []; foreach ($data as $row) { $previousHeader = null; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php index 0fa57809..cfc591e7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php @@ -36,7 +36,7 @@ interface DecoderInterface * * @throws UnexpectedValueException */ - public function decode($data, $format, array $context = array()); + public function decode($data, $format, array $context = []); /** * Checks whether the deserializer can decode from given format. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php index 077e4422..9b9862e2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php @@ -31,7 +31,7 @@ interface EncoderInterface * * @throws UnexpectedValueException */ - public function encode($data, $format, array $context = array()); + public function encode($data, $format, array $context = []); /** * Checks whether the serializer can encode to given format. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonDecode.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonDecode.php index bee1f7d4..1d0b86af 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonDecode.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonDecode.php @@ -64,7 +64,7 @@ class JsonDecode implements DecoderInterface * * @see http://php.net/json_decode json_decode */ - public function decode($data, $format, array $context = array()) + public function decode($data, $format, array $context = []) { $context = $this->resolveContext($context); @@ -96,11 +96,11 @@ class JsonDecode implements DecoderInterface */ private function resolveContext(array $context) { - $defaultOptions = array( + $defaultOptions = [ 'json_decode_associative' => $this->associative, 'json_decode_recursion_depth' => $this->recursionDepth, 'json_decode_options' => 0, - ); + ]; return array_merge($defaultOptions, $context); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonEncode.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonEncode.php index ef084eea..9b07d709 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonEncode.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonEncode.php @@ -32,7 +32,7 @@ class JsonEncode implements EncoderInterface * * {@inheritdoc} */ - public function encode($data, $format, array $context = array()) + public function encode($data, $format, array $context = []) { $context = $this->resolveContext($context); @@ -58,8 +58,8 @@ class JsonEncode implements EncoderInterface * * @return array */ - private function resolveContext(array $context = array()) + private function resolveContext(array $context = []) { - return array_merge(array('json_encode_options' => $this->options), $context); + return array_merge(['json_encode_options' => $this->options], $context); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php index f4950cb3..87f6be0b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php @@ -32,7 +32,7 @@ class JsonEncoder implements EncoderInterface, DecoderInterface /** * {@inheritdoc} */ - public function encode($data, $format, array $context = array()) + public function encode($data, $format, array $context = []) { return $this->encodingImpl->encode($data, self::FORMAT, $context); } @@ -40,7 +40,7 @@ class JsonEncoder implements EncoderInterface, DecoderInterface /** * {@inheritdoc} */ - public function decode($data, $format, array $context = array()) + public function decode($data, $format, array $context = []) { return $this->decodingImpl->decode($data, self::FORMAT, $context); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php index 96578c6b..f0a4afb1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php @@ -49,7 +49,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec /** * {@inheritdoc} */ - public function encode($data, $format, array $context = array()) + public function encode($data, $format, array $context = []) { if ($data instanceof \DOMDocument) { return $data->saveXML(); @@ -75,7 +75,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec /** * {@inheritdoc} */ - public function decode($data, $format, array $context = array()) + public function decode($data, $format, array $context = []) { if ('' === trim($data)) { throw new NotEncodableValueException('Invalid XML data, it can not be empty.'); @@ -111,7 +111,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec if ($rootNode->hasChildNodes()) { $xpath = new \DOMXPath($dom); - $data = array(); + $data = []; foreach ($xpath->query('namespace::*', $dom->documentElement) as $nsNode) { $data['@'.$nsNode->nodeName] = $nsNode->nodeValue; } @@ -129,7 +129,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec return $rootNode->nodeValue; } - $data = array(); + $data = []; foreach ($rootNode->attributes as $attrKey => $attr) { $data['@'.$attrKey] = $attr->nodeValue; @@ -259,7 +259,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec * * @return array|string */ - private function parseXml(\DOMNode $node, array $context = array()) + private function parseXml(\DOMNode $node, array $context = []) { $data = $this->parseXmlAttributes($node, $context); @@ -293,13 +293,13 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec * * @return array */ - private function parseXmlAttributes(\DOMNode $node, array $context = array()) + private function parseXmlAttributes(\DOMNode $node, array $context = []) { if (!$node->hasAttributes()) { - return array(); + return []; } - $data = array(); + $data = []; $typeCastAttributes = $this->resolveXmlTypeCastAttributes($context); foreach ($node->attributes as $attr) { @@ -326,17 +326,17 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec * * @return array|string */ - private function parseXmlValue(\DOMNode $node, array $context = array()) + private function parseXmlValue(\DOMNode $node, array $context = []) { if (!$node->hasChildNodes()) { return $node->nodeValue; } - if (1 === $node->childNodes->length && \in_array($node->firstChild->nodeType, array(XML_TEXT_NODE, XML_CDATA_SECTION_NODE))) { + if (1 === $node->childNodes->length && \in_array($node->firstChild->nodeType, [XML_TEXT_NODE, XML_CDATA_SECTION_NODE])) { return $node->firstChild->nodeValue; } - $value = array(); + $value = []; foreach ($node->childNodes as $subnode) { if (XML_PI_NODE === $subnode->nodeType) { @@ -396,7 +396,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec /* * Create nodes to append to $parentNode based on the $key of this array * Produces 01 - * From array("item" => array(0,1));. + * From ["item" => [0,1]];. */ foreach ($data as $subData) { $append = $this->appendNode($parentNode, $subData, $key); @@ -513,7 +513,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec * * @return string */ - private function resolveXmlRootName(array $context = array()) + private function resolveXmlRootName(array $context = []) { return isset($context['xml_root_node_name']) ? $context['xml_root_node_name'] @@ -527,7 +527,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec * * @return bool */ - private function resolveXmlTypeCastAttributes(array $context = array()) + private function resolveXmlTypeCastAttributes(array $context = []) { return isset($context['xml_type_cast_attributes']) ? (bool) $context['xml_type_cast_attributes'] @@ -546,7 +546,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec $document = new \DOMDocument(); // Set an attribute on the DOM document specifying, as part of the XML declaration, - $xmlOptions = array( + $xmlOptions = [ // nicely formats output with indentation and extra space 'xml_format_output' => 'formatOutput', // the version number of the document @@ -555,7 +555,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec 'xml_encoding' => 'encoding', // whether the document is standalone 'xml_standalone' => 'xmlStandalone', - ); + ]; foreach ($xmlOptions as $xmlOption => $documentProperty) { if (isset($context[$xmlOption])) { $document->$documentProperty = $context[$xmlOption]; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php index 3ac1af67..62e52120 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php @@ -26,9 +26,9 @@ class YamlEncoder implements EncoderInterface, DecoderInterface private $dumper; private $parser; - private $defaultContext = array('yaml_inline' => 0, 'yaml_indent' => 0, 'yaml_flags' => 0); + private $defaultContext = ['yaml_inline' => 0, 'yaml_indent' => 0, 'yaml_flags' => 0]; - public function __construct(Dumper $dumper = null, Parser $parser = null, array $defaultContext = array()) + public function __construct(Dumper $dumper = null, Parser $parser = null, array $defaultContext = []) { if (!class_exists(Dumper::class)) { throw new RuntimeException('The YamlEncoder class requires the "Yaml" component. Install "symfony/yaml" to use it.'); @@ -42,7 +42,7 @@ class YamlEncoder implements EncoderInterface, DecoderInterface /** * {@inheritdoc} */ - public function encode($data, $format, array $context = array()) + public function encode($data, $format, array $context = []) { $context = array_merge($this->defaultContext, $context); @@ -60,7 +60,7 @@ class YamlEncoder implements EncoderInterface, DecoderInterface /** * {@inheritdoc} */ - public function decode($data, $format, array $context = array()) + public function decode($data, $format, array $context = []) { $context = array_merge($this->defaultContext, $context); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php index 9ad6e308..d82369f0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php @@ -30,7 +30,7 @@ class AttributeMetadata implements AttributeMetadataInterface * class' serialized representation. Do not access it. Use * {@link getGroups()} instead. */ - public $groups = array(); + public $groups = []; /** * @var int|null @@ -115,6 +115,6 @@ class AttributeMetadata implements AttributeMetadataInterface */ public function __sleep() { - return array('name', 'groups', 'maxDepth'); + return ['name', 'groups', 'maxDepth']; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/AttributeMetadataInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/AttributeMetadataInterface.php index 944a7b31..d9a15d5a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/AttributeMetadataInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/AttributeMetadataInterface.php @@ -60,5 +60,5 @@ interface AttributeMetadataInterface /** * Merges an {@see AttributeMetadataInterface} with in the current one. */ - public function merge(AttributeMetadataInterface $attributeMetadata); + public function merge(self $attributeMetadata); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/ClassMetadata.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/ClassMetadata.php index 7858f74d..20607762 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/ClassMetadata.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/ClassMetadata.php @@ -32,7 +32,7 @@ class ClassMetadata implements ClassMetadataInterface * class' serialized representation. Do not access it. Use * {@link getAttributesMetadata()} instead. */ - public $attributesMetadata = array(); + public $attributesMetadata = []; /** * @var \ReflectionClass @@ -106,9 +106,9 @@ class ClassMetadata implements ClassMetadataInterface */ public function __sleep() { - return array( + return [ 'name', 'attributesMetadata', - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/XmlFileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/XmlFileLoader.php index 76d06432..2013e589 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/XmlFileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/XmlFileLoader.php @@ -110,7 +110,7 @@ class XmlFileLoader extends FileLoader private function getClassesFromXml() { $xml = $this->parseFile($this->file); - $classes = array(); + $classes = []; foreach ($xml->class as $class) { $classes[(string) $class['name']] = $class; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php index 886da0d1..91091910 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php @@ -116,7 +116,7 @@ class YamlFileLoader extends FileLoader $classes = $this->yamlParser->parseFile($this->file); if (empty($classes)) { - return array(); + return []; } if (!\is_array($classes)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php index 2bdf120a..3f181e4e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php @@ -58,17 +58,17 @@ abstract class AbstractNormalizer extends SerializerAwareNormalizer implements N /** * @var array */ - protected $callbacks = array(); + protected $callbacks = []; /** * @var array */ - protected $ignoredAttributes = array(); + protected $ignoredAttributes = []; /** * @var array */ - protected $camelizedAttributes = array(); + protected $camelizedAttributes = []; /** * Sets the {@link ClassMetadataFactoryInterface} to use. @@ -218,7 +218,7 @@ abstract class AbstractNormalizer extends SerializerAwareNormalizer implements N return false; } - $allowedAttributes = array(); + $allowedAttributes = []; foreach ($this->classMetadataFactory->getMetadataFor($classOrObject)->getAttributesMetadata() as $attributeMetadata) { $name = $attributeMetadata->getName(); @@ -243,7 +243,7 @@ abstract class AbstractNormalizer extends SerializerAwareNormalizer implements N * * @return bool */ - protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = array()) + protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = []) { if (\in_array($attribute, $this->ignoredAttributes)) { return false; @@ -335,7 +335,7 @@ abstract class AbstractNormalizer extends SerializerAwareNormalizer implements N if ($constructor) { $constructorParameters = $constructor->getParameters(); - $params = array(); + $params = []; foreach ($constructorParameters as $constructorParameter) { $paramName = $constructorParameter->name; $key = $this->nameConverter ? $this->nameConverter->normalize($paramName) : $paramName; @@ -343,14 +343,14 @@ abstract class AbstractNormalizer extends SerializerAwareNormalizer implements N $allowed = false === $allowedAttributes || \in_array($paramName, $allowedAttributes); $ignored = !$this->isAllowedAttribute($class, $paramName, $format, $context); if (method_exists($constructorParameter, 'isVariadic') && $constructorParameter->isVariadic()) { - if ($allowed && !$ignored && (isset($data[$key]) || array_key_exists($key, $data))) { + if ($allowed && !$ignored && (isset($data[$key]) || \array_key_exists($key, $data))) { if (!\is_array($data[$paramName])) { throw new RuntimeException(sprintf('Cannot create an instance of %s from serialized data because the variadic parameter %s can only accept an array.', $class, $constructorParameter->name)); } $params = array_merge($params, $data[$paramName]); } - } elseif ($allowed && !$ignored && (isset($data[$key]) || array_key_exists($key, $data))) { + } elseif ($allowed && !$ignored && (isset($data[$key]) || \array_key_exists($key, $data))) { $parameterData = $data[$key]; if (null === $parameterData && $constructorParameter->allowsNull()) { $params[] = null; @@ -358,20 +358,9 @@ abstract class AbstractNormalizer extends SerializerAwareNormalizer implements N unset($data[$key]); continue; } - try { - if (null !== $constructorParameter->getClass()) { - if (!$this->serializer instanceof DenormalizerInterface) { - throw new LogicException(sprintf('Cannot create an instance of %s from serialized data because the serializer inject in "%s" is not a denormalizer', $constructorParameter->getClass(), static::class)); - } - $parameterClass = $constructorParameter->getClass()->getName(); - $parameterData = $this->serializer->denormalize($parameterData, $parameterClass, $format, $this->createChildContext($context, $paramName)); - } - } catch (\ReflectionException $e) { - throw new RuntimeException(sprintf('Could not determine the class of the parameter "%s".', $key), 0, $e); - } // Don't run set for a parameter passed to the constructor - $params[] = $parameterData; + $params[] = $this->denormalizeParameter($reflectionClass, $constructorParameter, $paramName, $parameterData, $context, $format); unset($data[$key]); } elseif ($constructorParameter->isDefaultValueAvailable()) { $params[] = $constructorParameter->getDefaultValue(); @@ -390,6 +379,27 @@ abstract class AbstractNormalizer extends SerializerAwareNormalizer implements N return new $class(); } + /** + * @internal + */ + protected function denormalizeParameter(\ReflectionClass $class, \ReflectionParameter $parameter, $parameterName, $parameterData, array $context, $format = null) + { + try { + if (null !== $parameter->getClass()) { + if (!$this->serializer instanceof DenormalizerInterface) { + throw new LogicException(sprintf('Cannot create an instance of %s from serialized data because the serializer inject in "%s" is not a denormalizer', $parameter->getClass(), static::class)); + } + $parameterClass = $parameter->getClass()->getName(); + + return $this->serializer->denormalize($parameterData, $parameterClass, $format, $this->createChildContext($context, $parameterName)); + } + + return $parameterData; + } catch (\ReflectionException $e) { + throw new RuntimeException(sprintf('Could not determine the class of the parameter "%s".', $parameterName), 0, $e); + } + } + /** * @param array $parentContext * @param string $attribute diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php index aff70ee4..17c31b13 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php @@ -34,8 +34,8 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer const DISABLE_TYPE_ENFORCEMENT = 'disable_type_enforcement'; private $propertyTypeExtractor; - private $attributesCache = array(); - private $cache = array(); + private $attributesCache = []; + private $cache = []; public function __construct(ClassMetadataFactoryInterface $classMetadataFactory = null, NameConverterInterface $nameConverter = null, PropertyTypeExtractorInterface $propertyTypeExtractor = null) { @@ -55,7 +55,7 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = array()) + public function normalize($object, $format = null, array $context = []) { if (!isset($context['cache_key'])) { $context['cache_key'] = $this->getCacheKey($format, $context); @@ -65,8 +65,8 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer return $this->handleCircularReference($object); } - $data = array(); - $stack = array(); + $data = []; + $stack = []; $attributes = $this->getAttributes($object, $format, $context); $class = \get_class($object); $attributesMetadata = $this->classMetadataFactory ? $this->classMetadataFactory->getMetadataFor($class)->getAttributesMetadata() : null; @@ -148,7 +148,7 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer * * @return string[] */ - abstract protected function extractAttributes($object, $format = null, array $context = array()); + abstract protected function extractAttributes($object, $format = null, array $context = []); /** * Gets the attribute value. @@ -160,7 +160,7 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer * * @return mixed */ - abstract protected function getAttributeValue($object, $attribute, $format = null, array $context = array()); + abstract protected function getAttributeValue($object, $attribute, $format = null, array $context = []); /** * {@inheritdoc} @@ -173,7 +173,7 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer /** * {@inheritdoc} */ - public function denormalize($data, $class, $format = null, array $context = array()) + public function denormalize($data, $class, $format = null, array $context = []) { if (!isset($context['cache_key'])) { $context['cache_key'] = $this->getCacheKey($format, $context); @@ -181,7 +181,7 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer $allowedAttributes = $this->getAllowedAttributes($class, $context, true); $normalizedData = $this->prepareForDenormalization($data); - $extraAttributes = array(); + $extraAttributes = []; $reflectionClass = new \ReflectionClass($class); $object = $this->instantiateObject($normalizedData, $class, $context, $reflectionClass, $allowedAttributes, $format); @@ -223,7 +223,7 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer * @param string|null $format * @param array $context */ - abstract protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = array()); + abstract protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = []); /** * Validates the submitted data and denormalizes it. @@ -245,7 +245,7 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer return $data; } - $expectedTypes = array(); + $expectedTypes = []; foreach ($types as $type) { if (null === $data && $type->isNullable()) { return; @@ -258,7 +258,7 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer // Fix a collection that contains the only one element // This is special to xml format only if ('xml' === $format && !\is_int(key($data))) { - $data = array($data); + $data = [$data]; } if (null !== $collectionKeyType = $type->getCollectionKeyType()) { @@ -304,6 +304,18 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer throw new NotNormalizableValueException(sprintf('The type of the "%s" attribute for class "%s" must be one of "%s" ("%s" given).', $attribute, $currentClass, implode('", "', array_keys($expectedTypes)), \gettype($data))); } + /** + * @internal + */ + protected function denormalizeParameter(\ReflectionClass $class, \ReflectionParameter $parameter, $parameterName, $parameterData, array $context, $format = null) + { + if (null === $this->propertyTypeExtractor || null === $types = $this->propertyTypeExtractor->getTypes($class->getName(), $parameterName)) { + return parent::denormalizeParameter($class, $parameter, $parameterName, $parameterData, $context, $format); + } + + return $this->validateAndDenormalize($class->getName(), $parameterName, $parameterData, $format, $context); + } + /** * Sets an attribute and apply the name converter if necessary. * diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php index 23b3a0e9..af80d00b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php @@ -36,7 +36,7 @@ class ArrayDenormalizer implements DenormalizerInterface, SerializerAwareInterfa * * @throws NotNormalizableValueException */ - public function denormalize($data, $class, $format = null, array $context = array()) + public function denormalize($data, $class, $format = null, array $context = []) { if (null === $this->serializer) { throw new BadMethodCallException('Please set a serializer before calling denormalize()!'); @@ -66,9 +66,9 @@ class ArrayDenormalizer implements DenormalizerInterface, SerializerAwareInterfa /** * {@inheritdoc} */ - public function supportsDenormalization($data, $type, $format = null/*, array $context = array()*/) + public function supportsDenormalization($data, $type, $format = null/*, array $context = []*/) { - $context = \func_num_args() > 3 ? func_get_arg(3) : array(); + $context = \func_num_args() > 3 ? func_get_arg(3) : []; return '[]' === substr($type, -2) && $this->serializer->supportsDenormalization($data, substr($type, 0, -2), $format, $context); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ContextAwareDenormalizerInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ContextAwareDenormalizerInterface.php index f0bb48c5..4e68dae1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ContextAwareDenormalizerInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ContextAwareDenormalizerInterface.php @@ -23,5 +23,5 @@ interface ContextAwareDenormalizerInterface extends DenormalizerInterface * * @param array $context options that denormalizers have access to */ - public function supportsDenormalization($data, $type, $format = null, array $context = array()); + public function supportsDenormalization($data, $type, $format = null, array $context = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ContextAwareNormalizerInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ContextAwareNormalizerInterface.php index b6ab05b7..c278b7de 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ContextAwareNormalizerInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ContextAwareNormalizerInterface.php @@ -23,5 +23,5 @@ interface ContextAwareNormalizerInterface extends NormalizerInterface * * @param array $context options that normalizers have access to */ - public function supportsNormalization($data, $format = null, array $context = array()); + public function supportsNormalization($data, $format = null, array $context = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php index 6a15d8da..969dcf5f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php @@ -22,12 +22,12 @@ class CustomNormalizer implements NormalizerInterface, DenormalizerInterface, Se use ObjectToPopulateTrait; use SerializerAwareTrait; - private $cache = array(); + private $cache = []; /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = array()) + public function normalize($object, $format = null, array $context = []) { return $object->normalize($this->serializer, $format, $context); } @@ -35,7 +35,7 @@ class CustomNormalizer implements NormalizerInterface, DenormalizerInterface, Se /** * {@inheritdoc} */ - public function denormalize($data, $class, $format = null, array $context = array()) + public function denormalize($data, $class, $format = null, array $context = []) { $object = $this->extractObjectToPopulate($class, $context) ?: new $class(); $object->denormalize($this->serializer, $data, $format, $context); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php index 995bdf14..0284ca6e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php @@ -25,11 +25,11 @@ use Symfony\Component\Serializer\Exception\NotNormalizableValueException; */ class DataUriNormalizer implements NormalizerInterface, DenormalizerInterface { - private static $supportedTypes = array( + private static $supportedTypes = [ \SplFileInfo::class => true, \SplFileObject::class => true, File::class => true, - ); + ]; /** * @var MimeTypeGuesserInterface @@ -48,7 +48,7 @@ class DataUriNormalizer implements NormalizerInterface, DenormalizerInterface /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = array()) + public function normalize($object, $format = null, array $context = []) { if (!$object instanceof \SplFileInfo) { throw new InvalidArgumentException('The object must be an instance of "\SplFileInfo".'); @@ -89,7 +89,7 @@ class DataUriNormalizer implements NormalizerInterface, DenormalizerInterface * @throws InvalidArgumentException * @throws NotNormalizableValueException */ - public function denormalize($data, $class, $format = null, array $context = array()) + public function denormalize($data, $class, $format = null, array $context = []) { if (!preg_match('/^data:([a-z0-9][a-z0-9\!\#\$\&\-\^\_\+\.]{0,126}\/[a-z0-9][a-z0-9\!\#\$\&\-\^\_\+\.]{0,126}(;[a-z0-9\-]+\=[a-z0-9\-]+)?)?(;base64)?,[a-z0-9\!\$\&\\\'\,\(\)\*\+\,\;\=\-\.\_\~\:\@\/\?\%\s]*\s*$/i', $data)) { throw new NotNormalizableValueException('The provided "data:" URI is not valid.'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DateIntervalNormalizer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DateIntervalNormalizer.php index 7f23aec3..56527a8e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DateIntervalNormalizer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DateIntervalNormalizer.php @@ -39,7 +39,7 @@ class DateIntervalNormalizer implements NormalizerInterface, DenormalizerInterfa * * @throws InvalidArgumentException */ - public function normalize($object, $format = null, array $context = array()) + public function normalize($object, $format = null, array $context = []) { if (!$object instanceof \DateInterval) { throw new InvalidArgumentException('The object must be an instance of "\DateInterval".'); @@ -64,7 +64,7 @@ class DateIntervalNormalizer implements NormalizerInterface, DenormalizerInterfa * @throws InvalidArgumentException * @throws UnexpectedValueException */ - public function denormalize($data, $class, $format = null, array $context = array()) + public function denormalize($data, $class, $format = null, array $context = []) { if (!\is_string($data)) { throw new InvalidArgumentException(sprintf('Data expected to be a string, %s given.', \gettype($data))); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php index be469a4d..a36549c3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php @@ -28,11 +28,11 @@ class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface private $format; private $timezone; - private static $supportedTypes = array( + private static $supportedTypes = [ \DateTimeInterface::class => true, \DateTimeImmutable::class => true, \DateTime::class => true, - ); + ]; /** * @param string $format @@ -49,7 +49,7 @@ class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface * * @throws InvalidArgumentException */ - public function normalize($object, $format = null, array $context = array()) + public function normalize($object, $format = null, array $context = []) { if (!$object instanceof \DateTimeInterface) { throw new InvalidArgumentException('The object must implement the "\DateTimeInterface".'); @@ -59,7 +59,8 @@ class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface $timezone = $this->getTimezone($context); if (null !== $timezone) { - $object = (new \DateTimeImmutable('@'.$object->getTimestamp()))->setTimezone($timezone); + $object = clone $object; + $object = $object->setTimezone($timezone); } return $object->format($format); @@ -78,7 +79,7 @@ class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface * * @throws NotNormalizableValueException */ - public function denormalize($data, $class, $format = null, array $context = array()) + public function denormalize($data, $class, $format = null, array $context = []) { $dateTimeFormat = isset($context[self::FORMAT_KEY]) ? $context[self::FORMAT_KEY] : null; $timezone = $this->getTimezone($context); @@ -132,7 +133,7 @@ class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface */ private function formatDateTimeErrors(array $errors) { - $formattedErrors = array(); + $formattedErrors = []; foreach ($errors as $pos => $message) { $formattedErrors[] = sprintf('at position %d: %s', $pos, $message); @@ -143,7 +144,7 @@ class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface private function getTimezone(array $context) { - $dateTimeZone = array_key_exists(self::TIMEZONE_KEY, $context) ? $context[self::TIMEZONE_KEY] : $this->timezone; + $dateTimeZone = \array_key_exists(self::TIMEZONE_KEY, $context) ? $context[self::TIMEZONE_KEY] : $this->timezone; if (null === $dateTimeZone) { return null; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php index 5db15418..31e27a85 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php @@ -36,5 +36,5 @@ interface DenormalizableInterface * * @return object */ - public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()); + public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php index c3a2bb53..7a12d20f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\Serializer\Exception\BadMethodCallException; +use Symfony\Component\Serializer\Exception\ExceptionInterface; use Symfony\Component\Serializer\Exception\ExtraAttributesException; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Exception\LogicException; @@ -41,8 +42,9 @@ interface DenormalizerInterface * @throws ExtraAttributesException Occurs when the item doesn't have attribute to receive given data * @throws LogicException Occurs when the normalizer is not supposed to denormalize * @throws RuntimeException Occurs if the class cannot be instantiated + * @throws ExceptionInterface Occurs for all the other cases of errors */ - public function denormalize($data, $class, $format = null, array $context = array()); + public function denormalize($data, $class, $format = null, array $context = []); /** * Checks whether the given class is supported for denormalization by this normalizer. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php index 6eec9dd4..d4be31d3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php @@ -34,8 +34,8 @@ namespace Symfony\Component\Serializer\Normalizer; */ class GetSetMethodNormalizer extends AbstractObjectNormalizer { - private static $setterAccessibleCache = array(); - private $cache = array(); + private static $setterAccessibleCache = []; + private $cache = []; /** * {@inheritdoc} @@ -96,12 +96,12 @@ class GetSetMethodNormalizer extends AbstractObjectNormalizer /** * {@inheritdoc} */ - protected function extractAttributes($object, $format = null, array $context = array()) + protected function extractAttributes($object, $format = null, array $context = []) { $reflectionObject = new \ReflectionObject($object); $reflectionMethods = $reflectionObject->getMethods(\ReflectionMethod::IS_PUBLIC); - $attributes = array(); + $attributes = []; foreach ($reflectionMethods as $method) { if (!$this->isGetMethod($method)) { continue; @@ -120,22 +120,22 @@ class GetSetMethodNormalizer extends AbstractObjectNormalizer /** * {@inheritdoc} */ - protected function getAttributeValue($object, $attribute, $format = null, array $context = array()) + protected function getAttributeValue($object, $attribute, $format = null, array $context = []) { $ucfirsted = ucfirst($attribute); $getter = 'get'.$ucfirsted; - if (\is_callable(array($object, $getter))) { + if (\is_callable([$object, $getter])) { return $object->$getter(); } $isser = 'is'.$ucfirsted; - if (\is_callable(array($object, $isser))) { + if (\is_callable([$object, $isser])) { return $object->$isser(); } $haser = 'has'.$ucfirsted; - if (\is_callable(array($object, $haser))) { + if (\is_callable([$object, $haser])) { return $object->$haser(); } } @@ -143,13 +143,13 @@ class GetSetMethodNormalizer extends AbstractObjectNormalizer /** * {@inheritdoc} */ - protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = array()) + protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = []) { $setter = 'set'.ucfirst($attribute); $key = \get_class($object).':'.$setter; if (!isset(self::$setterAccessibleCache[$key])) { - self::$setterAccessibleCache[$key] = \is_callable(array($object, $setter)) && !(new \ReflectionMethod($object, $setter))->isStatic(); + self::$setterAccessibleCache[$key] = \is_callable([$object, $setter]) && !(new \ReflectionMethod($object, $setter))->isStatic(); } if (self::$setterAccessibleCache[$key]) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/JsonSerializableNormalizer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/JsonSerializableNormalizer.php index 27ccf802..b4e53e51 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/JsonSerializableNormalizer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/JsonSerializableNormalizer.php @@ -24,7 +24,7 @@ class JsonSerializableNormalizer extends AbstractNormalizer /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = array()) + public function normalize($object, $format = null, array $context = []) { if ($this->isCircularReference($object, $context)) { return $this->handleCircularReference($object); @@ -60,7 +60,7 @@ class JsonSerializableNormalizer extends AbstractNormalizer /** * {@inheritdoc} */ - public function denormalize($data, $class, $format = null, array $context = array()) + public function denormalize($data, $class, $format = null, array $context = []) { throw new LogicException(sprintf('Cannot denormalize with "%s".', \JsonSerializable::class)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php index 8542e4f8..f7a55601 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php @@ -35,5 +35,5 @@ interface NormalizableInterface * * @return array|string|int|float|bool */ - public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()); + public function normalize(NormalizerInterface $normalizer, $format = null, array $context = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php index 5cccdb33..02a21185 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\Serializer\Exception\CircularReferenceException; +use Symfony\Component\Serializer\Exception\ExceptionInterface; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Exception\LogicException; @@ -35,8 +36,9 @@ interface NormalizerInterface * @throws CircularReferenceException Occurs when the normalizer detects a circular reference when no circular * reference handler can fix it * @throws LogicException Occurs when the normalizer is not called in an expected context + * @throws ExceptionInterface Occurs for all the other cases of errors */ - public function normalize($object, $format = null, array $context = array()); + public function normalize($object, $format = null, array $context = []); /** * Checks whether the given class is supported for normalization by this normalizer. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php index 614d6cd4..854962da 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php @@ -42,10 +42,10 @@ class ObjectNormalizer extends AbstractObjectNormalizer /** * {@inheritdoc} */ - protected function extractAttributes($object, $format = null, array $context = array()) + protected function extractAttributes($object, $format = null, array $context = []) { // If not using groups, detect manually - $attributes = array(); + $attributes = []; // methods $reflClass = new \ReflectionClass($object); @@ -98,7 +98,7 @@ class ObjectNormalizer extends AbstractObjectNormalizer /** * {@inheritdoc} */ - protected function getAttributeValue($object, $attribute, $format = null, array $context = array()) + protected function getAttributeValue($object, $attribute, $format = null, array $context = []) { return $this->propertyAccessor->getValue($object, $attribute); } @@ -106,7 +106,7 @@ class ObjectNormalizer extends AbstractObjectNormalizer /** * {@inheritdoc} */ - protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = array()) + protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = []) { try { $this->propertyAccessor->setValue($object, $attribute, $value); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php index 52dc4f4a..ece26787 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php @@ -30,7 +30,7 @@ namespace Symfony\Component\Serializer\Normalizer; */ class PropertyNormalizer extends AbstractObjectNormalizer { - private $cache = array(); + private $cache = []; /** * {@inheritdoc} @@ -74,7 +74,7 @@ class PropertyNormalizer extends AbstractObjectNormalizer /** * {@inheritdoc} */ - protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = array()) + protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = []) { if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) { return false; @@ -95,10 +95,10 @@ class PropertyNormalizer extends AbstractObjectNormalizer /** * {@inheritdoc} */ - protected function extractAttributes($object, $format = null, array $context = array()) + protected function extractAttributes($object, $format = null, array $context = []) { $reflectionObject = new \ReflectionObject($object); - $attributes = array(); + $attributes = []; do { foreach ($reflectionObject->getProperties() as $property) { @@ -116,7 +116,7 @@ class PropertyNormalizer extends AbstractObjectNormalizer /** * {@inheritdoc} */ - protected function getAttributeValue($object, $attribute, $format = null, array $context = array()) + protected function getAttributeValue($object, $attribute, $format = null, array $context = []) { try { $reflectionProperty = $this->getReflectionProperty($object, $attribute); @@ -135,7 +135,7 @@ class PropertyNormalizer extends AbstractObjectNormalizer /** * {@inheritdoc} */ - protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = array()) + protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = []) { try { $reflectionProperty = $this->getReflectionProperty($object, $attribute); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Serializer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Serializer.php index 72c5721c..4528e385 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Serializer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Serializer.php @@ -53,23 +53,23 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz /** * @var array */ - protected $normalizers = array(); + protected $normalizers = []; /** * @var array * * @deprecated since 3.1 will be removed in 4.0 */ - protected $normalizerCache = array(); + protected $normalizerCache = []; /** * @var array * * @deprecated since 3.1 will be removed in 4.0 */ - protected $denormalizerCache = array(); + protected $denormalizerCache = []; - public function __construct(array $normalizers = array(), array $encoders = array()) + public function __construct(array $normalizers = [], array $encoders = []) { foreach ($normalizers as $normalizer) { if ($normalizer instanceof SerializerAwareInterface) { @@ -86,8 +86,8 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz } $this->normalizers = $normalizers; - $decoders = array(); - $realEncoders = array(); + $decoders = []; + $realEncoders = []; foreach ($encoders as $encoder) { if ($encoder instanceof SerializerAwareInterface) { $encoder->setSerializer($this); @@ -106,7 +106,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz /** * {@inheritdoc} */ - final public function serialize($data, $format, array $context = array()) + final public function serialize($data, $format, array $context = []) { if (!$this->supportsEncoding($format, $context)) { throw new NotEncodableValueException(sprintf('Serialization for the format %s is not supported', $format)); @@ -122,7 +122,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz /** * {@inheritdoc} */ - final public function deserialize($data, $type, $format, array $context = array()) + final public function deserialize($data, $type, $format, array $context = []) { if (!$this->supportsDecoding($format, $context)) { throw new NotEncodableValueException(sprintf('Deserialization for the format %s is not supported', $format)); @@ -136,7 +136,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz /** * {@inheritdoc} */ - public function normalize($data, $format = null, array $context = array()) + public function normalize($data, $format = null, array $context = []) { // If a normalizer supports the given data, use it if ($normalizer = $this->getNormalizer($data, $format, $context)) { @@ -148,7 +148,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz } if (\is_array($data) || $data instanceof \Traversable) { - $normalized = array(); + $normalized = []; foreach ($data as $key => $val) { $normalized[$key] = $this->normalize($val, $format, $context); } @@ -172,7 +172,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz * * @throws NotNormalizableValueException */ - public function denormalize($data, $type, $format = null, array $context = array()) + public function denormalize($data, $type, $format = null, array $context = []) { if (!$this->normalizers) { throw new LogicException('You must register at least one normalizer to be able to denormalize objects.'); @@ -188,7 +188,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null/*, array $context = array()*/) + public function supportsNormalization($data, $format = null/*, array $context = []*/) { if (\func_num_args() > 2) { $context = \func_get_arg(2); @@ -196,11 +196,11 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz if (__CLASS__ !== \get_class($this)) { $r = new \ReflectionMethod($this, __FUNCTION__); if (__CLASS__ !== $r->getDeclaringClass()->getName()) { - @trigger_error(sprintf('The "%s()" method will have a third `$context = array()` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method will have a third `$context = []` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED); } } - $context = array(); + $context = []; } return null !== $this->getNormalizer($data, $format, $context); @@ -209,7 +209,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz /** * {@inheritdoc} */ - public function supportsDenormalization($data, $type, $format = null/*, array $context = array()*/) + public function supportsDenormalization($data, $type, $format = null/*, array $context = []*/) { if (\func_num_args() > 3) { $context = \func_get_arg(3); @@ -217,11 +217,11 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz if (__CLASS__ !== \get_class($this)) { $r = new \ReflectionMethod($this, __FUNCTION__); if (__CLASS__ !== $r->getDeclaringClass()->getName()) { - @trigger_error(sprintf('The "%s()" method will have a fourth `$context = array()` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method will have a fourth `$context = []` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED); } } - $context = array(); + $context = []; } return null !== $this->getDenormalizer($data, $type, $format, $context); @@ -267,7 +267,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz /** * {@inheritdoc} */ - final public function encode($data, $format, array $context = array()) + final public function encode($data, $format, array $context = []) { return $this->encoder->encode($data, $format, $context); } @@ -275,7 +275,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz /** * {@inheritdoc} */ - final public function decode($data, $format, array $context = array()) + final public function decode($data, $format, array $context = []) { return $this->decoder->decode($data, $format, $context); } @@ -283,7 +283,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz /** * {@inheritdoc} */ - public function supportsEncoding($format/*, array $context = array()*/) + public function supportsEncoding($format/*, array $context = []*/) { if (\func_num_args() > 1) { $context = \func_get_arg(1); @@ -291,11 +291,11 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz if (__CLASS__ !== \get_class($this)) { $r = new \ReflectionMethod($this, __FUNCTION__); if (__CLASS__ !== $r->getDeclaringClass()->getName()) { - @trigger_error(sprintf('The "%s()" method will have a second `$context = array()` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method will have a second `$context = []` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED); } } - $context = array(); + $context = []; } return $this->encoder->supportsEncoding($format, $context); @@ -304,7 +304,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz /** * {@inheritdoc} */ - public function supportsDecoding($format/*, array $context = array()*/) + public function supportsDecoding($format/*, array $context = []*/) { if (\func_num_args() > 1) { $context = \func_get_arg(1); @@ -312,11 +312,11 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz if (__CLASS__ !== \get_class($this)) { $r = new \ReflectionMethod($this, __FUNCTION__); if (__CLASS__ !== $r->getDeclaringClass()->getName()) { - @trigger_error(sprintf('The "%s()" method will have a second `$context = array()` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method will have a second `$context = []` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED); } } - $context = array(); + $context = []; } return $this->decoder->supportsDecoding($format, $context); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/SerializerInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/SerializerInterface.php index 196bff1a..7a03ef94 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/SerializerInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/SerializerInterface.php @@ -27,7 +27,7 @@ interface SerializerInterface * * @return string */ - public function serialize($data, $format, array $context = array()); + public function serialize($data, $format, array $context = []); /** * Deserializes data into the given type. @@ -39,5 +39,5 @@ interface SerializerInterface * * @return object */ - public function deserialize($data, $type, $format, array $context = array()); + public function deserialize($data, $type, $format, array $context = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Annotation/GroupsTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Annotation/GroupsTest.php index 04729ccb..9b54221d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Annotation/GroupsTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Annotation/GroupsTest.php @@ -24,7 +24,7 @@ class GroupsTest extends TestCase */ public function testEmptyGroupsParameter() { - new Groups(array('value' => array())); + new Groups(['value' => []]); } /** @@ -32,7 +32,7 @@ class GroupsTest extends TestCase */ public function testNotAnArrayGroupsParameter() { - new Groups(array('value' => 12)); + new Groups(['value' => 12]); } /** @@ -40,20 +40,20 @@ class GroupsTest extends TestCase */ public function testInvalidGroupsParameter() { - new Groups(array('value' => array('a', 1, new \stdClass()))); + new Groups(['value' => ['a', 1, new \stdClass()]]); } public function testGroupsParameters() { - $validData = array('a', 'b'); + $validData = ['a', 'b']; - $groups = new Groups(array('value' => $validData)); + $groups = new Groups(['value' => $validData]); $this->assertEquals($validData, $groups->getGroups()); } public function testSingleGroup() { - $groups = new Groups(array('value' => 'a')); - $this->assertEquals(array('a'), $groups->getGroups()); + $groups = new Groups(['value' => 'a']); + $this->assertEquals(['a'], $groups->getGroups()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php index 4554fc99..16f10e14 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php @@ -25,17 +25,17 @@ class MaxDepthTest extends TestCase */ public function testNotSetMaxDepthParameter() { - new MaxDepth(array()); + new MaxDepth([]); } public function provideInvalidValues() { - return array( - array(''), - array('foo'), - array('1'), - array(0), - ); + return [ + [''], + ['foo'], + ['1'], + [0], + ]; } /** @@ -46,12 +46,12 @@ class MaxDepthTest extends TestCase */ public function testNotAnIntMaxDepthParameter($value) { - new MaxDepth(array('value' => $value)); + new MaxDepth(['value' => $value]); } public function testMaxDepthParameters() { - $maxDepth = new MaxDepth(array('value' => 3)); + $maxDepth = new MaxDepth(['value' => 3]); $this->assertEquals(3, $maxDepth->getMaxDepth()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/DependencyInjection/SerializerPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/DependencyInjection/SerializerPassTest.php index fa12454f..5c3fedfe 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/DependencyInjection/SerializerPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/DependencyInjection/SerializerPassTest.php @@ -44,8 +44,8 @@ class SerializerPassTest extends TestCase { $container = new ContainerBuilder(); $container->register('serializer') - ->addArgument(array()) - ->addArgument(array()); + ->addArgument([]) + ->addArgument([]); $container->register('normalizer')->addTag('serializer.normalizer'); $serializerPass = new SerializerPass(); @@ -56,19 +56,19 @@ class SerializerPassTest extends TestCase { $container = new ContainerBuilder(); - $definition = $container->register('serializer')->setArguments(array(null, null)); - $container->register('n2')->addTag('serializer.normalizer', array('priority' => 100))->addTag('serializer.encoder', array('priority' => 100)); - $container->register('n1')->addTag('serializer.normalizer', array('priority' => 200))->addTag('serializer.encoder', array('priority' => 200)); + $definition = $container->register('serializer')->setArguments([null, null]); + $container->register('n2')->addTag('serializer.normalizer', ['priority' => 100])->addTag('serializer.encoder', ['priority' => 100]); + $container->register('n1')->addTag('serializer.normalizer', ['priority' => 200])->addTag('serializer.encoder', ['priority' => 200]); $container->register('n3')->addTag('serializer.normalizer')->addTag('serializer.encoder'); $serializerPass = new SerializerPass(); $serializerPass->process($container); - $expected = array( + $expected = [ new Reference('n1'), new Reference('n2'), new Reference('n3'), - ); + ]; $this->assertEquals($expected, $definition->getArgument(0)); $this->assertEquals($expected, $definition->getArgument(1)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php index 7d860f65..3a84d99d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php @@ -32,12 +32,12 @@ class ChainDecoderTest extends TestCase $this->decoder1 ->method('supportsDecoding') - ->will($this->returnValueMap(array( - array(self::FORMAT_1, array(), true), - array(self::FORMAT_2, array(), false), - array(self::FORMAT_3, array(), false), - array(self::FORMAT_3, array('foo' => 'bar'), true), - ))); + ->will($this->returnValueMap([ + [self::FORMAT_1, [], true], + [self::FORMAT_2, [], false], + [self::FORMAT_3, [], false], + [self::FORMAT_3, ['foo' => 'bar'], true], + ])); $this->decoder2 = $this ->getMockBuilder('Symfony\Component\Serializer\Encoder\DecoderInterface') @@ -45,13 +45,13 @@ class ChainDecoderTest extends TestCase $this->decoder2 ->method('supportsDecoding') - ->will($this->returnValueMap(array( - array(self::FORMAT_1, array(), false), - array(self::FORMAT_2, array(), true), - array(self::FORMAT_3, array(), false), - ))); + ->will($this->returnValueMap([ + [self::FORMAT_1, [], false], + [self::FORMAT_2, [], true], + [self::FORMAT_3, [], false], + ])); - $this->chainDecoder = new ChainDecoder(array($this->decoder1, $this->decoder2)); + $this->chainDecoder = new ChainDecoder([$this->decoder1, $this->decoder2]); } public function testSupportsDecoding() @@ -59,7 +59,7 @@ class ChainDecoderTest extends TestCase $this->assertTrue($this->chainDecoder->supportsDecoding(self::FORMAT_1)); $this->assertTrue($this->chainDecoder->supportsDecoding(self::FORMAT_2)); $this->assertFalse($this->chainDecoder->supportsDecoding(self::FORMAT_3)); - $this->assertTrue($this->chainDecoder->supportsDecoding(self::FORMAT_3, array('foo' => 'bar'))); + $this->assertTrue($this->chainDecoder->supportsDecoding(self::FORMAT_3, ['foo' => 'bar'])); } public function testDecode() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php index 82c64cc1..48ccbdca 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php @@ -34,12 +34,12 @@ class ChainEncoderTest extends TestCase $this->encoder1 ->method('supportsEncoding') - ->will($this->returnValueMap(array( - array(self::FORMAT_1, array(), true), - array(self::FORMAT_2, array(), false), - array(self::FORMAT_3, array(), false), - array(self::FORMAT_3, array('foo' => 'bar'), true), - ))); + ->will($this->returnValueMap([ + [self::FORMAT_1, [], true], + [self::FORMAT_2, [], false], + [self::FORMAT_3, [], false], + [self::FORMAT_3, ['foo' => 'bar'], true], + ])); $this->encoder2 = $this ->getMockBuilder('Symfony\Component\Serializer\Encoder\EncoderInterface') @@ -47,13 +47,13 @@ class ChainEncoderTest extends TestCase $this->encoder2 ->method('supportsEncoding') - ->will($this->returnValueMap(array( - array(self::FORMAT_1, array(), false), - array(self::FORMAT_2, array(), true), - array(self::FORMAT_3, array(), false), - ))); + ->will($this->returnValueMap([ + [self::FORMAT_1, [], false], + [self::FORMAT_2, [], true], + [self::FORMAT_3, [], false], + ])); - $this->chainEncoder = new ChainEncoder(array($this->encoder1, $this->encoder2)); + $this->chainEncoder = new ChainEncoder([$this->encoder1, $this->encoder2]); } public function testSupportsEncoding() @@ -61,7 +61,7 @@ class ChainEncoderTest extends TestCase $this->assertTrue($this->chainEncoder->supportsEncoding(self::FORMAT_1)); $this->assertTrue($this->chainEncoder->supportsEncoding(self::FORMAT_2)); $this->assertFalse($this->chainEncoder->supportsEncoding(self::FORMAT_3)); - $this->assertTrue($this->chainEncoder->supportsEncoding(self::FORMAT_3, array('foo' => 'bar'))); + $this->assertTrue($this->chainEncoder->supportsEncoding(self::FORMAT_3, ['foo' => 'bar'])); } public function testEncode() @@ -69,7 +69,7 @@ class ChainEncoderTest extends TestCase $this->encoder1->expects($this->never())->method('encode'); $this->encoder2->expects($this->once())->method('encode'); - $this->chainEncoder->encode(array('foo' => 123), self::FORMAT_2); + $this->chainEncoder->encode(['foo' => 123], self::FORMAT_2); } /** @@ -77,7 +77,7 @@ class ChainEncoderTest extends TestCase */ public function testEncodeUnsupportedFormat() { - $this->chainEncoder->encode(array('foo' => 123), self::FORMAT_3); + $this->chainEncoder->encode(['foo' => 123], self::FORMAT_3); } public function testNeedsNormalizationBasic() @@ -98,7 +98,7 @@ class ChainEncoderTest extends TestCase $chainEncoder->method('supportsEncoding')->willReturn(true); $chainEncoder->method('needsNormalization')->willReturn($bool); - $sut = new ChainEncoder(array($chainEncoder)); + $sut = new ChainEncoder([$chainEncoder]); $this->assertEquals($bool, $sut->needsNormalization(self::FORMAT_1)); } @@ -106,17 +106,17 @@ class ChainEncoderTest extends TestCase public function testNeedsNormalizationNormalizationAware() { $encoder = new NormalizationAwareEncoder(); - $sut = new ChainEncoder(array($encoder)); + $sut = new ChainEncoder([$encoder]); $this->assertFalse($sut->needsNormalization(self::FORMAT_1)); } public function booleanProvider() { - return array( - array(true), - array(false), - ); + return [ + [true], + [false], + ]; } } @@ -131,7 +131,7 @@ class NormalizationAwareEncoder implements EncoderInterface, NormalizationAwareI return true; } - public function encode($data, $format, array $context = array()) + public function encode($data, $format, array $context = []) { } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php index a5e5c256..1eb673e8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php @@ -37,7 +37,7 @@ class CsvEncoderTest extends TestCase public function testEncode() { - $value = array('foo' => 'hello', 'bar' => 'hey ho'); + $value = ['foo' => 'hello', 'bar' => 'hey ho']; $this->assertEquals(<<<'CSV' foo,bar @@ -49,10 +49,10 @@ CSV public function testEncodeCollection() { - $value = array( - array('foo' => 'hello', 'bar' => 'hey ho'), - array('foo' => 'hi', 'bar' => 'let\'s go'), - ); + $value = [ + ['foo' => 'hello', 'bar' => 'hey ho'], + ['foo' => 'hi', 'bar' => 'let\'s go'], + ]; $this->assertEquals(<<<'CSV' foo,bar @@ -70,7 +70,7 @@ CSV a,b,c CSV - , $this->encoder->encode(array('a', 'b', 'c'), 'csv')); + , $this->encoder->encode(['a', 'b', 'c'], 'csv')); } public function testEncodeNonArray() @@ -85,10 +85,10 @@ CSV public function testEncodeNestedArrays() { - $value = array('foo' => 'hello', 'bar' => array( - array('id' => 'yo', 1 => 'wesh'), - array('baz' => 'Halo', 'foo' => 'olá'), - )); + $value = ['foo' => 'hello', 'bar' => [ + ['id' => 'yo', 1 => 'wesh'], + ['baz' => 'Halo', 'foo' => 'olá'], + ]]; $this->assertEquals(<<<'CSV' foo,bar.0.id,bar.0.1,bar.1.baz,bar.1.foo @@ -102,7 +102,7 @@ CSV { $this->encoder = new CsvEncoder(';', "'", '|', '-'); - $value = array('a' => 'he\'llo', 'c' => array('d' => 'foo')); + $value = ['a' => 'he\'llo', 'c' => ['d' => 'foo']]; $this->assertEquals(<<<'CSV' a;c-d @@ -114,34 +114,34 @@ CSV public function testEncodeCustomSettingsPassedInContext() { - $value = array('a' => 'he\'llo', 'c' => array('d' => 'foo')); + $value = ['a' => 'he\'llo', 'c' => ['d' => 'foo']]; $this->assertSame(<<<'CSV' a;c-d 'he''llo';foo CSV - , $this->encoder->encode($value, 'csv', array( + , $this->encoder->encode($value, 'csv', [ CsvEncoder::DELIMITER_KEY => ';', CsvEncoder::ENCLOSURE_KEY => "'", CsvEncoder::ESCAPE_CHAR_KEY => '|', CsvEncoder::KEY_SEPARATOR_KEY => '-', - ))); + ])); } public function testEncodeEmptyArray() { - $this->assertEquals("\n\n", $this->encoder->encode(array(), 'csv')); - $this->assertEquals("\n\n", $this->encoder->encode(array(array()), 'csv')); + $this->assertEquals("\n\n", $this->encoder->encode([], 'csv')); + $this->assertEquals("\n\n", $this->encoder->encode([[]], 'csv')); } public function testEncodeVariableStructure() { - $value = array( - array('a' => array('foo', 'bar')), - array('a' => array(), 'b' => 'baz'), - array('a' => array('bar', 'foo'), 'c' => 'pong'), - ); + $value = [ + ['a' => ['foo', 'bar']], + ['a' => [], 'b' => 'baz'], + ['a' => ['bar', 'foo'], 'c' => 'pong'], + ]; $csv = << array( + $context = [ + CsvEncoder::HEADERS_KEY => [ 'b', 'c', - ), - ); - $value = array( - array('a' => 'foo', 'b' => 'bar'), - ); + ], + ]; + $value = [ + ['a' => 'foo', 'b' => 'bar'], + ]; $csv = << 'a', 'bar' => 'b'); + $expected = ['foo' => 'a', 'bar' => 'b']; $this->assertEquals($expected, $this->encoder->decode(<<<'CSV' foo,bar @@ -192,11 +192,11 @@ CSV public function testDecodeCollection() { - $expected = array( - array('foo' => 'a', 'bar' => 'b'), - array('foo' => 'c', 'bar' => 'd'), - array('foo' => 'f'), - ); + $expected = [ + ['foo' => 'a', 'bar' => 'b'], + ['foo' => 'c', 'bar' => 'd'], + ['foo' => 'f'], + ]; $this->assertEquals($expected, $this->encoder->decode(<<<'CSV' foo,bar @@ -210,12 +210,12 @@ CSV public function testDecodeToManyRelation() { - $expected = array( - array('foo' => 'bar', 'relations' => array(array('a' => 'b'), array('a' => 'b'))), - array('foo' => 'bat', 'relations' => array(array('a' => 'b'), array('a' => ''))), - array('foo' => 'bat', 'relations' => array(array('a' => 'b'))), - array('foo' => 'baz', 'relations' => array(array('a' => 'c'), array('a' => 'c'))), - ); + $expected = [ + ['foo' => 'bar', 'relations' => [['a' => 'b'], ['a' => 'b']]], + ['foo' => 'bat', 'relations' => [['a' => 'b'], ['a' => '']]], + ['foo' => 'bat', 'relations' => [['a' => 'b']]], + ['foo' => 'baz', 'relations' => [['a' => 'c'], ['a' => 'c']]], + ]; $this->assertEquals($expected, $this->encoder->decode(<<<'CSV' foo,relations.0.a,relations.1.a @@ -229,10 +229,10 @@ CSV public function testDecodeNestedArrays() { - $expected = array( - array('foo' => 'a', 'bar' => array('baz' => array('bat' => 'b'))), - array('foo' => 'c', 'bar' => array('baz' => array('bat' => 'd'))), - ); + $expected = [ + ['foo' => 'a', 'bar' => ['baz' => ['bat' => 'b']]], + ['foo' => 'c', 'bar' => ['baz' => ['bat' => 'd']]], + ]; $this->assertEquals($expected, $this->encoder->decode(<<<'CSV' foo,bar.baz.bat @@ -246,7 +246,7 @@ CSV { $this->encoder = new CsvEncoder(';', "'", '|', '-'); - $expected = array('a' => 'hell\'o', 'bar' => array('baz' => 'b')); + $expected = ['a' => 'hell\'o', 'bar' => ['baz' => 'b']]; $this->assertEquals($expected, $this->encoder->decode(<<<'CSV' a;bar-baz 'hell''o';b;c @@ -256,26 +256,26 @@ CSV public function testDecodeCustomSettingsPassedInContext() { - $expected = array('a' => 'hell\'o', 'bar' => array('baz' => 'b')); + $expected = ['a' => 'hell\'o', 'bar' => ['baz' => 'b']]; $this->assertEquals($expected, $this->encoder->decode(<<<'CSV' a;bar-baz 'hell''o';b;c CSV - , 'csv', array( + , 'csv', [ CsvEncoder::DELIMITER_KEY => ';', CsvEncoder::ENCLOSURE_KEY => "'", CsvEncoder::ESCAPE_CHAR_KEY => '|', CsvEncoder::KEY_SEPARATOR_KEY => '-', - ))); + ])); } public function testDecodeMalformedCollection() { - $expected = array( - array('foo' => 'a', 'bar' => 'b'), - array('foo' => 'c', 'bar' => 'd'), - array('foo' => 'f'), - ); + $expected = [ + ['foo' => 'a', 'bar' => 'b'], + ['foo' => 'c', 'bar' => 'd'], + ['foo' => 'f'], + ]; $this->assertEquals($expected, $this->encoder->decode(<<<'CSV' foo,bar @@ -289,6 +289,6 @@ CSV public function testDecodeEmptyArray() { - $this->assertEquals(array(), $this->encoder->decode('', 'csv')); + $this->assertEquals([], $this->encoder->decode('', 'csv')); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php index 774064d4..76a1b632 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php @@ -47,12 +47,12 @@ class JsonDecodeTest extends TestCase $stdClass = new \stdClass(); $stdClass->foo = 'bar'; - $assoc = array('foo' => 'bar'); + $assoc = ['foo' => 'bar']; - return array( - array('{"foo": "bar"}', $stdClass, array()), - array('{"foo": "bar"}', $assoc, array('json_decode_associative' => true)), - ); + return [ + ['{"foo": "bar"}', $stdClass, []], + ['{"foo": "bar"}', $assoc, ['json_decode_associative' => true]], + ]; } /** @@ -67,9 +67,9 @@ class JsonDecodeTest extends TestCase public function decodeProviderException() { - return array( - array("{'foo': 'bar'}"), - array('kaboom!'), - ); + return [ + ["{'foo': 'bar'}"], + ['kaboom!'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php index ed33233f..42a460e5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php @@ -43,10 +43,10 @@ class JsonEncodeTest extends TestCase public function encodeProvider() { - return array( - array(array(), '[]', array()), - array(array(), '{}', array('json_encode_options' => JSON_FORCE_OBJECT)), - ); + return [ + [[], '[]', []], + [[], '{}', ['json_encode_options' => JSON_FORCE_OBJECT]], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php index 1977d4f1..439fbda1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php @@ -24,7 +24,7 @@ class JsonEncoderTest extends TestCase protected function setUp() { $this->encoder = new JsonEncoder(); - $this->serializer = new Serializer(array(new CustomNormalizer()), array('json' => new JsonEncoder())); + $this->serializer = new Serializer([new CustomNormalizer()], ['json' => new JsonEncoder()]); } public function testEncodeScalar() @@ -48,16 +48,16 @@ class JsonEncoderTest extends TestCase public function testOptions() { - $context = array('json_encode_options' => JSON_NUMERIC_CHECK); + $context = ['json_encode_options' => JSON_NUMERIC_CHECK]; - $arr = array(); + $arr = []; $arr['foo'] = '3'; $expected = '{"foo":3}'; $this->assertEquals($expected, $this->serializer->serialize($arr, 'json', $context)); - $arr = array(); + $arr = []; $arr['foo'] = '3'; $expected = '{"foo":"3"}'; @@ -70,22 +70,22 @@ class JsonEncoderTest extends TestCase */ public function testEncodeNotUtf8WithoutPartialOnError() { - $arr = array( + $arr = [ 'utf8' => 'Hello World!', 'notUtf8' => "\xb0\xd0\xb5\xd0", - ); + ]; $this->encoder->encode($arr, 'json'); } public function testEncodeNotUtf8WithPartialOnError() { - $context = array('json_encode_options' => JSON_PARTIAL_OUTPUT_ON_ERROR); + $context = ['json_encode_options' => JSON_PARTIAL_OUTPUT_ON_ERROR]; - $arr = array( + $arr = [ 'utf8' => 'Hello World!', 'notUtf8' => "\xb0\xd0\xb5\xd0", - ); + ]; $result = $this->encoder->encode($arr, 'json', $context); $jsonLastError = json_last_error(); @@ -112,8 +112,8 @@ class JsonEncoderTest extends TestCase { $obj = new \stdClass(); $obj->foo = 'foo'; - $obj->bar = array('a', 'b'); - $obj->baz = array('key' => 'val', 'key2' => 'val', 'A B' => 'bar', 'item' => array(array('title' => 'title1'), array('title' => 'title2')), 'Barry' => array('FooBar' => array('Baz' => 'Ed', '@id' => 1))); + $obj->bar = ['a', 'b']; + $obj->baz = ['key' => 'val', 'key2' => 'val', 'A B' => 'bar', 'item' => [['title' => 'title1'], ['title' => 'title2']], 'Barry' => ['FooBar' => ['Baz' => 'Ed', '@id' => 1]]]; $obj->qux = '1'; return $obj; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php index df40892c..7a6a7d3f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php @@ -32,7 +32,7 @@ class XmlEncoderTest extends TestCase protected function setUp() { $this->encoder = new XmlEncoder(); - $serializer = new Serializer(array(new CustomNormalizer()), array('xml' => new XmlEncoder())); + $serializer = new Serializer([new CustomNormalizer()], ['xml' => new XmlEncoder()]); $this->encoder->setSerializer($serializer); } @@ -71,19 +71,19 @@ class XmlEncoderTest extends TestCase public function testAttributes() { $obj = new ScalarDummy(); - $obj->xmlFoo = array( - 'foo-bar' => array( + $obj->xmlFoo = [ + 'foo-bar' => [ '@id' => 1, '@name' => 'Bar', - ), - 'Foo' => array( + ], + 'Foo' => [ 'Bar' => 'Test', '@Type' => 'test', - ), + ], 'föo_bär' => 'a', - 'Bar' => array(1, 2, 3), + 'Bar' => [1, 2, 3], 'a' => 'b', - ); + ]; $expected = ''."\n". ''. ''. @@ -100,11 +100,11 @@ class XmlEncoderTest extends TestCase public function testElementNameValid() { $obj = new ScalarDummy(); - $obj->xmlFoo = array( + $obj->xmlFoo = [ 'foo-bar' => 'a', 'foo_bar' => 'a', 'föo_bär' => 'a', - ); + ]; $expected = ''."\n". ''. @@ -119,7 +119,7 @@ class XmlEncoderTest extends TestCase public function testEncodeSimpleXML() { $xml = simplexml_load_string('Peter'); - $array = array('person' => $xml); + $array = ['person' => $xml]; $expected = ''."\n". 'Peter'."\n"; @@ -130,35 +130,35 @@ class XmlEncoderTest extends TestCase public function testEncodeXmlAttributes() { $xml = simplexml_load_string('Peter'); - $array = array('person' => $xml); + $array = ['person' => $xml]; $expected = ''."\n". 'Peter'."\n"; - $context = array( + $context = [ 'xml_version' => '1.1', 'xml_encoding' => 'utf-8', 'xml_standalone' => true, - ); + ]; $this->assertSame($expected, $this->encoder->encode($array, 'xml', $context)); } public function testEncodeRemovingEmptyTags() { - $array = array('person' => array('firstname' => 'Peter', 'lastname' => null)); + $array = ['person' => ['firstname' => 'Peter', 'lastname' => null]]; $expected = ''."\n". 'Peter'."\n"; - $context = array('remove_empty_tags' => true); + $context = ['remove_empty_tags' => true]; $this->assertSame($expected, $this->encoder->encode($array, 'xml', $context)); } public function testEncodeNotRemovingEmptyTags() { - $array = array('person' => array('firstname' => 'Peter', 'lastname' => null)); + $array = ['person' => ['firstname' => 'Peter', 'lastname' => null]]; $expected = ''."\n". 'Peter'."\n"; @@ -168,7 +168,7 @@ class XmlEncoderTest extends TestCase public function testContext() { - $array = array('person' => array('name' => 'George Abitbol')); + $array = ['person' => ['name' => 'George Abitbol']]; $expected = <<<'XML' @@ -179,44 +179,44 @@ class XmlEncoderTest extends TestCase XML; - $context = array( + $context = [ 'xml_format_output' => true, - ); + ]; $this->assertSame($expected, $this->encoder->encode($array, 'xml', $context)); } public function testEncodeScalarRootAttributes() { - $array = array( + $array = [ '#' => 'Paul', - '@gender' => 'm', - ); + '@eye-color' => 'brown', + ]; $expected = ''."\n". - 'Paul'."\n"; + 'Paul'."\n"; $this->assertEquals($expected, $this->encoder->encode($array, 'xml')); } public function testEncodeRootAttributes() { - $array = array( + $array = [ 'firstname' => 'Paul', - '@gender' => 'm', - ); + '@eye-color' => 'brown', + ]; $expected = ''."\n". - 'Paul'."\n"; + 'Paul'."\n"; $this->assertEquals($expected, $this->encoder->encode($array, 'xml')); } public function testEncodeCdataWrapping() { - $array = array( + $array = [ 'firstname' => 'Paul ', - ); + ]; $expected = ''."\n". ']]>'."\n"; @@ -226,12 +226,12 @@ XML; public function testEncodeScalarWithAttribute() { - $array = array( - 'person' => array('@gender' => 'M', '#' => 'Peter'), - ); + $array = [ + 'person' => ['@eye-color' => 'brown', '#' => 'Peter'], + ]; $expected = ''."\n". - 'Peter'."\n"; + 'Peter'."\n"; $this->assertEquals($expected, $this->encoder->encode($array, 'xml')); } @@ -251,7 +251,7 @@ XML; Name XML; - $this->assertSame(array('@index' => 182077241760011681341821060401202210011000045913000000017100, '#' => 'Name'), $this->encoder->decode($source, 'xml')); + $this->assertSame(['@index' => 182077241760011681341821060401202210011000045913000000017100, '#' => 'Name'], $this->encoder->decode($source, 'xml')); } public function testDecodeNegativeIntAttribute() @@ -261,7 +261,7 @@ XML; Name XML; - $this->assertSame(array('@index' => -1234, '#' => 'Name'), $this->encoder->decode($source, 'xml')); + $this->assertSame(['@index' => -1234, '#' => 'Name'], $this->encoder->decode($source, 'xml')); } public function testDecodeFloatAttribute() @@ -271,7 +271,7 @@ XML; Name XML; - $this->assertSame(array('@index' => -12.11, '#' => 'Name'), $this->encoder->decode($source, 'xml')); + $this->assertSame(['@index' => -12.11, '#' => 'Name'], $this->encoder->decode($source, 'xml')); } public function testDecodeNegativeFloatAttribute() @@ -281,7 +281,7 @@ XML; Name XML; - $this->assertSame(array('@index' => -12.11, '#' => 'Name'), $this->encoder->decode($source, 'xml')); + $this->assertSame(['@index' => -12.11, '#' => 'Name'], $this->encoder->decode($source, 'xml')); } public function testNoTypeCastAttribute() @@ -293,16 +293,16 @@ XML; XML; - $data = $this->encoder->decode($source, 'xml', array('xml_type_cast_attributes' => false)); - $expected = array( + $data = $this->encoder->decode($source, 'xml', ['xml_type_cast_attributes' => false]); + $expected = [ '@a' => '018', '@b' => '-12.11', - 'node' => array( + 'node' => [ '@a' => '018', '@b' => '-12.11', '#' => '', - ), - ); + ], + ]; $this->assertSame($expected, $data); } @@ -324,17 +324,17 @@ XML; public function testEncodeSerializerXmlRootNodeNameOption() { - $options = array('xml_root_node_name' => 'test'); + $options = ['xml_root_node_name' => 'test']; $this->encoder = new XmlEncoder(); - $serializer = new Serializer(array(), array('xml' => new XmlEncoder())); + $serializer = new Serializer([], ['xml' => new XmlEncoder()]); $this->encoder->setSerializer($serializer); - $array = array( - 'person' => array('@gender' => 'M', '#' => 'Peter'), - ); + $array = [ + 'person' => ['@eye-color' => 'brown', '#' => 'Peter'], + ]; $expected = ''."\n". - 'Peter'."\n"; + 'Peter'."\n"; $this->assertEquals($expected, $serializer->serialize($array, 'xml', $options)); } @@ -342,7 +342,7 @@ XML; public function testEncodeTraversableWhenNormalizable() { $this->encoder = new XmlEncoder(); - $serializer = new Serializer(array(new CustomNormalizer()), array('xml' => new XmlEncoder())); + $serializer = new Serializer([new CustomNormalizer()], ['xml' => new XmlEncoder()]); $this->encoder->setSerializer($serializer); $expected = <<<'XML' @@ -364,9 +364,9 @@ XML; public function testDecodeCdataWrapping() { - $expected = array( + $expected = [ 'firstname' => 'Paul ', - ); + ]; $xml = ''."\n". ']]>'."\n"; @@ -376,9 +376,9 @@ XML; public function testDecodeCdataWrappingAndWhitespace() { - $expected = array( + $expected = [ 'firstname' => 'Paul ', - ); + ]; $xml = ''."\n". ''."\n". @@ -398,11 +398,11 @@ XML; public function testDecodeScalarWithAttribute() { $source = ''."\n". - 'Peter'."\n"; + 'Peter'."\n"; - $expected = array( - 'person' => array('@gender' => 'M', '#' => 'Peter'), - ); + $expected = [ + 'person' => ['@eye-color' => 'brown', '#' => 'Peter'], + ]; $this->assertEquals($expected, $this->encoder->decode($source, 'xml')); } @@ -410,12 +410,12 @@ XML; public function testDecodeScalarRootAttributes() { $source = ''."\n". - 'Peter'."\n"; + 'Peter'."\n"; - $expected = array( + $expected = [ '#' => 'Peter', - '@gender' => 'M', - ); + '@eye-color' => 'brown', + ]; $this->assertEquals($expected, $this->encoder->decode($source, 'xml')); } @@ -423,13 +423,13 @@ XML; public function testDecodeRootAttributes() { $source = ''."\n". - 'PeterMac Calloway'."\n"; + 'PeterMac Calloway'."\n"; - $expected = array( + $expected = [ 'firstname' => 'Peter', 'lastname' => 'Mac Calloway', - '@gender' => 'M', - ); + '@eye-color' => 'brown', + ]; $this->assertEquals($expected, $this->encoder->decode($source, 'xml')); } @@ -444,12 +444,12 @@ XML; ''. ''."\n"; - $expected = array( - 'people' => array('person' => array( - array('firstname' => 'Benjamin', 'lastname' => 'Alexandre'), - array('firstname' => 'Damien', 'lastname' => 'Clay'), - )), - ); + $expected = [ + 'people' => ['person' => [ + ['firstname' => 'Benjamin', 'lastname' => 'Alexandre'], + ['firstname' => 'Damien', 'lastname' => 'Clay'], + ]], + ]; $this->assertEquals($expected, $this->encoder->decode($source, 'xml')); } @@ -507,10 +507,10 @@ XML; XML; - $expected = array('person' => array( - array('firstname' => 'Benjamin', 'lastname' => 'Alexandre'), - array('firstname' => 'Damien', 'lastname' => 'Clay'), - )); + $expected = ['person' => [ + ['firstname' => 'Benjamin', 'lastname' => 'Alexandre'], + ['firstname' => 'Damien', 'lastname' => 'Clay'], + ]]; $this->assertEquals($expected, $this->encoder->decode($source, 'xml')); } @@ -518,32 +518,32 @@ XML; public function testDecodeWithoutItemHash() { $obj = new ScalarDummy(); - $obj->xmlFoo = array( - 'foo-bar' => array( + $obj->xmlFoo = [ + 'foo-bar' => [ '@key' => 'value', - 'item' => array('@key' => 'key', 'key-val' => 'val'), - ), - 'Foo' => array( + 'item' => ['@key' => 'key', 'key-val' => 'val'], + ], + 'Foo' => [ 'Bar' => 'Test', '@Type' => 'test', - ), + ], 'föo_bär' => 'a', - 'Bar' => array(1, 2, 3), + 'Bar' => [1, 2, 3], 'a' => 'b', - ); - $expected = array( - 'foo-bar' => array( + ]; + $expected = [ + 'foo-bar' => [ '@key' => 'value', - 'key' => array('@key' => 'key', 'key-val' => 'val'), - ), - 'Foo' => array( + 'key' => ['@key' => 'key', 'key-val' => 'val'], + ], + 'Foo' => [ 'Bar' => 'Test', '@Type' => 'test', - ), + ], 'föo_bär' => 'a', - 'Bar' => array(1, 2, 3), + 'Bar' => [1, 2, 3], 'a' => 'b', - ); + ]; $xml = $this->encoder->encode($obj, 'xml'); $this->assertEquals($expected, $this->encoder->decode($xml, 'xml')); } @@ -603,7 +603,7 @@ XML; protected function getNamespacedArray() { - return array( + return [ '@xmlns' => 'http://www.w3.org/2005/Atom', '@xmlns:app' => 'http://www.w3.org/2007/app', '@xmlns:media' => 'http://search.yahoo.com/mrss/', @@ -611,36 +611,36 @@ XML; '@xmlns:yt' => 'http://gdata.youtube.com/schemas/2007', 'qux' => '1', 'app:foo' => 'foo', - 'yt:bar' => array('a', 'b'), - 'media:baz' => array( + 'yt:bar' => ['a', 'b'], + 'media:baz' => [ 'media:key' => 'val', 'media:key2' => 'val', 'A B' => 'bar', - 'item' => array( - array( + 'item' => [ + [ 'title' => 'title1', - ), - array( + ], + [ 'title' => 'title2', - ), - ), - 'Barry' => array( + ], + ], + 'Barry' => [ '@size' => 'large', - 'FooBar' => array( + 'FooBar' => [ 'Baz' => 'Ed', '@gd:id' => 1, - ), - ), - ), - ); + ], + ], + ], + ]; } protected function getObject() { $obj = new Dummy(); $obj->foo = 'foo'; - $obj->bar = array('a', 'b'); - $obj->baz = array('key' => 'val', 'key2' => 'val', 'A B' => 'bar', 'item' => array(array('title' => 'title1'), array('title' => 'title2')), 'Barry' => array('FooBar' => array('Baz' => 'Ed', '@id' => 1))); + $obj->bar = ['a', 'b']; + $obj->baz = ['key' => 'val', 'key2' => 'val', 'A B' => 'bar', 'item' => [['title' => 'title1'], ['title' => 'title2']], 'Barry' => ['FooBar' => ['Baz' => 'Ed', '@id' => 1]]]; $obj->qux = '1'; return $obj; @@ -654,7 +654,7 @@ XML; XML; - $actualXml = $this->encoder->encode(array('foo' => true, 'bar' => false), 'xml'); + $actualXml = $this->encoder->encode(['foo' => true, 'bar' => false], 'xml'); $this->assertEquals($expectedXml, $actualXml); } @@ -663,7 +663,7 @@ XML; { $xmlEncoder = $this->createXmlEncoderWithDateTimeNormalizer(); - $actualXml = $xmlEncoder->encode(array('dateTime' => new \DateTime($this->exampleDateTimeString)), 'xml'); + $actualXml = $xmlEncoder->encode(['dateTime' => new \DateTime($this->exampleDateTimeString)], 'xml'); $this->assertEquals($this->createXmlWithDateTime(), $actualXml); } @@ -672,7 +672,7 @@ XML; { $xmlEncoder = $this->createXmlEncoderWithDateTimeNormalizer(); - $actualXml = $xmlEncoder->encode(array('foo' => array('@dateTime' => new \DateTime($this->exampleDateTimeString))), 'xml'); + $actualXml = $xmlEncoder->encode(['foo' => ['@dateTime' => new \DateTime($this->exampleDateTimeString)]], 'xml'); $this->assertEquals($this->createXmlWithDateTimeField(), $actualXml); } @@ -683,7 +683,7 @@ XML; private function createXmlEncoderWithDateTimeNormalizer() { $encoder = new XmlEncoder(); - $serializer = new Serializer(array($this->createMockDateTimeNormalizer()), array('xml' => new XmlEncoder())); + $serializer = new Serializer([$this->createMockDateTimeNormalizer()], ['xml' => new XmlEncoder()]); $encoder->setSerializer($serializer); return $encoder; @@ -699,7 +699,7 @@ XML; $mock ->expects($this->once()) ->method('normalize') - ->with(new \DateTime($this->exampleDateTimeString), 'xml', array()) + ->with(new \DateTime($this->exampleDateTimeString), 'xml', []) ->willReturn($this->exampleDateTimeString); $mock diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/YamlEncoderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/YamlEncoderTest.php index d08272df..9936ecb8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/YamlEncoderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/YamlEncoderTest.php @@ -27,7 +27,7 @@ class YamlEncoderTest extends TestCase $encoder = new YamlEncoder(); $this->assertEquals('foo', $encoder->encode('foo', 'yaml')); - $this->assertEquals('{ foo: 1 }', $encoder->encode(array('foo' => 1), 'yaml')); + $this->assertEquals('{ foo: 1 }', $encoder->encode(['foo' => 1], 'yaml')); } public function testSupportsEncoding() @@ -43,7 +43,7 @@ class YamlEncoderTest extends TestCase $encoder = new YamlEncoder(); $this->assertEquals('foo', $encoder->decode('foo', 'yaml')); - $this->assertEquals(array('foo' => 1), $encoder->decode('{ foo: 1 }', 'yaml')); + $this->assertEquals(['foo' => 1], $encoder->decode('{ foo: 1 }', 'yaml')); } public function testSupportsDecoding() @@ -56,16 +56,16 @@ class YamlEncoderTest extends TestCase public function testContext() { - $encoder = new YamlEncoder(new Dumper(), new Parser(), array('yaml_inline' => 1, 'yaml_indent' => 4, 'yaml_flags' => Yaml::DUMP_OBJECT | Yaml::PARSE_OBJECT)); + $encoder = new YamlEncoder(new Dumper(), new Parser(), ['yaml_inline' => 1, 'yaml_indent' => 4, 'yaml_flags' => Yaml::DUMP_OBJECT | Yaml::PARSE_OBJECT]); $obj = new \stdClass(); $obj->bar = 2; $legacyTag = " foo: !php/object:O:8:\"stdClass\":1:{s:3:\"bar\";i:2;}\n"; $spacedTag = " foo: !php/object 'O:8:\"stdClass\":1:{s:3:\"bar\";i:2;}'\n"; - $this->assertThat($encoder->encode(array('foo' => $obj), 'yaml'), $this->logicalOr($this->equalTo($legacyTag), $this->equalTo($spacedTag))); - $this->assertEquals(' { foo: null }', $encoder->encode(array('foo' => $obj), 'yaml', array('yaml_inline' => 0, 'yaml_indent' => 2, 'yaml_flags' => 0))); - $this->assertEquals(array('foo' => $obj), $encoder->decode("foo: !php/object 'O:8:\"stdClass\":1:{s:3:\"bar\";i:2;}'", 'yaml')); - $this->assertEquals(array('foo' => null), $encoder->decode("foo: !php/object 'O:8:\"stdClass\":1:{s:3:\"bar\";i:2;}'", 'yaml', array('yaml_flags' => 0))); + $this->assertThat($encoder->encode(['foo' => $obj], 'yaml'), $this->logicalOr($this->equalTo($legacyTag), $this->equalTo($spacedTag))); + $this->assertEquals(' { foo: null }', $encoder->encode(['foo' => $obj], 'yaml', ['yaml_inline' => 0, 'yaml_indent' => 2, 'yaml_flags' => 0])); + $this->assertEquals(['foo' => $obj], $encoder->decode("foo: !php/object 'O:8:\"stdClass\":1:{s:3:\"bar\";i:2;}'", 'yaml')); + $this->assertEquals(['foo' => null], $encoder->decode("foo: !php/object 'O:8:\"stdClass\":1:{s:3:\"bar\";i:2;}'", 'yaml', ['yaml_flags' => 0])); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/AbstractNormalizerDummy.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/AbstractNormalizerDummy.php index 27b2f24f..f576a241 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/AbstractNormalizerDummy.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/AbstractNormalizerDummy.php @@ -31,7 +31,7 @@ class AbstractNormalizerDummy extends AbstractNormalizer /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = array()) + public function normalize($object, $format = null, array $context = []) { } @@ -46,7 +46,7 @@ class AbstractNormalizerDummy extends AbstractNormalizer /** * {@inheritdoc} */ - public function denormalize($data, $class, $format = null, array $context = array()) + public function denormalize($data, $class, $format = null, array $context = []) { } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php index d78f34a3..ded194ba 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php @@ -16,7 +16,7 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; class DenormalizableDummy implements DenormalizableInterface { - public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()) + public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = []) { } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/Dummy.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/Dummy.php index 3f458255..bb734ddc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/Dummy.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/Dummy.php @@ -23,17 +23,17 @@ class Dummy implements NormalizableInterface, DenormalizableInterface public $baz; public $qux; - public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()) + public function normalize(NormalizerInterface $normalizer, $format = null, array $context = []) { - return array( + return [ 'foo' => $this->foo, 'bar' => $this->bar, 'baz' => $this->baz, 'qux' => $this->qux, - ); + ]; } - public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()) + public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = []) { $this->foo = $data['foo']; $this->bar = $data['bar']; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/JsonSerializableDummy.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/JsonSerializableDummy.php index 6d89890b..958200fd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/JsonSerializableDummy.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/JsonSerializableDummy.php @@ -15,11 +15,11 @@ class JsonSerializableDummy implements \JsonSerializable { public function jsonSerialize() { - return array( + return [ 'foo' => 'a', 'bar' => 'b', 'baz' => 'c', 'qux' => $this, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.php index a786fa1c..2ce2adff 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.php @@ -18,19 +18,19 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; class NormalizableTraversableDummy extends TraversableDummy implements NormalizableInterface, DenormalizableInterface { - public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()) + public function normalize(NormalizerInterface $normalizer, $format = null, array $context = []) { - return array( + return [ 'foo' => 'normalizedFoo', 'bar' => 'normalizedBar', - ); + ]; } - public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()) + public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = []) { - return array( + return [ 'foo' => 'denormalizedFoo', 'bar' => 'denormalizedBar', - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/ScalarDummy.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/ScalarDummy.php index fb45e12c..438a902e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/ScalarDummy.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/ScalarDummy.php @@ -21,12 +21,12 @@ class ScalarDummy implements NormalizableInterface, DenormalizableInterface public $foo; public $xmlFoo; - public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()) + public function normalize(NormalizerInterface $normalizer, $format = null, array $context = []) { return 'xml' === $format ? $this->xmlFoo : $this->foo; } - public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()) + public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = []) { if ('xml' === $format) { $this->xmlFoo = $data; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/AttributeMetadataTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/AttributeMetadataTest.php index 16ebcb1a..622a35ee 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/AttributeMetadataTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/AttributeMetadataTest.php @@ -38,7 +38,7 @@ class AttributeMetadataTest extends TestCase $attributeMetadata->addGroup('a'); $attributeMetadata->addGroup('b'); - $this->assertEquals(array('a', 'b'), $attributeMetadata->getGroups()); + $this->assertEquals(['a', 'b'], $attributeMetadata->getGroups()); } public function testMaxDepth() @@ -62,7 +62,7 @@ class AttributeMetadataTest extends TestCase $attributeMetadata1->merge($attributeMetadata2); - $this->assertEquals(array('a', 'b', 'c'), $attributeMetadata1->getGroups()); + $this->assertEquals(['a', 'b', 'c'], $attributeMetadata1->getGroups()); $this->assertEquals(2, $attributeMetadata1->getMaxDepth()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/ClassMetadataTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/ClassMetadataTest.php index f2db1c51..636d8a8a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/ClassMetadataTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/ClassMetadataTest.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Serializer\Tests\Mapping; use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Mapping\AttributeMetadata; use Symfony\Component\Serializer\Mapping\ClassMetadata; /** @@ -29,16 +30,13 @@ class ClassMetadataTest extends TestCase { $classMetadata = new ClassMetadata('c'); - $a1 = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface')->getMock(); - $a1->method('getName')->willReturn('a1'); - - $a2 = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface')->getMock(); - $a2->method('getName')->willReturn('a2'); + $a1 = new AttributeMetadata('a1'); + $a2 = new AttributeMetadata('a2'); $classMetadata->addAttributeMetadata($a1); $classMetadata->addAttributeMetadata($a2); - $this->assertEquals(array('a1' => $a1, 'a2' => $a2), $classMetadata->getAttributesMetadata()); + $this->assertEquals(['a1' => $a1, 'a2' => $a2], $classMetadata->getAttributesMetadata()); } public function testMerge() @@ -46,33 +44,28 @@ class ClassMetadataTest extends TestCase $classMetadata1 = new ClassMetadata('c1'); $classMetadata2 = new ClassMetadata('c2'); - $ac1 = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface')->getMock(); - $ac1->method('getName')->willReturn('a1'); - $ac1->method('getGroups')->willReturn(array('a', 'b')); - - $ac2 = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface')->getMock(); - $ac2->method('getName')->willReturn('a1'); - $ac2->method('getGroups')->willReturn(array('b', 'c')); + $ac1 = new AttributeMetadata('a1'); + $ac1->addGroup('a'); + $ac1->addGroup('b'); + $ac2 = new AttributeMetadata('a1'); + $ac2->addGroup('b'); + $ac2->addGroup('c'); $classMetadata1->addAttributeMetadata($ac1); $classMetadata2->addAttributeMetadata($ac2); $classMetadata1->merge($classMetadata2); - $ac1->method('getGroups')->willReturn('a', 'b', 'c'); - - $this->assertEquals(array('a1' => $ac1), $classMetadata2->getAttributesMetadata()); + $this->assertSame(['a', 'b', 'c'], $ac1->getGroups()); + $this->assertEquals(['a1' => $ac1], $classMetadata1->getAttributesMetadata()); } public function testSerialize() { $classMetadata = new ClassMetadata('a'); - $a1 = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface')->getMock(); - $a1->method('getName')->willReturn('b1'); - - $a2 = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface')->getMock(); - $a2->method('getName')->willReturn('b2'); + $a1 = new AttributeMetadata('b1'); + $a2 = new AttributeMetadata('b2'); $classMetadata->addAttributeMetadata($a1); $classMetadata->addAttributeMetadata($a2); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Factory/ClassMetadataFactoryTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Factory/ClassMetadataFactoryTest.php index 903cc04d..3d2aaa4c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Factory/ClassMetadataFactoryTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Factory/ClassMetadataFactoryTest.php @@ -25,7 +25,7 @@ class ClassMetadataFactoryTest extends TestCase { public function testInterface() { - $classMetadata = new ClassMetadataFactory(new LoaderChain(array())); + $classMetadata = new ClassMetadataFactory(new LoaderChain([])); $this->assertInstanceOf('Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface', $classMetadata); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php index b0dec518..4847004c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php @@ -45,13 +45,13 @@ class CamelCaseToSnakeCaseNameConverterTest extends TestCase public function attributeProvider() { - return array( - array('coop_tilleuls', 'coopTilleuls', true), - array('_kevin_dunglas', '_kevinDunglas', true), - array('this_is_a_test', 'thisIsATest', true), - array('coop_tilleuls', 'CoopTilleuls', false), - array('_kevin_dunglas', '_kevinDunglas', false), - array('this_is_a_test', 'ThisIsATest', false), - ); + return [ + ['coop_tilleuls', 'coopTilleuls', true], + ['_kevin_dunglas', '_kevinDunglas', true], + ['this_is_a_test', 'thisIsATest', true], + ['coop_tilleuls', 'CoopTilleuls', false], + ['_kevin_dunglas', '_kevinDunglas', false], + ['this_is_a_test', 'ThisIsATest', false], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php index 28edc058..890cb270 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php @@ -33,8 +33,8 @@ class AbstractNormalizerTest extends TestCase protected function setUp() { - $loader = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\Loader\LoaderChain')->setConstructorArgs(array(array()))->getMock(); - $this->classMetadata = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory')->setConstructorArgs(array($loader))->getMock(); + $loader = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\Loader\LoaderChain')->setConstructorArgs([[]])->getMock(); + $this->classMetadata = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory')->setConstructorArgs([$loader])->getMock(); $this->normalizer = new AbstractNormalizerDummy($this->classMetadata); } @@ -60,11 +60,11 @@ class AbstractNormalizerTest extends TestCase $this->classMetadata->method('getMetadataFor')->willReturn($classMetadata); - $result = $this->normalizer->getAllowedAttributes('c', array(AbstractNormalizer::GROUPS => array('test')), true); - $this->assertEquals(array('a2', 'a4'), $result); + $result = $this->normalizer->getAllowedAttributes('c', [AbstractNormalizer::GROUPS => ['test']], true); + $this->assertEquals(['a2', 'a4'], $result); - $result = $this->normalizer->getAllowedAttributes('c', array(AbstractNormalizer::GROUPS => array('other')), true); - $this->assertEquals(array('a3', 'a4'), $result); + $result = $this->normalizer->getAllowedAttributes('c', [AbstractNormalizer::GROUPS => ['other']], true); + $this->assertEquals(['a3', 'a4'], $result); } public function testGetAllowedAttributesAsObjects() @@ -89,21 +89,21 @@ class AbstractNormalizerTest extends TestCase $this->classMetadata->method('getMetadataFor')->willReturn($classMetadata); - $result = $this->normalizer->getAllowedAttributes('c', array(AbstractNormalizer::GROUPS => array('test')), false); - $this->assertEquals(array($a2, $a4), $result); + $result = $this->normalizer->getAllowedAttributes('c', [AbstractNormalizer::GROUPS => ['test']], false); + $this->assertEquals([$a2, $a4], $result); - $result = $this->normalizer->getAllowedAttributes('c', array(AbstractNormalizer::GROUPS => array('other')), false); - $this->assertEquals(array($a3, $a4), $result); + $result = $this->normalizer->getAllowedAttributes('c', [AbstractNormalizer::GROUPS => ['other']], false); + $this->assertEquals([$a3, $a4], $result); } public function testObjectToPopulateWithProxy() { $proxyDummy = new ProxyDummy(); - $context = array(AbstractNormalizer::OBJECT_TO_POPULATE => $proxyDummy); + $context = [AbstractNormalizer::OBJECT_TO_POPULATE => $proxyDummy]; $normalizer = new ObjectNormalizer(); - $normalizer->denormalize(array('foo' => 'bar'), 'Symfony\Component\Serializer\Tests\Fixtures\ToBeProxyfiedDummy', null, $context); + $normalizer->denormalize(['foo' => 'bar'], 'Symfony\Component\Serializer\Tests\Fixtures\ToBeProxyfiedDummy', null, $context); $this->assertSame('bar', $proxyDummy->getFoo()); } @@ -111,7 +111,7 @@ class AbstractNormalizerTest extends TestCase public function testObjectWithStaticConstructor() { $normalizer = new StaticConstructorNormalizer(); - $dummy = $normalizer->denormalize(array('foo' => 'baz'), StaticConstructorDummy::class); + $dummy = $normalizer->denormalize(['foo' => 'baz'], StaticConstructorDummy::class); $this->assertInstanceOf(StaticConstructorDummy::class, $dummy); $this->assertEquals('baz', $dummy->quz); @@ -124,7 +124,7 @@ class AbstractNormalizerTest extends TestCase public function testObjectWithNullableConstructorArgument() { $normalizer = new ObjectNormalizer(); - $dummy = $normalizer->denormalize(array('foo' => null), NullableConstructorArgumentDummy::class); + $dummy = $normalizer->denormalize(['foo' => null], NullableConstructorArgumentDummy::class); $this->assertNull($dummy->getFoo()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php index 73ccf689..6155cc3e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php @@ -29,7 +29,7 @@ class AbstractObjectNormalizerTest extends TestCase public function testDenormalize() { $normalizer = new AbstractObjectNormalizerDummy(); - $normalizedData = $normalizer->denormalize(array('foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz'), __NAMESPACE__.'\Dummy'); + $normalizedData = $normalizer->denormalize(['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz'], __NAMESPACE__.'\Dummy'); $this->assertSame('foo', $normalizedData->foo); $this->assertNull($normalizedData->bar); @@ -38,13 +38,13 @@ class AbstractObjectNormalizerTest extends TestCase public function testInstantiateObjectDenormalizer() { - $data = array('foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz'); + $data = ['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz']; $class = __NAMESPACE__.'\Dummy'; - $context = array(); + $context = []; $normalizer = new AbstractObjectNormalizerDummy(); - $this->assertInstanceOf(__NAMESPACE__.'\Dummy', $normalizer->instantiateObject($data, $class, $context, new \ReflectionClass($class), array())); + $this->assertInstanceOf(__NAMESPACE__.'\Dummy', $normalizer->instantiateObject($data, $class, $context, new \ReflectionClass($class), [])); } /** @@ -56,10 +56,10 @@ class AbstractObjectNormalizerTest extends TestCase $factory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); $normalizer = new AbstractObjectNormalizerDummy($factory); $normalizer->denormalize( - array('fooFoo' => 'foo', 'fooBar' => 'bar'), + ['fooFoo' => 'foo', 'fooBar' => 'bar'], __NAMESPACE__.'\Dummy', 'any', - array('allow_extra_attributes' => false) + ['allow_extra_attributes' => false] ); } @@ -71,10 +71,10 @@ class AbstractObjectNormalizerTest extends TestCase { $normalizer = new AbstractObjectNormalizerWithMetadata(); $normalizer->denormalize( - array('fooFoo' => 'foo', 'fooBar' => 'bar', 'bar' => 'bar'), + ['fooFoo' => 'foo', 'fooBar' => 'bar', 'bar' => 'bar'], Dummy::class, 'any', - array('allow_extra_attributes' => false) + ['allow_extra_attributes' => false] ); } @@ -83,11 +83,11 @@ class AbstractObjectNormalizerTest extends TestCase $denormalizer = $this->getDenormalizerForDummyCollection(); $dummyCollection = $denormalizer->denormalize( - array( - 'children' => array( + [ + 'children' => [ 'bar' => 'first', - ), - ), + ], + ], DummyCollection::class, 'xml' ); @@ -103,12 +103,12 @@ class AbstractObjectNormalizerTest extends TestCase $denormalizer = $this->getDenormalizerForDummyCollection(); $dummyCollection = $denormalizer->denormalize( - array( - 'children' => array( - array('bar' => 'first'), - array('bar' => 'second'), - ), - ), + [ + 'children' => [ + ['bar' => 'first'], + ['bar' => 'second'], + ], + ], DummyCollection::class, 'xml' ); @@ -125,7 +125,7 @@ class AbstractObjectNormalizerTest extends TestCase $extractor = $this->getMockBuilder(PhpDocExtractor::class)->getMock(); $extractor->method('getTypes') ->will($this->onConsecutiveCalls( - array( + [ new Type( 'array', false, @@ -134,13 +134,13 @@ class AbstractObjectNormalizerTest extends TestCase new Type('int'), new Type('object', false, DummyChild::class) ), - ), + ], null )); $denormalizer = new AbstractObjectNormalizerCollectionDummy(null, null, $extractor); $arrayDenormalizer = new ArrayDenormalizerDummy(); - $serializer = new SerializerCollectionDummy(array($arrayDenormalizer, $denormalizer)); + $serializer = new SerializerCollectionDummy([$arrayDenormalizer, $denormalizer]); $arrayDenormalizer->setSerializer($serializer); $denormalizer->setSerializer($serializer); @@ -157,30 +157,30 @@ class AbstractObjectNormalizerTest extends TestCase { $normalizer = new ObjectNormalizer(); - $normalizer->denormalize(array(), \stdClass::class, 'xml', array( + $normalizer->denormalize([], \stdClass::class, 'xml', [ 'allow_extra_attributes' => false, - )); + ]); } } class AbstractObjectNormalizerDummy extends AbstractObjectNormalizer { - protected function extractAttributes($object, $format = null, array $context = array()) + protected function extractAttributes($object, $format = null, array $context = []) { } - protected function getAttributeValue($object, $attribute, $format = null, array $context = array()) + protected function getAttributeValue($object, $attribute, $format = null, array $context = []) { } - protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = array()) + protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = []) { $object->$attribute = $value; } - protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = array()) + protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = []) { - return \in_array($attribute, array('foo', 'baz')); + return \in_array($attribute, ['foo', 'baz']); } public function instantiateObject(array &$data, $class, array &$context, \ReflectionClass $reflectionClass, $allowedAttributes, $format = null) @@ -203,15 +203,15 @@ class AbstractObjectNormalizerWithMetadata extends AbstractObjectNormalizer parent::__construct(new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()))); } - protected function extractAttributes($object, $format = null, array $context = array()) + protected function extractAttributes($object, $format = null, array $context = []) { } - protected function getAttributeValue($object, $attribute, $format = null, array $context = array()) + protected function getAttributeValue($object, $attribute, $format = null, array $context = []) { } - protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = array()) + protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = []) { $object->$attribute = $value; } @@ -240,15 +240,15 @@ class SerializerCollectionDummy implements SerializerInterface, DenormalizerInte $this->normalizers = $normalizers; } - public function serialize($data, $format, array $context = array()) + public function serialize($data, $format, array $context = []) { } - public function deserialize($data, $type, $format, array $context = array()) + public function deserialize($data, $type, $format, array $context = []) { } - public function denormalize($data, $type, $format = null, array $context = array()) + public function denormalize($data, $type, $format = null, array $context = []) { foreach ($this->normalizers as $normalizer) { if ($normalizer instanceof DenormalizerInterface && $normalizer->supportsDenormalization($data, $type, $format, $context)) { @@ -265,20 +265,20 @@ class SerializerCollectionDummy implements SerializerInterface, DenormalizerInte class AbstractObjectNormalizerCollectionDummy extends AbstractObjectNormalizer { - protected function extractAttributes($object, $format = null, array $context = array()) + protected function extractAttributes($object, $format = null, array $context = []) { } - protected function getAttributeValue($object, $attribute, $format = null, array $context = array()) + protected function getAttributeValue($object, $attribute, $format = null, array $context = []) { } - protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = array()) + protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = []) { $object->$attribute = $value; } - protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = array()) + protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = []) { return true; } @@ -288,11 +288,11 @@ class AbstractObjectNormalizerCollectionDummy extends AbstractObjectNormalizer return parent::instantiateObject($data, $class, $context, $reflectionClass, $allowedAttributes, $format); } - public function serialize($data, $format, array $context = array()) + public function serialize($data, $format, array $context = []) { } - public function deserialize($data, $type, $format, array $context = array()) + public function deserialize($data, $type, $format, array $context = []) { } } @@ -309,7 +309,7 @@ class ArrayDenormalizerDummy implements DenormalizerInterface, SerializerAwareIn * * @throws NotNormalizableValueException */ - public function denormalize($data, $class, $format = null, array $context = array()) + public function denormalize($data, $class, $format = null, array $context = []) { $serializer = $this->serializer; $class = substr($class, 0, -2); @@ -324,7 +324,7 @@ class ArrayDenormalizerDummy implements DenormalizerInterface, SerializerAwareIn /** * {@inheritdoc} */ - public function supportsDenormalization($data, $type, $format = null, array $context = array()) + public function supportsDenormalization($data, $type, $format = null, array $context = []) { return '[]' === substr($type, -2) && $this->serializer->supportsDenormalization($data, substr($type, 0, -2), $format, $context); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ArrayDenormalizerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ArrayDenormalizerTest.php index e5876a04..fd456cb9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ArrayDenormalizerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ArrayDenormalizerTest.php @@ -38,27 +38,27 @@ class ArrayDenormalizerTest extends TestCase { $this->serializer->expects($this->at(0)) ->method('denormalize') - ->with(array('foo' => 'one', 'bar' => 'two')) + ->with(['foo' => 'one', 'bar' => 'two']) ->will($this->returnValue(new ArrayDummy('one', 'two'))); $this->serializer->expects($this->at(1)) ->method('denormalize') - ->with(array('foo' => 'three', 'bar' => 'four')) + ->with(['foo' => 'three', 'bar' => 'four']) ->will($this->returnValue(new ArrayDummy('three', 'four'))); $result = $this->denormalizer->denormalize( - array( - array('foo' => 'one', 'bar' => 'two'), - array('foo' => 'three', 'bar' => 'four'), - ), + [ + ['foo' => 'one', 'bar' => 'two'], + ['foo' => 'three', 'bar' => 'four'], + ], __NAMESPACE__.'\ArrayDummy[]' ); $this->assertEquals( - array( + [ new ArrayDummy('one', 'two'), new ArrayDummy('three', 'four'), - ), + ], $result ); } @@ -72,10 +72,10 @@ class ArrayDenormalizerTest extends TestCase $this->assertTrue( $this->denormalizer->supportsDenormalization( - array( - array('foo' => 'one', 'bar' => 'two'), - array('foo' => 'three', 'bar' => 'four'), - ), + [ + ['foo' => 'one', 'bar' => 'two'], + ['foo' => 'three', 'bar' => 'four'], + ], __NAMESPACE__.'\ArrayDummy[]' ) ); @@ -89,10 +89,10 @@ class ArrayDenormalizerTest extends TestCase $this->assertFalse( $this->denormalizer->supportsDenormalization( - array( - array('foo' => 'one', 'bar' => 'two'), - array('foo' => 'three', 'bar' => 'four'), - ), + [ + ['foo' => 'one', 'bar' => 'two'], + ['foo' => 'three', 'bar' => 'four'], + ], __NAMESPACE__.'\InvalidClass[]' ) ); @@ -102,7 +102,7 @@ class ArrayDenormalizerTest extends TestCase { $this->assertFalse( $this->denormalizer->supportsDenormalization( - array('foo' => 'one', 'bar' => 'two'), + ['foo' => 'one', 'bar' => 'two'], __NAMESPACE__.'\ArrayDummy' ) ); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php index 55378c77..28fb73ec 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php @@ -59,9 +59,9 @@ class CustomNormalizerTest extends TestCase public function testDenormalizeWithObjectToPopulateUsesProvidedObject() { $expected = new ScalarDummy(); - $obj = $this->normalizer->denormalize('foo', ScalarDummy::class, 'json', array( + $obj = $this->normalizer->denormalize('foo', ScalarDummy::class, 'json', [ 'object_to_populate' => $expected, - )); + ]); $this->assertSame($expected, $obj); $this->assertEquals('foo', $obj->foo); @@ -76,8 +76,8 @@ class CustomNormalizerTest extends TestCase public function testSupportsDenormalization() { - $this->assertTrue($this->normalizer->supportsDenormalization(array(), 'Symfony\Component\Serializer\Tests\Fixtures\ScalarDummy')); - $this->assertFalse($this->normalizer->supportsDenormalization(array(), 'stdClass')); - $this->assertTrue($this->normalizer->supportsDenormalization(array(), 'Symfony\Component\Serializer\Tests\Fixtures\DenormalizableDummy')); + $this->assertTrue($this->normalizer->supportsDenormalization([], 'Symfony\Component\Serializer\Tests\Fixtures\ScalarDummy')); + $this->assertFalse($this->normalizer->supportsDenormalization([], 'stdClass')); + $this->assertTrue($this->normalizer->supportsDenormalization([], 'Symfony\Component\Serializer\Tests\Fixtures\DenormalizableDummy')); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php index d3ad2af8..e1f714b5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php @@ -131,19 +131,19 @@ class DataUriNormalizerTest extends TestCase public function invalidUriProvider() { - return array( - array('dataxbase64'), - array('data:HelloWorld'), - array('data:text/html;charset=,%3Ch1%3EHello!%3C%2Fh1%3E'), - array('data:text/html;charset,%3Ch1%3EHello!%3C%2Fh1%3E'), - array('data:base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC'), - array(''), - array('http://wikipedia.org'), - array('base64'), - array('iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC'), - array(' data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIBAMAAAA2IaO4AAAAFVBMVEXk5OTn5+ft7e319fX29vb5+fn///++GUmVAAAALUlEQVQIHWNICnYLZnALTgpmMGYIFWYIZTA2ZFAzTTFlSDFVMwVyQhmAwsYMAKDaBy0axX/iAAAAAElFTkSuQmCC'), - array(' data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIBAMAAAA2IaO4AAAAFVBMVEXk5OTn5+ft7e319fX29vb5+fn///++GUmVAAAALUlEQVQIHWNICnYLZnALTgpmMGYIFWYIZTA2ZFAzTTFlSDFVMwVyQhmAwsYMAKDaBy0axX/iAAAAAElFTkSuQmCC'), - ); + return [ + ['dataxbase64'], + ['data:HelloWorld'], + ['data:text/html;charset=,%3Ch1%3EHello!%3C%2Fh1%3E'], + ['data:text/html;charset,%3Ch1%3EHello!%3C%2Fh1%3E'], + ['data:base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC'], + [''], + ['http://wikipedia.org'], + ['base64'], + ['iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC'], + [' data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIBAMAAAA2IaO4AAAAFVBMVEXk5OTn5+ft7e319fX29vb5+fn///++GUmVAAAALUlEQVQIHWNICnYLZnALTgpmMGYIFWYIZTA2ZFAzTTFlSDFVMwVyQhmAwsYMAKDaBy0axX/iAAAAAElFTkSuQmCC'], + [' data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIBAMAAAA2IaO4AAAAFVBMVEXk5OTn5+ft7e319fX29vb5+fn///++GUmVAAAALUlEQVQIHWNICnYLZnALTgpmMGYIFWYIZTA2ZFAzTTFlSDFVMwVyQhmAwsYMAKDaBy0axX/iAAAAAElFTkSuQmCC'], + ]; } /** @@ -156,22 +156,22 @@ class DataUriNormalizerTest extends TestCase public function validUriProvider() { - $data = array( - array('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC'), - array('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIBAMAAAA2IaO4AAAAFVBMVEXk5OTn5+ft7e319fX29vb5+fn///++GUmVAAAALUlEQVQIHWNICnYLZnALTgpmMGYIFWYIZTA2ZFAzTTFlSDFVMwVyQhmAwsYMAKDaBy0axX/iAAAAAElFTkSuQmCC'), - array('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIBAMAAAA2IaO4AAAAFVBMVEXk5OTn5+ft7e319fX29vb5+fn///++GUmVAAAALUlEQVQIHWNICnYLZnALTgpmMGYIFWYIZTA2ZFAzTTFlSDFVMwVyQhmAwsYMAKDaBy0axX/iAAAAAElFTkSuQmCC '), - array('data:,Hello%2C%20World!'), - array('data:text/html,%3Ch1%3EHello%2C%20World!%3C%2Fh1%3E'), - array('data:,A%20brief%20note'), - array('data:text/html;charset=US-ASCII,%3Ch1%3EHello!%3C%2Fh1%3E'), - array('data:application/ld+json;base64,eyJAaWQiOiAiL2ZvbyJ9'), - array('data:application/vnd.ms-word.document.macroenabled.12;base64,UEsDBBQABgAIAAAAIQBnzQ+udAEAADoFAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC0lMtOwzAQRfdI/EPkLUrcskAINe0CyhIqUT7AtSepIX7Idl9/zzhpI1TRBFG6iZTM3HvPOJmMJltVJWtwXhqdk2E2IAloboTUZU7e58/pPUl8YFqwymjIyQ48mYyvr0bznQWfoFr7nCxDsA+Uer4ExXxmLGisFMYpFvDWldQy/slKoLeDwR3lRgfQIQ3Rg4xHT1CwVRWS6RYfNyQoJ8lj0xejcsKsrSRnAcs0VumPOgeV7xCutTiiS/dkGSrrHr+U1t+cTviwUB4lSBVHqwuoecXjdFJAMmMuvDCFDXRjnKDC8JVCUdY9XGRUPo2SrJUoxp2ZaraoAKtM6gPhyTQfdhX4X2QdnYcpCsmhDY5e1hkO3uM3oaqs8e2PhxBQcAmAvXMvwgYWbxej+GbeC1Jg7jy+uv/HaK17IQLuJjTX4dkctU1XJHbOnLEed939YezDUkZ1igNbcEF2f3VtIlqfPR/EfRcgfsim9Z9v/AUAAP//AwBQSwMEFAAGAAgAAAAhAMfCJ7z/AAAA3wIAAAsACAJfcmVscy8ucmVscyCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACsks1KAzEQgO+C7xDm3s22iog024sIvYmsDzAm093o5odkqu3bG0XUhWUR7HH+Pr5JZr05uEG8Uso2eAXLqgZBXgdjfafgsb1bXIPIjN7gEDwpOFKGTXN+tn6gAbkM5d7GLArFZwU9c7yRMuueHOYqRPKlsgvJIZcwdTKifsGO5Kqur2T6zYBmxBRboyBtzQWI9hjpf2zpiNEgo9Qh0SKmMp3Yll1Ei6kjVmCCvi/p/NlRFTLIaaHLvwuF3c5qug1678jzlBcdmLwhM6+EMc4ZLU9pNO74kXkLyUjzlZ6zWZ32w7jfuyePdph4l+9a9Ryp+xCSo7Ns3gEAAP//AwBQSwMEFAAGAAgAAAAhABOqPof2AAAAMQMAABwACAF3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzIKIEASigAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArJLLasMwEEX3hf6DmH0tO31QQuRsSiHb1v0ARR4/qCwJzfThv69oSOvQYLrw8l4x955Bs9l+Dla8Y6TeOwVFloNAZ3zdu1bBS/V4dQ+CWLtaW+9QwYgE2/LyYvOEVnMaoq4PJFKKIwUdc1hLSabDQVPmA7r00vg4aE4ytjJo86pblKs8v5NxmgHlSabY1Qrirr4GUY0B/5Ptm6Y3+ODN24COz1TID9w/I3NajlKsji2ygomZpUSQ50FulgRpvONK7y3+YvxYcxC3S0Jwmp0AfMuDWcwxFEsyEI8WJ59x0HP1q0Xr/1zD0TkiyJNDL78AAAD//wMAUEsDBBQABgAIAAAAIQAz6gHKYAIAAAIHAAARAAAAd29yZC9kb2N1bWVudC54bWykld1u2jAUx+8n7R2Q70sSCpRGQKVBh9A0qRrb9WQcJ7GIfSzbQLs32nPsxXacL7JNQ7QgFPt8+Of/sWNn+vAsi96BGytAzUjUD0mPKwaJUNmMfPv68WZCetZRldACFJ+RF27Jw/z9u+kxToDtJVeuhwhl46NmM5I7p+MgsCznktq+FMyAhdT1GcgA0lQwHhzBJMEgjMKypw0wbi3Ot6DqQC2pcRIuo0nKmu4gDCdoC9Uy/lUEmisMpmAkdWiaDEeY3V7fIFNTJ7aiEO7Fs8Yt5jAje6PimnHT6vBjYhQQH2TRJMO53Epo3TQjzCUiqyHLeslLeYHhBQoGZXOhT+v2VhoG8wZytuBOsUcdDa/b9KWhR2xOwEvkJ9UgWVTKzxOj8IId8Yh2xCUS/pyzUdJ9+Y5vW5rO4kaj1wEGfwN0dt3mrAzs9YkmrqOt1a5l+avkFax6k7ul2evEbHKq8QRKFq8zBYZuC1SEW9bDVe/515rM8YrbQvLiW43uYaypoetkRsLB8hb/Q1J6HX923ntX/9Ab43WafMHEcHQXLUaD1rXkKd0Xzkduw9FitChnMf7h5p9+/TwINQ183z9L9xZg5y+ojaPGIUb4+T1PUYmKv6/gA2U7EnRzH1XSZgYlSvuw5cw9mf+r22Dcex+j0eQ+LJXpbPMDo3gioug+LOfNsT+eDEuyT/hMPdIBHtxoGFXViyx3J3MLzoE82QVPO9Gc04TjFXgXTryZAriOme1dadbTMSgseq2mjFc5pRu/RCsjfNGFUPxJOIYqb8dN9VXhZbfa0OD08Zr/BgAA//8DAFBLAwQUAAYACAAAACEAJyDgAjMGAACMGgAAFQAAAHdvcmQvdGhlbWUvdGhlbWUxLnhtbOxZTYvbRhi+F/ofhO6OZVvyxxJvsGU7abObhOwmJcexNJYmO9KYmdHumhAoybFQKE1LDw301kJpG0igl/TUn7JtSptC/kJHI8uesccsaTawhNhgzcfzvvPM+848I1kXLx0n2DqElCGSdu3aBce2YBqQEKVR1761P6q0bYtxkIYAkxR27Rlk9qXtDz+4CLZ4DBNoCfuUbYGuHXM+3apWWSCaAbtApjAVfRNCE8BFlUbVkIIj4TfB1brjNKsJQKltpSARbvfj338Qzq5PJiiA9nbpfYjFT8pZ3hBgupf7hnOTfkYhyCQ2PKjlFzZjPqbWIcBdWwwUkqN9eMxtCwPGRUfXduTHrm5frC6MMN9gq9iN5GduNzcID+rSjkbjhaHrem6zt/AvAZiv44atYXPYXPiTABAEYqYFFxXr9Tv9gTfHKqCiaPA9aA0aNQ2v+G+s4Xte/tXwElQU3TX8aOQvY6iAiqJniEmr7rsaXoKKYnMN33J6A7el4SUoxig9WEM7XrPhl7NdQCYEXzHCO547atXn8CWqqqyuwj7lm9ZaAu4SOhIAmVzAUWrx2RROQCBwPsBoTJG1g6JYLLwpSAkTzU7dGTkN8Zt/XVmSEQFbECjWRVPA1ppyPhYLKJryrv2x8GorkFfPf3r1/Kl18uDZyYNfTx4+PHnwi8HqCkgj1erl91/8+/hT65+n37189JUZz1T8nz9/9sdvX5qBXAW++PrJX8+evPjm879/fGSA9ygYq/B9lEBmXYNH1k2SiIkZBoBj+noW+zFAqkUvjRhIQW5jQA95rKGvzQAGBlwf6hG8TYVMmICXs7sa4b2YZhwZgFfjRAPuEoL7hBrndDUfS41ClkbmwWmm4m4CcGga21/J7zCbivWOTC79GGo0b2CRchDBFHIr7yMHEBrM7iCkxXUXBZQwMuHWHWT1ATKGZB+NtdW0NLqCEpGXmYmgyLcWm93bVp9gk/sBPNSRYlcAbHIJsRbGyyDjIDEyBglWkTuAxyaSezMaaAFnXGQ6gphYwxAyZrK5Tmca3atCXsxp38WzREdSjg5MyB1AiIockAM/BsnUyBmlsYr9iB2IJQqsG4QbSRB9h+R1kQeQbkz3bQS1dJ++t28JZTUvkLwno6YtAYm+H2d4AqB0Xl3R8wSlp4r7iqx7b1fWhZC++PaxWXfPpaD3KDLuqFUZ34RbFW+f0BCdf+0egCy9AcV2MUDfS/d76X7npXvTfj57wV5qtLyJL2/VpZtk4337BGG8x2cY7jCp7kxMLxyJRlmRRovHhGksivPhNFxEgSxblPBPEI/3YjAVw9TkCBGbu46YNSVMnA+y2eg778BZskvCorVWK59MhQHgy3ZxvpTt4jTiRWuztXwEW7iXtUg+KpcEctvXIaEMppNoGEi0ysZTSMiZnQmLjoFFO3e/kYW8zLMi9p8F8n81PLdgJNYbwDDM81TYl9k980xvCqY+7bphep2c69lkWiOhLDedhLIMYxDC1eYzznVnmVKNXh6KdRqt9tvIdS4iK9qAU71mHYk91/CEmwBMu/ZE3BmKYjIV/liumwBHadcO+DzQ/0dZppTxAWBxAZNdxfwTxCG1MErEWlfTgNMlt1q9lc/xnJLrOOcvcvKiJhlOJjDgG1qWVdFXODH2viE4r5BMkN6LwyNrjDN6E4hAea1aHsAQMb6IZoiosriXUVyRq/lW1P4xW25RgKcxmJ8oqpgXcFle0FHmIZmuzkqvzyczjvIkvfGpe7pR3qGI5oYDJD81zfrx9g55hdVS9zVWhXSval2n1LpNp8SbHwgKteVgGrWcsYHaslWndoY3BMpwi6W56Yw469NgddXmB0R5Xylra68myPiuWPkDcbuaYc4kVXgsnhH88k/lQglka6kux9zKKOra9xyv5/p1z684bW9YcRuuU2l7vUal53mN2tCrOYN+/b4ICo+TmleMPRLPM3g2f/Ui29devyTlbfaFgCRVIt+rVKWxfP1Sq2uvX4r3LtZ+3m9bSETmXrM+6jQ6/Wal0+iNKu6g3650/Ga/Mmj6rcFo4Hvtzui+bR1KsNtr+G5z2K40a75fcZtOTr/dqbTcer3ntnrtodu7P4+1mHl5LcMreW3/BwAA//8DAFBLAwQKAAAAAAAAACEAahPYDYwlAACMJQAAFwAAAGRvY1Byb3BzL3RodW1ibmFpbC5qcGVn/9j/4AAQSkZJRgABAQAASABIAAD/4QCARXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAIdpAAQAAAABAAAATgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAWmgAwAEAAAAAQAAAgAAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAgABaQMBEQACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/3QAEAC7/2gAMAwEAAhEDEQA/AP7Yfgx8GPg9N8HvhRLL8KPhrLLL8NfAskkkngTws8kkj+F9LZ3d200s7uxLMzHczEk5JNAHpX/ClPg3/wBEl+GX/hBeFf8A5W0AH/ClPg3/ANEl+GX/AIQXhX/5W0AH/ClPg3/0SX4Zf+EF4V/+VtAB/wAKU+Df/RJfhl/4QXhX/wCVtAB/wpT4N/8ARJfhl/4QXhX/AOVtAB/wpT4N/wDRJfhl/wCEF4V/+VtAB/wpT4N/9El+GX/hBeFf/lbQAf8AClPg3/0SX4Zf+EF4V/8AlbQAf8KU+Df/AESX4Zf+EF4V/wDlbQAf8KU+Df8A0SX4Zf8AhBeFf/lbQAf8KU+Df/RJfhl/4QXhX/5W0AH/AApT4N/9El+GX/hBeFf/AJW0AH/ClPg3/wBEl+GX/hBeFf8A5W0AH/ClPg3/ANEl+GX/AIQXhX/5W0AH/ClPg3/0SX4Zf+EF4V/+VtAB/wAKU+Df/RJfhl/4QXhX/wCVtAB/wpT4N/8ARJfhl/4QXhX/AOVtAB/wpT4N/wDRJfhl/wCEF4V/+VtAB/wpT4N/9El+GX/hBeFf/lbQAf8AClPg3/0SX4Zf+EF4V/8AlbQAf8KU+Df/AESX4Zf+EF4V/wDlbQAf8KU+Df8A0SX4Zf8AhBeFf/lbQAf8KU+Df/RJfhl/4QXhX/5W0AH/AApT4N/9El+GX/hBeFf/AJW0AH/ClPg3/wBEl+GX/hBeFf8A5W0AH/ClPg3/ANEl+GX/AIQXhX/5W0AH/ClPg3/0SX4Zf+EF4V/+VtAB/wAKU+Df/RJfhl/4QXhX/wCVtAB/wpT4N/8ARJfhl/4QXhX/AOVtAB/wpT4N/wDRJfhl/wCEF4V/+VtAB/wpT4N/9El+GX/hBeFf/lbQAf8AClPg3/0SX4Zf+EF4V/8AlbQAf8KU+Df/AESX4Zf+EF4V/wDlbQAf8KU+Df8A0SX4Zf8AhBeFf/lbQAf8KU+Df/RJfhl/4QXhX/5W0AH/AApT4N/9El+GX/hBeFf/AJW0AH/ClPg3/wBEl+GX/hBeFf8A5W0AH/ClPg3/ANEl+GX/AIQXhX/5W0AH/ClPg3/0SX4Zf+EF4V/+VtAB/wAKU+Df/RJfhl/4QXhX/wCVtAB/wpT4N/8ARJfhl/4QXhX/AOVtAB/wpT4N/wDRJfhl/wCEF4V/+VtAB/wpT4N/9El+GX/hBeFf/lbQAf8AClPg3/0SX4Zf+EF4V/8AlbQB/Nd/wrT4c/8ARP8AwT/4Sug//INAH//Q/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9H+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/T/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9T+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAfP3j79pv4T/DT4n6P8IvFmr3Vj4w1jwRqvxN2GC3TSNH+G3hs6v/AMJj8QPEmsXV5a2Xh3wZ4JTSB/wlPiPVnttK0+81vwpokdxc+IPFfh/SdQAMPQ/2v/gXr2heH9WtvFlrZ6n4g8X6B4Gi8GatfaFpnjPS/Eev+N2+HyafrmjXWsxx6bdaV4lg1DTtasZbxtUstX0rUvCS6fP45gXwu4B6v8L/AIufDX40+GR4x+FfjDSPG3hk3ENqNW0eSZoPNu9I0rxFp7GO5ht7hbfV/DevaD4m0O7aL7LrnhjXtC8SaRPe6JrOmX10AejUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/1f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQB4L8Vv2YvgX8b9UbWvij4Ct/FWqP4Yv/BbXsut+JtKlPhTV9K8WaFrWgf8SPWdMT+zNd0Lx14t0TXrbAXW9H1y70zVftliILeIA4/Rv2Jv2Y9AvvDuqaX8Mkg1Pwr4a8O+D9Dv5PF3ju6u7Xw74T+M9h+0J4e06aW68TzG/GnfGDTLTxglzqH2q7mKS6FczzeGbm50eUA9j+Gfwk+Hvwd0e80D4c+H/wDhHdJv5PDUl3a/2rrerec/hD4eeCvhT4dbz9c1LU7lP7O8A/DvwdoOI5lF3/Y/9qX32nWdQ1PUb0A9HoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoA/mXoA/9b+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1/7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/Q/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9H+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/T/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9T+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/W/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9f+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0P7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/R/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9L+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0/7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/U/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9X+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/X/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9D+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/S/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9P+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1P7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/V/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9b+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1/7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/Q/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9H+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/T/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9T+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/W/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9f+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0P7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/R/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9L+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0/7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/U/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9X+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/X/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9D+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/S/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9P+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1P7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/V/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9b+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1/7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/Q/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9H+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/T/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9T+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/W/th+DHxn+D0Pwe+FEUvxX+GsUsXw18CxyRyeO/CySRyJ4X0tXR0bUgyOjAqysNysCDgg0Aelf8Lr+Df/AEVr4Zf+F74V/wDllQAf8Lr+Df8A0Vr4Zf8Ahe+Ff/llQAf8Lr+Df/RWvhl/4XvhX/5ZUAH/AAuv4N/9Fa+GX/he+Ff/AJZUAH/C6/g3/wBFa+GX/he+Ff8A5ZUAH/C6/g3/ANFa+GX/AIXvhX/5ZUAH/C6/g3/0Vr4Zf+F74V/+WVAB/wALr+Df/RWvhl/4XvhX/wCWVAB/wuv4N/8ARWvhl/4XvhX/AOWVAB/wuv4N/wDRWvhl/wCF74V/+WVAB/wuv4N/9Fa+GX/he+Ff/llQAf8AC6/g3/0Vr4Zf+F74V/8AllQAf8Lr+Df/AEVr4Zf+F74V/wDllQAf8Lr+Df8A0Vr4Zf8Ahe+Ff/llQAf8Lr+Df/RWvhl/4XvhX/5ZUAH/AAuv4N/9Fa+GX/he+Ff/AJZUAH/C6/g3/wBFa+GX/he+Ff8A5ZUAH/C6/g3/ANFa+GX/AIXvhX/5ZUAH/C6/g3/0Vr4Zf+F74V/+WVAB/wALr+Df/RWvhl/4XvhX/wCWVAB/wuv4N/8ARWvhl/4XvhX/AOWVAB/wuv4N/wDRWvhl/wCF74V/+WVAB/wuv4N/9Fa+GX/he+Ff/llQAf8AC6/g3/0Vr4Zf+F74V/8AllQAf8Lr+Df/AEVr4Zf+F74V/wDllQAf8Lr+Df8A0Vr4Zf8Ahe+Ff/llQAf8Lr+Df/RWvhl/4XvhX/5ZUAH/AAuv4N/9Fa+GX/he+Ff/AJZUAH/C6/g3/wBFa+GX/he+Ff8A5ZUAH/C6/g3/ANFa+GX/AIXvhX/5ZUAH/C6/g3/0Vr4Zf+F74V/+WVAB/wALr+Df/RWvhl/4XvhX/wCWVAB/wuv4N/8ARWvhl/4XvhX/AOWVAB/wuv4N/wDRWvhl/wCF74V/+WVAB/wuv4N/9Fa+GX/he+Ff/llQAf8AC6/g3/0Vr4Zf+F74V/8AllQAf8Lr+Df/AEVr4Zf+F74V/wDllQAf8Lr+Df8A0Vr4Zf8Ahe+Ff/llQAf8Lr+Df/RWvhl/4XvhX/5ZUAH/AAuv4N/9Fa+GX/he+Ff/AJZUAH/C6/g3/wBFa+GX/he+Ff8A5ZUAH/C6/g3/ANFa+GX/AIXvhX/5ZUAH/C6/g3/0Vr4Zf+F74V/+WVAB/wALr+Df/RWvhl/4XvhX/wCWVAH813/Cy/hz/wBFA8E/+FVoP/ydQB//2QAAUEsDBBQABgAIAAAAIQDSXhXfgQMAAEwJAAARAAAAd29yZC9zZXR0aW5ncy54bWy0Vltv2zYUfh/Q/2DouYolxXJdrU4RO/GaIl6D2H3ZGyVRNhFehEPKmjvsv++IFCNvDQp3Rf1i8nznzu8c+937PwUfHShopuQ8iC+iYERloUomd/Pg83YVzoKRNkSWhCtJ58GR6uD91atf3rWZpsagmh6hC6kzUcyDvTF1Nh7rYk8F0ReqphLBSoEgBq+wGwsCT00dFkrUxLCccWaO4ySKpkHvRs2DBmTWuwgFK0BpVZnOJFNVxQraf3kLOCeuM7lRRSOoNDbiGCjHHJTUe1Zr7038X28I7r2Tw7eKOAju9do4OqPcVkH5bHFOep1BDaqgWuMDCe4TZHIIPPnK0XPsC4zdl2hdoXkc2dNp5un3OUj+40Dzcypx0D3LgYDjSV+GKLK7nVRAco6sxHJGmFFwhbT8opQYtVlNocC3QU5PomDcASWtSMPNluQbo2pUORDM4U00c/D+WO+ptIT4A6nu8UmSOrzYEyCFobCpSYFtXSppQHGvV6rflVkirQG77iw0OdAHoAdG2wdWmAaoc2S5P5w2bo7QkSQCi/nXbKxViURvswbY+f3uDGxSsc/9xUAK5x5YSbddEzfmyOkKa9qwL/Ralh8bbRh6tA35gQy+lQC2GyN/wmffHmu6oqTrkf5JwewDrTir1wxAwZ0skR4/LRirKgoYgBFD18g6Bqq1ff5ASYnr9gfjjk9phMu71P7wqJTxqlF0GaXLdOky7dBzkPRNvEyTl5DbOJ29tdM0fo4qsm7xPYA/dRQaCWexJCIHRkbrbjWOO40cnhZMejynOOv0FNk0uQfD0AFaEM5XOHoesAmIrGS6vqGVPfM1gd3gt9eAF6W4Bj4+++pWBIXfQDW1Q1sgtaOGV4knboGIjElzz4SX6ybfeCuJ2+kEamT56QC2T0N72szgE9sRuyeWKla3gnD12FOJw6ajAV2TunZsynfxPOBstzdxRwCDtxJ/Qe0l3yU9llgscZi9kKKrDLX7wyBLvOxE79LLLgfZxMsmgyz1snSQTb1s2slwiVLgTD4hsf2xk1eKc9XS8sOAfyXyW7pg+OKbo8iH5fraYZxpnLQa97BR4LFfLRZPslIVd0hWPLl3i5LbWZIsHJza/W22yKMnbO0jrRZE07LHvGnqTP9adZ9Zsgiv45sknEzTRThLlrfhYpVcx8vrt9N0mfzdz4H/G3T1DwAAAP//AwBQSwMEFAAGAAgAAAAhAPC8NQHcAQAA8QUAABIAAAB3b3JkL2ZvbnRUYWJsZS54bWy8k9tq4zAQhu8LfQej+8ay4vRg6pQ0bWBh6cXSfQBFkW2xOhhJiTdvvyPZcQMhbJallUHI/4x+jT40j0+/lUx23DphdImyCUYJ18xshK5L9PN9dXOPEuep3lBpNC/Rnjv0NL++euyKymjvEtivXaFYiRrv2yJNHWu4om5iWq4hWBmrqIdfW6eK2l/b9oYZ1VIv1kIKv08JxrdosLGXuJiqEoy/GLZVXPu4P7VcgqPRrhGtO7h1l7h1xm5aaxh3Du6sZO+nqNCjTZafGCnBrHGm8hO4zFBRtILtGY4rJT8MZv9mQEYDxYpvtTaWriXAh0oSMEPzgX7SFZoqCCypFGsrYqCl2jieQWxHZYkwwSs8gzl8OZ6GGaUhkTXUOh5M+kTcyxVVQu4PKt160+ut8Kw5yDtqRaipDzlRQ2Dr1rhErxgGWa1Qr2QlykFYLEeFhKPiyAZlOio4KCz69BkPcReLPmMOnJn2AE5AvAvFXfLGu+SHUVSfAULwLYCYAY4AZvr5QMji9QjIEpS7+/xw/Q8gD38H0mO8HMgCypJnMDwDhnx4GfF1fD6G43cxYJh+BYahQZLvom782TYJzfFFbbIIFZPjVxHahOC75xMc8fL/2SbDws3/AAAA//8DAFBLAwQUAAYACAAAACEA4IvKVR8BAAARAgAAFAAAAHdvcmQvd2ViU2V0dGluZ3MueG1slNFRS8MwEAfwd8HvUPK+pRs6tKwbgkz2MgbVD5Cl1zWY5EIua7dv71nnRHyZbzku9+P+3Hx5dDbrIJJBX4rJOBcZeI218ftSvL2uRg8io6R8rSx6KMUJSCwXtzfzvuhhV0FK/JMyVjwVTpeiTSkUUpJuwSkaYwDPzQajU4nLuJdOxfdDGGl0QSWzM9akk5zm+UycmXiNgk1jNDyjPjjwaZiXESyL6Kk1gb61/hqtx1iHiBqIOI+zX55Txl+Yyd0fyBkdkbBJYw5z3migeHySDy9nf4D7/wHTC+B0sd57jGpn+QS8ScaYWPANlLXYbzcv8rOocYOpUh08UcUpLKyMhaETzBEsbSGuvW6zvuiULcXjTHBT/jrk4gMAAP//AwBQSwMEFAAGAAgAAAAhAJ/qVV97AQAAFQMAABEACAFkb2NQcm9wcy9jb3JlLnhtbCCiBAEooAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJySUU/CMBCA3038D0vfRzdQgssYiRqeJJoI0fhW2xtUtrZpDwb/3m6DIZHExLfe7ruvt7umk11ZBFuwTmo1JnEvIgEoroVUyzFZzKfhiAQOmRKs0ArGZA+OTLLrq5SbhGsLL1YbsCjBBd6kXMLNmKwQTUKp4ysomet5Qvlkrm3J0Id2SQ3ja7YE2o+iIS0BmWDIaC0MTWckB6XgndJsbNEIBKdQQAkKHY17MT2xCLZ0FwuazA+ylLg3cBE9Jjt652QHVlXVqwYN6vuP6fvs6bX51VCqelYcSJYKnqDEArKUno7+5DafX8Cx/dwF/swtMNQ2W6AspGMIGxsICGaSW+10jsFznksOTd2Rrbewhn2lrXDeeBZ5TIDjVhr0u23vO/vg6YI5nPll5xLE/f7vq3+X1BYLW1m/nyxuiC5MD8to2wUR+CEm7ciPmbfBw+N8SrJ+FA/DOAr7N/NolNzeJVH0UXd8Vn8SlocG/m08CtqhnT/k7BsAAP//AwBQSwMEFAAGAAgAAAAhAIGW/TkyCwAAZHIAAA8AAAB3b3JkL3N0eWxlcy54bWy8ndty27oVhu8703fg6Kq9cHyMnXi2s8d24tpTO9s7cppriIQk1CCh8uBDn74gSEmQF0FxAau+siVqfQDx4wewQFL67feXVEZPPC+Eys5G+x/2RhHPYpWIbHY2+vlwtfNpFBUlyxImVcbPRq+8GP3+5a9/+e35tChfJS8iDciK0zQ+G83LcnG6u1vEc56y4oNa8EwfnKo8ZaV+mc92U5Y/VoudWKULVoqJkKJ83T3Y2zsetZh8CEVNpyLmX1VcpTwrTfxuzqUmqqyYi0WxpD0PoT2rPFnkKuZFoU86lQ0vZSJbYfaPACgVca4KNS0/6JNpa2RQOnx/z/yXyjXgIw5wsAKk8enNLFM5m0jd+romkYaNvujmT1T8lU9ZJcuifpnf5+3L9pX5c6WysoieT1kRC/GgS9aQVGje9XlWiJE+wllRnheCdR6c1/90HomL0nr7QiRitFuXWPxXH3xi8mx0cLR857KuwcZ7kmWz5XvTfOfqh12TsxHPdn6O67cmmns2YvnO+LwO3G1PrPlrne5i9ar51Ju20V1Dd5Rx01/1UT69VfEjT8alPnA22quL0m/+vLnPhcp1nzwbff7cvjnmqbgWScIz64PZXCT815xnPwuerN//88r0q/aNWFWZ/v/w057RSxbJt5eYL+peqo9mrG6973WArD9diXXhJvw/S9h+22Zd8XPOaqtG+28RpvooxEEdUVhn282s3py7+RSqoMP3KujovQr6+F4FHb9XQSfvVdCn9yrIYP6fBYks4S+NEWExgLqN43AjmuMwG5rj8BKa47AKmuNwAprj6OhojqMfozmOborglCp29UKrsx86ens/d/sc4cfdPiX4cbfPAH7c7QO+H3f7+O7H3T6c+3G3j95+3O2DNZ7bLLWiG22zrAx22VSpMlMlj0r+Ek5jmWaZ/IWGV096PCc5SQJMM7K1E3EwLWbm9fYeYkzqP5+XdcoVqWk0FbMq12lvaMV59sSlTkAjliSaRwjMeVnljhbx6dM5n/KcZzGn7Nh0UCkyHmVVOiHomws2I2PxLCFuviWRZFBYdWhWlfPaJIKgU6cszlV41RQjGx9uRRHeVjUkuqik5ESs7zRdzLDCcwODCU8NDCY8MzCY8MTA0oyqiVoaUUu1NKIGa2lE7db0T6p2a2lE7dbSiNqtpYW324MopRni7VXH/vC9u0up6h3n4HqMxSxjegEQPt20e6bRPcvZLGeLeVTvH3dj7XPGlnOhktfogWJOW5Go1vWmi1zqsxZZFd6gGzQqc614RPZa8YgMtuKFW+xOL5PrBdo1TT4zriZlp2kNaZBpx0xWzYI23G2sDO9hawNcibwgs0E3lqAHf6+Xs7WcFCPfupbhFVuzwm31dlQirV6LJKilVPEjzTB8/brguU7LHoNJV0pK9cwTOuK4zFXT12zLHxhJBln+W7qYs0KYXGkDMXyqX16rju7YIviE7iUTGY1u33ZSJmREt4K4fri7jR7Uok4z64ahAV6oslQpGbPdCfzbLz75O00Fz3USnL0Sne050faQgV0KgkmmIamEiKSXmSITJHOo4f2Tv04UyxMa2n3Om9tDSk5EHLN00Sw6CLylx8VnPf4QrIYM718sF/W+EJWpHkhg1rZhUU3+zePwoe67ikh2hv6oSrP/aJa6JpoOF75M2MCFLxGMmnp6qPsvwclu4MJPdgNHdbKXkhWFcF5C9eZRne6SR32+4clfy1NS5dNK0jXgEkjWgksgWRMqWaVZQXnGhkd4woZHfb6EXcbwCLbkDO8fuUjIxDAwKiUMjEoGA6PSwMBIBQi/Q8eChd+mY8HC79VpYERLAAtG1c9Ip3+iqzwWjKqfGRhVPzMwqn5mYFT97PBrxKdTvQimm2IsJFWfs5B0E01W8nShcpa/EiG/ST5jBBukDe0+V9P6uQGVNTdxEyDrPWpJuNhucFQi/+ITsqrVLMp6EeyIMimVItpbW084JnLz3rVtYeaZi+AqmM32W/7EKVbjFozoMkADC5fNgoVPUxYsfJqyYOHTlAULn6YsWPg0ZcHC71++lyzmcyUTnjuM2FeRaLxgcXttCVyjHrRXfytm8zIaz1eXqGzM8d7WyOUu00bY9gK7Borjg56wO56IKl1WFD4BdHw4PNgYeiN4+aBWT/B6+bsR+XFgJCzzeHvkOrXbiDwZGAnL/DQw0oxSG5F9g/hXlj92doSTvv6z2phwdL6Tvl60Cu4stq8jrSK7uuBJXy/asEp0Hsf1JS6ozjDPuOOHmccdj3GRm4Kxk5sy2FduRJ/BfvAnUS9HMYOmKW91y8/b4g7NlDpo5PyzUs3Fpo2rpMOfRLzRq/2s4FEn53D41daNUcbdjoOHGzdi8LjjRgwegNyIQSORMxw1JLkpg8cmN2LwIOVGoEcrOCPgRisYjxutYLzPaAUpPqNVwCrAjRi8HHAj0EaFCLRRA1YKbgTKqCDcy6iQgjYqRKCNChFoo8IFGM6oMB5nVBjvY1RI8TEqpKCNChFoo0IE2qgQgTYqRKCN6rm2d4Z7GRVS0EaFCLRRIQJtVLNeDDAqjMcZFcb7GBVSfIwKKWijQgTaqBCBNipEoI0KEWijQgTKqCDcy6iQgjYqRKCNChFoozbPx/obFcbjjArjfYwKKT5GhRS0USECbVSIQBsVItBGhQi0USECZVQQ7mVUSEEbFSLQRoUItFHNpYMAo8J4nFFhvI9RIcXHqJCCNipEoI0KEWijQgTaqBCBNipEoIwKwr2MCiloo0IE2qgQ0dc/2+vqrmdD9vG7ns7HTIZfumor9cP+/gEbdTgctayVmzX8AZoLpR6jzqdlD02+MQwiJlIos0XtuBfE5poLpKir9X9c9j+WZtMDvymsfYDHXOgH8KOhkWBP5aivy9uRIMk76uvpdiRYdR71jb52JJgGj/oGXePL5Z1UejoCwX3DjBW87wjvG62tcNjEfWO0FQhbuG9ktgJhA/eNx1bgx6genN9GfxzYTserm6IBoa87WoQTN6GvW0KtlsMxNMZQ0dyEoeq5CUNldBNQejoxeGHdKLTCbpSf1NBmWKn9jeomYKWGBC+pAcZfaojylhqi/KSGAyNWakjASu0/OLsJXlIDjL/UEOUtNUT5SQ2nMqzUkICVGhKwUgdOyE6Mv9QQ5S01RPlJDRd3WKkhASs1JGClhgQvqQHGX2qI8pYaovykBlkyWmpIwEoNCVipIcFLaoDxlxqivKWGqD6pzS7KhtQoha1w3CLMCsRNyFYgbnC2Aj2yJSvaM1uyCJ7ZEtRqqTkuW7JFcxOGqucmDJXRTUDp6cTghXWj0Aq7UX5S47KlLqn9jeomYKXGZUtOqXHZUq/UuGypV2pctuSWGpctdUmNy5a6pPYfnN0EL6lx2VKv1LhsqVdqXLbklhqXLXVJjcuWuqTGZUtdUgdOyE6Mv9S4bKlXaly25JYaly11SY3LlrqkxmVLXVLjsiWn1LhsqVdqXLbUKzUuW3JLjcuWuqTGZUtdUuOypS6pcdmSU2pcttQrNS5b6pXakS3tPm/8aljNNr93pz9cvi54/cXx1gMzSfPFue1FQPPBm2T16151cF2TqP3Fs/ZtU+H2gmFTogmERcVzXVbcfuWXo6h7JYU+b5Yn+nAJinR8s6+pwvrkl59uG3N9EbT53MYFz94al3Vj99TWiMGq3vZpFHNV8XPbBbfVUddoIpsfw9P/3GSJBjy3v7DW1DV5YQ1KH7/kUt6x5tNq4f6o5NOyObq/Zx6ffXN80nxhoTM+N4OEE7C7WZnmZfvDd44Wb37CoL167Wj18yquMi61G3hHm5v7KUKbe13B5X/Fl/8BAAD//wMAUEsDBBQABgAIAAAAIQDtJ+K6ZQEAALUCAAAQAAgBZG9jUHJvcHMvYXBwLnhtbCCiBAEooAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJxSwUrFMBC8C/5D6d2XPkER2RcRRTyoCK/qOSTbNpgmIVnF9/durNaqN3Pand1MZobA2dvoqldM2Qa/qderpq7Q62Cs7zf1Q3t1cFJXmZQ3ygWPm3qHuT6T+3twn0LERBZzxRQ+b+qBKJ4KkfWAo8orHnuedCGNirhNvQhdZzVeBv0yoidx2DTHAt8IvUFzEGfCemI8faX/kpqgi7782O4i80locYxOEcq7ctOtTKARxIxCG0i51o4oG4bnBu5Vj1muQUwFPIVkctmZCrgYVFKaOD95BGLRwXmMzmpFnKu8tTqFHDqqbpW2nkIeqkIAYrkF7GGL+iVZ2pUnli3cWD8JmQoWllSfVBw+1c0dbLVyeMHuZadcRhDfQGF5zg+xDZfF9ef8J7iw9GRp2Eal8Ze5BQ5bRtGw1Pm1GYBrDj+5ws53fY/ma+fvoMT1OP1CuT5aNXw+wvnC2OL8PeQ7AAAA//8DAFBLAQItABQABgAIAAAAIQBnzQ+udAEAADoFAAATAAAAAAAAAAAAAAAAAAAAAABbQ29udGVudF9UeXBlc10ueG1sUEsBAi0AFAAGAAgAAAAhAMfCJ7z/AAAA3wIAAAsAAAAAAAAAAAAAAAAArQMAAF9yZWxzLy5yZWxzUEsBAi0AFAAGAAgAAAAhABOqPof2AAAAMQMAABwAAAAAAAAAAAAAAAAA3QYAAHdvcmQvX3JlbHMvZG9jdW1lbnQueG1sLnJlbHNQSwECLQAUAAYACAAAACEAM+oBymACAAACBwAAEQAAAAAAAAAAAAAAAAAVCQAAd29yZC9kb2N1bWVudC54bWxQSwECLQAUAAYACAAAACEAJyDgAjMGAACMGgAAFQAAAAAAAAAAAAAAAACkCwAAd29yZC90aGVtZS90aGVtZTEueG1sUEsBAi0ACgAAAAAAAAAhAGoT2A2MJQAAjCUAABcAAAAAAAAAAAAAAAAAChIAAGRvY1Byb3BzL3RodW1ibmFpbC5qcGVnUEsBAi0AFAAGAAgAAAAhANJeFd+BAwAATAkAABEAAAAAAAAAAAAAAAAAyzcAAHdvcmQvc2V0dGluZ3MueG1sUEsBAi0AFAAGAAgAAAAhAPC8NQHcAQAA8QUAABIAAAAAAAAAAAAAAAAAezsAAHdvcmQvZm9udFRhYmxlLnhtbFBLAQItABQABgAIAAAAIQDgi8pVHwEAABECAAAUAAAAAAAAAAAAAAAAAIc9AAB3b3JkL3dlYlNldHRpbmdzLnhtbFBLAQItABQABgAIAAAAIQCf6lVfewEAABUDAAARAAAAAAAAAAAAAAAAANg+AABkb2NQcm9wcy9jb3JlLnhtbFBLAQItABQABgAIAAAAIQCBlv05MgsAAGRyAAAPAAAAAAAAAAAAAAAAAIpBAAB3b3JkL3N0eWxlcy54bWxQSwECLQAUAAYACAAAACEA7SfiumUBAAC1AgAAEAAAAAAAAAAAAAAAAADpTAAAZG9jUHJvcHMvYXBwLnhtbFBLBQYAAAAADAAMAAYDAACETwAAAAA='), - array('data:a!b#c&d-e^f_g+h.i/a!b#c&d-e^f_g+h.i;base64,foobar'), - ); + $data = [ + ['data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC'], + ['data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIBAMAAAA2IaO4AAAAFVBMVEXk5OTn5+ft7e319fX29vb5+fn///++GUmVAAAALUlEQVQIHWNICnYLZnALTgpmMGYIFWYIZTA2ZFAzTTFlSDFVMwVyQhmAwsYMAKDaBy0axX/iAAAAAElFTkSuQmCC'], + ['data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIBAMAAAA2IaO4AAAAFVBMVEXk5OTn5+ft7e319fX29vb5+fn///++GUmVAAAALUlEQVQIHWNICnYLZnALTgpmMGYIFWYIZTA2ZFAzTTFlSDFVMwVyQhmAwsYMAKDaBy0axX/iAAAAAElFTkSuQmCC '], + ['data:,Hello%2C%20World!'], + ['data:text/html,%3Ch1%3EHello%2C%20World!%3C%2Fh1%3E'], + ['data:,A%20brief%20note'], + ['data:text/html;charset=US-ASCII,%3Ch1%3EHello!%3C%2Fh1%3E'], + ['data:application/ld+json;base64,eyJAaWQiOiAiL2ZvbyJ9'], + ['data:application/vnd.ms-word.document.macroenabled.12;base64,UEsDBBQABgAIAAAAIQBnzQ+udAEAADoFAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC0lMtOwzAQRfdI/EPkLUrcskAINe0CyhIqUT7AtSepIX7Idl9/zzhpI1TRBFG6iZTM3HvPOJmMJltVJWtwXhqdk2E2IAloboTUZU7e58/pPUl8YFqwymjIyQ48mYyvr0bznQWfoFr7nCxDsA+Uer4ExXxmLGisFMYpFvDWldQy/slKoLeDwR3lRgfQIQ3Rg4xHT1CwVRWS6RYfNyQoJ8lj0xejcsKsrSRnAcs0VumPOgeV7xCutTiiS/dkGSrrHr+U1t+cTviwUB4lSBVHqwuoecXjdFJAMmMuvDCFDXRjnKDC8JVCUdY9XGRUPo2SrJUoxp2ZaraoAKtM6gPhyTQfdhX4X2QdnYcpCsmhDY5e1hkO3uM3oaqs8e2PhxBQcAmAvXMvwgYWbxej+GbeC1Jg7jy+uv/HaK17IQLuJjTX4dkctU1XJHbOnLEed939YezDUkZ1igNbcEF2f3VtIlqfPR/EfRcgfsim9Z9v/AUAAP//AwBQSwMEFAAGAAgAAAAhAMfCJ7z/AAAA3wIAAAsACAJfcmVscy8ucmVscyCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACsks1KAzEQgO+C7xDm3s22iog024sIvYmsDzAm093o5odkqu3bG0XUhWUR7HH+Pr5JZr05uEG8Uso2eAXLqgZBXgdjfafgsb1bXIPIjN7gEDwpOFKGTXN+tn6gAbkM5d7GLArFZwU9c7yRMuueHOYqRPKlsgvJIZcwdTKifsGO5Kqur2T6zYBmxBRboyBtzQWI9hjpf2zpiNEgo9Qh0SKmMp3Yll1Ei6kjVmCCvi/p/NlRFTLIaaHLvwuF3c5qug1678jzlBcdmLwhM6+EMc4ZLU9pNO74kXkLyUjzlZ6zWZ32w7jfuyePdph4l+9a9Ryp+xCSo7Ns3gEAAP//AwBQSwMEFAAGAAgAAAAhABOqPof2AAAAMQMAABwACAF3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzIKIEASigAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArJLLasMwEEX3hf6DmH0tO31QQuRsSiHb1v0ARR4/qCwJzfThv69oSOvQYLrw8l4x955Bs9l+Dla8Y6TeOwVFloNAZ3zdu1bBS/V4dQ+CWLtaW+9QwYgE2/LyYvOEVnMaoq4PJFKKIwUdc1hLSabDQVPmA7r00vg4aE4ytjJo86pblKs8v5NxmgHlSabY1Qrirr4GUY0B/5Ptm6Y3+ODN24COz1TID9w/I3NajlKsji2ygomZpUSQ50FulgRpvONK7y3+YvxYcxC3S0Jwmp0AfMuDWcwxFEsyEI8WJ59x0HP1q0Xr/1zD0TkiyJNDL78AAAD//wMAUEsDBBQABgAIAAAAIQAz6gHKYAIAAAIHAAARAAAAd29yZC9kb2N1bWVudC54bWykld1u2jAUx+8n7R2Q70sSCpRGQKVBh9A0qRrb9WQcJ7GIfSzbQLs32nPsxXacL7JNQ7QgFPt8+Of/sWNn+vAsi96BGytAzUjUD0mPKwaJUNmMfPv68WZCetZRldACFJ+RF27Jw/z9u+kxToDtJVeuhwhl46NmM5I7p+MgsCznktq+FMyAhdT1GcgA0lQwHhzBJMEgjMKypw0wbi3Ot6DqQC2pcRIuo0nKmu4gDCdoC9Uy/lUEmisMpmAkdWiaDEeY3V7fIFNTJ7aiEO7Fs8Yt5jAje6PimnHT6vBjYhQQH2TRJMO53Epo3TQjzCUiqyHLeslLeYHhBQoGZXOhT+v2VhoG8wZytuBOsUcdDa/b9KWhR2xOwEvkJ9UgWVTKzxOj8IId8Yh2xCUS/pyzUdJ9+Y5vW5rO4kaj1wEGfwN0dt3mrAzs9YkmrqOt1a5l+avkFax6k7ul2evEbHKq8QRKFq8zBYZuC1SEW9bDVe/515rM8YrbQvLiW43uYaypoetkRsLB8hb/Q1J6HX923ntX/9Ab43WafMHEcHQXLUaD1rXkKd0Xzkduw9FitChnMf7h5p9+/TwINQ183z9L9xZg5y+ojaPGIUb4+T1PUYmKv6/gA2U7EnRzH1XSZgYlSvuw5cw9mf+r22Dcex+j0eQ+LJXpbPMDo3gioug+LOfNsT+eDEuyT/hMPdIBHtxoGFXViyx3J3MLzoE82QVPO9Gc04TjFXgXTryZAriOme1dadbTMSgseq2mjFc5pRu/RCsjfNGFUPxJOIYqb8dN9VXhZbfa0OD08Zr/BgAA//8DAFBLAwQUAAYACAAAACEAJyDgAjMGAACMGgAAFQAAAHdvcmQvdGhlbWUvdGhlbWUxLnhtbOxZTYvbRhi+F/ofhO6OZVvyxxJvsGU7abObhOwmJcexNJYmO9KYmdHumhAoybFQKE1LDw301kJpG0igl/TUn7JtSptC/kJHI8uesccsaTawhNhgzcfzvvPM+848I1kXLx0n2DqElCGSdu3aBce2YBqQEKVR1761P6q0bYtxkIYAkxR27Rlk9qXtDz+4CLZ4DBNoCfuUbYGuHXM+3apWWSCaAbtApjAVfRNCE8BFlUbVkIIj4TfB1brjNKsJQKltpSARbvfj338Qzq5PJiiA9nbpfYjFT8pZ3hBgupf7hnOTfkYhyCQ2PKjlFzZjPqbWIcBdWwwUkqN9eMxtCwPGRUfXduTHrm5frC6MMN9gq9iN5GduNzcID+rSjkbjhaHrem6zt/AvAZiv44atYXPYXPiTABAEYqYFFxXr9Tv9gTfHKqCiaPA9aA0aNQ2v+G+s4Xte/tXwElQU3TX8aOQvY6iAiqJniEmr7rsaXoKKYnMN33J6A7el4SUoxig9WEM7XrPhl7NdQCYEXzHCO547atXn8CWqqqyuwj7lm9ZaAu4SOhIAmVzAUWrx2RROQCBwPsBoTJG1g6JYLLwpSAkTzU7dGTkN8Zt/XVmSEQFbECjWRVPA1ppyPhYLKJryrv2x8GorkFfPf3r1/Kl18uDZyYNfTx4+PHnwi8HqCkgj1erl91/8+/hT65+n37189JUZz1T8nz9/9sdvX5qBXAW++PrJX8+evPjm879/fGSA9ygYq/B9lEBmXYNH1k2SiIkZBoBj+noW+zFAqkUvjRhIQW5jQA95rKGvzQAGBlwf6hG8TYVMmICXs7sa4b2YZhwZgFfjRAPuEoL7hBrndDUfS41ClkbmwWmm4m4CcGga21/J7zCbivWOTC79GGo0b2CRchDBFHIr7yMHEBrM7iCkxXUXBZQwMuHWHWT1ATKGZB+NtdW0NLqCEpGXmYmgyLcWm93bVp9gk/sBPNSRYlcAbHIJsRbGyyDjIDEyBglWkTuAxyaSezMaaAFnXGQ6gphYwxAyZrK5Tmca3atCXsxp38WzREdSjg5MyB1AiIockAM/BsnUyBmlsYr9iB2IJQqsG4QbSRB9h+R1kQeQbkz3bQS1dJ++t28JZTUvkLwno6YtAYm+H2d4AqB0Xl3R8wSlp4r7iqx7b1fWhZC++PaxWXfPpaD3KDLuqFUZ34RbFW+f0BCdf+0egCy9AcV2MUDfS/d76X7npXvTfj57wV5qtLyJL2/VpZtk4337BGG8x2cY7jCp7kxMLxyJRlmRRovHhGksivPhNFxEgSxblPBPEI/3YjAVw9TkCBGbu46YNSVMnA+y2eg778BZskvCorVWK59MhQHgy3ZxvpTt4jTiRWuztXwEW7iXtUg+KpcEctvXIaEMppNoGEi0ysZTSMiZnQmLjoFFO3e/kYW8zLMi9p8F8n81PLdgJNYbwDDM81TYl9k980xvCqY+7bphep2c69lkWiOhLDedhLIMYxDC1eYzznVnmVKNXh6KdRqt9tvIdS4iK9qAU71mHYk91/CEmwBMu/ZE3BmKYjIV/liumwBHadcO+DzQ/0dZppTxAWBxAZNdxfwTxCG1MErEWlfTgNMlt1q9lc/xnJLrOOcvcvKiJhlOJjDgG1qWVdFXODH2viE4r5BMkN6LwyNrjDN6E4hAea1aHsAQMb6IZoiosriXUVyRq/lW1P4xW25RgKcxmJ8oqpgXcFle0FHmIZmuzkqvzyczjvIkvfGpe7pR3qGI5oYDJD81zfrx9g55hdVS9zVWhXSval2n1LpNp8SbHwgKteVgGrWcsYHaslWndoY3BMpwi6W56Yw469NgddXmB0R5Xylra68myPiuWPkDcbuaYc4kVXgsnhH88k/lQglka6kux9zKKOra9xyv5/p1z684bW9YcRuuU2l7vUal53mN2tCrOYN+/b4ICo+TmleMPRLPM3g2f/Ui29devyTlbfaFgCRVIt+rVKWxfP1Sq2uvX4r3LtZ+3m9bSETmXrM+6jQ6/Wal0+iNKu6g3650/Ga/Mmj6rcFo4Hvtzui+bR1KsNtr+G5z2K40a75fcZtOTr/dqbTcer3ntnrtodu7P4+1mHl5LcMreW3/BwAA//8DAFBLAwQKAAAAAAAAACEAahPYDYwlAACMJQAAFwAAAGRvY1Byb3BzL3RodW1ibmFpbC5qcGVn/9j/4AAQSkZJRgABAQAASABIAAD/4QCARXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAIdpAAQAAAABAAAATgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAWmgAwAEAAAAAQAAAgAAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAgABaQMBEQACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/3QAEAC7/2gAMAwEAAhEDEQA/AP7Yfgx8GPg9N8HvhRLL8KPhrLLL8NfAskkkngTws8kkj+F9LZ3d200s7uxLMzHczEk5JNAHpX/ClPg3/wBEl+GX/hBeFf8A5W0AH/ClPg3/ANEl+GX/AIQXhX/5W0AH/ClPg3/0SX4Zf+EF4V/+VtAB/wAKU+Df/RJfhl/4QXhX/wCVtAB/wpT4N/8ARJfhl/4QXhX/AOVtAB/wpT4N/wDRJfhl/wCEF4V/+VtAB/wpT4N/9El+GX/hBeFf/lbQAf8AClPg3/0SX4Zf+EF4V/8AlbQAf8KU+Df/AESX4Zf+EF4V/wDlbQAf8KU+Df8A0SX4Zf8AhBeFf/lbQAf8KU+Df/RJfhl/4QXhX/5W0AH/AApT4N/9El+GX/hBeFf/AJW0AH/ClPg3/wBEl+GX/hBeFf8A5W0AH/ClPg3/ANEl+GX/AIQXhX/5W0AH/ClPg3/0SX4Zf+EF4V/+VtAB/wAKU+Df/RJfhl/4QXhX/wCVtAB/wpT4N/8ARJfhl/4QXhX/AOVtAB/wpT4N/wDRJfhl/wCEF4V/+VtAB/wpT4N/9El+GX/hBeFf/lbQAf8AClPg3/0SX4Zf+EF4V/8AlbQAf8KU+Df/AESX4Zf+EF4V/wDlbQAf8KU+Df8A0SX4Zf8AhBeFf/lbQAf8KU+Df/RJfhl/4QXhX/5W0AH/AApT4N/9El+GX/hBeFf/AJW0AH/ClPg3/wBEl+GX/hBeFf8A5W0AH/ClPg3/ANEl+GX/AIQXhX/5W0AH/ClPg3/0SX4Zf+EF4V/+VtAB/wAKU+Df/RJfhl/4QXhX/wCVtAB/wpT4N/8ARJfhl/4QXhX/AOVtAB/wpT4N/wDRJfhl/wCEF4V/+VtAB/wpT4N/9El+GX/hBeFf/lbQAf8AClPg3/0SX4Zf+EF4V/8AlbQAf8KU+Df/AESX4Zf+EF4V/wDlbQAf8KU+Df8A0SX4Zf8AhBeFf/lbQAf8KU+Df/RJfhl/4QXhX/5W0AH/AApT4N/9El+GX/hBeFf/AJW0AH/ClPg3/wBEl+GX/hBeFf8A5W0AH/ClPg3/ANEl+GX/AIQXhX/5W0AH/ClPg3/0SX4Zf+EF4V/+VtAB/wAKU+Df/RJfhl/4QXhX/wCVtAB/wpT4N/8ARJfhl/4QXhX/AOVtAB/wpT4N/wDRJfhl/wCEF4V/+VtAB/wpT4N/9El+GX/hBeFf/lbQAf8AClPg3/0SX4Zf+EF4V/8AlbQB/Nd/wrT4c/8ARP8AwT/4Sug//INAH//Q/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9H+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/T/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9T+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAfP3j79pv4T/DT4n6P8IvFmr3Vj4w1jwRqvxN2GC3TSNH+G3hs6v/AMJj8QPEmsXV5a2Xh3wZ4JTSB/wlPiPVnttK0+81vwpokdxc+IPFfh/SdQAMPQ/2v/gXr2heH9WtvFlrZ6n4g8X6B4Gi8GatfaFpnjPS/Eev+N2+HyafrmjXWsxx6bdaV4lg1DTtasZbxtUstX0rUvCS6fP45gXwu4B6v8L/AIufDX40+GR4x+FfjDSPG3hk3ENqNW0eSZoPNu9I0rxFp7GO5ht7hbfV/DevaD4m0O7aL7LrnhjXtC8SaRPe6JrOmX10AejUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/1f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQB4L8Vv2YvgX8b9UbWvij4Ct/FWqP4Yv/BbXsut+JtKlPhTV9K8WaFrWgf8SPWdMT+zNd0Lx14t0TXrbAXW9H1y70zVftliILeIA4/Rv2Jv2Y9AvvDuqaX8Mkg1Pwr4a8O+D9Dv5PF3ju6u7Xw74T+M9h+0J4e06aW68TzG/GnfGDTLTxglzqH2q7mKS6FczzeGbm50eUA9j+Gfwk+Hvwd0e80D4c+H/wDhHdJv5PDUl3a/2rrerec/hD4eeCvhT4dbz9c1LU7lP7O8A/DvwdoOI5lF3/Y/9qX32nWdQ1PUb0A9HoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoA/mXoA/9b+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1/7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/Q/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9H+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/T/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9T+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/W/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9f+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0P7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/R/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9L+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0/7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/U/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9X+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/X/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9D+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/S/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9P+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1P7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/V/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9b+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1/7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/Q/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9H+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/T/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9T+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/W/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9f+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0P7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/R/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9L+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0/7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/U/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9X+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/X/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9D+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/S/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9P+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1P7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/V/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9b+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1/7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/Q/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9H+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/T/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9T+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/W/th+DHxn+D0Pwe+FEUvxX+GsUsXw18CxyRyeO/CySRyJ4X0tXR0bUgyOjAqysNysCDgg0Aelf8Lr+Df/AEVr4Zf+F74V/wDllQAf8Lr+Df8A0Vr4Zf8Ahe+Ff/llQAf8Lr+Df/RWvhl/4XvhX/5ZUAH/AAuv4N/9Fa+GX/he+Ff/AJZUAH/C6/g3/wBFa+GX/he+Ff8A5ZUAH/C6/g3/ANFa+GX/AIXvhX/5ZUAH/C6/g3/0Vr4Zf+F74V/+WVAB/wALr+Df/RWvhl/4XvhX/wCWVAB/wuv4N/8ARWvhl/4XvhX/AOWVAB/wuv4N/wDRWvhl/wCF74V/+WVAB/wuv4N/9Fa+GX/he+Ff/llQAf8AC6/g3/0Vr4Zf+F74V/8AllQAf8Lr+Df/AEVr4Zf+F74V/wDllQAf8Lr+Df8A0Vr4Zf8Ahe+Ff/llQAf8Lr+Df/RWvhl/4XvhX/5ZUAH/AAuv4N/9Fa+GX/he+Ff/AJZUAH/C6/g3/wBFa+GX/he+Ff8A5ZUAH/C6/g3/ANFa+GX/AIXvhX/5ZUAH/C6/g3/0Vr4Zf+F74V/+WVAB/wALr+Df/RWvhl/4XvhX/wCWVAB/wuv4N/8ARWvhl/4XvhX/AOWVAB/wuv4N/wDRWvhl/wCF74V/+WVAB/wuv4N/9Fa+GX/he+Ff/llQAf8AC6/g3/0Vr4Zf+F74V/8AllQAf8Lr+Df/AEVr4Zf+F74V/wDllQAf8Lr+Df8A0Vr4Zf8Ahe+Ff/llQAf8Lr+Df/RWvhl/4XvhX/5ZUAH/AAuv4N/9Fa+GX/he+Ff/AJZUAH/C6/g3/wBFa+GX/he+Ff8A5ZUAH/C6/g3/ANFa+GX/AIXvhX/5ZUAH/C6/g3/0Vr4Zf+F74V/+WVAB/wALr+Df/RWvhl/4XvhX/wCWVAB/wuv4N/8ARWvhl/4XvhX/AOWVAB/wuv4N/wDRWvhl/wCF74V/+WVAB/wuv4N/9Fa+GX/he+Ff/llQAf8AC6/g3/0Vr4Zf+F74V/8AllQAf8Lr+Df/AEVr4Zf+F74V/wDllQAf8Lr+Df8A0Vr4Zf8Ahe+Ff/llQAf8Lr+Df/RWvhl/4XvhX/5ZUAH/AAuv4N/9Fa+GX/he+Ff/AJZUAH/C6/g3/wBFa+GX/he+Ff8A5ZUAH/C6/g3/ANFa+GX/AIXvhX/5ZUAH/C6/g3/0Vr4Zf+F74V/+WVAB/wALr+Df/RWvhl/4XvhX/wCWVAH813/Cy/hz/wBFA8E/+FVoP/ydQB//2QAAUEsDBBQABgAIAAAAIQDSXhXfgQMAAEwJAAARAAAAd29yZC9zZXR0aW5ncy54bWy0Vltv2zYUfh/Q/2DouYolxXJdrU4RO/GaIl6D2H3ZGyVRNhFehEPKmjvsv++IFCNvDQp3Rf1i8nznzu8c+937PwUfHShopuQ8iC+iYERloUomd/Pg83YVzoKRNkSWhCtJ58GR6uD91atf3rWZpsagmh6hC6kzUcyDvTF1Nh7rYk8F0ReqphLBSoEgBq+wGwsCT00dFkrUxLCccWaO4ySKpkHvRs2DBmTWuwgFK0BpVZnOJFNVxQraf3kLOCeuM7lRRSOoNDbiGCjHHJTUe1Zr7038X28I7r2Tw7eKOAju9do4OqPcVkH5bHFOep1BDaqgWuMDCe4TZHIIPPnK0XPsC4zdl2hdoXkc2dNp5un3OUj+40Dzcypx0D3LgYDjSV+GKLK7nVRAco6sxHJGmFFwhbT8opQYtVlNocC3QU5PomDcASWtSMPNluQbo2pUORDM4U00c/D+WO+ptIT4A6nu8UmSOrzYEyCFobCpSYFtXSppQHGvV6rflVkirQG77iw0OdAHoAdG2wdWmAaoc2S5P5w2bo7QkSQCi/nXbKxViURvswbY+f3uDGxSsc/9xUAK5x5YSbddEzfmyOkKa9qwL/Ralh8bbRh6tA35gQy+lQC2GyN/wmffHmu6oqTrkf5JwewDrTir1wxAwZ0skR4/LRirKgoYgBFD18g6Bqq1ff5ASYnr9gfjjk9phMu71P7wqJTxqlF0GaXLdOky7dBzkPRNvEyTl5DbOJ29tdM0fo4qsm7xPYA/dRQaCWexJCIHRkbrbjWOO40cnhZMejynOOv0FNk0uQfD0AFaEM5XOHoesAmIrGS6vqGVPfM1gd3gt9eAF6W4Bj4+++pWBIXfQDW1Q1sgtaOGV4knboGIjElzz4SX6ybfeCuJ2+kEamT56QC2T0N72szgE9sRuyeWKla3gnD12FOJw6ajAV2TunZsynfxPOBstzdxRwCDtxJ/Qe0l3yU9llgscZi9kKKrDLX7wyBLvOxE79LLLgfZxMsmgyz1snSQTb1s2slwiVLgTD4hsf2xk1eKc9XS8sOAfyXyW7pg+OKbo8iH5fraYZxpnLQa97BR4LFfLRZPslIVd0hWPLl3i5LbWZIsHJza/W22yKMnbO0jrRZE07LHvGnqTP9adZ9Zsgiv45sknEzTRThLlrfhYpVcx8vrt9N0mfzdz4H/G3T1DwAAAP//AwBQSwMEFAAGAAgAAAAhAPC8NQHcAQAA8QUAABIAAAB3b3JkL2ZvbnRUYWJsZS54bWy8k9tq4zAQhu8LfQej+8ay4vRg6pQ0bWBh6cXSfQBFkW2xOhhJiTdvvyPZcQMhbJallUHI/4x+jT40j0+/lUx23DphdImyCUYJ18xshK5L9PN9dXOPEuep3lBpNC/Rnjv0NL++euyKymjvEtivXaFYiRrv2yJNHWu4om5iWq4hWBmrqIdfW6eK2l/b9oYZ1VIv1kIKv08JxrdosLGXuJiqEoy/GLZVXPu4P7VcgqPRrhGtO7h1l7h1xm5aaxh3Du6sZO+nqNCjTZafGCnBrHGm8hO4zFBRtILtGY4rJT8MZv9mQEYDxYpvtTaWriXAh0oSMEPzgX7SFZoqCCypFGsrYqCl2jieQWxHZYkwwSs8gzl8OZ6GGaUhkTXUOh5M+kTcyxVVQu4PKt160+ut8Kw5yDtqRaipDzlRQ2Dr1rhErxgGWa1Qr2QlykFYLEeFhKPiyAZlOio4KCz69BkPcReLPmMOnJn2AE5AvAvFXfLGu+SHUVSfAULwLYCYAY4AZvr5QMji9QjIEpS7+/xw/Q8gD38H0mO8HMgCypJnMDwDhnx4GfF1fD6G43cxYJh+BYahQZLvom782TYJzfFFbbIIFZPjVxHahOC75xMc8fL/2SbDws3/AAAA//8DAFBLAwQUAAYACAAAACEA4IvKVR8BAAARAgAAFAAAAHdvcmQvd2ViU2V0dGluZ3MueG1slNFRS8MwEAfwd8HvUPK+pRs6tKwbgkz2MgbVD5Cl1zWY5EIua7dv71nnRHyZbzku9+P+3Hx5dDbrIJJBX4rJOBcZeI218ftSvL2uRg8io6R8rSx6KMUJSCwXtzfzvuhhV0FK/JMyVjwVTpeiTSkUUpJuwSkaYwDPzQajU4nLuJdOxfdDGGl0QSWzM9akk5zm+UycmXiNgk1jNDyjPjjwaZiXESyL6Kk1gb61/hqtx1iHiBqIOI+zX55Txl+Yyd0fyBkdkbBJYw5z3migeHySDy9nf4D7/wHTC+B0sd57jGpn+QS8ScaYWPANlLXYbzcv8rOocYOpUh08UcUpLKyMhaETzBEsbSGuvW6zvuiULcXjTHBT/jrk4gMAAP//AwBQSwMEFAAGAAgAAAAhAJ/qVV97AQAAFQMAABEACAFkb2NQcm9wcy9jb3JlLnhtbCCiBAEooAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJySUU/CMBCA3038D0vfRzdQgssYiRqeJJoI0fhW2xtUtrZpDwb/3m6DIZHExLfe7ruvt7umk11ZBFuwTmo1JnEvIgEoroVUyzFZzKfhiAQOmRKs0ArGZA+OTLLrq5SbhGsLL1YbsCjBBd6kXMLNmKwQTUKp4ysomet5Qvlkrm3J0Id2SQ3ja7YE2o+iIS0BmWDIaC0MTWckB6XgndJsbNEIBKdQQAkKHY17MT2xCLZ0FwuazA+ylLg3cBE9Jjt652QHVlXVqwYN6vuP6fvs6bX51VCqelYcSJYKnqDEArKUno7+5DafX8Cx/dwF/swtMNQ2W6AspGMIGxsICGaSW+10jsFznksOTd2Rrbewhn2lrXDeeBZ5TIDjVhr0u23vO/vg6YI5nPll5xLE/f7vq3+X1BYLW1m/nyxuiC5MD8to2wUR+CEm7ciPmbfBw+N8SrJ+FA/DOAr7N/NolNzeJVH0UXd8Vn8SlocG/m08CtqhnT/k7BsAAP//AwBQSwMEFAAGAAgAAAAhAIGW/TkyCwAAZHIAAA8AAAB3b3JkL3N0eWxlcy54bWy8ndty27oVhu8703fg6Kq9cHyMnXi2s8d24tpTO9s7cppriIQk1CCh8uBDn74gSEmQF0FxAau+siVqfQDx4wewQFL67feXVEZPPC+Eys5G+x/2RhHPYpWIbHY2+vlwtfNpFBUlyxImVcbPRq+8GP3+5a9/+e35tChfJS8iDciK0zQ+G83LcnG6u1vEc56y4oNa8EwfnKo8ZaV+mc92U5Y/VoudWKULVoqJkKJ83T3Y2zsetZh8CEVNpyLmX1VcpTwrTfxuzqUmqqyYi0WxpD0PoT2rPFnkKuZFoU86lQ0vZSJbYfaPACgVca4KNS0/6JNpa2RQOnx/z/yXyjXgIw5wsAKk8enNLFM5m0jd+romkYaNvujmT1T8lU9ZJcuifpnf5+3L9pX5c6WysoieT1kRC/GgS9aQVGje9XlWiJE+wllRnheCdR6c1/90HomL0nr7QiRitFuXWPxXH3xi8mx0cLR857KuwcZ7kmWz5XvTfOfqh12TsxHPdn6O67cmmns2YvnO+LwO3G1PrPlrne5i9ar51Ju20V1Dd5Rx01/1UT69VfEjT8alPnA22quL0m/+vLnPhcp1nzwbff7cvjnmqbgWScIz64PZXCT815xnPwuerN//88r0q/aNWFWZ/v/w057RSxbJt5eYL+peqo9mrG6973WArD9diXXhJvw/S9h+22Zd8XPOaqtG+28RpvooxEEdUVhn282s3py7+RSqoMP3KujovQr6+F4FHb9XQSfvVdCn9yrIYP6fBYks4S+NEWExgLqN43AjmuMwG5rj8BKa47AKmuNwAprj6OhojqMfozmOborglCp29UKrsx86ens/d/sc4cfdPiX4cbfPAH7c7QO+H3f7+O7H3T6c+3G3j95+3O2DNZ7bLLWiG22zrAx22VSpMlMlj0r+Ek5jmWaZ/IWGV096PCc5SQJMM7K1E3EwLWbm9fYeYkzqP5+XdcoVqWk0FbMq12lvaMV59sSlTkAjliSaRwjMeVnljhbx6dM5n/KcZzGn7Nh0UCkyHmVVOiHomws2I2PxLCFuviWRZFBYdWhWlfPaJIKgU6cszlV41RQjGx9uRRHeVjUkuqik5ESs7zRdzLDCcwODCU8NDCY8MzCY8MTA0oyqiVoaUUu1NKIGa2lE7db0T6p2a2lE7dbSiNqtpYW324MopRni7VXH/vC9u0up6h3n4HqMxSxjegEQPt20e6bRPcvZLGeLeVTvH3dj7XPGlnOhktfogWJOW5Go1vWmi1zqsxZZFd6gGzQqc614RPZa8YgMtuKFW+xOL5PrBdo1TT4zriZlp2kNaZBpx0xWzYI23G2sDO9hawNcibwgs0E3lqAHf6+Xs7WcFCPfupbhFVuzwm31dlQirV6LJKilVPEjzTB8/brguU7LHoNJV0pK9cwTOuK4zFXT12zLHxhJBln+W7qYs0KYXGkDMXyqX16rju7YIviE7iUTGY1u33ZSJmREt4K4fri7jR7Uok4z64ahAV6oslQpGbPdCfzbLz75O00Fz3USnL0Sne050faQgV0KgkmmIamEiKSXmSITJHOo4f2Tv04UyxMa2n3Om9tDSk5EHLN00Sw6CLylx8VnPf4QrIYM718sF/W+EJWpHkhg1rZhUU3+zePwoe67ikh2hv6oSrP/aJa6JpoOF75M2MCFLxGMmnp6qPsvwclu4MJPdgNHdbKXkhWFcF5C9eZRne6SR32+4clfy1NS5dNK0jXgEkjWgksgWRMqWaVZQXnGhkd4woZHfb6EXcbwCLbkDO8fuUjIxDAwKiUMjEoGA6PSwMBIBQi/Q8eChd+mY8HC79VpYERLAAtG1c9Ip3+iqzwWjKqfGRhVPzMwqn5mYFT97PBrxKdTvQimm2IsJFWfs5B0E01W8nShcpa/EiG/ST5jBBukDe0+V9P6uQGVNTdxEyDrPWpJuNhucFQi/+ITsqrVLMp6EeyIMimVItpbW084JnLz3rVtYeaZi+AqmM32W/7EKVbjFozoMkADC5fNgoVPUxYsfJqyYOHTlAULn6YsWPg0ZcHC71++lyzmcyUTnjuM2FeRaLxgcXttCVyjHrRXfytm8zIaz1eXqGzM8d7WyOUu00bY9gK7Borjg56wO56IKl1WFD4BdHw4PNgYeiN4+aBWT/B6+bsR+XFgJCzzeHvkOrXbiDwZGAnL/DQw0oxSG5F9g/hXlj92doSTvv6z2phwdL6Tvl60Cu4stq8jrSK7uuBJXy/asEp0Hsf1JS6ozjDPuOOHmccdj3GRm4Kxk5sy2FduRJ/BfvAnUS9HMYOmKW91y8/b4g7NlDpo5PyzUs3Fpo2rpMOfRLzRq/2s4FEn53D41daNUcbdjoOHGzdi8LjjRgwegNyIQSORMxw1JLkpg8cmN2LwIOVGoEcrOCPgRisYjxutYLzPaAUpPqNVwCrAjRi8HHAj0EaFCLRRA1YKbgTKqCDcy6iQgjYqRKCNChFoo8IFGM6oMB5nVBjvY1RI8TEqpKCNChFoo0IE2qgQgTYqRKCN6rm2d4Z7GRVS0EaFCLRRIQJtVLNeDDAqjMcZFcb7GBVSfIwKKWijQgTaqBCBNipEoI0KEWijQgTKqCDcy6iQgjYqRKCNChFoozbPx/obFcbjjArjfYwKKT5GhRS0USECbVSIQBsVItBGhQi0USECZVQQ7mVUSEEbFSLQRoUItFHNpYMAo8J4nFFhvI9RIcXHqJCCNipEoI0KEWijQgTaqBCBNipEoIwKwr2MCiloo0IE2qgQ0dc/2+vqrmdD9vG7ns7HTIZfumor9cP+/gEbdTgctayVmzX8AZoLpR6jzqdlD02+MQwiJlIos0XtuBfE5poLpKir9X9c9j+WZtMDvymsfYDHXOgH8KOhkWBP5aivy9uRIMk76uvpdiRYdR71jb52JJgGj/oGXePL5Z1UejoCwX3DjBW87wjvG62tcNjEfWO0FQhbuG9ktgJhA/eNx1bgx6genN9GfxzYTserm6IBoa87WoQTN6GvW0KtlsMxNMZQ0dyEoeq5CUNldBNQejoxeGHdKLTCbpSf1NBmWKn9jeomYKWGBC+pAcZfaojylhqi/KSGAyNWakjASu0/OLsJXlIDjL/UEOUtNUT5SQ2nMqzUkICVGhKwUgdOyE6Mv9QQ5S01RPlJDRd3WKkhASs1JGClhgQvqQHGX2qI8pYaovykBlkyWmpIwEoNCVipIcFLaoDxlxqivKWGqD6pzS7KhtQoha1w3CLMCsRNyFYgbnC2Aj2yJSvaM1uyCJ7ZEtRqqTkuW7JFcxOGqucmDJXRTUDp6cTghXWj0Aq7UX5S47KlLqn9jeomYKXGZUtOqXHZUq/UuGypV2pctuSWGpctdUmNy5a6pPYfnN0EL6lx2VKv1LhsqVdqXLbklhqXLXVJjcuWuqTGZUtdUgdOyE6Mv9S4bKlXaly25JYaly11SY3LlrqkxmVLXVLjsiWn1LhsqVdqXLbUKzUuW3JLjcuWuqTGZUtdUuOypS6pcdmSU2pcttQrNS5b6pXakS3tPm/8aljNNr93pz9cvi54/cXx1gMzSfPFue1FQPPBm2T16151cF2TqP3Fs/ZtU+H2gmFTogmERcVzXVbcfuWXo6h7JYU+b5Yn+nAJinR8s6+pwvrkl59uG3N9EbT53MYFz94al3Vj99TWiMGq3vZpFHNV8XPbBbfVUddoIpsfw9P/3GSJBjy3v7DW1DV5YQ1KH7/kUt6x5tNq4f6o5NOyObq/Zx6ffXN80nxhoTM+N4OEE7C7WZnmZfvDd44Wb37CoL167Wj18yquMi61G3hHm5v7KUKbe13B5X/Fl/8BAAD//wMAUEsDBBQABgAIAAAAIQDtJ+K6ZQEAALUCAAAQAAgBZG9jUHJvcHMvYXBwLnhtbCCiBAEooAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJxSwUrFMBC8C/5D6d2XPkER2RcRRTyoCK/qOSTbNpgmIVnF9/durNaqN3Pand1MZobA2dvoqldM2Qa/qderpq7Q62Cs7zf1Q3t1cFJXmZQ3ygWPm3qHuT6T+3twn0LERBZzxRQ+b+qBKJ4KkfWAo8orHnuedCGNirhNvQhdZzVeBv0yoidx2DTHAt8IvUFzEGfCemI8faX/kpqgi7782O4i80locYxOEcq7ctOtTKARxIxCG0i51o4oG4bnBu5Vj1muQUwFPIVkctmZCrgYVFKaOD95BGLRwXmMzmpFnKu8tTqFHDqqbpW2nkIeqkIAYrkF7GGL+iVZ2pUnli3cWD8JmQoWllSfVBw+1c0dbLVyeMHuZadcRhDfQGF5zg+xDZfF9ef8J7iw9GRp2Eal8Ze5BQ5bRtGw1Pm1GYBrDj+5ws53fY/ma+fvoMT1OP1CuT5aNXw+wvnC2OL8PeQ7AAAA//8DAFBLAQItABQABgAIAAAAIQBnzQ+udAEAADoFAAATAAAAAAAAAAAAAAAAAAAAAABbQ29udGVudF9UeXBlc10ueG1sUEsBAi0AFAAGAAgAAAAhAMfCJ7z/AAAA3wIAAAsAAAAAAAAAAAAAAAAArQMAAF9yZWxzLy5yZWxzUEsBAi0AFAAGAAgAAAAhABOqPof2AAAAMQMAABwAAAAAAAAAAAAAAAAA3QYAAHdvcmQvX3JlbHMvZG9jdW1lbnQueG1sLnJlbHNQSwECLQAUAAYACAAAACEAM+oBymACAAACBwAAEQAAAAAAAAAAAAAAAAAVCQAAd29yZC9kb2N1bWVudC54bWxQSwECLQAUAAYACAAAACEAJyDgAjMGAACMGgAAFQAAAAAAAAAAAAAAAACkCwAAd29yZC90aGVtZS90aGVtZTEueG1sUEsBAi0ACgAAAAAAAAAhAGoT2A2MJQAAjCUAABcAAAAAAAAAAAAAAAAAChIAAGRvY1Byb3BzL3RodW1ibmFpbC5qcGVnUEsBAi0AFAAGAAgAAAAhANJeFd+BAwAATAkAABEAAAAAAAAAAAAAAAAAyzcAAHdvcmQvc2V0dGluZ3MueG1sUEsBAi0AFAAGAAgAAAAhAPC8NQHcAQAA8QUAABIAAAAAAAAAAAAAAAAAezsAAHdvcmQvZm9udFRhYmxlLnhtbFBLAQItABQABgAIAAAAIQDgi8pVHwEAABECAAAUAAAAAAAAAAAAAAAAAIc9AAB3b3JkL3dlYlNldHRpbmdzLnhtbFBLAQItABQABgAIAAAAIQCf6lVfewEAABUDAAARAAAAAAAAAAAAAAAAANg+AABkb2NQcm9wcy9jb3JlLnhtbFBLAQItABQABgAIAAAAIQCBlv05MgsAAGRyAAAPAAAAAAAAAAAAAAAAAIpBAAB3b3JkL3N0eWxlcy54bWxQSwECLQAUAAYACAAAACEA7SfiumUBAAC1AgAAEAAAAAAAAAAAAAAAAADpTAAAZG9jUHJvcHMvYXBwLnhtbFBLBQYAAAAADAAMAAYDAACETwAAAAA='], + ['data:a!b#c&d-e^f_g+h.i/a!b#c&d-e^f_g+h.i;base64,foobar'], + ]; if (!\defined('HHVM_VERSION')) { // See https://github.com/facebook/hhvm/issues/6354 - $data[] = array('data:text/plain;charset=utf-8;base64,SGVsbG8gV29ybGQh'); + $data[] = ['data:text/plain;charset=utf-8;base64,SGVsbG8gV29ybGQh']; } return $data; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DateIntervalNormalizerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DateIntervalNormalizerTest.php index f6dc6c24..b092c779 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DateIntervalNormalizerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DateIntervalNormalizerTest.php @@ -22,14 +22,14 @@ class DateIntervalNormalizerTest extends TestCase public function dataProviderISO() { - $data = array( - array('P%YY%MM%DDT%HH%IM%SS', 'P00Y00M00DT00H00M00S', 'PT0S'), - array('P%yY%mM%dDT%hH%iM%sS', 'P0Y0M0DT0H0M0S', 'PT0S'), - array('P%yY%mM%dDT%hH%iM%sS', 'P10Y2M3DT16H5M6S', 'P10Y2M3DT16H5M6S'), - array('P%yY%mM%dDT%hH%iM', 'P10Y2M3DT16H5M', 'P10Y2M3DT16H5M'), - array('P%yY%mM%dDT%hH', 'P10Y2M3DT16H', 'P10Y2M3DT16H'), - array('P%yY%mM%dD', 'P10Y2M3D', 'P10Y2M3DT0H'), - ); + $data = [ + ['P%YY%MM%DDT%HH%IM%SS', 'P00Y00M00DT00H00M00S', 'PT0S'], + ['P%yY%mM%dDT%hH%iM%sS', 'P0Y0M0DT0H0M0S', 'PT0S'], + ['P%yY%mM%dDT%hH%iM%sS', 'P10Y2M3DT16H5M6S', 'P10Y2M3DT16H5M6S'], + ['P%yY%mM%dDT%hH%iM', 'P10Y2M3DT16H5M', 'P10Y2M3DT16H5M'], + ['P%yY%mM%dDT%hH', 'P10Y2M3DT16H', 'P10Y2M3DT16H'], + ['P%yY%mM%dD', 'P10Y2M3D', 'P10Y2M3DT0H'], + ]; return $data; } @@ -50,7 +50,7 @@ class DateIntervalNormalizerTest extends TestCase */ public function testNormalizeUsingFormatPassedInContext($format, $output, $input) { - $this->assertEquals($output, $this->normalizer->normalize(new \DateInterval($input), null, array(DateIntervalNormalizer::FORMAT_KEY => $format))); + $this->assertEquals($output, $this->normalizer->normalize(new \DateInterval($input), null, [DateIntervalNormalizer::FORMAT_KEY => $format])); } /** @@ -86,7 +86,7 @@ class DateIntervalNormalizerTest extends TestCase */ public function testDenormalizeUsingFormatPassedInContext($format, $input, $output) { - $this->assertDateIntervalEquals(new \DateInterval($output), $this->normalizer->denormalize($input, \DateInterval::class, null, array(DateIntervalNormalizer::FORMAT_KEY => $format))); + $this->assertDateIntervalEquals(new \DateInterval($output), $this->normalizer->denormalize($input, \DateInterval::class, null, [DateIntervalNormalizer::FORMAT_KEY => $format])); } /** @@ -127,7 +127,7 @@ class DateIntervalNormalizerTest extends TestCase */ public function testDenormalizeFormatMismatchThrowsException() { - $this->normalizer->denormalize('P00Y00M00DT00H00M00S', \DateInterval::class, null, array(DateIntervalNormalizer::FORMAT_KEY => 'P%yY%mM%dD')); + $this->normalizer->denormalize('P00Y00M00DT00H00M00S', \DateInterval::class, null, [DateIntervalNormalizer::FORMAT_KEY => 'P%yY%mM%dD']); } private function assertDateIntervalEquals(\DateInterval $expected, \DateInterval $actual) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php index 178519b3..5ff41c80 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php @@ -44,7 +44,7 @@ class DateTimeNormalizerTest extends TestCase public function testNormalizeUsingFormatPassedInContext() { - $this->assertEquals('2016', $this->normalizer->normalize(new \DateTime('2016/01/01'), null, array(DateTimeNormalizer::FORMAT_KEY => 'Y'))); + $this->assertEquals('2016', $this->normalizer->normalize(new \DateTime('2016/01/01'), null, [DateTimeNormalizer::FORMAT_KEY => 'Y'])); } public function testNormalizeUsingFormatPassedInConstructor() @@ -65,17 +65,93 @@ class DateTimeNormalizerTest extends TestCase */ public function testNormalizeUsingTimeZonePassedInContext($expected, $input, $timezone) { - $this->assertSame($expected, $this->normalizer->normalize($input, null, array( + $this->assertSame($expected, $this->normalizer->normalize($input, null, [ DateTimeNormalizer::TIMEZONE_KEY => $timezone, - ))); + ])); } public function normalizeUsingTimeZonePassedInContextProvider() { - yield array('2016-12-01T00:00:00+00:00', new \DateTime('2016/12/01', new \DateTimeZone('UTC')), null); - yield array('2016-12-01T00:00:00+09:00', new \DateTime('2016/12/01', new \DateTimeZone('Japan')), new \DateTimeZone('Japan')); - yield array('2016-12-01T09:00:00+09:00', new \DateTime('2016/12/01', new \DateTimeZone('UTC')), new \DateTimeZone('Japan')); - yield array('2016-12-01T09:00:00+09:00', new \DateTimeImmutable('2016/12/01', new \DateTimeZone('UTC')), new \DateTimeZone('Japan')); + yield ['2016-12-01T00:00:00+00:00', new \DateTime('2016/12/01', new \DateTimeZone('UTC')), null]; + yield ['2016-12-01T00:00:00+09:00', new \DateTime('2016/12/01', new \DateTimeZone('Japan')), new \DateTimeZone('Japan')]; + yield ['2016-12-01T09:00:00+09:00', new \DateTime('2016/12/01', new \DateTimeZone('UTC')), new \DateTimeZone('Japan')]; + yield ['2016-12-01T09:00:00+09:00', new \DateTimeImmutable('2016/12/01', new \DateTimeZone('UTC')), new \DateTimeZone('Japan')]; + } + + /** + * @dataProvider normalizeUsingTimeZonePassedInContextAndExpectedFormatWithMicrosecondsProvider + */ + public function testNormalizeUsingTimeZonePassedInContextAndFormattedWithMicroseconds($expected, $expectedFormat, $input, $timezone) + { + $this->assertSame( + $expected, + $this->normalizer->normalize( + $input, + null, + [ + DateTimeNormalizer::TIMEZONE_KEY => $timezone, + DateTimeNormalizer::FORMAT_KEY => $expectedFormat, + ] + ) + ); + } + + public function normalizeUsingTimeZonePassedInContextAndExpectedFormatWithMicrosecondsProvider() + { + yield [ + '2018-12-01T18:03:06.067634', + 'Y-m-d\TH:i:s.u', + \DateTime::createFromFormat( + 'Y-m-d\TH:i:s.u', + '2018-12-01T18:03:06.067634', + new \DateTimeZone('UTC') + ), + null, + ]; + + yield [ + '2018-12-01T18:03:06.067634', + 'Y-m-d\TH:i:s.u', + \DateTime::createFromFormat( + 'Y-m-d\TH:i:s.u', + '2018-12-01T18:03:06.067634', + new \DateTimeZone('UTC') + ), + new \DateTimeZone('UTC'), + ]; + + yield [ + '2018-12-01T19:03:06.067634+01:00', + 'Y-m-d\TH:i:s.uP', + \DateTimeImmutable::createFromFormat( + 'Y-m-d\TH:i:s.u', + '2018-12-01T18:03:06.067634', + new \DateTimeZone('UTC') + ), + new \DateTimeZone('Europe/Rome'), + ]; + + yield [ + '2018-12-01T20:03:06.067634+02:00', + 'Y-m-d\TH:i:s.uP', + \DateTime::createFromFormat( + 'Y-m-d\TH:i:s.u', + '2018-12-01T18:03:06.067634', + new \DateTimeZone('UTC') + ), + new \DateTimeZone('Europe/Kiev'), + ]; + + yield [ + '2018-12-01T19:03:06.067634', + 'Y-m-d\TH:i:s.u', + \DateTime::createFromFormat( + 'Y-m-d\TH:i:s.u', + '2018-12-01T18:03:06.067634', + new \DateTimeZone('UTC') + ), + new \DateTimeZone('Europe/Berlin'), + ]; } /** @@ -108,16 +184,16 @@ class DateTimeNormalizerTest extends TestCase $expected = new \DateTime('2016/12/01 17:35:00', $timezone); $normalizer = new DateTimeNormalizer(null, $timezone); - $this->assertEquals($expected, $normalizer->denormalize('2016.12.01 17:35:00', \DateTime::class, null, array( + $this->assertEquals($expected, $normalizer->denormalize('2016.12.01 17:35:00', \DateTime::class, null, [ DateTimeNormalizer::FORMAT_KEY => 'Y.m.d H:i:s', - ))); + ])); } public function testDenormalizeUsingFormatPassedInContext() { - $this->assertEquals(new \DateTimeImmutable('2016/01/01'), $this->normalizer->denormalize('2016.01.01', \DateTimeInterface::class, null, array(DateTimeNormalizer::FORMAT_KEY => 'Y.m.d|'))); - $this->assertEquals(new \DateTimeImmutable('2016/01/01'), $this->normalizer->denormalize('2016.01.01', \DateTimeImmutable::class, null, array(DateTimeNormalizer::FORMAT_KEY => 'Y.m.d|'))); - $this->assertEquals(new \DateTime('2016/01/01'), $this->normalizer->denormalize('2016.01.01', \DateTime::class, null, array(DateTimeNormalizer::FORMAT_KEY => 'Y.m.d|'))); + $this->assertEquals(new \DateTimeImmutable('2016/01/01'), $this->normalizer->denormalize('2016.01.01', \DateTimeInterface::class, null, [DateTimeNormalizer::FORMAT_KEY => 'Y.m.d|'])); + $this->assertEquals(new \DateTimeImmutable('2016/01/01'), $this->normalizer->denormalize('2016.01.01', \DateTimeImmutable::class, null, [DateTimeNormalizer::FORMAT_KEY => 'Y.m.d|'])); + $this->assertEquals(new \DateTime('2016/01/01'), $this->normalizer->denormalize('2016.01.01', \DateTime::class, null, [DateTimeNormalizer::FORMAT_KEY => 'Y.m.d|'])); } /** @@ -125,38 +201,38 @@ class DateTimeNormalizerTest extends TestCase */ public function testDenormalizeUsingTimezonePassedInContext($input, $expected, $timezone, $format = null) { - $actual = $this->normalizer->denormalize($input, \DateTimeInterface::class, null, array( + $actual = $this->normalizer->denormalize($input, \DateTimeInterface::class, null, [ DateTimeNormalizer::TIMEZONE_KEY => $timezone, DateTimeNormalizer::FORMAT_KEY => $format, - )); + ]); $this->assertEquals($expected, $actual); } public function denormalizeUsingTimezonePassedInContextProvider() { - yield 'with timezone' => array( + yield 'with timezone' => [ '2016/12/01 17:35:00', new \DateTimeImmutable('2016/12/01 17:35:00', new \DateTimeZone('Japan')), new \DateTimeZone('Japan'), - ); - yield 'with timezone as string' => array( + ]; + yield 'with timezone as string' => [ '2016/12/01 17:35:00', new \DateTimeImmutable('2016/12/01 17:35:00', new \DateTimeZone('Japan')), 'Japan', - ); - yield 'with format without timezone information' => array( + ]; + yield 'with format without timezone information' => [ '2016.12.01 17:35:00', new \DateTimeImmutable('2016/12/01 17:35:00', new \DateTimeZone('Japan')), new \DateTimeZone('Japan'), 'Y.m.d H:i:s', - ); - yield 'ignored with format with timezone information' => array( + ]; + yield 'ignored with format with timezone information' => [ '2016-12-01T17:35:00Z', new \DateTimeImmutable('2016/12/01 17:35:00', new \DateTimeZone('UTC')), 'Europe/Paris', \DateTime::RFC3339, - ); + ]; } /** @@ -190,6 +266,6 @@ class DateTimeNormalizerTest extends TestCase */ public function testDenormalizeFormatMismatchThrowsException() { - $this->normalizer->denormalize('2016-01-01T00:00:00+00:00', \DateTimeInterface::class, null, array(DateTimeNormalizer::FORMAT_KEY => 'Y-m-d|')); + $this->normalizer->denormalize('2016-01-01T00:00:00+00:00', \DateTimeInterface::class, null, [DateTimeNormalizer::FORMAT_KEY => 'Y-m-d|']); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php index a087d3de..fe56c38a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php @@ -67,14 +67,14 @@ class GetSetMethodNormalizerTest extends TestCase ; $this->assertEquals( - array( + [ 'foo' => 'foo', 'bar' => 'bar', 'baz' => true, 'fooBar' => 'foobar', 'camelCase' => 'camelcase', 'object' => 'string_object', - ), + ], $this->normalizer->normalize($obj, 'any') ); } @@ -82,7 +82,7 @@ class GetSetMethodNormalizerTest extends TestCase public function testDenormalize() { $obj = $this->normalizer->denormalize( - array('foo' => 'foo', 'bar' => 'bar', 'baz' => true, 'fooBar' => 'foobar'), + ['foo' => 'foo', 'bar' => 'bar', 'baz' => true, 'fooBar' => 'foobar'], __NAMESPACE__.'\GetSetDummy', 'any' ); @@ -110,7 +110,7 @@ class GetSetMethodNormalizerTest extends TestCase public function testConstructorDenormalize() { $obj = $this->normalizer->denormalize( - array('foo' => 'foo', 'bar' => 'bar', 'baz' => true, 'fooBar' => 'foobar'), + ['foo' => 'foo', 'bar' => 'bar', 'baz' => true, 'fooBar' => 'foobar'], __NAMESPACE__.'\GetConstructorDummy', 'any'); $this->assertEquals('foo', $obj->getFoo()); $this->assertEquals('bar', $obj->getBar()); @@ -120,7 +120,7 @@ class GetSetMethodNormalizerTest extends TestCase public function testConstructorDenormalizeWithNullArgument() { $obj = $this->normalizer->denormalize( - array('foo' => 'foo', 'bar' => null, 'baz' => true), + ['foo' => 'foo', 'bar' => null, 'baz' => true], __NAMESPACE__.'\GetConstructorDummy', 'any'); $this->assertEquals('foo', $obj->getFoo()); $this->assertNull($obj->getBar()); @@ -130,19 +130,19 @@ class GetSetMethodNormalizerTest extends TestCase public function testConstructorDenormalizeWithMissingOptionalArgument() { $obj = $this->normalizer->denormalize( - array('foo' => 'test', 'baz' => array(1, 2, 3)), + ['foo' => 'test', 'baz' => [1, 2, 3]], __NAMESPACE__.'\GetConstructorOptionalArgsDummy', 'any'); $this->assertEquals('test', $obj->getFoo()); - $this->assertEquals(array(), $obj->getBar()); - $this->assertEquals(array(1, 2, 3), $obj->getBaz()); + $this->assertEquals([], $obj->getBar()); + $this->assertEquals([1, 2, 3], $obj->getBaz()); } public function testConstructorDenormalizeWithOptionalDefaultArgument() { $obj = $this->normalizer->denormalize( - array('bar' => 'test'), + ['bar' => 'test'], __NAMESPACE__.'\GetConstructorArgsWithDefaultValueDummy', 'any'); - $this->assertEquals(array(), $obj->getFoo()); + $this->assertEquals([], $obj->getFoo()); $this->assertEquals('test', $obj->getBar()); } @@ -152,9 +152,9 @@ class GetSetMethodNormalizerTest extends TestCase public function testConstructorDenormalizeWithVariadicArgument() { $obj = $this->normalizer->denormalize( - array('foo' => array(1, 2, 3)), + ['foo' => [1, 2, 3]], 'Symfony\Component\Serializer\Tests\Fixtures\VariadicConstructorArgsDummy', 'any'); - $this->assertEquals(array(1, 2, 3), $obj->getFoo()); + $this->assertEquals([1, 2, 3], $obj->getFoo()); } /** @@ -163,9 +163,9 @@ class GetSetMethodNormalizerTest extends TestCase public function testConstructorDenormalizeWithMissingVariadicArgument() { $obj = $this->normalizer->denormalize( - array(), + [], 'Symfony\Component\Serializer\Tests\Fixtures\VariadicConstructorArgsDummy', 'any'); - $this->assertEquals(array(), $obj->getFoo()); + $this->assertEquals([], $obj->getFoo()); } public function testConstructorWithObjectDenormalize() @@ -182,7 +182,7 @@ class GetSetMethodNormalizerTest extends TestCase public function testConstructorWArgWithPrivateMutator() { - $obj = $this->normalizer->denormalize(array('foo' => 'bar'), __NAMESPACE__.'\ObjectConstructorArgsWithPrivateMutatorDummy', 'any'); + $obj = $this->normalizer->denormalize(['foo' => 'bar'], __NAMESPACE__.'\ObjectConstructorArgsWithPrivateMutatorDummy', 'any'); $this->assertEquals('bar', $obj->getFoo()); } @@ -200,18 +200,18 @@ class GetSetMethodNormalizerTest extends TestCase $obj->setKevin('kevin'); $obj->setCoopTilleuls('coopTilleuls'); - $this->assertEquals(array( + $this->assertEquals([ 'bar' => 'bar', - ), $this->normalizer->normalize($obj, null, array(GetSetMethodNormalizer::GROUPS => array('c')))); + ], $this->normalizer->normalize($obj, null, [GetSetMethodNormalizer::GROUPS => ['c']])); - $this->assertEquals(array( + $this->assertEquals([ 'symfony' => 'symfony', 'foo' => 'foo', 'fooBar' => 'fooBar', 'bar' => 'bar', 'kevin' => 'kevin', 'coopTilleuls' => 'coopTilleuls', - ), $this->normalizer->normalize($obj, null, array(GetSetMethodNormalizer::GROUPS => array('a', 'c')))); + ], $this->normalizer->normalize($obj, null, [GetSetMethodNormalizer::GROUPS => ['a', 'c']])); } public function testGroupsDenormalize() @@ -223,13 +223,13 @@ class GetSetMethodNormalizerTest extends TestCase $obj = new GroupDummy(); $obj->setFoo('foo'); - $toNormalize = array('foo' => 'foo', 'bar' => 'bar'); + $toNormalize = ['foo' => 'foo', 'bar' => 'bar']; $normalized = $this->normalizer->denormalize( $toNormalize, 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', null, - array(GetSetMethodNormalizer::GROUPS => array('a')) + [GetSetMethodNormalizer::GROUPS => ['a']] ); $this->assertEquals($obj, $normalized); @@ -239,7 +239,7 @@ class GetSetMethodNormalizerTest extends TestCase $toNormalize, 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', null, - array(GetSetMethodNormalizer::GROUPS => array('a', 'b')) + [GetSetMethodNormalizer::GROUPS => ['a', 'b']] ); $this->assertEquals($obj, $normalized); } @@ -256,12 +256,12 @@ class GetSetMethodNormalizerTest extends TestCase $obj->setCoopTilleuls('les-tilleuls.coop'); $this->assertEquals( - array( + [ 'bar' => null, 'foo_bar' => '@dunglas', 'symfony' => '@coopTilleuls', - ), - $this->normalizer->normalize($obj, null, array(GetSetMethodNormalizer::GROUPS => array('name_converter'))) + ], + $this->normalizer->normalize($obj, null, [GetSetMethodNormalizer::GROUPS => ['name_converter']]) ); } @@ -277,12 +277,12 @@ class GetSetMethodNormalizerTest extends TestCase $this->assertEquals( $obj, - $this->normalizer->denormalize(array( + $this->normalizer->denormalize([ 'bar' => null, 'foo_bar' => '@dunglas', 'symfony' => '@coopTilleuls', 'coop_tilleuls' => 'les-tilleuls.coop', - ), 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', null, array(GetSetMethodNormalizer::GROUPS => array('name_converter'))) + ], 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', null, [GetSetMethodNormalizer::GROUPS => ['name_converter']]) ); } @@ -307,7 +307,7 @@ class GetSetMethodNormalizerTest extends TestCase */ public function testUncallableCallbacks() { - $this->normalizer->setCallbacks(array('bar' => null)); + $this->normalizer->setCallbacks(['bar' => null]); $obj = new GetConstructorDummy('baz', 'quux', true); @@ -316,7 +316,7 @@ class GetSetMethodNormalizerTest extends TestCase public function testIgnoredAttributes() { - $this->normalizer->setIgnoredAttributes(array('foo', 'bar', 'baz', 'camelCase', 'object')); + $this->normalizer->setIgnoredAttributes(['foo', 'bar', 'baz', 'camelCase', 'object']); $obj = new GetSetDummy(); $obj->setFoo('foo'); @@ -324,45 +324,45 @@ class GetSetMethodNormalizerTest extends TestCase $obj->setBaz(true); $this->assertEquals( - array('fooBar' => 'foobar'), + ['fooBar' => 'foobar'], $this->normalizer->normalize($obj, 'any') ); } public function provideCallbacks() { - return array( - array( - array( + return [ + [ + [ 'bar' => function ($bar) { return 'baz'; }, - ), + ], 'baz', - array('foo' => '', 'bar' => 'baz', 'baz' => true), + ['foo' => '', 'bar' => 'baz', 'baz' => true], 'Change a string', - ), - array( - array( + ], + [ + [ 'bar' => function ($bar) { }, - ), + ], 'baz', - array('foo' => '', 'bar' => null, 'baz' => true), + ['foo' => '', 'bar' => null, 'baz' => true], 'Null an item', - ), - array( - array( + ], + [ + [ 'bar' => function ($bar) { return $bar->format('d-m-Y H:i:s'); }, - ), + ], new \DateTime('2011-09-10 06:30:00'), - array('foo' => '', 'bar' => '10-09-2011 06:30:00', 'baz' => true), + ['foo' => '', 'bar' => '10-09-2011 06:30:00', 'baz' => true], 'Format a date', - ), - array( - array( + ], + [ + [ 'bar' => function ($bars) { $foos = ''; foreach ($bars as $bar) { @@ -371,22 +371,22 @@ class GetSetMethodNormalizerTest extends TestCase return $foos; }, - ), - array(new GetConstructorDummy('baz', '', false), new GetConstructorDummy('quux', '', false)), - array('foo' => '', 'bar' => 'bazquux', 'baz' => true), + ], + [new GetConstructorDummy('baz', '', false), new GetConstructorDummy('quux', '', false)], + ['foo' => '', 'bar' => 'bazquux', 'baz' => true], 'Collect a property', - ), - array( - array( + ], + [ + [ 'bar' => function ($bars) { return \count($bars); }, - ), - array(new GetConstructorDummy('baz', '', false), new GetConstructorDummy('quux', '', false)), - array('foo' => '', 'bar' => 2, 'baz' => true), + ], + [new GetConstructorDummy('baz', '', false), new GetConstructorDummy('quux', '', false)], + ['foo' => '', 'bar' => 2, 'baz' => true], 'Count a property', - ), - ); + ], + ]; } /** @@ -410,7 +410,7 @@ class GetSetMethodNormalizerTest extends TestCase */ public function testUnableToNormalizeCircularReference() { - $serializer = new Serializer(array($this->normalizer)); + $serializer = new Serializer([$this->normalizer]); $this->normalizer->setSerializer($serializer); $this->normalizer->setCircularReferenceLimit(2); @@ -421,22 +421,22 @@ class GetSetMethodNormalizerTest extends TestCase public function testSiblingReference() { - $serializer = new Serializer(array($this->normalizer)); + $serializer = new Serializer([$this->normalizer]); $this->normalizer->setSerializer($serializer); $siblingHolder = new SiblingHolder(); - $expected = array( - 'sibling0' => array('coopTilleuls' => 'Les-Tilleuls.coop'), - 'sibling1' => array('coopTilleuls' => 'Les-Tilleuls.coop'), - 'sibling2' => array('coopTilleuls' => 'Les-Tilleuls.coop'), - ); + $expected = [ + 'sibling0' => ['coopTilleuls' => 'Les-Tilleuls.coop'], + 'sibling1' => ['coopTilleuls' => 'Les-Tilleuls.coop'], + 'sibling2' => ['coopTilleuls' => 'Les-Tilleuls.coop'], + ]; $this->assertEquals($expected, $this->normalizer->normalize($siblingHolder)); } public function testCircularReferenceHandler() { - $serializer = new Serializer(array($this->normalizer)); + $serializer = new Serializer([$this->normalizer]); $this->normalizer->setSerializer($serializer); $this->normalizer->setCircularReferenceHandler(function ($obj) { return \get_class($obj); @@ -444,7 +444,7 @@ class GetSetMethodNormalizerTest extends TestCase $obj = new CircularReferenceDummy(); - $expected = array('me' => 'Symfony\Component\Serializer\Tests\Fixtures\CircularReferenceDummy'); + $expected = ['me' => 'Symfony\Component\Serializer\Tests\Fixtures\CircularReferenceDummy']; $this->assertEquals($expected, $this->normalizer->normalize($obj)); } @@ -454,10 +454,10 @@ class GetSetMethodNormalizerTest extends TestCase $dummy->setFoo('foo'); $obj = $this->normalizer->denormalize( - array('bar' => 'bar'), + ['bar' => 'bar'], __NAMESPACE__.'\GetSetDummy', null, - array(GetSetMethodNormalizer::OBJECT_TO_POPULATE => $dummy) + [GetSetMethodNormalizer::OBJECT_TO_POPULATE => $dummy] ); $this->assertEquals($dummy, $obj); @@ -469,13 +469,13 @@ class GetSetMethodNormalizerTest extends TestCase { $this->assertEquals( new GetSetDummy(), - $this->normalizer->denormalize(array('non_existing' => true), __NAMESPACE__.'\GetSetDummy') + $this->normalizer->denormalize(['non_existing' => true], __NAMESPACE__.'\GetSetDummy') ); } public function testDenormalizeShouldNotSetStaticAttribute() { - $obj = $this->normalizer->denormalize(array('staticObject' => true), __NAMESPACE__.'\GetSetDummy'); + $obj = $this->normalizer->denormalize(['staticObject' => true], __NAMESPACE__.'\GetSetDummy'); $this->assertEquals(new GetSetDummy(), $obj); $this->assertNull(GetSetDummy::getStaticObject()); @@ -493,13 +493,13 @@ class GetSetMethodNormalizerTest extends TestCase public function testPrivateSetter() { - $obj = $this->normalizer->denormalize(array('foo' => 'foobar'), __NAMESPACE__.'\ObjectWithPrivateSetterDummy'); + $obj = $this->normalizer->denormalize(['foo' => 'foobar'], __NAMESPACE__.'\ObjectWithPrivateSetterDummy'); $this->assertEquals('bar', $obj->getFoo()); } public function testHasGetterDenormalize() { - $obj = $this->normalizer->denormalize(array('foo' => true), ObjectWithHasGetterDummy::class); + $obj = $this->normalizer->denormalize(['foo' => true], ObjectWithHasGetterDummy::class); $this->assertTrue($obj->hasFoo()); } @@ -509,7 +509,7 @@ class GetSetMethodNormalizerTest extends TestCase $obj->setFoo(true); $this->assertEquals( - array('foo' => true), + ['foo' => true], $this->normalizer->normalize($obj, 'any') ); } @@ -518,7 +518,7 @@ class GetSetMethodNormalizerTest extends TestCase { $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); $this->normalizer = new GetSetMethodNormalizer($classMetadataFactory); - $serializer = new Serializer(array($this->normalizer)); + $serializer = new Serializer([$this->normalizer]); $this->normalizer->setSerializer($serializer); $level1 = new MaxDepthDummy(); @@ -536,20 +536,20 @@ class GetSetMethodNormalizerTest extends TestCase $level4->bar = 'level4'; $level3->child = $level4; - $result = $serializer->normalize($level1, null, array(GetSetMethodNormalizer::ENABLE_MAX_DEPTH => true)); + $result = $serializer->normalize($level1, null, [GetSetMethodNormalizer::ENABLE_MAX_DEPTH => true]); - $expected = array( + $expected = [ 'bar' => 'level1', - 'child' => array( + 'child' => [ 'bar' => 'level2', - 'child' => array( + 'child' => [ 'bar' => 'level3', - 'child' => array( + 'child' => [ 'child' => null, - ), - ), - ), - ); + ], + ], + ], + ]; $this->assertEquals($expected, $result); } @@ -684,7 +684,7 @@ class GetConstructorOptionalArgsDummy private $bar; private $baz; - public function __construct($foo, $bar = array(), $baz = array()) + public function __construct($foo, $bar = [], $baz = []) { $this->foo = $foo; $this->bar = $bar; @@ -717,7 +717,7 @@ class GetConstructorArgsWithDefaultValueDummy protected $foo; protected $bar; - public function __construct($foo = array(), $bar) + public function __construct($foo = [], $bar) { $this->foo = $foo; $this->bar = $bar; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/JsonSerializableNormalizerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/JsonSerializableNormalizerTest.php index 065d92b9..c6b167cb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/JsonSerializableNormalizerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/JsonSerializableNormalizerTest.php @@ -51,7 +51,7 @@ class JsonSerializableNormalizerTest extends TestCase ->expects($this->once()) ->method('normalize') ->will($this->returnCallback(function ($data) { - $this->assertArraySubset(array('foo' => 'a', 'bar' => 'b', 'baz' => 'c'), $data); + $this->assertArraySubset(['foo' => 'a', 'bar' => 'b', 'baz' => 'c'], $data); return 'string_object'; })) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php index 0a855d22..4068479c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php @@ -69,14 +69,14 @@ class ObjectNormalizerTest extends TestCase ; $this->assertEquals( - array( + [ 'foo' => 'foo', 'bar' => 'bar', 'baz' => true, 'fooBar' => 'foobar', 'camelCase' => 'camelcase', 'object' => 'string_object', - ), + ], $this->normalizer->normalize($obj, 'any') ); } @@ -84,7 +84,7 @@ class ObjectNormalizerTest extends TestCase public function testDenormalize() { $obj = $this->normalizer->denormalize( - array('foo' => 'foo', 'bar' => 'bar', 'baz' => true, 'fooBar' => 'foobar'), + ['foo' => 'foo', 'bar' => 'bar', 'baz' => true, 'fooBar' => 'foobar'], __NAMESPACE__.'\ObjectDummy', 'any' ); @@ -112,7 +112,7 @@ class ObjectNormalizerTest extends TestCase public function testConstructorDenormalize() { $obj = $this->normalizer->denormalize( - array('foo' => 'foo', 'bar' => 'bar', 'baz' => true, 'fooBar' => 'foobar'), + ['foo' => 'foo', 'bar' => 'bar', 'baz' => true, 'fooBar' => 'foobar'], __NAMESPACE__.'\ObjectConstructorDummy', 'any'); $this->assertEquals('foo', $obj->getFoo()); $this->assertEquals('bar', $obj->bar); @@ -122,7 +122,7 @@ class ObjectNormalizerTest extends TestCase public function testConstructorDenormalizeWithNullArgument() { $obj = $this->normalizer->denormalize( - array('foo' => 'foo', 'bar' => null, 'baz' => true), + ['foo' => 'foo', 'bar' => null, 'baz' => true], __NAMESPACE__.'\ObjectConstructorDummy', 'any'); $this->assertEquals('foo', $obj->getFoo()); $this->assertNull($obj->bar); @@ -132,19 +132,19 @@ class ObjectNormalizerTest extends TestCase public function testConstructorDenormalizeWithMissingOptionalArgument() { $obj = $this->normalizer->denormalize( - array('foo' => 'test', 'baz' => array(1, 2, 3)), + ['foo' => 'test', 'baz' => [1, 2, 3]], __NAMESPACE__.'\ObjectConstructorOptionalArgsDummy', 'any'); $this->assertEquals('test', $obj->getFoo()); - $this->assertEquals(array(), $obj->bar); - $this->assertEquals(array(1, 2, 3), $obj->getBaz()); + $this->assertEquals([], $obj->bar); + $this->assertEquals([1, 2, 3], $obj->getBaz()); } public function testConstructorDenormalizeWithOptionalDefaultArgument() { $obj = $this->normalizer->denormalize( - array('bar' => 'test'), + ['bar' => 'test'], __NAMESPACE__.'\ObjectConstructorArgsWithDefaultValueDummy', 'any'); - $this->assertEquals(array(), $obj->getFoo()); + $this->assertEquals([], $obj->getFoo()); $this->assertEquals('test', $obj->getBar()); } @@ -162,16 +162,16 @@ class ObjectNormalizerTest extends TestCase public function testConstructorWithObjectTypeHintDenormalize() { - $data = array( + $data = [ 'id' => 10, - 'inner' => array( + 'inner' => [ 'foo' => 'oof', 'bar' => 'rab', - ), - ); + ], + ]; $normalizer = new ObjectNormalizer(); - $serializer = new Serializer(array($normalizer)); + $serializer = new Serializer([$normalizer]); $normalizer->setSerializer($serializer); $obj = $normalizer->denormalize($data, DummyWithConstructorObject::class); @@ -188,16 +188,16 @@ class ObjectNormalizerTest extends TestCase */ public function testConstructorWithUnknownObjectTypeHintDenormalize() { - $data = array( + $data = [ 'id' => 10, - 'unknown' => array( + 'unknown' => [ 'foo' => 'oof', 'bar' => 'rab', - ), - ); + ], + ]; $normalizer = new ObjectNormalizer(); - $serializer = new Serializer(array($normalizer)); + $serializer = new Serializer([$normalizer]); $normalizer->setSerializer($serializer); $normalizer->denormalize($data, DummyWithConstructorInexistingObject::class); @@ -217,18 +217,18 @@ class ObjectNormalizerTest extends TestCase $obj->setKevin('kevin'); $obj->setCoopTilleuls('coopTilleuls'); - $this->assertEquals(array( + $this->assertEquals([ 'bar' => 'bar', - ), $this->normalizer->normalize($obj, null, array(ObjectNormalizer::GROUPS => array('c')))); + ], $this->normalizer->normalize($obj, null, [ObjectNormalizer::GROUPS => ['c']])); - $this->assertEquals(array( + $this->assertEquals([ 'symfony' => 'symfony', 'foo' => 'foo', 'fooBar' => 'fooBar', 'bar' => 'bar', 'kevin' => 'kevin', 'coopTilleuls' => 'coopTilleuls', - ), $this->normalizer->normalize($obj, null, array(ObjectNormalizer::GROUPS => array('a', 'c')))); + ], $this->normalizer->normalize($obj, null, [ObjectNormalizer::GROUPS => ['a', 'c']])); } public function testGroupsDenormalize() @@ -240,13 +240,13 @@ class ObjectNormalizerTest extends TestCase $obj = new GroupDummy(); $obj->setFoo('foo'); - $toNormalize = array('foo' => 'foo', 'bar' => 'bar'); + $toNormalize = ['foo' => 'foo', 'bar' => 'bar']; $normalized = $this->normalizer->denormalize( $toNormalize, 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', null, - array(ObjectNormalizer::GROUPS => array('a')) + [ObjectNormalizer::GROUPS => ['a']] ); $this->assertEquals($obj, $normalized); @@ -256,7 +256,7 @@ class ObjectNormalizerTest extends TestCase $toNormalize, 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', null, - array(ObjectNormalizer::GROUPS => array('a', 'b')) + [ObjectNormalizer::GROUPS => ['a', 'b']] ); $this->assertEquals($obj, $normalized); } @@ -270,7 +270,7 @@ class ObjectNormalizerTest extends TestCase $obj = new GroupDummy(); $obj->setFoo('foo'); - $this->assertEquals(array(), $this->normalizer->normalize($obj, null, array('groups' => array('notExist')))); + $this->assertEquals([], $this->normalizer->normalize($obj, null, ['groups' => ['notExist']])); } public function testGroupsNormalizeWithNameConverter() @@ -285,12 +285,12 @@ class ObjectNormalizerTest extends TestCase $obj->setCoopTilleuls('les-tilleuls.coop'); $this->assertEquals( - array( + [ 'bar' => null, 'foo_bar' => '@dunglas', 'symfony' => '@coopTilleuls', - ), - $this->normalizer->normalize($obj, null, array(ObjectNormalizer::GROUPS => array('name_converter'))) + ], + $this->normalizer->normalize($obj, null, [ObjectNormalizer::GROUPS => ['name_converter']]) ); } @@ -306,12 +306,12 @@ class ObjectNormalizerTest extends TestCase $this->assertEquals( $obj, - $this->normalizer->denormalize(array( + $this->normalizer->denormalize([ 'bar' => null, 'foo_bar' => '@dunglas', 'symfony' => '@coopTilleuls', 'coop_tilleuls' => 'les-tilleuls.coop', - ), 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', null, array(ObjectNormalizer::GROUPS => array('name_converter'))) + ], 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', null, [ObjectNormalizer::GROUPS => ['name_converter']]) ); } @@ -336,7 +336,7 @@ class ObjectNormalizerTest extends TestCase */ public function testUncallableCallbacks() { - $this->normalizer->setCallbacks(array('bar' => null)); + $this->normalizer->setCallbacks(['bar' => null]); $obj = new ObjectConstructorDummy('baz', 'quux', true); @@ -345,7 +345,7 @@ class ObjectNormalizerTest extends TestCase public function testIgnoredAttributes() { - $this->normalizer->setIgnoredAttributes(array('foo', 'bar', 'baz', 'camelCase', 'object')); + $this->normalizer->setIgnoredAttributes(['foo', 'bar', 'baz', 'camelCase', 'object']); $obj = new ObjectDummy(); $obj->setFoo('foo'); @@ -353,59 +353,59 @@ class ObjectNormalizerTest extends TestCase $obj->setBaz(true); $this->assertEquals( - array('fooBar' => 'foobar'), + ['fooBar' => 'foobar'], $this->normalizer->normalize($obj, 'any') ); } public function testIgnoredAttributesDenormalize() { - $this->normalizer->setIgnoredAttributes(array('fooBar', 'bar', 'baz')); + $this->normalizer->setIgnoredAttributes(['fooBar', 'bar', 'baz']); $obj = new ObjectDummy(); $obj->setFoo('foo'); $this->assertEquals( $obj, - $this->normalizer->denormalize(array('fooBar' => 'fooBar', 'foo' => 'foo', 'baz' => 'baz'), __NAMESPACE__.'\ObjectDummy') + $this->normalizer->denormalize(['fooBar' => 'fooBar', 'foo' => 'foo', 'baz' => 'baz'], __NAMESPACE__.'\ObjectDummy') ); } public function provideCallbacks() { - return array( - array( - array( + return [ + [ + [ 'bar' => function ($bar) { return 'baz'; }, - ), + ], 'baz', - array('foo' => '', 'bar' => 'baz', 'baz' => true), + ['foo' => '', 'bar' => 'baz', 'baz' => true], 'Change a string', - ), - array( - array( + ], + [ + [ 'bar' => function ($bar) { return; }, - ), + ], 'baz', - array('foo' => '', 'bar' => null, 'baz' => true), + ['foo' => '', 'bar' => null, 'baz' => true], 'Null an item', - ), - array( - array( + ], + [ + [ 'bar' => function ($bar) { return $bar->format('d-m-Y H:i:s'); }, - ), + ], new \DateTime('2011-09-10 06:30:00'), - array('foo' => '', 'bar' => '10-09-2011 06:30:00', 'baz' => true), + ['foo' => '', 'bar' => '10-09-2011 06:30:00', 'baz' => true], 'Format a date', - ), - array( - array( + ], + [ + [ 'bar' => function ($bars) { $foos = ''; foreach ($bars as $bar) { @@ -414,22 +414,22 @@ class ObjectNormalizerTest extends TestCase return $foos; }, - ), - array(new ObjectConstructorDummy('baz', '', false), new ObjectConstructorDummy('quux', '', false)), - array('foo' => '', 'bar' => 'bazquux', 'baz' => true), + ], + [new ObjectConstructorDummy('baz', '', false), new ObjectConstructorDummy('quux', '', false)], + ['foo' => '', 'bar' => 'bazquux', 'baz' => true], 'Collect a property', - ), - array( - array( + ], + [ + [ 'bar' => function ($bars) { return \count($bars); }, - ), - array(new ObjectConstructorDummy('baz', '', false), new ObjectConstructorDummy('quux', '', false)), - array('foo' => '', 'bar' => 2, 'baz' => true), + ], + [new ObjectConstructorDummy('baz', '', false), new ObjectConstructorDummy('quux', '', false)], + ['foo' => '', 'bar' => 2, 'baz' => true], 'Count a property', - ), - ); + ], + ]; } /** @@ -453,7 +453,7 @@ class ObjectNormalizerTest extends TestCase */ public function testUnableToNormalizeCircularReference() { - $serializer = new Serializer(array($this->normalizer)); + $serializer = new Serializer([$this->normalizer]); $this->normalizer->setSerializer($serializer); $this->normalizer->setCircularReferenceLimit(2); @@ -464,22 +464,22 @@ class ObjectNormalizerTest extends TestCase public function testSiblingReference() { - $serializer = new Serializer(array($this->normalizer)); + $serializer = new Serializer([$this->normalizer]); $this->normalizer->setSerializer($serializer); $siblingHolder = new SiblingHolder(); - $expected = array( - 'sibling0' => array('coopTilleuls' => 'Les-Tilleuls.coop'), - 'sibling1' => array('coopTilleuls' => 'Les-Tilleuls.coop'), - 'sibling2' => array('coopTilleuls' => 'Les-Tilleuls.coop'), - ); + $expected = [ + 'sibling0' => ['coopTilleuls' => 'Les-Tilleuls.coop'], + 'sibling1' => ['coopTilleuls' => 'Les-Tilleuls.coop'], + 'sibling2' => ['coopTilleuls' => 'Les-Tilleuls.coop'], + ]; $this->assertEquals($expected, $this->normalizer->normalize($siblingHolder)); } public function testCircularReferenceHandler() { - $serializer = new Serializer(array($this->normalizer)); + $serializer = new Serializer([$this->normalizer]); $this->normalizer->setSerializer($serializer); $this->normalizer->setCircularReferenceHandler(function ($obj) { return \get_class($obj); @@ -487,7 +487,7 @@ class ObjectNormalizerTest extends TestCase $obj = new CircularReferenceDummy(); - $expected = array('me' => 'Symfony\Component\Serializer\Tests\Fixtures\CircularReferenceDummy'); + $expected = ['me' => 'Symfony\Component\Serializer\Tests\Fixtures\CircularReferenceDummy']; $this->assertEquals($expected, $this->normalizer->normalize($obj)); } @@ -495,7 +495,7 @@ class ObjectNormalizerTest extends TestCase { $this->assertEquals( new ObjectDummy(), - $this->normalizer->denormalize(array('non_existing' => true), __NAMESPACE__.'\ObjectDummy') + $this->normalizer->denormalize(['non_existing' => true], __NAMESPACE__.'\ObjectDummy') ); } @@ -506,35 +506,35 @@ class ObjectNormalizerTest extends TestCase public function testNormalizeStatic() { - $this->assertEquals(array('foo' => 'K'), $this->normalizer->normalize(new ObjectWithStaticPropertiesAndMethods())); + $this->assertEquals(['foo' => 'K'], $this->normalizer->normalize(new ObjectWithStaticPropertiesAndMethods())); } public function testNormalizeUpperCaseAttributes() { - $this->assertEquals(array('Foo' => 'Foo', 'Bar' => 'BarBar'), $this->normalizer->normalize(new ObjectWithUpperCaseAttributeNames())); + $this->assertEquals(['Foo' => 'Foo', 'Bar' => 'BarBar'], $this->normalizer->normalize(new ObjectWithUpperCaseAttributeNames())); } public function testNormalizeNotSerializableContext() { $objectDummy = new ObjectDummy(); - $expected = array( + $expected = [ 'foo' => null, 'baz' => null, 'fooBar' => '', 'camelCase' => null, 'object' => null, 'bar' => null, - ); + ]; - $this->assertEquals($expected, $this->normalizer->normalize($objectDummy, null, array('not_serializable' => function () { - }))); + $this->assertEquals($expected, $this->normalizer->normalize($objectDummy, null, ['not_serializable' => function () { + }])); } public function testMaxDepth() { $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); $this->normalizer = new ObjectNormalizer($classMetadataFactory); - $serializer = new Serializer(array($this->normalizer)); + $serializer = new Serializer([$this->normalizer]); $this->normalizer->setSerializer($serializer); $level1 = new MaxDepthDummy(); @@ -548,20 +548,20 @@ class ObjectNormalizerTest extends TestCase $level3->foo = 'level3'; $level2->child = $level3; - $result = $serializer->normalize($level1, null, array(ObjectNormalizer::ENABLE_MAX_DEPTH => true)); + $result = $serializer->normalize($level1, null, [ObjectNormalizer::ENABLE_MAX_DEPTH => true]); - $expected = array( + $expected = [ 'bar' => null, 'foo' => 'level1', - 'child' => array( + 'child' => [ 'bar' => null, 'foo' => 'level2', - 'child' => array( + 'child' => [ 'bar' => null, 'child' => null, - ), - ), - ); + ], + ], + ]; $this->assertEquals($expected, $result); } @@ -571,20 +571,20 @@ class ObjectNormalizerTest extends TestCase */ public function testThrowUnexpectedValueException() { - $this->normalizer->denormalize(array('foo' => 'bar'), ObjectTypeHinted::class); + $this->normalizer->denormalize(['foo' => 'bar'], ObjectTypeHinted::class); } public function testDenomalizeRecursive() { - $extractor = new PropertyInfoExtractor(array(), array(new PhpDocExtractor(), new ReflectionExtractor())); + $extractor = new PropertyInfoExtractor([], [new PhpDocExtractor(), new ReflectionExtractor()]); $normalizer = new ObjectNormalizer(null, null, null, $extractor); - $serializer = new Serializer(array(new ArrayDenormalizer(), new DateTimeNormalizer(), $normalizer)); + $serializer = new Serializer([new ArrayDenormalizer(), new DateTimeNormalizer(), $normalizer]); - $obj = $serializer->denormalize(array( - 'inner' => array('foo' => 'foo', 'bar' => 'bar'), + $obj = $serializer->denormalize([ + 'inner' => ['foo' => 'foo', 'bar' => 'bar'], 'date' => '1988/01/21', - 'inners' => array(array('foo' => 1), array('foo' => 2)), - ), ObjectOuter::class); + 'inners' => [['foo' => 1], ['foo' => 2]], + ], ObjectOuter::class); $this->assertSame('foo', $obj->getInner()->foo); $this->assertSame('bar', $obj->getInner()->bar); @@ -595,12 +595,12 @@ class ObjectNormalizerTest extends TestCase public function testAcceptJsonNumber() { - $extractor = new PropertyInfoExtractor(array(), array(new PhpDocExtractor(), new ReflectionExtractor())); + $extractor = new PropertyInfoExtractor([], [new PhpDocExtractor(), new ReflectionExtractor()]); $normalizer = new ObjectNormalizer(null, null, null, $extractor); - $serializer = new Serializer(array(new ArrayDenormalizer(), new DateTimeNormalizer(), $normalizer)); + $serializer = new Serializer([new ArrayDenormalizer(), new DateTimeNormalizer(), $normalizer]); - $this->assertSame(10.0, $serializer->denormalize(array('number' => 10), JsonNumber::class, 'json')->number); - $this->assertSame(10.0, $serializer->denormalize(array('number' => 10), JsonNumber::class, 'jsonld')->number); + $this->assertSame(10.0, $serializer->denormalize(['number' => 10], JsonNumber::class, 'json')->number); + $this->assertSame(10.0, $serializer->denormalize(['number' => 10], JsonNumber::class, 'jsonld')->number); } /** @@ -610,9 +610,9 @@ class ObjectNormalizerTest extends TestCase public function testRejectInvalidType() { $normalizer = new ObjectNormalizer(null, null, null, new ReflectionExtractor()); - $serializer = new Serializer(array($normalizer)); + $serializer = new Serializer([$normalizer]); - $serializer->denormalize(array('date' => 'foo'), ObjectOuter::class); + $serializer->denormalize(['date' => 'foo'], ObjectOuter::class); } /** @@ -621,21 +621,21 @@ class ObjectNormalizerTest extends TestCase */ public function testRejectInvalidKey() { - $extractor = new PropertyInfoExtractor(array(), array(new PhpDocExtractor(), new ReflectionExtractor())); + $extractor = new PropertyInfoExtractor([], [new PhpDocExtractor(), new ReflectionExtractor()]); $normalizer = new ObjectNormalizer(null, null, null, $extractor); - $serializer = new Serializer(array(new ArrayDenormalizer(), new DateTimeNormalizer(), $normalizer)); + $serializer = new Serializer([new ArrayDenormalizer(), new DateTimeNormalizer(), $normalizer]); - $serializer->denormalize(array('inners' => array('a' => array('foo' => 1))), ObjectOuter::class); + $serializer->denormalize(['inners' => ['a' => ['foo' => 1]]], ObjectOuter::class); } public function testDoNotRejectInvalidTypeOnDisableTypeEnforcementContextOption() { - $extractor = new PropertyInfoExtractor(array(), array(new PhpDocExtractor())); + $extractor = new PropertyInfoExtractor([], [new PhpDocExtractor()]); $normalizer = new ObjectNormalizer(null, null, null, $extractor); - $serializer = new Serializer(array($normalizer)); - $context = array(ObjectNormalizer::DISABLE_TYPE_ENFORCEMENT => true); + $serializer = new Serializer([$normalizer]); + $context = [ObjectNormalizer::DISABLE_TYPE_ENFORCEMENT => true]; - $this->assertSame('foo', $serializer->denormalize(array('number' => 'foo'), JsonNumber::class, null, $context)->number); + $this->assertSame('foo', $serializer->denormalize(['number' => 'foo'], JsonNumber::class, null, $context)->number); } public function testExtractAttributesRespectsFormat() @@ -646,7 +646,7 @@ class ObjectNormalizerTest extends TestCase $data->setFoo('bar'); $data->bar = 'foo'; - $this->assertSame(array('foo' => 'bar', 'bar' => 'foo'), $normalizer->normalize($data, 'foo_and_bar_included')); + $this->assertSame(['foo' => 'bar', 'bar' => 'foo'], $normalizer->normalize($data, 'foo_and_bar_included')); } public function testExtractAttributesRespectsContext() @@ -657,13 +657,13 @@ class ObjectNormalizerTest extends TestCase $data->setFoo('bar'); $data->bar = 'foo'; - $this->assertSame(array('foo' => 'bar', 'bar' => 'foo'), $normalizer->normalize($data, null, array('include_foo_and_bar' => true))); + $this->assertSame(['foo' => 'bar', 'bar' => 'foo'], $normalizer->normalize($data, null, ['include_foo_and_bar' => true])); } public function testAttributesContextNormalize() { $normalizer = new ObjectNormalizer(); - $serializer = new Serializer(array($normalizer)); + $serializer = new Serializer([$normalizer]); $objectInner = new ObjectInner(); $objectInner->foo = 'innerFoo'; @@ -674,23 +674,23 @@ class ObjectNormalizerTest extends TestCase $objectDummy->setBaz(true); $objectDummy->setObject($objectInner); - $context = array('attributes' => array('foo', 'baz', 'object' => array('foo'))); + $context = ['attributes' => ['foo', 'baz', 'object' => ['foo']]]; $this->assertEquals( - array( + [ 'foo' => 'foo', 'baz' => true, - 'object' => array('foo' => 'innerFoo'), - ), + 'object' => ['foo' => 'innerFoo'], + ], $serializer->normalize($objectDummy, null, $context) ); - $context = array('attributes' => array('foo', 'baz', 'object')); + $context = ['attributes' => ['foo', 'baz', 'object']]; $this->assertEquals( - array( + [ 'foo' => 'foo', 'baz' => true, - 'object' => array('foo' => 'innerFoo', 'bar' => 'innerBar'), - ), + 'object' => ['foo' => 'innerFoo', 'bar' => 'innerBar'], + ], $serializer->normalize($objectDummy, null, $context) ); } @@ -698,7 +698,7 @@ class ObjectNormalizerTest extends TestCase public function testAttributesContextDenormalize() { $normalizer = new ObjectNormalizer(null, null, null, new ReflectionExtractor()); - $serializer = new Serializer(array($normalizer)); + $serializer = new Serializer([$normalizer]); $objectInner = new ObjectInner(); $objectInner->foo = 'innerFoo'; @@ -707,38 +707,38 @@ class ObjectNormalizerTest extends TestCase $objectOuter->bar = 'bar'; $objectOuter->setInner($objectInner); - $context = array('attributes' => array('bar', 'inner' => array('foo'))); + $context = ['attributes' => ['bar', 'inner' => ['foo']]]; $this->assertEquals($objectOuter, $serializer->denormalize( - array( + [ 'foo' => 'foo', 'bar' => 'bar', 'date' => '2017-02-03', - 'inner' => array('foo' => 'innerFoo', 'bar' => 'innerBar'), - ), ObjectOuter::class, null, $context)); + 'inner' => ['foo' => 'innerFoo', 'bar' => 'innerBar'], + ], ObjectOuter::class, null, $context)); } public function testAttributesContextDenormalizeConstructor() { $normalizer = new ObjectNormalizer(null, null, null, new ReflectionExtractor()); - $serializer = new Serializer(array($normalizer)); + $serializer = new Serializer([$normalizer]); $objectInner = new ObjectInner(); $objectInner->bar = 'bar'; $obj = new DummyWithConstructorObjectAndDefaultValue('a', $objectInner); - $context = array('attributes' => array('inner' => array('bar'))); - $this->assertEquals($obj, $serializer->denormalize(array( + $context = ['attributes' => ['inner' => ['bar']]]; + $this->assertEquals($obj, $serializer->denormalize([ 'foo' => 'b', - 'inner' => array('foo' => 'foo', 'bar' => 'bar'), - ), DummyWithConstructorObjectAndDefaultValue::class, null, $context)); + 'inner' => ['foo' => 'foo', 'bar' => 'bar'], + ], DummyWithConstructorObjectAndDefaultValue::class, null, $context)); } public function testNormalizeSameObjectWithDifferentAttributes() { $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); $this->normalizer = new ObjectNormalizer($classMetadataFactory); - $serializer = new Serializer(array($this->normalizer)); + $serializer = new Serializer([$this->normalizer]); $this->normalizer->setSerializer($serializer); $dummy = new ObjectOuter(); @@ -750,19 +750,19 @@ class ObjectNormalizerTest extends TestCase $dummy->bar->foo = 'bar.foo'; $dummy->bar->bar = 'bar.bar'; - $this->assertEquals(array( - 'foo' => array( + $this->assertEquals([ + 'foo' => [ 'bar' => 'foo.bar', - ), - 'bar' => array( + ], + 'bar' => [ 'foo' => 'bar.foo', - ), - ), $this->normalizer->normalize($dummy, 'json', array( - 'attributes' => array( - 'foo' => array('bar'), - 'bar' => array('foo'), - ), - ))); + ], + ], $this->normalizer->normalize($dummy, 'json', [ + 'attributes' => [ + 'foo' => ['bar'], + 'bar' => ['foo'], + ], + ])); } } @@ -864,7 +864,7 @@ class ObjectConstructorOptionalArgsDummy public $bar; private $baz; - public function __construct($foo, $bar = array(), $baz = array()) + public function __construct($foo, $bar = [], $baz = []) { $this->foo = $foo; $this->bar = $bar; @@ -892,7 +892,7 @@ class ObjectConstructorArgsWithDefaultValueDummy protected $foo; protected $bar; - public function __construct($foo = array(), $bar) + public function __construct($foo = [], $bar) { $this->foo = $foo; $this->bar = $bar; @@ -983,13 +983,13 @@ class ObjectInner class FormatAndContextAwareNormalizer extends ObjectNormalizer { - protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = array()) + protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = []) { - if (\in_array($attribute, array('foo', 'bar')) && 'foo_and_bar_included' === $format) { + if (\in_array($attribute, ['foo', 'bar']) && 'foo_and_bar_included' === $format) { return true; } - if (\in_array($attribute, array('foo', 'bar')) && isset($context['include_foo_and_bar']) && true === $context['include_foo_and_bar']) { + if (\in_array($attribute, ['foo', 'bar']) && isset($context['include_foo_and_bar']) && true === $context['include_foo_and_bar']) { return true; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectToPopulateTraitTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectToPopulateTraitTest.php index def71e5d..aa924be0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectToPopulateTraitTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectToPopulateTraitTest.php @@ -12,25 +12,25 @@ class ObjectToPopulateTraitTest extends TestCase public function testExtractObjectToPopulateReturnsNullWhenKeyIsMissing() { - $object = $this->extractObjectToPopulate(ProxyDummy::class, array()); + $object = $this->extractObjectToPopulate(ProxyDummy::class, []); $this->assertNull($object); } public function testExtractObjectToPopulateReturnsNullWhenNonObjectIsProvided() { - $object = $this->extractObjectToPopulate(ProxyDummy::class, array( + $object = $this->extractObjectToPopulate(ProxyDummy::class, [ 'object_to_populate' => 'not an object', - )); + ]); $this->assertNull($object); } public function testExtractObjectToPopulateReturnsNullWhenTheClassIsNotAnInstanceOfTheProvidedClass() { - $object = $this->extractObjectToPopulate(ProxyDummy::class, array( + $object = $this->extractObjectToPopulate(ProxyDummy::class, [ 'object_to_populate' => new \stdClass(), - )); + ]); $this->assertNull($object); } @@ -38,9 +38,9 @@ class ObjectToPopulateTraitTest extends TestCase public function testExtractObjectToPopulateReturnsObjectWhenEverythingChecksOut() { $expected = new ProxyDummy(); - $object = $this->extractObjectToPopulate(ProxyDummy::class, array( + $object = $this->extractObjectToPopulate(ProxyDummy::class, [ 'object_to_populate' => $expected, - )); + ]); $this->assertSame($expected, $object); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php index 4cd20ab3..f8d1eb8d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php @@ -50,7 +50,7 @@ class PropertyNormalizerTest extends TestCase $obj->setBar('bar'); $obj->setCamelCase('camelcase'); $this->assertEquals( - array('foo' => 'foo', 'bar' => 'bar', 'camelCase' => 'camelcase'), + ['foo' => 'foo', 'bar' => 'bar', 'camelCase' => 'camelcase'], $this->normalizer->normalize($obj, 'any') ); } @@ -58,7 +58,7 @@ class PropertyNormalizerTest extends TestCase public function testDenormalize() { $obj = $this->normalizer->denormalize( - array('foo' => 'foo', 'bar' => 'bar'), + ['foo' => 'foo', 'bar' => 'bar'], __NAMESPACE__.'\PropertyDummy', 'any' ); @@ -75,7 +75,7 @@ class PropertyNormalizerTest extends TestCase $group->setKevin('Kevin'); $group->setCoopTilleuls('coop'); $this->assertEquals( - array('foo' => 'foo', 'bar' => 'bar', 'kevin' => 'Kevin', 'coopTilleuls' => 'coop', 'fooBar' => null, 'symfony' => null, 'baz' => 'baz'), + ['foo' => 'foo', 'bar' => 'bar', 'kevin' => 'Kevin', 'coopTilleuls' => 'coop', 'fooBar' => null, 'symfony' => null, 'baz' => 'baz'], $this->normalizer->normalize($group, 'any') ); } @@ -83,7 +83,7 @@ class PropertyNormalizerTest extends TestCase public function testDenormalizeWithParentClass() { $obj = $this->normalizer->denormalize( - array('foo' => 'foo', 'bar' => 'bar', 'kevin' => 'Kevin', 'baz' => 'baz'), + ['foo' => 'foo', 'bar' => 'bar', 'kevin' => 'Kevin', 'baz' => 'baz'], GroupDummyChild::class, 'any' ); @@ -97,7 +97,7 @@ class PropertyNormalizerTest extends TestCase public function testConstructorDenormalize() { $obj = $this->normalizer->denormalize( - array('foo' => 'foo', 'bar' => 'bar'), + ['foo' => 'foo', 'bar' => 'bar'], __NAMESPACE__.'\PropertyConstructorDummy', 'any' ); @@ -108,7 +108,7 @@ class PropertyNormalizerTest extends TestCase public function testConstructorDenormalizeWithNullArgument() { $obj = $this->normalizer->denormalize( - array('foo' => null, 'bar' => 'bar'), + ['foo' => null, 'bar' => 'bar'], __NAMESPACE__.'\PropertyConstructorDummy', ' any' ); @@ -137,7 +137,7 @@ class PropertyNormalizerTest extends TestCase */ public function testUncallableCallbacks() { - $this->normalizer->setCallbacks(array('bar' => null)); + $this->normalizer->setCallbacks(['bar' => null]); $obj = new PropertyConstructorDummy('baz', 'quux'); @@ -146,14 +146,14 @@ class PropertyNormalizerTest extends TestCase public function testIgnoredAttributes() { - $this->normalizer->setIgnoredAttributes(array('foo', 'bar', 'camelCase')); + $this->normalizer->setIgnoredAttributes(['foo', 'bar', 'camelCase']); $obj = new PropertyDummy(); $obj->foo = 'foo'; $obj->setBar('bar'); $this->assertEquals( - array(), + [], $this->normalizer->normalize($obj, 'any') ); } @@ -172,19 +172,19 @@ class PropertyNormalizerTest extends TestCase $obj->setKevin('kevin'); $obj->setCoopTilleuls('coopTilleuls'); - $this->assertEquals(array( + $this->assertEquals([ 'bar' => 'bar', - ), $this->normalizer->normalize($obj, null, array(PropertyNormalizer::GROUPS => array('c')))); + ], $this->normalizer->normalize($obj, null, [PropertyNormalizer::GROUPS => ['c']])); // The PropertyNormalizer is also able to hydrate properties from parent classes - $this->assertEquals(array( + $this->assertEquals([ 'symfony' => 'symfony', 'foo' => 'foo', 'fooBar' => 'fooBar', 'bar' => 'bar', 'kevin' => 'kevin', 'coopTilleuls' => 'coopTilleuls', - ), $this->normalizer->normalize($obj, null, array(PropertyNormalizer::GROUPS => array('a', 'c')))); + ], $this->normalizer->normalize($obj, null, [PropertyNormalizer::GROUPS => ['a', 'c']])); } public function testGroupsDenormalize() @@ -196,13 +196,13 @@ class PropertyNormalizerTest extends TestCase $obj = new GroupDummy(); $obj->setFoo('foo'); - $toNormalize = array('foo' => 'foo', 'bar' => 'bar'); + $toNormalize = ['foo' => 'foo', 'bar' => 'bar']; $normalized = $this->normalizer->denormalize( $toNormalize, 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', null, - array(PropertyNormalizer::GROUPS => array('a')) + [PropertyNormalizer::GROUPS => ['a']] ); $this->assertEquals($obj, $normalized); @@ -212,7 +212,7 @@ class PropertyNormalizerTest extends TestCase $toNormalize, 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', null, - array(PropertyNormalizer::GROUPS => array('a', 'b')) + [PropertyNormalizer::GROUPS => ['a', 'b']] ); $this->assertEquals($obj, $normalized); } @@ -229,12 +229,12 @@ class PropertyNormalizerTest extends TestCase $obj->setCoopTilleuls('les-tilleuls.coop'); $this->assertEquals( - array( + [ 'bar' => null, 'foo_bar' => '@dunglas', 'symfony' => '@coopTilleuls', - ), - $this->normalizer->normalize($obj, null, array(PropertyNormalizer::GROUPS => array('name_converter'))) + ], + $this->normalizer->normalize($obj, null, [PropertyNormalizer::GROUPS => ['name_converter']]) ); } @@ -250,50 +250,50 @@ class PropertyNormalizerTest extends TestCase $this->assertEquals( $obj, - $this->normalizer->denormalize(array( + $this->normalizer->denormalize([ 'bar' => null, 'foo_bar' => '@dunglas', 'symfony' => '@coopTilleuls', 'coop_tilleuls' => 'les-tilleuls.coop', - ), 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', null, array(PropertyNormalizer::GROUPS => array('name_converter'))) + ], 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', null, [PropertyNormalizer::GROUPS => ['name_converter']]) ); } public function provideCallbacks() { - return array( - array( - array( + return [ + [ + [ 'bar' => function ($bar) { return 'baz'; }, - ), + ], 'baz', - array('foo' => '', 'bar' => 'baz'), + ['foo' => '', 'bar' => 'baz'], 'Change a string', - ), - array( - array( + ], + [ + [ 'bar' => function ($bar) { return; }, - ), + ], 'baz', - array('foo' => '', 'bar' => null), + ['foo' => '', 'bar' => null], 'Null an item', - ), - array( - array( + ], + [ + [ 'bar' => function ($bar) { return $bar->format('d-m-Y H:i:s'); }, - ), + ], new \DateTime('2011-09-10 06:30:00'), - array('foo' => '', 'bar' => '10-09-2011 06:30:00'), + ['foo' => '', 'bar' => '10-09-2011 06:30:00'], 'Format a date', - ), - array( - array( + ], + [ + [ 'bar' => function ($bars) { $foos = ''; foreach ($bars as $bar) { @@ -302,22 +302,22 @@ class PropertyNormalizerTest extends TestCase return $foos; }, - ), - array(new PropertyConstructorDummy('baz', ''), new PropertyConstructorDummy('quux', '')), - array('foo' => '', 'bar' => 'bazquux'), + ], + [new PropertyConstructorDummy('baz', ''), new PropertyConstructorDummy('quux', '')], + ['foo' => '', 'bar' => 'bazquux'], 'Collect a property', - ), - array( - array( + ], + [ + [ 'bar' => function ($bars) { return \count($bars); }, - ), - array(new PropertyConstructorDummy('baz', ''), new PropertyConstructorDummy('quux', '')), - array('foo' => '', 'bar' => 2), + ], + [new PropertyConstructorDummy('baz', ''), new PropertyConstructorDummy('quux', '')], + ['foo' => '', 'bar' => 2], 'Count a property', - ), - ); + ], + ]; } /** @@ -325,7 +325,7 @@ class PropertyNormalizerTest extends TestCase */ public function testUnableToNormalizeCircularReference() { - $serializer = new Serializer(array($this->normalizer)); + $serializer = new Serializer([$this->normalizer]); $this->normalizer->setSerializer($serializer); $this->normalizer->setCircularReferenceLimit(2); @@ -336,22 +336,22 @@ class PropertyNormalizerTest extends TestCase public function testSiblingReference() { - $serializer = new Serializer(array($this->normalizer)); + $serializer = new Serializer([$this->normalizer]); $this->normalizer->setSerializer($serializer); $siblingHolder = new PropertySiblingHolder(); - $expected = array( - 'sibling0' => array('coopTilleuls' => 'Les-Tilleuls.coop'), - 'sibling1' => array('coopTilleuls' => 'Les-Tilleuls.coop'), - 'sibling2' => array('coopTilleuls' => 'Les-Tilleuls.coop'), - ); + $expected = [ + 'sibling0' => ['coopTilleuls' => 'Les-Tilleuls.coop'], + 'sibling1' => ['coopTilleuls' => 'Les-Tilleuls.coop'], + 'sibling2' => ['coopTilleuls' => 'Les-Tilleuls.coop'], + ]; $this->assertEquals($expected, $this->normalizer->normalize($siblingHolder)); } public function testCircularReferenceHandler() { - $serializer = new Serializer(array($this->normalizer)); + $serializer = new Serializer([$this->normalizer]); $this->normalizer->setSerializer($serializer); $this->normalizer->setCircularReferenceHandler(function ($obj) { return \get_class($obj); @@ -359,7 +359,7 @@ class PropertyNormalizerTest extends TestCase $obj = new PropertyCircularReferenceDummy(); - $expected = array('me' => 'Symfony\Component\Serializer\Tests\Fixtures\PropertyCircularReferenceDummy'); + $expected = ['me' => 'Symfony\Component\Serializer\Tests\Fixtures\PropertyCircularReferenceDummy']; $this->assertEquals($expected, $this->normalizer->normalize($obj)); } @@ -367,13 +367,13 @@ class PropertyNormalizerTest extends TestCase { $this->assertEquals( new PropertyDummy(), - $this->normalizer->denormalize(array('non_existing' => true), __NAMESPACE__.'\PropertyDummy') + $this->normalizer->denormalize(['non_existing' => true], __NAMESPACE__.'\PropertyDummy') ); } public function testDenormalizeShouldIgnoreStaticProperty() { - $obj = $this->normalizer->denormalize(array('outOfScope' => true), __NAMESPACE__.'\PropertyDummy'); + $obj = $this->normalizer->denormalize(['outOfScope' => true], __NAMESPACE__.'\PropertyDummy'); $this->assertEquals(new PropertyDummy(), $obj); $this->assertEquals('out_of_scope', PropertyDummy::$outOfScope); @@ -409,7 +409,7 @@ class PropertyNormalizerTest extends TestCase { $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); $this->normalizer = new PropertyNormalizer($classMetadataFactory); - $serializer = new Serializer(array($this->normalizer)); + $serializer = new Serializer([$this->normalizer]); $this->normalizer->setSerializer($serializer); $level1 = new MaxDepthDummy(); @@ -423,20 +423,20 @@ class PropertyNormalizerTest extends TestCase $level3->foo = 'level3'; $level2->child = $level3; - $result = $serializer->normalize($level1, null, array(PropertyNormalizer::ENABLE_MAX_DEPTH => true)); + $result = $serializer->normalize($level1, null, [PropertyNormalizer::ENABLE_MAX_DEPTH => true]); - $expected = array( + $expected = [ 'foo' => 'level1', - 'child' => array( + 'child' => [ 'foo' => 'level2', - 'child' => array( + 'child' => [ 'child' => null, 'bar' => null, - ), + ], 'bar' => null, - ), + ], 'bar' => null, - ); + ]; $this->assertEquals($expected, $result); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/TestDenormalizer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/TestDenormalizer.php index 7525d5c9..036d2bb8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/TestDenormalizer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/TestDenormalizer.php @@ -23,7 +23,7 @@ class TestDenormalizer implements DenormalizerInterface /** * {@inheritdoc} */ - public function denormalize($data, $class, $format = null, array $context = array()) + public function denormalize($data, $class, $format = null, array $context = []) { } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/TestNormalizer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/TestNormalizer.php index 4b29e8fa..ea57d2df 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/TestNormalizer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/TestNormalizer.php @@ -23,7 +23,7 @@ class TestNormalizer implements NormalizerInterface /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = array()) + public function normalize($object, $format = null, array $context = []) { } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/SerializerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/SerializerTest.php index e320bee3..405317d5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/SerializerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/SerializerTest.php @@ -46,20 +46,20 @@ class SerializerTest extends TestCase */ public function testNormalizeNoMatch() { - $serializer = new Serializer(array($this->getMockBuilder('Symfony\Component\Serializer\Normalizer\CustomNormalizer')->getMock())); + $serializer = new Serializer([$this->getMockBuilder('Symfony\Component\Serializer\Normalizer\CustomNormalizer')->getMock()]); $serializer->normalize(new \stdClass(), 'xml'); } public function testNormalizeTraversable() { - $serializer = new Serializer(array(), array('json' => new JsonEncoder())); + $serializer = new Serializer([], ['json' => new JsonEncoder()]); $result = $serializer->serialize(new TraversableDummy(), 'json'); $this->assertEquals('{"foo":"foo","bar":"bar"}', $result); } public function testNormalizeGivesPriorityToInterfaceOverTraversable() { - $serializer = new Serializer(array(new CustomNormalizer()), array('json' => new JsonEncoder())); + $serializer = new Serializer([new CustomNormalizer()], ['json' => new JsonEncoder()]); $result = $serializer->serialize(new NormalizableTraversableDummy(), 'json'); $this->assertEquals('{"foo":"normalizedFoo","bar":"normalizedBar"}', $result); } @@ -69,7 +69,7 @@ class SerializerTest extends TestCase */ public function testNormalizeOnDenormalizer() { - $serializer = new Serializer(array(new TestDenormalizer()), array()); + $serializer = new Serializer([new TestDenormalizer()], []); $this->assertTrue($serializer->normalize(new \stdClass(), 'json')); } @@ -78,7 +78,7 @@ class SerializerTest extends TestCase */ public function testDenormalizeNoMatch() { - $serializer = new Serializer(array($this->getMockBuilder('Symfony\Component\Serializer\Normalizer\CustomNormalizer')->getMock())); + $serializer = new Serializer([$this->getMockBuilder('Symfony\Component\Serializer\Normalizer\CustomNormalizer')->getMock()]); $serializer->denormalize('foo', 'stdClass'); } @@ -87,17 +87,17 @@ class SerializerTest extends TestCase */ public function testDenormalizeOnNormalizer() { - $serializer = new Serializer(array(new TestNormalizer()), array()); - $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer = new Serializer([new TestNormalizer()], []); + $data = ['title' => 'foo', 'numbers' => [5, 3]]; $this->assertTrue($serializer->denormalize(json_encode($data), 'stdClass', 'json')); } public function testCustomNormalizerCanNormalizeCollectionsAndScalar() { - $serializer = new Serializer(array(new TestNormalizer()), array()); - $this->assertNull($serializer->normalize(array('a', 'b'))); - $this->assertNull($serializer->normalize(new \ArrayObject(array('c', 'd')))); - $this->assertNull($serializer->normalize(array())); + $serializer = new Serializer([new TestNormalizer()], []); + $this->assertNull($serializer->normalize(['a', 'b'])); + $this->assertNull($serializer->normalize(new \ArrayObject(['c', 'd']))); + $this->assertNull($serializer->normalize([])); $this->assertNull($serializer->normalize('test')); } @@ -115,7 +115,7 @@ class SerializerTest extends TestCase ->willReturn(true); $normalizer2->method('normalize')->willReturn('test2'); - $serializer = new Serializer(array($normalizer1, $normalizer2)); + $serializer = new Serializer([$normalizer1, $normalizer2]); $data = new \stdClass(); $data->test = true; @@ -138,32 +138,32 @@ class SerializerTest extends TestCase ->willReturn(true); $denormalizer2->method('denormalize')->willReturn('test2'); - $serializer = new Serializer(array($denormalizer1, $denormalizer2)); + $serializer = new Serializer([$denormalizer1, $denormalizer2]); - $this->assertEquals('test1', $serializer->denormalize(array('test1' => true), 'test')); + $this->assertEquals('test1', $serializer->denormalize(['test1' => true], 'test')); - $this->assertEquals('test2', $serializer->denormalize(array(), 'test')); + $this->assertEquals('test2', $serializer->denormalize([], 'test')); } public function testSerialize() { - $serializer = new Serializer(array(new GetSetMethodNormalizer()), array('json' => new JsonEncoder())); - $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer = new Serializer([new GetSetMethodNormalizer()], ['json' => new JsonEncoder()]); + $data = ['title' => 'foo', 'numbers' => [5, 3]]; $result = $serializer->serialize(Model::fromArray($data), 'json'); $this->assertEquals(json_encode($data), $result); } public function testSerializeScalar() { - $serializer = new Serializer(array(), array('json' => new JsonEncoder())); + $serializer = new Serializer([], ['json' => new JsonEncoder()]); $result = $serializer->serialize('foo', 'json'); $this->assertEquals('"foo"', $result); } public function testSerializeArrayOfScalars() { - $serializer = new Serializer(array(), array('json' => new JsonEncoder())); - $data = array('foo', array(5, 3)); + $serializer = new Serializer([], ['json' => new JsonEncoder()]); + $data = ['foo', [5, 3]]; $result = $serializer->serialize($data, 'json'); $this->assertEquals(json_encode($data), $result); } @@ -173,8 +173,8 @@ class SerializerTest extends TestCase */ public function testSerializeNoEncoder() { - $serializer = new Serializer(array(), array()); - $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer = new Serializer([], []); + $data = ['title' => 'foo', 'numbers' => [5, 3]]; $serializer->serialize($data, 'json'); } @@ -183,25 +183,25 @@ class SerializerTest extends TestCase */ public function testSerializeNoNormalizer() { - $serializer = new Serializer(array(), array('json' => new JsonEncoder())); - $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer = new Serializer([], ['json' => new JsonEncoder()]); + $data = ['title' => 'foo', 'numbers' => [5, 3]]; $serializer->serialize(Model::fromArray($data), 'json'); } public function testDeserialize() { - $serializer = new Serializer(array(new GetSetMethodNormalizer()), array('json' => new JsonEncoder())); - $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer = new Serializer([new GetSetMethodNormalizer()], ['json' => new JsonEncoder()]); + $data = ['title' => 'foo', 'numbers' => [5, 3]]; $result = $serializer->deserialize(json_encode($data), '\Symfony\Component\Serializer\Tests\Model', 'json'); $this->assertEquals($data, $result->toArray()); } public function testDeserializeUseCache() { - $serializer = new Serializer(array(new GetSetMethodNormalizer()), array('json' => new JsonEncoder())); - $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer = new Serializer([new GetSetMethodNormalizer()], ['json' => new JsonEncoder()]); + $data = ['title' => 'foo', 'numbers' => [5, 3]]; $serializer->deserialize(json_encode($data), '\Symfony\Component\Serializer\Tests\Model', 'json'); - $data = array('title' => 'bar', 'numbers' => array(2, 8)); + $data = ['title' => 'bar', 'numbers' => [2, 8]]; $result = $serializer->deserialize(json_encode($data), '\Symfony\Component\Serializer\Tests\Model', 'json'); $this->assertEquals($data, $result->toArray()); } @@ -211,8 +211,8 @@ class SerializerTest extends TestCase */ public function testDeserializeNoNormalizer() { - $serializer = new Serializer(array(), array('json' => new JsonEncoder())); - $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer = new Serializer([], ['json' => new JsonEncoder()]); + $data = ['title' => 'foo', 'numbers' => [5, 3]]; $serializer->deserialize(json_encode($data), '\Symfony\Component\Serializer\Tests\Model', 'json'); } @@ -221,8 +221,8 @@ class SerializerTest extends TestCase */ public function testDeserializeWrongNormalizer() { - $serializer = new Serializer(array(new CustomNormalizer()), array('json' => new JsonEncoder())); - $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer = new Serializer([new CustomNormalizer()], ['json' => new JsonEncoder()]); + $data = ['title' => 'foo', 'numbers' => [5, 3]]; $serializer->deserialize(json_encode($data), '\Symfony\Component\Serializer\Tests\Model', 'json'); } @@ -231,44 +231,44 @@ class SerializerTest extends TestCase */ public function testDeserializeNoEncoder() { - $serializer = new Serializer(array(), array()); - $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer = new Serializer([], []); + $data = ['title' => 'foo', 'numbers' => [5, 3]]; $serializer->deserialize(json_encode($data), '\Symfony\Component\Serializer\Tests\Model', 'json'); } public function testDeserializeSupported() { - $serializer = new Serializer(array(new GetSetMethodNormalizer()), array()); - $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer = new Serializer([new GetSetMethodNormalizer()], []); + $data = ['title' => 'foo', 'numbers' => [5, 3]]; $this->assertTrue($serializer->supportsDenormalization(json_encode($data), '\Symfony\Component\Serializer\Tests\Model', 'json')); } public function testDeserializeNotSupported() { - $serializer = new Serializer(array(new GetSetMethodNormalizer()), array()); - $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer = new Serializer([new GetSetMethodNormalizer()], []); + $data = ['title' => 'foo', 'numbers' => [5, 3]]; $this->assertFalse($serializer->supportsDenormalization(json_encode($data), 'stdClass', 'json')); } public function testDeserializeNotSupportedMissing() { - $serializer = new Serializer(array(), array()); - $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer = new Serializer([], []); + $data = ['title' => 'foo', 'numbers' => [5, 3]]; $this->assertFalse($serializer->supportsDenormalization(json_encode($data), '\Symfony\Component\Serializer\Tests\Model', 'json')); } public function testEncode() { - $serializer = new Serializer(array(), array('json' => new JsonEncoder())); - $data = array('foo', array(5, 3)); + $serializer = new Serializer([], ['json' => new JsonEncoder()]); + $data = ['foo', [5, 3]]; $result = $serializer->encode($data, 'json'); $this->assertEquals(json_encode($data), $result); } public function testDecode() { - $serializer = new Serializer(array(), array('json' => new JsonEncoder())); - $data = array('foo', array(5, 3)); + $serializer = new Serializer([], ['json' => new JsonEncoder()]); + $data = ['foo', [5, 3]]; $result = $serializer->decode(json_encode($data), 'json'); $this->assertEquals($data, $result); } @@ -276,20 +276,20 @@ class SerializerTest extends TestCase public function testSupportsArrayDeserialization() { $serializer = new Serializer( - array( + [ new GetSetMethodNormalizer(), new PropertyNormalizer(), new ObjectNormalizer(), new CustomNormalizer(), new ArrayDenormalizer(), - ), - array( + ], + [ 'json' => new JsonEncoder(), - ) + ] ); $this->assertTrue( - $serializer->supportsDenormalization(array(), __NAMESPACE__.'\Model[]', 'json') + $serializer->supportsDenormalization([], __NAMESPACE__.'\Model[]', 'json') ); } @@ -297,19 +297,19 @@ class SerializerTest extends TestCase { $jsonData = '[{"title":"foo","numbers":[5,3]},{"title":"bar","numbers":[2,8]}]'; - $expectedData = array( - Model::fromArray(array('title' => 'foo', 'numbers' => array(5, 3))), - Model::fromArray(array('title' => 'bar', 'numbers' => array(2, 8))), - ); + $expectedData = [ + Model::fromArray(['title' => 'foo', 'numbers' => [5, 3]]), + Model::fromArray(['title' => 'bar', 'numbers' => [2, 8]]), + ]; $serializer = new Serializer( - array( + [ new GetSetMethodNormalizer(), new ArrayDenormalizer(), - ), - array( + ], + [ 'json' => new JsonEncoder(), - ) + ] ); $this->assertEquals( @@ -325,7 +325,7 @@ class SerializerTest extends TestCase ->method('setNormalizer') ->with($this->isInstanceOf(NormalizerInterface::class)); - new Serializer(array($normalizerAware)); + new Serializer([$normalizerAware]); } public function testDenormalizerAware() @@ -335,14 +335,14 @@ class SerializerTest extends TestCase ->method('setDenormalizer') ->with($this->isInstanceOf(DenormalizerInterface::class)); - new Serializer(array($denormalizerAware)); + new Serializer([$denormalizerAware]); } public function testDeserializeObjectConstructorWithObjectTypeHint() { $jsonData = '{"bar":{"value":"baz"}}'; - $serializer = new Serializer(array(new ObjectNormalizer()), array('json' => new JsonEncoder())); + $serializer = new Serializer([new ObjectNormalizer()], ['json' => new JsonEncoder()]); $this->assertEquals(new Foo(new Bar('baz')), $serializer->deserialize($jsonData, Foo::class, 'json')); } @@ -388,7 +388,7 @@ class Model public function toArray() { - return array('title' => $this->title, 'numbers' => $this->numbers); + return ['title' => $this->title, 'numbers' => $this->numbers]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Section.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Section.php index 2be995bb..14fba8b5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Section.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Section.php @@ -21,7 +21,7 @@ class Section /** * @var StopwatchEvent[] */ - private $events = array(); + private $events = []; /** * @var float|null @@ -41,7 +41,7 @@ class Section /** * @var Section[] */ - private $children = array(); + private $children = []; /** * @param float|null $origin Set the origin of the events in this section, use null to set their origin to their start time diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Stopwatch.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Stopwatch.php index 9da84f6e..128e9488 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Stopwatch.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Stopwatch.php @@ -96,8 +96,8 @@ class Stopwatch /** * Starts an event. * - * @param string $name The event name - * @param string $category The event category + * @param string $name The event name + * @param string|null $category The event category * * @return StopwatchEvent */ @@ -163,7 +163,7 @@ class Stopwatch */ public function getSectionEvents($id) { - return isset($this->sections[$id]) ? $this->sections[$id]->getEvents() : array(); + return isset($this->sections[$id]) ? $this->sections[$id]->getEvents() : []; } /** @@ -171,6 +171,6 @@ class Stopwatch */ public function reset() { - $this->sections = $this->activeSections = array('__root__' => new Section(null, $this->morePrecision)); + $this->sections = $this->activeSections = ['__root__' => new Section(null, $this->morePrecision)]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/StopwatchEvent.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/StopwatchEvent.php index f04f0ac1..bc8c6b5f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/StopwatchEvent.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/StopwatchEvent.php @@ -21,7 +21,7 @@ class StopwatchEvent /** * @var StopwatchPeriod[] */ - private $periods = array(); + private $periods = []; /** * @var float @@ -41,7 +41,7 @@ class StopwatchEvent /** * @var float[] */ - private $started = array(); + private $started = []; /** * @param float $origin The origin time in milliseconds diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchEventTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchEventTest.php index 2742ca54..415ab3e9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchEventTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchEventTest.php @@ -43,7 +43,7 @@ class StopwatchEventTest extends TestCase public function testGetPeriods() { $event = new StopwatchEvent(microtime(true) * 1000); - $this->assertEquals(array(), $event->getPeriods()); + $this->assertEquals([], $event->getPeriods()); $event = new StopwatchEvent(microtime(true) * 1000); $event->start(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchPeriodTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchPeriodTest.php index f2387b82..717ff9d5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchPeriodTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchPeriodTest.php @@ -45,23 +45,23 @@ class StopwatchPeriodTest extends TestCase public function provideTimeValues() { - yield array(0, false, 0); - yield array(0, true, 0.0); - yield array(0.0, false, 0); - yield array(0.0, true, 0.0); - yield array(2.71, false, 2); - yield array(2.71, true, 2.71); + yield [0, false, 0]; + yield [0, true, 0.0]; + yield [0.0, false, 0]; + yield [0.0, true, 0.0]; + yield [2.71, false, 2]; + yield [2.71, true, 2.71]; } public function provideDurationValues() { - yield array(0, 0, false, 0); - yield array(0, 0, true, 0.0); - yield array(0.0, 0.0, false, 0); - yield array(0.0, 0.0, true, 0.0); - yield array(2, 3.14, false, 1); - yield array(2, 3.14, true, 1.14); - yield array(2.71, 3.14, false, 1); - yield array(2.71, 3.14, true, 0.43); + yield [0, 0, false, 0]; + yield [0, 0, true, 0.0]; + yield [0.0, 0.0, false, 0]; + yield [0.0, 0.0, true, 0.0]; + yield [2, 3.14, false, 1]; + yield [2, 3.14, true, 1.14]; + yield [2.71, 3.14, false, 1]; + yield [2.71, 3.14, true, 0.43]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php index 10e6a14a..30f976ad 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php @@ -35,6 +35,14 @@ class StopwatchTest extends TestCase $this->assertSame($event, $stopwatch->getEvent('foo')); } + public function testStartWithoutCategory() + { + $stopwatch = new Stopwatch(); + $stopwatchEvent = $stopwatch->start('bar'); + $this->assertSame('default', $stopwatchEvent->getCategory()); + $this->assertSame($stopwatchEvent, $stopwatch->getEvent('bar')); + } + public function testIsStarted() { $stopwatch = new Stopwatch(); @@ -62,11 +70,11 @@ class StopwatchTest extends TestCase $events->setAccessible(true); $stopwatchMockEvent = $this->getMockBuilder('Symfony\Component\Stopwatch\StopwatchEvent') - ->setConstructorArgs(array(microtime(true) * 1000)) + ->setConstructorArgs([microtime(true) * 1000]) ->getMock() ; - $events->setValue(end($section), array('foo' => $stopwatchMockEvent)); + $events->setValue(end($section), ['foo' => $stopwatchMockEvent]); $this->assertFalse($stopwatch->isStarted('foo')); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/DelegatingEngine.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/DelegatingEngine.php index b47a0f06..90cdbfa2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/DelegatingEngine.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/DelegatingEngine.php @@ -21,12 +21,12 @@ class DelegatingEngine implements EngineInterface, StreamingEngineInterface /** * @var EngineInterface[] */ - protected $engines = array(); + protected $engines = []; /** * @param EngineInterface[] $engines An array of EngineInterface instances to add */ - public function __construct(array $engines = array()) + public function __construct(array $engines = []) { foreach ($engines as $engine) { $this->addEngine($engine); @@ -36,7 +36,7 @@ class DelegatingEngine implements EngineInterface, StreamingEngineInterface /** * {@inheritdoc} */ - public function render($name, array $parameters = array()) + public function render($name, array $parameters = []) { return $this->getEngine($name)->render($name, $parameters); } @@ -44,7 +44,7 @@ class DelegatingEngine implements EngineInterface, StreamingEngineInterface /** * {@inheritdoc} */ - public function stream($name, array $parameters = array()) + public function stream($name, array $parameters = []) { $engine = $this->getEngine($name); if (!$engine instanceof StreamingEngineInterface) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/EngineInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/EngineInterface.php index fb02c80d..ab4ccc71 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/EngineInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/EngineInterface.php @@ -40,7 +40,7 @@ interface EngineInterface * * @throws \RuntimeException if the template cannot be rendered */ - public function render($name, array $parameters = array()); + public function render($name, array $parameters = []); /** * Returns true if the template exists. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Helper/SlotsHelper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Helper/SlotsHelper.php index e5faf7fe..80acdc93 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Helper/SlotsHelper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Helper/SlotsHelper.php @@ -18,8 +18,8 @@ namespace Symfony\Component\Templating\Helper; */ class SlotsHelper extends Helper { - protected $slots = array(); - protected $openSlots = array(); + protected $slots = []; + protected $openSlots = []; /** * Starts a new slot. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/CacheLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/CacheLoader.php index c26ffd63..251c3292 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/CacheLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/CacheLoader.php @@ -53,7 +53,7 @@ class CacheLoader extends Loader if (is_file($path)) { if (null !== $this->logger) { - $this->logger->debug('Fetching template from cache.', array('name' => $template->get('name'))); + $this->logger->debug('Fetching template from cache.', ['name' => $template->get('name')]); } return new FileStorage($path); @@ -72,7 +72,7 @@ class CacheLoader extends Loader file_put_contents($path, $content); if (null !== $this->logger) { - $this->logger->debug('Storing template in cache.', array('name' => $template->get('name'))); + $this->logger->debug('Storing template in cache.', ['name' => $template->get('name')]); } return new FileStorage($path); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/ChainLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/ChainLoader.php index d66139e0..3e5f375c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/ChainLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/ChainLoader.php @@ -21,12 +21,12 @@ use Symfony\Component\Templating\TemplateReferenceInterface; */ class ChainLoader extends Loader { - protected $loaders = array(); + protected $loaders = []; /** * @param LoaderInterface[] $loaders An array of loader instances */ - public function __construct(array $loaders = array()) + public function __construct(array $loaders = []) { foreach ($loaders as $loader) { $this->addLoader($loader); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/FilesystemLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/FilesystemLoader.php index 919c96fb..016018cf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/FilesystemLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/FilesystemLoader.php @@ -45,16 +45,16 @@ class FilesystemLoader extends Loader return new FileStorage($file); } - $replacements = array(); + $replacements = []; foreach ($template->all() as $key => $value) { $replacements['%'.$key.'%'] = $value; } - $fileFailures = array(); + $fileFailures = []; foreach ($this->templatePathPatterns as $templatePathPattern) { if (is_file($file = strtr($templatePathPattern, $replacements)) && is_readable($file)) { if (null !== $this->logger) { - $this->logger->debug('Loaded template file.', array('file' => $file)); + $this->logger->debug('Loaded template file.', ['file' => $file]); } return new FileStorage($file); @@ -68,7 +68,7 @@ class FilesystemLoader extends Loader // only log failures if no template could be loaded at all foreach ($fileFailures as $file) { if (null !== $this->logger) { - $this->logger->debug('Failed loading template file.', array('file' => $file)); + $this->logger->debug('Failed loading template file.', ['file' => $file]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/PhpEngine.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/PhpEngine.php index 1d244482..f67c29d0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/PhpEngine.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/PhpEngine.php @@ -29,14 +29,14 @@ class PhpEngine implements EngineInterface, \ArrayAccess /** * @var HelperInterface[] */ - protected $helpers = array(); - protected $parents = array(); - protected $stack = array(); + protected $helpers = []; + protected $parents = []; + protected $stack = []; protected $charset = 'UTF-8'; - protected $cache = array(); - protected $escapers = array(); - protected static $escaperCache = array(); - protected $globals = array(); + protected $cache = []; + protected $escapers = []; + protected static $escaperCache = []; + protected $globals = []; protected $parser; private $evalTemplate; @@ -47,7 +47,7 @@ class PhpEngine implements EngineInterface, \ArrayAccess * @param LoaderInterface $loader A loader instance * @param HelperInterface[] $helpers An array of helper instances */ - public function __construct(TemplateNameParserInterface $parser, LoaderInterface $loader, array $helpers = array()) + public function __construct(TemplateNameParserInterface $parser, LoaderInterface $loader, array $helpers = []) { $this->parser = $parser; $this->loader = $loader; @@ -65,7 +65,7 @@ class PhpEngine implements EngineInterface, \ArrayAccess * * @throws \InvalidArgumentException if the template does not exist */ - public function render($name, array $parameters = array()) + public function render($name, array $parameters = []) { $storage = $this->load($name); $key = hash('sha256', serialize($storage)); @@ -127,7 +127,7 @@ class PhpEngine implements EngineInterface, \ArrayAccess * * @throws \InvalidArgumentException */ - protected function evaluate(Storage $template, array $parameters = array()) + protected function evaluate(Storage $template, array $parameters = []) { $this->evalTemplate = $template; $this->evalParameters = $parameters; @@ -235,7 +235,7 @@ class PhpEngine implements EngineInterface, \ArrayAccess */ public function setHelpers(array $helpers) { - $this->helpers = array(); + $this->helpers = []; $this->addHelpers($helpers); } @@ -358,7 +358,7 @@ class PhpEngine implements EngineInterface, \ArrayAccess public function setEscaper($context, callable $escaper) { $this->escapers[$context] = $escaper; - self::$escaperCache[$context] = array(); + self::$escaperCache[$context] = []; } /** @@ -419,7 +419,7 @@ class PhpEngine implements EngineInterface, \ArrayAccess { $flags = ENT_QUOTES | ENT_SUBSTITUTE; - $this->escapers = array( + $this->escapers = [ 'html' => /** * Runs the PHP function htmlspecialchars on the value passed. @@ -472,9 +472,9 @@ class PhpEngine implements EngineInterface, \ArrayAccess return $value; }, - ); + ]; - self::$escaperCache = array(); + self::$escaperCache = []; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/StreamingEngineInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/StreamingEngineInterface.php index f8815f85..d389ccc5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/StreamingEngineInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/StreamingEngineInterface.php @@ -29,5 +29,5 @@ interface StreamingEngineInterface * @throws \RuntimeException if the template cannot be rendered * @throws \LogicException if the template cannot be streamed */ - public function stream($name, array $parameters = array()); + public function stream($name, array $parameters = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/TemplateReference.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/TemplateReference.php index 3477f088..195616e5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/TemplateReference.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/TemplateReference.php @@ -22,10 +22,10 @@ class TemplateReference implements TemplateReferenceInterface public function __construct($name = null, $engine = null) { - $this->parameters = array( + $this->parameters = [ 'name' => $name, 'engine' => $engine, - ); + ]; } /** @@ -41,7 +41,7 @@ class TemplateReference implements TemplateReferenceInterface */ public function set($name, $value) { - if (array_key_exists($name, $this->parameters)) { + if (\array_key_exists($name, $this->parameters)) { $this->parameters[$name] = $value; } else { throw new \InvalidArgumentException(sprintf('The template does not support the "%s" parameter.', $name)); @@ -55,7 +55,7 @@ class TemplateReference implements TemplateReferenceInterface */ public function get($name) { - if (array_key_exists($name, $this->parameters)) { + if (\array_key_exists($name, $this->parameters)) { return $this->parameters[$name]; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php index cadd9edf..875672d2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php @@ -25,11 +25,11 @@ class DelegatingEngineTest extends TestCase $secondEngine->expects($this->once()) ->method('render') - ->with('template.php', array('foo' => 'bar')) + ->with('template.php', ['foo' => 'bar']) ->will($this->returnValue('')); - $delegatingEngine = new DelegatingEngine(array($firstEngine, $secondEngine)); - $result = $delegatingEngine->render('template.php', array('foo' => 'bar')); + $delegatingEngine = new DelegatingEngine([$firstEngine, $secondEngine]); + $result = $delegatingEngine->render('template.php', ['foo' => 'bar']); $this->assertSame('', $result); } @@ -43,8 +43,8 @@ class DelegatingEngineTest extends TestCase $firstEngine = $this->getEngineMock('template.php', false); $secondEngine = $this->getEngineMock('template.php', false); - $delegatingEngine = new DelegatingEngine(array($firstEngine, $secondEngine)); - $delegatingEngine->render('template.php', array('foo' => 'bar')); + $delegatingEngine = new DelegatingEngine([$firstEngine, $secondEngine]); + $delegatingEngine->render('template.php', ['foo' => 'bar']); } public function testStreamDelegatesToSupportedEngine() @@ -52,11 +52,11 @@ class DelegatingEngineTest extends TestCase $streamingEngine = $this->getStreamingEngineMock('template.php', true); $streamingEngine->expects($this->once()) ->method('stream') - ->with('template.php', array('foo' => 'bar')) + ->with('template.php', ['foo' => 'bar']) ->will($this->returnValue('')); - $delegatingEngine = new DelegatingEngine(array($streamingEngine)); - $result = $delegatingEngine->stream('template.php', array('foo' => 'bar')); + $delegatingEngine = new DelegatingEngine([$streamingEngine]); + $result = $delegatingEngine->stream('template.php', ['foo' => 'bar']); $this->assertNull($result); } @@ -67,8 +67,8 @@ class DelegatingEngineTest extends TestCase */ public function testStreamRequiresStreamingEngine() { - $delegatingEngine = new DelegatingEngine(array(new TestEngine())); - $delegatingEngine->stream('template.php', array('foo' => 'bar')); + $delegatingEngine = new DelegatingEngine([new TestEngine()]); + $delegatingEngine->stream('template.php', ['foo' => 'bar']); } public function testExists() @@ -79,7 +79,7 @@ class DelegatingEngineTest extends TestCase ->with('template.php') ->will($this->returnValue(true)); - $delegatingEngine = new DelegatingEngine(array($engine)); + $delegatingEngine = new DelegatingEngine([$engine]); $this->assertTrue($delegatingEngine->exists('template.php')); } @@ -88,7 +88,7 @@ class DelegatingEngineTest extends TestCase { $engine = $this->getEngineMock('template.php', true); - $delegatingEngine = new DelegatingEngine(array($engine)); + $delegatingEngine = new DelegatingEngine([$engine]); $this->assertTrue($delegatingEngine->supports('template.php')); } @@ -97,7 +97,7 @@ class DelegatingEngineTest extends TestCase { $engine = $this->getEngineMock('template.php', false); - $delegatingEngine = new DelegatingEngine(array($engine)); + $delegatingEngine = new DelegatingEngine([$engine]); $this->assertFalse($delegatingEngine->supports('template.php')); } @@ -107,7 +107,7 @@ class DelegatingEngineTest extends TestCase $firstEngine = $this->getEngineMock('template.php', false); $secondEngine = $this->getEngineMock('template.php', true); - $delegatingEngine = new DelegatingEngine(array($firstEngine, $secondEngine)); + $delegatingEngine = new DelegatingEngine([$firstEngine, $secondEngine]); $this->assertSame($secondEngine, $delegatingEngine->getEngine('template.php')); } @@ -121,7 +121,7 @@ class DelegatingEngineTest extends TestCase $firstEngine = $this->getEngineMock('template.php', false); $secondEngine = $this->getEngineMock('template.php', false); - $delegatingEngine = new DelegatingEngine(array($firstEngine, $secondEngine)); + $delegatingEngine = new DelegatingEngine([$firstEngine, $secondEngine]); $delegatingEngine->getEngine('template.php'); } @@ -156,7 +156,7 @@ interface MyStreamingEngine extends StreamingEngineInterface, EngineInterface class TestEngine implements EngineInterface { - public function render($name, array $parameters = array()) + public function render($name, array $parameters = []) { } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php index dbc89bc6..e66d6239 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php @@ -39,7 +39,7 @@ class CacheLoaderTest extends TestCase $logger ->expects($this->once()) ->method('debug') - ->with('Storing template in cache.', array('name' => 'index')); + ->with('Storing template in cache.', ['name' => 'index']); $loader->setLogger($logger); $loader->load(new TemplateReference('index')); @@ -47,7 +47,7 @@ class CacheLoaderTest extends TestCase $logger ->expects($this->once()) ->method('debug') - ->with('Fetching template from cache.', array('name' => 'index')); + ->with('Fetching template from cache.', ['name' => 'index']); $loader->setLogger($logger); $loader->load(new TemplateReference('index')); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.php index 7e403995..c81698bd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.php @@ -30,20 +30,20 @@ class ChainLoaderTest extends TestCase public function testConstructor() { - $loader = new ProjectTemplateLoader1(array($this->loader1, $this->loader2)); - $this->assertEquals(array($this->loader1, $this->loader2), $loader->getLoaders(), '__construct() takes an array of template loaders as its second argument'); + $loader = new ProjectTemplateLoader1([$this->loader1, $this->loader2]); + $this->assertEquals([$this->loader1, $this->loader2], $loader->getLoaders(), '__construct() takes an array of template loaders as its second argument'); } public function testAddLoader() { - $loader = new ProjectTemplateLoader1(array($this->loader1)); + $loader = new ProjectTemplateLoader1([$this->loader1]); $loader->addLoader($this->loader2); - $this->assertEquals(array($this->loader1, $this->loader2), $loader->getLoaders(), '->addLoader() adds a template loader at the end of the loaders'); + $this->assertEquals([$this->loader1, $this->loader2], $loader->getLoaders(), '->addLoader() adds a template loader at the end of the loaders'); } public function testLoad() { - $loader = new ProjectTemplateLoader1(array($this->loader1, $this->loader2)); + $loader = new ProjectTemplateLoader1([$this->loader1, $this->loader2]); $this->assertFalse($loader->load(new TemplateReference('bar', 'php')), '->load() returns false if the template is not found'); $this->assertFalse($loader->load(new TemplateReference('foo', 'php')), '->load() returns false if the template does not exist for the given renderer'); $this->assertInstanceOf( diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php index 04b93fb1..c6dcdefc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php @@ -29,9 +29,9 @@ class FilesystemLoaderTest extends TestCase $pathPattern = self::$fixturesPath.'/templates/%name%.%engine%'; $path = self::$fixturesPath.'/templates'; $loader = new ProjectTemplateLoader2($pathPattern); - $this->assertEquals(array($pathPattern), $loader->getTemplatePathPatterns(), '__construct() takes a path as its second argument'); - $loader = new ProjectTemplateLoader2(array($pathPattern)); - $this->assertEquals(array($pathPattern), $loader->getTemplatePathPatterns(), '__construct() takes an array of paths as its second argument'); + $this->assertEquals([$pathPattern], $loader->getTemplatePathPatterns(), '__construct() takes a path as its second argument'); + $loader = new ProjectTemplateLoader2([$pathPattern]); + $this->assertEquals([$pathPattern], $loader->getTemplatePathPatterns(), '__construct() takes an array of paths as its second argument'); } public function testIsAbsolutePath() @@ -66,7 +66,7 @@ class FilesystemLoaderTest extends TestCase $loader->setLogger($logger); $this->assertFalse($loader->load(new TemplateReference('foo.xml', 'php')), '->load() returns false if the template does not exist for the given engine'); - $loader = new ProjectTemplateLoader2(array(self::$fixturesPath.'/null/%name%', $pathPattern)); + $loader = new ProjectTemplateLoader2([self::$fixturesPath.'/null/%name%', $pathPattern]); $loader->setLogger($logger); $loader->load(new TemplateReference('foo.php', 'php')); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/PhpEngineTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/PhpEngineTest.php index f677c302..1b469d7e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/PhpEngineTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/PhpEngineTest.php @@ -93,7 +93,7 @@ class PhpEngineTest extends TestCase public function testExtendRender() { - $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader, array(), array(new SlotsHelper())); + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader, [], [new SlotsHelper()]); try { $engine->render('name'); $this->fail('->render() throws an InvalidArgumentException if the template does not exist'); @@ -102,25 +102,25 @@ class PhpEngineTest extends TestCase $this->assertEquals('The template "name" does not exist.', $e->getMessage(), '->render() throws an InvalidArgumentException if the template does not exist'); } - $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader, array(new SlotsHelper())); + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader, [new SlotsHelper()]); $engine->set(new \Symfony\Component\Templating\Tests\Fixtures\SimpleHelper('bar')); $this->loader->setTemplate('foo.php', 'extend("layout.php"); echo $this[\'foo\'].$foo ?>'); $this->loader->setTemplate('layout.php', '-get("_content") ?>-'); - $this->assertEquals('-barfoo-', $engine->render('foo.php', array('foo' => 'foo')), '->render() uses the decorator to decorate the template'); + $this->assertEquals('-barfoo-', $engine->render('foo.php', ['foo' => 'foo']), '->render() uses the decorator to decorate the template'); - $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader, array(new SlotsHelper())); + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader, [new SlotsHelper()]); $engine->set(new \Symfony\Component\Templating\Tests\Fixtures\SimpleHelper('bar')); $this->loader->setTemplate('bar.php', 'bar'); $this->loader->setTemplate('foo.php', 'extend("layout.php"); echo $foo ?>'); $this->loader->setTemplate('layout.php', 'render("bar.php") ?>-get("_content") ?>-'); - $this->assertEquals('bar-foo-', $engine->render('foo.php', array('foo' => 'foo', 'bar' => 'bar')), '->render() supports render() calls in templates'); + $this->assertEquals('bar-foo-', $engine->render('foo.php', ['foo' => 'foo', 'bar' => 'bar']), '->render() supports render() calls in templates'); } public function testRenderParameter() { $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader); $this->loader->setTemplate('foo.php', ''); - $this->assertEquals('foobar', $engine->render('foo.php', array('template' => 'foo', 'parameters' => 'bar')), '->render() extract variables'); + $this->assertEquals('foobar', $engine->render('foo.php', ['template' => 'foo', 'parameters' => 'bar']), '->render() extract variables'); } /** @@ -131,15 +131,15 @@ class PhpEngineTest extends TestCase { $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader); $this->loader->setTemplate('foo.php', 'bar'); - $engine->render('foo.php', array($name => 'foo')); + $engine->render('foo.php', [$name => 'foo']); } public function forbiddenParameterNames() { - return array( - array('this'), - array('view'), - ); + return [ + ['this'], + ['view'], + ]; } public function testEscape() @@ -153,7 +153,7 @@ class PhpEngineTest extends TestCase public function testGetSetCharset() { $helper = new SlotsHelper(); - $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader, array($helper)); + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader, [$helper]); $this->assertEquals('UTF-8', $engine->getCharset(), 'EngineInterface::getCharset() returns UTF-8 by default'); $this->assertEquals('UTF-8', $helper->getCharset(), 'HelperInterface::getCharset() returns UTF-8 by default'); @@ -167,9 +167,9 @@ class PhpEngineTest extends TestCase $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader); $engine->addGlobal('global_variable', 'lorem ipsum'); - $this->assertEquals(array( + $this->assertEquals([ 'global_variable' => 'lorem ipsum', - ), $engine->getGlobals()); + ], $engine->getGlobals()); } public function testGlobalsGetPassedToTemplate() @@ -181,7 +181,7 @@ class PhpEngineTest extends TestCase $this->assertEquals($engine->render('global.php'), 'global variable'); - $this->assertEquals($engine->render('global.php', array('global' => 'overwritten')), 'overwritten'); + $this->assertEquals($engine->render('global.php', ['global' => 'overwritten']), 'overwritten'); } public function testGetLoader() @@ -202,7 +202,7 @@ class ProjectTemplateEngine extends PhpEngine class ProjectTemplateLoader extends Loader { - public $templates = array(); + public $templates = []; public function setTemplate($name, $content) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php index 14a01940..c67dc376 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php @@ -42,10 +42,10 @@ class TemplateNameParserTest extends TestCase public function getLogicalNameToTemplateProvider() { - return array( - array('/path/to/section/name.engine', new TemplateReference('/path/to/section/name.engine', 'engine')), - array('name.engine', new TemplateReference('name.engine', 'engine')), - array('name', new TemplateReference('name')), - ); + return [ + ['/path/to/section/name.engine', new TemplateReference('/path/to/section/name.engine', 'engine')], + ['name.engine', new TemplateReference('name.engine', 'engine')], + ['name', new TemplateReference('name')], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php index a0765ddd..919bab8f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php @@ -40,19 +40,19 @@ abstract class AbstractOperation implements OperationInterface * * The data structure of this array is as follows: * - * array( - * 'domain 1' => array( - * 'all' => array(...), - * 'new' => array(...), - * 'obsolete' => array(...) - * ), - * 'domain 2' => array( - * 'all' => array(...), - * 'new' => array(...), - * 'obsolete' => array(...) - * ), + * [ + * 'domain 1' => [ + * 'all' => [...], + * 'new' => [...], + * 'obsolete' => [...] + * ], + * 'domain 2' => [ + * 'all' => [...], + * 'new' => [...], + * 'obsolete' => [...] + * ], * ... - * ) + * ] * * @var array The array that stores 'all', 'new' and 'obsolete' messages */ @@ -70,7 +70,7 @@ abstract class AbstractOperation implements OperationInterface $this->source = $source; $this->target = $target; $this->result = new MessageCatalogue($source->getLocale()); - $this->messages = array(); + $this->messages = []; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/MergeOperation.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/MergeOperation.php index 6db3f801..4e1e3cec 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/MergeOperation.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/MergeOperation.php @@ -27,15 +27,15 @@ class MergeOperation extends AbstractOperation */ protected function processDomain($domain) { - $this->messages[$domain] = array( - 'all' => array(), - 'new' => array(), - 'obsolete' => array(), - ); + $this->messages[$domain] = [ + 'all' => [], + 'new' => [], + 'obsolete' => [], + ]; foreach ($this->source->all($domain) as $id => $message) { $this->messages[$domain]['all'][$id] = $message; - $this->result->add(array($id => $message), $domain); + $this->result->add([$id => $message], $domain); if (null !== $keyMetadata = $this->source->getMetadata($id, $domain)) { $this->result->setMetadata($id, $keyMetadata, $domain); } @@ -45,7 +45,7 @@ class MergeOperation extends AbstractOperation if (!$this->source->has($id, $domain)) { $this->messages[$domain]['all'][$id] = $message; $this->messages[$domain]['new'][$id] = $message; - $this->result->add(array($id => $message), $domain); + $this->result->add([$id => $message], $domain); if (null !== $keyMetadata = $this->target->getMetadata($id, $domain)) { $this->result->setMetadata($id, $keyMetadata, $domain); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/TargetOperation.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/TargetOperation.php index f3b0a29d..35eff71f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/TargetOperation.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/TargetOperation.php @@ -28,25 +28,25 @@ class TargetOperation extends AbstractOperation */ protected function processDomain($domain) { - $this->messages[$domain] = array( - 'all' => array(), - 'new' => array(), - 'obsolete' => array(), - ); + $this->messages[$domain] = [ + 'all' => [], + 'new' => [], + 'obsolete' => [], + ]; // For 'all' messages, the code can't be simplified as ``$this->messages[$domain]['all'] = $target->all($domain);``, // because doing so will drop messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback} // - // For 'new' messages, the code can't be simplied as ``array_diff_assoc($this->target->all($domain), $this->source->all($domain));`` + // For 'new' messages, the code can't be simplified as ``array_diff_assoc($this->target->all($domain), $this->source->all($domain));`` // because doing so will not exclude messages like {x: x ∈ target ∧ x ∉ source.all ∧ x ∈ source.fallback} // - // For 'obsolete' messages, the code can't be simplifed as ``array_diff_assoc($this->source->all($domain), $this->target->all($domain))`` + // For 'obsolete' messages, the code can't be simplified as ``array_diff_assoc($this->source->all($domain), $this->target->all($domain))`` // because doing so will not exclude messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback} foreach ($this->source->all($domain) as $id => $message) { if ($this->target->has($id, $domain)) { $this->messages[$domain]['all'][$id] = $message; - $this->result->add(array($id => $message), $domain); + $this->result->add([$id => $message], $domain); if (null !== $keyMetadata = $this->source->getMetadata($id, $domain)) { $this->result->setMetadata($id, $keyMetadata, $domain); } @@ -59,7 +59,7 @@ class TargetOperation extends AbstractOperation if (!$this->source->has($id, $domain)) { $this->messages[$domain]['all'][$id] = $message; $this->messages[$domain]['new'][$id] = $message; - $this->result->add(array($id => $message), $domain); + $this->result->add([$id => $message], $domain); if (null !== $keyMetadata = $this->target->getMetadata($id, $domain)) { $this->result->setMetadata($id, $keyMetadata, $domain); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Command/XliffLintCommand.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Command/XliffLintCommand.php index 885d20e4..89a4e50e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Command/XliffLintCommand.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Command/XliffLintCommand.php @@ -85,14 +85,14 @@ EOF throw new RuntimeException('Please provide a filename or pipe file content to STDIN.'); } - return $this->display($io, array($this->validate($stdin))); + return $this->display($io, [$this->validate($stdin)]); } if (!$this->isReadable($filename)) { throw new RuntimeException(sprintf('File or directory "%s" is not readable.', $filename)); } - $filesInfo = array(); + $filesInfo = []; foreach ($this->getFiles($filename) as $file) { $filesInfo[] = $this->validate(file_get_contents($file), $file); } @@ -104,7 +104,7 @@ EOF { // Avoid: Warning DOMDocument::loadXML(): Empty string supplied as input if ('' === trim($content)) { - return array('file' => $file, 'valid' => true); + return ['file' => $file, 'valid' => true]; } libxml_use_internal_errors(true); @@ -112,21 +112,21 @@ EOF $document = new \DOMDocument(); $document->loadXML($content); if ($document->schemaValidate(__DIR__.'/../Resources/schemas/xliff-core-1.2-strict.xsd')) { - return array('file' => $file, 'valid' => true); + return ['file' => $file, 'valid' => true]; } $errorMessages = array_map(function ($error) { - return array( + return [ 'line' => $error->line, 'column' => $error->column, 'message' => trim($error->message), - ); + ]; }, libxml_get_errors()); libxml_clear_errors(); libxml_use_internal_errors(false); - return array('file' => $file, 'valid' => false, 'messages' => $errorMessages); + return ['file' => $file, 'valid' => false, 'messages' => $errorMessages]; } private function display(SymfonyStyle $io, array $files) @@ -193,7 +193,7 @@ EOF } foreach ($this->getDirectoryIterator($fileOrDirectory) as $file) { - if (!\in_array($file->getExtension(), array('xlf', 'xliff'))) { + if (!\in_array($file->getExtension(), ['xlf', 'xliff'])) { continue; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php index edd712dd..7aabcb24 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php @@ -57,7 +57,7 @@ class TranslationDataCollector extends DataCollector implements LateDataCollecto */ public function reset() { - $this->data = array(); + $this->data = []; } /** @@ -65,7 +65,7 @@ class TranslationDataCollector extends DataCollector implements LateDataCollecto */ public function getMessages() { - return isset($this->data['messages']) ? $this->data['messages'] : array(); + return isset($this->data['messages']) ? $this->data['messages'] : []; } /** @@ -99,7 +99,7 @@ class TranslationDataCollector extends DataCollector implements LateDataCollecto public function getFallbackLocales() { - return (isset($this->data['fallback_locales']) && \count($this->data['fallback_locales']) > 0) ? $this->data['fallback_locales'] : array(); + return (isset($this->data['fallback_locales']) && \count($this->data['fallback_locales']) > 0) ? $this->data['fallback_locales'] : []; } /** @@ -112,13 +112,13 @@ class TranslationDataCollector extends DataCollector implements LateDataCollecto private function sanitizeCollectedMessages($messages) { - $result = array(); + $result = []; foreach ($messages as $key => $message) { $messageId = $message['locale'].$message['domain'].$message['id']; if (!isset($result[$messageId])) { $message['count'] = 1; - $message['parameters'] = !empty($message['parameters']) ? array($message['parameters']) : array(); + $message['parameters'] = !empty($message['parameters']) ? [$message['parameters']] : []; $messages[$key]['translation'] = $this->sanitizeString($message['translation']); $result[$messageId] = $message; } else { @@ -137,11 +137,11 @@ class TranslationDataCollector extends DataCollector implements LateDataCollecto private function computeCount($messages) { - $count = array( + $count = [ DataCollectorTranslator::MESSAGE_DEFINED => 0, DataCollectorTranslator::MESSAGE_MISSING => 0, DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK => 0, - ); + ]; foreach ($messages as $message) { ++$count[$message['state']]; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DataCollectorTranslator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DataCollectorTranslator.php index 00147bcf..6f826dfa 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DataCollectorTranslator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DataCollectorTranslator.php @@ -27,7 +27,7 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter */ private $translator; - private $messages = array(); + private $messages = []; /** * @param TranslatorInterface $translator The translator must implement TranslatorBagInterface @@ -44,7 +44,7 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter /** * {@inheritdoc} */ - public function trans($id, array $parameters = array(), $domain = null, $locale = null) + public function trans($id, array $parameters = [], $domain = null, $locale = null) { $trans = $this->translator->trans($id, $parameters, $domain, $locale); $this->collectMessage($locale, $domain, $id, $trans, $parameters); @@ -55,7 +55,7 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter /** * {@inheritdoc} */ - public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + public function transChoice($id, $number, array $parameters = [], $domain = null, $locale = null) { $trans = $this->translator->transChoice($id, $number, $parameters, $domain, $locale); $this->collectMessage($locale, $domain, $id, $trans, $parameters, $number); @@ -98,7 +98,7 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter return $this->translator->getFallbackLocales(); } - return array(); + return []; } /** @@ -106,7 +106,7 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter */ public function __call($method, $args) { - return \call_user_func_array(array($this->translator, $method), $args); + return \call_user_func_array([$this->translator, $method], $args); } /** @@ -125,7 +125,7 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter * @param array|null $parameters * @param int|null $number */ - private function collectMessage($locale, $domain, $id, $translation, $parameters = array(), $number = null) + private function collectMessage($locale, $domain, $id, $translation, $parameters = [], $number = null) { if (null === $domain) { $domain = 'messages'; @@ -152,7 +152,7 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter $state = self::MESSAGE_MISSING; } - $this->messages[] = array( + $this->messages[] = [ 'locale' => $locale, 'domain' => $domain, 'id' => $id, @@ -160,6 +160,6 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter 'parameters' => $parameters, 'transChoiceNumber' => $number, 'state' => $state, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DependencyInjection/TranslationDumperPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DependencyInjection/TranslationDumperPass.php index 92bac5be..4656d667 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DependencyInjection/TranslationDumperPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DependencyInjection/TranslationDumperPass.php @@ -38,7 +38,7 @@ class TranslationDumperPass implements CompilerPassInterface $definition = $container->getDefinition($this->writerServiceId); foreach ($container->findTaggedServiceIds($this->dumperTag, true) as $id => $attributes) { - $definition->addMethodCall('addDumper', array($attributes[0]['alias'], new Reference($id))); + $definition->addMethodCall('addDumper', [$attributes[0]['alias'], new Reference($id)]); } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DependencyInjection/TranslationExtractorPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DependencyInjection/TranslationExtractorPass.php index 4014d499..bb4c5dca 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DependencyInjection/TranslationExtractorPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DependencyInjection/TranslationExtractorPass.php @@ -43,7 +43,7 @@ class TranslationExtractorPass implements CompilerPassInterface throw new RuntimeException(sprintf('The alias for the tag "translation.extractor" of service "%s" must be set.', $id)); } - $definition->addMethodCall('addExtractor', array($attributes[0]['alias'], new Reference($id))); + $definition->addMethodCall('addExtractor', [$attributes[0]['alias'], new Reference($id)]); } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DependencyInjection/TranslatorPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DependencyInjection/TranslatorPass.php index 2d50715f..373a556e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DependencyInjection/TranslatorPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/DependencyInjection/TranslatorPass.php @@ -43,8 +43,8 @@ class TranslatorPass implements CompilerPassInterface return; } - $loaders = array(); - $loaderRefs = array(); + $loaders = []; + $loaderRefs = []; foreach ($container->findTaggedServiceIds($this->loaderTag, true) as $id => $attributes) { $loaderRefs[$id] = new Reference($id); $loaders[$id][] = $attributes[0]['alias']; @@ -57,7 +57,7 @@ class TranslatorPass implements CompilerPassInterface $definition = $container->getDefinition($this->readerServiceId); foreach ($loaders as $id => $formats) { foreach ($formats as $format) { - $definition->addMethodCall('addLoader', array($format, $loaderRefs[$id])); + $definition->addMethodCall('addLoader', [$format, $loaderRefs[$id]]); } } } @@ -68,7 +68,7 @@ class TranslatorPass implements CompilerPassInterface $definition = $container->getDefinition('translation.reader'); foreach ($loaders as $id => $formats) { foreach ($formats as $format) { - $definition->addMethodCall('addLoader', array($format, $loaderRefs[$id])); + $definition->addMethodCall('addLoader', [$format, $loaderRefs[$id]]); } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php index 0880528d..bfa8db61 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php @@ -26,12 +26,12 @@ class CsvFileDumper extends FileDumper /** * {@inheritdoc} */ - public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []) { $handle = fopen('php://memory', 'r+b'); foreach ($messages->all($domain) as $source => $target) { - fputcsv($handle, array($source, $target), $this->delimiter, $this->enclosure); + fputcsv($handle, [$source, $target], $this->delimiter, $this->enclosure); } rewind($handle); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/DumperInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/DumperInterface.php index cebc65ed..9965e809 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/DumperInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/DumperInterface.php @@ -27,5 +27,5 @@ interface DumperInterface * @param MessageCatalogue $messages The message catalogue * @param array $options Options that are used by the dumper */ - public function dump(MessageCatalogue $messages, $options = array()); + public function dump(MessageCatalogue $messages, $options = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/FileDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/FileDumper.php index f81f79c3..102f9285 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/FileDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/FileDumper.php @@ -63,9 +63,9 @@ abstract class FileDumper implements DumperInterface /** * {@inheritdoc} */ - public function dump(MessageCatalogue $messages, $options = array()) + public function dump(MessageCatalogue $messages, $options = []) { - if (!array_key_exists('path', $options)) { + if (!\array_key_exists('path', $options)) { throw new InvalidArgumentException('The file dumper needs a path option.'); } @@ -98,7 +98,7 @@ abstract class FileDumper implements DumperInterface * * @return string representation */ - abstract public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()); + abstract public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []); /** * Gets the file extension of the dumper. @@ -117,10 +117,10 @@ abstract class FileDumper implements DumperInterface */ private function getRelativePath($domain, $locale) { - return strtr($this->relativePathTemplate, array( + return strtr($this->relativePathTemplate, [ '%domain%' => $domain, '%locale%' => $locale, '%extension%' => $this->getExtension(), - )); + ]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php index efa9d7fe..48d0befd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php @@ -28,7 +28,7 @@ class IcuResFileDumper extends FileDumper /** * {@inheritdoc} */ - public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []) { $data = $indexes = $resources = ''; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/IniFileDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/IniFileDumper.php index 9ed37540..45ff9614 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/IniFileDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/IniFileDumper.php @@ -23,7 +23,7 @@ class IniFileDumper extends FileDumper /** * {@inheritdoc} */ - public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []) { $output = ''; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/JsonFileDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/JsonFileDumper.php index 11fe13d0..3ee446dc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/JsonFileDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/JsonFileDumper.php @@ -23,7 +23,7 @@ class JsonFileDumper extends FileDumper /** * {@inheritdoc} */ - public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []) { if (isset($options['json_encoding'])) { $flags = $options['json_encoding']; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/MoFileDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/MoFileDumper.php index 32ed0ac2..27be16d5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/MoFileDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/MoFileDumper.php @@ -24,20 +24,20 @@ class MoFileDumper extends FileDumper /** * {@inheritdoc} */ - public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []) { $sources = $targets = $sourceOffsets = $targetOffsets = ''; - $offsets = array(); + $offsets = []; $size = 0; foreach ($messages->all($domain) as $source => $target) { - $offsets[] = array_map('strlen', array($sources, $source, $targets, $target)); + $offsets[] = array_map('strlen', [$sources, $source, $targets, $target]); $sources .= "\0".$source; $targets .= "\0".$target; ++$size; } - $header = array( + $header = [ 'magicNumber' => MoFileLoader::MO_LITTLE_ENDIAN_MAGIC, 'formatRevision' => 0, 'count' => $size, @@ -45,7 +45,7 @@ class MoFileDumper extends FileDumper 'offsetTranslated' => MoFileLoader::MO_HEADER_SIZE + (8 * $size), 'sizeHashes' => 0, 'offsetHashes' => MoFileLoader::MO_HEADER_SIZE + (16 * $size), - ); + ]; $sourcesSize = \strlen($sources); $sourcesStart = $header['offsetHashes'] + 1; @@ -57,7 +57,7 @@ class MoFileDumper extends FileDumper .$this->writeLong($offset[2] + $sourcesStart + $sourcesSize); } - $output = implode('', array_map(array($this, 'writeLong'), $header)) + $output = implode('', array_map([$this, 'writeLong'], $header)) .$sourceOffsets .$targetOffsets .$sources diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php index c7c37aac..e77afc2f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php @@ -23,7 +23,7 @@ class PhpFileDumper extends FileDumper /** * {@inheritdoc} */ - public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []) { return "all($domain), true).";\n"; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/PoFileDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/PoFileDumper.php index ed4418b1..e9673b6d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/PoFileDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/PoFileDumper.php @@ -23,7 +23,7 @@ class PoFileDumper extends FileDumper /** * {@inheritdoc} */ - public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []) { $output = 'msgid ""'."\n"; $output .= 'msgstr ""'."\n"; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/QtFileDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/QtFileDumper.php index a9073f26..ec93f92e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/QtFileDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/QtFileDumper.php @@ -23,7 +23,7 @@ class QtFileDumper extends FileDumper /** * {@inheritdoc} */ - public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []) { $dom = new \DOMDocument('1.0', 'utf-8'); $dom->formatOutput = true; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php index e714463c..cd867b09 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php @@ -24,14 +24,14 @@ class XliffFileDumper extends FileDumper /** * {@inheritdoc} */ - public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []) { $xliffVersion = '1.2'; - if (array_key_exists('xliff_version', $options)) { + if (\array_key_exists('xliff_version', $options)) { $xliffVersion = $options['xliff_version']; } - if (array_key_exists('default_locale', $options)) { + if (\array_key_exists('default_locale', $options)) { $defaultLocale = $options['default_locale']; } else { $defaultLocale = \Locale::getDefault(); @@ -55,10 +55,10 @@ class XliffFileDumper extends FileDumper return 'xlf'; } - private function dumpXliff1($defaultLocale, MessageCatalogue $messages, $domain, array $options = array()) + private function dumpXliff1($defaultLocale, MessageCatalogue $messages, $domain, array $options = []) { - $toolInfo = array('tool-id' => 'symfony', 'tool-name' => 'Symfony'); - if (array_key_exists('tool_info', $options)) { + $toolInfo = ['tool-id' => 'symfony', 'tool-name' => 'Symfony']; + if (\array_key_exists('tool_info', $options)) { $toolInfo = array_merge($toolInfo, $options['tool_info']); } @@ -129,7 +129,7 @@ class XliffFileDumper extends FileDumper return $dom->saveXML(); } - private function dumpXliff2($defaultLocale, MessageCatalogue $messages, $domain, array $options = array()) + private function dumpXliff2($defaultLocale, MessageCatalogue $messages, $domain, array $options = []) { $dom = new \DOMDocument('1.0', 'utf-8'); $dom->formatOutput = true; @@ -195,6 +195,6 @@ class XliffFileDumper extends FileDumper */ private function hasMetadataArrayInfo($key, $metadata = null) { - return null !== $metadata && array_key_exists($key, $metadata) && ($metadata[$key] instanceof \Traversable || \is_array($metadata[$key])); + return null !== $metadata && \array_key_exists($key, $metadata) && ($metadata[$key] instanceof \Traversable || \is_array($metadata[$key])); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/YamlFileDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/YamlFileDumper.php index aab6ad9b..f7e1bcb8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/YamlFileDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/YamlFileDumper.php @@ -33,7 +33,7 @@ class YamlFileDumper extends FileDumper /** * {@inheritdoc} */ - public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []) { if (!class_exists('Symfony\Component\Yaml\Yaml')) { throw new LogicException('Dumping translations in the YAML format requires the Symfony Yaml component.'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/AbstractFileExtractor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/AbstractFileExtractor.php index 18410223..08a27fb0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/AbstractFileExtractor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/AbstractFileExtractor.php @@ -28,14 +28,14 @@ abstract class AbstractFileExtractor protected function extractFiles($resource) { if (\is_array($resource) || $resource instanceof \Traversable) { - $files = array(); + $files = []; foreach ($resource as $file) { if ($this->canBeExtracted($file)) { $files[] = $this->toSplFileInfo($file); } } } elseif (is_file($resource)) { - $files = $this->canBeExtracted($resource) ? array($this->toSplFileInfo($resource)) : array(); + $files = $this->canBeExtracted($resource) ? [$this->toSplFileInfo($resource)] : []; } else { $files = $this->extractFromDirectory($resource); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/ChainExtractor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/ChainExtractor.php index 50e3c845..69ee2dfc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/ChainExtractor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/ChainExtractor.php @@ -25,7 +25,7 @@ class ChainExtractor implements ExtractorInterface * * @var ExtractorInterface[] */ - private $extractors = array(); + private $extractors = []; /** * Adds a loader to the translation extractor. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/PhpExtractor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/PhpExtractor.php index ce626212..7f4c6e60 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/PhpExtractor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/PhpExtractor.php @@ -37,8 +37,8 @@ class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface * * @var array */ - protected $sequences = array( - array( + protected $sequences = [ + [ '->', 'trans', '(', @@ -47,8 +47,8 @@ class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface self::METHOD_ARGUMENTS_TOKEN, ',', self::DOMAIN_TOKEN, - ), - array( + ], + [ '->', 'transChoice', '(', @@ -59,20 +59,20 @@ class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface self::METHOD_ARGUMENTS_TOKEN, ',', self::DOMAIN_TOKEN, - ), - array( + ], + [ '->', 'trans', '(', self::MESSAGE_TOKEN, - ), - array( + ], + [ '->', 'transChoice', '(', self::MESSAGE_TOKEN, - ), - ); + ], + ]; /** * {@inheritdoc} @@ -156,9 +156,14 @@ class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface { $message = ''; $docToken = ''; + $docPart = ''; for (; $tokenIterator->valid(); $tokenIterator->next()) { $t = $tokenIterator->current(); + if ('.' === $t) { + // Concatenate with next token + continue; + } if (!isset($t[1])) { break; } @@ -169,19 +174,24 @@ class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface break; case T_ENCAPSED_AND_WHITESPACE: case T_CONSTANT_ENCAPSED_STRING: - $message .= $t[1]; + if ('' === $docToken) { + $message .= PhpStringTokenParser::parse($t[1]); + } else { + $docPart = $t[1]; + } break; case T_END_HEREDOC: - return PhpStringTokenParser::parseDocString($docToken, $message); + $message .= PhpStringTokenParser::parseDocString($docToken, $docPart); + $docToken = ''; + $docPart = ''; + break; + case T_WHITESPACE: + break; default: break 2; } } - if ($message) { - $message = PhpStringTokenParser::parse($message); - } - return $message; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/PhpStringTokenParser.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/PhpStringTokenParser.php index e8094e6c..8a8ccb1f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/PhpStringTokenParser.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/PhpStringTokenParser.php @@ -49,7 +49,7 @@ namespace Symfony\Component\Translation\Extractor; class PhpStringTokenParser { - protected static $replacements = array( + protected static $replacements = [ '\\' => '\\', '$' => '$', 'n' => "\n", @@ -58,7 +58,7 @@ class PhpStringTokenParser 'f' => "\f", 'v' => "\v", 'e' => "\x1B", - ); + ]; /** * Parses a string token. @@ -76,8 +76,8 @@ class PhpStringTokenParser if ('\'' === $str[$bLength]) { return str_replace( - array('\\\\', '\\\''), - array('\\', '\''), + ['\\\\', '\\\''], + ['\\', '\''], substr($str, $bLength + 1, -1) ); } else { @@ -101,7 +101,7 @@ class PhpStringTokenParser return preg_replace_callback( '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3})~', - array(__CLASS__, 'parseCallback'), + [__CLASS__, 'parseCallback'], $str ); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Formatter/ChoiceMessageFormatterInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Formatter/ChoiceMessageFormatterInterface.php index 92acbcaf..027b2eb5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Formatter/ChoiceMessageFormatterInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Formatter/ChoiceMessageFormatterInterface.php @@ -26,5 +26,5 @@ interface ChoiceMessageFormatterInterface * * @return string */ - public function choiceFormat($message, $number, $locale, array $parameters = array()); + public function choiceFormat($message, $number, $locale, array $parameters = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Formatter/MessageFormatter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Formatter/MessageFormatter.php index e174be36..f7204c3b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Formatter/MessageFormatter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Formatter/MessageFormatter.php @@ -31,7 +31,7 @@ class MessageFormatter implements MessageFormatterInterface, ChoiceMessageFormat /** * {@inheritdoc} */ - public function format($message, $locale, array $parameters = array()) + public function format($message, $locale, array $parameters = []) { return strtr($message, $parameters); } @@ -39,9 +39,9 @@ class MessageFormatter implements MessageFormatterInterface, ChoiceMessageFormat /** * {@inheritdoc} */ - public function choiceFormat($message, $number, $locale, array $parameters = array()) + public function choiceFormat($message, $number, $locale, array $parameters = []) { - $parameters = array_merge(array('%count%' => $number), $parameters); + $parameters = array_merge(['%count%' => $number], $parameters); return $this->format($this->selector->choose($message, (int) $number, $locale), $locale, $parameters); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Formatter/MessageFormatterInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Formatter/MessageFormatterInterface.php index 86937fb2..370c0558 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Formatter/MessageFormatterInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Formatter/MessageFormatterInterface.php @@ -26,5 +26,5 @@ interface MessageFormatterInterface * * @return string */ - public function format($message, $locale, array $parameters = array()); + public function format($message, $locale, array $parameters = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/IdentityTranslator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/IdentityTranslator.php index 82b24701..2d90509d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/IdentityTranslator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/IdentityTranslator.php @@ -48,7 +48,7 @@ class IdentityTranslator implements TranslatorInterface /** * {@inheritdoc} */ - public function trans($id, array $parameters = array(), $domain = null, $locale = null) + public function trans($id, array $parameters = [], $domain = null, $locale = null) { return strtr((string) $id, $parameters); } @@ -56,7 +56,7 @@ class IdentityTranslator implements TranslatorInterface /** * {@inheritdoc} */ - public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + public function transChoice($id, $number, array $parameters = [], $domain = null, $locale = null) { return strtr($this->selector->choose((string) $id, (int) $number, $locale ?: $this->getLocale()), $parameters); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/ArrayLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/ArrayLoader.php index 7bbfca68..0a6f9f08 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/ArrayLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/ArrayLoader.php @@ -36,7 +36,7 @@ class ArrayLoader implements LoaderInterface * Flattens an nested array of translations. * * The scheme used is: - * 'key' => array('key2' => array('key3' => 'value')) + * 'key' => ['key2' => ['key3' => 'value']] * Becomes: * 'key.key2.key3' => 'value' * diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/CsvFileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/CsvFileLoader.php index 8a763e72..18cc83ed 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/CsvFileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/CsvFileLoader.php @@ -29,7 +29,7 @@ class CsvFileLoader extends FileLoader */ protected function loadResource($resource) { - $messages = array(); + $messages = []; try { $file = new \SplFileObject($resource, 'rb'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/FileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/FileLoader.php index 9a02f525..7ec54a3c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/FileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/FileLoader.php @@ -37,7 +37,7 @@ abstract class FileLoader extends ArrayLoader // empty resource if (null === $messages) { - $messages = array(); + $messages = []; } // not an array diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/IcuResFileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/IcuResFileLoader.php index fd2d1e4d..b59c0214 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/IcuResFileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/IcuResFileLoader.php @@ -76,7 +76,7 @@ class IcuResFileLoader implements LoaderInterface * * @return array the flattened ResourceBundle */ - protected function flatten(\ResourceBundle $rb, array &$messages = array(), $path = null) + protected function flatten(\ResourceBundle $rb, array &$messages = [], $path = null) { foreach ($rb as $key => $value) { $nodePath = $path ? $path.'.'.$key : $key; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/JsonFileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/JsonFileLoader.php index ce4e91ff..52672127 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/JsonFileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/JsonFileLoader.php @@ -25,7 +25,7 @@ class JsonFileLoader extends FileLoader */ protected function loadResource($resource) { - $messages = array(); + $messages = []; if ($data = file_get_contents($resource)) { $messages = json_decode($data, true); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/MoFileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/MoFileLoader.php index 93ecffa6..74d2b2f4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/MoFileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/MoFileLoader.php @@ -71,7 +71,7 @@ class MoFileLoader extends FileLoader // offsetHashes $this->readLong($stream, $isBigEndian); - $messages = array(); + $messages = []; for ($i = 0; $i < $count; ++$i) { $pluralId = null; @@ -108,13 +108,13 @@ class MoFileLoader extends FileLoader $translated = explode("\000", $translated); } - $ids = array('singular' => $singularId, 'plural' => $pluralId); + $ids = ['singular' => $singularId, 'plural' => $pluralId]; $item = compact('ids', 'translated'); if (\is_array($item['translated'])) { $messages[$item['ids']['singular']] = stripcslashes($item['translated'][0]); if (isset($item['ids']['plural'])) { - $plurals = array(); + $plurals = []; foreach ($item['translated'] as $plural => $translated) { $plurals[] = sprintf('{%d} %s', $plural, $translated); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/PoFileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/PoFileLoader.php index 066168dc..1412a786 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/PoFileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/PoFileLoader.php @@ -64,14 +64,14 @@ class PoFileLoader extends FileLoader { $stream = fopen($resource, 'r'); - $defaults = array( - 'ids' => array(), + $defaults = [ + 'ids' => [], 'translated' => null, - ); + ]; - $messages = array(); + $messages = []; $item = $defaults; - $flags = array(); + $flags = []; while ($line = fgets($stream)) { $line = trim($line); @@ -82,7 +82,7 @@ class PoFileLoader extends FileLoader $this->addMessage($messages, $item); } $item = $defaults; - $flags = array(); + $flags = []; } elseif ('#,' === substr($line, 0, 2)) { $flags = array_map('trim', explode(',', substr($line, 2))); } elseif ('msgid "' === substr($line, 0, 7)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/XliffFileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/XliffFileLoader.php index 11a9ce4d..e6750826 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/XliffFileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/XliffFileLoader.php @@ -95,13 +95,13 @@ class XliffFileLoader implements LoaderInterface $catalogue->set((string) $source, $target, $domain); - $metadata = array(); + $metadata = []; if ($notes = $this->parseNotesMetadata($translation->note, $encoding)) { $metadata['notes'] = $notes; } if (isset($translation->target) && $translation->target->attributes()) { - $metadata['target-attributes'] = array(); + $metadata['target-attributes'] = []; foreach ($translation->target->attributes() as $key => $value) { $metadata['target-attributes'][$key] = (string) $value; } @@ -137,18 +137,18 @@ class XliffFileLoader implements LoaderInterface $catalogue->set((string) $source, $target, $domain); - $metadata = array(); + $metadata = []; if (isset($segment->target) && $segment->target->attributes()) { - $metadata['target-attributes'] = array(); + $metadata['target-attributes'] = []; foreach ($segment->target->attributes() as $key => $value) { $metadata['target-attributes'][$key] = (string) $value; } } if (isset($unit->notes)) { - $metadata['notes'] = array(); + $metadata['notes'] = []; foreach ($unit->notes->note as $noteNode) { - $note = array(); + $note = []; foreach ($noteNode->attributes() as $key => $value) { $note[$key] = (string) $value; } @@ -262,7 +262,7 @@ class XliffFileLoader implements LoaderInterface */ private function getXmlErrors($internalErrors) { - $errors = array(); + $errors = []; foreach (libxml_get_errors() as $error) { $errors[] = sprintf('[%s %s] %s (in %s - line %d, column %d)', LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR', @@ -321,7 +321,7 @@ class XliffFileLoader implements LoaderInterface */ private function parseNotesMetadata(\SimpleXMLElement $noteElement = null, $encoding = null) { - $notes = array(); + $notes = []; if (null === $noteElement) { return $notes; @@ -330,7 +330,7 @@ class XliffFileLoader implements LoaderInterface /** @var \SimpleXMLElement $xmlNote */ foreach ($noteElement as $xmlNote) { $noteAttributes = $xmlNote->attributes(); - $note = array('content' => $this->utf8ToCharset((string) $xmlNote, $encoding)); + $note = ['content' => $this->utf8ToCharset((string) $xmlNote, $encoding)]; if (isset($noteAttributes['priority'])) { $note['priority'] = (int) $noteAttributes['priority']; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/LoggingTranslator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/LoggingTranslator.php index 7fedac91..306776e0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/LoggingTranslator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/LoggingTranslator.php @@ -43,7 +43,7 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface /** * {@inheritdoc} */ - public function trans($id, array $parameters = array(), $domain = null, $locale = null) + public function trans($id, array $parameters = [], $domain = null, $locale = null) { $trans = $this->translator->trans($id, $parameters, $domain, $locale); $this->log($id, $domain, $locale); @@ -54,7 +54,7 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface /** * {@inheritdoc} */ - public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + public function transChoice($id, $number, array $parameters = [], $domain = null, $locale = null) { $trans = $this->translator->transChoice($id, $number, $parameters, $domain, $locale); $this->log($id, $domain, $locale); @@ -97,7 +97,7 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface return $this->translator->getFallbackLocales(); } - return array(); + return []; } /** @@ -105,7 +105,7 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface */ public function __call($method, $args) { - return \call_user_func_array(array($this->translator, $method), $args); + return \call_user_func_array([$this->translator, $method], $args); } /** @@ -128,9 +128,9 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface } if ($catalogue->has($id, $domain)) { - $this->logger->debug('Translation use fallback catalogue.', array('id' => $id, 'domain' => $domain, 'locale' => $catalogue->getLocale())); + $this->logger->debug('Translation use fallback catalogue.', ['id' => $id, 'domain' => $domain, 'locale' => $catalogue->getLocale()]); } else { - $this->logger->warning('Translation not found.', array('id' => $id, 'domain' => $domain, 'locale' => $catalogue->getLocale())); + $this->logger->warning('Translation not found.', ['id' => $id, 'domain' => $domain, 'locale' => $catalogue->getLocale()]); } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/MessageCatalogue.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/MessageCatalogue.php index df917bbb..73fdcfdc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/MessageCatalogue.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/MessageCatalogue.php @@ -19,9 +19,9 @@ use Symfony\Component\Translation\Exception\LogicException; */ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterface { - private $messages = array(); - private $metadata = array(); - private $resources = array(); + private $messages = []; + private $metadata = []; + private $resources = []; private $locale; private $fallbackCatalogue; private $parent; @@ -30,7 +30,7 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf * @param string $locale The locale * @param array $messages An array of messages classified by domain */ - public function __construct($locale, array $messages = array()) + public function __construct($locale, array $messages = []) { $this->locale = $locale; $this->messages = $messages; @@ -61,7 +61,7 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf return $this->messages; } - return isset($this->messages[$domain]) ? $this->messages[$domain] : array(); + return isset($this->messages[$domain]) ? $this->messages[$domain] : []; } /** @@ -69,7 +69,7 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf */ public function set($id, $translation, $domain = 'messages') { - $this->add(array($id => $translation), $domain); + $this->add([$id => $translation], $domain); } /** @@ -117,7 +117,7 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf */ public function replace($messages, $domain = 'messages') { - $this->messages[$domain] = array(); + $this->messages[$domain] = []; $this->add($messages, $domain); } @@ -247,7 +247,7 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf public function deleteMetadata($key = '', $domain = 'messages') { if ('' == $domain) { - $this->metadata = array(); + $this->metadata = []; } elseif ('' == $key) { unset($this->metadata[$domain]); } else { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/MessageSelector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/MessageSelector.php index 5de171c5..a7743eba 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/MessageSelector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/MessageSelector.php @@ -49,15 +49,15 @@ class MessageSelector */ public function choose($message, $number, $locale) { - $parts = array(); + $parts = []; if (preg_match('/^\|++$/', $message)) { $parts = explode('|', $message); } elseif (preg_match_all('/(?:\|\||[^\|])++/', $message, $matches)) { $parts = $matches[0]; } - $explicitRules = array(); - $standardRules = array(); + $explicitRules = []; + $standardRules = []; foreach ($parts as $part) { $part = trim(str_replace('||', '|', $part)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/PluralizationRules.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/PluralizationRules.php index 3aca0ba9..d369f5f3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/PluralizationRules.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/PluralizationRules.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Translation; */ class PluralizationRules { - private static $rules = array(); + private static $rules = []; /** * Returns the plural position to use for the given locale and number. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Reader/TranslationReader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Reader/TranslationReader.php index 948edec4..e4554f39 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Reader/TranslationReader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Reader/TranslationReader.php @@ -27,7 +27,7 @@ class TranslationReader implements TranslationReaderInterface * * @var array */ - private $loaders = array(); + private $loaders = []; /** * Adds a loader to the translation extractor. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/AbstractOperationTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/AbstractOperationTest.php index 90cf4a5d..e39ef39e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/AbstractOperationTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/AbstractOperationTest.php @@ -20,7 +20,7 @@ abstract class AbstractOperationTest extends TestCase public function testGetEmptyDomains() { $this->assertEquals( - array(), + [], $this->createOperation( new MessageCatalogue('en'), new MessageCatalogue('en') @@ -31,10 +31,10 @@ abstract class AbstractOperationTest extends TestCase public function testGetMergedDomains() { $this->assertEquals( - array('a', 'b', 'c'), + ['a', 'b', 'c'], $this->createOperation( - new MessageCatalogue('en', array('a' => array(), 'b' => array())), - new MessageCatalogue('en', array('b' => array(), 'c' => array())) + new MessageCatalogue('en', ['a' => [], 'b' => []]), + new MessageCatalogue('en', ['b' => [], 'c' => []]) )->getDomains() ); } @@ -51,9 +51,9 @@ abstract class AbstractOperationTest extends TestCase public function testGetEmptyMessages() { $this->assertEquals( - array(), + [], $this->createOperation( - new MessageCatalogue('en', array('a' => array())), + new MessageCatalogue('en', ['a' => []]), new MessageCatalogue('en') )->getMessages('a') ); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/MergeOperationTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/MergeOperationTest.php index 8b51c15d..0dc68beb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/MergeOperationTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/MergeOperationTest.php @@ -20,22 +20,22 @@ class MergeOperationTest extends AbstractOperationTest public function testGetMessagesFromSingleDomain() { $operation = $this->createOperation( - new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), - new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) + new MessageCatalogue('en', ['messages' => ['a' => 'old_a', 'b' => 'old_b']]), + new MessageCatalogue('en', ['messages' => ['a' => 'new_a', 'c' => 'new_c']]) ); $this->assertEquals( - array('a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c'), + ['a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c'], $operation->getMessages('messages') ); $this->assertEquals( - array('c' => 'new_c'), + ['c' => 'new_c'], $operation->getNewMessages('messages') ); $this->assertEquals( - array(), + [], $operation->getObsoleteMessages('messages') ); } @@ -43,26 +43,26 @@ class MergeOperationTest extends AbstractOperationTest public function testGetResultFromSingleDomain() { $this->assertEquals( - new MessageCatalogue('en', array( - 'messages' => array('a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c'), - )), + new MessageCatalogue('en', [ + 'messages' => ['a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c'], + ]), $this->createOperation( - new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), - new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) + new MessageCatalogue('en', ['messages' => ['a' => 'old_a', 'b' => 'old_b']]), + new MessageCatalogue('en', ['messages' => ['a' => 'new_a', 'c' => 'new_c']]) )->getResult() ); } public function testGetResultWithMetadata() { - $leftCatalogue = new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))); + $leftCatalogue = new MessageCatalogue('en', ['messages' => ['a' => 'old_a', 'b' => 'old_b']]); $leftCatalogue->setMetadata('a', 'foo', 'messages'); $leftCatalogue->setMetadata('b', 'bar', 'messages'); - $rightCatalogue = new MessageCatalogue('en', array('messages' => array('b' => 'new_b', 'c' => 'new_c'))); + $rightCatalogue = new MessageCatalogue('en', ['messages' => ['b' => 'new_b', 'c' => 'new_c']]); $rightCatalogue->setMetadata('b', 'baz', 'messages'); $rightCatalogue->setMetadata('c', 'qux', 'messages'); - $mergedCatalogue = new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c'))); + $mergedCatalogue = new MessageCatalogue('en', ['messages' => ['a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c']]); $mergedCatalogue->setMetadata('a', 'foo', 'messages'); $mergedCatalogue->setMetadata('b', 'bar', 'messages'); $mergedCatalogue->setMetadata('c', 'qux', 'messages'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/TargetOperationTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/TargetOperationTest.php index 271d17fb..8077ff09 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/TargetOperationTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/TargetOperationTest.php @@ -20,22 +20,22 @@ class TargetOperationTest extends AbstractOperationTest public function testGetMessagesFromSingleDomain() { $operation = $this->createOperation( - new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), - new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) + new MessageCatalogue('en', ['messages' => ['a' => 'old_a', 'b' => 'old_b']]), + new MessageCatalogue('en', ['messages' => ['a' => 'new_a', 'c' => 'new_c']]) ); $this->assertEquals( - array('a' => 'old_a', 'c' => 'new_c'), + ['a' => 'old_a', 'c' => 'new_c'], $operation->getMessages('messages') ); $this->assertEquals( - array('c' => 'new_c'), + ['c' => 'new_c'], $operation->getNewMessages('messages') ); $this->assertEquals( - array('b' => 'old_b'), + ['b' => 'old_b'], $operation->getObsoleteMessages('messages') ); } @@ -43,26 +43,26 @@ class TargetOperationTest extends AbstractOperationTest public function testGetResultFromSingleDomain() { $this->assertEquals( - new MessageCatalogue('en', array( - 'messages' => array('a' => 'old_a', 'c' => 'new_c'), - )), + new MessageCatalogue('en', [ + 'messages' => ['a' => 'old_a', 'c' => 'new_c'], + ]), $this->createOperation( - new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), - new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) + new MessageCatalogue('en', ['messages' => ['a' => 'old_a', 'b' => 'old_b']]), + new MessageCatalogue('en', ['messages' => ['a' => 'new_a', 'c' => 'new_c']]) )->getResult() ); } public function testGetResultWithMetadata() { - $leftCatalogue = new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))); + $leftCatalogue = new MessageCatalogue('en', ['messages' => ['a' => 'old_a', 'b' => 'old_b']]); $leftCatalogue->setMetadata('a', 'foo', 'messages'); $leftCatalogue->setMetadata('b', 'bar', 'messages'); - $rightCatalogue = new MessageCatalogue('en', array('messages' => array('b' => 'new_b', 'c' => 'new_c'))); + $rightCatalogue = new MessageCatalogue('en', ['messages' => ['b' => 'new_b', 'c' => 'new_c']]); $rightCatalogue->setMetadata('b', 'baz', 'messages'); $rightCatalogue->setMetadata('c', 'qux', 'messages'); - $diffCatalogue = new MessageCatalogue('en', array('messages' => array('b' => 'old_b', 'c' => 'new_c'))); + $diffCatalogue = new MessageCatalogue('en', ['messages' => ['b' => 'old_b', 'c' => 'new_c']]); $diffCatalogue->setMetadata('b', 'bar', 'messages'); $diffCatalogue->setMetadata('c', 'qux', 'messages'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php index 6665eca4..b4d350ef 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php @@ -27,7 +27,7 @@ class TranslationDataCollectorTest extends TestCase public function testCollectEmptyMessages() { $translator = $this->getTranslator(); - $translator->expects($this->any())->method('getCollectedMessages')->will($this->returnValue(array())); + $translator->expects($this->any())->method('getCollectedMessages')->will($this->returnValue([])); $dataCollector = new TranslationDataCollector($translator); $dataCollector->lateCollect(); @@ -35,94 +35,94 @@ class TranslationDataCollectorTest extends TestCase $this->assertEquals(0, $dataCollector->getCountMissings()); $this->assertEquals(0, $dataCollector->getCountFallbacks()); $this->assertEquals(0, $dataCollector->getCountDefines()); - $this->assertEquals(array(), $dataCollector->getMessages()->getValue()); + $this->assertEquals([], $dataCollector->getMessages()->getValue()); } public function testCollect() { - $collectedMessages = array( - array( + $collectedMessages = [ + [ 'id' => 'foo', 'translation' => 'foo (en)', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_DEFINED, - 'parameters' => array(), + 'parameters' => [], 'transChoiceNumber' => null, - ), - array( + ], + [ 'id' => 'bar', 'translation' => 'bar (fr)', 'locale' => 'fr', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, - 'parameters' => array(), + 'parameters' => [], 'transChoiceNumber' => null, - ), - array( + ], + [ 'id' => 'choice', 'translation' => 'choice', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_MISSING, - 'parameters' => array('%count%' => 3), + 'parameters' => ['%count%' => 3], 'transChoiceNumber' => 3, - ), - array( + ], + [ 'id' => 'choice', 'translation' => 'choice', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_MISSING, - 'parameters' => array('%count%' => 3), + 'parameters' => ['%count%' => 3], 'transChoiceNumber' => 3, - ), - array( + ], + [ 'id' => 'choice', 'translation' => 'choice', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_MISSING, - 'parameters' => array('%count%' => 4, '%foo%' => 'bar'), + 'parameters' => ['%count%' => 4, '%foo%' => 'bar'], 'transChoiceNumber' => 4, - ), - ); - $expectedMessages = array( - array( + ], + ]; + $expectedMessages = [ + [ 'id' => 'foo', 'translation' => 'foo (en)', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_DEFINED, 'count' => 1, - 'parameters' => array(), + 'parameters' => [], 'transChoiceNumber' => null, - ), - array( + ], + [ 'id' => 'bar', 'translation' => 'bar (fr)', 'locale' => 'fr', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, 'count' => 1, - 'parameters' => array(), + 'parameters' => [], 'transChoiceNumber' => null, - ), - array( + ], + [ 'id' => 'choice', 'translation' => 'choice', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_MISSING, 'count' => 3, - 'parameters' => array( - array('%count%' => 3), - array('%count%' => 3), - array('%count%' => 4, '%foo%' => 'bar'), - ), + 'parameters' => [ + ['%count%' => 3], + ['%count%' => 3], + ['%count%' => 4, '%foo%' => 'bar'], + ], 'transChoiceNumber' => 3, - ), - ); + ], + ]; $translator = $this->getTranslator(); $translator->expects($this->any())->method('getCollectedMessages')->will($this->returnValue($collectedMessages)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DataCollectorTranslatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DataCollectorTranslatorTest.php index 1cdd33b3..059d0746 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DataCollectorTranslatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DataCollectorTranslatorTest.php @@ -21,60 +21,60 @@ class DataCollectorTranslatorTest extends TestCase public function testCollectMessages() { $collector = $this->createCollector(); - $collector->setFallbackLocales(array('fr', 'ru')); + $collector->setFallbackLocales(['fr', 'ru']); $collector->trans('foo'); $collector->trans('bar'); $collector->transChoice('choice', 0); $collector->trans('bar_ru'); - $collector->trans('bar_ru', array('foo' => 'bar')); + $collector->trans('bar_ru', ['foo' => 'bar']); - $expectedMessages = array(); - $expectedMessages[] = array( + $expectedMessages = []; + $expectedMessages[] = [ 'id' => 'foo', 'translation' => 'foo (en)', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_DEFINED, - 'parameters' => array(), + 'parameters' => [], 'transChoiceNumber' => null, - ); - $expectedMessages[] = array( + ]; + $expectedMessages[] = [ 'id' => 'bar', 'translation' => 'bar (fr)', 'locale' => 'fr', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, - 'parameters' => array(), + 'parameters' => [], 'transChoiceNumber' => null, - ); - $expectedMessages[] = array( + ]; + $expectedMessages[] = [ 'id' => 'choice', 'translation' => 'choice', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_MISSING, - 'parameters' => array(), + 'parameters' => [], 'transChoiceNumber' => 0, - ); - $expectedMessages[] = array( + ]; + $expectedMessages[] = [ 'id' => 'bar_ru', 'translation' => 'bar (ru)', 'locale' => 'ru', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, - 'parameters' => array(), + 'parameters' => [], 'transChoiceNumber' => null, - ); - $expectedMessages[] = array( + ]; + $expectedMessages[] = [ 'id' => 'bar_ru', 'translation' => 'bar (ru)', 'locale' => 'ru', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, - 'parameters' => array('foo' => 'bar'), + 'parameters' => ['foo' => 'bar'], 'transChoiceNumber' => null, - ); + ]; $this->assertEquals($expectedMessages, $collector->getCollectedMessages()); } @@ -83,9 +83,9 @@ class DataCollectorTranslatorTest extends TestCase { $translator = new Translator('en'); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foo (en)'), 'en'); - $translator->addResource('array', array('bar' => 'bar (fr)'), 'fr'); - $translator->addResource('array', array('bar_ru' => 'bar (ru)'), 'ru'); + $translator->addResource('array', ['foo' => 'foo (en)'], 'en'); + $translator->addResource('array', ['bar' => 'bar (fr)'], 'fr'); + $translator->addResource('array', ['bar_ru' => 'bar (ru)'], 'ru'); return new DataCollectorTranslator($translator); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DependencyInjection/TranslationDumperPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DependencyInjection/TranslationDumperPassTest.php index 759bb0e9..94769e9d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DependencyInjection/TranslationDumperPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DependencyInjection/TranslationDumperPassTest.php @@ -23,12 +23,12 @@ class TranslationDumperPassTest extends TestCase $container = new ContainerBuilder(); $writerDefinition = $container->register('translation.writer'); $container->register('foo.id') - ->addTag('translation.dumper', array('alias' => 'bar.alias')); + ->addTag('translation.dumper', ['alias' => 'bar.alias']); $translationDumperPass = new TranslationDumperPass(); $translationDumperPass->process($container); - $this->assertEquals(array(array('addDumper', array('bar.alias', new Reference('foo.id')))), $writerDefinition->getMethodCalls()); + $this->assertEquals([['addDumper', ['bar.alias', new Reference('foo.id')]]], $writerDefinition->getMethodCalls()); } public function testProcessNoDefinitionFound() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DependencyInjection/TranslationExtractorPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DependencyInjection/TranslationExtractorPassTest.php index 14d164d0..a638498b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DependencyInjection/TranslationExtractorPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DependencyInjection/TranslationExtractorPassTest.php @@ -23,12 +23,12 @@ class TranslationExtractorPassTest extends TestCase $container = new ContainerBuilder(); $extractorDefinition = $container->register('translation.extractor'); $container->register('foo.id') - ->addTag('translation.extractor', array('alias' => 'bar.alias')); + ->addTag('translation.extractor', ['alias' => 'bar.alias']); $translationDumperPass = new TranslationExtractorPass(); $translationDumperPass->process($container); - $this->assertEquals(array(array('addExtractor', array('bar.alias', new Reference('foo.id')))), $extractorDefinition->getMethodCalls()); + $this->assertEquals([['addExtractor', ['bar.alias', new Reference('foo.id')]]], $extractorDefinition->getMethodCalls()); } public function testProcessNoDefinitionFound() @@ -56,7 +56,7 @@ class TranslationExtractorPassTest extends TestCase $container = new ContainerBuilder(); $container->register('translation.extractor'); $container->register('foo.id') - ->addTag('translation.extractor', array()); + ->addTag('translation.extractor', []); $definition->expects($this->never())->method('addMethodCall'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DependencyInjection/TranslationPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DependencyInjection/TranslationPassTest.php index 4c03aaca..96ec6250 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DependencyInjection/TranslationPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DependencyInjection/TranslationPassTest.php @@ -23,12 +23,12 @@ class TranslationPassTest extends TestCase public function testValidCollector() { $loader = (new Definition()) - ->addTag('translation.loader', array('alias' => 'xliff', 'legacy-alias' => 'xlf')); + ->addTag('translation.loader', ['alias' => 'xliff', 'legacy-alias' => 'xlf']); $reader = new Definition(); $translator = (new Definition()) - ->setArguments(array(null, null, null, null)); + ->setArguments([null, null, null, null]); $container = new ContainerBuilder(); $container->setDefinition('translator.default', $translator); @@ -39,19 +39,19 @@ class TranslationPassTest extends TestCase $pass->process($container); $expectedReader = (new Definition()) - ->addMethodCall('addLoader', array('xliff', new Reference('translation.xliff_loader'))) - ->addMethodCall('addLoader', array('xlf', new Reference('translation.xliff_loader'))) + ->addMethodCall('addLoader', ['xliff', new Reference('translation.xliff_loader')]) + ->addMethodCall('addLoader', ['xlf', new Reference('translation.xliff_loader')]) ; $this->assertEquals($expectedReader, $reader); $expectedLoader = (new Definition()) - ->addTag('translation.loader', array('alias' => 'xliff', 'legacy-alias' => 'xlf')) + ->addTag('translation.loader', ['alias' => 'xliff', 'legacy-alias' => 'xlf']) ; $this->assertEquals($expectedLoader, $loader); - $this->assertSame(array('translation.xliff_loader' => array('xliff', 'xlf')), $translator->getArgument(3)); + $this->assertSame(['translation.xliff_loader' => ['xliff', 'xlf']], $translator->getArgument(3)); - $expected = array('translation.xliff_loader' => new ServiceClosureArgument(new Reference('translation.xliff_loader'))); + $expected = ['translation.xliff_loader' => new ServiceClosureArgument(new Reference('translation.xliff_loader'))]; $this->assertEquals($expected, $container->getDefinition((string) $translator->getArgument(0))->getArgument(0)); } @@ -66,13 +66,13 @@ class TranslationPassTest extends TestCase public function testValidCollectorWithDeprecatedTranslationLoader() { $loader = (new Definition()) - ->addTag('translation.loader', array('alias' => 'xliff', 'legacy-alias' => 'xlf')); + ->addTag('translation.loader', ['alias' => 'xliff', 'legacy-alias' => 'xlf']); $legacyReader = new Definition(); $reader = new Definition(); $translator = (new Definition()) - ->setArguments(array(null, null, null, null)); + ->setArguments([null, null, null, null]); $container = new ContainerBuilder(); $container->setDefinition('translator.default', $translator); @@ -84,20 +84,20 @@ class TranslationPassTest extends TestCase $pass->process($container); $expectedReader = (new Definition()) - ->addMethodCall('addLoader', array('xliff', new Reference('translation.xliff_loader'))) - ->addMethodCall('addLoader', array('xlf', new Reference('translation.xliff_loader'))) + ->addMethodCall('addLoader', ['xliff', new Reference('translation.xliff_loader')]) + ->addMethodCall('addLoader', ['xlf', new Reference('translation.xliff_loader')]) ; $this->assertEquals($expectedReader, $legacyReader); $this->assertEquals($expectedReader, $reader); $expectedLoader = (new Definition()) - ->addTag('translation.loader', array('alias' => 'xliff', 'legacy-alias' => 'xlf')) + ->addTag('translation.loader', ['alias' => 'xliff', 'legacy-alias' => 'xlf']) ; $this->assertEquals($expectedLoader, $loader); - $this->assertSame(array('translation.xliff_loader' => array('xliff', 'xlf')), $translator->getArgument(3)); + $this->assertSame(['translation.xliff_loader' => ['xliff', 'xlf']], $translator->getArgument(3)); - $expected = array('translation.xliff_loader' => new ServiceClosureArgument(new Reference('translation.xliff_loader'))); + $expected = ['translation.xliff_loader' => new ServiceClosureArgument(new Reference('translation.xliff_loader'))]; $this->assertEquals($expected, $container->getDefinition((string) $translator->getArgument(0))->getArgument(0)); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/CsvFileDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/CsvFileDumperTest.php index 9a7a059a..0d1cf2c6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/CsvFileDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/CsvFileDumperTest.php @@ -20,8 +20,8 @@ class CsvFileDumperTest extends TestCase public function testFormatCatalogue() { $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar', 'bar' => 'foo -foo', 'foo;foo' => 'bar')); + $catalogue->add(['foo' => 'bar', 'bar' => 'foo +foo', 'foo;foo' => 'bar']); $dumper = new CsvFileDumper(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php index bac567fd..df201461 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php @@ -22,10 +22,10 @@ class FileDumperTest extends TestCase $tempDir = sys_get_temp_dir(); $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); + $catalogue->add(['foo' => 'bar']); $dumper = new ConcreteFileDumper(); - $dumper->dump($catalogue, array('path' => $tempDir)); + $dumper->dump($catalogue, ['path' => $tempDir]); $this->assertFileExists($tempDir.'/messages.en.concrete'); @@ -44,10 +44,10 @@ class FileDumperTest extends TestCase @touch($file); $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); + $catalogue->add(['foo' => 'bar']); $dumper = new ConcreteFileDumper(); - $dumper->dump($catalogue, array('path' => $tempDir)); + $dumper->dump($catalogue, ['path' => $tempDir]); $this->assertFileExists($backupFile); @@ -62,11 +62,11 @@ class FileDumperTest extends TestCase $file = $translationsDir.'/messages.en.concrete'; $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); + $catalogue->add(['foo' => 'bar']); $dumper = new ConcreteFileDumper(); $dumper->setRelativePathTemplate('test/translations/%domain%.%locale%.%extension%'); - $dumper->dump($catalogue, array('path' => $tempDir)); + $dumper->dump($catalogue, ['path' => $tempDir]); $this->assertFileExists($file); @@ -77,7 +77,7 @@ class FileDumperTest extends TestCase class ConcreteFileDumper extends FileDumper { - public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []) { return ''; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php index 78d0abb6..dcb9c2c3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php @@ -20,7 +20,7 @@ class IcuResFileDumperTest extends TestCase public function testFormatCatalogue() { $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); + $catalogue->add(['foo' => 'bar']); $dumper = new IcuResFileDumper(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/IniFileDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/IniFileDumperTest.php index 5f3c1236..1ed168bd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/IniFileDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/IniFileDumperTest.php @@ -20,7 +20,7 @@ class IniFileDumperTest extends TestCase public function testFormatCatalogue() { $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); + $catalogue->add(['foo' => 'bar']); $dumper = new IniFileDumper(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php index b134ce4f..04e3d86b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php @@ -20,7 +20,7 @@ class JsonFileDumperTest extends TestCase public function testFormatCatalogue() { $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); + $catalogue->add(['foo' => 'bar']); $dumper = new JsonFileDumper(); @@ -30,10 +30,10 @@ class JsonFileDumperTest extends TestCase public function testDumpWithCustomEncoding() { $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => '"bar"')); + $catalogue->add(['foo' => '"bar"']); $dumper = new JsonFileDumper(); - $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.dump.json', $dumper->formatCatalogue($catalogue, 'messages', array('json_encoding' => JSON_HEX_QUOT))); + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.dump.json', $dumper->formatCatalogue($catalogue, 'messages', ['json_encoding' => JSON_HEX_QUOT])); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/MoFileDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/MoFileDumperTest.php index d0519675..fbbd75dc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/MoFileDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/MoFileDumperTest.php @@ -20,7 +20,7 @@ class MoFileDumperTest extends TestCase public function testFormatCatalogue() { $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); + $catalogue->add(['foo' => 'bar']); $dumper = new MoFileDumper(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/PhpFileDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/PhpFileDumperTest.php index 22a39dd4..00e535da 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/PhpFileDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/PhpFileDumperTest.php @@ -20,7 +20,7 @@ class PhpFileDumperTest extends TestCase public function testFormatCatalogue() { $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); + $catalogue->add(['foo' => 'bar']); $dumper = new PhpFileDumper(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php index 5d752471..d694a6dd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php @@ -20,7 +20,7 @@ class PoFileDumperTest extends TestCase public function testFormatCatalogue() { $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); + $catalogue->add(['foo' => 'bar']); $dumper = new PoFileDumper(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/QtFileDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/QtFileDumperTest.php index 8e4a6f43..edfad600 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/QtFileDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/QtFileDumperTest.php @@ -20,7 +20,7 @@ class QtFileDumperTest extends TestCase public function testFormatCatalogue() { $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar'), 'resources'); + $catalogue->add(['foo' => 'bar'], 'resources'); $dumper = new QtFileDumper(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php index 443dccf2..c634a279 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php @@ -20,49 +20,49 @@ class XliffFileDumperTest extends TestCase public function testFormatCatalogue() { $catalogue = new MessageCatalogue('en_US'); - $catalogue->add(array( + $catalogue->add([ 'foo' => 'bar', 'key' => '', 'key.with.cdata' => ' & ', - )); - $catalogue->setMetadata('foo', array('notes' => array(array('priority' => 1, 'from' => 'bar', 'content' => 'baz')))); - $catalogue->setMetadata('key', array('notes' => array(array('content' => 'baz'), array('content' => 'qux')))); + ]); + $catalogue->setMetadata('foo', ['notes' => [['priority' => 1, 'from' => 'bar', 'content' => 'baz']]]); + $catalogue->setMetadata('key', ['notes' => [['content' => 'baz'], ['content' => 'qux']]]); $dumper = new XliffFileDumper(); $this->assertStringEqualsFile( __DIR__.'/../fixtures/resources-clean.xlf', - $dumper->formatCatalogue($catalogue, 'messages', array('default_locale' => 'fr_FR')) + $dumper->formatCatalogue($catalogue, 'messages', ['default_locale' => 'fr_FR']) ); } public function testFormatCatalogueXliff2() { $catalogue = new MessageCatalogue('en_US'); - $catalogue->add(array( + $catalogue->add([ 'foo' => 'bar', 'key' => '', 'key.with.cdata' => ' & ', - )); - $catalogue->setMetadata('key', array('target-attributes' => array('order' => 1))); + ]); + $catalogue->setMetadata('key', ['target-attributes' => ['order' => 1]]); $dumper = new XliffFileDumper(); $this->assertStringEqualsFile( __DIR__.'/../fixtures/resources-2.0-clean.xlf', - $dumper->formatCatalogue($catalogue, 'messages', array('default_locale' => 'fr_FR', 'xliff_version' => '2.0')) + $dumper->formatCatalogue($catalogue, 'messages', ['default_locale' => 'fr_FR', 'xliff_version' => '2.0']) ); } public function testFormatCatalogueWithCustomToolInfo() { - $options = array( + $options = [ 'default_locale' => 'en_US', - 'tool_info' => array('tool-id' => 'foo', 'tool-name' => 'foo', 'tool-version' => '0.0', 'tool-company' => 'Foo'), - ); + 'tool_info' => ['tool-id' => 'foo', 'tool-name' => 'foo', 'tool-version' => '0.0', 'tool-company' => 'Foo'], + ]; $catalogue = new MessageCatalogue('en_US'); - $catalogue->add(array('foo' => 'bar')); + $catalogue->add(['foo' => 'bar']); $dumper = new XliffFileDumper(); @@ -75,41 +75,41 @@ class XliffFileDumperTest extends TestCase public function testFormatCatalogueWithTargetAttributesMetadata() { $catalogue = new MessageCatalogue('en_US'); - $catalogue->add(array( + $catalogue->add([ 'foo' => 'bar', - )); - $catalogue->setMetadata('foo', array('target-attributes' => array('state' => 'needs-translation'))); + ]); + $catalogue->setMetadata('foo', ['target-attributes' => ['state' => 'needs-translation']]); $dumper = new XliffFileDumper(); $this->assertStringEqualsFile( __DIR__.'/../fixtures/resources-target-attributes.xlf', - $dumper->formatCatalogue($catalogue, 'messages', array('default_locale' => 'fr_FR')) + $dumper->formatCatalogue($catalogue, 'messages', ['default_locale' => 'fr_FR']) ); } public function testFormatCatalogueWithNotesMetadata() { $catalogue = new MessageCatalogue('en_US'); - $catalogue->add(array( + $catalogue->add([ 'foo' => 'bar', 'baz' => 'biz', - )); - $catalogue->setMetadata('foo', array('notes' => array( - array('category' => 'state', 'content' => 'new'), - array('category' => 'approved', 'content' => 'true'), - array('category' => 'section', 'content' => 'user login', 'priority' => '1'), - ))); - $catalogue->setMetadata('baz', array('notes' => array( - array('id' => 'x', 'content' => 'x_content'), - array('appliesTo' => 'target', 'category' => 'quality', 'content' => 'Fuzzy'), - ))); + ]); + $catalogue->setMetadata('foo', ['notes' => [ + ['category' => 'state', 'content' => 'new'], + ['category' => 'approved', 'content' => 'true'], + ['category' => 'section', 'content' => 'user login', 'priority' => '1'], + ]]); + $catalogue->setMetadata('baz', ['notes' => [ + ['id' => 'x', 'content' => 'x_content'], + ['appliesTo' => 'target', 'category' => 'quality', 'content' => 'Fuzzy'], + ]]); $dumper = new XliffFileDumper(); $this->assertStringEqualsFile( __DIR__.'/../fixtures/resources-notes-meta.xlf', - $dumper->formatCatalogue($catalogue, 'messages', array('default_locale' => 'fr_FR', 'xliff_version' => '2.0')) + $dumper->formatCatalogue($catalogue, 'messages', ['default_locale' => 'fr_FR', 'xliff_version' => '2.0']) ); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/YamlFileDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/YamlFileDumperTest.php index a5549a2e..24bc65ba 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/YamlFileDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/YamlFileDumperTest.php @@ -21,24 +21,24 @@ class YamlFileDumperTest extends TestCase { $catalogue = new MessageCatalogue('en'); $catalogue->add( - array( + [ 'foo.bar1' => 'value1', 'foo.bar2' => 'value2', - )); + ]); $dumper = new YamlFileDumper(); - $this->assertStringEqualsFile(__DIR__.'/../fixtures/messages.yml', $dumper->formatCatalogue($catalogue, 'messages', array('as_tree' => true, 'inline' => 999))); + $this->assertStringEqualsFile(__DIR__.'/../fixtures/messages.yml', $dumper->formatCatalogue($catalogue, 'messages', ['as_tree' => true, 'inline' => 999])); } public function testLinearFormatCatalogue() { $catalogue = new MessageCatalogue('en'); $catalogue->add( - array( + [ 'foo.bar1' => 'value1', 'foo.bar2' => 'value2', - )); + ]); $dumper = new YamlFileDumper(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php index 3487dd62..73ccb07c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php @@ -39,8 +39,8 @@ EOF; nowdoc key with whitespace and nonescaped \$\n sequences EOF; // Assert - $expectedCatalogue = array( - 'messages' => array( + $expectedCatalogue = [ + 'messages' => [ 'single-quoted key' => 'prefixsingle-quoted key', 'double-quoted key' => 'prefixdouble-quoted key', 'heredoc key' => 'prefixheredoc key', @@ -51,8 +51,9 @@ EOF; $expectedHeredoc => 'prefix'.$expectedHeredoc, $expectedNowdoc => 'prefix'.$expectedNowdoc, '{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples' => 'prefix{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples', - ), - 'not_messages' => array( + 'concatenated message with heredoc and nowdoc' => 'prefixconcatenated message with heredoc and nowdoc', + ], + 'not_messages' => [ 'other-domain-test-no-params-short-array' => 'prefixother-domain-test-no-params-short-array', 'other-domain-test-no-params-long-array' => 'prefixother-domain-test-no-params-long-array', 'other-domain-test-params-short-array' => 'prefixother-domain-test-params-short-array', @@ -62,8 +63,8 @@ EOF; 'typecast' => 'prefixtypecast', 'msg1' => 'prefixmsg1', 'msg2' => 'prefixmsg2', - ), - ); + ], + ]; $actualCatalogue = $catalogue->all(); $this->assertEquals($expectedCatalogue, $actualCatalogue); @@ -72,7 +73,7 @@ EOF; public function resourcesProvider() { $directory = __DIR__.'/../fixtures/extractor/'; - $splFiles = array(); + $splFiles = []; foreach (new \DirectoryIterator($directory) as $fileInfo) { if ($fileInfo->isDot()) { continue; @@ -83,13 +84,13 @@ EOF; $splFiles[] = $fileInfo->getFileInfo(); } - return array( - array($directory), - array($phpFile), - array(glob($directory.'*')), - array($splFiles), - array(new \ArrayObject(glob($directory.'*'))), - array(new \ArrayObject($splFiles)), - ); + return [ + [$directory], + [$phpFile], + [glob($directory.'*')], + [$splFiles], + [new \ArrayObject(glob($directory.'*'))], + [new \ArrayObject($splFiles)], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Formatter/MessageFormatterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Formatter/MessageFormatterTest.php index 1fa736e7..17b815d3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Formatter/MessageFormatterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Formatter/MessageFormatterTest.php @@ -19,7 +19,7 @@ class MessageFormatterTest extends TestCase /** * @dataProvider getTransMessages */ - public function testFormat($expected, $message, $parameters = array()) + public function testFormat($expected, $message, $parameters = []) { $this->assertEquals($expected, $this->getMessageFormatter()->format($message, 'en', $parameters)); } @@ -34,45 +34,45 @@ class MessageFormatterTest extends TestCase public function getTransMessages() { - return array( - array( + return [ + [ 'There is one apple', 'There is one apple', - ), - array( + ], + [ 'There are 5 apples', 'There are %count% apples', - array('%count%' => 5), - ), - array( + ['%count%' => 5], + ], + [ 'There are 5 apples', 'There are {{count}} apples', - array('{{count}}' => 5), - ), - ); + ['{{count}}' => 5], + ], + ]; } public function getTransChoiceMessages() { - return array( - array('Il y a 0 pomme', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 0, array('%count%' => 0)), - array('Il y a 1 pomme', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 1, array('%count%' => 1)), - array('Il y a 10 pommes', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 10, array('%count%' => 10)), + return [ + ['Il y a 0 pomme', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 0, ['%count%' => 0]], + ['Il y a 1 pomme', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 1, ['%count%' => 1]], + ['Il y a 10 pommes', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 10, ['%count%' => 10]], - array('Il y a 0 pomme', 'Il y a %count% pomme|Il y a %count% pommes', 0, array('%count%' => 0)), - array('Il y a 1 pomme', 'Il y a %count% pomme|Il y a %count% pommes', 1, array('%count%' => 1)), - array('Il y a 10 pommes', 'Il y a %count% pomme|Il y a %count% pommes', 10, array('%count%' => 10)), + ['Il y a 0 pomme', 'Il y a %count% pomme|Il y a %count% pommes', 0, ['%count%' => 0]], + ['Il y a 1 pomme', 'Il y a %count% pomme|Il y a %count% pommes', 1, ['%count%' => 1]], + ['Il y a 10 pommes', 'Il y a %count% pomme|Il y a %count% pommes', 10, ['%count%' => 10]], - array('Il y a 0 pomme', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 0, array('%count%' => 0)), - array('Il y a 1 pomme', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 1, array('%count%' => 1)), - array('Il y a 10 pommes', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 10, array('%count%' => 10)), + ['Il y a 0 pomme', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 0, ['%count%' => 0]], + ['Il y a 1 pomme', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 1, ['%count%' => 1]], + ['Il y a 10 pommes', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 10, ['%count%' => 10]], - array('Il n\'y a aucune pomme', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 0, array('%count%' => 0)), - array('Il y a 1 pomme', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 1, array('%count%' => 1)), - array('Il y a 10 pommes', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 10, array('%count%' => 10)), + ['Il n\'y a aucune pomme', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 0, ['%count%' => 0]], + ['Il y a 1 pomme', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 1, ['%count%' => 1]], + ['Il y a 10 pommes', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 10, ['%count%' => 10]], - array('Il y a 0 pomme', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 0, array('%count%' => 0)), - ); + ['Il y a 0 pomme', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 0, ['%count%' => 0]], + ]; } private function getMessageFormatter() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php index 78288da4..c3d7b1f7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php @@ -74,23 +74,23 @@ class IdentityTranslatorTest extends TestCase public function getTransTests() { - return array( - array('Symfony is great!', 'Symfony is great!', array()), - array('Symfony is awesome!', 'Symfony is %what%!', array('%what%' => 'awesome')), - ); + return [ + ['Symfony is great!', 'Symfony is great!', []], + ['Symfony is awesome!', 'Symfony is %what%!', ['%what%' => 'awesome']], + ]; } public function getTransChoiceTests() { - return array( - array('There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0, array('%count%' => 0)), - array('There is one apple', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 1, array('%count%' => 1)), - array('There are 10 apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10, array('%count%' => 10)), - array('There are 0 apples', 'There is 1 apple|There are %count% apples', 0, array('%count%' => 0)), - array('There is 1 apple', 'There is 1 apple|There are %count% apples', 1, array('%count%' => 1)), - array('There are 10 apples', 'There is 1 apple|There are %count% apples', 10, array('%count%' => 10)), + return [ + ['There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0, ['%count%' => 0]], + ['There is one apple', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 1, ['%count%' => 1]], + ['There are 10 apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10, ['%count%' => 10]], + ['There are 0 apples', 'There is 1 apple|There are %count% apples', 0, ['%count%' => 0]], + ['There is 1 apple', 'There is 1 apple|There are %count% apples', 1, ['%count%' => 1]], + ['There are 10 apples', 'There is 1 apple|There are %count% apples', 10, ['%count%' => 10]], // custom validation messages may be coded with a fixed value - array('There are 2 apples', 'There are 2 apples', 2, array('%count%' => 2)), - ); + ['There are 2 apples', 'There are 2 apples', 2, ['%count%' => 2]], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/IntervalTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/IntervalTest.php index 99b209a7..8da3bb15 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/IntervalTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/IntervalTest.php @@ -34,16 +34,16 @@ class IntervalTest extends TestCase public function getTests() { - return array( - array(true, 3, '{1,2, 3 ,4}'), - array(false, 10, '{1,2, 3 ,4}'), - array(false, 3, '[1,2]'), - array(true, 1, '[1,2]'), - array(true, 2, '[1,2]'), - array(false, 1, ']1,2['), - array(false, 2, ']1,2['), - array(true, log(0), '[-Inf,2['), - array(true, -log(0), '[-2,+Inf]'), - ); + return [ + [true, 3, '{1,2, 3 ,4}'], + [false, 10, '{1,2, 3 ,4}'], + [false, 3, '[1,2]'], + [true, 1, '[1,2]'], + [true, 2, '[1,2]'], + [false, 1, ']1,2['], + [false, 2, ']1,2['], + [true, log(0), '[-Inf,2['], + [true, -log(0), '[-2,+Inf]'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php index 29efdef0..4fd5752d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php @@ -23,9 +23,9 @@ class CsvFileLoaderTest extends TestCase $resource = __DIR__.'/../fixtures/resources.csv'; $catalogue = $loader->load($resource, 'en', 'domain1'); - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals(['foo' => 'bar'], $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } public function testLoadDoesNothingIfEmpty() @@ -34,9 +34,9 @@ class CsvFileLoaderTest extends TestCase $resource = __DIR__.'/../fixtures/empty.csv'; $catalogue = $loader->load($resource, 'en', 'domain1'); - $this->assertEquals(array(), $catalogue->all('domain1')); + $this->assertEquals([], $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php index e28db601..601680af 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php @@ -37,9 +37,9 @@ class IcuDatFileLoaderTest extends LocalizedTestCase $resource = __DIR__.'/../fixtures/resourcebundle/dat/resources'; $catalogue = $loader->load($resource, 'en', 'domain1'); - $this->assertEquals(array('symfony' => 'Symfony 2 is great'), $catalogue->all('domain1')); + $this->assertEquals(['symfony' => 'Symfony 2 is great'], $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource.'.dat')), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource.'.dat')], $catalogue->getResources()); } public function testDatFrenchLoad() @@ -48,9 +48,9 @@ class IcuDatFileLoaderTest extends LocalizedTestCase $resource = __DIR__.'/../fixtures/resourcebundle/dat/resources'; $catalogue = $loader->load($resource, 'fr', 'domain1'); - $this->assertEquals(array('symfony' => 'Symfony 2 est génial'), $catalogue->all('domain1')); + $this->assertEquals(['symfony' => 'Symfony 2 est génial'], $catalogue->all('domain1')); $this->assertEquals('fr', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource.'.dat')), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource.'.dat')], $catalogue->getResources()); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php index 92d8933c..962c3af2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php @@ -26,9 +26,9 @@ class IcuResFileLoaderTest extends LocalizedTestCase $resource = __DIR__.'/../fixtures/resourcebundle/res'; $catalogue = $loader->load($resource, 'en', 'domain1'); - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals(['foo' => 'bar'], $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new DirectoryResource($resource)), $catalogue->getResources()); + $this->assertEquals([new DirectoryResource($resource)], $catalogue->getResources()); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php index d9dcc5e8..e0d8b2f4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php @@ -23,9 +23,9 @@ class IniFileLoaderTest extends TestCase $resource = __DIR__.'/../fixtures/resources.ini'; $catalogue = $loader->load($resource, 'en', 'domain1'); - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals(['foo' => 'bar'], $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } public function testLoadDoesNothingIfEmpty() @@ -34,9 +34,9 @@ class IniFileLoaderTest extends TestCase $resource = __DIR__.'/../fixtures/empty.ini'; $catalogue = $loader->load($resource, 'en', 'domain1'); - $this->assertEquals(array(), $catalogue->all('domain1')); + $this->assertEquals([], $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php index cea0aef4..4c507da5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php @@ -23,9 +23,9 @@ class JsonFileLoaderTest extends TestCase $resource = __DIR__.'/../fixtures/resources.json'; $catalogue = $loader->load($resource, 'en', 'domain1'); - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals(['foo' => 'bar'], $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } public function testLoadDoesNothingIfEmpty() @@ -34,9 +34,9 @@ class JsonFileLoaderTest extends TestCase $resource = __DIR__.'/../fixtures/empty.json'; $catalogue = $loader->load($resource, 'en', 'domain1'); - $this->assertEquals(array(), $catalogue->all('domain1')); + $this->assertEquals([], $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php index 6ad3d44d..63de5ceb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php @@ -23,9 +23,9 @@ class MoFileLoaderTest extends TestCase $resource = __DIR__.'/../fixtures/resources.mo'; $catalogue = $loader->load($resource, 'en', 'domain1'); - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals(['foo' => 'bar'], $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } public function testLoadPlurals() @@ -34,9 +34,9 @@ class MoFileLoaderTest extends TestCase $resource = __DIR__.'/../fixtures/plurals.mo'; $catalogue = $loader->load($resource, 'en', 'domain1'); - $this->assertEquals(array('foo' => 'bar', 'foos' => '{0} bar|{1} bars'), $catalogue->all('domain1')); + $this->assertEquals(['foo' => 'bar', 'foos' => '{0} bar|{1} bars'], $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } /** @@ -65,8 +65,8 @@ class MoFileLoaderTest extends TestCase $resource = __DIR__.'/../fixtures/empty-translation.mo'; $catalogue = $loader->load($resource, 'en', 'message'); - $this->assertEquals(array(), $catalogue->all('message')); + $this->assertEquals([], $catalogue->all('message')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php index 01b7a5fe..68cb2d0b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php @@ -23,9 +23,9 @@ class PhpFileLoaderTest extends TestCase $resource = __DIR__.'/../fixtures/resources.php'; $catalogue = $loader->load($resource, 'en', 'domain1'); - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals(['foo' => 'bar'], $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php index 4176cb7f..4bf2ee65 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php @@ -23,9 +23,9 @@ class PoFileLoaderTest extends TestCase $resource = __DIR__.'/../fixtures/resources.po'; $catalogue = $loader->load($resource, 'en', 'domain1'); - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals(['foo' => 'bar'], $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } public function testLoadPlurals() @@ -34,9 +34,9 @@ class PoFileLoaderTest extends TestCase $resource = __DIR__.'/../fixtures/plurals.po'; $catalogue = $loader->load($resource, 'en', 'domain1'); - $this->assertEquals(array('foo' => 'bar', 'foos' => 'bar|bars'), $catalogue->all('domain1')); + $this->assertEquals(['foo' => 'bar', 'foos' => 'bar|bars'], $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } public function testLoadDoesNothingIfEmpty() @@ -45,9 +45,9 @@ class PoFileLoaderTest extends TestCase $resource = __DIR__.'/../fixtures/empty.po'; $catalogue = $loader->load($resource, 'en', 'domain1'); - $this->assertEquals(array(), $catalogue->all('domain1')); + $this->assertEquals([], $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } /** @@ -66,9 +66,9 @@ class PoFileLoaderTest extends TestCase $resource = __DIR__.'/../fixtures/empty-translation.po'; $catalogue = $loader->load($resource, 'en', 'domain1'); - $this->assertEquals(array('foo' => ''), $catalogue->all('domain1')); + $this->assertEquals(['foo' => ''], $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } public function testEscapedId() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php index 8a00fded..08f55e90 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php @@ -23,9 +23,9 @@ class QtFileLoaderTest extends TestCase $resource = __DIR__.'/../fixtures/resources.ts'; $catalogue = $loader->load($resource, 'en', 'resources'); - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('resources')); + $this->assertEquals(['foo' => 'bar'], $catalogue->all('resources')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php index c6958486..7cb9f54f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php @@ -24,8 +24,8 @@ class XliffFileLoaderTest extends TestCase $catalogue = $loader->load($resource, 'en', 'domain1'); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - $this->assertSame(array(), libxml_get_errors()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); + $this->assertSame([], libxml_get_errors()); $this->assertContainsOnly('string', $catalogue->all('domain1')); } @@ -33,15 +33,15 @@ class XliffFileLoaderTest extends TestCase { $internalErrors = libxml_use_internal_errors(true); - $this->assertSame(array(), libxml_get_errors()); + $this->assertSame([], libxml_get_errors()); $loader = new XliffFileLoader(); $resource = __DIR__.'/../fixtures/resources.xlf'; $catalogue = $loader->load($resource, 'en', 'domain1'); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - $this->assertSame(array(), libxml_get_errors()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); + $this->assertSame([], libxml_get_errors()); libxml_clear_errors(); libxml_use_internal_errors($internalErrors); @@ -58,7 +58,7 @@ class XliffFileLoaderTest extends TestCase libxml_disable_entity_loader($disableEntities); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } public function testLoadWithResname() @@ -66,7 +66,7 @@ class XliffFileLoaderTest extends TestCase $loader = new XliffFileLoader(); $catalogue = $loader->load(__DIR__.'/../fixtures/resname.xlf', 'en', 'domain1'); - $this->assertEquals(array('foo' => 'bar', 'bar' => 'baz', 'baz' => 'foo', 'qux' => 'qux source'), $catalogue->all('domain1')); + $this->assertEquals(['foo' => 'bar', 'bar' => 'baz', 'baz' => 'foo', 'qux' => 'qux source'], $catalogue->all('domain1')); } public function testIncompleteResource() @@ -74,7 +74,7 @@ class XliffFileLoaderTest extends TestCase $loader = new XliffFileLoader(); $catalogue = $loader->load(__DIR__.'/../fixtures/resources.xlf', 'en', 'domain1'); - $this->assertEquals(array('foo' => 'bar', 'extra' => 'extra', 'key' => '', 'test' => 'with'), $catalogue->all('domain1')); + $this->assertEquals(['foo' => 'bar', 'extra' => 'extra', 'key' => '', 'test' => 'with'], $catalogue->all('domain1')); } public function testEncoding() @@ -84,7 +84,7 @@ class XliffFileLoaderTest extends TestCase $this->assertEquals(utf8_decode('föö'), $catalogue->get('bar', 'domain1')); $this->assertEquals(utf8_decode('bär'), $catalogue->get('foo', 'domain1')); - $this->assertEquals(array('notes' => array(array('content' => utf8_decode('bäz'))), 'id' => '1'), $catalogue->getMetadata('foo', 'domain1')); + $this->assertEquals(['notes' => [['content' => utf8_decode('bäz')]], 'id' => '1'], $catalogue->getMetadata('foo', 'domain1')); } public function testTargetAttributesAreStoredCorrectly() @@ -164,11 +164,11 @@ class XliffFileLoaderTest extends TestCase $loader = new XliffFileLoader(); $catalogue = $loader->load(__DIR__.'/../fixtures/withnote.xlf', 'en', 'domain1'); - $this->assertEquals(array('notes' => array(array('priority' => 1, 'content' => 'foo')), 'id' => '1'), $catalogue->getMetadata('foo', 'domain1')); + $this->assertEquals(['notes' => [['priority' => 1, 'content' => 'foo']], 'id' => '1'], $catalogue->getMetadata('foo', 'domain1')); // message without target - $this->assertEquals(array('notes' => array(array('content' => 'bar', 'from' => 'foo')), 'id' => '2'), $catalogue->getMetadata('extra', 'domain1')); + $this->assertEquals(['notes' => [['content' => 'bar', 'from' => 'foo']], 'id' => '2'], $catalogue->getMetadata('extra', 'domain1')); // message with empty target - $this->assertEquals(array('notes' => array(array('content' => 'baz'), array('priority' => 2, 'from' => 'bar', 'content' => 'qux')), 'id' => '123'), $catalogue->getMetadata('key', 'domain1')); + $this->assertEquals(['notes' => [['content' => 'baz'], ['priority' => 2, 'from' => 'bar', 'content' => 'qux']], 'id' => '123'], $catalogue->getMetadata('key', 'domain1')); } public function testLoadVersion2() @@ -178,15 +178,15 @@ class XliffFileLoaderTest extends TestCase $catalogue = $loader->load($resource, 'en', 'domain1'); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - $this->assertSame(array(), libxml_get_errors()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); + $this->assertSame([], libxml_get_errors()); $domains = $catalogue->all(); $this->assertCount(3, $domains['domain1']); $this->assertContainsOnly('string', $catalogue->all('domain1')); // target attributes - $this->assertEquals(array('target-attributes' => array('order' => 1)), $catalogue->getMetadata('bar', 'domain1')); + $this->assertEquals(['target-attributes' => ['order' => 1]], $catalogue->getMetadata('bar', 'domain1')); } public function testLoadVersion2WithNoteMeta() @@ -196,8 +196,8 @@ class XliffFileLoaderTest extends TestCase $catalogue = $loader->load($resource, 'en', 'domain1'); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - $this->assertSame(array(), libxml_get_errors()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); + $this->assertSame([], libxml_get_errors()); // test for "foo" metadata $this->assertTrue($catalogue->defines('foo', 'domain1')); @@ -236,7 +236,7 @@ class XliffFileLoaderTest extends TestCase $catalog = $loader->load($resource, 'en', 'domain1'); $this->assertSame('en', $catalog->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalog->getResources()); + $this->assertEquals([new FileResource($resource)], $catalog->getResources()); $this->assertFalse(libxml_get_last_error()); // test for "foo" metadata diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php index bb3c1a99..a535db56 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php @@ -23,9 +23,9 @@ class YamlFileLoaderTest extends TestCase $resource = __DIR__.'/../fixtures/resources.yml'; $catalogue = $loader->load($resource, 'en', 'domain1'); - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals(['foo' => 'bar'], $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } public function testLoadDoesNothingIfEmpty() @@ -34,9 +34,9 @@ class YamlFileLoaderTest extends TestCase $resource = __DIR__.'/../fixtures/empty.yml'; $catalogue = $loader->load($resource, 'en', 'domain1'); - $this->assertEquals(array(), $catalogue->all('domain1')); + $this->assertEquals([], $catalogue->all('domain1')); $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertEquals([new FileResource($resource)], $catalogue->getResources()); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/LoggingTranslatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/LoggingTranslatorTest.php index 022379e9..1d3f065a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/LoggingTranslatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/LoggingTranslatorTest.php @@ -28,7 +28,7 @@ class LoggingTranslatorTest extends TestCase $translator = new Translator('ar'); $loggableTranslator = new LoggingTranslator($translator, $logger); - $loggableTranslator->transChoice('some_message2', 10, array('%count%' => 10)); + $loggableTranslator->transChoice('some_message2', 10, ['%count%' => 10]); $loggableTranslator->trans('bar'); } @@ -41,10 +41,10 @@ class LoggingTranslatorTest extends TestCase ; $translator = new Translator('ar'); - $translator->setFallbackLocales(array('en')); + $translator->setFallbackLocales(['en']); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('some_message2' => 'one thing|%count% things'), 'en'); + $translator->addResource('array', ['some_message2' => 'one thing|%count% things'], 'en'); $loggableTranslator = new LoggingTranslator($translator, $logger); - $loggableTranslator->transChoice('some_message2', 10, array('%count%' => 10)); + $loggableTranslator->transChoice('some_message2', 10, ['%count%' => 10]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/MessageCatalogueTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/MessageCatalogueTest.php index 1ab82469..433be2ee 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/MessageCatalogueTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/MessageCatalogueTest.php @@ -25,23 +25,23 @@ class MessageCatalogueTest extends TestCase public function testGetDomains() { - $catalogue = new MessageCatalogue('en', array('domain1' => array(), 'domain2' => array())); + $catalogue = new MessageCatalogue('en', ['domain1' => [], 'domain2' => []]); - $this->assertEquals(array('domain1', 'domain2'), $catalogue->getDomains()); + $this->assertEquals(['domain1', 'domain2'], $catalogue->getDomains()); } public function testAll() { - $catalogue = new MessageCatalogue('en', $messages = array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + $catalogue = new MessageCatalogue('en', $messages = ['domain1' => ['foo' => 'foo'], 'domain2' => ['bar' => 'bar']]); - $this->assertEquals(array('foo' => 'foo'), $catalogue->all('domain1')); - $this->assertEquals(array(), $catalogue->all('domain88')); + $this->assertEquals(['foo' => 'foo'], $catalogue->all('domain1')); + $this->assertEquals([], $catalogue->all('domain88')); $this->assertEquals($messages, $catalogue->all()); } public function testHas() { - $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + $catalogue = new MessageCatalogue('en', ['domain1' => ['foo' => 'foo'], 'domain2' => ['bar' => 'bar']]); $this->assertTrue($catalogue->has('foo', 'domain1')); $this->assertFalse($catalogue->has('bar', 'domain1')); @@ -50,7 +50,7 @@ class MessageCatalogueTest extends TestCase public function testGetSet() { - $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + $catalogue = new MessageCatalogue('en', ['domain1' => ['foo' => 'foo'], 'domain2' => ['bar' => 'bar']]); $catalogue->set('foo1', 'foo1', 'domain1'); $this->assertEquals('foo', $catalogue->get('foo', 'domain1')); @@ -59,24 +59,24 @@ class MessageCatalogueTest extends TestCase public function testAdd() { - $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); - $catalogue->add(array('foo1' => 'foo1'), 'domain1'); + $catalogue = new MessageCatalogue('en', ['domain1' => ['foo' => 'foo'], 'domain2' => ['bar' => 'bar']]); + $catalogue->add(['foo1' => 'foo1'], 'domain1'); $this->assertEquals('foo', $catalogue->get('foo', 'domain1')); $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); - $catalogue->add(array('foo' => 'bar'), 'domain1'); + $catalogue->add(['foo' => 'bar'], 'domain1'); $this->assertEquals('bar', $catalogue->get('foo', 'domain1')); $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); - $catalogue->add(array('foo' => 'bar'), 'domain88'); + $catalogue->add(['foo' => 'bar'], 'domain88'); $this->assertEquals('bar', $catalogue->get('foo', 'domain88')); } public function testReplace() { - $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); - $catalogue->replace($messages = array('foo1' => 'foo1'), 'domain1'); + $catalogue = new MessageCatalogue('en', ['domain1' => ['foo' => 'foo'], 'domain2' => ['bar' => 'bar']]); + $catalogue->replace($messages = ['foo1' => 'foo1'], 'domain1'); $this->assertEquals($messages, $catalogue->all('domain1')); } @@ -89,10 +89,10 @@ class MessageCatalogueTest extends TestCase $r1 = $this->getMockBuilder('Symfony\Component\Config\Resource\ResourceInterface')->getMock(); $r1->expects($this->any())->method('__toString')->will($this->returnValue('r1')); - $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + $catalogue = new MessageCatalogue('en', ['domain1' => ['foo' => 'foo'], 'domain2' => ['bar' => 'bar']]); $catalogue->addResource($r); - $catalogue1 = new MessageCatalogue('en', array('domain1' => array('foo1' => 'foo1'))); + $catalogue1 = new MessageCatalogue('en', ['domain1' => ['foo1' => 'foo1']]); $catalogue1->addResource($r1); $catalogue->addCatalogue($catalogue1); @@ -100,7 +100,7 @@ class MessageCatalogueTest extends TestCase $this->assertEquals('foo', $catalogue->get('foo', 'domain1')); $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); - $this->assertEquals(array($r, $r1), $catalogue->getResources()); + $this->assertEquals([$r, $r1], $catalogue->getResources()); } public function testAddFallbackCatalogue() @@ -114,10 +114,10 @@ class MessageCatalogueTest extends TestCase $r2 = $this->getMockBuilder('Symfony\Component\Config\Resource\ResourceInterface')->getMock(); $r2->expects($this->any())->method('__toString')->will($this->returnValue('r2')); - $catalogue = new MessageCatalogue('fr_FR', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + $catalogue = new MessageCatalogue('fr_FR', ['domain1' => ['foo' => 'foo'], 'domain2' => ['bar' => 'bar']]); $catalogue->addResource($r); - $catalogue1 = new MessageCatalogue('fr', array('domain1' => array('foo' => 'bar', 'foo1' => 'foo1'))); + $catalogue1 = new MessageCatalogue('fr', ['domain1' => ['foo' => 'bar', 'foo1' => 'foo1']]); $catalogue1->addResource($r1); $catalogue2 = new MessageCatalogue('en'); @@ -129,7 +129,7 @@ class MessageCatalogueTest extends TestCase $this->assertEquals('foo', $catalogue->get('foo', 'domain1')); $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); - $this->assertEquals(array($r, $r1, $r2), $catalogue->getResources()); + $this->assertEquals([$r, $r1, $r2], $catalogue->getResources()); } /** @@ -164,7 +164,7 @@ class MessageCatalogueTest extends TestCase public function testAddCatalogueWhenLocaleIsNotTheSameAsTheCurrentOne() { $catalogue = new MessageCatalogue('en'); - $catalogue->addCatalogue(new MessageCatalogue('fr', array())); + $catalogue->addCatalogue(new MessageCatalogue('fr', [])); } public function testGetAddResource() @@ -178,13 +178,13 @@ class MessageCatalogueTest extends TestCase $r1->expects($this->any())->method('__toString')->will($this->returnValue('r1')); $catalogue->addResource($r1); - $this->assertEquals(array($r, $r1), $catalogue->getResources()); + $this->assertEquals([$r, $r1], $catalogue->getResources()); } public function testMetadataDelete() { $catalogue = new MessageCatalogue('en'); - $this->assertEquals(array(), $catalogue->getMetadata('', ''), 'Metadata is empty'); + $this->assertEquals([], $catalogue->getMetadata('', ''), 'Metadata is empty'); $catalogue->deleteMetadata('key', 'messages'); $catalogue->deleteMetadata('', 'messages'); $catalogue->deleteMetadata(); @@ -196,8 +196,8 @@ class MessageCatalogueTest extends TestCase $catalogue->setMetadata('key', 'value'); $this->assertEquals('value', $catalogue->getMetadata('key', 'messages'), "Metadata 'key' = 'value'"); - $catalogue->setMetadata('key2', array()); - $this->assertEquals(array(), $catalogue->getMetadata('key2', 'messages'), 'Metadata key2 is array'); + $catalogue->setMetadata('key2', []); + $this->assertEquals([], $catalogue->getMetadata('key2', 'messages'), 'Metadata key2 is array'); $catalogue->deleteMetadata('key2', 'messages'); $this->assertNull($catalogue->getMetadata('key2', 'messages'), 'Metadata key2 should is deleted.'); @@ -210,13 +210,13 @@ class MessageCatalogueTest extends TestCase { $cat1 = new MessageCatalogue('en'); $cat1->setMetadata('a', 'b'); - $this->assertEquals(array('messages' => array('a' => 'b')), $cat1->getMetadata('', ''), 'Cat1 contains messages metadata.'); + $this->assertEquals(['messages' => ['a' => 'b']], $cat1->getMetadata('', ''), 'Cat1 contains messages metadata.'); $cat2 = new MessageCatalogue('en'); $cat2->setMetadata('b', 'c', 'domain'); - $this->assertEquals(array('domain' => array('b' => 'c')), $cat2->getMetadata('', ''), 'Cat2 contains domain metadata.'); + $this->assertEquals(['domain' => ['b' => 'c']], $cat2->getMetadata('', ''), 'Cat2 contains domain metadata.'); $cat1->addCatalogue($cat2); - $this->assertEquals(array('messages' => array('a' => 'b'), 'domain' => array('b' => 'c')), $cat1->getMetadata('', ''), 'Cat1 contains merged metadata.'); + $this->assertEquals(['messages' => ['a' => 'b'], 'domain' => ['b' => 'c']], $cat1->getMetadata('', ''), 'Cat1 contains merged metadata.'); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/MessageSelectorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/MessageSelectorTest.php index 42b7e0a3..a887411e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/MessageSelectorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/MessageSelectorTest.php @@ -46,92 +46,92 @@ class MessageSelectorTest extends TestCase public function getNonMatchingMessages() { - return array( - array('{0} There are no apples|{1} There is one apple', 2), - array('{1} There is one apple|]1,Inf] There are %count% apples', 0), - array('{1} There is one apple|]2,Inf] There are %count% apples', 2), - array('{0} There are no apples|There is one apple', 2), - ); + return [ + ['{0} There are no apples|{1} There is one apple', 2], + ['{1} There is one apple|]1,Inf] There are %count% apples', 0], + ['{1} There is one apple|]2,Inf] There are %count% apples', 2], + ['{0} There are no apples|There is one apple', 2], + ]; } public function getChooseTests() { - return array( - array('There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0), - array('There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0), - array('There are no apples', '{0}There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0), + return [ + ['There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0], + ['There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0], + ['There are no apples', '{0}There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0], - array('There is one apple', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 1), + ['There is one apple', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 1], - array('There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10), - array('There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf]There are %count% apples', 10), - array('There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10), + ['There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10], + ['There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf]There are %count% apples', 10], + ['There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10], - array('There are %count% apples', 'There is one apple|There are %count% apples', 0), - array('There is one apple', 'There is one apple|There are %count% apples', 1), - array('There are %count% apples', 'There is one apple|There are %count% apples', 10), + ['There are %count% apples', 'There is one apple|There are %count% apples', 0], + ['There is one apple', 'There is one apple|There are %count% apples', 1], + ['There are %count% apples', 'There is one apple|There are %count% apples', 10], - array('There are %count% apples', 'one: There is one apple|more: There are %count% apples', 0), - array('There is one apple', 'one: There is one apple|more: There are %count% apples', 1), - array('There are %count% apples', 'one: There is one apple|more: There are %count% apples', 10), + ['There are %count% apples', 'one: There is one apple|more: There are %count% apples', 0], + ['There is one apple', 'one: There is one apple|more: There are %count% apples', 1], + ['There are %count% apples', 'one: There is one apple|more: There are %count% apples', 10], - array('There are no apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 0), - array('There is one apple', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 1), - array('There are %count% apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 10), + ['There are no apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 0], + ['There is one apple', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 1], + ['There are %count% apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 10], - array('', '{0}|{1} There is one apple|]1,Inf] There are %count% apples', 0), - array('', '{0} There are no apples|{1}|]1,Inf] There are %count% apples', 1), + ['', '{0}|{1} There is one apple|]1,Inf] There are %count% apples', 0], + ['', '{0} There are no apples|{1}|]1,Inf] There are %count% apples', 1], // Indexed only tests which are Gettext PoFile* compatible strings. - array('There are %count% apples', 'There is one apple|There are %count% apples', 0), - array('There is one apple', 'There is one apple|There are %count% apples', 1), - array('There are %count% apples', 'There is one apple|There are %count% apples', 2), + ['There are %count% apples', 'There is one apple|There are %count% apples', 0], + ['There is one apple', 'There is one apple|There are %count% apples', 1], + ['There are %count% apples', 'There is one apple|There are %count% apples', 2], // Tests for float numbers - array('There is almost one apple', '{0} There are no apples|]0,1[ There is almost one apple|{1} There is one apple|[1,Inf] There is more than one apple', 0.7), - array('There is one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1), - array('There is more than one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1.7), - array('There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0), - array('There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0.0), - array('There are no apples', '{0.0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0), + ['There is almost one apple', '{0} There are no apples|]0,1[ There is almost one apple|{1} There is one apple|[1,Inf] There is more than one apple', 0.7], + ['There is one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1], + ['There is more than one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1.7], + ['There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0], + ['There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0.0], + ['There are no apples', '{0.0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0], // Test texts with new-lines // with double-quotes and \n in id & double-quotes and actual newlines in text - array("This is a text with a\n new-line in it. Selector = 0.", '{0}This is a text with a + ["This is a text with a\n new-line in it. Selector = 0.", '{0}This is a text with a new-line in it. Selector = 0.|{1}This is a text with a new-line in it. Selector = 1.|[1,Inf]This is a text with a - new-line in it. Selector > 1.', 0), + new-line in it. Selector > 1.', 0], // with double-quotes and \n in id and single-quotes and actual newlines in text - array("This is a text with a\n new-line in it. Selector = 1.", '{0}This is a text with a + ["This is a text with a\n new-line in it. Selector = 1.", '{0}This is a text with a new-line in it. Selector = 0.|{1}This is a text with a new-line in it. Selector = 1.|[1,Inf]This is a text with a - new-line in it. Selector > 1.', 1), - array("This is a text with a\n new-line in it. Selector > 1.", '{0}This is a text with a + new-line in it. Selector > 1.', 1], + ["This is a text with a\n new-line in it. Selector > 1.", '{0}This is a text with a new-line in it. Selector = 0.|{1}This is a text with a new-line in it. Selector = 1.|[1,Inf]This is a text with a - new-line in it. Selector > 1.', 5), + new-line in it. Selector > 1.', 5], // with double-quotes and id split accros lines - array('This is a text with a + ['This is a text with a new-line in it. Selector = 1.', '{0}This is a text with a new-line in it. Selector = 0.|{1}This is a text with a new-line in it. Selector = 1.|[1,Inf]This is a text with a - new-line in it. Selector > 1.', 1), + new-line in it. Selector > 1.', 1], // with single-quotes and id split accros lines - array('This is a text with a + ['This is a text with a new-line in it. Selector > 1.', '{0}This is a text with a new-line in it. Selector = 0.|{1}This is a text with a new-line in it. Selector = 1.|[1,Inf]This is a text with a - new-line in it. Selector > 1.', 5), + new-line in it. Selector > 1.', 5], // with single-quotes and \n in text - array('This is a text with a\nnew-line in it. Selector = 0.', '{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.', 0), + ['This is a text with a\nnew-line in it. Selector = 0.', '{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.', 0], // with double-quotes and id split accros lines - array("This is a text with a\nnew-line in it. Selector = 1.", "{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.", 1), + ["This is a text with a\nnew-line in it. Selector = 1.", "{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.", 1], // esacape pipe - array('This is a text with | in it. Selector = 0.', '{0}This is a text with || in it. Selector = 0.|{1}This is a text with || in it. Selector = 1.', 0), + ['This is a text with | in it. Selector = 0.', '{0}This is a text with || in it. Selector = 0.|{1}This is a text with || in it. Selector = 1.', 0], // Empty plural set (2 plural forms) from a .PO file - array('', '|', 1), + ['', '|', 1], // Empty plural set (3 plural forms) from a .PO file - array('', '||', 1), - ); + ['', '||', 1], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php index 5eb6c01f..28776432 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php @@ -60,13 +60,13 @@ class PluralizationRulesTest extends TestCase */ public function successLangcodes() { - return array( - array('1', array('ay', 'bo', 'cgg', 'dz', 'id', 'ja', 'jbo', 'ka', 'kk', 'km', 'ko', 'ky')), - array('2', array('nl', 'fr', 'en', 'de', 'de_GE', 'hy', 'hy_AM')), - array('3', array('be', 'bs', 'cs', 'hr')), - array('4', array('cy', 'mt', 'sl')), - array('6', array('ar')), - ); + return [ + ['1', ['ay', 'bo', 'cgg', 'dz', 'id', 'ja', 'jbo', 'ka', 'kk', 'km', 'ko', 'ky']], + ['2', ['nl', 'fr', 'en', 'de', 'de_GE', 'hy', 'hy_AM']], + ['3', ['be', 'bs', 'cs', 'hr']], + ['4', ['cy', 'mt', 'sl']], + ['6', ['ar']], + ]; } /** @@ -79,13 +79,13 @@ class PluralizationRulesTest extends TestCase */ public function failingLangcodes() { - return array( - array('1', array('fa')), - array('2', array('jbo')), - array('3', array('cbs')), - array('4', array('gd', 'kw')), - array('5', array('ga')), - ); + return [ + ['1', ['fa']], + ['2', ['jbo']], + ['3', ['cbs']], + ['4', ['gd', 'kw']], + ['5', ['ga']], + ]; } /** @@ -109,7 +109,7 @@ class PluralizationRulesTest extends TestCase protected function generateTestData($langCodes) { - $matrix = array(); + $matrix = []; foreach ($langCodes as $langCode) { for ($count = 0; $count < 200; ++$count) { $plural = PluralizationRules::get($count, $langCode); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php index 3e71ae74..decda70c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php @@ -65,13 +65,13 @@ class TranslatorCacheTest extends TestCase // Prime the cache $translator = new Translator($locale, null, $this->tmpDir, $debug); $translator->addLoader($format, new ArrayLoader()); - $translator->addResource($format, array($msgid => 'OK'), $locale); + $translator->addResource($format, [$msgid => 'OK'], $locale); $translator->trans($msgid); // Try again and see we get a valid result whilst no loader can be used $translator = new Translator($locale, null, $this->tmpDir, $debug); $translator->addLoader($format, $this->createFailingLoader()); - $translator->addResource($format, array($msgid => 'OK'), $locale); + $translator->addResource($format, [$msgid => 'OK'], $locale); $this->assertEquals('OK', $translator->trans($msgid), '-> caching does not work in '.($debug ? 'debug' : 'production')); } @@ -92,7 +92,7 @@ class TranslatorCacheTest extends TestCase $format = 'some_format'; $msgid = 'test'; - $catalogue = new MessageCatalogue($locale, array()); + $catalogue = new MessageCatalogue($locale, []); $catalogue->addResource(new StaleResource()); // better use a helper class than a mock, because it gets serialized in the cache and re-loaded /** @var LoaderInterface|\PHPUnit_Framework_MockObject_MockObject $loader */ @@ -123,7 +123,7 @@ class TranslatorCacheTest extends TestCase { /* * Similar to the previous test. After we used the second translator, make - * sure there's still a useable cache for the first one. + * sure there's still a usable cache for the first one. */ $locale = 'any_locale'; @@ -133,26 +133,26 @@ class TranslatorCacheTest extends TestCase // Create a Translator and prime its cache $translator = new Translator($locale, null, $this->tmpDir, $debug); $translator->addLoader($format, new ArrayLoader()); - $translator->addResource($format, array($msgid => 'OK'), $locale); + $translator->addResource($format, [$msgid => 'OK'], $locale); $translator->trans($msgid); // Create another Translator with a different catalogue for the same locale $translator = new Translator($locale, null, $this->tmpDir, $debug); $translator->addLoader($format, new ArrayLoader()); - $translator->addResource($format, array($msgid => 'FAIL'), $locale); + $translator->addResource($format, [$msgid => 'FAIL'], $locale); $translator->trans($msgid); - // Now the first translator must still have a useable cache. + // Now the first translator must still have a usable cache. $translator = new Translator($locale, null, $this->tmpDir, $debug); $translator->addLoader($format, $this->createFailingLoader()); - $translator->addResource($format, array($msgid => 'OK'), $locale); + $translator->addResource($format, [$msgid => 'OK'], $locale); $this->assertEquals('OK', $translator->trans($msgid), '-> the cache was overwritten by another translator instance in '.($debug ? 'debug' : 'production')); } public function testGeneratedCacheFilesAreOnlyBelongRequestedLocales() { $translator = new Translator('a', null, $this->tmpDir); - $translator->setFallbackLocales(array('b')); + $translator->setFallbackLocales(['b']); $translator->trans('bar'); $cachedFiles = glob($this->tmpDir.'/*.php'); @@ -168,24 +168,24 @@ class TranslatorCacheTest extends TestCase * loading a catalogue from the cache. */ $translator = new Translator('a', null, $this->tmpDir); - $translator->setFallbackLocales(array('b')); + $translator->setFallbackLocales(['b']); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foo (a)'), 'a'); - $translator->addResource('array', array('bar' => 'bar (b)'), 'b'); + $translator->addResource('array', ['foo' => 'foo (a)'], 'a'); + $translator->addResource('array', ['bar' => 'bar (b)'], 'b'); $this->assertEquals('bar (b)', $translator->trans('bar')); // Remove fallback locale - $translator->setFallbackLocales(array()); + $translator->setFallbackLocales([]); $this->assertEquals('bar', $translator->trans('bar')); // Use a fresh translator with no fallback locales, result should be the same $translator = new Translator('a', null, $this->tmpDir); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foo (a)'), 'a'); - $translator->addResource('array', array('bar' => 'bar (b)'), 'b'); + $translator->addResource('array', ['foo' => 'foo (a)'], 'a'); + $translator->addResource('array', ['bar' => 'bar (b)'], 'b'); $this->assertEquals('bar', $translator->trans('bar')); } @@ -206,12 +206,12 @@ class TranslatorCacheTest extends TestCase * The catalogues contain distinct sets of messages. */ $translator = new Translator('a', null, $this->tmpDir); - $translator->setFallbackLocales(array('b')); + $translator->setFallbackLocales(['b']); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foo (a)'), 'a'); - $translator->addResource('array', array('foo' => 'foo (b)'), 'b'); - $translator->addResource('array', array('bar' => 'bar (b)'), 'b'); + $translator->addResource('array', ['foo' => 'foo (a)'], 'a'); + $translator->addResource('array', ['foo' => 'foo (b)'], 'b'); + $translator->addResource('array', ['bar' => 'bar (b)'], 'b'); $catalogue = $translator->getCatalogue('a'); $this->assertFalse($catalogue->defines('bar')); // Sure, the "a" catalogue does not contain that message. @@ -224,12 +224,12 @@ class TranslatorCacheTest extends TestCase * Behind the scenes, the cache is used. But that should not matter, right? */ $translator = new Translator('a', null, $this->tmpDir); - $translator->setFallbackLocales(array('b')); + $translator->setFallbackLocales(['b']); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foo (a)'), 'a'); - $translator->addResource('array', array('foo' => 'foo (b)'), 'b'); - $translator->addResource('array', array('bar' => 'bar (b)'), 'b'); + $translator->addResource('array', ['foo' => 'foo (a)'], 'a'); + $translator->addResource('array', ['foo' => 'foo (b)'], 'b'); + $translator->addResource('array', ['bar' => 'bar (b)'], 'b'); $catalogue = $translator->getCatalogue('a'); $this->assertFalse($catalogue->defines('bar')); @@ -246,7 +246,7 @@ class TranslatorCacheTest extends TestCase $loader ->expects($this->exactly(2)) ->method('load') - ->will($this->returnValue($this->getCatalogue('fr', array(), array($resource)))); + ->will($this->returnValue($this->getCatalogue('fr', [], [$resource]))); // prime the cache $translator = new Translator('fr', null, $this->tmpDir, true); @@ -261,7 +261,7 @@ class TranslatorCacheTest extends TestCase $translator->trans('foo'); } - protected function getCatalogue($locale, $messages, $resources = array()) + protected function getCatalogue($locale, $messages, $resources = []) { $catalogue = new MessageCatalogue($locale); foreach ($messages as $key => $translation) { @@ -276,7 +276,7 @@ class TranslatorCacheTest extends TestCase public function runForDebugAndProduction() { - return array(array(true), array(false)); + return [[true], [false]]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/TranslatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/TranslatorTest.php index 3e54839f..ab6dc5b8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/TranslatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/TranslatorTest.php @@ -97,8 +97,8 @@ class TranslatorTest extends TestCase $translator = new Translator($locale); $translator->addLoader('loader-a', new ArrayLoader()); $translator->addLoader('loader-b', new ArrayLoader()); - $translator->addResource('loader-a', array('foo' => 'foofoo'), $locale, 'domain-a'); - $translator->addResource('loader-b', array('bar' => 'foobar'), $locale, 'domain-b'); + $translator->addResource('loader-a', ['foo' => 'foofoo'], $locale, 'domain-a'); + $translator->addResource('loader-b', ['bar' => 'foobar'], $locale, 'domain-b'); /* * Test that we get a single catalogue comprising messages @@ -113,13 +113,13 @@ class TranslatorTest extends TestCase { $translator = new Translator('en'); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foofoo'), 'en'); - $translator->addResource('array', array('bar' => 'foobar'), 'fr'); + $translator->addResource('array', ['foo' => 'foofoo'], 'en'); + $translator->addResource('array', ['bar' => 'foobar'], 'fr'); // force catalogue loading $translator->trans('bar'); - $translator->setFallbackLocales(array('fr')); + $translator->setFallbackLocales(['fr']); $this->assertEquals('foobar', $translator->trans('bar')); } @@ -127,13 +127,13 @@ class TranslatorTest extends TestCase { $translator = new Translator('en'); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foo (en)'), 'en'); - $translator->addResource('array', array('bar' => 'bar (fr)'), 'fr'); + $translator->addResource('array', ['foo' => 'foo (en)'], 'en'); + $translator->addResource('array', ['bar' => 'bar (fr)'], 'fr'); // force catalogue loading $translator->trans('bar'); - $translator->setFallbackLocales(array('fr_FR', 'fr')); + $translator->setFallbackLocales(['fr_FR', 'fr']); $this->assertEquals('bar (fr)', $translator->trans('bar')); } @@ -144,7 +144,7 @@ class TranslatorTest extends TestCase public function testSetFallbackInvalidLocales($locale) { $translator = new Translator('fr'); - $translator->setFallbackLocales(array('fr', $locale)); + $translator->setFallbackLocales(['fr', $locale]); } /** @@ -153,7 +153,7 @@ class TranslatorTest extends TestCase public function testSetFallbackValidLocales($locale) { $translator = new Translator($locale); - $translator->setFallbackLocales(array('fr', $locale)); + $translator->setFallbackLocales(['fr', $locale]); // no assertion. this method just asserts that no exception is thrown $this->addToAssertionCount(1); } @@ -161,10 +161,10 @@ class TranslatorTest extends TestCase public function testTransWithFallbackLocale() { $translator = new Translator('fr_FR'); - $translator->setFallbackLocales(array('en')); + $translator->setFallbackLocales(['en']); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('bar' => 'foobar'), 'en'); + $translator->addResource('array', ['bar' => 'foobar'], 'en'); $this->assertEquals('foobar', $translator->trans('bar')); } @@ -176,7 +176,7 @@ class TranslatorTest extends TestCase public function testAddResourceInvalidLocales($locale) { $translator = new Translator('fr'); - $translator->addResource('array', array('foo' => 'foofoo'), $locale); + $translator->addResource('array', ['foo' => 'foofoo'], $locale); } /** @@ -185,7 +185,7 @@ class TranslatorTest extends TestCase public function testAddResourceValidLocales($locale) { $translator = new Translator('fr'); - $translator->addResource('array', array('foo' => 'foofoo'), $locale); + $translator->addResource('array', ['foo' => 'foofoo'], $locale); // no assertion. this method just asserts that no exception is thrown $this->addToAssertionCount(1); } @@ -195,12 +195,12 @@ class TranslatorTest extends TestCase $translator = new Translator('fr'); $translator->addLoader('array', new ArrayLoader()); - $translator->setFallbackLocales(array('en')); + $translator->setFallbackLocales(['en']); - $translator->addResource('array', array('foo' => 'foofoo'), 'en'); + $translator->addResource('array', ['foo' => 'foofoo'], 'en'); $this->assertEquals('foofoo', $translator->trans('foo')); - $translator->addResource('array', array('bar' => 'foobar'), 'en'); + $translator->addResource('array', ['bar' => 'foobar'], 'en'); $this->assertEquals('foobar', $translator->trans('bar')); } @@ -231,15 +231,15 @@ class TranslatorTest extends TestCase $translator->addResource($format, __DIR__.'/fixtures/non-existing', 'en_GB'); $translator->addResource($format, __DIR__.'/fixtures/resources.'.$format, 'en', 'resources'); - $this->assertEquals('bar', $translator->trans('foo', array(), 'resources')); + $this->assertEquals('bar', $translator->trans('foo', [], 'resources')); } public function testTransWithFallbackLocaleBis() { $translator = new Translator('en_US'); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foofoo'), 'en_US'); - $translator->addResource('array', array('bar' => 'foobar'), 'en'); + $translator->addResource('array', ['foo' => 'foofoo'], 'en_US'); + $translator->addResource('array', ['bar' => 'foobar'], 'en'); $this->assertEquals('foobar', $translator->trans('bar')); } @@ -247,10 +247,10 @@ class TranslatorTest extends TestCase { $translator = new Translator('fr_FR'); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foo (en_US)'), 'en_US'); - $translator->addResource('array', array('bar' => 'bar (en)'), 'en'); + $translator->addResource('array', ['foo' => 'foo (en_US)'], 'en_US'); + $translator->addResource('array', ['bar' => 'bar (en)'], 'en'); - $translator->setFallbackLocales(array('en_US', 'en')); + $translator->setFallbackLocales(['en_US', 'en']); $this->assertEquals('foo (en_US)', $translator->trans('foo')); $this->assertEquals('bar (en)', $translator->trans('bar')); @@ -259,7 +259,7 @@ class TranslatorTest extends TestCase public function testTransNonExistentWithFallback() { $translator = new Translator('fr'); - $translator->setFallbackLocales(array('en')); + $translator->setFallbackLocales(['en']); $translator->addLoader('array', new ArrayLoader()); $this->assertEquals('non-existent', $translator->trans('non-existent')); } @@ -270,7 +270,7 @@ class TranslatorTest extends TestCase public function testWhenAResourceHasNoRegisteredLoader() { $translator = new Translator('en'); - $translator->addResource('array', array('foo' => 'foofoo'), 'en'); + $translator->addResource('array', ['foo' => 'foofoo'], 'en'); $translator->trans('foo'); } @@ -278,7 +278,7 @@ class TranslatorTest extends TestCase public function testNestedFallbackCatalogueWhenUsingMultipleLocales() { $translator = new Translator('fr'); - $translator->setFallbackLocales(array('ru', 'en')); + $translator->setFallbackLocales(['ru', 'en']); $translator->getCatalogue('fr'); @@ -293,7 +293,7 @@ class TranslatorTest extends TestCase $translator->addResource('yml', __DIR__.'/fixtures/resources.yml', 'en'); // force catalogue loading - $this->assertEquals('bar', $translator->trans('foo', array())); + $this->assertEquals('bar', $translator->trans('foo', [])); $resources = $translator->getCatalogue('en')->getResources(); $this->assertCount(1, $resources); @@ -312,7 +312,7 @@ class TranslatorTest extends TestCase { $translator = new Translator('en'); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array((string) $id => $translation), $locale, $domain); + $translator->addResource('array', [(string) $id => $translation], $locale, $domain); $this->assertEquals($expected, $translator->trans($id, $parameters, $domain, $locale)); } @@ -325,9 +325,9 @@ class TranslatorTest extends TestCase { $translator = new Translator('en'); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foofoo'), 'en'); + $translator->addResource('array', ['foo' => 'foofoo'], 'en'); - $translator->trans('foo', array(), '', $locale); + $translator->trans('foo', [], '', $locale); } /** @@ -337,10 +337,10 @@ class TranslatorTest extends TestCase { $translator = new Translator($locale); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('test' => 'OK'), $locale); + $translator->addResource('array', ['test' => 'OK'], $locale); $this->assertEquals('OK', $translator->trans('test')); - $this->assertEquals('OK', $translator->trans('test', array(), null, $locale)); + $this->assertEquals('OK', $translator->trans('test', [], null, $locale)); } /** @@ -352,7 +352,7 @@ class TranslatorTest extends TestCase $translator->addLoader('array', new ArrayLoader()); $translator->addResource('array', $messages, 'fr', ''); - $this->assertEquals($expected, $translator->trans($id, array(), '', 'fr')); + $this->assertEquals($expected, $translator->trans($id, [], '', 'fr')); } /** @@ -362,7 +362,7 @@ class TranslatorTest extends TestCase { $translator = new Translator('en'); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array((string) $id => $translation), $locale, $domain); + $translator->addResource('array', [(string) $id => $translation], $locale, $domain); $this->assertEquals($expected, $translator->transChoice($id, $number, $parameters, $domain, $locale)); } @@ -375,9 +375,9 @@ class TranslatorTest extends TestCase { $translator = new Translator('en'); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foofoo'), 'en'); + $translator->addResource('array', ['foo' => 'foofoo'], 'en'); - $translator->transChoice('foo', 1, array(), '', $locale); + $translator->transChoice('foo', 1, [], '', $locale); } /** @@ -387,149 +387,149 @@ class TranslatorTest extends TestCase { $translator = new Translator('en'); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foofoo'), 'en'); + $translator->addResource('array', ['foo' => 'foofoo'], 'en'); - $translator->transChoice('foo', 1, array(), '', $locale); + $translator->transChoice('foo', 1, [], '', $locale); // no assertion. this method just asserts that no exception is thrown $this->addToAssertionCount(1); } public function getTransFileTests() { - return array( - array('csv', 'CsvFileLoader'), - array('ini', 'IniFileLoader'), - array('mo', 'MoFileLoader'), - array('po', 'PoFileLoader'), - array('php', 'PhpFileLoader'), - array('ts', 'QtFileLoader'), - array('xlf', 'XliffFileLoader'), - array('yml', 'YamlFileLoader'), - array('json', 'JsonFileLoader'), - ); + return [ + ['csv', 'CsvFileLoader'], + ['ini', 'IniFileLoader'], + ['mo', 'MoFileLoader'], + ['po', 'PoFileLoader'], + ['php', 'PhpFileLoader'], + ['ts', 'QtFileLoader'], + ['xlf', 'XliffFileLoader'], + ['yml', 'YamlFileLoader'], + ['json', 'JsonFileLoader'], + ]; } public function getTransTests() { - return array( - array('Symfony est super !', 'Symfony is great!', 'Symfony est super !', array(), 'fr', ''), - array('Symfony est awesome !', 'Symfony is %what%!', 'Symfony est %what% !', array('%what%' => 'awesome'), 'fr', ''), - array('Symfony est super !', new StringClass('Symfony is great!'), 'Symfony est super !', array(), 'fr', ''), - ); + return [ + ['Symfony est super !', 'Symfony is great!', 'Symfony est super !', [], 'fr', ''], + ['Symfony est awesome !', 'Symfony is %what%!', 'Symfony est %what% !', ['%what%' => 'awesome'], 'fr', ''], + ['Symfony est super !', new StringClass('Symfony is great!'), 'Symfony est super !', [], 'fr', ''], + ]; } public function getFlattenedTransTests() { - $messages = array( - 'symfony' => array( - 'is' => array( + $messages = [ + 'symfony' => [ + 'is' => [ 'great' => 'Symfony est super!', - ), - ), - 'foo' => array( - 'bar' => array( + ], + ], + 'foo' => [ + 'bar' => [ 'baz' => 'Foo Bar Baz', - ), + ], 'baz' => 'Foo Baz', - ), - ); + ], + ]; - return array( - array('Symfony est super!', $messages, 'symfony.is.great'), - array('Foo Bar Baz', $messages, 'foo.bar.baz'), - array('Foo Baz', $messages, 'foo.baz'), - ); + return [ + ['Symfony est super!', $messages, 'symfony.is.great'], + ['Foo Bar Baz', $messages, 'foo.bar.baz'], + ['Foo Baz', $messages, 'foo.baz'], + ]; } public function getTransChoiceTests() { - return array( - array('Il y a 0 pomme', '{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 0, array(), 'fr', ''), - array('Il y a 1 pomme', '{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 1, array(), 'fr', ''), - array('Il y a 10 pommes', '{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 10, array(), 'fr', ''), + return [ + ['Il y a 0 pomme', '{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 0, [], 'fr', ''], + ['Il y a 1 pomme', '{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 1, [], 'fr', ''], + ['Il y a 10 pommes', '{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 10, [], 'fr', ''], - array('Il y a 0 pomme', 'There is one apple|There is %count% apples', 'Il y a %count% pomme|Il y a %count% pommes', 0, array(), 'fr', ''), - array('Il y a 1 pomme', 'There is one apple|There is %count% apples', 'Il y a %count% pomme|Il y a %count% pommes', 1, array(), 'fr', ''), - array('Il y a 10 pommes', 'There is one apple|There is %count% apples', 'Il y a %count% pomme|Il y a %count% pommes', 10, array(), 'fr', ''), + ['Il y a 0 pomme', 'There is one apple|There is %count% apples', 'Il y a %count% pomme|Il y a %count% pommes', 0, [], 'fr', ''], + ['Il y a 1 pomme', 'There is one apple|There is %count% apples', 'Il y a %count% pomme|Il y a %count% pommes', 1, [], 'fr', ''], + ['Il y a 10 pommes', 'There is one apple|There is %count% apples', 'Il y a %count% pomme|Il y a %count% pommes', 10, [], 'fr', ''], - array('Il y a 0 pomme', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 0, array(), 'fr', ''), - array('Il y a 1 pomme', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 1, array(), 'fr', ''), - array('Il y a 10 pommes', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 10, array(), 'fr', ''), + ['Il y a 0 pomme', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 0, [], 'fr', ''], + ['Il y a 1 pomme', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 1, [], 'fr', ''], + ['Il y a 10 pommes', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 10, [], 'fr', ''], - array('Il n\'y a aucune pomme', '{0} There are no apples|one: There is one apple|more: There is %count% apples', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 0, array(), 'fr', ''), - array('Il y a 1 pomme', '{0} There are no apples|one: There is one apple|more: There is %count% apples', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 1, array(), 'fr', ''), - array('Il y a 10 pommes', '{0} There are no apples|one: There is one apple|more: There is %count% apples', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 10, array(), 'fr', ''), + ['Il n\'y a aucune pomme', '{0} There are no apples|one: There is one apple|more: There is %count% apples', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 0, [], 'fr', ''], + ['Il y a 1 pomme', '{0} There are no apples|one: There is one apple|more: There is %count% apples', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 1, [], 'fr', ''], + ['Il y a 10 pommes', '{0} There are no apples|one: There is one apple|more: There is %count% apples', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 10, [], 'fr', ''], - array('Il y a 0 pomme', new StringClass('{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples'), '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 0, array(), 'fr', ''), + ['Il y a 0 pomme', new StringClass('{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples'), '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 0, [], 'fr', ''], // Override %count% with a custom value - array('Il y a quelques pommes', 'one: There is one apple|more: There are %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 2, array('%count%' => 'quelques'), 'fr', ''), - ); + ['Il y a quelques pommes', 'one: There is one apple|more: There are %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 2, ['%count%' => 'quelques'], 'fr', ''], + ]; } public function getInvalidLocalesTests() { - return array( - array('fr FR'), - array('français'), - array('fr+en'), - array('utf#8'), - array('fr&en'), - array('fr~FR'), - array(' fr'), - array('fr '), - array('fr*'), - array('fr/FR'), - array('fr\\FR'), - ); + return [ + ['fr FR'], + ['français'], + ['fr+en'], + ['utf#8'], + ['fr&en'], + ['fr~FR'], + [' fr'], + ['fr '], + ['fr*'], + ['fr/FR'], + ['fr\\FR'], + ]; } public function getValidLocalesTests() { - return array( - array(''), - array(null), - array('fr'), - array('francais'), - array('FR'), - array('frFR'), - array('fr-FR'), - array('fr_FR'), - array('fr.FR'), - array('fr-FR.UTF8'), - array('sr@latin'), - ); + return [ + [''], + [null], + ['fr'], + ['francais'], + ['FR'], + ['frFR'], + ['fr-FR'], + ['fr_FR'], + ['fr.FR'], + ['fr-FR.UTF8'], + ['sr@latin'], + ]; } public function testTransChoiceFallback() { $translator = new Translator('ru'); - $translator->setFallbackLocales(array('en')); + $translator->setFallbackLocales(['en']); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('some_message2' => 'one thing|%count% things'), 'en'); + $translator->addResource('array', ['some_message2' => 'one thing|%count% things'], 'en'); - $this->assertEquals('10 things', $translator->transChoice('some_message2', 10, array('%count%' => 10))); + $this->assertEquals('10 things', $translator->transChoice('some_message2', 10, ['%count%' => 10])); } public function testTransChoiceFallbackBis() { $translator = new Translator('ru'); - $translator->setFallbackLocales(array('en_US', 'en')); + $translator->setFallbackLocales(['en_US', 'en']); $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('some_message2' => 'one thing|%count% things'), 'en_US'); + $translator->addResource('array', ['some_message2' => 'one thing|%count% things'], 'en_US'); - $this->assertEquals('10 things', $translator->transChoice('some_message2', 10, array('%count%' => 10))); + $this->assertEquals('10 things', $translator->transChoice('some_message2', 10, ['%count%' => 10])); } public function testTransChoiceFallbackWithNoTranslation() { $translator = new Translator('ru'); - $translator->setFallbackLocales(array('en')); + $translator->setFallbackLocales(['en']); $translator->addLoader('array', new ArrayLoader()); // consistent behavior with Translator::trans(), which returns the string // unchanged if it can't be found - $this->assertEquals('some_message2', $translator->transChoice('some_message2', 10, array('%count%' => 10))); + $this->assertEquals('some_message2', $translator->transChoice('some_message2', 10, ['%count%' => 10])); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Util/ArrayConverterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Util/ArrayConverterTest.php index dbb5424f..b0335415 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Util/ArrayConverterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Util/ArrayConverterTest.php @@ -26,49 +26,49 @@ class ArrayConverterTest extends TestCase public function messagesData() { - return array( - array( + return [ + [ // input - array( + [ 'foo1' => 'bar', 'foo.bar' => 'value', - ), + ], // expected output - array( + [ 'foo1' => 'bar', - 'foo' => array('bar' => 'value'), - ), - ), - array( + 'foo' => ['bar' => 'value'], + ], + ], + [ // input - array( + [ 'foo.bar' => 'value1', 'foo.bar.test' => 'value2', - ), + ], // expected output - array( - 'foo' => array( + [ + 'foo' => [ 'bar' => 'value1', 'bar.test' => 'value2', - ), - ), - ), - array( + ], + ], + ], + [ // input - array( + [ 'foo.level2.level3.level4' => 'value1', 'foo.level2' => 'value2', 'foo.bar' => 'value3', - ), + ], // expected output - array( - 'foo' => array( + [ + 'foo' => [ 'level2' => 'value2', 'level2.level3.level4' => 'value1', 'bar' => 'value3', - ), - ), - ), - ); + ], + ], + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Writer/TranslationWriterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Writer/TranslationWriterTest.php index 26a846ea..dbcc14e6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Writer/TranslationWriterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Writer/TranslationWriterTest.php @@ -43,7 +43,7 @@ class TranslationWriterTest extends TestCase $writer = new TranslationWriter(); $writer->addDumper('test', $dumper); - $writer->write(new MessageCatalogue(array()), 'test'); + $writer->write(new MessageCatalogue([]), 'test'); } public function testDisableBackup() @@ -62,7 +62,7 @@ class TranslationWriterTest extends TestCase class NonBackupDumper implements DumperInterface { - public function dump(MessageCatalogue $messages, $options = array()) + public function dump(MessageCatalogue $messages, $options = []) { } } @@ -71,7 +71,7 @@ class BackupDumper implements DumperInterface { public $backup = true; - public function dump(MessageCatalogue $messages, $options = array()) + public function dump(MessageCatalogue $messages, $options = []) { } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/extractor/translation.html.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/extractor/translation.html.php index 1ce8ea94..55520203 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/extractor/translation.html.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/extractor/translation.html.php @@ -1,7 +1,7 @@ This template is used for translation message extraction tests trans('single-quoted key'); ?> trans('double-quoted key'); ?> -trans(<<<'EOF' +trans(<< @@ -29,21 +29,29 @@ EOF transChoice( '{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples', 10, - array('%count%' => 10) + ['%count%' => 10] ); ?> -trans('other-domain-test-no-params-short-array', array(), 'not_messages'); ?> +trans('concatenated'.' message'.<< -trans('other-domain-test-no-params-long-array', array(), 'not_messages'); ?> +trans('other-domain-test-no-params-short-array', [], 'not_messages'); ?> -trans('other-domain-test-params-short-array', array('foo' => 'bar'), 'not_messages'); ?> +trans('other-domain-test-no-params-long-array', [], 'not_messages'); ?> -trans('other-domain-test-params-long-array', array('foo' => 'bar'), 'not_messages'); ?> +trans('other-domain-test-params-short-array', ['foo' => 'bar'], 'not_messages'); ?> -transChoice('other-domain-test-trans-choice-short-array-%count%', 10, array('%count%' => 10), 'not_messages'); ?> +trans('other-domain-test-params-long-array', ['foo' => 'bar'], 'not_messages'); ?> -transChoice('other-domain-test-trans-choice-long-array-%count%', 10, array('%count%' => 10), 'not_messages'); ?> +transChoice('other-domain-test-trans-choice-short-array-%count%', 10, ['%count%' => 10], 'not_messages'); ?> -trans('typecast', array('a' => (int) '123'), 'not_messages'); ?> -transChoice('msg1', 10 + 1, array(), 'not_messages'); ?> -transChoice('msg2', ceil(4.5), array(), 'not_messages'); ?> +transChoice('other-domain-test-trans-choice-long-array-%count%', 10, ['%count%' => 10], 'not_messages'); ?> + +trans('typecast', ['a' => (int) '123'], 'not_messages'); ?> +transChoice('msg1', 10 + 1, [], 'not_messages'); ?> +transChoice('msg2', ceil(4.5), [], 'not_messages'); ?> diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Translator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Translator.php index c965a0bb..e72d20a8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Translator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Translator.php @@ -31,7 +31,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface /** * @var MessageCatalogueInterface[] */ - protected $catalogues = array(); + protected $catalogues = []; /** * @var string @@ -41,17 +41,17 @@ class Translator implements TranslatorInterface, TranslatorBagInterface /** * @var array */ - private $fallbackLocales = array(); + private $fallbackLocales = []; /** * @var LoaderInterface[] */ - private $loaders = array(); + private $loaders = []; /** * @var array */ - private $resources = array(); + private $resources = []; /** * @var MessageFormatterInterface @@ -131,10 +131,10 @@ class Translator implements TranslatorInterface, TranslatorBagInterface $this->assertValidLocale($locale); - $this->resources[$locale][] = array($format, $resource, $domain); + $this->resources[$locale][] = [$format, $resource, $domain]; if (\in_array($locale, $this->fallbackLocales)) { - $this->catalogues = array(); + $this->catalogues = []; } else { unset($this->catalogues[$locale]); } @@ -167,7 +167,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface public function setFallbackLocales(array $locales) { // needed as the fallback locales are linked to the already loaded catalogues - $this->catalogues = array(); + $this->catalogues = []; foreach ($locales as $locale) { $this->assertValidLocale($locale); @@ -189,7 +189,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface /** * {@inheritdoc} */ - public function trans($id, array $parameters = array(), $domain = null, $locale = null) + public function trans($id, array $parameters = [], $domain = null, $locale = null) { if (null === $domain) { $domain = 'messages'; @@ -201,7 +201,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface /** * {@inheritdoc} */ - public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + public function transChoice($id, $number, array $parameters = [], $domain = null, $locale = null) { if (!$this->formatter instanceof ChoiceMessageFormatterInterface) { throw new LogicException(sprintf('The formatter "%s" does not support plural translations.', \get_class($this->formatter))); @@ -403,7 +403,7 @@ EOF protected function computeFallbackLocales($locale) { - $locales = array(); + $locales = []; foreach ($this->fallbackLocales as $fallback) { if ($fallback === $locale) { continue; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/TranslatorInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/TranslatorInterface.php index 9fcfd5bc..4fbaedb4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/TranslatorInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/TranslatorInterface.php @@ -32,13 +32,13 @@ interface TranslatorInterface * * @throws InvalidArgumentException If the locale contains invalid characters */ - public function trans($id, array $parameters = array(), $domain = null, $locale = null); + public function trans($id, array $parameters = [], $domain = null, $locale = null); /** * Translates the given choice message by choosing a translation according to a number. * * @param string $id The message id (may also be an object that can be cast to string) - * @param int $number The number to use to find the indice of the message + * @param int $number The number to use to find the index of the message * @param array $parameters An array of parameters for the message * @param string|null $domain The domain for the message or null to use the default * @param string|null $locale The locale or null to use the default @@ -47,7 +47,7 @@ interface TranslatorInterface * * @throws InvalidArgumentException If the locale contains invalid characters */ - public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null); + public function transChoice($id, $number, array $parameters = [], $domain = null, $locale = null); /** * Sets the current locale. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Util/ArrayConverter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Util/ArrayConverter.php index e8b7559d..0276294f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Util/ArrayConverter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Util/ArrayConverter.php @@ -27,7 +27,7 @@ class ArrayConverter { /** * Converts linear messages array to tree-like array. - * For example this rray('foo.bar' => 'value') will be converted to array('foo' => array('bar' => 'value')). + * For example this rray('foo.bar' => 'value') will be converted to ['foo' => ['bar' => 'value']]. * * @param array $messages Linear messages array * @@ -35,7 +35,7 @@ class ArrayConverter */ public static function expandToTree(array $messages) { - $tree = array(); + $tree = []; foreach ($messages as $id => $value) { $referenceToElement = &self::getElementByPath($tree, explode('.', $id)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Writer/TranslationWriter.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Writer/TranslationWriter.php index 459f707f..aad6aad3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Writer/TranslationWriter.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Writer/TranslationWriter.php @@ -23,7 +23,7 @@ use Symfony\Component\Translation\MessageCatalogue; */ class TranslationWriter implements TranslationWriterInterface { - private $dumpers = array(); + private $dumpers = []; /** * Adds a dumper to the writer. @@ -67,7 +67,7 @@ class TranslationWriter implements TranslationWriterInterface * * @throws InvalidArgumentException */ - public function write(MessageCatalogue $catalogue, $format, $options = array()) + public function write(MessageCatalogue $catalogue, $format, $options = []) { if (!isset($this->dumpers[$format])) { throw new InvalidArgumentException(sprintf('There is no dumper associated with format "%s".', $format)); @@ -95,7 +95,7 @@ class TranslationWriter implements TranslationWriterInterface * * @deprecated since 3.4 will be removed in 4.0. Use write instead. */ - public function writeTranslations(MessageCatalogue $catalogue, $format, $options = array()) + public function writeTranslations(MessageCatalogue $catalogue, $format, $options = []) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0. Use write() instead.', __METHOD__), E_USER_DEPRECATED); $this->write($catalogue, $format, $options); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Writer/TranslationWriterInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Writer/TranslationWriterInterface.php index 992ab769..b07c08e2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Writer/TranslationWriterInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Translation/Writer/TranslationWriterInterface.php @@ -30,5 +30,5 @@ interface TranslationWriterInterface * * @throws InvalidArgumentException */ - public function write(MessageCatalogue $catalogue, $format, $options = array()); + public function write(MessageCatalogue $catalogue, $format, $options = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraint.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraint.php index f9670552..b1a5e0c1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraint.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraint.php @@ -49,7 +49,7 @@ abstract class Constraint /** * Maps error codes to the names of their constants. */ - protected static $errorNames = array(); + protected static $errorNames = []; /** * Domain-specific data attached to a constraint. @@ -105,7 +105,7 @@ abstract class Constraint */ public function __construct($options = null) { - $invalidOptions = array(); + $invalidOptions = []; $missingOptions = array_flip((array) $this->getRequiredOptions()); $knownOptions = get_object_vars($this); @@ -122,7 +122,7 @@ abstract class Constraint } if ($options && \is_array($options) && \is_string(key($options))) { foreach ($options as $option => $value) { - if (array_key_exists($option, $knownOptions)) { + if (\array_key_exists($option, $knownOptions)) { $this->$option = $value; unset($missingOptions[$option]); } else { @@ -136,7 +136,7 @@ abstract class Constraint throw new ConstraintDefinitionException(sprintf('No default option is configured for constraint %s', \get_class($this))); } - if (array_key_exists($option, $knownOptions)) { + if (\array_key_exists($option, $knownOptions)) { $this->$option = $options; unset($missingOptions[$option]); } else { @@ -173,7 +173,7 @@ abstract class Constraint return; } - throw new InvalidOptionsException(sprintf('The option "%s" does not exist in constraint %s', $option, \get_class($this)), array($option)); + throw new InvalidOptionsException(sprintf('The option "%s" does not exist in constraint %s', $option, \get_class($this)), [$option]); } /** @@ -194,12 +194,12 @@ abstract class Constraint public function __get($option) { if ('groups' === $option) { - $this->groups = array(self::DEFAULT_GROUP); + $this->groups = [self::DEFAULT_GROUP]; return $this->groups; } - throw new InvalidOptionsException(sprintf('The option "%s" does not exist in constraint %s', $option, \get_class($this)), array($option)); + throw new InvalidOptionsException(sprintf('The option "%s" does not exist in constraint %s', $option, \get_class($this)), [$option]); } /** @@ -248,7 +248,7 @@ abstract class Constraint */ public function getRequiredOptions() { - return array(); + return []; } /** @@ -284,9 +284,7 @@ abstract class Constraint * * @return array The properties to serialize * - * @internal This method may be replaced by an implementation of - * {@link \Serializable} in the future. Please don't use or - * overwrite it. + * @internal */ public function __sleep() { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintValidatorFactory.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintValidatorFactory.php index 86e44e2a..45f3ca94 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintValidatorFactory.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintValidatorFactory.php @@ -24,7 +24,7 @@ use Symfony\Component\Validator\Constraints\ExpressionValidator; */ class ConstraintValidatorFactory implements ConstraintValidatorFactoryInterface { - protected $validators = array(); + protected $validators = []; public function __construct() { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolation.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolation.php index 848c7761..ae9ff89e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolation.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolation.php @@ -79,13 +79,13 @@ class ConstraintViolation implements ConstraintViolationInterface } $propertyPath = (string) $this->propertyPath; - $code = $this->code; + $code = (string) $this->code; if ('' !== $propertyPath && '[' !== $propertyPath[0] && '' !== $class) { $class .= '.'; } - if (!empty($code)) { + if ('' !== $code) { $code = ' (code '.$code.')'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolationList.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolationList.php index c18dd219..c30ee57c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolationList.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolationList.php @@ -21,14 +21,14 @@ class ConstraintViolationList implements \IteratorAggregate, ConstraintViolation /** * @var ConstraintViolationInterface[] */ - private $violations = array(); + private $violations = []; /** * Creates a new constraint violation list. * * @param ConstraintViolationInterface[] $violations The constraint violations to add to the list */ - public function __construct(array $violations = array()) + public function __construct(array $violations = []) { foreach ($violations as $violation) { $this->add($violation); @@ -169,7 +169,7 @@ class ConstraintViolationList implements \IteratorAggregate, ConstraintViolation public function findByCodes($codes) { $codes = (array) $codes; - $violations = array(); + $violations = []; foreach ($this as $violation) { if (\in_array($violation->getCode(), $codes, true)) { $violations[] = $violation; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolationListInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolationListInterface.php index 0489ab50..47e986f5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolationListInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolationListInterface.php @@ -26,7 +26,7 @@ interface ConstraintViolationListInterface extends \Traversable, \Countable, \Ar /** * Merges an existing violation list into this list. */ - public function addAll(ConstraintViolationListInterface $otherList); + public function addAll(self $otherList); /** * Returns the violation at a given offset. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AbstractComparison.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AbstractComparison.php index 0a7e2f3f..89c2690c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AbstractComparison.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AbstractComparison.php @@ -33,7 +33,7 @@ abstract class AbstractComparison extends Constraint public function __construct($options = null) { if (null === $options) { - $options = array(); + $options = []; } if (\is_array($options)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php index fec0080f..3c95c097 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php @@ -13,7 +13,7 @@ namespace Symfony\Component\Validator\Constraints; use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessor; +use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Exception\ConstraintDefinitionException; @@ -29,7 +29,7 @@ abstract class AbstractComparisonValidator extends ConstraintValidator { private $propertyAccessor; - public function __construct(PropertyAccessor $propertyAccessor = null) + public function __construct(PropertyAccessorInterface $propertyAccessor = null) { $this->propertyAccessor = $propertyAccessor; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/All.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/All.php index b531a1d6..d3fe4952 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/All.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/All.php @@ -19,7 +19,7 @@ namespace Symfony\Component\Validator\Constraints; */ class All extends Composite { - public $constraints = array(); + public $constraints = []; public function getDefaultOption() { @@ -28,7 +28,7 @@ class All extends Composite public function getRequiredOptions() { - return array('constraints'); + return ['constraints']; } protected function getCompositeOption() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Bic.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Bic.php index dee5d526..5cb37b7d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Bic.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Bic.php @@ -27,13 +27,13 @@ class Bic extends Constraint const INVALID_COUNTRY_CODE_ERROR = '1ce76f8d-3c1f-451c-9e62-fe9c3ed486ae'; const INVALID_CASE_ERROR = '11884038-3312-4ae5-9d04-699f782130c7'; - protected static $errorNames = array( + protected static $errorNames = [ self::INVALID_LENGTH_ERROR => 'INVALID_LENGTH_ERROR', self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', self::INVALID_BANK_CODE_ERROR => 'INVALID_BANK_CODE_ERROR', self::INVALID_COUNTRY_CODE_ERROR => 'INVALID_COUNTRY_CODE_ERROR', self::INVALID_CASE_ERROR => 'INVALID_CASE_ERROR', - ); + ]; public $message = 'This is not a valid Business Identifier Code (BIC).'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/BicValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/BicValidator.php index 2a27beff..fc363461 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/BicValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/BicValidator.php @@ -38,7 +38,7 @@ class BicValidator extends ConstraintValidator $canonicalize = str_replace(' ', '', $value); // the bic must be either 8 or 11 characters long - if (!\in_array(\strlen($canonicalize), array(8, 11))) { + if (!\in_array(\strlen($canonicalize), [8, 11])) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Bic::INVALID_LENGTH_ERROR) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Blank.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Blank.php index 030b21f9..4fa913c8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Blank.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Blank.php @@ -23,9 +23,9 @@ class Blank extends Constraint { const NOT_BLANK_ERROR = '183ad2de-533d-4796-a439-6d3c3852b549'; - protected static $errorNames = array( + protected static $errorNames = [ self::NOT_BLANK_ERROR => 'NOT_BLANK_ERROR', - ); + ]; public $message = 'This value should be blank.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Callback.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Callback.php index 16231105..8bf6d68c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Callback.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Callback.php @@ -37,7 +37,7 @@ class Callback extends Constraint } if (\is_array($options) && !isset($options['callback']) && !isset($options['groups']) && !isset($options['payload'])) { - $options = array('callback' => $options); + $options = ['callback' => $options]; } parent::__construct($options); @@ -56,6 +56,6 @@ class Callback extends Constraint */ public function getTargets() { - return array(self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT); + return [self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CardScheme.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CardScheme.php index 40c32e87..42848260 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CardScheme.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CardScheme.php @@ -27,10 +27,10 @@ class CardScheme extends Constraint const NOT_NUMERIC_ERROR = 'a2ad9231-e827-485f-8a1e-ef4d9a6d5c2e'; const INVALID_FORMAT_ERROR = 'a8faedbf-1c2f-4695-8d22-55783be8efed'; - protected static $errorNames = array( + protected static $errorNames = [ self::NOT_NUMERIC_ERROR => 'NOT_NUMERIC_ERROR', self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', - ); + ]; public $message = 'Unsupported card type or invalid card number.'; public $schemes; @@ -42,6 +42,6 @@ class CardScheme extends Constraint public function getRequiredOptions() { - return array('schemes'); + return ['schemes']; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CardSchemeValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CardSchemeValidator.php index dae3412c..04abe81a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CardSchemeValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CardSchemeValidator.php @@ -27,62 +27,62 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException; */ class CardSchemeValidator extends ConstraintValidator { - protected $schemes = array( + protected $schemes = [ // American Express card numbers start with 34 or 37 and have 15 digits. - 'AMEX' => array( + 'AMEX' => [ '/^3[47][0-9]{13}$/', - ), + ], // China UnionPay cards start with 62 and have between 16 and 19 digits. // Please note that these cards do not follow Luhn Algorithm as a checksum. - 'CHINA_UNIONPAY' => array( + 'CHINA_UNIONPAY' => [ '/^62[0-9]{14,17}$/', - ), + ], // Diners Club card numbers begin with 300 through 305, 36 or 38. All have 14 digits. // There are Diners Club cards that begin with 5 and have 16 digits. // These are a joint venture between Diners Club and MasterCard, and should be processed like a MasterCard. - 'DINERS' => array( + 'DINERS' => [ '/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/', - ), + ], // Discover card numbers begin with 6011, 622126 through 622925, 644 through 649 or 65. // All have 16 digits. - 'DISCOVER' => array( + 'DISCOVER' => [ '/^6011[0-9]{12}$/', '/^64[4-9][0-9]{13}$/', '/^65[0-9]{14}$/', '/^622(12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|91[0-9]|92[0-5])[0-9]{10}$/', - ), + ], // InstaPayment cards begin with 637 through 639 and have 16 digits. - 'INSTAPAYMENT' => array( + 'INSTAPAYMENT' => [ '/^63[7-9][0-9]{13}$/', - ), + ], // JCB cards beginning with 2131 or 1800 have 15 digits. // JCB cards beginning with 35 have 16 digits. - 'JCB' => array( + 'JCB' => [ '/^(?:2131|1800|35[0-9]{3})[0-9]{11}$/', - ), + ], // Laser cards begin with either 6304, 6706, 6709 or 6771 and have between 16 and 19 digits. - 'LASER' => array( + 'LASER' => [ '/^(6304|670[69]|6771)[0-9]{12,15}$/', - ), + ], // Maestro international cards begin with 675900..675999 and have between 12 and 19 digits. // Maestro UK cards begin with either 500000..509999 or 560000..699999 and have between 12 and 19 digits. - 'MAESTRO' => array( + 'MAESTRO' => [ '/^(6759[0-9]{2})[0-9]{6,13}$/', '/^(50[0-9]{4})[0-9]{6,13}$/', '/^5[6-9][0-9]{10,17}$/', '/^6[0-9]{11,18}$/', - ), + ], // All MasterCard numbers start with the numbers 51 through 55. All have 16 digits. // October 2016 MasterCard numbers can also start with 222100 through 272099. - 'MASTERCARD' => array( + 'MASTERCARD' => [ '/^5[1-5][0-9]{14}$/', '/^2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12})$/', - ), + ], // All Visa card numbers start with a 4 and have a length of 13, 16, or 19 digits. - 'VISA' => array( + 'VISA' => [ '/^4([0-9]{12}|[0-9]{15}|[0-9]{18})$/', - ), - ); + ], + ]; /** * Validates a creditcard belongs to a specified scheme. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Choice.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Choice.php index 4b93c70e..222dca3d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Choice.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Choice.php @@ -25,11 +25,11 @@ class Choice extends Constraint const TOO_FEW_ERROR = '11edd7eb-5872-4b6e-9f12-89923999fd0e'; const TOO_MANY_ERROR = '9bd98e49-211c-433f-8630-fd1c2d0f08c3'; - protected static $errorNames = array( + protected static $errorNames = [ self::NO_SUCH_CHOICE_ERROR => 'NO_SUCH_CHOICE_ERROR', self::TOO_FEW_ERROR => 'TOO_FEW_ERROR', self::TOO_MANY_ERROR => 'TOO_MANY_ERROR', - ); + ]; public $choices; public $callback; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ChoiceValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ChoiceValidator.php index e53b99a0..00577ef4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ChoiceValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ChoiceValidator.php @@ -47,8 +47,8 @@ class ChoiceValidator extends ConstraintValidator } if ($constraint->callback) { - if (!\is_callable($choices = array($this->context->getObject(), $constraint->callback)) - && !\is_callable($choices = array($this->context->getClassName(), $constraint->callback)) + if (!\is_callable($choices = [$this->context->getObject(), $constraint->callback]) + && !\is_callable($choices = [$this->context->getClassName(), $constraint->callback]) && !\is_callable($choices = $constraint->callback) ) { throw new ConstraintDefinitionException('The Choice constraint expects a valid callback'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Collection.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Collection.php index 2b5679b2..21427722 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Collection.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Collection.php @@ -24,12 +24,12 @@ class Collection extends Composite const MISSING_FIELD_ERROR = '2fa2158c-2a7f-484b-98aa-975522539ff8'; const NO_SUCH_FIELD_ERROR = '7703c766-b5d5-4cef-ace7-ae0dd82304e9'; - protected static $errorNames = array( + protected static $errorNames = [ self::MISSING_FIELD_ERROR => 'MISSING_FIELD_ERROR', self::NO_SUCH_FIELD_ERROR => 'NO_SUCH_FIELD_ERROR', - ); + ]; - public $fields = array(); + public $fields = []; public $allowExtraFields = false; public $allowMissingFields = false; public $extraFieldsMessage = 'This field was not expected.'; @@ -42,8 +42,8 @@ class Collection extends Composite { // no known options set? $options is the fields array if (\is_array($options) - && !array_intersect(array_keys($options), array('groups', 'fields', 'allowExtraFields', 'allowMissingFields', 'extraFieldsMessage', 'missingFieldsMessage'))) { - $options = array('fields' => $options); + && !array_intersect(array_keys($options), ['groups', 'fields', 'allowExtraFields', 'allowMissingFields', 'extraFieldsMessage', 'missingFieldsMessage'])) { + $options = ['fields' => $options]; } parent::__construct($options); @@ -75,7 +75,7 @@ class Collection extends Composite public function getRequiredOptions() { - return array('fields'); + return ['fields']; } protected function getCompositeOption() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CollectionValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CollectionValidator.php index e3a29732..3b67e40a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CollectionValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CollectionValidator.php @@ -50,7 +50,7 @@ class CollectionValidator extends ConstraintValidator foreach ($constraint->fields as $field => $fieldConstraint) { // bug fix issue #2779 - $existsInArray = \is_array($value) && array_key_exists($field, $value); + $existsInArray = \is_array($value) && \array_key_exists($field, $value); $existsInArrayAccess = $value instanceof \ArrayAccess && $value->offsetExists($field); if ($existsInArray || $existsInArrayAccess) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Composite.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Composite.php index d233f063..18ea5e31 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Composite.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Composite.php @@ -62,7 +62,7 @@ abstract class Composite extends Constraint $nestedConstraints = $this->$compositeOption; if (!\is_array($nestedConstraints)) { - $nestedConstraints = array($nestedConstraints); + $nestedConstraints = [$nestedConstraints]; } foreach ($nestedConstraints as $constraint) { @@ -80,7 +80,7 @@ abstract class Composite extends Constraint } if (!property_exists($this, 'groups')) { - $mergedGroups = array(); + $mergedGroups = []; foreach ($nestedConstraints as $constraint) { foreach ($constraint->groups as $group) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Count.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Count.php index 0a54ee78..8de10edf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Count.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Count.php @@ -25,10 +25,10 @@ class Count extends Constraint const TOO_FEW_ERROR = 'bef8e338-6ae5-4caf-b8e2-50e7b0579e69'; const TOO_MANY_ERROR = '756b1212-697c-468d-a9ad-50dd783bb169'; - protected static $errorNames = array( + protected static $errorNames = [ self::TOO_FEW_ERROR => 'TOO_FEW_ERROR', self::TOO_MANY_ERROR => 'TOO_MANY_ERROR', - ); + ]; public $minMessage = 'This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.'; public $maxMessage = 'This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.'; @@ -39,16 +39,16 @@ class Count extends Constraint public function __construct($options = null) { if (null !== $options && !\is_array($options)) { - $options = array( + $options = [ 'min' => $options, 'max' => $options, - ); + ]; } parent::__construct($options); if (null === $this->min && null === $this->max) { - throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), array('min', 'max')); + throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), ['min', 'max']); } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Country.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Country.php index 1b76570a..7ed2e058 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Country.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Country.php @@ -23,9 +23,9 @@ class Country extends Constraint { const NO_SUCH_COUNTRY_ERROR = '8f900c12-61bd-455d-9398-996cd040f7f0'; - protected static $errorNames = array( + protected static $errorNames = [ self::NO_SUCH_COUNTRY_ERROR => 'NO_SUCH_COUNTRY_ERROR', - ); + ]; public $message = 'This value is not a valid country.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Currency.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Currency.php index d28f94cb..5d5ced59 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Currency.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Currency.php @@ -24,9 +24,9 @@ class Currency extends Constraint { const NO_SUCH_CURRENCY_ERROR = '69945ac1-2db4-405f-bec7-d2772f73df52'; - protected static $errorNames = array( + protected static $errorNames = [ self::NO_SUCH_CURRENCY_ERROR => 'NO_SUCH_CURRENCY_ERROR', - ); + ]; public $message = 'This value is not a valid currency.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Date.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Date.php index 25634131..530475ff 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Date.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Date.php @@ -24,10 +24,10 @@ class Date extends Constraint const INVALID_FORMAT_ERROR = '69819696-02ac-4a99-9ff0-14e127c4d1bc'; const INVALID_DATE_ERROR = '3c184ce5-b31d-4de7-8b76-326da7b2be93'; - protected static $errorNames = array( + protected static $errorNames = [ self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', self::INVALID_DATE_ERROR => 'INVALID_DATE_ERROR', - ); + ]; public $message = 'This value is not a valid date.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/DateTime.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/DateTime.php index c65f185a..f88c62e0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/DateTime.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/DateTime.php @@ -25,11 +25,11 @@ class DateTime extends Constraint const INVALID_DATE_ERROR = 'd52afa47-620d-4d99-9f08-f4d85b36e33c'; const INVALID_TIME_ERROR = '5e797c9d-74f7-4098-baa3-94390c447b27'; - protected static $errorNames = array( + protected static $errorNames = [ self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', self::INVALID_DATE_ERROR => 'INVALID_DATE_ERROR', self::INVALID_TIME_ERROR => 'INVALID_TIME_ERROR', - ); + ]; public $format = 'Y-m-d H:i:s'; public $message = 'This value is not a valid datetime.'; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Email.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Email.php index a9d9ab15..56ddd3da 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Email.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Email.php @@ -25,11 +25,11 @@ class Email extends Constraint const MX_CHECK_FAILED_ERROR = 'bf447c1c-0266-4e10-9c6c-573df282e413'; const HOST_CHECK_FAILED_ERROR = '7da53a8b-56f3-4288-bb3e-ee9ede4ef9a1'; - protected static $errorNames = array( + protected static $errorNames = [ self::INVALID_FORMAT_ERROR => 'STRICT_CHECK_FAILED_ERROR', self::MX_CHECK_FAILED_ERROR => 'MX_CHECK_FAILED_ERROR', self::HOST_CHECK_FAILED_ERROR => 'HOST_CHECK_FAILED_ERROR', - ); + ]; public $message = 'This value is not a valid email address.'; public $checkMX = false; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/EqualTo.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/EqualTo.php index 4b22c6dc..ccd67675 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/EqualTo.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/EqualTo.php @@ -22,9 +22,9 @@ class EqualTo extends AbstractComparison { const NOT_EQUAL_ERROR = '478618a7-95ba-473d-9101-cabd45e49115'; - protected static $errorNames = array( + protected static $errorNames = [ self::NOT_EQUAL_ERROR => 'NOT_EQUAL_ERROR', - ); + ]; public $message = 'This value should be equal to {{ compared_value }}.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Existence.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Existence.php index 5ea6ffe6..903cf639 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Existence.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Existence.php @@ -16,7 +16,7 @@ namespace Symfony\Component\Validator\Constraints; */ abstract class Existence extends Composite { - public $constraints = array(); + public $constraints = []; public function getDefaultOption() { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Expression.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Expression.php index 3329bd24..23eea209 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Expression.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Expression.php @@ -24,9 +24,9 @@ class Expression extends Constraint { const EXPRESSION_FAILED_ERROR = '6b3befbc-2f01-4ddf-be21-b57898905284'; - protected static $errorNames = array( + protected static $errorNames = [ self::EXPRESSION_FAILED_ERROR => 'EXPRESSION_FAILED_ERROR', - ); + ]; public $message = 'This value is not valid.'; public $expression; @@ -44,7 +44,7 @@ class Expression extends Constraint */ public function getRequiredOptions() { - return array('expression'); + return ['expression']; } /** @@ -52,7 +52,7 @@ class Expression extends Constraint */ public function getTargets() { - return array(self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT); + return [self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ExpressionValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ExpressionValidator.php index ce77d9ba..a4dfadbf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ExpressionValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ExpressionValidator.php @@ -39,7 +39,7 @@ class ExpressionValidator extends ConstraintValidator throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Expression'); } - $variables = array(); + $variables = []; $variables['value'] = $value; $variables['this'] = $this->context->getObject(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/File.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/File.php index 1e191382..52218571 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/File.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/File.php @@ -32,16 +32,16 @@ class File extends Constraint const TOO_LARGE_ERROR = 'df8637af-d466-48c6-a59d-e7126250a654'; const INVALID_MIME_TYPE_ERROR = '744f00bc-4389-4c74-92de-9a43cde55534'; - protected static $errorNames = array( + protected static $errorNames = [ self::NOT_FOUND_ERROR => 'NOT_FOUND_ERROR', self::NOT_READABLE_ERROR => 'NOT_READABLE_ERROR', self::EMPTY_ERROR => 'EMPTY_ERROR', self::TOO_LARGE_ERROR => 'TOO_LARGE_ERROR', self::INVALID_MIME_TYPE_ERROR => 'INVALID_MIME_TYPE_ERROR', - ); + ]; public $binaryFormat; - public $mimeTypes = array(); + public $mimeTypes = []; public $notFoundMessage = 'The file could not be found.'; public $notReadableMessage = 'The file is not readable.'; public $maxSizeMessage = 'The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.'; @@ -99,12 +99,12 @@ class File extends Constraint private function normalizeBinaryFormat($maxSize) { - $factors = array( + $factors = [ 'k' => 1000, 'ki' => 1 << 10, 'm' => 1000000, 'mi' => 1 << 20, - ); + ]; if (ctype_digit((string) $maxSize)) { $this->maxSize = (int) $maxSize; $this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/FileValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/FileValidator.php index 7b556775..d3e3833a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/FileValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/FileValidator.php @@ -27,13 +27,13 @@ class FileValidator extends ConstraintValidator const KIB_BYTES = 1024; const MIB_BYTES = 1048576; - private static $suffices = array( + private static $suffices = [ 1 => 'bytes', self::KB_BYTES => 'kB', self::MB_BYTES => 'MB', self::KIB_BYTES => 'KiB', self::MIB_BYTES => 'MiB', - ); + ]; /** * {@inheritdoc} @@ -233,6 +233,6 @@ class FileValidator extends ConstraintValidator $sizeAsString = (string) round($size / $coef, 2); } - return array($sizeAsString, $limitAsString, self::$suffices[$coef]); + return [$sizeAsString, $limitAsString, self::$suffices[$coef]]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThan.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThan.php index c2ca2dcb..ba225b44 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThan.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThan.php @@ -22,9 +22,9 @@ class GreaterThan extends AbstractComparison { const TOO_LOW_ERROR = '778b7ae0-84d3-481a-9dec-35fdb64b1d78'; - protected static $errorNames = array( + protected static $errorNames = [ self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', - ); + ]; public $message = 'This value should be greater than {{ compared_value }}.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.php index 9b3743d0..2c88f3ad 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.php @@ -22,9 +22,9 @@ class GreaterThanOrEqual extends AbstractComparison { const TOO_LOW_ERROR = 'ea4e51d1-3342-48bd-87f1-9e672cd90cad'; - protected static $errorNames = array( + protected static $errorNames = [ self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', - ); + ]; public $message = 'This value should be greater than or equal to {{ compared_value }}.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GroupSequence.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GroupSequence.php index 1f6f5128..a39d712b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GroupSequence.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GroupSequence.php @@ -17,7 +17,7 @@ namespace Symfony\Component\Validator\Constraints; * When validating a group sequence, each group will only be validated if all * of the previous groups in the sequence succeeded. For example: * - * $validator->validate($address, null, new GroupSequence(array('Basic', 'Strict'))); + * $validator->validate($address, null, new GroupSequence(['Basic', 'Strict'])); * * In the first step, all constraints that belong to the group "Basic" will be * validated. If none of the constraints fail, the validator will then validate diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Iban.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Iban.php index bcb30655..231f8c83 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Iban.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Iban.php @@ -29,13 +29,13 @@ class Iban extends Constraint const INVALID_FORMAT_ERROR = 'c8d318f1-2ecc-41ba-b983-df70d225cf5a'; const NOT_SUPPORTED_COUNTRY_CODE_ERROR = 'e2c259f3-4b46-48e6-b72e-891658158ec8'; - protected static $errorNames = array( + protected static $errorNames = [ self::INVALID_COUNTRY_CODE_ERROR => 'INVALID_COUNTRY_CODE_ERROR', self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', self::NOT_SUPPORTED_COUNTRY_CODE_ERROR => 'NOT_SUPPORTED_COUNTRY_CODE_ERROR', - ); + ]; public $message = 'This is not a valid International Bank Account Number (IBAN).'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IbanValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IbanValidator.php index 9d8d5b86..3dcedb47 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IbanValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IbanValidator.php @@ -35,7 +35,7 @@ class IbanValidator extends ConstraintValidator * * @see https://www.swift.com/sites/default/files/resources/iban_registry.pdf */ - private static $formats = array( + private static $formats = [ 'AD' => 'AD\d{2}\d{4}\d{4}[\dA-Z]{12}', // Andorra 'AE' => 'AE\d{2}\d{3}\d{16}', // United Arab Emirates 'AL' => 'AL\d{2}\d{8}[\dA-Z]{16}', // Albania @@ -129,11 +129,12 @@ class IbanValidator extends ConstraintValidator 'TN' => 'TN59\d{2}\d{3}\d{13}\d{2}', // Tunisia 'TR' => 'TR\d{2}\d{5}[\dA-Z]{1}[\dA-Z]{16}', // Turkey 'UA' => 'UA\d{2}\d{6}[\dA-Z]{19}', // Ukraine + 'VA' => 'VA\d{2}\d{3}\d{15}', // Vatican City State 'VG' => 'VG\d{2}[A-Z]{4}\d{16}', // Virgin Islands, British 'WF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Wallis and Futuna Islands 'XK' => 'XK\d{2}\d{4}\d{10}\d{2}', // Republic of Kosovo 'YT' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Mayotte - ); + ]; /** * {@inheritdoc} @@ -180,7 +181,7 @@ class IbanValidator extends ConstraintValidator } // ...have a format available - if (!array_key_exists($countryCode, self::$formats)) { + if (!\array_key_exists($countryCode, self::$formats)) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Iban::NOT_SUPPORTED_COUNTRY_CODE_ERROR) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IdenticalTo.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IdenticalTo.php index a7dadff8..6c1bc2b1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IdenticalTo.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IdenticalTo.php @@ -22,9 +22,9 @@ class IdenticalTo extends AbstractComparison { const NOT_IDENTICAL_ERROR = '2a8cc50f-58a2-4536-875e-060a2ce69ed5'; - protected static $errorNames = array( + protected static $errorNames = [ self::NOT_IDENTICAL_ERROR => 'NOT_IDENTICAL_ERROR', - ); + ]; public $message = 'This value should be identical to {{ compared_value_type }} {{ compared_value }}.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Image.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Image.php index c3c2c7a2..21005d9e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Image.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Image.php @@ -36,7 +36,7 @@ class Image extends File // Include the mapping from the base class - protected static $errorNames = array( + protected static $errorNames = [ self::NOT_FOUND_ERROR => 'NOT_FOUND_ERROR', self::NOT_READABLE_ERROR => 'NOT_READABLE_ERROR', self::EMPTY_ERROR => 'EMPTY_ERROR', @@ -55,7 +55,7 @@ class Image extends File self::LANDSCAPE_NOT_ALLOWED_ERROR => 'LANDSCAPE_NOT_ALLOWED_ERROR', self::PORTRAIT_NOT_ALLOWED_ERROR => 'PORTRAIT_NOT_ALLOWED_ERROR', self::CORRUPTED_IMAGE_ERROR => 'CORRUPTED_IMAGE_ERROR', - ); + ]; public $mimeTypes = 'image/*'; public $minWidth; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Ip.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Ip.php index f45c4cac..aff99d46 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Ip.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Ip.php @@ -46,7 +46,7 @@ class Ip extends Constraint const INVALID_IP_ERROR = 'b1b427ae-9f6f-41b0-aa9b-84511fbb3c5b'; - protected static $versions = array( + protected static $versions = [ self::V4, self::V6, self::ALL, @@ -62,11 +62,11 @@ class Ip extends Constraint self::V4_ONLY_PUBLIC, self::V6_ONLY_PUBLIC, self::ALL_ONLY_PUBLIC, - ); + ]; - protected static $errorNames = array( + protected static $errorNames = [ self::INVALID_IP_ERROR => 'INVALID_IP_ERROR', - ); + ]; public $version = self::V4; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsFalse.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsFalse.php index 8332e187..d488c616 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsFalse.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsFalse.php @@ -23,9 +23,9 @@ class IsFalse extends Constraint { const NOT_FALSE_ERROR = 'd53a91b0-def3-426a-83d7-269da7ab4200'; - protected static $errorNames = array( + protected static $errorNames = [ self::NOT_FALSE_ERROR => 'NOT_FALSE_ERROR', - ); + ]; public $message = 'This value should be false.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsNull.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsNull.php index fdd29309..e010f9cf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsNull.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsNull.php @@ -23,9 +23,9 @@ class IsNull extends Constraint { const NOT_NULL_ERROR = '60d2f30b-8cfa-4372-b155-9656634de120'; - protected static $errorNames = array( + protected static $errorNames = [ self::NOT_NULL_ERROR => 'NOT_NULL_ERROR', - ); + ]; public $message = 'This value should be null.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsTrue.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsTrue.php index 405a96a4..84f6ce15 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsTrue.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsTrue.php @@ -23,9 +23,9 @@ class IsTrue extends Constraint { const NOT_TRUE_ERROR = '2beabf1c-54c0-4882-a928-05249b26e23b'; - protected static $errorNames = array( + protected static $errorNames = [ self::NOT_TRUE_ERROR => 'NOT_TRUE_ERROR', - ); + ]; public $message = 'This value should be true.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Isbn.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Isbn.php index 615feb66..6629c823 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Isbn.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Isbn.php @@ -29,13 +29,13 @@ class Isbn extends Constraint const CHECKSUM_FAILED_ERROR = '2881c032-660f-46b6-8153-d352d9706640'; const TYPE_NOT_RECOGNIZED_ERROR = 'fa54a457-f042-441f-89c4-066ee5bdd3e1'; - protected static $errorNames = array( + protected static $errorNames = [ self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', self::TYPE_NOT_RECOGNIZED_ERROR => 'TYPE_NOT_RECOGNIZED_ERROR', - ); + ]; public $isbn10Message = 'This value is not a valid ISBN-10.'; public $isbn13Message = 'This value is not a valid ISBN-13.'; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Issn.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Issn.php index a2fecdd3..88d181fa 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Issn.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Issn.php @@ -29,14 +29,14 @@ class Issn extends Constraint const INVALID_CASE_ERROR = '7b6dd393-7523-4a6c-b84d-72b91bba5e1a'; const CHECKSUM_FAILED_ERROR = 'b0f92dbc-667c-48de-b526-ad9586d43e85'; - protected static $errorNames = array( + protected static $errorNames = [ self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', self::MISSING_HYPHEN_ERROR => 'MISSING_HYPHEN_ERROR', self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', self::INVALID_CASE_ERROR => 'INVALID_CASE_ERROR', self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', - ); + ]; public $message = 'This value is not a valid ISSN.'; public $caseSensitive = false; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Language.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Language.php index 0e676b7a..745eb205 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Language.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Language.php @@ -23,9 +23,9 @@ class Language extends Constraint { const NO_SUCH_LANGUAGE_ERROR = 'ee65fec4-9a20-4202-9f39-ca558cd7bdf7'; - protected static $errorNames = array( + protected static $errorNames = [ self::NO_SUCH_LANGUAGE_ERROR => 'NO_SUCH_LANGUAGE_ERROR', - ); + ]; public $message = 'This value is not a valid language.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Length.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Length.php index 20a17fab..79aa4732 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Length.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Length.php @@ -26,11 +26,11 @@ class Length extends Constraint const TOO_LONG_ERROR = 'd94b19cc-114f-4f44-9cc4-4138e80a87b9'; const INVALID_CHARACTERS_ERROR = '35e6a710-aa2e-4719-b58e-24b35749b767'; - protected static $errorNames = array( + protected static $errorNames = [ self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', - ); + ]; public $maxMessage = 'This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.'; public $minMessage = 'This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.'; @@ -43,16 +43,16 @@ class Length extends Constraint public function __construct($options = null) { if (null !== $options && !\is_array($options)) { - $options = array( + $options = [ 'min' => $options, 'max' => $options, - ); + ]; } parent::__construct($options); if (null === $this->min && null === $this->max) { - throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), array('min', 'max')); + throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), ['min', 'max']); } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThan.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThan.php index 1bbb5087..8ea07ace 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThan.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThan.php @@ -22,9 +22,9 @@ class LessThan extends AbstractComparison { const TOO_HIGH_ERROR = '079d7420-2d13-460c-8756-de810eeb37d2'; - protected static $errorNames = array( + protected static $errorNames = [ self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', - ); + ]; public $message = 'This value should be less than {{ compared_value }}.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThanOrEqual.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThanOrEqual.php index d1189423..806ca499 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThanOrEqual.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThanOrEqual.php @@ -20,11 +20,11 @@ namespace Symfony\Component\Validator\Constraints; */ class LessThanOrEqual extends AbstractComparison { - const TOO_HIGH_ERROR = '079d7420-2d13-460c-8756-de810eeb37d2'; + const TOO_HIGH_ERROR = '30fbb013-d015-4232-8b3b-8f3be97a7e14'; - protected static $errorNames = array( + protected static $errorNames = [ self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', - ); + ]; public $message = 'This value should be less than or equal to {{ compared_value }}.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Locale.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Locale.php index 5aa70704..759f99e1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Locale.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Locale.php @@ -23,9 +23,9 @@ class Locale extends Constraint { const NO_SUCH_LOCALE_ERROR = 'a0af4293-1f1a-4a1c-a328-979cba6182a2'; - protected static $errorNames = array( + protected static $errorNames = [ self::NO_SUCH_LOCALE_ERROR => 'NO_SUCH_LOCALE_ERROR', - ); + ]; public $message = 'This value is not a valid locale.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Luhn.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Luhn.php index 67f152d2..85eebc79 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Luhn.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Luhn.php @@ -28,10 +28,10 @@ class Luhn extends Constraint const INVALID_CHARACTERS_ERROR = 'dfad6d23-1b74-4374-929b-5cbb56fc0d9e'; const CHECKSUM_FAILED_ERROR = '4d760774-3f50-4cd5-a6d5-b10a3299d8d3'; - protected static $errorNames = array( + protected static $errorNames = [ self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', - ); + ]; public $message = 'Invalid card number.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotBlank.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotBlank.php index e059f102..7616c426 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotBlank.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotBlank.php @@ -23,9 +23,9 @@ class NotBlank extends Constraint { const IS_BLANK_ERROR = 'c1051bb4-d103-4f74-8988-acbcafc7fdc3'; - protected static $errorNames = array( + protected static $errorNames = [ self::IS_BLANK_ERROR => 'IS_BLANK_ERROR', - ); + ]; public $message = 'This value should not be blank.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotEqualTo.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotEqualTo.php index 8c5abdda..a04f3a9b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotEqualTo.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotEqualTo.php @@ -22,9 +22,9 @@ class NotEqualTo extends AbstractComparison { const IS_EQUAL_ERROR = 'aa2e33da-25c8-4d76-8c6c-812f02ea89dd'; - protected static $errorNames = array( + protected static $errorNames = [ self::IS_EQUAL_ERROR => 'IS_EQUAL_ERROR', - ); + ]; public $message = 'This value should not be equal to {{ compared_value }}.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotIdenticalTo.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotIdenticalTo.php index 4c9c63ea..972e4a10 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotIdenticalTo.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotIdenticalTo.php @@ -22,9 +22,9 @@ class NotIdenticalTo extends AbstractComparison { const IS_IDENTICAL_ERROR = '4aaac518-0dda-4129-a6d9-e216b9b454a0'; - protected static $errorNames = array( + protected static $errorNames = [ self::IS_IDENTICAL_ERROR => 'IS_IDENTICAL_ERROR', - ); + ]; public $message = 'This value should not be identical to {{ compared_value_type }} {{ compared_value }}.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotNull.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotNull.php index 1cfc1c80..a392104d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotNull.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotNull.php @@ -23,9 +23,9 @@ class NotNull extends Constraint { const IS_NULL_ERROR = 'ad32d13f-c3d4-423b-909a-857b961eb720'; - protected static $errorNames = array( + protected static $errorNames = [ self::IS_NULL_ERROR => 'IS_NULL_ERROR', - ); + ]; public $message = 'This value should not be null.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Range.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Range.php index dcaf9db9..65ece5d8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Range.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Range.php @@ -26,11 +26,11 @@ class Range extends Constraint const TOO_HIGH_ERROR = '2d28afcb-e32e-45fb-a815-01c431a86a69'; const TOO_LOW_ERROR = '76454e69-502c-46c5-9643-f447d837c4d5'; - protected static $errorNames = array( + protected static $errorNames = [ self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', - ); + ]; public $minMessage = 'This value should be {{ limit }} or more.'; public $maxMessage = 'This value should be {{ limit }} or less.'; @@ -43,7 +43,7 @@ class Range extends Constraint parent::__construct($options); if (null === $this->min && null === $this->max) { - throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), array('min', 'max')); + throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), ['min', 'max']); } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Regex.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Regex.php index cb122102..dc9e5ea8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Regex.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Regex.php @@ -23,9 +23,9 @@ class Regex extends Constraint { const REGEX_FAILED_ERROR = 'de1e3db3-5ed4-4941-aae4-59f3667cc3a3'; - protected static $errorNames = array( + protected static $errorNames = [ self::REGEX_FAILED_ERROR => 'REGEX_FAILED_ERROR', - ); + ]; public $message = 'This value is not valid.'; public $pattern; @@ -45,7 +45,7 @@ class Regex extends Constraint */ public function getRequiredOptions() { - return array('pattern'); + return ['pattern']; } /** @@ -79,7 +79,7 @@ class Regex extends Constraint // Unescape the delimiter $pattern = str_replace('\\'.$delimiter, $delimiter, substr($this->pattern, 1, -1)); - // If the pattern is inverted, we can simply wrap it in + // If the pattern is inverted, we can wrap it in // ((?!pattern).)* if (!$this->match) { return '((?!'.$pattern.').)*'; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Time.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Time.php index 6bd8dbda..d1a3397b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Time.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Time.php @@ -24,10 +24,10 @@ class Time extends Constraint const INVALID_FORMAT_ERROR = '9d27b2bb-f755-4fbf-b725-39b1edbdebdf'; const INVALID_TIME_ERROR = '8532f9e1-84b2-4d67-8989-0818bc38533b'; - protected static $errorNames = array( + protected static $errorNames = [ self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', self::INVALID_TIME_ERROR => 'INVALID_TIME_ERROR', - ); + ]; public $message = 'This value is not a valid time.'; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Traverse.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Traverse.php index 4572c9b2..78d115fd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Traverse.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Traverse.php @@ -25,7 +25,7 @@ class Traverse extends Constraint public function __construct($options = null) { - if (\is_array($options) && array_key_exists('groups', $options)) { + if (\is_array($options) && \array_key_exists('groups', $options)) { throw new ConstraintDefinitionException(sprintf('The option "groups" is not supported by the constraint %s', __CLASS__)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Type.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Type.php index e40b4782..ac798bcd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Type.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Type.php @@ -23,9 +23,9 @@ class Type extends Constraint { const INVALID_TYPE_ERROR = 'ba785a8c-82cb-4283-967c-3cf342181b40'; - protected static $errorNames = array( + protected static $errorNames = [ self::INVALID_TYPE_ERROR => 'INVALID_TYPE_ERROR', - ); + ]; public $message = 'This value should be of type {{ type }}.'; public $type; @@ -43,6 +43,6 @@ class Type extends Constraint */ public function getRequiredOptions() { - return array('type'); + return ['type']; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Url.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Url.php index 988dd191..1a8d18ef 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Url.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Url.php @@ -37,12 +37,12 @@ class Url extends Constraint const INVALID_URL_ERROR = '57c2f299-1154-4870-89bb-ef3b1f5ad229'; - protected static $errorNames = array( + protected static $errorNames = [ self::INVALID_URL_ERROR => 'INVALID_URL_ERROR', - ); + ]; public $message = 'This value is not a valid URL.'; public $dnsMessage = 'The host could not be resolved.'; - public $protocols = array('http', 'https'); + public $protocols = ['http', 'https']; public $checkDNS = self::CHECK_DNS_TYPE_NONE; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/UrlValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/UrlValidator.php index 3ccf4ba7..bdaef756 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/UrlValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/UrlValidator.php @@ -79,7 +79,7 @@ class UrlValidator extends ConstraintValidator @trigger_error(sprintf('Use of the boolean TRUE for the "checkDNS" option in %s is deprecated. Use Url::CHECK_DNS_TYPE_ANY instead.', Url::class), E_USER_DEPRECATED); } - if (!\in_array($constraint->checkDNS, array( + if (!\in_array($constraint->checkDNS, [ Url::CHECK_DNS_TYPE_ANY, Url::CHECK_DNS_TYPE_A, Url::CHECK_DNS_TYPE_A6, @@ -92,8 +92,8 @@ class UrlValidator extends ConstraintValidator Url::CHECK_DNS_TYPE_SOA, Url::CHECK_DNS_TYPE_SRV, Url::CHECK_DNS_TYPE_TXT, - ), true)) { - throw new InvalidOptionsException(sprintf('Invalid value for option "checkDNS" in constraint %s', \get_class($constraint)), array('checkDNS')); + ], true)) { + throw new InvalidOptionsException(sprintf('Invalid value for option "checkDNS" in constraint %s', \get_class($constraint)), ['checkDNS']); } $host = parse_url($value, PHP_URL_HOST); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Uuid.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Uuid.php index 2deecbad..988f3c3b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Uuid.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Uuid.php @@ -28,14 +28,14 @@ class Uuid extends Constraint const INVALID_VERSION_ERROR = '21ba13b4-b185-4882-ac6f-d147355987eb'; const INVALID_VARIANT_ERROR = '164ef693-2b9d-46de-ad7f-836201f0c2db'; - protected static $errorNames = array( + protected static $errorNames = [ self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', self::INVALID_HYPHEN_PLACEMENT_ERROR => 'INVALID_HYPHEN_PLACEMENT_ERROR', self::INVALID_VERSION_ERROR => 'INVALID_VERSION_ERROR', self::INVALID_VARIANT_ERROR => 'INVALID_VARIANT_ERROR', - ); + ]; // Possible versions defined by RFC 4122 const V1_MAC = 1; @@ -67,11 +67,11 @@ class Uuid extends Constraint * * @var int[] */ - public $versions = array( + public $versions = [ self::V1_MAC, self::V2_DCE, self::V3_MD5, self::V4_RANDOM, self::V5_SHA1, - ); + ]; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ValidValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ValidValidator.php index be5fbc12..cc10ec52 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ValidValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ValidValidator.php @@ -33,6 +33,6 @@ class ValidValidator extends ConstraintValidator $this->context ->getValidator() ->inContext($this->context) - ->validate($value, null, array($this->context->getGroup())); + ->validate($value, null, [$this->context->getGroup()]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ContainerConstraintValidatorFactory.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ContainerConstraintValidatorFactory.php index 43c8a0d7..62e5530d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ContainerConstraintValidatorFactory.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ContainerConstraintValidatorFactory.php @@ -28,7 +28,7 @@ class ContainerConstraintValidatorFactory implements ConstraintValidatorFactoryI public function __construct(ContainerInterface $container) { $this->container = $container; - $this->validators = array(); + $this->validators = []; } /** @@ -46,7 +46,7 @@ class ContainerConstraintValidatorFactory implements ConstraintValidatorFactoryI $this->validators[$name] = $this->container->get($name); } else { if (!class_exists($name)) { - throw new ValidatorException(sprintf('Constraint validator "%s" does not exist or it is not enabled. Check the "validatedBy" method in your constraint class "%s".', $name, \get_class($constraint))); + throw new ValidatorException(sprintf('Constraint validator "%s" does not exist or is not enabled. Check the "validatedBy" method in your constraint class "%s".', $name, \get_class($constraint))); } $this->validators[$name] = new $name(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContext.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContext.php index 8118ac10..7ca9caa8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContext.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContext.php @@ -110,14 +110,14 @@ class ExecutionContext implements ExecutionContextInterface * * @var array */ - private $validatedObjects = array(); + private $validatedObjects = []; /** * Stores which class constraint has been validated for which object. * * @var array */ - private $validatedConstraints = array(); + private $validatedConstraints = []; /** * Stores which objects have been initialized. @@ -179,7 +179,7 @@ class ExecutionContext implements ExecutionContextInterface /** * {@inheritdoc} */ - public function addViolation($message, array $parameters = array()) + public function addViolation($message, array $parameters = []) { $this->violations->add(new ConstraintViolation( $this->translator->trans($message, $parameters, $this->translationDomain), @@ -197,7 +197,7 @@ class ExecutionContext implements ExecutionContextInterface /** * {@inheritdoc} */ - public function buildViolation($message, array $parameters = array()) + public function buildViolation($message, array $parameters = []) { return new ConstraintViolationBuilder( $this->violations, @@ -303,7 +303,7 @@ class ExecutionContext implements ExecutionContextInterface public function markGroupAsValidated($cacheKey, $groupHash) { if (!isset($this->validatedObjects[$cacheKey])) { - $this->validatedObjects[$cacheKey] = array(); + $this->validatedObjects[$cacheKey] = []; } $this->validatedObjects[$cacheKey][$groupHash] = true; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php index 544c82f6..2ab625b1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php @@ -67,7 +67,7 @@ interface ExecutionContextInterface * @param string $message The error message * @param array $params The parameters substituted in the error message */ - public function addViolation($message, array $params = array()); + public function addViolation($message, array $params = []); /** * Returns a builder for adding a violation with extended information. @@ -86,7 +86,7 @@ interface ExecutionContextInterface * * @return ConstraintViolationBuilderInterface The violation builder */ - public function buildViolation($message, array $parameters = array()); + public function buildViolation($message, array $parameters = []); /** * Returns the validator. @@ -97,7 +97,7 @@ interface ExecutionContextInterface * { * $validator = $this->context->getValidator(); * - * $violations = $validator->validate($value, new Length(array('min' => 3))); + * $violations = $validator->validate($value, new Length(['min' => 3])); * * if (count($violations) > 0) { * // ... @@ -112,7 +112,7 @@ interface ExecutionContextInterface * Returns the currently validated object. * * If the validator is currently validating a class constraint, the - * object of that class is returned. If it is a validating a property or + * object of that class is returned. If it is validating a property or * getter constraint, the object that the property/getter belongs to is * returned. * diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/DataCollector/ValidatorDataCollector.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/DataCollector/ValidatorDataCollector.php index f7165e5f..999a9968 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/DataCollector/ValidatorDataCollector.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/DataCollector/ValidatorDataCollector.php @@ -45,10 +45,10 @@ class ValidatorDataCollector extends DataCollector implements LateDataCollectorI public function reset() { - $this->data = array( - 'calls' => $this->cloneVar(array()), + $this->data = [ + 'calls' => $this->cloneVar([]), 'violations_count' => 0, - ); + ]; } /** @@ -89,9 +89,9 @@ class ValidatorDataCollector extends DataCollector implements LateDataCollectorI protected function getCasters() { - return parent::getCasters() + array( + return parent::getCasters() + [ \Exception::class => function (\Exception $e, array $a, Stub $s) { - foreach (array("\0Exception\0previous", "\0Exception\0trace") as $k) { + foreach (["\0Exception\0previous", "\0Exception\0trace"] as $k) { if (isset($a[$k])) { unset($a[$k]); ++$s->cut; @@ -101,12 +101,12 @@ class ValidatorDataCollector extends DataCollector implements LateDataCollectorI return $a; }, FormInterface::class => function (FormInterface $f, array $a) { - return array( + return [ Caster::PREFIX_VIRTUAL.'name' => $f->getName(), Caster::PREFIX_VIRTUAL.'type_class' => new ClassStub(\get_class($f->getConfig()->getType()->getInnerType())), Caster::PREFIX_VIRTUAL.'data' => $f->getData(), - ); + ]; }, - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/DependencyInjection/AddConstraintValidatorsPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/DependencyInjection/AddConstraintValidatorsPass.php index d6511889..90984234 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/DependencyInjection/AddConstraintValidatorsPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/DependencyInjection/AddConstraintValidatorsPass.php @@ -37,7 +37,7 @@ class AddConstraintValidatorsPass implements CompilerPassInterface return; } - $validators = array(); + $validators = []; foreach ($container->findTaggedServiceIds($this->constraintValidatorTag, true) as $id => $attributes) { $definition = $container->getDefinition($id); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/DependencyInjection/AddValidatorInitializersPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/DependencyInjection/AddValidatorInitializersPass.php index 330f578f..bbce7c97 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/DependencyInjection/AddValidatorInitializersPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/DependencyInjection/AddValidatorInitializersPass.php @@ -36,11 +36,11 @@ class AddValidatorInitializersPass implements CompilerPassInterface return; } - $initializers = array(); + $initializers = []; foreach ($container->findTaggedServiceIds($this->initializerTag, true) as $id => $attributes) { $initializers[] = new Reference($id); } - $container->getDefinition($this->builderService)->addMethodCall('addObjectInitializers', array($initializers)); + $container->getDefinition($this->builderService)->addMethodCall('addObjectInitializers', [$initializers]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadata.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadata.php index c4e5b11b..03b0ae6d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadata.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadata.php @@ -53,7 +53,7 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface * class' serialized representation. Do not access it. Use * {@link getPropertyMetadata()} instead. */ - public $members = array(); + public $members = []; /** * @var PropertyMetadata[] @@ -62,7 +62,7 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface * class' serialized representation. Do not access it. Use * {@link getPropertyMetadata()} instead. */ - public $properties = array(); + public $properties = []; /** * @var GetterMetadata[] @@ -71,7 +71,7 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface * class' serialized representation. Do not access it. Use * {@link getPropertyMetadata()} instead. */ - public $getters = array(); + public $getters = []; /** * @var array @@ -80,7 +80,7 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface * class' serialized representation. Do not access it. Use * {@link getGroupSequence()} instead. */ - public $groupSequence = array(); + public $groupSequence = []; /** * @var bool @@ -135,7 +135,7 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface // Don't store the cascading strategy. Classes never cascade. unset($parentProperties[array_search('cascadingStrategy', $parentProperties)]); - return array_merge($parentProperties, array( + return array_merge($parentProperties, [ 'getters', 'groupSequence', 'groupSequenceProvider', @@ -143,7 +143,7 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface 'name', 'properties', 'defaultGroup', - )); + ]); } /** @@ -371,7 +371,7 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface */ public function hasPropertyMetadata($property) { - return array_key_exists($property, $this->members); + return \array_key_exists($property, $this->members); } /** @@ -380,7 +380,7 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface public function getPropertyMetadata($property) { if (!isset($this->members[$property])) { - return array(); + return []; } return $this->members[$property]; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadataInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadataInterface.php index e48e241a..1b6f07ac 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadataInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadataInterface.php @@ -86,8 +86,8 @@ interface ClassMetadataInterface extends MetadataInterface /** * Returns all metadata instances for the given named property. * - * If your implementation does not support properties, simply throw an - * exception in this method (for example a BadMethodCallException). + * If your implementation does not support properties, throw an exception + * in this method (for example a BadMethodCallException). * * @param string $property The property name * diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php index 9d5da256..cf0d08ac 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php @@ -46,7 +46,7 @@ class LazyLoadingMetadataFactory implements MetadataFactoryInterface * * @var ClassMetadata[] */ - protected $loadedClasses = array(); + protected $loadedClasses = []; /** * Creates a new metadata factory. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/GenericMetadata.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/GenericMetadata.php index a5364f9b..139d252f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/GenericMetadata.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/GenericMetadata.php @@ -32,7 +32,7 @@ class GenericMetadata implements MetadataInterface * class' serialized representation. Do not access it. Use * {@link getConstraints()} and {@link findConstraints()} instead. */ - public $constraints = array(); + public $constraints = []; /** * @var array @@ -41,7 +41,7 @@ class GenericMetadata implements MetadataInterface * class' serialized representation. Do not access it. Use * {@link findConstraints()} instead. */ - public $constraintsByGroup = array(); + public $constraintsByGroup = []; /** * The strategy for cascading objects. @@ -80,12 +80,12 @@ class GenericMetadata implements MetadataInterface */ public function __sleep() { - return array( + return [ 'constraints', 'constraintsByGroup', 'cascadingStrategy', 'traversalStrategy', - ); + ]; } /** @@ -95,8 +95,8 @@ class GenericMetadata implements MetadataInterface { $constraints = $this->constraints; - $this->constraints = array(); - $this->constraintsByGroup = array(); + $this->constraints = []; + $this->constraintsByGroup = []; foreach ($constraints as $constraint) { $this->addConstraint(clone $constraint); @@ -189,7 +189,7 @@ class GenericMetadata implements MetadataInterface { return isset($this->constraintsByGroup[$group]) ? $this->constraintsByGroup[$group] - : array(); + : []; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php index 9d92de34..ae2e1e04 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php @@ -32,7 +32,7 @@ abstract class AbstractLoader implements LoaderInterface */ const DEFAULT_NAMESPACE = '\\Symfony\\Component\\Validator\\Constraints\\'; - protected $namespaces = array(); + protected $namespaces = []; /** * Adds a namespace alias. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php index 571c7e7a..0882c393 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php @@ -41,7 +41,7 @@ abstract class FilesLoader extends LoaderChain */ protected function getFileLoaders($paths) { - $loaders = array(); + $loaders = []; foreach ($paths as $path) { $loaders[] = $this->getFileLoaderInstance($path); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php index 398d81e9..cec3ea6c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php @@ -72,7 +72,7 @@ class XmlFileLoader extends FileLoader */ protected function parseConstraints(\SimpleXMLElement $nodes) { - $constraints = array(); + $constraints = []; foreach ($nodes as $node) { if (\count($node) > 0) { @@ -83,7 +83,7 @@ class XmlFileLoader extends FileLoader } elseif (\count($node->option) > 0) { $options = $this->parseOptions($node->option); } else { - $options = array(); + $options = []; } } elseif (\strlen((string) $node) > 0) { $options = XmlUtils::phpize(trim($node)); @@ -106,7 +106,7 @@ class XmlFileLoader extends FileLoader */ protected function parseValues(\SimpleXMLElement $nodes) { - $values = array(); + $values = []; foreach ($nodes as $node) { if (\count($node) > 0) { @@ -115,7 +115,7 @@ class XmlFileLoader extends FileLoader } elseif (\count($node->constraint) > 0) { $value = $this->parseConstraints($node->constraint); } else { - $value = array(); + $value = []; } } else { $value = trim($node); @@ -140,7 +140,7 @@ class XmlFileLoader extends FileLoader */ protected function parseOptions(\SimpleXMLElement $nodes) { - $options = array(); + $options = []; foreach ($nodes as $node) { if (\count($node) > 0) { @@ -149,7 +149,7 @@ class XmlFileLoader extends FileLoader } elseif (\count($node->constraint) > 0) { $value = $this->parseConstraints($node->constraint); } else { - $value = array(); + $value = []; } } else { $value = XmlUtils::phpize($node); @@ -190,7 +190,7 @@ class XmlFileLoader extends FileLoader // state before it completes $xml = $this->parseFile($this->file); - $this->classes = array(); + $this->classes = []; foreach ($xml->namespace as $namespace) { $this->addNamespaceAlias((string) $namespace['prefix'], trim((string) $namespace)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/YamlFileLoader.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/YamlFileLoader.php index c1395bb2..0f616667 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/YamlFileLoader.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/YamlFileLoader.php @@ -80,7 +80,7 @@ class YamlFileLoader extends FileLoader */ protected function parseNodes(array $nodes) { - $values = array(); + $values = []; foreach ($nodes as $name => $childNodes) { if (is_numeric($name) && \is_array($childNodes) && 1 === \count($childNodes)) { @@ -131,7 +131,7 @@ class YamlFileLoader extends FileLoader // empty file if (null === $classes) { - return array(); + return []; } // not an array diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/MemberMetadata.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/MemberMetadata.php index 74a524b1..11bd54d3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/MemberMetadata.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/MemberMetadata.php @@ -52,7 +52,7 @@ abstract class MemberMetadata extends GenericMetadata implements PropertyMetadat /** * @var \ReflectionMethod[]|\ReflectionProperty[] */ - private $reflMember = array(); + private $reflMember = []; /** * @param string $class The name of the class this member is defined on @@ -85,11 +85,11 @@ abstract class MemberMetadata extends GenericMetadata implements PropertyMetadat */ public function __sleep() { - return array_merge(parent::__sleep(), array( + return array_merge(parent::__sleep(), [ 'class', 'name', 'property', - )); + ]); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf index 177bb003..731e64aa 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf @@ -222,6 +222,118 @@ Unsupported card type or invalid card number. Nie-ondersteunde tipe kaart of ongeldige kredietkaart nommer. + + This is not a valid International Bank Account Number (IBAN). + Hierdie is nie 'n geldige Internationale Bank Rekening Nommer (IBAN) nie. + + + This value is not a valid ISBN-10. + Hierdie waarde is nie 'n geldige ISBN-10 nie. + + + This value is not a valid ISBN-13. + Hierdie waarde is nie 'n geldige ISBN-13 nie. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Hierdie waarde is nie 'n geldige ISBN-10 of ISBN-13 nie. + + + This value is not a valid ISSN. + Hierdie waarde is nie 'n geldige ISSN nie. + + + This value is not a valid currency. + Hierdie waarde is nie 'n geldige geldeenheid nie. + + + This value should be equal to {{ compared_value }}. + Hierdie waarde moet gelyk aan {{ compared_value }} wees. + + + This value should be greater than {{ compared_value }}. + Hierdie waarde moet meer as {{ compared_value }} wees. + + + This value should be greater than or equal to {{ compared_value }}. + Hierdie waarde moet meer of gelyk aan {{ compared_value }} wees. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Hierdie waarde moet identies aan {{ compared_value_type }} {{ compared_value }} wees. + + + This value should be less than {{ compared_value }}. + Hierdie waarde moet minder as {{ compared_value }} wees. + + + This value should be less than or equal to {{ compared_value }}. + Hierdie waarde moet minder of gelyk aan {{ compared_value }} wees. + + + This value should not be equal to {{ compared_value }}. + Hierdie waarde moet nie dieselfde as {{ compared_value }} wees nie. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Hierdie waarde moet nie identies as {{ compared_value_type }} {{ compared_value }} wees nie. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Die beeld aspek is te groot ({{ ratio }}). Die maksimum toegelate aspek is {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Die beeld aspek is te klein ({{ ratio }}). Die minimum toegelate aspek is {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Die beeld is vierkantig ({{ width }}x{{ height }}px). Vierkantige beelde word nie toegelaat nie. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Die beeld is landskap georiënteerd ({{ width }}x{{ height }}px). Landskap georiënteerde beelde word nie toegelaat nie. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Die beeld dis portret georiënteerd ({{ width }}x{{ height }}px). Portret georiënteerde beelde word nie toegelaat nie. + + + An empty file is not allowed. + 'n Leë lêer word nie toegelaat nie. + + + The host could not be resolved. + Die gasheer kon nie opgelos word nie. + + + This value does not match the expected {{ charset }} charset. + Die waarde stem nie ooreen met die verwagte {{ charset }} karakterstel nie. + + + This is not a valid Business Identifier Code (BIC). + Hierdie is nie 'n geldige Besigheids Identifikasie Kode (BIC) nie. + + + Error + Fout + + + This is not a valid UUID. + Hierdie is nie 'n geldige UUID nie. + + + This value should be a multiple of {{ compared_value }}. + Hierdie waarde moet 'n veelvoud van {{ compared_value }} wees. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Hierdie Besigheids Identifikasie Kode (BIK) is nie geassosieer met IBAN {{ iban }} nie. + + + This value should be valid JSON. + Hierdie waarde moet geldige JSON wees. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf index 4950e0cc..eacd8d77 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf @@ -310,6 +310,26 @@ This value does not match the expected {{ charset }} charset. هذه القيمة غير متطابقة مع صيغة التحويل {{ charset }}. + + This is not a valid Business Identifier Code (BIC). + هذه القيمة ليست رمز معرّف نشاط تجاري صالح (BIC). + + + Error + خطأ + + + This is not a valid UUID. + هذا ليس UUID صالح. + + + This value should be a multiple of {{ compared_value }}. + هذه القيمة يجب أن تكون مضاعف ل {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + رمز المعرّف نشاط تجاري (BIC) هذا لا يرتبط مع IBAN {{ iban }}. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf index dc6f95ff..bd09da5d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf @@ -318,6 +318,22 @@ Error Грешка + + This is not a valid UUID. + Това не е валиден UUID. + + + This value should be a multiple of {{ compared_value }}. + Тази стойност трябва да бъде кратно число на {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Този бизнес идентификационен код (BIC) не е свързана с IBAN {{ iban }}. + + + This value should be valid JSON. + Тази стойност трябва да е валидна JSON. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf index 078a25d0..d6ae6e91 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf @@ -301,11 +301,35 @@ An empty file is not allowed. No està permès un fixter buit. + + + The host could not be resolved. + No s'ha pogut resoldre l'amfitrió. + + + This value does not match the expected {{ charset }} charset. + Aquest valor no coincideix amb l'esperat {{ charset }} joc de caràcters. + + + This is not a valid Business Identifier Code (BIC). + Aquest no és un codi d'identificació bancari (BIC) vàlid. + + + Error + Error This is not a valid UUID. Aquest valor no és un UUID vàlid. + + This value should be a multiple of {{ compared_value }}. + Aquest valor ha de ser múltiple de {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Aquest Codi d'identificació bancari (BIC) no està associat amb l'IBAN {{ iban }}. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf index da7cb9aa..752b6c2a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf @@ -222,6 +222,114 @@ Unsupported card type or invalid card number. Unai ni dderbynir y math yna o gerdyn, neu nid yw rhif y cerdyn yn ddilys. + + This is not a valid International Bank Account Number (IBAN). + Nid yw hwn yn Rhif Cyfrif Banc Rhyngwladol (IBAN) dilys. + + + This value is not a valid ISBN-10. + Nid yw'r gwerth hwn yn ISBN-10 dilys. + + + This value is not a valid ISBN-13. + Nid yw'r gwerth hwn yn ISBN-13 dilys. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Nid yw'r gwerth hwn yn Rhif ISBN-10 dilys nac yn ISBN-13 dilys. + + + This value is not a valid ISSN. + Nid yw'r gwerth hwn yn ISSN dilys. + + + This value is not a valid currency. + Nid yw'r gwerth hwn yn arian dilys. + + + This value should be equal to {{ compared_value }}. + Dylai'r gwerth hwn fod yn gyfartal â {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Dylai'r gwerth hwn fod yn fwy na {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Dylai'r gwerth hwn fod yn fwy na neu'n hafal i {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Dylai'r gwerth hwn fod yn union yr un fath â {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Dylai'r gwerth hwn fod yn llai na {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Dylai'r gwerth hwn fod yn llai na neu'n hafal i {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Ni ddylai'r gwerth hwn fod yn hafal i {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Ni ddylai'r gwerth hwn fod yn union yr un fath â {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Mae'r gymhareb delwedd yn rhy fawr ({{ ratio }}). Y gymhareb uchaf a ganiateir yw {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Mae'r gymhareb delwedd yn rhy fach ({{ ratio }}). Y gymhareb isaf a ddisgwylir yw {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Mae'r ddelwedd yn sgwâr ({{ width }}x{{ height }}px). Ni chaniateir delweddau sgwâr. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Mae'r ddelwedd mewn fformat tirlun ({{ width }}x{{ height }}px). Ni chaniateir delweddau mewn fformat tirlun. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Mae'r ddelwedd mewn fformat portread ({{ width }}x{{ height }}px). Ni chaniateir delweddau mewn fformat portread. + + + An empty file is not allowed. + Ni chaniateir ffeil wag. + + + The host could not be resolved. + Ni fu modd datrys y gwesteiwr. + + + This value does not match the expected {{ charset }} charset. + Nid yw'r gwerth hwn yn cyfateb â'r {{ charset }} set nodau ddisgwyliedig. + + + This is not a valid Business Identifier Code (BIC). + Nid yw hwn yn God Adnabod Busnes (BIC) dilys. + + + Error + Gwall + + + This is not a valid UUID. + Nid yw hyn yn UUID dilys. + + + This value should be a multiple of {{ compared_value }}. + Dylai'r gwerth hwn fod yn luosrif o {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Nid yw'r Cod Adnabod Busnes (BIC) hwn yn gysylltiedig ag IBAN {{ iban }}. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf index 3e44e1e2..aab53e72 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf @@ -322,6 +322,14 @@ This is not a valid UUID. Dies ist keine gültige UUID. + + This value should be a multiple of {{ compared_value }}. + Dieser Wert sollte ein Vielfaches von {{ compared_value }} sein. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Diese internationale Bankleitzahl (BIC) ist nicht mit der IBAN {{ iban }} assoziiert. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf index a3199bcc..3b9bbef6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf @@ -278,6 +278,58 @@ This value should not be identical to {{ compared_value_type }} {{ compared_value }}. Αυτή η τιμή δεν πρέπει να είναι πανομοιότυπη με {{ compared_value_type }} {{ compared_value }}. + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Η αναλογία πλάτους-ύψους της εικόνας είναι πολύ μεγάλη ({{ ratio }}). Μέγιστη επιτρεπτή αναλογία {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Η αναλογία πλάτους-ύψους της εικόνας είναι πολύ μικρή ({{ ratio }}). Ελάχιστη επιτρεπτή αναλογία {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Η εικόνα είναι τετράγωνη ({{ width }}x{{ height }}px). Δεν επιτρέπονται τετράγωνες εικόνες. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Η εικόνα έχει οριζόντιο προσανατολισμό ({{ width }}x{{ height }}px). Δεν επιτρέπονται εικόνες με οριζόντιο προσανατολισμό. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Η εικόνα έχει κάθετο προσανατολισμό ({{ width }}x{{ height }}px). Δεν επιτρέπονται εικόνες με κάθετο προσανατολισμό. + + + An empty file is not allowed. + Δεν επιτρέπεται κενό αρχείο. + + + The host could not be resolved. + Η διεύθυνση δεν μπόρεσε να επιλυθεί. + + + This value does not match the expected {{ charset }} charset. + Αυτή η τιμή δεν ταιριάζει στο αναμενόμενο {{ charset }} σύνολο χαρακτήρων. + + + This is not a valid Business Identifier Code (BIC). + Αυτός δεν έιναι ένας έγκυρος κωδικός BIC. + + + Error + Σφάλμα + + + This is not a valid UUID. + Αυτό δεν είναι ένα έγκυρο UUID. + + + This value should be a multiple of {{ compared_value }}. + Αυτή η τιμή θα έπρεπε να είναι πολλαπλάσιο του {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Αυτός ο κωδικός BIC δεν σχετίζεται με το IBAN {{ iban }}. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf index 4bb2760b..465ad220 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf @@ -326,6 +326,14 @@ This value should be a multiple of {{ compared_value }}. This value should be a multiple of {{ compared_value }}. + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + + + This value should be valid JSON. + This value should be valid JSON. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf index 25d5b8a5..69ab34e8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf @@ -322,6 +322,14 @@ This is not a valid UUID. Este valor no es un UUID válido. + + This value should be a multiple of {{ compared_value }}. + Este valor debería ser múltiplo de {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Este Código de Identificación Bancaria (BIC) no está asociado con el IBAN {{ iban }}. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf index d311dedb..ee9529e3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf @@ -278,6 +278,42 @@ This value should not be identical to {{ compared_value_type }} {{ compared_value }}. Balio hau ez litzateke {{ compared_value_type }} {{ compared_value }}-(r)en berbera izan behar. + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Irudiaren proportzioa oso handia da ({{ ratio }}). Onartutako proportzio handienda {{ max_ratio }} da. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Irudiaren proportzioa oso txikia da ({{ ratio }}). Onartutako proportzio txikiena {{ min_ratio }} da. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Irudia karratua da ({{ width }}x{{ height }}px). Karratuak diren irudiak ez dira onartzen. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Irudia horizontalki bideratua dago ({{ width }}x{{ height }}px). Horizontalki bideratutako irudiak ez dira onartzen. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Irudia bertikalki bideratua dago ({{ width }}x{{ height }}px). Bertikalki bideratutako irudiak ez dira onartzen. + + + An empty file is not allowed. + Hutsik dagoen fitxategia ez da onartzen. + + + The host could not be resolved. + Host-a ezin da ebatzi. + + + This value does not match the expected {{ charset }} charset. + Balio honen karaktere kodea ez da esperotakoa {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Ez da balizko Banku Identifikazioko Kodea (BIC). + Error Errore @@ -286,6 +322,14 @@ This is not a valid UUID. Balio hau ez da onartutako UUID bat. + + This value should be a multiple of {{ compared_value }}. + Balio honek {{ compared_value }}-ren multiploa izan beharko luke. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Banku Identifikazioko Kode hau ez dago lotuta {{ IBAN }} IBAN-rekin. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf index 98b4bd66..ff1aa7c0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf @@ -278,6 +278,58 @@ This value should not be identical to {{ compared_value_type }} {{ compared_value }}. این مقدار نباید {{ compared_value_type }} {{ compared_value }} یکی باشد. + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + ابعاد {{ ratio }} عکس بیش از حد بزرگ است.حداکثر ابعاد مجاز {{ max_ratio }} است. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + ابعاد {{ ratio }} عکس بیش از حد کوچک است.حداقل ابعاد مجاز {{ min_ratio }} است. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + این عکس مربع width }}x{{ height }}px}} می باشد.عکس مربع مجاز نمی باشد. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + این عکس افقی width }}x{{ height }}px}} می باشد.عکس افقی مجاز نمی باشد. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + این عکس عمودی width }}x{{ height }}px}} می باشد.عکس عمودی مجاز نمی باشد. + + + An empty file is not allowed. + فایل خالی مجاز نمی باشد. + + + The host could not be resolved. + هاست قابل حل نیست. + + + This value does not match the expected {{ charset }} charset. + این مقدار مورد نظر نمی باشد. مقدار مورد نظر {{ charset }} می باشد. + + + This is not a valid Business Identifier Code (BIC). + این مقدار یک BIC درست نیست. + + + Error + خطا + + + This is not a valid UUID. + این مقدار یک UUID درست نیست. + + + This value should be a multiple of {{ compared_value }}. + این مقدار باید چند برابر {{ compared_value }} باشد. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + این BIC با IBAN ارتباط ندارد. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf index 382acb97..7b1799d5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf @@ -322,6 +322,18 @@ This is not a valid UUID. Ceci n'est pas un UUID valide. + + This value should be a multiple of {{ compared_value }}. + Cette valeur doit être un multiple de {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Ce code d'identification d'entreprise (BIC) n'est pas associé à l'IBAN {{ iban }}. + + + This value should be valid JSON. + Cette valeur doit être un JSON valide. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf index ecb7155c..71df1d24 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf @@ -314,6 +314,22 @@ This is not a valid Business Identifier Code (BIC). Non é un Código de Identificación Bancaria (BIC) válido. + + Error + Erro + + + This is not a valid UUID. + Isto non é un UUID válido. + + + This value should be a multiple of {{ compared_value }}. + Este valor debería ser multiplo de {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Este Código de identificación bancaria (BIC) non está asociado co IBAN {{ iban }}. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf index 126ef903..ab033a11 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf @@ -318,6 +318,22 @@ Error Greška + + This is not a valid UUID. + Ovo nije validan UUID. + + + This value should be a multiple of {{ compared_value }}. + Ova vrijednost treba biti višekratnik od {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Poslovni identifikacijski broj (BIC) nije povezan sa IBAN brojem {{ iban }}. + + + This value should be valid JSON. + Ova vrijednost treba biti validan JSON. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf index 1011d548..30c3cc39 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf @@ -322,6 +322,14 @@ This is not a valid UUID. Érvénytelen egyedi azonosító (UUID). + + This value should be a multiple of {{ compared_value }}. + Ennek az értéknek oszthatónak kell lennie a következővel: {{ compared_value }} + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Ez a Bankazonosító kód (BIC) nem kapcsolódik az IBAN kódhoz ({{ iban }}). + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf index 535bdac0..bf4b85de 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf @@ -318,6 +318,18 @@ Error Galat + + This is not a valid UUID. + Ini bukan UUID yang sah. + + + This value should be a multiple of {{ compared_value }}. + Nilai ini harus kelipatan dari {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Business Identifier Code (BIC) ini tidak terkait dengan IBAN {{ iban }}. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf index f1954470..235d44d1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf @@ -322,6 +322,14 @@ This is not a valid UUID. Questo non è un UUID valido. + + This value should be a multiple of {{ compared_value }}. + Questo valore dovrebbe essere un multiplo di {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Questo codice identificativo bancario (BIC) non è associato all'IBAN {{ iban }}. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf index 0c61d157..207d4ba7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf @@ -326,6 +326,10 @@ This value should be a multiple of {{ compared_value }}. {{ compared_value }}の倍数でなければなりません。 + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + このSWIFTコードはIBANコード({{ iban }})に関連付けられていません。 + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf index bdbc9da0..4c3579fb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf @@ -322,6 +322,18 @@ This is not a valid UUID. Dëst ass keng gëlteg UUID. + + This value should be a multiple of {{ compared_value }}. + Dëse Wäert sollt e puer vun {{ compared_value }} sinn. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Dëse "Business Identifier Code" (BIC) ass net mat IBAN verbonnen {{ iban }}. + + + This value should be valid JSON. + Dëse Wäert sollt gëlteg JSON. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf index 60641b5e..02eece59 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf @@ -302,10 +302,38 @@ An empty file is not allowed. Failas negali būti tuščias. + + The host could not be resolved. + Serveris nepasiekiamas. + + + This value does not match the expected {{ charset }} charset. + Ši reikšmė neatitinka {{ charset }} koduotės. + + + This is not a valid Business Identifier Code (BIC). + Bendrovės Identifikavimo Kodas (BIC) nėra tinkamas. + Error Klaida + + This is not a valid UUID. + Ši reikšmė nėra tinkamas UUID. + + + This value should be a multiple of {{ compared_value }}. + Ši reikšmė turi būti skaičiaus {{ compared_value }} kartotinis. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Šis bendrovės identifikavimo kodas (BIC) nesusijęs su IBAN {{ iban }}. + + + This value should be valid JSON. + Ši reikšmė turi būti tinkamo JSON formato. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf index 2ad19cd2..4c0e1925 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf @@ -310,6 +310,30 @@ This value does not match the expected {{ charset }} charset. Šī vērtība neatbilst sagaidāmajai rakstzīmju kopai {{ charset }}. + + This is not a valid Business Identifier Code (BIC). + Šī vērtība nav derīgs Biznesa Identifikācijas Kods (BIC). + + + Error + Kļūda + + + This is not a valid UUID. + Šis nav derīgs UUID. + + + This value should be a multiple of {{ compared_value }}. + Šai vērtībai jābūt vairākas reizes atkārtotai {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Šis Biznesa Identifikācijas Kods (BIC) neatbilst {{ iban }} konta numuram (IBAN). + + + This value should be valid JSON. + Šai vērtībai jābūt derīgam JSON. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nb.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nb.xlf index 25057653..db534528 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nb.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nb.xlf @@ -314,6 +314,26 @@ This is not a valid Business Identifier Code (BIC). Dette er ikke en gyldig BIC. + + Error + Feil + + + This is not a valid UUID. + Dette er ikke en gyldig UUID. + + + This value should be a multiple of {{ compared_value }}. + Verdien skal være flertall av {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Business Identifier Code (BIC) er ikke tilknyttet en IBAN {{ iban }}. + + + This value should be valid JSON. + Verdien er ikke gyldig JSON. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf index bee0ab3b..52815e8e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf @@ -302,6 +302,10 @@ An empty file is not allowed. Lege bestanden zijn niet toegestaan. + + The host could not be resolved. + De hostnaam kon niet worden bepaald. + This value does not match the expected {{ charset }} charset. Deze waarde is niet in de verwachte tekencodering {{ charset }}. @@ -318,6 +322,14 @@ This is not a valid UUID. Dit is geen geldige UUID. + + This value should be a multiple of {{ compared_value }}. + Deze waarde zou een meervoud van {{ compared_value }} moeten zijn. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Deze bedrijfsidentificatiecode (BIC) is niet gekoppeld aan IBAN {{ iban }}. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf index 25057653..db534528 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf @@ -314,6 +314,26 @@ This is not a valid Business Identifier Code (BIC). Dette er ikke en gyldig BIC. + + Error + Feil + + + This is not a valid UUID. + Dette er ikke en gyldig UUID. + + + This value should be a multiple of {{ compared_value }}. + Verdien skal være flertall av {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Business Identifier Code (BIC) er ikke tilknyttet en IBAN {{ iban }}. + + + This value should be valid JSON. + Verdien er ikke gyldig JSON. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf index e7ad1eca..888e73b1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf @@ -326,6 +326,10 @@ This value should be a multiple of {{ compared_value }}. Ta wartość powinna być wielokrotnością {{ compared_value }}. + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Ten kod BIC (Business Identifier Code) nie jest powiązany z międzynarodowym numerem rachunku bankowego (IBAN) {{ iban }}. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf index 0561c048..e5cf6606 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf @@ -302,10 +302,34 @@ An empty file is not allowed. Ficheiro vazio não é permitido. + + The host could not be resolved. + O host não pode ser resolvido. + + + This value does not match the expected {{ charset }} charset. + O valor não corresponde ao conjunto de caracteres {{ charset }} esperado. + + + This is not a valid Business Identifier Code (BIC). + O Código de Identificação de Empresa (BIC) não é válido. + Error Erro + + This is not a valid UUID. + Este valor não é um UUID válido. + + + This value should be a multiple of {{ compared_value }}. + Este valor deve ser um múltiplo de {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + O Código de Identificação de Empresa (BIC) não está associado ao IBAN {{ iban }}. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf index b6170623..8616edf4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf @@ -314,6 +314,26 @@ This is not a valid Business Identifier Code (BIC). Este não é um Código Identificador Bancário (BIC) válido. + + Error + Erro + + + This is not a valid UUID. + Este não é um UUID válido. + + + This value should be a multiple of {{ compared_value }}. + Este valor deve ser múltiplo de {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Este Código Identificador Bancário (BIC) não está associado ao IBAN {{ iban }}. + + + This value should be valid JSON. + Este valor deve ser um JSON válido. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf index 11bfead5..b77e04e8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf @@ -310,10 +310,26 @@ This value does not match the expected {{ charset }} charset. Значение не совпадает с ожидаемой {{ charset }} кодировкой. + + This is not a valid Business Identifier Code (BIC). + Значение не соответствует формату BIC. + Error Ошибка + + This is not a valid UUID. + Значение не соответствует формату UUID. + + + This value should be a multiple of {{ compared_value }}. + Значение должно быть кратно {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Данный BIC не связан с IBAN {{ iban }}. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf index ffc8ccf2..569ebca4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf @@ -24,15 +24,15 @@ You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Duhet të zgjedhni së paku {{ limit }} alternativa.|Duhet të zgjedhni së paku {{ limit }} alternativa. + Duhet të zgjedhni së paku {{ limit }} alternativë.|Duhet të zgjedhni së paku {{ limit }} alternativa. You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Duhet të zgjedhni më së shumti {{ limit }} alternativa.|Duhet të zgjedhni më së shumti {{ limit }} alternativa. + Duhet të zgjedhni më së shumti {{ limit }} alternativë.|Duhet të zgjedhni më së shumti {{ limit }} alternativa. One or more of the given values is invalid. - Një apo më shumë nga vlerat e dhëna nuk janë të sakta. + Një apo më shumë nga vlerat e dhëna janë të pavlefshme. This field was not expected. @@ -40,7 +40,7 @@ This field is missing. - Kjo fushë është zhdukur. + Kjo fushë mungon. This value is not a valid date. @@ -52,7 +52,7 @@ This value is not a valid email address. - Kjo vlerë nuk është e-mail adresë e vlefshme. + Kjo vlerë nuk është adresë email-i e vlefshme. The file could not be found. @@ -64,11 +64,11 @@ The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - File është shumë i madh ({{ size }} {{ suffix }}). Madhësia më e madhe e lejuar është {{ limit }} {{ suffix }}. + File është shumë i madh ({{ size }} {{ suffix }}). Madhësia maksimale e lejuar është {{ limit }} {{ suffix }}. The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Lloji mime i files nuk është i vlefshëm ({{ type }}). Llojet mime të lejuara janë {{ types }}. + Lloji mime i file-it është i pavlefshëm ({{ type }}). Llojet mime të lejuara janë {{ types }}. This value should be {{ limit }} or less. @@ -76,7 +76,7 @@ This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Kjo vlerë është shumë e gjatë. Duhet t'i ketë {{ limit }} ose më pak karaktere.|Kjo vlerë është shumë e gjatë. Duhet t'i ketë {{ limit }} ose më pak karaktere. + Kjo vlerë është shumë e gjatë. Duhet të përmbaj {{ limit }} karakter ose më pak.|Kjo vlerë është shumë e gjatë. Duhet të përmbaj {{ limit }} karaktere ose më pak. This value should be {{ limit }} or more. @@ -84,7 +84,7 @@ This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Kjo vlerë është shumë e shkurtër. Duhet t'i ketë {{ limit }} ose më shumë karaktere.|Kjo vlerë është shumë e shkurtër. Duhet t'i ketë {{ limit }} ose më shumë karaktere. + Kjo vlerë është shumë e shkurtër. Duhet të përmbaj {{ limit }} karakter ose më shumë.|Kjo vlerë është shumë e shkurtër. Duhet të përmbaj {{ limit }} karaktere ose më shumë. This value should not be blank. @@ -136,7 +136,7 @@ This is not a valid IP address. - Kjo vlerë nuk është IP adresë e vlefshme. + Kjo adresë IP nuk është e vlefshme. This value is not a valid language. @@ -144,7 +144,7 @@ This value is not a valid locale. - Kjo vlerë nuk është përcaktim rajonal i vlefshëm. + Kjo vlerë nuk është nje locale i vlefshëm. This value is not a valid country. @@ -156,7 +156,7 @@ The size of the image could not be detected. - Madhësia e këtij imazhi nuk mund të zbulohet. + Madhësia e imazhit nuk mund të zbulohet. The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. @@ -180,7 +180,7 @@ This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Kjo vlerë duhet të ketë saktësisht {{ limit }} karaktere.|Kjo vlerë duhet të ketë saktësisht {{ limit }} karaktere. + Kjo vlerë duhet të ketë saktësisht {{ limit }} karakter.|Kjo vlerë duhet të ketë saktësisht {{ limit }} karaktere. The file was only partially uploaded. @@ -200,27 +200,135 @@ A PHP extension caused the upload to fail. - Një ekstenzion i PHP-së bëri të dështojë ngarkimi i files. + Një ekstension i PHP-së shkaktoi dështimin e ngarkimit. This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Ky kolekcion duhet të përmbajë {{ limit }} ose më shumë elemente.|Ky kolekcion duhet të përmbajë {{ limit }} ose më shumë elemente. + Ky koleksion duhet të përmbajë {{ limit }} element ose më shumë.|Ky koleksion duhet të përmbajë {{ limit }} elemente ose më shumë. This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Ky kolekcion duhet të përmbajë {{ limit }} ose më shumë elemente.|Ky kolekcion duhet të përmbajë {{ limit }} ose më shumë elemente. + Ky koleksion duhet të përmbajë {{ limit }} element ose më pak.|Ky koleksion duhet të përmbajë {{ limit }} elemente ose më pak. This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Ky kolekcion duhet të përmbajë saktësisht {{ limit }} elemente.|Ky kolekcion duhet të përmbajë saktësisht {{ limit }} elemente. + Ky koleksion duhet të përmbajë saktësisht {{ limit }} element.|Ky koleksion duhet të përmbajë saktësisht {{ limit }} elemente. Invalid card number. - Numër kartele i pavlefshëm. + Numër karte i pavlefshëm. Unsupported card type or invalid card number. - Lloj kartele i pambështetur ose numër kartele i pavlefshëm. + Lloj karte i papranuar ose numër karte i pavlefshëm. + + + This is not a valid International Bank Account Number (IBAN). + Ky nuk është një numër i vlefshëm ndërkombëtar i llogarisë bankare (IBAN). + + + This value is not a valid ISBN-10. + Kjo vlerë nuk është një ISBN-10 e vlefshme. + + + This value is not a valid ISBN-13. + Kjo vlerë nuk është një ISBN-13 e vlefshme. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Kjo vlerë nuk është as ISBN-10 e vlefshme as ISBN-13 e vlefshme. + + + This value is not a valid ISSN. + Kjo vlerë nuk është një ISSN e vlefshme. + + + This value is not a valid currency. + Kjo vlerë nuk është një monedhë e vlefshme. + + + This value should be equal to {{ compared_value }}. + Kjo vlerë duhet të jetë e barabartë me {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Kjo vlerë duhet të jetë më e madhe se {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Kjo vlerë duhet të jetë më e madhe ose e barabartë me {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Kjo vlerë duhet të jetë identike me {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Kjo vlerë duhet të jetë më vogël se {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Kjo vlerë duhet të jetë më e vogël ose e barabartë me {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Kjo vlerë nuk duhet të jetë e barabartë me {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Kjo vlerë nuk duhet të jetë identike me {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Raporti i imazhit është shumë i madh ({{ ratio }}). Raporti maksimal i lejuar është {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Raporti i imazhit është shumë i vogël ({{ ratio }}). Raporti minimal pritet të jetë {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Imazhi është katror ({{ width }}x{{ height }}px). Imazhet katrore nuk janë të lejuara. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Imazhi është i orientuar horizontalisht ({{ width }}x{{ height }}px). Imazhet e orientuara horizontalisht nuk lejohen. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Imazhi është i orientuar vertikalisht ({{ width }}x{{ height }}px). Imazhet orientuara vertikalisht nuk lejohen. + + + An empty file is not allowed. + Një file i zbrazët nuk lejohet. + + + The host could not be resolved. + Host-i nuk mund te zbulohej. + + + This value does not match the expected {{ charset }} charset. + Kjo vlerë nuk përputhet me kodifikimin e karaktereve {{ charset }} që pritej. + + + This is not a valid Business Identifier Code (BIC). + Ky nuk është një Kod Identifikues i Biznesit (BIC) i vleflshem. + + + Error + Gabim + + + This is not a valid UUID. + Ky nuk është një UUID i vlefshëm. + + + This value should be a multiple of {{ compared_value }}. + Kjo vlerë duhet të jetë një shumëfish i {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Ky Kod Identifikues i Biznesit (BIC) nuk është i lidhur me IBAN {{ iban }}. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf index 60c093ae..9ac1ad6b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf @@ -4,39 +4,39 @@ This value should be false. - Vrednost treba da bude netačna. + Vrednost bi trebalo da bude netačna. This value should be true. - Vrednost treba da bude tačna. + Vrednost bi trebalo da bude tačna. This value should be of type {{ type }}. - Vrednost treba da bude tipa {{ type }}. + Vrednost bi trebalo da bude tipa {{ type }}. This value should be blank. - Vrednost treba da bude prazna. + Vrednost bi trebalo da bude prazna. The value you selected is not a valid choice. - Vrednost treba da bude jedna od ponuđenih. + Odabrana vrednost nije validan izbor. You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Izaberite bar {{ limit }} mogućnost.|Izaberite bar {{ limit }} mogućnosti.|Izaberite bar {{ limit }} mogućnosti. + Morate odabrati bar {{ limit }} mogućnost.|Morate odabrati bar {{ limit }} mogućnosti. You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Izaberite najviše {{ limit }} mogućnost.|Izaberite najviše {{ limit }} mogućnosti.|Izaberite najviše {{ limit }} mogućnosti. + Morate odabrati najviše {{ limit }} mogućnost.|Morate odabrati najviše {{ limit }} mogućnosti. One or more of the given values is invalid. - Jedna ili više vrednosti je nevalidna. + Jedna ili više vrednosti nisu validne. This field was not expected. - Ovo polje ne očekuje. + Ovo polje nije bilo očekivano. This field is missing. @@ -48,7 +48,7 @@ This value is not a valid datetime. - Vrednost nije validan datum-vreme. + Vrednost nije validno vreme. This value is not a valid email address. @@ -68,39 +68,39 @@ The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Mime tip datoteke nije validan ({{ type }}). Dozvoljeni mime tipovi su {{ types }}. + MIME tip datoteke nije validan ({{ type }}). Dozvoljeni MIME tipovi su {{ types }}. This value should be {{ limit }} or less. - Vrednost treba da bude {{ limit }} ili manje. + Vrednost bi trebalo da bude {{ limit }} ili manje. This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Vrednost je predugačka. Treba da ima {{ limit }} karakter ili manje.|Vrednost je predugačka. Treba da ima {{ limit }} karaktera ili manje.|Vrednost je predugačka. Treba da ima {{ limit }} karaktera ili manje. + Vrednost je predugačka. Trebalo bi da ima {{ limit }} karakter ili manje.|Vrednost je predugačka. Trebalo bi da ima {{ limit }} karaktera ili manje. This value should be {{ limit }} or more. - Vrednost treba da bude {{ limit }} ili više. + Vrednost bi trebalo da bude {{ limit }} ili više. This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Vrednost je prekratka. Treba da ima {{ limit }} karakter ili više.|Vrednost je prekratka. Treba da ima {{ limit }} karaktera ili više.|Vrednost je prekratka. Treba da ima {{ limit }} karaktera ili više. + Vrednost je prekratka. Trebalo bi da ima {{ limit }} karakter ili više.|Vrednost je prekratka. Trebalo bi da ima {{ limit }} karaktera ili više. This value should not be blank. - Vrednost ne treba da bude prazna. + Vrednost ne bi trebalo da bude prazna. This value should not be null. - Vrednost ne treba da bude null. + Vrednost ne bi trebalo da bude prazna. This value should be null. - Vrednost treba da bude null. + Vrednost bi trebalo da bude prazna. This value is not valid. - Vrednost je nevalidna. + Vrednost nije validna. This value is not a valid time. @@ -112,7 +112,7 @@ The two values should be equal. - Obe vrednosti treba da budu jednake. + Obe vrednosti bi trebalo da budu jednake. The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. @@ -128,7 +128,7 @@ This value should be a valid number. - Vrednost treba da bude validan broj. + Vrednost bi trebalo da bude validan broj. This file is not a valid image. @@ -144,11 +144,11 @@ This value is not a valid locale. - Vrednost nije validan lokal. + Vrednost nije validna međunarodna oznaka jezika. This value is not a valid country. - Vrednost nije validna zemlja. + Vrednost nije validna država. This value is already used. @@ -160,27 +160,27 @@ The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Širina slike je prevelika ({{ width }}px). Najeća dozvoljena širina je {{ max_width }}px. + Širina slike je prevelika ({{ width }} piksela). Najveća dozvoljena širina je {{ max_width }} piksela. The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Širina slike je premala ({{ width }}px). Najmanja dozvoljena širina je {{ min_width }}px. + Širina slike je premala ({{ width }} piksela). Najmanja dozvoljena širina je {{ min_width }} piksela. The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Visina slike je prevelika ({{ height }}px). Najeća dozvoljena visina je {{ max_height }}px. + Visina slike je prevelika ({{ height }} piksela). Najveća dozvoljena visina je {{ max_height }} piksela. The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Visina slike je premala ({{ height }}px). Najmanja dozvoljena visina je {{ min_height }}px. + Visina slike je premala ({{ height }} piksela). Najmanja dozvoljena visina je {{ min_height }} piksela. This value should be the user's current password. - Vrednost treba da bude trenutna korisnička lozinka. + Vrednost bi trebalo da bude trenutna korisnička lozinka. This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Vrednost treba da ima tačno {{ limit }} karakter.|Vrednost treba da ima tačno {{ limit }} karaktera.|Vrednost treba da ima tačno {{ limit }} karaktera. + Vrednost bi trebalo da ima tačno {{ limit }} karakter.|Vrednost bi trebalo da ima tačno {{ limit }} karaktera. The file was only partially uploaded. @@ -204,23 +204,23 @@ This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Ova kolekcija treba da sadrži {{ limit }} ili više elemenata.|Ova kolekcija treba da sadrži {{ limit }} ili više elemenata.|Ova kolekcija treba da sadrži {{ limit }} ili više elemenata. + Ova kolekcija bi trebalo da sadrži {{ limit }} ili više elemenata.|Ova kolekcija bi trebalo da sadrži {{ limit }} ili više elemenata. This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Ova kolekcija treba da sadrži {{ limit }} ili manje elemenata.|Ova kolekcija treba da sadrži {{ limit }} ili manje elemenata.|Ova kolekcija treba da sadrži {{ limit }} ili manje elemenata. + Ova kolekcija bi trebalo da sadrži {{ limit }} ili manje elemenata.|Ova kolekcija bi trebalo da sadrži {{ limit }} ili manje elemenata. This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Ova kolekcija treba da sadrži tačno {{ limit }} element.|Ova kolekcija treba da sadrži tačno {{ limit }} elementa.|Ova kolekcija treba da sadrži tačno {{ limit }} elemenata. + Ova kolekcija bi trebalo da sadrži tačno {{ limit }} element.|Ova kolekcija bi trebalo da sadrži tačno {{ limit }} elemenata. Invalid card number. - Nevalidan broj kartice. + Broj kartice nije validan. Unsupported card type or invalid card number. - Nevalidan broj kartice ili tip kartice nije podržan. + Tip kartije nije podržan ili broj kartice nije validan. This is not a valid International Bank Account Number (IBAN). @@ -248,35 +248,35 @@ This value should be equal to {{ compared_value }}. - Ova vrednost treba da bude {{ compared_value }}. + Ova vrednost bi trebalo da bude jednaka {{ compared_value }}. This value should be greater than {{ compared_value }}. - Ova vrednost treba da bude veća od {{ compared_value }}. + Ova vrednost bi trebalo da bude veća od {{ compared_value }}. This value should be greater than or equal to {{ compared_value }}. - Ova vrednost treba da bude veća ili jednaka {{ compared_value }}. + Ova vrednost bi trebalo da bude veća ili jednaka {{ compared_value }}. This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Ova vrednost treba da bude identična sa {{ compared_value_type }} {{ compared_value }}. + Ova vrednost bi trebalo da bude identična sa {{ compared_value_type }} {{ compared_value }}. This value should be less than {{ compared_value }}. - Ova vrednost treba da bude manja od {{ compared_value }}. + Ova vrednost bi trebalo da bude manja od {{ compared_value }}. This value should be less than or equal to {{ compared_value }}. - Ova vrednost treba da bude manja ili jednaka {{ compared_value }}. + Ova vrednost bi trebalo da bude manja ili jednaka {{ compared_value }}. This value should not be equal to {{ compared_value }}. - Ova vrednost ne treba da bude jednaka {{ compared_value }}. + Ova vrednost ne bi trebalo da bude jednaka {{ compared_value }}. This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Ova vrednost ne treba da bude identična sa {{ compared_value_type }} {{ compared_value }}. + Ova vrednost ne bi trebalo da bude identična sa {{ compared_value_type }} {{ compared_value }}. The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. @@ -288,15 +288,51 @@ The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Slika je kvadratna ({{ width }}x{{ height }}px). Kvadratne slike nisu dozvoljene. + Slika je kvadratna ({{ width }}x{{ height }} piksela). Kvadratne slike nisu dozvoljene. The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Slika je orijentacije pejzaža ({{ width }}x{{ height }}px). Pejzažna orijentacija slika nije dozvoljena. + Slika je pejzažno orijentisana ({{ width }}x{{ height }} piksela). Pejzažna orijentisane slike nisu dozvoljene. The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Slika je orijantacije portreta ({{ width }}x{{ height }}px). Portretna orijentacija slika nije dozvoljena. + Slika je portretno orijentisana ({{ width }}x{{ height }} piksela). Portretno orijentisane slike nisu dozvoljene. + + + An empty file is not allowed. + Prazna datoteka nije dozvoljena. + + + The host could not be resolved. + Nije moguće odrediti poslužitelja. + + + This value does not match the expected {{ charset }} charset. + Vrednost se ne poklapa sa očekivanim {{ charset }} setom karaktera. + + + This is not a valid Business Identifier Code (BIC). + Ovo nije validan BIC. + + + Error + Greška + + + This is not a valid UUID. + Ovo nije validan univerzalni unikatni identifikator (UUID). + + + This value should be a multiple of {{ compared_value }}. + Ova vrednost bi trebalo da bude višestruko veća od {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + BIC kod nije povezan sa IBAN {{ iban }}. + + + This value should be valid JSON. + Ova vrednost bi trebalo da bude validan JSON. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf index 5e19e3e5..a23c652b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf @@ -222,10 +222,114 @@ Unsupported card type or invalid card number. Desteklenmeyen kart tipi veya geçersiz kart numarası. + + This is not a valid International Bank Account Number (IBAN). + Bu geçerli bir Uluslararası Banka Hesap Numarası (IBAN) değildir. + + + This value is not a valid ISBN-10. + Bu değer geçerli bir ISBN-10 değildir. + + + This value is not a valid ISBN-13. + Bu değer geçerli bir ISBN-13 değildir. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Bu değer geçerli bir ISBN-10 veya ISBN-13 değildir. + + + This value is not a valid ISSN. + Bu değer geçerli bir ISSN değildir. + + + This value is not a valid currency. + Bu değer geçerli bir para birimi değil. + + + This value should be equal to {{ compared_value }}. + Bu değer {{ compared_value }} ile eşit olmalıdır. + + + This value should be greater than {{ compared_value }}. + Bu değer {{ compared_value }} değerinden büyük olmalıdır. + + + This value should be greater than or equal to {{ compared_value }}. + Bu değer {{ compared_value }} ile eşit veya büyük olmalıdır. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Bu değer {{ compared_value_type }} {{ compared_value }} ile aynı olmalıdır. + + + This value should be less than {{ compared_value }}. + Bu değer {{ compared_value }} değerinden düşük olmalıdır. + + + This value should be less than or equal to {{ compared_value }}. + .Bu değer {{ compared_value }} ile eşit veya düşük olmalıdır. + + + This value should not be equal to {{ compared_value }}. + Bu değer {{ compared_value }} ile eşit olmamalıdır. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Bu değer {{ compared_value_type }} {{ compared_value }} ile aynı olmamalıdır. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Resim oranı çok büyük ({{ ratio }}). İzin verilen maksimum oran: {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Resim oranı çok ufak ({{ ratio }}). Beklenen minimum oran {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Resim karesi ({{ width }}x{{ height }}px). Kare resimlerine izin verilmiyor. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Resim manzara odaklı ({{ width }}x{{ height }}px). Manzara odaklı resimlere izin verilmiyor. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Resim portre odaklı ({{ width }}x{{ height }}px). Portre odaklı resimlere izin verilmiyor. + + + An empty file is not allowed. + Boş bir dosyaya izin verilmiyor. + + + The host could not be resolved. + Sunucu çözülemedi. + + + This value does not match the expected {{ charset }} charset. + Bu değer beklenen {{ charset }} karakter kümesiyle eşleşmiyor. + + + This is not a valid Business Identifier Code (BIC). + Bu geçerli bir İşletme Tanımlayıcı Kodu (BIC) değildir. + Error Hata + + This is not a valid UUID. + Bu geçerli bir UUID değildir. + + + This value should be a multiple of {{ compared_value }}. + Bu değer {{ compare_value }} değerinin katlarından biri olmalıdır. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Bu İşletme Tanımlayıcı Kodu (BIC), IBAN {{ iban }} ile ilişkili değildir. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf index 6a92801c..5ddc4298 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf @@ -318,6 +318,18 @@ Error Помилка + + This is not a valid UUID. + Це не валідне значення UUID. + + + This value should be a multiple of {{ compared_value }}. + Це значення повинне бути кратним {{ compared_value }}. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + Банківський код (BIC) не пов’язаний із міжнародним номером банківського рахунку (IBAN) {{ iban }}. + diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf index e1833c79..750a4d91 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf @@ -40,7 +40,7 @@ This field is missing. - Lĩnh vực này là mất tích. + Lĩnh vực này bị thiếu. This value is not a valid date. @@ -132,7 +132,7 @@ This file is not a valid image. - Tập tin không phải là hình ảnh. + Tập tin không phải là hình ảnh hợp lệ. This is not a valid IP address. @@ -148,7 +148,7 @@ This value is not a valid country. - Giá trị không phải là nước hợp lệ. + Giá trị không phải là quốc gia hợp lệ. This value is already used. @@ -180,7 +180,7 @@ This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Giá trị phải có chính xác {{ limit }} kí tự.|Giá trị phải có chính xác {{ limit }} kí tự. + Giá trị này phải có chính xác {{ limit }} kí tự.|Giá trị này phải có chính xác {{ limit }} kí tự. The file was only partially uploaded. @@ -204,11 +204,11 @@ This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Danh sách phải chứa {{ limit }} hoặc nhiều hơn thành phần.|Danh sách phải chứa {{ limit }} hoặc nhiều hơn thành phần. + Danh sách phải chứa {{ limit }} thành phần hoặc nhiều hơn.|Danh sách phải chứa {{ limit }} thành phần hoặc nhiều hơn. This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Danh sách phải chứa {{ limit }} hoặc ít hơn thành phần.|Danh sách phải chứa {{ limit }} hoặc ít hơn thành phần. + Danh sách phải chứa {{ limit }} thành phần hoặc ít hơn.|Danh sách phải chứa {{ limit }} thành phần hoặc ít hơn. This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. @@ -240,11 +240,11 @@ This value is not a valid ISSN. - Giá trị không là ISSN hợp lệ. + Giá trị không phải là ISSN hợp lệ. This value is not a valid currency. - Giá trị không phải là đơn vi tiền tệ hợp lệ. + Giá trị không phải là đơn vị tiền tệ hợp lệ. This value should be equal to {{ compared_value }}. @@ -268,7 +268,7 @@ This value should be less than or equal to {{ compared_value }}. - Giá trị không được phép nhỏ hơn hoặc bằng {{ compared_value }}. + Giá trị phải nhỏ hơn hoặc bằng {{ compared_value }}. This value should not be equal to {{ compared_value }}. diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php index 087a90a1..afe1f1a5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php @@ -175,7 +175,7 @@ abstract class ConstraintValidatorTestCase extends TestCase ->will($this->returnValue($validator)); $validator->expects($this->at(2 * $i + 1)) ->method('validate') - ->with($value, $this->logicalOr(null, array(), $this->isInstanceOf('\Symfony\Component\Validator\Constraints\Valid')), $group); + ->with($value, $this->logicalOr(null, [], $this->isInstanceOf('\Symfony\Component\Validator\Constraints\Valid')), $group); } protected function expectValidateValueAt($i, $propertyPath, $value, $constraints, $group = null) @@ -224,7 +224,7 @@ class ConstraintViolationAssertion private $assertions; private $message; - private $parameters = array(); + private $parameters = []; private $invalidValue = 'InvalidValue'; private $propertyPath = 'property.path'; private $plural; @@ -232,7 +232,7 @@ class ConstraintViolationAssertion private $constraint; private $cause; - public function __construct(ExecutionContextInterface $context, $message, Constraint $constraint = null, array $assertions = array()) + public function __construct(ExecutionContextInterface $context, $message, Constraint $constraint = null, array $assertions = []) { $this->context = $context; $this->message = $message; @@ -306,7 +306,7 @@ class ConstraintViolationAssertion public function assertRaised() { - $expected = array(); + $expected = []; foreach ($this->assertions as $assertion) { $expected[] = $assertion->getViolation(); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintTest.php index a0574149..87bac5b0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintTest.php @@ -24,10 +24,10 @@ class ConstraintTest extends TestCase { public function testSetProperties() { - $constraint = new ConstraintA(array( + $constraint = new ConstraintA([ 'property1' => 'foo', 'property2' => 'bar', - )); + ]); $this->assertEquals('foo', $constraint->property1); $this->assertEquals('bar', $constraint->property2); @@ -37,9 +37,9 @@ class ConstraintTest extends TestCase { $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\InvalidOptionsException'); - new ConstraintA(array( + new ConstraintA([ 'foo' => 'bar', - )); + ]); } public function testMagicPropertiesAreNotAllowed() @@ -55,10 +55,10 @@ class ConstraintTest extends TestCase { $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\InvalidOptionsException'); - new ConstraintC(array( + new ConstraintC([ 'option1' => 'default', 'foo' => 'bar', - )); + ]); } public function testSetDefaultProperty() @@ -70,14 +70,14 @@ class ConstraintTest extends TestCase public function testSetDefaultPropertyDoctrineStyle() { - $constraint = new ConstraintA(array('value' => 'foo')); + $constraint = new ConstraintA(['value' => 'foo']); $this->assertEquals('foo', $constraint->property2); } public function testSetDefaultPropertyDoctrineStylePlusOtherProperty() { - $constraint = new ConstraintA(array('value' => 'foo', 'property1' => 'bar')); + $constraint = new ConstraintA(['value' => 'foo', 'property1' => 'bar']); $this->assertEquals('foo', $constraint->property2); $this->assertEquals('bar', $constraint->property1); @@ -85,7 +85,7 @@ class ConstraintTest extends TestCase public function testSetDefaultPropertyDoctrineStyleWhenDefaultPropertyIsNamedValue() { - $constraint = new ConstraintWithValueAsDefault(array('value' => 'foo')); + $constraint = new ConstraintWithValueAsDefault(['value' => 'foo']); $this->assertEquals('foo', $constraint->value); $this->assertNull($constraint->property); @@ -93,7 +93,7 @@ class ConstraintTest extends TestCase public function testDontSetDefaultPropertyIfValuePropertyExists() { - $constraint = new ConstraintWithValue(array('value' => 'foo')); + $constraint = new ConstraintWithValue(['value' => 'foo']); $this->assertEquals('foo', $constraint->value); $this->assertNull($constraint->property); @@ -115,23 +115,23 @@ class ConstraintTest extends TestCase public function testRequiredOptionsPassed() { - $constraint = new ConstraintC(array('option1' => 'default')); + $constraint = new ConstraintC(['option1' => 'default']); $this->assertSame('default', $constraint->option1); } public function testGroupsAreConvertedToArray() { - $constraint = new ConstraintA(array('groups' => 'Foo')); + $constraint = new ConstraintA(['groups' => 'Foo']); - $this->assertEquals(array('Foo'), $constraint->groups); + $this->assertEquals(['Foo'], $constraint->groups); } public function testAddDefaultGroupAddsGroup() { - $constraint = new ConstraintA(array('groups' => 'Default')); + $constraint = new ConstraintA(['groups' => 'Default']); $constraint->addImplicitGroupName('Foo'); - $this->assertEquals(array('Default', 'Foo'), $constraint->groups); + $this->assertEquals(['Default', 'Foo'], $constraint->groups); } public function testAllowsSettingZeroRequiredPropertyValue() @@ -142,9 +142,9 @@ class ConstraintTest extends TestCase public function testCanCreateConstraintWithNoDefaultOptionAndEmptyArray() { - $constraint = new ConstraintB(array()); + $constraint = new ConstraintB([]); - $this->assertSame(array(Constraint::PROPERTY_CONSTRAINT, Constraint::CLASS_CONSTRAINT), $constraint->getTargets()); + $this->assertSame([Constraint::PROPERTY_CONSTRAINT, Constraint::CLASS_CONSTRAINT], $constraint->getTargets()); } public function testGetTargetsCanBeString() @@ -158,15 +158,15 @@ class ConstraintTest extends TestCase { $constraint = new ConstraintA(); - $this->assertEquals(array('property', 'class'), $constraint->getTargets()); + $this->assertEquals(['property', 'class'], $constraint->getTargets()); } public function testSerialize() { - $constraint = new ConstraintA(array( + $constraint = new ConstraintA([ 'property1' => 'foo', 'property2' => 'bar', - )); + ]); $restoredConstraint = unserialize(serialize($constraint)); @@ -175,33 +175,33 @@ class ConstraintTest extends TestCase public function testSerializeInitializesGroupsOptionToDefault() { - $constraint = new ConstraintA(array( + $constraint = new ConstraintA([ 'property1' => 'foo', 'property2' => 'bar', - )); + ]); $constraint = unserialize(serialize($constraint)); - $expected = new ConstraintA(array( + $expected = new ConstraintA([ 'property1' => 'foo', 'property2' => 'bar', 'groups' => 'Default', - )); + ]); $this->assertEquals($expected, $constraint); } public function testSerializeKeepsCustomGroups() { - $constraint = new ConstraintA(array( + $constraint = new ConstraintA([ 'property1' => 'foo', 'property2' => 'bar', 'groups' => 'MyGroup', - )); + ]); $constraint = unserialize(serialize($constraint)); - $this->assertSame(array('MyGroup'), $constraint->groups); + $this->assertSame(['MyGroup'], $constraint->groups); } /** @@ -214,11 +214,11 @@ class ConstraintTest extends TestCase public function testOptionsAsDefaultOption() { - $constraint = new ConstraintA($options = array('value1')); + $constraint = new ConstraintA($options = ['value1']); $this->assertEquals($options, $constraint->property2); - $constraint = new ConstraintA($options = array('value1', 'property1' => 'value2')); + $constraint = new ConstraintA($options = ['value1', 'property1' => 'value2']); $this->assertEquals($options, $constraint->property2); } @@ -229,12 +229,12 @@ class ConstraintTest extends TestCase */ public function testInvalidOptions() { - new ConstraintA(array('property2' => 'foo', 'bar', 5 => 'baz')); + new ConstraintA(['property2' => 'foo', 'bar', 5 => 'baz']); } public function testOptionsWithInvalidInternalPointer() { - $options = array('property1' => 'foo'); + $options = ['property1' => 'foo']; next($options); next($options); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php index f0e6afe2..73d81cbf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php @@ -37,7 +37,7 @@ class ConstraintViolationListTest extends TestCase public function testInitWithViolations() { $violation = $this->getViolation('Error'); - $this->list = new ConstraintViolationList(array($violation)); + $this->list = new ConstraintViolationList([$violation]); $this->assertCount(1, $this->list); $this->assertSame($violation, $this->list[0]); @@ -54,11 +54,11 @@ class ConstraintViolationListTest extends TestCase public function testAddAll() { - $violations = array( + $violations = [ 10 => $this->getViolation('Error 1'), 20 => $this->getViolation('Error 2'), 30 => $this->getViolation('Error 3'), - ); + ]; $otherList = new ConstraintViolationList($violations); $this->list->addAll($otherList); @@ -71,11 +71,11 @@ class ConstraintViolationListTest extends TestCase public function testIterator() { - $violations = array( + $violations = [ 10 => $this->getViolation('Error 1'), 20 => $this->getViolation('Error 2'), 30 => $this->getViolation('Error 3'), - ); + ]; $this->list = new ConstraintViolationList($violations); @@ -103,13 +103,13 @@ class ConstraintViolationListTest extends TestCase public function testToString() { - $this->list = new ConstraintViolationList(array( + $this->list = new ConstraintViolationList([ $this->getViolation('Error 1', 'Root'), $this->getViolation('Error 2', 'Root', 'foo.bar'), $this->getViolation('Error 3', 'Root', '[baz]'), $this->getViolation('Error 4', '', 'foo.bar'), $this->getViolation('Error 5', '', '[baz]'), - )); + ]); $expected = <<<'EOF' Root: @@ -133,11 +133,11 @@ EOF; */ public function testFindByCodes($code, $violationsCount) { - $violations = array( + $violations = [ $this->getViolation('Error', null, null, 'code1'), $this->getViolation('Error', null, null, 'code1'), $this->getViolation('Error', null, null, 'code2'), - ); + ]; $list = new ConstraintViolationList($violations); $specificErrors = $list->findByCodes($code); @@ -148,15 +148,15 @@ EOF; public function findByCodesProvider() { - return array( - array('code1', 2), - array(array('code1', 'code2'), 3), - array('code3', 0), - ); + return [ + ['code1', 2], + [['code1', 'code2'], 3], + ['code3', 0], + ]; } protected function getViolation($message, $root = null, $propertyPath = null, $code = null) { - return new ConstraintViolation($message, $message, array(), $root, $propertyPath, null, null, $code); + return new ConstraintViolation($message, $message, [], $root, $propertyPath, null, null, $code); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php index cef4782e..b43e51f2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php @@ -21,7 +21,7 @@ class ConstraintViolationTest extends TestCase $violation = new ConstraintViolation( 'Array', '{{ value }}', - array('{{ value }}' => array(1, 2, 3)), + ['{{ value }}' => [1, 2, 3]], 'Root', 'property.path', null @@ -40,8 +40,8 @@ EOF; $violation = new ConstraintViolation( '42 cannot be used here', 'this is the message template', - array(), - array('some_value' => 42), + [], + ['some_value' => 42], 'some_value', null ); @@ -53,4 +53,59 @@ EOF; $this->assertSame($expected, (string) $violation); } + + public function testToStringHandlesCodes() + { + $violation = new ConstraintViolation( + '42 cannot be used here', + 'this is the message template', + [], + ['some_value' => 42], + 'some_value', + null, + null, + 0 + ); + + $expected = <<<'EOF' +Array.some_value: + 42 cannot be used here (code 0) +EOF; + + $this->assertSame($expected, (string) $violation); + } + + public function testToStringOmitsEmptyCodes() + { + $expected = <<<'EOF' +Array.some_value: + 42 cannot be used here +EOF; + + $violation = new ConstraintViolation( + '42 cannot be used here', + 'this is the message template', + [], + ['some_value' => 42], + 'some_value', + null, + null, + null + ); + + $this->assertSame($expected, (string) $violation); + + $violation = new ConstraintViolation( + '42 cannot be used here', + 'this is the message template', + [], + ['some_value' => 42], + 'some_value', + null, + null, + '' + ); + + $this->assertSame($expected, (string) $violation); + } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php index 5e9f2bce..2f27974a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php @@ -73,10 +73,10 @@ abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTe public function provideInvalidConstraintOptions() { - return array( - array(null), - array(array()), - ); + return [ + [null], + [[]], + ]; } /** @@ -95,10 +95,10 @@ abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTe */ public function testThrowsConstraintExceptionIfBothValueAndPropertyPath() { - $this->createConstraint((array( + $this->createConstraint(([ 'value' => 'value', 'propertyPath' => 'propertyPath', - ))); + ])); } /** @@ -109,7 +109,7 @@ abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTe */ public function testValidComparisonToValue($dirtyValue, $comparisonValue) { - $constraint = $this->createConstraint(array('value' => $comparisonValue)); + $constraint = $this->createConstraint(['value' => $comparisonValue]); $this->validator->validate($dirtyValue, $constraint); @@ -137,7 +137,7 @@ abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTe */ public function testValidComparisonToPropertyPath($comparedValue) { - $constraint = $this->createConstraint(array('propertyPath' => 'value')); + $constraint = $this->createConstraint(['propertyPath' => 'value']); $object = new ComparisonTest_Class(5); @@ -153,9 +153,9 @@ abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTe */ public function testValidComparisonToPropertyPathOnArray($comparedValue) { - $constraint = $this->createConstraint(array('propertyPath' => '[root][value]')); + $constraint = $this->createConstraint(['propertyPath' => '[root][value]']); - $this->setObject(array('root' => array('value' => 5))); + $this->setObject(['root' => ['value' => 5]]); $this->validator->validate($comparedValue, $constraint); @@ -164,7 +164,7 @@ abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTe public function testNoViolationOnNullObjectWithPropertyPath() { - $constraint = $this->createConstraint(array('propertyPath' => 'propertyPath')); + $constraint = $this->createConstraint(['propertyPath' => 'propertyPath']); $this->setObject(null); @@ -175,7 +175,7 @@ abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTe public function testInvalidValuePath() { - $constraint = $this->createConstraint(array('propertyPath' => 'foo')); + $constraint = $this->createConstraint(['propertyPath' => 'foo']); if (method_exists($this, 'expectException')) { $this->expectException(ConstraintDefinitionException::class); @@ -218,7 +218,7 @@ abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTe IntlTestHelper::requireIntl($this, '57.1'); } - $constraint = $this->createConstraint(array('value' => $comparedValue)); + $constraint = $this->createConstraint(['value' => $comparedValue]); $constraint->message = 'Constraint Message'; $this->validator->validate($dirtyValue, $constraint); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AllTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AllTest.php index 25e71a1b..cdd72a22 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AllTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AllTest.php @@ -25,9 +25,9 @@ class AllTest extends TestCase */ public function testRejectNonConstraints() { - new All(array( + new All([ 'foo', - )); + ]); } /** @@ -35,8 +35,8 @@ class AllTest extends TestCase */ public function testRejectValidConstraint() { - new All(array( + new All([ new Valid(), - )); + ]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php index 2792dc40..1752f47e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php @@ -26,7 +26,7 @@ class AllValidatorTest extends ConstraintValidatorTestCase public function testNullIsValid() { - $this->validator->validate(null, new All(new Range(array('min' => 4)))); + $this->validator->validate(null, new All(new Range(['min' => 4]))); $this->assertNoViolation(); } @@ -36,7 +36,7 @@ class AllValidatorTest extends ConstraintValidatorTestCase */ public function testThrowsExceptionIfNotTraversable() { - $this->validator->validate('foo.barbar', new All(new Range(array('min' => 4)))); + $this->validator->validate('foo.barbar', new All(new Range(['min' => 4]))); } /** @@ -44,12 +44,12 @@ class AllValidatorTest extends ConstraintValidatorTestCase */ public function testWalkSingleConstraint($array) { - $constraint = new Range(array('min' => 4)); + $constraint = new Range(['min' => 4]); $i = 0; foreach ($array as $key => $value) { - $this->expectValidateValueAt($i++, '['.$key.']', $value, array($constraint)); + $this->expectValidateValueAt($i++, '['.$key.']', $value, [$constraint]); } $this->validator->validate($array, new All($constraint)); @@ -62,15 +62,15 @@ class AllValidatorTest extends ConstraintValidatorTestCase */ public function testWalkMultipleConstraints($array) { - $constraint1 = new Range(array('min' => 4)); + $constraint1 = new Range(['min' => 4]); $constraint2 = new NotNull(); - $constraints = array($constraint1, $constraint2); + $constraints = [$constraint1, $constraint2]; $i = 0; foreach ($array as $key => $value) { - $this->expectValidateValueAt($i++, '['.$key.']', $value, array($constraint1, $constraint2)); + $this->expectValidateValueAt($i++, '['.$key.']', $value, [$constraint1, $constraint2]); } $this->validator->validate($array, new All($constraints)); @@ -80,9 +80,9 @@ class AllValidatorTest extends ConstraintValidatorTestCase public function getValidArguments() { - return array( - array(array(5, 6, 7)), - array(new \ArrayObject(array(5, 6, 7))), - ); + return [ + [[5, 6, 7]], + [new \ArrayObject([5, 6, 7])], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php index 5d21b93c..6f3d1c2b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php @@ -49,14 +49,14 @@ class BicValidatorTest extends ConstraintValidatorTestCase public function getValidBics() { // http://formvalidation.io/validators/bic/ - return array( - array('ASPKAT2LXXX'), - array('ASPKAT2L'), - array('DSBACNBXSHA'), - array('UNCRIT2B912'), - array('DABADKKK'), - array('RZOOAT2L303'), - ); + return [ + ['ASPKAT2LXXX'], + ['ASPKAT2L'], + ['DSBACNBXSHA'], + ['UNCRIT2B912'], + ['DABADKKK'], + ['RZOOAT2L303'], + ]; } /** @@ -64,9 +64,9 @@ class BicValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidBics($bic, $code) { - $constraint = new Bic(array( + $constraint = new Bic([ 'message' => 'myMessage', - )); + ]); $this->validator->validate($bic, $constraint); @@ -78,30 +78,30 @@ class BicValidatorTest extends ConstraintValidatorTestCase public function getInvalidBics() { - return array( - array('DEUTD', Bic::INVALID_LENGTH_ERROR), - array('ASPKAT2LXX', Bic::INVALID_LENGTH_ERROR), - array('ASPKAT2LX', Bic::INVALID_LENGTH_ERROR), - array('ASPKAT2LXXX1', Bic::INVALID_LENGTH_ERROR), - array('DABADKK', Bic::INVALID_LENGTH_ERROR), - array('1SBACNBXSHA', Bic::INVALID_BANK_CODE_ERROR), - array('RZ00AT2L303', Bic::INVALID_BANK_CODE_ERROR), - array('D2BACNBXSHA', Bic::INVALID_BANK_CODE_ERROR), - array('DS3ACNBXSHA', Bic::INVALID_BANK_CODE_ERROR), - array('DSB4CNBXSHA', Bic::INVALID_BANK_CODE_ERROR), - array('DEUT12HH', Bic::INVALID_COUNTRY_CODE_ERROR), - array('DSBAC6BXSHA', Bic::INVALID_COUNTRY_CODE_ERROR), - array('DSBA5NBXSHA', Bic::INVALID_COUNTRY_CODE_ERROR), + return [ + ['DEUTD', Bic::INVALID_LENGTH_ERROR], + ['ASPKAT2LXX', Bic::INVALID_LENGTH_ERROR], + ['ASPKAT2LX', Bic::INVALID_LENGTH_ERROR], + ['ASPKAT2LXXX1', Bic::INVALID_LENGTH_ERROR], + ['DABADKK', Bic::INVALID_LENGTH_ERROR], + ['1SBACNBXSHA', Bic::INVALID_BANK_CODE_ERROR], + ['RZ00AT2L303', Bic::INVALID_BANK_CODE_ERROR], + ['D2BACNBXSHA', Bic::INVALID_BANK_CODE_ERROR], + ['DS3ACNBXSHA', Bic::INVALID_BANK_CODE_ERROR], + ['DSB4CNBXSHA', Bic::INVALID_BANK_CODE_ERROR], + ['DEUT12HH', Bic::INVALID_COUNTRY_CODE_ERROR], + ['DSBAC6BXSHA', Bic::INVALID_COUNTRY_CODE_ERROR], + ['DSBA5NBXSHA', Bic::INVALID_COUNTRY_CODE_ERROR], // branch code error - array('THISSVAL1D]', Bic::INVALID_CHARACTERS_ERROR), + ['THISSVAL1D]', Bic::INVALID_CHARACTERS_ERROR], // location code error - array('DEUTDEF]', Bic::INVALID_CHARACTERS_ERROR), + ['DEUTDEF]', Bic::INVALID_CHARACTERS_ERROR], // lower case values are invalid - array('DeutAT2LXXX', Bic::INVALID_CASE_ERROR), - array('DEUTAT2lxxx', Bic::INVALID_CASE_ERROR), - ); + ['DeutAT2LXXX', Bic::INVALID_CASE_ERROR], + ['DEUTAT2lxxx', Bic::INVALID_CASE_ERROR], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php index 94c653b1..1d138348 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php @@ -41,9 +41,9 @@ class BlankValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidValues($value, $valueAsString) { - $constraint = new Blank(array( + $constraint = new Blank([ 'message' => 'myMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -55,11 +55,11 @@ class BlankValidatorTest extends ConstraintValidatorTestCase public function getInvalidValues() { - return array( - array('foobar', '"foobar"'), - array(0, '0'), - array(false, 'false'), - array(1234, '1234'), - ); + return [ + ['foobar', '"foobar"'], + [0, '0'], + [false, 'false'], + [1234, '1234'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php index cb1b5c7b..1c771c2c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php @@ -21,7 +21,7 @@ class CallbackValidatorTest_Class { public static function validateCallback($object, ExecutionContextInterface $context) { - $context->addViolation('Callback message', array('{{ value }}' => 'foobar')); + $context->addViolation('Callback message', ['{{ value }}' => 'foobar']); return false; } @@ -31,14 +31,14 @@ class CallbackValidatorTest_Object { public function validate(ExecutionContextInterface $context) { - $context->addViolation('My message', array('{{ value }}' => 'foobar')); + $context->addViolation('My message', ['{{ value }}' => 'foobar']); return false; } public static function validateStatic($object, ExecutionContextInterface $context) { - $context->addViolation('Static message', array('{{ value }}' => 'baz')); + $context->addViolation('Static message', ['{{ value }}' => 'baz']); return false; } @@ -73,7 +73,7 @@ class CallbackValidatorTest extends ConstraintValidatorTestCase public function testSingleMethodExplicitName() { $object = new CallbackValidatorTest_Object(); - $constraint = new Callback(array('callback' => 'validate')); + $constraint = new Callback(['callback' => 'validate']); $this->validator->validate($object, $constraint); @@ -98,7 +98,7 @@ class CallbackValidatorTest extends ConstraintValidatorTestCase { $object = new CallbackValidatorTest_Object(); $constraint = new Callback(function ($object, ExecutionContextInterface $context) { - $context->addViolation('My message', array('{{ value }}' => 'foobar')); + $context->addViolation('My message', ['{{ value }}' => 'foobar']); return false; }); @@ -113,7 +113,7 @@ class CallbackValidatorTest extends ConstraintValidatorTestCase public function testClosureNullObject() { $constraint = new Callback(function ($object, ExecutionContextInterface $context) { - $context->addViolation('My message', array('{{ value }}' => 'foobar')); + $context->addViolation('My message', ['{{ value }}' => 'foobar']); return false; }); @@ -128,13 +128,13 @@ class CallbackValidatorTest extends ConstraintValidatorTestCase public function testClosureExplicitName() { $object = new CallbackValidatorTest_Object(); - $constraint = new Callback(array( + $constraint = new Callback([ 'callback' => function ($object, ExecutionContextInterface $context) { - $context->addViolation('My message', array('{{ value }}' => 'foobar')); + $context->addViolation('My message', ['{{ value }}' => 'foobar']); return false; }, - )); + ]); $this->validator->validate($object, $constraint); @@ -146,7 +146,7 @@ class CallbackValidatorTest extends ConstraintValidatorTestCase public function testArrayCallable() { $object = new CallbackValidatorTest_Object(); - $constraint = new Callback(array(__CLASS__.'_Class', 'validateCallback')); + $constraint = new Callback([__CLASS__.'_Class', 'validateCallback']); $this->validator->validate($object, $constraint); @@ -157,7 +157,7 @@ class CallbackValidatorTest extends ConstraintValidatorTestCase public function testArrayCallableNullObject() { - $constraint = new Callback(array(__CLASS__.'_Class', 'validateCallback')); + $constraint = new Callback([__CLASS__.'_Class', 'validateCallback']); $this->validator->validate(null, $constraint); @@ -169,9 +169,9 @@ class CallbackValidatorTest extends ConstraintValidatorTestCase public function testArrayCallableExplicitName() { $object = new CallbackValidatorTest_Object(); - $constraint = new Callback(array( - 'callback' => array(__CLASS__.'_Class', 'validateCallback'), - )); + $constraint = new Callback([ + 'callback' => [__CLASS__.'_Class', 'validateCallback'], + ]); $this->validator->validate($object, $constraint); @@ -187,7 +187,7 @@ class CallbackValidatorTest extends ConstraintValidatorTestCase { $object = new CallbackValidatorTest_Object(); - $this->validator->validate($object, new Callback(array('callback' => array('foobar')))); + $this->validator->validate($object, new Callback(['callback' => ['foobar']])); } /** @@ -197,13 +197,13 @@ class CallbackValidatorTest extends ConstraintValidatorTestCase { $object = new CallbackValidatorTest_Object(); - $this->validator->validate($object, new Callback(array('callback' => array('foo', 'bar')))); + $this->validator->validate($object, new Callback(['callback' => ['foo', 'bar']])); } public function testConstraintGetTargets() { - $constraint = new Callback(array()); - $targets = array(Constraint::CLASS_CONSTRAINT, Constraint::PROPERTY_CONSTRAINT); + $constraint = new Callback([]); + $targets = [Constraint::CLASS_CONSTRAINT, Constraint::PROPERTY_CONSTRAINT]; $this->assertEquals($targets, $constraint->getTargets()); } @@ -213,21 +213,21 @@ class CallbackValidatorTest extends ConstraintValidatorTestCase { $constraint = new Callback(); - $this->assertSame(array(Constraint::CLASS_CONSTRAINT, Constraint::PROPERTY_CONSTRAINT), $constraint->getTargets()); + $this->assertSame([Constraint::CLASS_CONSTRAINT, Constraint::PROPERTY_CONSTRAINT], $constraint->getTargets()); } public function testAnnotationInvocationSingleValued() { - $constraint = new Callback(array('value' => 'validateStatic')); + $constraint = new Callback(['value' => 'validateStatic']); $this->assertEquals(new Callback('validateStatic'), $constraint); } public function testAnnotationInvocationMultiValued() { - $constraint = new Callback(array('value' => array(__CLASS__.'_Class', 'validateCallback'))); + $constraint = new Callback(['value' => [__CLASS__.'_Class', 'validateCallback']]); - $this->assertEquals(new Callback(array(__CLASS__.'_Class', 'validateCallback')), $constraint); + $this->assertEquals(new Callback([__CLASS__.'_Class', 'validateCallback']), $constraint); } public function testPayloadIsPassedToCallback() @@ -235,21 +235,21 @@ class CallbackValidatorTest extends ConstraintValidatorTestCase $object = new \stdClass(); $payloadCopy = null; - $constraint = new Callback(array( + $constraint = new Callback([ 'callback' => function ($object, ExecutionContextInterface $constraint, $payload) use (&$payloadCopy) { $payloadCopy = $payload; }, 'payload' => 'Hello world!', - )); + ]); $this->validator->validate($object, $constraint); $this->assertEquals('Hello world!', $payloadCopy); $payloadCopy = null; - $constraint = new Callback(array( + $constraint = new Callback([ 'callback' => function ($object, ExecutionContextInterface $constraint, $payload) use (&$payloadCopy) { $payloadCopy = $payload; }, - )); + ]); $this->validator->validate($object, $constraint); $this->assertNull($payloadCopy); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php index b0280713..5350a1d4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php @@ -24,14 +24,14 @@ class CardSchemeValidatorTest extends ConstraintValidatorTestCase public function testNullIsValid() { - $this->validator->validate(null, new CardScheme(array('schemes' => array()))); + $this->validator->validate(null, new CardScheme(['schemes' => []])); $this->assertNoViolation(); } public function testEmptyStringIsValid() { - $this->validator->validate('', new CardScheme(array('schemes' => array()))); + $this->validator->validate('', new CardScheme(['schemes' => []])); $this->assertNoViolation(); } @@ -41,7 +41,7 @@ class CardSchemeValidatorTest extends ConstraintValidatorTestCase */ public function testValidNumbers($scheme, $number) { - $this->validator->validate($number, new CardScheme(array('schemes' => $scheme))); + $this->validator->validate($number, new CardScheme(['schemes' => $scheme])); $this->assertNoViolation(); } @@ -51,10 +51,10 @@ class CardSchemeValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidNumbers($scheme, $number, $code) { - $constraint = new CardScheme(array( + $constraint = new CardScheme([ 'schemes' => $scheme, 'message' => 'myMessage', - )); + ]); $this->validator->validate($number, $constraint); @@ -66,73 +66,73 @@ class CardSchemeValidatorTest extends ConstraintValidatorTestCase public function getValidNumbers() { - return array( - array('AMEX', '378282246310005'), - array('AMEX', '371449635398431'), - array('AMEX', '378734493671000'), - array('AMEX', '347298508610146'), - array('CHINA_UNIONPAY', '6228888888888888'), - array('CHINA_UNIONPAY', '62288888888888888'), - array('CHINA_UNIONPAY', '622888888888888888'), - array('CHINA_UNIONPAY', '6228888888888888888'), - array('DINERS', '30569309025904'), - array('DINERS', '36088894118515'), - array('DINERS', '38520000023237'), - array('DISCOVER', '6011111111111117'), - array('DISCOVER', '6011000990139424'), - array('INSTAPAYMENT', '6372476031350068'), - array('INSTAPAYMENT', '6385537775789749'), - array('INSTAPAYMENT', '6393440808445746'), - array('JCB', '3530111333300000'), - array('JCB', '3566002020360505'), - array('JCB', '213112345678901'), - array('JCB', '180012345678901'), - array('LASER', '6304678107004080'), - array('LASER', '6706440607428128629'), - array('LASER', '6771656738314582216'), - array('MAESTRO', '6759744069209'), - array('MAESTRO', '5020507657408074712'), - array('MAESTRO', '5612559223580173965'), - array('MAESTRO', '6759744069209'), - array('MAESTRO', '6594371785970435599'), - array('MASTERCARD', '5555555555554444'), - array('MASTERCARD', '5105105105105100'), - array('MASTERCARD', '2221005555554444'), - array('MASTERCARD', '2230000000000000'), - array('MASTERCARD', '2300000000000000'), - array('MASTERCARD', '2699999999999999'), - array('MASTERCARD', '2709999999999999'), - array('MASTERCARD', '2720995105105100'), - array('VISA', '4111111111111111'), - array('VISA', '4012888888881881'), - array('VISA', '4222222222222'), - array('VISA', '4917610000000000003'), - array(array('AMEX', 'VISA'), '4111111111111111'), - array(array('AMEX', 'VISA'), '378282246310005'), - array(array('JCB', 'MASTERCARD'), '5105105105105100'), - array(array('VISA', 'MASTERCARD'), '5105105105105100'), - ); + return [ + ['AMEX', '378282246310005'], + ['AMEX', '371449635398431'], + ['AMEX', '378734493671000'], + ['AMEX', '347298508610146'], + ['CHINA_UNIONPAY', '6228888888888888'], + ['CHINA_UNIONPAY', '62288888888888888'], + ['CHINA_UNIONPAY', '622888888888888888'], + ['CHINA_UNIONPAY', '6228888888888888888'], + ['DINERS', '30569309025904'], + ['DINERS', '36088894118515'], + ['DINERS', '38520000023237'], + ['DISCOVER', '6011111111111117'], + ['DISCOVER', '6011000990139424'], + ['INSTAPAYMENT', '6372476031350068'], + ['INSTAPAYMENT', '6385537775789749'], + ['INSTAPAYMENT', '6393440808445746'], + ['JCB', '3530111333300000'], + ['JCB', '3566002020360505'], + ['JCB', '213112345678901'], + ['JCB', '180012345678901'], + ['LASER', '6304678107004080'], + ['LASER', '6706440607428128629'], + ['LASER', '6771656738314582216'], + ['MAESTRO', '6759744069209'], + ['MAESTRO', '5020507657408074712'], + ['MAESTRO', '5612559223580173965'], + ['MAESTRO', '6759744069209'], + ['MAESTRO', '6594371785970435599'], + ['MASTERCARD', '5555555555554444'], + ['MASTERCARD', '5105105105105100'], + ['MASTERCARD', '2221005555554444'], + ['MASTERCARD', '2230000000000000'], + ['MASTERCARD', '2300000000000000'], + ['MASTERCARD', '2699999999999999'], + ['MASTERCARD', '2709999999999999'], + ['MASTERCARD', '2720995105105100'], + ['VISA', '4111111111111111'], + ['VISA', '4012888888881881'], + ['VISA', '4222222222222'], + ['VISA', '4917610000000000003'], + [['AMEX', 'VISA'], '4111111111111111'], + [['AMEX', 'VISA'], '378282246310005'], + [['JCB', 'MASTERCARD'], '5105105105105100'], + [['VISA', 'MASTERCARD'], '5105105105105100'], + ]; } public function getInvalidNumbers() { - return array( - array('VISA', '42424242424242424242', CardScheme::INVALID_FORMAT_ERROR), - array('AMEX', '357298508610146', CardScheme::INVALID_FORMAT_ERROR), - array('DINERS', '31569309025904', CardScheme::INVALID_FORMAT_ERROR), - array('DINERS', '37088894118515', CardScheme::INVALID_FORMAT_ERROR), - array('INSTAPAYMENT', '6313440808445746', CardScheme::INVALID_FORMAT_ERROR), - array('CHINA_UNIONPAY', '622888888888888', CardScheme::INVALID_FORMAT_ERROR), - array('CHINA_UNIONPAY', '62288888888888888888', CardScheme::INVALID_FORMAT_ERROR), - array('AMEX', '30569309025904', CardScheme::INVALID_FORMAT_ERROR), // DINERS number - array('AMEX', 'invalid', CardScheme::NOT_NUMERIC_ERROR), // A string - array('AMEX', 0, CardScheme::INVALID_FORMAT_ERROR), // a lone number - array('AMEX', '0', CardScheme::INVALID_FORMAT_ERROR), // a lone number - array('AMEX', '000000000000', CardScheme::INVALID_FORMAT_ERROR), // a lone number - array('DINERS', '3056930', CardScheme::INVALID_FORMAT_ERROR), // only first part of the number - array('DISCOVER', '1117', CardScheme::INVALID_FORMAT_ERROR), // only last 4 digits - array('MASTERCARD', '2721001234567890', CardScheme::INVALID_FORMAT_ERROR), // Not assigned yet - array('MASTERCARD', '2220991234567890', CardScheme::INVALID_FORMAT_ERROR), // Not assigned yet - ); + return [ + ['VISA', '42424242424242424242', CardScheme::INVALID_FORMAT_ERROR], + ['AMEX', '357298508610146', CardScheme::INVALID_FORMAT_ERROR], + ['DINERS', '31569309025904', CardScheme::INVALID_FORMAT_ERROR], + ['DINERS', '37088894118515', CardScheme::INVALID_FORMAT_ERROR], + ['INSTAPAYMENT', '6313440808445746', CardScheme::INVALID_FORMAT_ERROR], + ['CHINA_UNIONPAY', '622888888888888', CardScheme::INVALID_FORMAT_ERROR], + ['CHINA_UNIONPAY', '62288888888888888888', CardScheme::INVALID_FORMAT_ERROR], + ['AMEX', '30569309025904', CardScheme::INVALID_FORMAT_ERROR], // DINERS number + ['AMEX', 'invalid', CardScheme::NOT_NUMERIC_ERROR], // A string + ['AMEX', 0, CardScheme::INVALID_FORMAT_ERROR], // a lone number + ['AMEX', '0', CardScheme::INVALID_FORMAT_ERROR], // a lone number + ['AMEX', '000000000000', CardScheme::INVALID_FORMAT_ERROR], // a lone number + ['DINERS', '3056930', CardScheme::INVALID_FORMAT_ERROR], // only first part of the number + ['DISCOVER', '1117', CardScheme::INVALID_FORMAT_ERROR], // only last 4 digits + ['MASTERCARD', '2721001234567890', CardScheme::INVALID_FORMAT_ERROR], // Not assigned yet + ['MASTERCARD', '2220991234567890', CardScheme::INVALID_FORMAT_ERROR], // Not assigned yet + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php index 01483161..1f312cda 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php @@ -17,7 +17,7 @@ use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; function choice_callback() { - return array('foo', 'bar'); + return ['foo', 'bar']; } class ChoiceValidatorTest extends ConstraintValidatorTestCase @@ -29,12 +29,12 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase public static function staticCallback() { - return array('foo', 'bar'); + return ['foo', 'bar']; } public function objectMethodCallback() { - return array('foo', 'bar'); + return ['foo', 'bar']; } /** @@ -42,11 +42,11 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase */ public function testExpectArrayIfMultipleIsTrue() { - $constraint = new Choice(array( - 'choices' => array('foo', 'bar'), + $constraint = new Choice([ + 'choices' => ['foo', 'bar'], 'multiple' => true, 'strict' => true, - )); + ]); $this->validator->validate('asdf', $constraint); } @@ -56,10 +56,10 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase $this->validator->validate( null, new Choice( - array( - 'choices' => array('foo', 'bar'), + [ + 'choices' => ['foo', 'bar'], 'strict' => true, - ) + ] ) ); @@ -71,7 +71,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase */ public function testChoicesOrCallbackExpected() { - $this->validator->validate('foobar', new Choice(array('strict' => true))); + $this->validator->validate('foobar', new Choice(['strict' => true])); } /** @@ -79,12 +79,12 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase */ public function testValidCallbackExpected() { - $this->validator->validate('foobar', new Choice(array('callback' => 'abcd', 'strict' => true))); + $this->validator->validate('foobar', new Choice(['callback' => 'abcd', 'strict' => true])); } public function testValidChoiceArray() { - $constraint = new Choice(array('choices' => array('foo', 'bar'), 'strict' => true)); + $constraint = new Choice(['choices' => ['foo', 'bar'], 'strict' => true]); $this->validator->validate('bar', $constraint); @@ -93,7 +93,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase public function testValidChoiceCallbackFunction() { - $constraint = new Choice(array('callback' => __NAMESPACE__.'\choice_callback', 'strict' => true)); + $constraint = new Choice(['callback' => __NAMESPACE__.'\choice_callback', 'strict' => true]); $this->validator->validate('bar', $constraint); @@ -103,12 +103,12 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase public function testValidChoiceCallbackClosure() { $constraint = new Choice( - array( + [ 'strict' => true, 'callback' => function () { - return array('foo', 'bar'); + return ['foo', 'bar']; }, - ) + ] ); $this->validator->validate('bar', $constraint); @@ -118,7 +118,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase public function testValidChoiceCallbackStaticMethod() { - $constraint = new Choice(array('callback' => array(__CLASS__, 'staticCallback'), 'strict' => true)); + $constraint = new Choice(['callback' => [__CLASS__, 'staticCallback'], 'strict' => true]); $this->validator->validate('bar', $constraint); @@ -130,7 +130,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase // search $this for "staticCallback" $this->setObject($this); - $constraint = new Choice(array('callback' => 'staticCallback', 'strict' => true)); + $constraint = new Choice(['callback' => 'staticCallback', 'strict' => true]); $this->validator->validate('bar', $constraint); @@ -142,7 +142,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase // search $this for "objectMethodCallback" $this->setObject($this); - $constraint = new Choice(array('callback' => 'objectMethodCallback', 'strict' => true)); + $constraint = new Choice(['callback' => 'objectMethodCallback', 'strict' => true]); $this->validator->validate('bar', $constraint); @@ -151,24 +151,24 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase public function testMultipleChoices() { - $constraint = new Choice(array( - 'choices' => array('foo', 'bar', 'baz'), + $constraint = new Choice([ + 'choices' => ['foo', 'bar', 'baz'], 'multiple' => true, 'strict' => true, - )); + ]); - $this->validator->validate(array('baz', 'bar'), $constraint); + $this->validator->validate(['baz', 'bar'], $constraint); $this->assertNoViolation(); } public function testInvalidChoice() { - $constraint = new Choice(array( - 'choices' => array('foo', 'bar'), + $constraint = new Choice([ + 'choices' => ['foo', 'bar'], 'message' => 'myMessage', 'strict' => true, - )); + ]); $this->validator->validate('baz', $constraint); @@ -180,13 +180,13 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase public function testInvalidChoiceEmptyChoices() { - $constraint = new Choice(array( + $constraint = new Choice([ // May happen when the choices are provided dynamically, e.g. from // the DB or the model - 'choices' => array(), + 'choices' => [], 'message' => 'myMessage', 'strict' => true, - )); + ]); $this->validator->validate('baz', $constraint); @@ -198,14 +198,14 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase public function testInvalidChoiceMultiple() { - $constraint = new Choice(array( - 'choices' => array('foo', 'bar'), + $constraint = new Choice([ + 'choices' => ['foo', 'bar'], 'multipleMessage' => 'myMessage', 'multiple' => true, 'strict' => true, - )); + ]); - $this->validator->validate(array('foo', 'baz'), $constraint); + $this->validator->validate(['foo', 'baz'], $constraint); $this->buildViolation('myMessage') ->setParameter('{{ value }}', '"baz"') @@ -216,15 +216,15 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase public function testTooFewChoices() { - $constraint = new Choice(array( - 'choices' => array('foo', 'bar', 'moo', 'maa'), + $constraint = new Choice([ + 'choices' => ['foo', 'bar', 'moo', 'maa'], 'multiple' => true, 'min' => 2, 'minMessage' => 'myMessage', 'strict' => true, - )); + ]); - $value = array('foo'); + $value = ['foo']; $this->setValue($value); @@ -240,15 +240,15 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase public function testTooManyChoices() { - $constraint = new Choice(array( - 'choices' => array('foo', 'bar', 'moo', 'maa'), + $constraint = new Choice([ + 'choices' => ['foo', 'bar', 'moo', 'maa'], 'multiple' => true, 'max' => 2, 'maxMessage' => 'myMessage', 'strict' => true, - )); + ]); - $value = array('foo', 'bar', 'moo'); + $value = ['foo', 'bar', 'moo']; $this->setValue($value); @@ -267,10 +267,10 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase */ public function testNonStrict() { - $constraint = new Choice(array( - 'choices' => array(1, 2), + $constraint = new Choice([ + 'choices' => [1, 2], 'strict' => false, - )); + ]); $this->validator->validate('2', $constraint); $this->validator->validate(2, $constraint); @@ -280,10 +280,10 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase public function testStrictAllowsExactValue() { - $constraint = new Choice(array( - 'choices' => array(1, 2), + $constraint = new Choice([ + 'choices' => [1, 2], 'strict' => true, - )); + ]); $this->validator->validate(2, $constraint); @@ -292,11 +292,11 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase public function testStrictDisallowsDifferentType() { - $constraint = new Choice(array( - 'choices' => array(1, 2), + $constraint = new Choice([ + 'choices' => [1, 2], 'strict' => true, 'message' => 'myMessage', - )); + ]); $this->validator->validate('2', $constraint); @@ -311,27 +311,27 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase */ public function testNonStrictWithMultipleChoices() { - $constraint = new Choice(array( - 'choices' => array(1, 2, 3), + $constraint = new Choice([ + 'choices' => [1, 2, 3], 'multiple' => true, 'strict' => false, - )); + ]); - $this->validator->validate(array('2', 3), $constraint); + $this->validator->validate(['2', 3], $constraint); $this->assertNoViolation(); } public function testStrictWithMultipleChoices() { - $constraint = new Choice(array( - 'choices' => array(1, 2, 3), + $constraint = new Choice([ + 'choices' => [1, 2, 3], 'multiple' => true, 'strict' => true, 'multipleMessage' => 'myMessage', - )); + ]); - $this->validator->validate(array(2, '3'), $constraint); + $this->validator->validate([2, '3'], $constraint); $this->buildViolation('myMessage') ->setParameter('{{ value }}', '"3"') diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionTest.php index b5fbf6c0..fec93508 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionTest.php @@ -28,9 +28,9 @@ class CollectionTest extends TestCase */ public function testRejectInvalidFieldsOption() { - new Collection(array( + new Collection([ 'fields' => 'foo', - )); + ]); } /** @@ -38,9 +38,9 @@ class CollectionTest extends TestCase */ public function testRejectNonConstraints() { - new Collection(array( + new Collection([ 'foo' => 'bar', - )); + ]); } /** @@ -48,9 +48,9 @@ class CollectionTest extends TestCase */ public function testRejectValidConstraint() { - new Collection(array( + new Collection([ 'foo' => new Valid(), - )); + ]); } /** @@ -58,9 +58,9 @@ class CollectionTest extends TestCase */ public function testRejectValidConstraintWithinOptional() { - new Collection(array( + new Collection([ 'foo' => new Optional(new Valid()), - )); + ]); } /** @@ -68,45 +68,45 @@ class CollectionTest extends TestCase */ public function testRejectValidConstraintWithinRequired() { - new Collection(array( + new Collection([ 'foo' => new Required(new Valid()), - )); + ]); } public function testAcceptOptionalConstraintAsOneElementArray() { - $collection1 = new Collection(array( - 'fields' => array( - 'alternate_email' => array( + $collection1 = new Collection([ + 'fields' => [ + 'alternate_email' => [ new Optional(new Email()), - ), - ), - )); + ], + ], + ]); - $collection2 = new Collection(array( - 'fields' => array( + $collection2 = new Collection([ + 'fields' => [ 'alternate_email' => new Optional(new Email()), - ), - )); + ], + ]); $this->assertEquals($collection1, $collection2); } public function testAcceptRequiredConstraintAsOneElementArray() { - $collection1 = new Collection(array( - 'fields' => array( - 'alternate_email' => array( + $collection1 = new Collection([ + 'fields' => [ + 'alternate_email' => [ new Required(new Email()), - ), - ), - )); + ], + ], + ]); - $collection2 = new Collection(array( - 'fields' => array( + $collection2 = new Collection([ + 'fields' => [ 'alternate_email' => new Required(new Email()), - ), - )); + ], + ]); $this->assertEquals($collection1, $collection2); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorTest.php index 32aa8e35..fa2ee098 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorTest.php @@ -30,24 +30,24 @@ abstract class CollectionValidatorTest extends ConstraintValidatorTestCase public function testNullIsValid() { - $this->validator->validate(null, new Collection(array('fields' => array( - 'foo' => new Range(array('min' => 4)), - )))); + $this->validator->validate(null, new Collection(['fields' => [ + 'foo' => new Range(['min' => 4]), + ]])); $this->assertNoViolation(); } public function testFieldsAsDefaultOption() { - $constraint = new Range(array('min' => 4)); + $constraint = new Range(['min' => 4]); - $data = $this->prepareTestData(array('foo' => 'foobar')); + $data = $this->prepareTestData(['foo' => 'foobar']); - $this->expectValidateValueAt(0, '[foo]', $data['foo'], array($constraint)); + $this->expectValidateValueAt(0, '[foo]', $data['foo'], [$constraint]); - $this->validator->validate($data, new Collection(array( + $this->validator->validate($data, new Collection([ 'foo' => $constraint, - ))); + ])); $this->assertNoViolation(); } @@ -57,49 +57,49 @@ abstract class CollectionValidatorTest extends ConstraintValidatorTestCase */ public function testThrowsExceptionIfNotTraversable() { - $this->validator->validate('foobar', new Collection(array('fields' => array( - 'foo' => new Range(array('min' => 4)), - )))); + $this->validator->validate('foobar', new Collection(['fields' => [ + 'foo' => new Range(['min' => 4]), + ]])); } public function testWalkSingleConstraint() { - $constraint = new Range(array('min' => 4)); + $constraint = new Range(['min' => 4]); - $array = array( + $array = [ 'foo' => 3, 'bar' => 5, - ); + ]; $i = 0; foreach ($array as $key => $value) { - $this->expectValidateValueAt($i++, '['.$key.']', $value, array($constraint)); + $this->expectValidateValueAt($i++, '['.$key.']', $value, [$constraint]); } $data = $this->prepareTestData($array); - $this->validator->validate($data, new Collection(array( - 'fields' => array( + $this->validator->validate($data, new Collection([ + 'fields' => [ 'foo' => $constraint, 'bar' => $constraint, - ), - ))); + ], + ])); $this->assertNoViolation(); } public function testWalkMultipleConstraints() { - $constraints = array( - new Range(array('min' => 4)), + $constraints = [ + new Range(['min' => 4]), new NotNull(), - ); + ]; - $array = array( + $array = [ 'foo' => 3, 'bar' => 5, - ); + ]; $i = 0; @@ -109,33 +109,33 @@ abstract class CollectionValidatorTest extends ConstraintValidatorTestCase $data = $this->prepareTestData($array); - $this->validator->validate($data, new Collection(array( - 'fields' => array( + $this->validator->validate($data, new Collection([ + 'fields' => [ 'foo' => $constraints, 'bar' => $constraints, - ), - ))); + ], + ])); $this->assertNoViolation(); } public function testExtraFieldsDisallowed() { - $constraint = new Range(array('min' => 4)); + $constraint = new Range(['min' => 4]); - $data = $this->prepareTestData(array( + $data = $this->prepareTestData([ 'foo' => 5, 'baz' => 6, - )); + ]); - $this->expectValidateValueAt(0, '[foo]', $data['foo'], array($constraint)); + $this->expectValidateValueAt(0, '[foo]', $data['foo'], [$constraint]); - $this->validator->validate($data, new Collection(array( - 'fields' => array( + $this->validator->validate($data, new Collection([ + 'fields' => [ 'foo' => $constraint, - ), + ], 'extraFieldsMessage' => 'myMessage', - ))); + ])); $this->buildViolation('myMessage') ->setParameter('{{ field }}', '"baz"') @@ -148,56 +148,56 @@ abstract class CollectionValidatorTest extends ConstraintValidatorTestCase // bug fix public function testNullNotConsideredExtraField() { - $data = $this->prepareTestData(array( + $data = $this->prepareTestData([ 'foo' => null, - )); + ]); - $constraint = new Range(array('min' => 4)); + $constraint = new Range(['min' => 4]); - $this->expectValidateValueAt(0, '[foo]', $data['foo'], array($constraint)); + $this->expectValidateValueAt(0, '[foo]', $data['foo'], [$constraint]); - $this->validator->validate($data, new Collection(array( - 'fields' => array( + $this->validator->validate($data, new Collection([ + 'fields' => [ 'foo' => $constraint, - ), - ))); + ], + ])); $this->assertNoViolation(); } public function testExtraFieldsAllowed() { - $data = $this->prepareTestData(array( + $data = $this->prepareTestData([ 'foo' => 5, 'bar' => 6, - )); + ]); - $constraint = new Range(array('min' => 4)); + $constraint = new Range(['min' => 4]); - $this->expectValidateValueAt(0, '[foo]', $data['foo'], array($constraint)); + $this->expectValidateValueAt(0, '[foo]', $data['foo'], [$constraint]); - $this->validator->validate($data, new Collection(array( - 'fields' => array( + $this->validator->validate($data, new Collection([ + 'fields' => [ 'foo' => $constraint, - ), + ], 'allowExtraFields' => true, - ))); + ])); $this->assertNoViolation(); } public function testMissingFieldsDisallowed() { - $data = $this->prepareTestData(array()); + $data = $this->prepareTestData([]); - $constraint = new Range(array('min' => 4)); + $constraint = new Range(['min' => 4]); - $this->validator->validate($data, new Collection(array( - 'fields' => array( + $this->validator->validate($data, new Collection([ + 'fields' => [ 'foo' => $constraint, - ), + ], 'missingFieldsMessage' => 'myMessage', - ))); + ])); $this->buildViolation('myMessage') ->setParameter('{{ field }}', '"foo"') @@ -209,108 +209,108 @@ abstract class CollectionValidatorTest extends ConstraintValidatorTestCase public function testMissingFieldsAllowed() { - $data = $this->prepareTestData(array()); + $data = $this->prepareTestData([]); - $constraint = new Range(array('min' => 4)); + $constraint = new Range(['min' => 4]); - $this->validator->validate($data, new Collection(array( - 'fields' => array( + $this->validator->validate($data, new Collection([ + 'fields' => [ 'foo' => $constraint, - ), + ], 'allowMissingFields' => true, - ))); + ])); $this->assertNoViolation(); } public function testOptionalFieldPresent() { - $data = $this->prepareTestData(array( + $data = $this->prepareTestData([ 'foo' => null, - )); + ]); - $this->validator->validate($data, new Collection(array( + $this->validator->validate($data, new Collection([ 'foo' => new Optional(), - ))); + ])); $this->assertNoViolation(); } public function testOptionalFieldNotPresent() { - $data = $this->prepareTestData(array()); + $data = $this->prepareTestData([]); - $this->validator->validate($data, new Collection(array( + $this->validator->validate($data, new Collection([ 'foo' => new Optional(), - ))); + ])); $this->assertNoViolation(); } public function testOptionalFieldSingleConstraint() { - $array = array( + $array = [ 'foo' => 5, - ); + ]; - $constraint = new Range(array('min' => 4)); + $constraint = new Range(['min' => 4]); - $this->expectValidateValueAt(0, '[foo]', $array['foo'], array($constraint)); + $this->expectValidateValueAt(0, '[foo]', $array['foo'], [$constraint]); $data = $this->prepareTestData($array); - $this->validator->validate($data, new Collection(array( + $this->validator->validate($data, new Collection([ 'foo' => new Optional($constraint), - ))); + ])); $this->assertNoViolation(); } public function testOptionalFieldMultipleConstraints() { - $array = array( + $array = [ 'foo' => 5, - ); + ]; - $constraints = array( + $constraints = [ new NotNull(), - new Range(array('min' => 4)), - ); + new Range(['min' => 4]), + ]; $this->expectValidateValueAt(0, '[foo]', $array['foo'], $constraints); $data = $this->prepareTestData($array); - $this->validator->validate($data, new Collection(array( + $this->validator->validate($data, new Collection([ 'foo' => new Optional($constraints), - ))); + ])); $this->assertNoViolation(); } public function testRequiredFieldPresent() { - $data = $this->prepareTestData(array( + $data = $this->prepareTestData([ 'foo' => null, - )); + ]); - $this->validator->validate($data, new Collection(array( + $this->validator->validate($data, new Collection([ 'foo' => new Required(), - ))); + ])); $this->assertNoViolation(); } public function testRequiredFieldNotPresent() { - $data = $this->prepareTestData(array()); + $data = $this->prepareTestData([]); - $this->validator->validate($data, new Collection(array( - 'fields' => array( + $this->validator->validate($data, new Collection([ + 'fields' => [ 'foo' => new Required(), - ), + ], 'missingFieldsMessage' => 'myMessage', - ))); + ])); $this->buildViolation('myMessage') ->setParameter('{{ field }}', '"foo"') @@ -322,63 +322,63 @@ abstract class CollectionValidatorTest extends ConstraintValidatorTestCase public function testRequiredFieldSingleConstraint() { - $array = array( + $array = [ 'foo' => 5, - ); + ]; - $constraint = new Range(array('min' => 4)); + $constraint = new Range(['min' => 4]); - $this->expectValidateValueAt(0, '[foo]', $array['foo'], array($constraint)); + $this->expectValidateValueAt(0, '[foo]', $array['foo'], [$constraint]); $data = $this->prepareTestData($array); - $this->validator->validate($data, new Collection(array( + $this->validator->validate($data, new Collection([ 'foo' => new Required($constraint), - ))); + ])); $this->assertNoViolation(); } public function testRequiredFieldMultipleConstraints() { - $array = array( + $array = [ 'foo' => 5, - ); + ]; - $constraints = array( + $constraints = [ new NotNull(), - new Range(array('min' => 4)), - ); + new Range(['min' => 4]), + ]; $this->expectValidateValueAt(0, '[foo]', $array['foo'], $constraints); $data = $this->prepareTestData($array); - $this->validator->validate($data, new Collection(array( + $this->validator->validate($data, new Collection([ 'foo' => new Required($constraints), - ))); + ])); $this->assertNoViolation(); } public function testObjectShouldBeLeftUnchanged() { - $value = new \ArrayObject(array( + $value = new \ArrayObject([ 'foo' => 3, - )); + ]); - $constraint = new Range(array('min' => 2)); + $constraint = new Range(['min' => 2]); - $this->expectValidateValueAt(0, '[foo]', $value['foo'], array($constraint)); + $this->expectValidateValueAt(0, '[foo]', $value['foo'], [$constraint]); - $this->validator->validate($value, new Collection(array( - 'fields' => array( + $this->validator->validate($value, new Collection([ + 'fields' => [ 'foo' => $constraint, - ), - ))); + ], + ])); - $this->assertEquals(array( + $this->assertEquals([ 'foo' => 3, - ), (array) $value); + ], (array) $value); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CompositeTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CompositeTest.php index df425500..3070e6a2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CompositeTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CompositeTest.php @@ -39,44 +39,44 @@ class CompositeTest extends TestCase { public function testMergeNestedGroupsIfNoExplicitParentGroup() { - $constraint = new ConcreteComposite(array( - new NotNull(array('groups' => 'Default')), - new NotBlank(array('groups' => array('Default', 'Strict'))), - )); + $constraint = new ConcreteComposite([ + new NotNull(['groups' => 'Default']), + new NotBlank(['groups' => ['Default', 'Strict']]), + ]); - $this->assertEquals(array('Default', 'Strict'), $constraint->groups); - $this->assertEquals(array('Default'), $constraint->constraints[0]->groups); - $this->assertEquals(array('Default', 'Strict'), $constraint->constraints[1]->groups); + $this->assertEquals(['Default', 'Strict'], $constraint->groups); + $this->assertEquals(['Default'], $constraint->constraints[0]->groups); + $this->assertEquals(['Default', 'Strict'], $constraint->constraints[1]->groups); } public function testSetImplicitNestedGroupsIfExplicitParentGroup() { - $constraint = new ConcreteComposite(array( - 'constraints' => array( + $constraint = new ConcreteComposite([ + 'constraints' => [ new NotNull(), new NotBlank(), - ), - 'groups' => array('Default', 'Strict'), - )); + ], + 'groups' => ['Default', 'Strict'], + ]); - $this->assertEquals(array('Default', 'Strict'), $constraint->groups); - $this->assertEquals(array('Default', 'Strict'), $constraint->constraints[0]->groups); - $this->assertEquals(array('Default', 'Strict'), $constraint->constraints[1]->groups); + $this->assertEquals(['Default', 'Strict'], $constraint->groups); + $this->assertEquals(['Default', 'Strict'], $constraint->constraints[0]->groups); + $this->assertEquals(['Default', 'Strict'], $constraint->constraints[1]->groups); } public function testExplicitNestedGroupsMustBeSubsetOfExplicitParentGroups() { - $constraint = new ConcreteComposite(array( - 'constraints' => array( - new NotNull(array('groups' => 'Default')), - new NotBlank(array('groups' => 'Strict')), - ), - 'groups' => array('Default', 'Strict'), - )); + $constraint = new ConcreteComposite([ + 'constraints' => [ + new NotNull(['groups' => 'Default']), + new NotBlank(['groups' => 'Strict']), + ], + 'groups' => ['Default', 'Strict'], + ]); - $this->assertEquals(array('Default', 'Strict'), $constraint->groups); - $this->assertEquals(array('Default'), $constraint->constraints[0]->groups); - $this->assertEquals(array('Strict'), $constraint->constraints[1]->groups); + $this->assertEquals(['Default', 'Strict'], $constraint->groups); + $this->assertEquals(['Default'], $constraint->constraints[0]->groups); + $this->assertEquals(['Strict'], $constraint->constraints[1]->groups); } /** @@ -84,26 +84,26 @@ class CompositeTest extends TestCase */ public function testFailIfExplicitNestedGroupsNotSubsetOfExplicitParentGroups() { - new ConcreteComposite(array( - 'constraints' => array( - new NotNull(array('groups' => array('Default', 'Foobar'))), - ), - 'groups' => array('Default', 'Strict'), - )); + new ConcreteComposite([ + 'constraints' => [ + new NotNull(['groups' => ['Default', 'Foobar']]), + ], + 'groups' => ['Default', 'Strict'], + ]); } public function testImplicitGroupNamesAreForwarded() { - $constraint = new ConcreteComposite(array( - new NotNull(array('groups' => 'Default')), - new NotBlank(array('groups' => 'Strict')), - )); + $constraint = new ConcreteComposite([ + new NotNull(['groups' => 'Default']), + new NotBlank(['groups' => 'Strict']), + ]); $constraint->addImplicitGroupName('ImplicitGroup'); - $this->assertEquals(array('Default', 'Strict', 'ImplicitGroup'), $constraint->groups); - $this->assertEquals(array('Default', 'ImplicitGroup'), $constraint->constraints[0]->groups); - $this->assertEquals(array('Strict'), $constraint->constraints[1]->groups); + $this->assertEquals(['Default', 'Strict', 'ImplicitGroup'], $constraint->groups); + $this->assertEquals(['Default', 'ImplicitGroup'], $constraint->constraints[0]->groups); + $this->assertEquals(['Strict'], $constraint->constraints[1]->groups); } public function testSingleConstraintsAccepted() @@ -111,7 +111,7 @@ class CompositeTest extends TestCase $nestedConstraint = new NotNull(); $constraint = new ConcreteComposite($nestedConstraint); - $this->assertEquals(array($nestedConstraint), $constraint->constraints); + $this->assertEquals([$nestedConstraint], $constraint->constraints); } /** @@ -119,10 +119,10 @@ class CompositeTest extends TestCase */ public function testFailIfNoConstraint() { - new ConcreteComposite(array( - new NotNull(array('groups' => 'Default')), + new ConcreteComposite([ + new NotNull(['groups' => 'Default']), 'NotBlank', - )); + ]); } /** @@ -130,10 +130,10 @@ class CompositeTest extends TestCase */ public function testFailIfNoConstraintObject() { - new ConcreteComposite(array( - new NotNull(array('groups' => 'Default')), + new ConcreteComposite([ + new NotNull(['groups' => 'Default']), new \ArrayObject(), - )); + ]); } /** @@ -141,8 +141,8 @@ class CompositeTest extends TestCase */ public function testValidCantBeNested() { - new ConcreteComposite(array( + new ConcreteComposite([ new Valid(), - )); + ]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorTest.php index d23188a0..8416136f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorTest.php @@ -44,29 +44,29 @@ abstract class CountValidatorTest extends ConstraintValidatorTestCase public function getThreeOrLessElements() { - return array( - array($this->createCollection(array(1))), - array($this->createCollection(array(1, 2))), - array($this->createCollection(array(1, 2, 3))), - array($this->createCollection(array('a' => 1, 'b' => 2, 'c' => 3))), - ); + return [ + [$this->createCollection([1])], + [$this->createCollection([1, 2])], + [$this->createCollection([1, 2, 3])], + [$this->createCollection(['a' => 1, 'b' => 2, 'c' => 3])], + ]; } public function getFourElements() { - return array( - array($this->createCollection(array(1, 2, 3, 4))), - array($this->createCollection(array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4))), - ); + return [ + [$this->createCollection([1, 2, 3, 4])], + [$this->createCollection(['a' => 1, 'b' => 2, 'c' => 3, 'd' => 4])], + ]; } public function getFiveOrMoreElements() { - return array( - array($this->createCollection(array(1, 2, 3, 4, 5))), - array($this->createCollection(array(1, 2, 3, 4, 5, 6))), - array($this->createCollection(array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5))), - ); + return [ + [$this->createCollection([1, 2, 3, 4, 5])], + [$this->createCollection([1, 2, 3, 4, 5, 6])], + [$this->createCollection(['a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5])], + ]; } /** @@ -74,7 +74,7 @@ abstract class CountValidatorTest extends ConstraintValidatorTestCase */ public function testValidValuesMax($value) { - $constraint = new Count(array('max' => 3)); + $constraint = new Count(['max' => 3]); $this->validator->validate($value, $constraint); $this->assertNoViolation(); @@ -85,7 +85,7 @@ abstract class CountValidatorTest extends ConstraintValidatorTestCase */ public function testValidValuesMin($value) { - $constraint = new Count(array('min' => 5)); + $constraint = new Count(['min' => 5]); $this->validator->validate($value, $constraint); $this->assertNoViolation(); @@ -107,10 +107,10 @@ abstract class CountValidatorTest extends ConstraintValidatorTestCase */ public function testTooManyValues($value) { - $constraint = new Count(array( + $constraint = new Count([ 'max' => 4, 'maxMessage' => 'myMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -128,10 +128,10 @@ abstract class CountValidatorTest extends ConstraintValidatorTestCase */ public function testTooFewValues($value) { - $constraint = new Count(array( + $constraint = new Count([ 'min' => 4, 'minMessage' => 'myMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -149,11 +149,11 @@ abstract class CountValidatorTest extends ConstraintValidatorTestCase */ public function testTooManyValuesExact($value) { - $constraint = new Count(array( + $constraint = new Count([ 'min' => 4, 'max' => 4, 'exactMessage' => 'myMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -171,11 +171,11 @@ abstract class CountValidatorTest extends ConstraintValidatorTestCase */ public function testTooFewValuesExact($value) { - $constraint = new Count(array( + $constraint = new Count([ 'min' => 4, 'max' => 4, 'exactMessage' => 'myMessage', - )); + ]); $this->validator->validate($value, $constraint); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php index 044a742d..23c52836 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php @@ -57,11 +57,11 @@ class CountryValidatorTest extends ConstraintValidatorTestCase public function getValidCountries() { - return array( - array('GB'), - array('AT'), - array('MY'), - ); + return [ + ['GB'], + ['AT'], + ['MY'], + ]; } /** @@ -69,9 +69,9 @@ class CountryValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidCountries($country) { - $constraint = new Country(array( + $constraint = new Country([ 'message' => 'myMessage', - )); + ]); $this->validator->validate($country, $constraint); @@ -83,10 +83,10 @@ class CountryValidatorTest extends ConstraintValidatorTestCase public function getInvalidCountries() { - return array( - array('foobar'), - array('EN'), - ); + return [ + ['foobar'], + ['EN'], + ]; } public function testValidateUsingCountrySpecificLocale() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php index 1286ff31..c699f851 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php @@ -71,13 +71,13 @@ class CurrencyValidatorTest extends ConstraintValidatorTestCase public function getValidCurrencies() { - return array( - array('EUR'), - array('USD'), - array('SIT'), - array('AUD'), - array('CAD'), - ); + return [ + ['EUR'], + ['USD'], + ['SIT'], + ['AUD'], + ['CAD'], + ]; } /** @@ -85,9 +85,9 @@ class CurrencyValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidCurrencies($currency) { - $constraint = new Currency(array( + $constraint = new Currency([ 'message' => 'myMessage', - )); + ]); $this->validator->validate($currency, $constraint); @@ -99,9 +99,9 @@ class CurrencyValidatorTest extends ConstraintValidatorTestCase public function getInvalidCurrencies() { - return array( - array('EN'), - array('foobar'), - ); + return [ + ['EN'], + ['foobar'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php index fe553100..6a8fa15b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php @@ -77,9 +77,9 @@ class DateTimeValidatorTest extends ConstraintValidatorTestCase */ public function testValidDateTimes($format, $dateTime) { - $constraint = new DateTime(array( + $constraint = new DateTime([ 'format' => $format, - )); + ]); $this->validator->validate($dateTime, $constraint); @@ -88,13 +88,13 @@ class DateTimeValidatorTest extends ConstraintValidatorTestCase public function getValidDateTimes() { - return array( - array('Y-m-d H:i:s e', '1995-03-24 00:00:00 UTC'), - array('Y-m-d H:i:s', '2010-01-01 01:02:03'), - array('Y/m/d H:i', '2010/01/01 01:02'), - array('F d, Y', 'December 31, 1999'), - array('d-m-Y', '10-05-1995'), - ); + return [ + ['Y-m-d H:i:s e', '1995-03-24 00:00:00 UTC'], + ['Y-m-d H:i:s', '2010-01-01 01:02:03'], + ['Y/m/d H:i', '2010/01/01 01:02'], + ['F d, Y', 'December 31, 1999'], + ['d-m-Y', '10-05-1995'], + ]; } /** @@ -102,10 +102,10 @@ class DateTimeValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidDateTimes($format, $dateTime, $code) { - $constraint = new DateTime(array( + $constraint = new DateTime([ 'message' => 'myMessage', 'format' => $format, - )); + ]); $this->validator->validate($dateTime, $constraint); @@ -117,17 +117,17 @@ class DateTimeValidatorTest extends ConstraintValidatorTestCase public function getInvalidDateTimes() { - return array( - array('Y-m-d', 'foobar', DateTime::INVALID_FORMAT_ERROR), - array('H:i', '00:00:00', DateTime::INVALID_FORMAT_ERROR), - array('Y-m-d', '2010-01-01 00:00', DateTime::INVALID_FORMAT_ERROR), - array('Y-m-d e', '2010-01-01 TCU', DateTime::INVALID_FORMAT_ERROR), - array('Y-m-d H:i:s', '2010-13-01 00:00:00', DateTime::INVALID_DATE_ERROR), - array('Y-m-d H:i:s', '2010-04-32 00:00:00', DateTime::INVALID_DATE_ERROR), - array('Y-m-d H:i:s', '2010-02-29 00:00:00', DateTime::INVALID_DATE_ERROR), - array('Y-m-d H:i:s', '2010-01-01 24:00:00', DateTime::INVALID_TIME_ERROR), - array('Y-m-d H:i:s', '2010-01-01 00:60:00', DateTime::INVALID_TIME_ERROR), - array('Y-m-d H:i:s', '2010-01-01 00:00:60', DateTime::INVALID_TIME_ERROR), - ); + return [ + ['Y-m-d', 'foobar', DateTime::INVALID_FORMAT_ERROR], + ['H:i', '00:00:00', DateTime::INVALID_FORMAT_ERROR], + ['Y-m-d', '2010-01-01 00:00', DateTime::INVALID_FORMAT_ERROR], + ['Y-m-d e', '2010-01-01 TCU', DateTime::INVALID_FORMAT_ERROR], + ['Y-m-d H:i:s', '2010-13-01 00:00:00', DateTime::INVALID_DATE_ERROR], + ['Y-m-d H:i:s', '2010-04-32 00:00:00', DateTime::INVALID_DATE_ERROR], + ['Y-m-d H:i:s', '2010-02-29 00:00:00', DateTime::INVALID_DATE_ERROR], + ['Y-m-d H:i:s', '2010-01-01 24:00:00', DateTime::INVALID_TIME_ERROR], + ['Y-m-d H:i:s', '2010-01-01 00:60:00', DateTime::INVALID_TIME_ERROR], + ['Y-m-d H:i:s', '2010-01-01 00:00:60', DateTime::INVALID_TIME_ERROR], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php index 3b2b189a..0e0114f0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php @@ -70,11 +70,11 @@ class DateValidatorTest extends ConstraintValidatorTestCase public function getValidDates() { - return array( - array('2010-01-01'), - array('1955-12-12'), - array('2030-05-31'), - ); + return [ + ['2010-01-01'], + ['1955-12-12'], + ['2030-05-31'], + ]; } /** @@ -82,9 +82,9 @@ class DateValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidDates($date, $code) { - $constraint = new Date(array( + $constraint = new Date([ 'message' => 'myMessage', - )); + ]); $this->validator->validate($date, $constraint); @@ -96,13 +96,13 @@ class DateValidatorTest extends ConstraintValidatorTestCase public function getInvalidDates() { - return array( - array('foobar', Date::INVALID_FORMAT_ERROR), - array('foobar 2010-13-01', Date::INVALID_FORMAT_ERROR), - array('2010-13-01 foobar', Date::INVALID_FORMAT_ERROR), - array('2010-13-01', Date::INVALID_DATE_ERROR), - array('2010-04-32', Date::INVALID_DATE_ERROR), - array('2010-02-29', Date::INVALID_DATE_ERROR), - ); + return [ + ['foobar', Date::INVALID_FORMAT_ERROR], + ['foobar 2010-13-01', Date::INVALID_FORMAT_ERROR], + ['2010-13-01 foobar', Date::INVALID_FORMAT_ERROR], + ['2010-13-01', Date::INVALID_DATE_ERROR], + ['2010-04-32', Date::INVALID_DATE_ERROR], + ['2010-02-29', Date::INVALID_DATE_ERROR], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php index ff6d5c46..60cf10e4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php @@ -60,11 +60,11 @@ class EmailValidatorTest extends ConstraintValidatorTestCase public function getValidEmails() { - return array( - array('fabien@symfony.com'), - array('example@example.co.uk'), - array('fabien_potencier@example.fr'), - ); + return [ + ['fabien@symfony.com'], + ['example@example.co.uk'], + ['fabien_potencier@example.fr'], + ]; } /** @@ -72,9 +72,9 @@ class EmailValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidEmails($email) { - $constraint = new Email(array( + $constraint = new Email([ 'message' => 'myMessage', - )); + ]); $this->validator->validate($email, $constraint); @@ -86,17 +86,17 @@ class EmailValidatorTest extends ConstraintValidatorTestCase public function getInvalidEmails() { - return array( - array('example'), - array('example@'), - array('example@localhost'), - array('foo@example.com bar'), - ); + return [ + ['example'], + ['example@'], + ['example@localhost'], + ['foo@example.com bar'], + ]; } public function testStrict() { - $constraint = new Email(array('strict' => true)); + $constraint = new Email(['strict' => true]); $this->validator->validate('example@localhost', $constraint); @@ -108,10 +108,10 @@ class EmailValidatorTest extends ConstraintValidatorTestCase */ public function testStrictWithInvalidEmails($email) { - $constraint = new Email(array( + $constraint = new Email([ 'message' => 'myMessage', 'strict' => true, - )); + ]); $this->validator->validate($email, $constraint); @@ -127,55 +127,55 @@ class EmailValidatorTest extends ConstraintValidatorTestCase */ public function getInvalidEmailsForStrictChecks() { - return array( - array('test@example.com test'), - array('user name@example.com'), - array('user name@example.com'), - array('example.@example.co.uk'), - array('example@example@example.co.uk'), - array('(test_exampel@example.fr)'), - array('example(example)example@example.co.uk'), - array('.example@localhost'), - array('ex\ample@localhost'), - array('example@local\host'), - array('example@localhost.'), - array('user name@example.com'), - array('username@ example . com'), - array('example@(fake).com'), - array('example@(fake.com'), - array('username@example,com'), - array('usern,ame@example.com'), - array('user[na]me@example.com'), - array('"""@iana.org'), - array('"\"@iana.org'), - array('"test"test@iana.org'), - array('"test""test"@iana.org'), - array('"test"."test"@iana.org'), - array('"test".test@iana.org'), - array('"test"'.\chr(0).'@iana.org'), - array('"test\"@iana.org'), - array(\chr(226).'@iana.org'), - array('test@'.\chr(226).'.org'), - array('\r\ntest@iana.org'), - array('\r\n test@iana.org'), - array('\r\n \r\ntest@iana.org'), - array('\r\n \r\ntest@iana.org'), - array('\r\n \r\n test@iana.org'), - array('test@iana.org \r\n'), - array('test@iana.org \r\n '), - array('test@iana.org \r\n \r\n'), - array('test@iana.org \r\n\r\n'), - array('test@iana.org \r\n\r\n '), - array('test@iana/icann.org'), - array('test@foo;bar.com'), - array('test;123@foobar.com'), - array('test@example..com'), - array('email.email@email."'), - array('test@email>'), - array('test@email<'), - array('test@email{'), - array(str_repeat('x', 254).'@example.com'), //email with warnings - ); + return [ + ['test@example.com test'], + ['user name@example.com'], + ['user name@example.com'], + ['example.@example.co.uk'], + ['example@example@example.co.uk'], + ['(test_exampel@example.fr)'], + ['example(example)example@example.co.uk'], + ['.example@localhost'], + ['ex\ample@localhost'], + ['example@local\host'], + ['example@localhost.'], + ['user name@example.com'], + ['username@ example . com'], + ['example@(fake).com'], + ['example@(fake.com'], + ['username@example,com'], + ['usern,ame@example.com'], + ['user[na]me@example.com'], + ['"""@iana.org'], + ['"\"@iana.org'], + ['"test"test@iana.org'], + ['"test""test"@iana.org'], + ['"test"."test"@iana.org'], + ['"test".test@iana.org'], + ['"test"'.\chr(0).'@iana.org'], + ['"test\"@iana.org'], + [\chr(226).'@iana.org'], + ['test@'.\chr(226).'.org'], + ['\r\ntest@iana.org'], + ['\r\n test@iana.org'], + ['\r\n \r\ntest@iana.org'], + ['\r\n \r\ntest@iana.org'], + ['\r\n \r\n test@iana.org'], + ['test@iana.org \r\n'], + ['test@iana.org \r\n '], + ['test@iana.org \r\n \r\n'], + ['test@iana.org \r\n\r\n'], + ['test@iana.org \r\n\r\n '], + ['test@iana/icann.org'], + ['test@foo;bar.com'], + ['test;123@foobar.com'], + ['test@example..com'], + ['email.email@email."'], + ['test@email>'], + ['test@email<'], + ['test@email{'], + [str_repeat('x', 254).'@example.com'], //email with warnings + ]; } /** @@ -184,12 +184,12 @@ class EmailValidatorTest extends ConstraintValidatorTestCase */ public function testDnsChecks($type, $violation) { - DnsMock::withMockedHosts(array('example.com' => array(array('type' => $violation ? false : $type)))); + DnsMock::withMockedHosts(['example.com' => [['type' => $violation ? false : $type]]]); - $constraint = new Email(array( + $constraint = new Email([ 'message' => 'myMessage', 'MX' === $type ? 'checkMX' : 'checkHost' => true, - )); + ]); $this->validator->validate('foo@example.com', $constraint); @@ -205,14 +205,14 @@ class EmailValidatorTest extends ConstraintValidatorTestCase public function getDnsChecks() { - return array( - array('MX', false), - array('MX', Email::MX_CHECK_FAILED_ERROR), - array('A', false), - array('A', Email::HOST_CHECK_FAILED_ERROR), - array('AAAA', false), - array('AAAA', Email::HOST_CHECK_FAILED_ERROR), - ); + return [ + ['MX', false], + ['MX', Email::MX_CHECK_FAILED_ERROR], + ['A', false], + ['A', Email::HOST_CHECK_FAILED_ERROR], + ['AAAA', false], + ['AAAA', Email::HOST_CHECK_FAILED_ERROR], + ]; } /** @@ -220,11 +220,11 @@ class EmailValidatorTest extends ConstraintValidatorTestCase */ public function testHostnameIsProperlyParsed() { - DnsMock::withMockedHosts(array('baz.com' => array(array('type' => 'MX')))); + DnsMock::withMockedHosts(['baz.com' => [['type' => 'MX']]]); $this->validator->validate( '"foo@bar"@baz.com', - new Email(array('checkMX' => true)) + new Email(['checkMX' => true]) ); $this->assertNoViolation(); @@ -237,10 +237,10 @@ class EmailValidatorTest extends ConstraintValidatorTestCase { $this->validator->validate( 'foo@bar.fr@', - new Email(array( + new Email([ 'message' => 'myMessage', $checkType => true, - )) + ]) ); $this @@ -252,9 +252,9 @@ class EmailValidatorTest extends ConstraintValidatorTestCase public function provideCheckTypes() { - return array( - array('checkMX', Email::MX_CHECK_FAILED_ERROR), - array('checkHost', Email::HOST_CHECK_FAILED_ERROR), - ); + return [ + ['checkMX', Email::MX_CHECK_FAILED_ERROR], + ['checkHost', Email::HOST_CHECK_FAILED_ERROR], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php index e47de8fc..c1eb2f93 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php @@ -39,16 +39,16 @@ class EqualToValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideValidComparisons() { - return array( - array(3, 3), - array(3, '3'), - array('a', 'a'), - array(new \DateTime('2000-01-01'), new \DateTime('2000-01-01')), - array(new \DateTime('2000-01-01'), '2000-01-01'), - array(new \DateTime('2000-01-01 UTC'), '2000-01-01 UTC'), - array(new ComparisonTest_Class(5), new ComparisonTest_Class(5)), - array(null, 1), - ); + return [ + [3, 3], + [3, '3'], + ['a', 'a'], + [new \DateTime('2000-01-01'), new \DateTime('2000-01-01')], + [new \DateTime('2000-01-01'), '2000-01-01'], + [new \DateTime('2000-01-01 UTC'), '2000-01-01 UTC'], + [new ComparisonTest_Class(5), new ComparisonTest_Class(5)], + [null, 1], + ]; } /** @@ -56,9 +56,9 @@ class EqualToValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideValidComparisonsToPropertyPath() { - return array( - array(5), - ); + return [ + [5], + ]; } /** @@ -66,13 +66,13 @@ class EqualToValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideInvalidComparisons() { - return array( - array(1, '1', 2, '2', 'integer'), - array('22', '"22"', '333', '"333"', 'string'), - array(new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new \DateTime('2001-01-01 UTC'), 'Jan 1, 2001, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new ComparisonTest_Class(4), '4', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), - ); + return [ + [1, '1', 2, '2', 'integer'], + ['22', '"22"', '333', '"333"', 'string'], + [new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new \DateTime('2001-01-01 UTC'), 'Jan 1, 2001, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new ComparisonTest_Class(4), '4', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php index 07f17d64..5cffcefd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php @@ -26,10 +26,10 @@ class ExpressionValidatorTest extends ConstraintValidatorTestCase public function testExpressionIsEvaluatedWithNullValue() { - $constraint = new Expression(array( + $constraint = new Expression([ 'expression' => 'false', 'message' => 'myMessage', - )); + ]); $this->validator->validate(null, $constraint); @@ -41,10 +41,10 @@ class ExpressionValidatorTest extends ConstraintValidatorTestCase public function testExpressionIsEvaluatedWithEmptyStringValue() { - $constraint = new Expression(array( + $constraint = new Expression([ 'expression' => 'false', 'message' => 'myMessage', - )); + ]); $this->validator->validate('', $constraint); @@ -70,10 +70,10 @@ class ExpressionValidatorTest extends ConstraintValidatorTestCase public function testFailingExpressionAtObjectLevel() { - $constraint = new Expression(array( + $constraint = new Expression([ 'expression' => 'this.data == 1', 'message' => 'myMessage', - )); + ]); $object = new Entity(); $object->data = '2'; @@ -104,10 +104,10 @@ class ExpressionValidatorTest extends ConstraintValidatorTestCase public function testFailingExpressionAtObjectLevelWithToString() { - $constraint = new Expression(array( + $constraint = new Expression([ 'expression' => 'this.data == 1', 'message' => 'myMessage', - )); + ]); $object = new ToString(); $object->data = '2'; @@ -140,10 +140,10 @@ class ExpressionValidatorTest extends ConstraintValidatorTestCase public function testFailingExpressionAtPropertyLevel() { - $constraint = new Expression(array( + $constraint = new Expression([ 'expression' => 'value == this.data', 'message' => 'myMessage', - )); + ]); $object = new Entity(); $object->data = '1'; @@ -182,10 +182,10 @@ class ExpressionValidatorTest extends ConstraintValidatorTestCase public function testFailingExpressionAtNestedPropertyLevel() { - $constraint = new Expression(array( + $constraint = new Expression([ 'expression' => 'value == this.data', 'message' => 'myMessage', - )); + ]); $object = new Entity(); $object->data = '1'; @@ -229,10 +229,10 @@ class ExpressionValidatorTest extends ConstraintValidatorTestCase */ public function testFailingExpressionAtPropertyLevelWithoutRoot() { - $constraint = new Expression(array( + $constraint = new Expression([ 'expression' => 'value == "1"', 'message' => 'myMessage', - )); + ]); $this->setRoot('2'); $this->setPropertyPath(''); @@ -249,9 +249,9 @@ class ExpressionValidatorTest extends ConstraintValidatorTestCase public function testExpressionLanguageUsage() { - $constraint = new Expression(array( + $constraint = new Expression([ 'expression' => 'false', - )); + ]); $expressionLanguage = $this->getMockBuilder('Symfony\Component\ExpressionLanguage\ExpressionLanguage')->getMock(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php index b7745f44..d3117ed4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php @@ -22,7 +22,7 @@ class FileTest extends TestCase */ public function testMaxSize($maxSize, $bytes, $binaryFormat) { - $file = new File(array('maxSize' => $maxSize)); + $file = new File(['maxSize' => $maxSize]); $this->assertSame($bytes, $file->maxSize); $this->assertSame($binaryFormat, $file->binaryFormat); @@ -31,7 +31,7 @@ class FileTest extends TestCase public function testMagicIsset() { - $file = new File(array('maxSize' => 1)); + $file = new File(['maxSize' => 1]); $this->assertTrue($file->__isset('maxSize')); $this->assertTrue($file->__isset('groups')); @@ -56,7 +56,7 @@ class FileTest extends TestCase */ public function testInvalidValueForMaxSizeThrowsExceptionAfterInitialization($maxSize) { - $file = new File(array('maxSize' => 1000)); + $file = new File(['maxSize' => 1000]); $file->maxSize = $maxSize; } @@ -65,7 +65,7 @@ class FileTest extends TestCase */ public function testMaxSizeCannotBeSetToInvalidValueAfterInitialization($maxSize) { - $file = new File(array('maxSize' => 1000)); + $file = new File(['maxSize' => 1000]); try { $file->maxSize = $maxSize; @@ -81,35 +81,35 @@ class FileTest extends TestCase */ public function testInvalidMaxSize($maxSize) { - new File(array('maxSize' => $maxSize)); + new File(['maxSize' => $maxSize]); } public function provideValidSizes() { - return array( - array('500', 500, false), - array(12300, 12300, false), - array('1ki', 1024, true), - array('1KI', 1024, true), - array('2k', 2000, false), - array('2K', 2000, false), - array('1mi', 1048576, true), - array('1MI', 1048576, true), - array('3m', 3000000, false), - array('3M', 3000000, false), - ); + return [ + ['500', 500, false], + [12300, 12300, false], + ['1ki', 1024, true], + ['1KI', 1024, true], + ['2k', 2000, false], + ['2K', 2000, false], + ['1mi', 1048576, true], + ['1MI', 1048576, true], + ['3m', 3000000, false], + ['3M', 3000000, false], + ]; } public function provideInvalidSizes() { - return array( - array('+100'), - array('foo'), - array('1Ko'), - array('1kio'), - array('1G'), - array('1Gi'), - ); + return [ + ['+100'], + ['foo'], + ['1Ko'], + ['1kio'], + ['1G'], + ['1Gi'], + ]; } /** @@ -117,23 +117,23 @@ class FileTest extends TestCase */ public function testBinaryFormat($maxSize, $guessedFormat, $binaryFormat) { - $file = new File(array('maxSize' => $maxSize, 'binaryFormat' => $guessedFormat)); + $file = new File(['maxSize' => $maxSize, 'binaryFormat' => $guessedFormat]); $this->assertSame($binaryFormat, $file->binaryFormat); } public function provideFormats() { - return array( - array(100, null, false), - array(100, true, true), - array(100, false, false), - array('100K', null, false), - array('100K', true, true), - array('100K', false, false), - array('100Ki', null, true), - array('100Ki', true, true), - array('100Ki', false, false), - ); + return [ + [100, null, false], + [100, true, true], + [100, false, false], + ['100K', null, false], + ['100K', true, true], + ['100K', false, false], + ['100Ki', null, true], + ['100Ki', true, true], + ['100Ki', false, false], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorPathTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorPathTest.php index 11b8d4cb..dfd82f15 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorPathTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorPathTest.php @@ -22,9 +22,9 @@ class FileValidatorPathTest extends FileValidatorTest public function testFileNotFound() { - $constraint = new File(array( + $constraint = new File([ 'notFoundMessage' => 'myMessage', - )); + ]); $this->validator->validate('foobar', $constraint); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php index f2b6242d..b3428e77 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php @@ -115,44 +115,44 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase // same unit used to specify the limit. // As of Symfony 2.5, the above logic is implemented. - return array( + return [ // limit in bytes - array(1001, 1000, '1001', '1000', 'bytes'), - array(1004, 1000, '1004', '1000', 'bytes'), - array(1005, 1000, '1.01', '1', 'kB'), + [1001, 1000, '1001', '1000', 'bytes'], + [1004, 1000, '1004', '1000', 'bytes'], + [1005, 1000, '1.01', '1', 'kB'], - array(1000001, 1000000, '1000001', '1000000', 'bytes'), - array(1004999, 1000000, '1005', '1000', 'kB'), - array(1005000, 1000000, '1.01', '1', 'MB'), + [1000001, 1000000, '1000001', '1000000', 'bytes'], + [1004999, 1000000, '1005', '1000', 'kB'], + [1005000, 1000000, '1.01', '1', 'MB'], // limit in kB - array(1001, '1k', '1001', '1000', 'bytes'), - array(1004, '1k', '1004', '1000', 'bytes'), - array(1005, '1k', '1.01', '1', 'kB'), + [1001, '1k', '1001', '1000', 'bytes'], + [1004, '1k', '1004', '1000', 'bytes'], + [1005, '1k', '1.01', '1', 'kB'], - array(1000001, '1000k', '1000001', '1000000', 'bytes'), - array(1004999, '1000k', '1005', '1000', 'kB'), - array(1005000, '1000k', '1.01', '1', 'MB'), + [1000001, '1000k', '1000001', '1000000', 'bytes'], + [1004999, '1000k', '1005', '1000', 'kB'], + [1005000, '1000k', '1.01', '1', 'MB'], // limit in MB - array(1000001, '1M', '1000001', '1000000', 'bytes'), - array(1004999, '1M', '1005', '1000', 'kB'), - array(1005000, '1M', '1.01', '1', 'MB'), + [1000001, '1M', '1000001', '1000000', 'bytes'], + [1004999, '1M', '1005', '1000', 'kB'], + [1005000, '1M', '1.01', '1', 'MB'], // limit in KiB - array(1025, '1Ki', '1025', '1024', 'bytes'), - array(1029, '1Ki', '1029', '1024', 'bytes'), - array(1030, '1Ki', '1.01', '1', 'KiB'), + [1025, '1Ki', '1025', '1024', 'bytes'], + [1029, '1Ki', '1029', '1024', 'bytes'], + [1030, '1Ki', '1.01', '1', 'KiB'], - array(1048577, '1024Ki', '1048577', '1048576', 'bytes'), - array(1053818, '1024Ki', '1029.12', '1024', 'KiB'), - array(1053819, '1024Ki', '1.01', '1', 'MiB'), + [1048577, '1024Ki', '1048577', '1048576', 'bytes'], + [1053818, '1024Ki', '1029.12', '1024', 'KiB'], + [1053819, '1024Ki', '1.01', '1', 'MiB'], // limit in MiB - array(1048577, '1Mi', '1048577', '1048576', 'bytes'), - array(1053818, '1Mi', '1029.12', '1024', 'KiB'), - array(1053819, '1Mi', '1.01', '1', 'MiB'), - ); + [1048577, '1Mi', '1048577', '1048576', 'bytes'], + [1053818, '1Mi', '1029.12', '1024', 'KiB'], + [1053819, '1Mi', '1.01', '1', 'MiB'], + ]; } /** @@ -164,10 +164,10 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase fwrite($this->file, '0'); fclose($this->file); - $constraint = new File(array( + $constraint = new File([ 'maxSize' => $limit, 'maxSizeMessage' => 'myMessage', - )); + ]); $this->validator->validate($this->getFile($this->path), $constraint); @@ -182,25 +182,25 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase public function provideMaxSizeNotExceededTests() { - return array( + return [ // limit in bytes - array(1000, 1000), - array(1000000, 1000000), + [1000, 1000], + [1000000, 1000000], // limit in kB - array(1000, '1k'), - array(1000000, '1000k'), + [1000, '1k'], + [1000000, '1000k'], // limit in MB - array(1000000, '1M'), + [1000000, '1M'], // limit in KiB - array(1024, '1Ki'), - array(1048576, '1024Ki'), + [1024, '1Ki'], + [1048576, '1024Ki'], // limit in MiB - array(1048576, '1Mi'), - ); + [1048576, '1Mi'], + ]; } /** @@ -212,10 +212,10 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase fwrite($this->file, '0'); fclose($this->file); - $constraint = new File(array( + $constraint = new File([ 'maxSize' => $limit, 'maxSizeMessage' => 'myMessage', - )); + ]); $this->validator->validate($this->getFile($this->path), $constraint); @@ -227,33 +227,33 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidMaxSize() { - $constraint = new File(array( + $constraint = new File([ 'maxSize' => '1abc', - )); + ]); $this->validator->validate($this->path, $constraint); } public function provideBinaryFormatTests() { - return array( - array(11, 10, null, '11', '10', 'bytes'), - array(11, 10, true, '11', '10', 'bytes'), - array(11, 10, false, '11', '10', 'bytes'), + return [ + [11, 10, null, '11', '10', 'bytes'], + [11, 10, true, '11', '10', 'bytes'], + [11, 10, false, '11', '10', 'bytes'], // round(size) == 1.01kB, limit == 1kB - array(ceil(1000 * 1.01), 1000, null, '1.01', '1', 'kB'), - array(ceil(1000 * 1.01), '1k', null, '1.01', '1', 'kB'), - array(ceil(1024 * 1.01), '1Ki', null, '1.01', '1', 'KiB'), + [ceil(1000 * 1.01), 1000, null, '1.01', '1', 'kB'], + [ceil(1000 * 1.01), '1k', null, '1.01', '1', 'kB'], + [ceil(1024 * 1.01), '1Ki', null, '1.01', '1', 'KiB'], - array(ceil(1024 * 1.01), 1024, true, '1.01', '1', 'KiB'), - array(ceil(1024 * 1.01 * 1000), '1024k', true, '1010', '1000', 'KiB'), - array(ceil(1024 * 1.01), '1Ki', true, '1.01', '1', 'KiB'), + [ceil(1024 * 1.01), 1024, true, '1.01', '1', 'KiB'], + [ceil(1024 * 1.01 * 1000), '1024k', true, '1010', '1000', 'KiB'], + [ceil(1024 * 1.01), '1Ki', true, '1.01', '1', 'KiB'], - array(ceil(1000 * 1.01), 1000, false, '1.01', '1', 'kB'), - array(ceil(1000 * 1.01), '1k', false, '1.01', '1', 'kB'), - array(ceil(1024 * 1.01 * 10), '10Ki', false, '10.34', '10.24', 'kB'), - ); + [ceil(1000 * 1.01), 1000, false, '1.01', '1', 'kB'], + [ceil(1000 * 1.01), '1k', false, '1.01', '1', 'kB'], + [ceil(1024 * 1.01 * 10), '10Ki', false, '10.34', '10.24', 'kB'], + ]; } /** @@ -265,11 +265,11 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase fwrite($this->file, '0'); fclose($this->file); - $constraint = new File(array( + $constraint = new File([ 'maxSize' => $limit, 'binaryFormat' => $binaryFormat, 'maxSizeMessage' => 'myMessage', - )); + ]); $this->validator->validate($this->getFile($this->path), $constraint); @@ -286,7 +286,7 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase { $file = $this ->getMockBuilder('Symfony\Component\HttpFoundation\File\File') - ->setConstructorArgs(array(__DIR__.'/Fixtures/foo')) + ->setConstructorArgs([__DIR__.'/Fixtures/foo']) ->getMock(); $file ->expects($this->once()) @@ -297,9 +297,9 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase ->method('getMimeType') ->will($this->returnValue('image/jpg')); - $constraint = new File(array( - 'mimeTypes' => array('image/png', 'image/jpg'), - )); + $constraint = new File([ + 'mimeTypes' => ['image/png', 'image/jpg'], + ]); $this->validator->validate($file, $constraint); @@ -310,7 +310,7 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase { $file = $this ->getMockBuilder('Symfony\Component\HttpFoundation\File\File') - ->setConstructorArgs(array(__DIR__.'/Fixtures/foo')) + ->setConstructorArgs([__DIR__.'/Fixtures/foo']) ->getMock(); $file ->expects($this->once()) @@ -321,9 +321,9 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase ->method('getMimeType') ->will($this->returnValue('image/jpg')); - $constraint = new File(array( - 'mimeTypes' => array('image/*'), - )); + $constraint = new File([ + 'mimeTypes' => ['image/*'], + ]); $this->validator->validate($file, $constraint); @@ -334,7 +334,7 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase { $file = $this ->getMockBuilder('Symfony\Component\HttpFoundation\File\File') - ->setConstructorArgs(array(__DIR__.'/Fixtures/foo')) + ->setConstructorArgs([__DIR__.'/Fixtures/foo']) ->getMock(); $file ->expects($this->once()) @@ -345,10 +345,10 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase ->method('getMimeType') ->will($this->returnValue('application/pdf')); - $constraint = new File(array( - 'mimeTypes' => array('image/png', 'image/jpg'), + $constraint = new File([ + 'mimeTypes' => ['image/png', 'image/jpg'], 'mimeTypesMessage' => 'myMessage', - )); + ]); $this->validator->validate($file, $constraint); @@ -364,7 +364,7 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase { $file = $this ->getMockBuilder('Symfony\Component\HttpFoundation\File\File') - ->setConstructorArgs(array(__DIR__.'/Fixtures/foo')) + ->setConstructorArgs([__DIR__.'/Fixtures/foo']) ->getMock(); $file ->expects($this->once()) @@ -375,10 +375,10 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase ->method('getMimeType') ->will($this->returnValue('application/pdf')); - $constraint = new File(array( - 'mimeTypes' => array('image/*', 'image/jpg'), + $constraint = new File([ + 'mimeTypes' => ['image/*', 'image/jpg'], 'mimeTypesMessage' => 'myMessage', - )); + ]); $this->validator->validate($file, $constraint); @@ -394,9 +394,9 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase { ftruncate($this->file, 0); - $constraint = new File(array( + $constraint = new File([ 'disallowEmptyMessage' => 'myMessage', - )); + ]); $this->validator->validate($this->getFile($this->path), $constraint); @@ -409,14 +409,14 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase /** * @dataProvider uploadedFileErrorProvider */ - public function testUploadedFileError($error, $message, array $params = array(), $maxSize = null) + public function testUploadedFileError($error, $message, array $params = [], $maxSize = null) { $file = new UploadedFile('/path/to/file', 'originalName', 'mime', 0, $error); - $constraint = new File(array( + $constraint = new File([ $message => 'myMessage', 'maxSize' => $maxSize, - )); + ]); $this->validator->validate($file, $constraint); @@ -428,47 +428,47 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase public function uploadedFileErrorProvider() { - $tests = array( - array(UPLOAD_ERR_FORM_SIZE, 'uploadFormSizeErrorMessage'), - array(UPLOAD_ERR_PARTIAL, 'uploadPartialErrorMessage'), - array(UPLOAD_ERR_NO_FILE, 'uploadNoFileErrorMessage'), - array(UPLOAD_ERR_NO_TMP_DIR, 'uploadNoTmpDirErrorMessage'), - array(UPLOAD_ERR_CANT_WRITE, 'uploadCantWriteErrorMessage'), - array(UPLOAD_ERR_EXTENSION, 'uploadExtensionErrorMessage'), - ); + $tests = [ + [UPLOAD_ERR_FORM_SIZE, 'uploadFormSizeErrorMessage'], + [UPLOAD_ERR_PARTIAL, 'uploadPartialErrorMessage'], + [UPLOAD_ERR_NO_FILE, 'uploadNoFileErrorMessage'], + [UPLOAD_ERR_NO_TMP_DIR, 'uploadNoTmpDirErrorMessage'], + [UPLOAD_ERR_CANT_WRITE, 'uploadCantWriteErrorMessage'], + [UPLOAD_ERR_EXTENSION, 'uploadExtensionErrorMessage'], + ]; if (class_exists('Symfony\Component\HttpFoundation\File\UploadedFile')) { // when no maxSize is specified on constraint, it should use the ini value - $tests[] = array(UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', array( + $tests[] = [UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', [ '{{ limit }}' => UploadedFile::getMaxFilesize() / 1048576, '{{ suffix }}' => 'MiB', - )); + ]]; // it should use the smaller limitation (maxSize option in this case) - $tests[] = array(UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', array( + $tests[] = [UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', [ '{{ limit }}' => 1, '{{ suffix }}' => 'bytes', - ), '1'); + ], '1']; // access FileValidator::factorizeSizes() private method to format max file size $reflection = new \ReflectionClass(\get_class(new FileValidator())); $method = $reflection->getMethod('factorizeSizes'); $method->setAccessible(true); - list($sizeAsString, $limit, $suffix) = $method->invokeArgs(new FileValidator(), array(0, UploadedFile::getMaxFilesize(), false)); + list($sizeAsString, $limit, $suffix) = $method->invokeArgs(new FileValidator(), [0, UploadedFile::getMaxFilesize(), false]); // it correctly parses the maxSize option and not only uses simple string comparison // 1000M should be bigger than the ini value - $tests[] = array(UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', array( + $tests[] = [UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', [ '{{ limit }}' => $limit, '{{ suffix }}' => $suffix, - ), '1000M'); + ], '1000M']; // it correctly parses the maxSize option and not only uses simple string comparison // 1000M should be bigger than the ini value - $tests[] = array(UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', array( + $tests[] = [UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', [ '{{ limit }}' => '0.1', '{{ suffix }}' => 'MB', - ), '100K'); + ], '100K']; } return $tests; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php index 22fb9b66..d8d8eab8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php @@ -39,19 +39,19 @@ class GreaterThanOrEqualValidatorTest extends AbstractComparisonValidatorTestCas */ public function provideValidComparisons() { - return array( - array(3, 2), - array(1, 1), - array(new \DateTime('2010/01/01'), new \DateTime('2000/01/01')), - array(new \DateTime('2000/01/01'), new \DateTime('2000/01/01')), - array(new \DateTime('2010/01/01'), '2000/01/01'), - array(new \DateTime('2000/01/01'), '2000/01/01'), - array(new \DateTime('2010/01/01 UTC'), '2000/01/01 UTC'), - array(new \DateTime('2000/01/01 UTC'), '2000/01/01 UTC'), - array('a', 'a'), - array('z', 'a'), - array(null, 1), - ); + return [ + [3, 2], + [1, 1], + [new \DateTime('2010/01/01'), new \DateTime('2000/01/01')], + [new \DateTime('2000/01/01'), new \DateTime('2000/01/01')], + [new \DateTime('2010/01/01'), '2000/01/01'], + [new \DateTime('2000/01/01'), '2000/01/01'], + [new \DateTime('2010/01/01 UTC'), '2000/01/01 UTC'], + [new \DateTime('2000/01/01 UTC'), '2000/01/01 UTC'], + ['a', 'a'], + ['z', 'a'], + [null, 1], + ]; } /** @@ -59,10 +59,10 @@ class GreaterThanOrEqualValidatorTest extends AbstractComparisonValidatorTestCas */ public function provideValidComparisonsToPropertyPath() { - return array( - array(5), - array(6), - ); + return [ + [5], + [6], + ]; } /** @@ -70,12 +70,12 @@ class GreaterThanOrEqualValidatorTest extends AbstractComparisonValidatorTestCas */ public function provideInvalidComparisons() { - return array( - array(1, '1', 2, '2', 'integer'), - array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2005/01/01'), 'Jan 1, 2005, 12:00 AM', 'DateTime'), - array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', '2005/01/01', 'Jan 1, 2005, 12:00 AM', 'DateTime'), - array(new \DateTime('2000/01/01 UTC'), 'Jan 1, 2000, 12:00 AM', '2005/01/01 UTC', 'Jan 1, 2005, 12:00 AM', 'DateTime'), - array('b', '"b"', 'c', '"c"', 'string'), - ); + return [ + [1, '1', 2, '2', 'integer'], + [new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2005/01/01'), 'Jan 1, 2005, 12:00 AM', 'DateTime'], + [new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', '2005/01/01', 'Jan 1, 2005, 12:00 AM', 'DateTime'], + [new \DateTime('2000/01/01 UTC'), 'Jan 1, 2000, 12:00 AM', '2005/01/01 UTC', 'Jan 1, 2005, 12:00 AM', 'DateTime'], + ['b', '"b"', 'c', '"c"', 'string'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php index 08446ec8..e678496c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php @@ -39,15 +39,15 @@ class GreaterThanValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideValidComparisons() { - return array( - array(2, 1), - array(new \DateTime('2005/01/01'), new \DateTime('2001/01/01')), - array(new \DateTime('2005/01/01'), '2001/01/01'), - array(new \DateTime('2005/01/01 UTC'), '2001/01/01 UTC'), - array(new ComparisonTest_Class(5), new ComparisonTest_Class(4)), - array('333', '22'), - array(null, 1), - ); + return [ + [2, 1], + [new \DateTime('2005/01/01'), new \DateTime('2001/01/01')], + [new \DateTime('2005/01/01'), '2001/01/01'], + [new \DateTime('2005/01/01 UTC'), '2001/01/01 UTC'], + [new ComparisonTest_Class(5), new ComparisonTest_Class(4)], + ['333', '22'], + [null, 1], + ]; } /** @@ -55,9 +55,9 @@ class GreaterThanValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideValidComparisonsToPropertyPath() { - return array( - array(6), - ); + return [ + [6], + ]; } /** @@ -65,19 +65,19 @@ class GreaterThanValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideInvalidComparisons() { - return array( - array(1, '1', 2, '2', 'integer'), - array(2, '2', 2, '2', 'integer'), - array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2005/01/01'), 'Jan 1, 2005, 12:00 AM', 'DateTime'), - array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', '2005/01/01', 'Jan 1, 2005, 12:00 AM', 'DateTime'), - array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', '2000/01/01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new \DateTime('2000/01/01 UTC'), 'Jan 1, 2000, 12:00 AM', '2005/01/01 UTC', 'Jan 1, 2005, 12:00 AM', 'DateTime'), - array(new \DateTime('2000/01/01 UTC'), 'Jan 1, 2000, 12:00 AM', '2000/01/01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new ComparisonTest_Class(4), '4', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), - array(new ComparisonTest_Class(5), '5', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), - array('22', '"22"', '333', '"333"', 'string'), - array('22', '"22"', '22', '"22"', 'string'), - ); + return [ + [1, '1', 2, '2', 'integer'], + [2, '2', 2, '2', 'integer'], + [new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2005/01/01'), 'Jan 1, 2005, 12:00 AM', 'DateTime'], + [new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', '2005/01/01', 'Jan 1, 2005, 12:00 AM', 'DateTime'], + [new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', '2000/01/01', 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new \DateTime('2000/01/01 UTC'), 'Jan 1, 2000, 12:00 AM', '2005/01/01 UTC', 'Jan 1, 2005, 12:00 AM', 'DateTime'], + [new \DateTime('2000/01/01 UTC'), 'Jan 1, 2000, 12:00 AM', '2000/01/01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new ComparisonTest_Class(4), '4', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'], + [new ComparisonTest_Class(5), '5', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'], + ['22', '"22"', '333', '"333"', 'string'], + ['22', '"22"', '22', '"22"', 'string'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GroupSequenceTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GroupSequenceTest.php index 98653274..7803a73c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GroupSequenceTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GroupSequenceTest.php @@ -21,15 +21,15 @@ class GroupSequenceTest extends TestCase { public function testCreate() { - $sequence = new GroupSequence(array('Group 1', 'Group 2')); + $sequence = new GroupSequence(['Group 1', 'Group 2']); - $this->assertSame(array('Group 1', 'Group 2'), $sequence->groups); + $this->assertSame(['Group 1', 'Group 2'], $sequence->groups); } public function testCreateDoctrineStyle() { - $sequence = new GroupSequence(array('value' => array('Group 1', 'Group 2'))); + $sequence = new GroupSequence(['value' => ['Group 1', 'Group 2']]); - $this->assertSame(array('Group 1', 'Group 2'), $sequence->groups); + $this->assertSame(['Group 1', 'Group 2'], $sequence->groups); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php index 7f9ba339..ba426799 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php @@ -48,115 +48,116 @@ class IbanValidatorTest extends ConstraintValidatorTestCase public function getValidIbans() { - return array( - array('CH9300762011623852957'), // Switzerland without spaces - array('CH93 0076 2011 6238 5295 7'), // Switzerland with multiple spaces + return [ + ['CH9300762011623852957'], // Switzerland without spaces + ['CH93 0076 2011 6238 5295 7'], // Switzerland with multiple spaces // Country list // http://www.rbs.co.uk/corporate/international/g0/guide-to-international-business/regulatory-information/iban/iban-example.ashx - array('AL47 2121 1009 0000 0002 3569 8741'), //Albania - array('AD12 0001 2030 2003 5910 0100'), //Andorra - array('AT61 1904 3002 3457 3201'), //Austria - array('AZ21 NABZ 0000 0000 1370 1000 1944'), //Azerbaijan - array('BH67 BMAG 0000 1299 1234 56'), //Bahrain - array('BE62 5100 0754 7061'), //Belgium - array('BA39 1290 0794 0102 8494'), //Bosnia and Herzegovina - array('BG80 BNBG 9661 1020 3456 78'), //Bulgaria - array('BY 13 NBRB 3600 900000002Z00AB00'), //Belarus - array('BY13 NBRB 3600 900000002Z00AB00'), //Belarus - array('BY22NB23324232T78YR7823HR32U'), //Belarus - array('HR12 1001 0051 8630 0016 0'), //Croatia - array('CY17 0020 0128 0000 0012 0052 7600'), //Cyprus - array('CZ65 0800 0000 1920 0014 5399'), //Czech Republic - array('DK50 0040 0440 1162 43'), //Denmark - array('EE38 2200 2210 2014 5685'), //Estonia - array('FO97 5432 0388 8999 44'), //Faroe Islands - array('FI21 1234 5600 0007 85'), //Finland - array('FR14 2004 1010 0505 0001 3M02 606'), //France - array('GE29 NB00 0000 0101 9049 17'), //Georgia - array('DE89 3704 0044 0532 0130 00'), //Germany - array('GI75 NWBK 0000 0000 7099 453'), //Gibraltar - array('GR16 0110 1250 0000 0001 2300 695'), //Greece - array('GL56 0444 9876 5432 10'), //Greenland - array('HU42 1177 3016 1111 1018 0000 0000'), //Hungary - array('IS14 0159 2600 7654 5510 7303 39'), //Iceland - array('IE29 AIBK 9311 5212 3456 78'), //Ireland - array('IL62 0108 0000 0009 9999 999'), //Israel - array('IT40 S054 2811 1010 0000 0123 456'), //Italy - array('LV80 BANK 0000 4351 9500 1'), //Latvia - array('LB62 0999 0000 0001 0019 0122 9114'), //Lebanon - array('LI21 0881 0000 2324 013A A'), //Liechtenstein - array('LT12 1000 0111 0100 1000'), //Lithuania - array('LU28 0019 4006 4475 0000'), //Luxembourg - array('MK072 5012 0000 0589 84'), //Macedonia - array('MT84 MALT 0110 0001 2345 MTLC AST0 01S'), //Malta - array('MU17 BOMM 0101 1010 3030 0200 000M UR'), //Mauritius - array('MD24 AG00 0225 1000 1310 4168'), //Moldova - array('MC93 2005 2222 1001 1223 3M44 555'), //Monaco - array('ME25 5050 0001 2345 6789 51'), //Montenegro - array('NL39 RABO 0300 0652 64'), //Netherlands - array('NO93 8601 1117 947'), //Norway - array('PK36 SCBL 0000 0011 2345 6702'), //Pakistan - array('PL60 1020 1026 0000 0422 7020 1111'), //Poland - array('PT50 0002 0123 1234 5678 9015 4'), //Portugal - array('RO49 AAAA 1B31 0075 9384 0000'), //Romania - array('SM86 U032 2509 8000 0000 0270 100'), //San Marino - array('SA03 8000 0000 6080 1016 7519'), //Saudi Arabia - array('RS35 2600 0560 1001 6113 79'), //Serbia - array('SK31 1200 0000 1987 4263 7541'), //Slovak Republic - array('SI56 1910 0000 0123 438'), //Slovenia - array('ES80 2310 0001 1800 0001 2345'), //Spain - array('SE35 5000 0000 0549 1000 0003'), //Sweden - array('CH93 0076 2011 6238 5295 7'), //Switzerland - array('TN59 1000 6035 1835 9847 8831'), //Tunisia - array('TR33 0006 1005 1978 6457 8413 26'), //Turkey - array('AE07 0331 2345 6789 0123 456'), //UAE - array('GB12 CPBK 0892 9965 0449 91'), //United Kingdom + ['AL47 2121 1009 0000 0002 3569 8741'], //Albania + ['AD12 0001 2030 2003 5910 0100'], //Andorra + ['AT61 1904 3002 3457 3201'], //Austria + ['AZ21 NABZ 0000 0000 1370 1000 1944'], //Azerbaijan + ['BH67 BMAG 0000 1299 1234 56'], //Bahrain + ['BE62 5100 0754 7061'], //Belgium + ['BA39 1290 0794 0102 8494'], //Bosnia and Herzegovina + ['BG80 BNBG 9661 1020 3456 78'], //Bulgaria + ['BY 13 NBRB 3600 900000002Z00AB00'], //Belarus + ['BY13 NBRB 3600 900000002Z00AB00'], //Belarus + ['BY22NB23324232T78YR7823HR32U'], //Belarus + ['HR12 1001 0051 8630 0016 0'], //Croatia + ['CY17 0020 0128 0000 0012 0052 7600'], //Cyprus + ['CZ65 0800 0000 1920 0014 5399'], //Czech Republic + ['DK50 0040 0440 1162 43'], //Denmark + ['EE38 2200 2210 2014 5685'], //Estonia + ['FO97 5432 0388 8999 44'], //Faroe Islands + ['FI21 1234 5600 0007 85'], //Finland + ['FR14 2004 1010 0505 0001 3M02 606'], //France + ['GE29 NB00 0000 0101 9049 17'], //Georgia + ['DE89 3704 0044 0532 0130 00'], //Germany + ['GI75 NWBK 0000 0000 7099 453'], //Gibraltar + ['GR16 0110 1250 0000 0001 2300 695'], //Greece + ['GL56 0444 9876 5432 10'], //Greenland + ['HU42 1177 3016 1111 1018 0000 0000'], //Hungary + ['IS14 0159 2600 7654 5510 7303 39'], //Iceland + ['IE29 AIBK 9311 5212 3456 78'], //Ireland + ['IL62 0108 0000 0009 9999 999'], //Israel + ['IT40 S054 2811 1010 0000 0123 456'], //Italy + ['LV80 BANK 0000 4351 9500 1'], //Latvia + ['LB62 0999 0000 0001 0019 0122 9114'], //Lebanon + ['LI21 0881 0000 2324 013A A'], //Liechtenstein + ['LT12 1000 0111 0100 1000'], //Lithuania + ['LU28 0019 4006 4475 0000'], //Luxembourg + ['MK072 5012 0000 0589 84'], //Macedonia + ['MT84 MALT 0110 0001 2345 MTLC AST0 01S'], //Malta + ['MU17 BOMM 0101 1010 3030 0200 000M UR'], //Mauritius + ['MD24 AG00 0225 1000 1310 4168'], //Moldova + ['MC93 2005 2222 1001 1223 3M44 555'], //Monaco + ['ME25 5050 0001 2345 6789 51'], //Montenegro + ['NL39 RABO 0300 0652 64'], //Netherlands + ['NO93 8601 1117 947'], //Norway + ['PK36 SCBL 0000 0011 2345 6702'], //Pakistan + ['PL60 1020 1026 0000 0422 7020 1111'], //Poland + ['PT50 0002 0123 1234 5678 9015 4'], //Portugal + ['RO49 AAAA 1B31 0075 9384 0000'], //Romania + ['SM86 U032 2509 8000 0000 0270 100'], //San Marino + ['SA03 8000 0000 6080 1016 7519'], //Saudi Arabia + ['RS35 2600 0560 1001 6113 79'], //Serbia + ['SK31 1200 0000 1987 4263 7541'], //Slovak Republic + ['SI56 1910 0000 0123 438'], //Slovenia + ['ES80 2310 0001 1800 0001 2345'], //Spain + ['SE35 5000 0000 0549 1000 0003'], //Sweden + ['CH93 0076 2011 6238 5295 7'], //Switzerland + ['TN59 1000 6035 1835 9847 8831'], //Tunisia + ['TR33 0006 1005 1978 6457 8413 26'], //Turkey + ['AE07 0331 2345 6789 0123 456'], //UAE + ['GB12 CPBK 0892 9965 0449 91'], //United Kingdom //Extended country list //http://www.nordea.com/Our+services/International+products+and+services/Cash+Management/IBAN+countries/908462.html // https://www.swift.com/sites/default/files/resources/iban_registry.pdf - array('AO06000600000100037131174'), //Angola - array('AZ21NABZ00000000137010001944'), //Azerbaijan - array('BH29BMAG1299123456BH00'), //Bahrain - array('BJ11B00610100400271101192591'), //Benin - array('BR9700360305000010009795493P1'), // Brazil - array('BR1800000000141455123924100C2'), // Brazil - array('VG96VPVG0000012345678901'), //British Virgin Islands - array('BF1030134020015400945000643'), //Burkina Faso - array('BI43201011067444'), //Burundi - array('CM2110003001000500000605306'), //Cameroon - array('CV64000300004547069110176'), //Cape Verde - array('FR7630007000110009970004942'), //Central African Republic - array('CG5230011000202151234567890'), //Congo - array('CR05015202001026284066'), //Costa Rica - array('DO28BAGR00000001212453611324'), //Dominican Republic - array('GT82TRAJ01020000001210029690'), //Guatemala - array('IR580540105180021273113007'), //Iran - array('IL620108000000099999999'), //Israel - array('CI05A00060174100178530011852'), //Ivory Coast - array('JO94CBJO0010000000000131000302'), // Jordan - array('KZ176010251000042993'), //Kazakhstan - array('KW74NBOK0000000000001000372151'), //Kuwait - array('LB30099900000001001925579115'), //Lebanon - array('MG4600005030010101914016056'), //Madagascar - array('ML03D00890170001002120000447'), //Mali - array('MR1300012000010000002037372'), //Mauritania - array('MU17BOMM0101101030300200000MUR'), //Mauritius - array('MZ59000100000011834194157'), //Mozambique - array('PS92PALS000000000400123456702'), //Palestinian Territory - array('QA58DOHB00001234567890ABCDEFG'), //Qatar - array('XK051212012345678906'), //Republic of Kosovo - array('PT50000200000163099310355'), //Sao Tome and Principe - array('SA0380000000608010167519'), //Saudi Arabia - array('SN12K00100152000025690007542'), //Senegal - array('TL380080012345678910157'), //Timor-Leste - array('TN5914207207100707129648'), //Tunisia - array('TR330006100519786457841326'), //Turkey - array('UA213223130000026007233566001'), //Ukraine - array('AE260211000000230064016'), //United Arab Emirates - ); + ['AO06000600000100037131174'], //Angola + ['AZ21NABZ00000000137010001944'], //Azerbaijan + ['BH29BMAG1299123456BH00'], //Bahrain + ['BJ11B00610100400271101192591'], //Benin + ['BR9700360305000010009795493P1'], // Brazil + ['BR1800000000141455123924100C2'], // Brazil + ['VG96VPVG0000012345678901'], //British Virgin Islands + ['BF1030134020015400945000643'], //Burkina Faso + ['BI43201011067444'], //Burundi + ['CM2110003001000500000605306'], //Cameroon + ['CV64000300004547069110176'], //Cape Verde + ['FR7630007000110009970004942'], //Central African Republic + ['CG5230011000202151234567890'], //Congo + ['CR05015202001026284066'], //Costa Rica + ['DO28BAGR00000001212453611324'], //Dominican Republic + ['GT82TRAJ01020000001210029690'], //Guatemala + ['IR580540105180021273113007'], //Iran + ['IL620108000000099999999'], //Israel + ['CI05A00060174100178530011852'], //Ivory Coast + ['JO94CBJO0010000000000131000302'], // Jordan + ['KZ176010251000042993'], //Kazakhstan + ['KW74NBOK0000000000001000372151'], //Kuwait + ['LB30099900000001001925579115'], //Lebanon + ['MG4600005030010101914016056'], //Madagascar + ['ML03D00890170001002120000447'], //Mali + ['MR1300012000010000002037372'], //Mauritania + ['MU17BOMM0101101030300200000MUR'], //Mauritius + ['MZ59000100000011834194157'], //Mozambique + ['PS92PALS000000000400123456702'], //Palestinian Territory + ['QA58DOHB00001234567890ABCDEFG'], //Qatar + ['XK051212012345678906'], //Republic of Kosovo + ['PT50000200000163099310355'], //Sao Tome and Principe + ['SA0380000000608010167519'], //Saudi Arabia + ['SN12K00100152000025690007542'], //Senegal + ['TL380080012345678910157'], //Timor-Leste + ['TN5914207207100707129648'], //Tunisia + ['TR330006100519786457841326'], //Turkey + ['UA213223130000026007233566001'], //Ukraine + ['AE260211000000230064016'], //United Arab Emirates + ['VA59001123000012345678'], //Vatican City State + ]; } /** @@ -169,112 +170,113 @@ class IbanValidatorTest extends ConstraintValidatorTestCase public function getIbansWithInvalidFormat() { - return array( - array('AL47 2121 1009 0000 0002 3569 874'), //Albania - array('AD12 0001 2030 2003 5910 010'), //Andorra - array('AT61 1904 3002 3457 320'), //Austria - array('AZ21 NABZ 0000 0000 1370 1000 194'), //Azerbaijan - array('AZ21 N1BZ 0000 0000 1370 1000 1944'), //Azerbaijan - array('BH67 BMAG 0000 1299 1234 5'), //Bahrain - array('BH67 B2AG 0000 1299 1234 56'), //Bahrain - array('BE62 5100 0754 7061 2'), //Belgium - array('BA39 1290 0794 0102 8494 4'), //Bosnia and Herzegovina - array('BG80 BNBG 9661 1020 3456 7'), //Bulgaria - array('BG80 B2BG 9661 1020 3456 78'), //Bulgaria - array('BY 13 NBRB 3600 900000002Z00AB001'), //Belarus - array('BY 13 NBRB 3600 900000002Z00AB0'), //Belarus - array('BYRO NBRB 3600 900000002Z00AB0'), //Belarus - array('BY 13 3600 NBRB 900000002Z00AB05'), //Belarus - array('HR12 1001 0051 8630 0016 01'), //Croatia - array('CY17 0020 0128 0000 0012 0052 7600 1'), //Cyprus - array('CZ65 0800 0000 1920 0014 5399 1'), //Czech Republic - array('DK50 0040 0440 1162 431'), //Denmark - array('EE38 2200 2210 2014 5685 1'), //Estonia - array('FO97 5432 0388 8999 441'), //Faroe Islands - array('FI21 1234 5600 0007 851'), //Finland - array('FR14 2004 1010 0505 0001 3M02 6061'), //France - array('GE29 NB00 0000 0101 9049 171'), //Georgia - array('DE89 3704 0044 0532 0130 001'), //Germany - array('GI75 NWBK 0000 0000 7099 4531'), //Gibraltar - array('GR16 0110 1250 0000 0001 2300 6951'), //Greece - array('GL56 0444 9876 5432 101'), //Greenland - array('HU42 1177 3016 1111 1018 0000 0000 1'), //Hungary - array('IS14 0159 2600 7654 5510 7303 391'), //Iceland - array('IE29 AIBK 9311 5212 3456 781'), //Ireland - array('IL62 0108 0000 0009 9999 9991'), //Israel - array('IT40 S054 2811 1010 0000 0123 4561'), //Italy - array('LV80 BANK 0000 4351 9500 11'), //Latvia - array('LB62 0999 0000 0001 0019 0122 9114 1'), //Lebanon - array('LI21 0881 0000 2324 013A A1'), //Liechtenstein - array('LT12 1000 0111 0100 1000 1'), //Lithuania - array('LU28 0019 4006 4475 0000 1'), //Luxembourg - array('MK072 5012 0000 0589 84 1'), //Macedonia - array('MT84 MALT 0110 0001 2345 MTLC AST0 01SA'), //Malta - array('MU17 BOMM 0101 1010 3030 0200 000M URA'), //Mauritius - array('MD24 AG00 0225 1000 1310 4168 1'), //Moldova - array('MC93 2005 2222 1001 1223 3M44 5551'), //Monaco - array('ME25 5050 0001 2345 6789 511'), //Montenegro - array('NL39 RABO 0300 0652 641'), //Netherlands - array('NO93 8601 1117 9471'), //Norway - array('PK36 SCBL 0000 0011 2345 6702 1'), //Pakistan - array('PL60 1020 1026 0000 0422 7020 1111 1'), //Poland - array('PT50 0002 0123 1234 5678 9015 41'), //Portugal - array('RO49 AAAA 1B31 0075 9384 0000 1'), //Romania - array('SM86 U032 2509 8000 0000 0270 1001'), //San Marino - array('SA03 8000 0000 6080 1016 7519 1'), //Saudi Arabia - array('RS35 2600 0560 1001 6113 791'), //Serbia - array('SK31 1200 0000 1987 4263 7541 1'), //Slovak Republic - array('SI56 1910 0000 0123 4381'), //Slovenia - array('ES80 2310 0001 1800 0001 2345 1'), //Spain - array('SE35 5000 0000 0549 1000 0003 1'), //Sweden - array('CH93 0076 2011 6238 5295 71'), //Switzerland - array('TN59 1000 6035 1835 9847 8831 1'), //Tunisia - array('TR33 0006 1005 1978 6457 8413 261'), //Turkey - array('AE07 0331 2345 6789 0123 4561'), //UAE - array('GB12 CPBK 0892 9965 0449 911'), //United Kingdom + return [ + ['AL47 2121 1009 0000 0002 3569 874'], //Albania + ['AD12 0001 2030 2003 5910 010'], //Andorra + ['AT61 1904 3002 3457 320'], //Austria + ['AZ21 NABZ 0000 0000 1370 1000 194'], //Azerbaijan + ['AZ21 N1BZ 0000 0000 1370 1000 1944'], //Azerbaijan + ['BH67 BMAG 0000 1299 1234 5'], //Bahrain + ['BH67 B2AG 0000 1299 1234 56'], //Bahrain + ['BE62 5100 0754 7061 2'], //Belgium + ['BA39 1290 0794 0102 8494 4'], //Bosnia and Herzegovina + ['BG80 BNBG 9661 1020 3456 7'], //Bulgaria + ['BG80 B2BG 9661 1020 3456 78'], //Bulgaria + ['BY 13 NBRB 3600 900000002Z00AB001'], //Belarus + ['BY 13 NBRB 3600 900000002Z00AB0'], //Belarus + ['BYRO NBRB 3600 900000002Z00AB0'], //Belarus + ['BY 13 3600 NBRB 900000002Z00AB05'], //Belarus + ['HR12 1001 0051 8630 0016 01'], //Croatia + ['CY17 0020 0128 0000 0012 0052 7600 1'], //Cyprus + ['CZ65 0800 0000 1920 0014 5399 1'], //Czech Republic + ['DK50 0040 0440 1162 431'], //Denmark + ['EE38 2200 2210 2014 5685 1'], //Estonia + ['FO97 5432 0388 8999 441'], //Faroe Islands + ['FI21 1234 5600 0007 851'], //Finland + ['FR14 2004 1010 0505 0001 3M02 6061'], //France + ['GE29 NB00 0000 0101 9049 171'], //Georgia + ['DE89 3704 0044 0532 0130 001'], //Germany + ['GI75 NWBK 0000 0000 7099 4531'], //Gibraltar + ['GR16 0110 1250 0000 0001 2300 6951'], //Greece + ['GL56 0444 9876 5432 101'], //Greenland + ['HU42 1177 3016 1111 1018 0000 0000 1'], //Hungary + ['IS14 0159 2600 7654 5510 7303 391'], //Iceland + ['IE29 AIBK 9311 5212 3456 781'], //Ireland + ['IL62 0108 0000 0009 9999 9991'], //Israel + ['IT40 S054 2811 1010 0000 0123 4561'], //Italy + ['LV80 BANK 0000 4351 9500 11'], //Latvia + ['LB62 0999 0000 0001 0019 0122 9114 1'], //Lebanon + ['LI21 0881 0000 2324 013A A1'], //Liechtenstein + ['LT12 1000 0111 0100 1000 1'], //Lithuania + ['LU28 0019 4006 4475 0000 1'], //Luxembourg + ['MK072 5012 0000 0589 84 1'], //Macedonia + ['MT84 MALT 0110 0001 2345 MTLC AST0 01SA'], //Malta + ['MU17 BOMM 0101 1010 3030 0200 000M URA'], //Mauritius + ['MD24 AG00 0225 1000 1310 4168 1'], //Moldova + ['MC93 2005 2222 1001 1223 3M44 5551'], //Monaco + ['ME25 5050 0001 2345 6789 511'], //Montenegro + ['NL39 RABO 0300 0652 641'], //Netherlands + ['NO93 8601 1117 9471'], //Norway + ['PK36 SCBL 0000 0011 2345 6702 1'], //Pakistan + ['PL60 1020 1026 0000 0422 7020 1111 1'], //Poland + ['PT50 0002 0123 1234 5678 9015 41'], //Portugal + ['RO49 AAAA 1B31 0075 9384 0000 1'], //Romania + ['SM86 U032 2509 8000 0000 0270 1001'], //San Marino + ['SA03 8000 0000 6080 1016 7519 1'], //Saudi Arabia + ['RS35 2600 0560 1001 6113 791'], //Serbia + ['SK31 1200 0000 1987 4263 7541 1'], //Slovak Republic + ['SI56 1910 0000 0123 4381'], //Slovenia + ['ES80 2310 0001 1800 0001 2345 1'], //Spain + ['SE35 5000 0000 0549 1000 0003 1'], //Sweden + ['CH93 0076 2011 6238 5295 71'], //Switzerland + ['TN59 1000 6035 1835 9847 8831 1'], //Tunisia + ['TR33 0006 1005 1978 6457 8413 261'], //Turkey + ['AE07 0331 2345 6789 0123 4561'], //UAE + ['GB12 CPBK 0892 9965 0449 911'], //United Kingdom //Extended country list - array('AO060006000001000371311741'), //Angola - array('AZ21NABZ000000001370100019441'), //Azerbaijan - array('BH29BMAG1299123456BH001'), //Bahrain - array('BJ11B006101004002711011925911'), //Benin - array('BR9700360305000010009795493P11'), // Brazil - array('BR1800000000141455123924100C21'), // Brazil - array('VG96VPVG00000123456789011'), //British Virgin Islands - array('BF10301340200154009450006431'), //Burkina Faso - array('BI432010110674441'), //Burundi - array('CM21100030010005000006053061'), //Cameroon - array('CV640003000045470691101761'), //Cape Verde - array('FR76300070001100099700049421'), //Central African Republic - array('CG52300110002021512345678901'), //Congo - array('CR05152020010262840661'), //Costa Rica - array('CR0515202001026284066'), //Costa Rica - array('DO28BAGR000000012124536113241'), //Dominican Republic - array('GT82TRAJ010200000012100296901'), //Guatemala - array('IR5805401051800212731130071'), //Iran - array('IL6201080000000999999991'), //Israel - array('CI05A000601741001785300118521'), //Ivory Coast - array('JO94CBJO00100000000001310003021'), // Jordan - array('KZ1760102510000429931'), //Kazakhstan - array('KW74NBOK00000000000010003721511'), //Kuwait - array('LB300999000000010019255791151'), //Lebanon - array('MG46000050300101019140160561'), //Madagascar - array('ML03D008901700010021200004471'), //Mali - array('MR13000120000100000020373721'), //Mauritania - array('MU17BOMM0101101030300200000MUR1'), //Mauritius - array('MZ590001000000118341941571'), //Mozambique - array('PS92PALS0000000004001234567021'), //Palestinian Territory - array('QA58DOHB00001234567890ABCDEFG1'), //Qatar - array('XK0512120123456789061'), //Republic of Kosovo - array('PT500002000001630993103551'), //Sao Tome and Principe - array('SA03800000006080101675191'), //Saudi Arabia - array('SN12K001001520000256900075421'), //Senegal - array('TL3800800123456789101571'), //Timor-Leste - array('TN59142072071007071296481'), //Tunisia - array('TR3300061005197864578413261'), //Turkey - array('UA21AAAA1300000260072335660012'), //Ukraine - array('AE2602110000002300640161'), //United Arab Emirates - ); + ['AO060006000001000371311741'], //Angola + ['AZ21NABZ000000001370100019441'], //Azerbaijan + ['BH29BMAG1299123456BH001'], //Bahrain + ['BJ11B006101004002711011925911'], //Benin + ['BR9700360305000010009795493P11'], // Brazil + ['BR1800000000141455123924100C21'], // Brazil + ['VG96VPVG00000123456789011'], //British Virgin Islands + ['BF10301340200154009450006431'], //Burkina Faso + ['BI432010110674441'], //Burundi + ['CM21100030010005000006053061'], //Cameroon + ['CV640003000045470691101761'], //Cape Verde + ['FR76300070001100099700049421'], //Central African Republic + ['CG52300110002021512345678901'], //Congo + ['CR05152020010262840661'], //Costa Rica + ['CR0515202001026284066'], //Costa Rica + ['DO28BAGR000000012124536113241'], //Dominican Republic + ['GT82TRAJ010200000012100296901'], //Guatemala + ['IR5805401051800212731130071'], //Iran + ['IL6201080000000999999991'], //Israel + ['CI05A000601741001785300118521'], //Ivory Coast + ['JO94CBJO00100000000001310003021'], // Jordan + ['KZ1760102510000429931'], //Kazakhstan + ['KW74NBOK00000000000010003721511'], //Kuwait + ['LB300999000000010019255791151'], //Lebanon + ['MG46000050300101019140160561'], //Madagascar + ['ML03D008901700010021200004471'], //Mali + ['MR13000120000100000020373721'], //Mauritania + ['MU17BOMM0101101030300200000MUR1'], //Mauritius + ['MZ590001000000118341941571'], //Mozambique + ['PS92PALS0000000004001234567021'], //Palestinian Territory + ['QA58DOHB00001234567890ABCDEFG1'], //Qatar + ['XK0512120123456789061'], //Republic of Kosovo + ['PT500002000001630993103551'], //Sao Tome and Principe + ['SA03800000006080101675191'], //Saudi Arabia + ['SN12K001001520000256900075421'], //Senegal + ['TL3800800123456789101571'], //Timor-Leste + ['TN59142072071007071296481'], //Tunisia + ['TR3300061005197864578413261'], //Turkey + ['UA21AAAA1300000260072335660012'], //Ukraine + ['AE2602110000002300640161'], //United Arab Emirates + ['VA590011230000123456781'], //Vatican City State + ]; } /** @@ -287,105 +289,106 @@ class IbanValidatorTest extends ConstraintValidatorTestCase public function getIbansWithValidFormatButIncorrectChecksum() { - return array( - array('AL47 2121 1009 0000 0002 3569 8742'), //Albania - array('AD12 0001 2030 2003 5910 0101'), //Andorra - array('AT61 1904 3002 3457 3202'), //Austria - array('AZ21 NABZ 0000 0000 1370 1000 1945'), //Azerbaijan - array('BH67 BMAG 0000 1299 1234 57'), //Bahrain - array('BE62 5100 0754 7062'), //Belgium - array('BA39 1290 0794 0102 8495'), //Bosnia and Herzegovina - array('BG80 BNBG 9661 1020 3456 79'), //Bulgaria - array('BY90 NBRB 3600 900000002Z00AB00'), //Belarus - array('HR12 1001 0051 8630 0016 1'), //Croatia - array('CY17 0020 0128 0000 0012 0052 7601'), //Cyprus - array('CZ65 0800 0000 1920 0014 5398'), //Czech Republic - array('DK50 0040 0440 1162 44'), //Denmark - array('EE38 2200 2210 2014 5684'), //Estonia - array('FO97 5432 0388 8999 43'), //Faroe Islands - array('FI21 1234 5600 0007 84'), //Finland - array('FR14 2004 1010 0505 0001 3M02 605'), //France - array('GE29 NB00 0000 0101 9049 16'), //Georgia - array('DE89 3704 0044 0532 0130 01'), //Germany - array('GI75 NWBK 0000 0000 7099 452'), //Gibraltar - array('GR16 0110 1250 0000 0001 2300 694'), //Greece - array('GL56 0444 9876 5432 11'), //Greenland - array('HU42 1177 3016 1111 1018 0000 0001'), //Hungary - array('IS14 0159 2600 7654 5510 7303 38'), //Iceland - array('IE29 AIBK 9311 5212 3456 79'), //Ireland - array('IL62 0108 0000 0009 9999 998'), //Israel - array('IT40 S054 2811 1010 0000 0123 457'), //Italy - array('LV80 BANK 0000 4351 9500 2'), //Latvia - array('LB62 0999 0000 0001 0019 0122 9115'), //Lebanon - array('LI21 0881 0000 2324 013A B'), //Liechtenstein - array('LT12 1000 0111 0100 1001'), //Lithuania - array('LU28 0019 4006 4475 0001'), //Luxembourg - array('MK072 5012 0000 0589 85'), //Macedonia - array('MT84 MALT 0110 0001 2345 MTLC AST0 01T'), //Malta - array('MU17 BOMM 0101 1010 3030 0200 000M UP'), //Mauritius - array('MD24 AG00 0225 1000 1310 4169'), //Moldova - array('MC93 2005 2222 1001 1223 3M44 554'), //Monaco - array('ME25 5050 0001 2345 6789 52'), //Montenegro - array('NL39 RABO 0300 0652 65'), //Netherlands - array('NO93 8601 1117 948'), //Norway - array('PK36 SCBL 0000 0011 2345 6703'), //Pakistan - array('PL60 1020 1026 0000 0422 7020 1112'), //Poland - array('PT50 0002 0123 1234 5678 9015 5'), //Portugal - array('RO49 AAAA 1B31 0075 9384 0001'), //Romania - array('SM86 U032 2509 8000 0000 0270 101'), //San Marino - array('SA03 8000 0000 6080 1016 7518'), //Saudi Arabia - array('RS35 2600 0560 1001 6113 78'), //Serbia - array('SK31 1200 0000 1987 4263 7542'), //Slovak Republic - array('SI56 1910 0000 0123 439'), //Slovenia - array('ES80 2310 0001 1800 0001 2346'), //Spain - array('SE35 5000 0000 0549 1000 0004'), //Sweden - array('CH93 0076 2011 6238 5295 8'), //Switzerland - array('TN59 1000 6035 1835 9847 8832'), //Tunisia - array('TR33 0006 1005 1978 6457 8413 27'), //Turkey - array('AE07 0331 2345 6789 0123 457'), //UAE - array('GB12 CPBK 0892 9965 0449 92'), //United Kingdom + return [ + ['AL47 2121 1009 0000 0002 3569 8742'], //Albania + ['AD12 0001 2030 2003 5910 0101'], //Andorra + ['AT61 1904 3002 3457 3202'], //Austria + ['AZ21 NABZ 0000 0000 1370 1000 1945'], //Azerbaijan + ['BH67 BMAG 0000 1299 1234 57'], //Bahrain + ['BE62 5100 0754 7062'], //Belgium + ['BA39 1290 0794 0102 8495'], //Bosnia and Herzegovina + ['BG80 BNBG 9661 1020 3456 79'], //Bulgaria + ['BY90 NBRB 3600 900000002Z00AB00'], //Belarus + ['HR12 1001 0051 8630 0016 1'], //Croatia + ['CY17 0020 0128 0000 0012 0052 7601'], //Cyprus + ['CZ65 0800 0000 1920 0014 5398'], //Czech Republic + ['DK50 0040 0440 1162 44'], //Denmark + ['EE38 2200 2210 2014 5684'], //Estonia + ['FO97 5432 0388 8999 43'], //Faroe Islands + ['FI21 1234 5600 0007 84'], //Finland + ['FR14 2004 1010 0505 0001 3M02 605'], //France + ['GE29 NB00 0000 0101 9049 16'], //Georgia + ['DE89 3704 0044 0532 0130 01'], //Germany + ['GI75 NWBK 0000 0000 7099 452'], //Gibraltar + ['GR16 0110 1250 0000 0001 2300 694'], //Greece + ['GL56 0444 9876 5432 11'], //Greenland + ['HU42 1177 3016 1111 1018 0000 0001'], //Hungary + ['IS14 0159 2600 7654 5510 7303 38'], //Iceland + ['IE29 AIBK 9311 5212 3456 79'], //Ireland + ['IL62 0108 0000 0009 9999 998'], //Israel + ['IT40 S054 2811 1010 0000 0123 457'], //Italy + ['LV80 BANK 0000 4351 9500 2'], //Latvia + ['LB62 0999 0000 0001 0019 0122 9115'], //Lebanon + ['LI21 0881 0000 2324 013A B'], //Liechtenstein + ['LT12 1000 0111 0100 1001'], //Lithuania + ['LU28 0019 4006 4475 0001'], //Luxembourg + ['MK072 5012 0000 0589 85'], //Macedonia + ['MT84 MALT 0110 0001 2345 MTLC AST0 01T'], //Malta + ['MU17 BOMM 0101 1010 3030 0200 000M UP'], //Mauritius + ['MD24 AG00 0225 1000 1310 4169'], //Moldova + ['MC93 2005 2222 1001 1223 3M44 554'], //Monaco + ['ME25 5050 0001 2345 6789 52'], //Montenegro + ['NL39 RABO 0300 0652 65'], //Netherlands + ['NO93 8601 1117 948'], //Norway + ['PK36 SCBL 0000 0011 2345 6703'], //Pakistan + ['PL60 1020 1026 0000 0422 7020 1112'], //Poland + ['PT50 0002 0123 1234 5678 9015 5'], //Portugal + ['RO49 AAAA 1B31 0075 9384 0001'], //Romania + ['SM86 U032 2509 8000 0000 0270 101'], //San Marino + ['SA03 8000 0000 6080 1016 7518'], //Saudi Arabia + ['RS35 2600 0560 1001 6113 78'], //Serbia + ['SK31 1200 0000 1987 4263 7542'], //Slovak Republic + ['SI56 1910 0000 0123 439'], //Slovenia + ['ES80 2310 0001 1800 0001 2346'], //Spain + ['SE35 5000 0000 0549 1000 0004'], //Sweden + ['CH93 0076 2011 6238 5295 8'], //Switzerland + ['TN59 1000 6035 1835 9847 8832'], //Tunisia + ['TR33 0006 1005 1978 6457 8413 27'], //Turkey + ['AE07 0331 2345 6789 0123 457'], //UAE + ['GB12 CPBK 0892 9965 0449 92'], //United Kingdom //Extended country list - array('AO06000600000100037131175'), //Angola - array('AZ21NABZ00000000137010001945'), //Azerbaijan - array('BH29BMAG1299123456BH01'), //Bahrain - array('BJ11B00610100400271101192592'), //Benin - array('BR9700360305000010009795493P2'), // Brazil - array('BR1800000000141455123924100C3'), // Brazil - array('VG96VPVG0000012345678902'), //British Virgin Islands - array('BF1030134020015400945000644'), //Burkina Faso - array('BI43201011067445'), //Burundi - array('CM2110003001000500000605307'), //Cameroon - array('CV64000300004547069110177'), //Cape Verde - array('FR7630007000110009970004943'), //Central African Republic - array('CG5230011000202151234567891'), //Congo - array('CR96042332432534543564'), //Costa Rica - array('DO28BAGR00000001212453611325'), //Dominican Republic - array('GT82TRAJ01020000001210029691'), //Guatemala - array('IR580540105180021273113008'), //Iran - array('IL620108000000099999998'), //Israel - array('CI05A00060174100178530011853'), //Ivory Coast - array('JO94CBJO0010000000000131000303'), // Jordan - array('KZ176010251000042994'), //Kazakhstan - array('KW74NBOK0000000000001000372152'), //Kuwait - array('LB30099900000001001925579116'), //Lebanon - array('MG4600005030010101914016057'), //Madagascar - array('ML03D00890170001002120000448'), //Mali - array('MR1300012000010000002037373'), //Mauritania - array('MU17BOMM0101101030300200000MUP'), //Mauritius - array('MZ59000100000011834194158'), //Mozambique - array('PS92PALS000000000400123456703'), //Palestinian Territory - array('QA58DOHB00001234567890ABCDEFH'), //Qatar - array('XK051212012345678907'), //Republic of Kosovo - array('PT50000200000163099310356'), //Sao Tome and Principe - array('SA0380000000608010167518'), //Saudi Arabia - array('SN12K00100152000025690007543'), //Senegal - array('TL380080012345678910158'), //Timor-Leste - array('TN5914207207100707129649'), //Tunisia - array('TR330006100519786457841327'), //Turkey - array('UA213223130000026007233566002'), //Ukraine - array('AE260211000000230064017'), //United Arab Emirates - ); + ['AO06000600000100037131175'], //Angola + ['AZ21NABZ00000000137010001945'], //Azerbaijan + ['BH29BMAG1299123456BH01'], //Bahrain + ['BJ11B00610100400271101192592'], //Benin + ['BR9700360305000010009795493P2'], // Brazil + ['BR1800000000141455123924100C3'], // Brazil + ['VG96VPVG0000012345678902'], //British Virgin Islands + ['BF1030134020015400945000644'], //Burkina Faso + ['BI43201011067445'], //Burundi + ['CM2110003001000500000605307'], //Cameroon + ['CV64000300004547069110177'], //Cape Verde + ['FR7630007000110009970004943'], //Central African Republic + ['CG5230011000202151234567891'], //Congo + ['CR96042332432534543564'], //Costa Rica + ['DO28BAGR00000001212453611325'], //Dominican Republic + ['GT82TRAJ01020000001210029691'], //Guatemala + ['IR580540105180021273113008'], //Iran + ['IL620108000000099999998'], //Israel + ['CI05A00060174100178530011853'], //Ivory Coast + ['JO94CBJO0010000000000131000303'], // Jordan + ['KZ176010251000042994'], //Kazakhstan + ['KW74NBOK0000000000001000372152'], //Kuwait + ['LB30099900000001001925579116'], //Lebanon + ['MG4600005030010101914016057'], //Madagascar + ['ML03D00890170001002120000448'], //Mali + ['MR1300012000010000002037373'], //Mauritania + ['MU17BOMM0101101030300200000MUP'], //Mauritius + ['MZ59000100000011834194158'], //Mozambique + ['PS92PALS000000000400123456703'], //Palestinian Territory + ['QA58DOHB00001234567890ABCDEFH'], //Qatar + ['XK051212012345678907'], //Republic of Kosovo + ['PT50000200000163099310356'], //Sao Tome and Principe + ['SA0380000000608010167518'], //Saudi Arabia + ['SN12K00100152000025690007543'], //Senegal + ['TL380080012345678910158'], //Timor-Leste + ['TN5914207207100707129649'], //Tunisia + ['TR330006100519786457841327'], //Turkey + ['UA213223130000026007233566002'], //Ukraine + ['AE260211000000230064017'], //United Arab Emirates + ['VA59001123000012345671'], //Vatican City State + ]; } /** @@ -398,13 +401,13 @@ class IbanValidatorTest extends ConstraintValidatorTestCase public function getUnsupportedCountryCodes() { - return array( - array('AG'), - array('AI'), - array('AQ'), - array('AS'), - array('AW'), - ); + return [ + ['AG'], + ['AI'], + ['AQ'], + ['AS'], + ['AW'], + ]; } public function testIbansWithInvalidCharacters() @@ -422,18 +425,18 @@ class IbanValidatorTest extends ConstraintValidatorTestCase public function getIbansWithInvalidCountryCode() { - return array( - array('0750447346'), - array('2X0750447346'), - array('A20750447346'), - ); + return [ + ['0750447346'], + ['2X0750447346'], + ['A20750447346'], + ]; } private function assertViolationRaised($iban, $code) { - $constraint = new Iban(array( + $constraint = new Iban([ 'message' => 'myMessage', - )); + ]); $this->validator->validate($iban, $constraint); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php index 360eccab..c96ac16a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php @@ -55,16 +55,16 @@ class IdenticalToValidatorTest extends AbstractComparisonValidatorTestCase $date = new \DateTime('2000-01-01'); $object = new ComparisonTest_Class(2); - $comparisons = array( - array(3, 3), - array('a', 'a'), - array($date, $date), - array($object, $object), - array(null, 1), - ); + $comparisons = [ + [3, 3], + ['a', 'a'], + [$date, $date], + [$object, $object], + [null, 1], + ]; $immutableDate = new \DateTimeImmutable('2000-01-01'); - $comparisons[] = array($immutableDate, $immutableDate); + $comparisons[] = [$immutableDate, $immutableDate]; return $comparisons; } @@ -74,9 +74,9 @@ class IdenticalToValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideValidComparisonsToPropertyPath() { - return array( - array(5), - ); + return [ + [5], + ]; } /** @@ -84,13 +84,13 @@ class IdenticalToValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideInvalidComparisons() { - return array( - array(1, '1', 2, '2', 'integer'), - array(2, '2', '2', '"2"', 'string'), - array('22', '"22"', '333', '"333"', 'string'), - array(new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', 'DateTime'), - array(new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', new \DateTime('1999-01-01'), 'Jan 1, 1999, 12:00 AM', 'DateTime'), - array(new ComparisonTest_Class(4), '4', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), - ); + return [ + [1, '1', 2, '2', 'integer'], + [2, '2', '2', '"2"', 'string'], + ['22', '"22"', '333', '"333"', 'string'], + [new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', 'DateTime'], + [new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', new \DateTime('1999-01-01'), 'Jan 1, 1999, 12:00 AM', 'DateTime'], + [new ComparisonTest_Class(4), '4', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php index 9d80f88d..aa8ad4cf 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php @@ -74,9 +74,9 @@ class ImageValidatorTest extends ConstraintValidatorTestCase public function testFileNotFound() { // Check that the logic from FileValidator still works - $constraint = new Image(array( + $constraint = new Image([ 'notFoundMessage' => 'myMessage', - )); + ]); $this->validator->validate('foobar', $constraint); @@ -88,12 +88,12 @@ class ImageValidatorTest extends ConstraintValidatorTestCase public function testValidSize() { - $constraint = new Image(array( + $constraint = new Image([ 'minWidth' => 1, 'maxWidth' => 2, 'minHeight' => 1, 'maxHeight' => 2, - )); + ]); $this->validator->validate($this->image, $constraint); @@ -102,10 +102,10 @@ class ImageValidatorTest extends ConstraintValidatorTestCase public function testWidthTooSmall() { - $constraint = new Image(array( + $constraint = new Image([ 'minWidth' => 3, 'minWidthMessage' => 'myMessage', - )); + ]); $this->validator->validate($this->image, $constraint); @@ -118,10 +118,10 @@ class ImageValidatorTest extends ConstraintValidatorTestCase public function testWidthTooBig() { - $constraint = new Image(array( + $constraint = new Image([ 'maxWidth' => 1, 'maxWidthMessage' => 'myMessage', - )); + ]); $this->validator->validate($this->image, $constraint); @@ -134,10 +134,10 @@ class ImageValidatorTest extends ConstraintValidatorTestCase public function testHeightTooSmall() { - $constraint = new Image(array( + $constraint = new Image([ 'minHeight' => 3, 'minHeightMessage' => 'myMessage', - )); + ]); $this->validator->validate($this->image, $constraint); @@ -150,10 +150,10 @@ class ImageValidatorTest extends ConstraintValidatorTestCase public function testHeightTooBig() { - $constraint = new Image(array( + $constraint = new Image([ 'maxHeight' => 1, 'maxHeightMessage' => 'myMessage', - )); + ]); $this->validator->validate($this->image, $constraint); @@ -166,10 +166,10 @@ class ImageValidatorTest extends ConstraintValidatorTestCase public function testPixelsTooFew() { - $constraint = new Image(array( + $constraint = new Image([ 'minPixels' => 5, 'minPixelsMessage' => 'myMessage', - )); + ]); $this->validator->validate($this->image, $constraint); @@ -184,10 +184,10 @@ class ImageValidatorTest extends ConstraintValidatorTestCase public function testPixelsTooMany() { - $constraint = new Image(array( + $constraint = new Image([ 'maxPixels' => 3, 'maxPixelsMessage' => 'myMessage', - )); + ]); $this->validator->validate($this->image, $constraint); @@ -205,9 +205,9 @@ class ImageValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidMinWidth() { - $constraint = new Image(array( + $constraint = new Image([ 'minWidth' => '1abc', - )); + ]); $this->validator->validate($this->image, $constraint); } @@ -217,9 +217,9 @@ class ImageValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidMaxWidth() { - $constraint = new Image(array( + $constraint = new Image([ 'maxWidth' => '1abc', - )); + ]); $this->validator->validate($this->image, $constraint); } @@ -229,9 +229,9 @@ class ImageValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidMinHeight() { - $constraint = new Image(array( + $constraint = new Image([ 'minHeight' => '1abc', - )); + ]); $this->validator->validate($this->image, $constraint); } @@ -241,9 +241,9 @@ class ImageValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidMaxHeight() { - $constraint = new Image(array( + $constraint = new Image([ 'maxHeight' => '1abc', - )); + ]); $this->validator->validate($this->image, $constraint); } @@ -253,9 +253,9 @@ class ImageValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidMinPixels() { - $constraint = new Image(array( + $constraint = new Image([ 'minPixels' => '1abc', - )); + ]); $this->validator->validate($this->image, $constraint); } @@ -265,19 +265,19 @@ class ImageValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidMaxPixels() { - $constraint = new Image(array( + $constraint = new Image([ 'maxPixels' => '1abc', - )); + ]); $this->validator->validate($this->image, $constraint); } public function testRatioTooSmall() { - $constraint = new Image(array( + $constraint = new Image([ 'minRatio' => 2, 'minRatioMessage' => 'myMessage', - )); + ]); $this->validator->validate($this->image, $constraint); @@ -290,10 +290,10 @@ class ImageValidatorTest extends ConstraintValidatorTestCase public function testRatioTooBig() { - $constraint = new Image(array( + $constraint = new Image([ 'maxRatio' => 0.5, 'maxRatioMessage' => 'myMessage', - )); + ]); $this->validator->validate($this->image, $constraint); @@ -306,9 +306,9 @@ class ImageValidatorTest extends ConstraintValidatorTestCase public function testMaxRatioUsesTwoDecimalsOnly() { - $constraint = new Image(array( + $constraint = new Image([ 'maxRatio' => 1.33, - )); + ]); $this->validator->validate($this->image4By3, $constraint); @@ -320,9 +320,9 @@ class ImageValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidMinRatio() { - $constraint = new Image(array( + $constraint = new Image([ 'minRatio' => '1abc', - )); + ]); $this->validator->validate($this->image, $constraint); } @@ -332,19 +332,19 @@ class ImageValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidMaxRatio() { - $constraint = new Image(array( + $constraint = new Image([ 'maxRatio' => '1abc', - )); + ]); $this->validator->validate($this->image, $constraint); } public function testSquareNotAllowed() { - $constraint = new Image(array( + $constraint = new Image([ 'allowSquare' => false, 'allowSquareMessage' => 'myMessage', - )); + ]); $this->validator->validate($this->image, $constraint); @@ -357,10 +357,10 @@ class ImageValidatorTest extends ConstraintValidatorTestCase public function testLandscapeNotAllowed() { - $constraint = new Image(array( + $constraint = new Image([ 'allowLandscape' => false, 'allowLandscapeMessage' => 'myMessage', - )); + ]); $this->validator->validate($this->imageLandscape, $constraint); @@ -373,10 +373,10 @@ class ImageValidatorTest extends ConstraintValidatorTestCase public function testPortraitNotAllowed() { - $constraint = new Image(array( + $constraint = new Image([ 'allowPortrait' => false, 'allowPortraitMessage' => 'myMessage', - )); + ]); $this->validator->validate($this->imagePortrait, $constraint); @@ -393,10 +393,10 @@ class ImageValidatorTest extends ConstraintValidatorTestCase $this->markTestSkipped('This test require GD extension'); } - $constraint = new Image(array( + $constraint = new Image([ 'detectCorrupted' => true, 'corruptedMessage' => 'myMessage', - )); + ]); $this->validator->validate($this->image, $constraint); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php index 985bd957..1ee44e7c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php @@ -49,9 +49,9 @@ class IpValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidValidatorVersion() { - new Ip(array( + new Ip([ 'version' => 666, - )); + ]); } /** @@ -59,25 +59,25 @@ class IpValidatorTest extends ConstraintValidatorTestCase */ public function testValidIpsV4($ip) { - $this->validator->validate($ip, new Ip(array( + $this->validator->validate($ip, new Ip([ 'version' => Ip::V4, - ))); + ])); $this->assertNoViolation(); } public function getValidIpsV4() { - return array( - array('0.0.0.0'), - array('10.0.0.0'), - array('123.45.67.178'), - array('172.16.0.0'), - array('192.168.1.0'), - array('224.0.0.1'), - array('255.255.255.255'), - array('127.0.0.0'), - ); + return [ + ['0.0.0.0'], + ['10.0.0.0'], + ['123.45.67.178'], + ['172.16.0.0'], + ['192.168.1.0'], + ['224.0.0.1'], + ['255.255.255.255'], + ['127.0.0.0'], + ]; } /** @@ -85,36 +85,36 @@ class IpValidatorTest extends ConstraintValidatorTestCase */ public function testValidIpsV6($ip) { - $this->validator->validate($ip, new Ip(array( + $this->validator->validate($ip, new Ip([ 'version' => Ip::V6, - ))); + ])); $this->assertNoViolation(); } public function getValidIpsV6() { - return array( - array('2001:0db8:85a3:0000:0000:8a2e:0370:7334'), - array('2001:0DB8:85A3:0000:0000:8A2E:0370:7334'), - array('2001:0Db8:85a3:0000:0000:8A2e:0370:7334'), - array('fdfe:dcba:9876:ffff:fdc6:c46b:bb8f:7d4c'), - array('fdc6:c46b:bb8f:7d4c:fdc6:c46b:bb8f:7d4c'), - array('fdc6:c46b:bb8f:7d4c:0000:8a2e:0370:7334'), - array('fe80:0000:0000:0000:0202:b3ff:fe1e:8329'), - array('fe80:0:0:0:202:b3ff:fe1e:8329'), - array('fe80::202:b3ff:fe1e:8329'), - array('0:0:0:0:0:0:0:0'), - array('::'), - array('0::'), - array('::0'), - array('0::0'), + return [ + ['2001:0db8:85a3:0000:0000:8a2e:0370:7334'], + ['2001:0DB8:85A3:0000:0000:8A2E:0370:7334'], + ['2001:0Db8:85a3:0000:0000:8A2e:0370:7334'], + ['fdfe:dcba:9876:ffff:fdc6:c46b:bb8f:7d4c'], + ['fdc6:c46b:bb8f:7d4c:fdc6:c46b:bb8f:7d4c'], + ['fdc6:c46b:bb8f:7d4c:0000:8a2e:0370:7334'], + ['fe80:0000:0000:0000:0202:b3ff:fe1e:8329'], + ['fe80:0:0:0:202:b3ff:fe1e:8329'], + ['fe80::202:b3ff:fe1e:8329'], + ['0:0:0:0:0:0:0:0'], + ['::'], + ['0::'], + ['::0'], + ['0::0'], // IPv4 mapped to IPv6 - array('2001:0db8:85a3:0000:0000:8a2e:0.0.0.0'), - array('::0.0.0.0'), - array('::255.255.255.255'), - array('::123.45.67.178'), - ); + ['2001:0db8:85a3:0000:0000:8a2e:0.0.0.0'], + ['::0.0.0.0'], + ['::255.255.255.255'], + ['::123.45.67.178'], + ]; } /** @@ -122,9 +122,9 @@ class IpValidatorTest extends ConstraintValidatorTestCase */ public function testValidIpsAll($ip) { - $this->validator->validate($ip, new Ip(array( + $this->validator->validate($ip, new Ip([ 'version' => Ip::ALL, - ))); + ])); $this->assertNoViolation(); } @@ -139,10 +139,10 @@ class IpValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidIpsV4($ip) { - $constraint = new Ip(array( + $constraint = new Ip([ 'version' => Ip::V4, 'message' => 'myMessage', - )); + ]); $this->validator->validate($ip, $constraint); @@ -154,17 +154,17 @@ class IpValidatorTest extends ConstraintValidatorTestCase public function getInvalidIpsV4() { - return array( - array('0'), - array('0.0'), - array('0.0.0'), - array('256.0.0.0'), - array('0.256.0.0'), - array('0.0.256.0'), - array('0.0.0.256'), - array('-1.0.0.0'), - array('foobar'), - ); + return [ + ['0'], + ['0.0'], + ['0.0.0'], + ['256.0.0.0'], + ['0.256.0.0'], + ['0.0.256.0'], + ['0.0.0.256'], + ['-1.0.0.0'], + ['foobar'], + ]; } /** @@ -172,10 +172,10 @@ class IpValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidPrivateIpsV4($ip) { - $constraint = new Ip(array( + $constraint = new Ip([ 'version' => Ip::V4_NO_PRIV, 'message' => 'myMessage', - )); + ]); $this->validator->validate($ip, $constraint); @@ -187,11 +187,11 @@ class IpValidatorTest extends ConstraintValidatorTestCase public function getInvalidPrivateIpsV4() { - return array( - array('10.0.0.0'), - array('172.16.0.0'), - array('192.168.1.0'), - ); + return [ + ['10.0.0.0'], + ['172.16.0.0'], + ['192.168.1.0'], + ]; } /** @@ -199,10 +199,10 @@ class IpValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidReservedIpsV4($ip) { - $constraint = new Ip(array( + $constraint = new Ip([ 'version' => Ip::V4_NO_RES, 'message' => 'myMessage', - )); + ]); $this->validator->validate($ip, $constraint); @@ -214,11 +214,11 @@ class IpValidatorTest extends ConstraintValidatorTestCase public function getInvalidReservedIpsV4() { - return array( - array('0.0.0.0'), - array('240.0.0.1'), - array('255.255.255.255'), - ); + return [ + ['0.0.0.0'], + ['240.0.0.1'], + ['255.255.255.255'], + ]; } /** @@ -226,10 +226,10 @@ class IpValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidPublicIpsV4($ip) { - $constraint = new Ip(array( + $constraint = new Ip([ 'version' => Ip::V4_ONLY_PUBLIC, 'message' => 'myMessage', - )); + ]); $this->validator->validate($ip, $constraint); @@ -249,10 +249,10 @@ class IpValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidIpsV6($ip) { - $constraint = new Ip(array( + $constraint = new Ip([ 'version' => Ip::V6, 'message' => 'myMessage', - )); + ]); $this->validator->validate($ip, $constraint); @@ -264,21 +264,21 @@ class IpValidatorTest extends ConstraintValidatorTestCase public function getInvalidIpsV6() { - return array( - array('z001:0db8:85a3:0000:0000:8a2e:0370:7334'), - array('fe80'), - array('fe80:8329'), - array('fe80:::202:b3ff:fe1e:8329'), - array('fe80::202:b3ff::fe1e:8329'), + return [ + ['z001:0db8:85a3:0000:0000:8a2e:0370:7334'], + ['fe80'], + ['fe80:8329'], + ['fe80:::202:b3ff:fe1e:8329'], + ['fe80::202:b3ff::fe1e:8329'], // IPv4 mapped to IPv6 - array('2001:0db8:85a3:0000:0000:8a2e:0370:0.0.0.0'), - array('::0.0'), - array('::0.0.0'), - array('::256.0.0.0'), - array('::0.256.0.0'), - array('::0.0.256.0'), - array('::0.0.0.256'), - ); + ['2001:0db8:85a3:0000:0000:8a2e:0370:0.0.0.0'], + ['::0.0'], + ['::0.0.0'], + ['::256.0.0.0'], + ['::0.256.0.0'], + ['::0.0.256.0'], + ['::0.0.0.256'], + ]; } /** @@ -286,10 +286,10 @@ class IpValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidPrivateIpsV6($ip) { - $constraint = new Ip(array( + $constraint = new Ip([ 'version' => Ip::V6_NO_PRIV, 'message' => 'myMessage', - )); + ]); $this->validator->validate($ip, $constraint); @@ -301,11 +301,11 @@ class IpValidatorTest extends ConstraintValidatorTestCase public function getInvalidPrivateIpsV6() { - return array( - array('fdfe:dcba:9876:ffff:fdc6:c46b:bb8f:7d4c'), - array('fdc6:c46b:bb8f:7d4c:fdc6:c46b:bb8f:7d4c'), - array('fdc6:c46b:bb8f:7d4c:0000:8a2e:0370:7334'), - ); + return [ + ['fdfe:dcba:9876:ffff:fdc6:c46b:bb8f:7d4c'], + ['fdc6:c46b:bb8f:7d4c:fdc6:c46b:bb8f:7d4c'], + ['fdc6:c46b:bb8f:7d4c:0000:8a2e:0370:7334'], + ]; } /** @@ -313,10 +313,10 @@ class IpValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidReservedIpsV6($ip) { - $constraint = new Ip(array( + $constraint = new Ip([ 'version' => Ip::V6_NO_RES, 'message' => 'myMessage', - )); + ]); $this->validator->validate($ip, $constraint); @@ -339,10 +339,10 @@ class IpValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidPublicIpsV6($ip) { - $constraint = new Ip(array( + $constraint = new Ip([ 'version' => Ip::V6_ONLY_PUBLIC, 'message' => 'myMessage', - )); + ]); $this->validator->validate($ip, $constraint); @@ -362,10 +362,10 @@ class IpValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidIpsAll($ip) { - $constraint = new Ip(array( + $constraint = new Ip([ 'version' => Ip::ALL, 'message' => 'myMessage', - )); + ]); $this->validator->validate($ip, $constraint); @@ -385,10 +385,10 @@ class IpValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidPrivateIpsAll($ip) { - $constraint = new Ip(array( + $constraint = new Ip([ 'version' => Ip::ALL_NO_PRIV, 'message' => 'myMessage', - )); + ]); $this->validator->validate($ip, $constraint); @@ -408,10 +408,10 @@ class IpValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidReservedIpsAll($ip) { - $constraint = new Ip(array( + $constraint = new Ip([ 'version' => Ip::ALL_NO_RES, 'message' => 'myMessage', - )); + ]); $this->validator->validate($ip, $constraint); @@ -431,10 +431,10 @@ class IpValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidPublicIpsAll($ip) { - $constraint = new Ip(array( + $constraint = new Ip([ 'version' => Ip::ALL_ONLY_PUBLIC, 'message' => 'myMessage', - )); + ]); $this->validator->validate($ip, $constraint); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php index ab139a93..65aecf94 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php @@ -38,9 +38,9 @@ class IsFalseValidatorTest extends ConstraintValidatorTestCase public function testTrueIsInvalid() { - $constraint = new IsFalse(array( + $constraint = new IsFalse([ 'message' => 'myMessage', - )); + ]); $this->validator->validate(true, $constraint); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php index 2cc289b8..60f9e95f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php @@ -34,9 +34,9 @@ class IsNullValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidValues($value, $valueAsString) { - $constraint = new IsNull(array( + $constraint = new IsNull([ 'message' => 'myMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -48,15 +48,15 @@ class IsNullValidatorTest extends ConstraintValidatorTestCase public function getInvalidValues() { - return array( - array(0, '0'), - array(false, 'false'), - array(true, 'true'), - array('', '""'), - array('foo bar', '"foo bar"'), - array(new \DateTime(), 'object'), - array(new \stdClass(), 'object'), - array(array(), 'array'), - ); + return [ + [0, '0'], + [false, 'false'], + [true, 'true'], + ['', '""'], + ['foo bar', '"foo bar"'], + [new \DateTime(), 'object'], + [new \stdClass(), 'object'], + [[], 'array'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php index 821d54da..e3e0c52b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php @@ -38,9 +38,9 @@ class IsTrueValidatorTest extends ConstraintValidatorTestCase public function testFalseIsInvalid() { - $constraint = new IsTrue(array( + $constraint = new IsTrue([ 'message' => 'myMessage', - )); + ]); $this->validator->validate(false, $constraint); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php index f810fc98..3c17fd40 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php @@ -27,79 +27,79 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase public function getValidIsbn10() { - return array( - array('2723442284'), - array('2723442276'), - array('2723455041'), - array('2070546810'), - array('2711858839'), - array('2756406767'), - array('2870971648'), - array('226623854X'), - array('2851806424'), - array('0321812700'), - array('0-45122-5244'), - array('0-4712-92311'), - array('0-9752298-0-X'), - ); + return [ + ['2723442284'], + ['2723442276'], + ['2723455041'], + ['2070546810'], + ['2711858839'], + ['2756406767'], + ['2870971648'], + ['226623854X'], + ['2851806424'], + ['0321812700'], + ['0-45122-5244'], + ['0-4712-92311'], + ['0-9752298-0-X'], + ]; } public function getInvalidIsbn10() { - return array( - array('27234422841', Isbn::TOO_LONG_ERROR), - array('272344228', Isbn::TOO_SHORT_ERROR), - array('0-4712-9231', Isbn::TOO_SHORT_ERROR), - array('1234567890', Isbn::CHECKSUM_FAILED_ERROR), - array('0987656789', Isbn::CHECKSUM_FAILED_ERROR), - array('7-35622-5444', Isbn::CHECKSUM_FAILED_ERROR), - array('0-4X19-92611', Isbn::CHECKSUM_FAILED_ERROR), - array('0_45122_5244', Isbn::INVALID_CHARACTERS_ERROR), - array('2870#971#648', Isbn::INVALID_CHARACTERS_ERROR), - array('0-9752298-0-x', Isbn::INVALID_CHARACTERS_ERROR), - array('1A34567890', Isbn::INVALID_CHARACTERS_ERROR), + return [ + ['27234422841', Isbn::TOO_LONG_ERROR], + ['272344228', Isbn::TOO_SHORT_ERROR], + ['0-4712-9231', Isbn::TOO_SHORT_ERROR], + ['1234567890', Isbn::CHECKSUM_FAILED_ERROR], + ['0987656789', Isbn::CHECKSUM_FAILED_ERROR], + ['7-35622-5444', Isbn::CHECKSUM_FAILED_ERROR], + ['0-4X19-92611', Isbn::CHECKSUM_FAILED_ERROR], + ['0_45122_5244', Isbn::INVALID_CHARACTERS_ERROR], + ['2870#971#648', Isbn::INVALID_CHARACTERS_ERROR], + ['0-9752298-0-x', Isbn::INVALID_CHARACTERS_ERROR], + ['1A34567890', Isbn::INVALID_CHARACTERS_ERROR], // chr(1) evaluates to 0 // 2070546810 is valid - array('2'.\chr(1).'70546810', Isbn::INVALID_CHARACTERS_ERROR), - ); + ['2'.\chr(1).'70546810', Isbn::INVALID_CHARACTERS_ERROR], + ]; } public function getValidIsbn13() { - return array( - array('978-2723442282'), - array('978-2723442275'), - array('978-2723455046'), - array('978-2070546817'), - array('978-2711858835'), - array('978-2756406763'), - array('978-2870971642'), - array('978-2266238540'), - array('978-2851806420'), - array('978-0321812704'), - array('978-0451225245'), - array('978-0471292319'), - ); + return [ + ['978-2723442282'], + ['978-2723442275'], + ['978-2723455046'], + ['978-2070546817'], + ['978-2711858835'], + ['978-2756406763'], + ['978-2870971642'], + ['978-2266238540'], + ['978-2851806420'], + ['978-0321812704'], + ['978-0451225245'], + ['978-0471292319'], + ]; } public function getInvalidIsbn13() { - return array( - array('978-27234422821', Isbn::TOO_LONG_ERROR), - array('978-272344228', Isbn::TOO_SHORT_ERROR), - array('978-2723442-82', Isbn::TOO_SHORT_ERROR), - array('978-2723442281', Isbn::CHECKSUM_FAILED_ERROR), - array('978-0321513774', Isbn::CHECKSUM_FAILED_ERROR), - array('979-0431225385', Isbn::CHECKSUM_FAILED_ERROR), - array('980-0474292319', Isbn::CHECKSUM_FAILED_ERROR), - array('0-4X19-92619812', Isbn::INVALID_CHARACTERS_ERROR), - array('978_2723442282', Isbn::INVALID_CHARACTERS_ERROR), - array('978#2723442282', Isbn::INVALID_CHARACTERS_ERROR), - array('978-272C442282', Isbn::INVALID_CHARACTERS_ERROR), + return [ + ['978-27234422821', Isbn::TOO_LONG_ERROR], + ['978-272344228', Isbn::TOO_SHORT_ERROR], + ['978-2723442-82', Isbn::TOO_SHORT_ERROR], + ['978-2723442281', Isbn::CHECKSUM_FAILED_ERROR], + ['978-0321513774', Isbn::CHECKSUM_FAILED_ERROR], + ['979-0431225385', Isbn::CHECKSUM_FAILED_ERROR], + ['980-0474292319', Isbn::CHECKSUM_FAILED_ERROR], + ['0-4X19-92619812', Isbn::INVALID_CHARACTERS_ERROR], + ['978_2723442282', Isbn::INVALID_CHARACTERS_ERROR], + ['978#2723442282', Isbn::INVALID_CHARACTERS_ERROR], + ['978-272C442282', Isbn::INVALID_CHARACTERS_ERROR], // chr(1) evaluates to 0 // 978-2070546817 is valid - array('978-2'.\chr(1).'70546817', Isbn::INVALID_CHARACTERS_ERROR), - ); + ['978-2'.\chr(1).'70546817', Isbn::INVALID_CHARACTERS_ERROR], + ]; } public function getValidIsbn() @@ -151,9 +151,9 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase */ public function testValidIsbn10($isbn) { - $constraint = new Isbn(array( + $constraint = new Isbn([ 'type' => 'isbn10', - )); + ]); $this->validator->validate($isbn, $constraint); @@ -165,10 +165,10 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidIsbn10($isbn, $code) { - $constraint = new Isbn(array( + $constraint = new Isbn([ 'type' => 'isbn10', 'isbn10Message' => 'myMessage', - )); + ]); $this->validator->validate($isbn, $constraint); @@ -183,7 +183,7 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase */ public function testValidIsbn13($isbn) { - $constraint = new Isbn(array('type' => 'isbn13')); + $constraint = new Isbn(['type' => 'isbn13']); $this->validator->validate($isbn, $constraint); @@ -195,10 +195,10 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidIsbn13($isbn, $code) { - $constraint = new Isbn(array( + $constraint = new Isbn([ 'type' => 'isbn13', 'isbn13Message' => 'myMessage', - )); + ]); $this->validator->validate($isbn, $constraint); @@ -225,9 +225,9 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidIsbnAnyIsbn10($isbn, $code) { - $constraint = new Isbn(array( + $constraint = new Isbn([ 'bothIsbnMessage' => 'myMessage', - )); + ]); $this->validator->validate($isbn, $constraint); @@ -247,9 +247,9 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidIsbnAnyIsbn13($isbn, $code) { - $constraint = new Isbn(array( + $constraint = new Isbn([ 'bothIsbnMessage' => 'myMessage', - )); + ]); $this->validator->validate($isbn, $constraint); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IssnValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IssnValidatorTest.php index ca61ffac..c9ca7ade 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IssnValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IssnValidatorTest.php @@ -27,42 +27,42 @@ class IssnValidatorTest extends ConstraintValidatorTestCase public function getValidLowerCasedIssn() { - return array( - array('2162-321x'), - array('2160-200x'), - array('1537-453x'), - array('1937-710x'), - array('0002-922x'), - array('1553-345x'), - array('1553-619x'), - ); + return [ + ['2162-321x'], + ['2160-200x'], + ['1537-453x'], + ['1937-710x'], + ['0002-922x'], + ['1553-345x'], + ['1553-619x'], + ]; } public function getValidNonHyphenatedIssn() { - return array( - array('2162321X'), - array('01896016'), - array('15744647'), - array('14350645'), - array('07174055'), - array('20905076'), - array('14401592'), - ); + return [ + ['2162321X'], + ['01896016'], + ['15744647'], + ['14350645'], + ['07174055'], + ['20905076'], + ['14401592'], + ]; } public function getFullValidIssn() { - return array( - array('1550-7416'), - array('1539-8560'), - array('2156-5376'), - array('1119-023X'), - array('1684-5315'), - array('1996-0786'), - array('1684-5374'), - array('1996-0794'), - ); + return [ + ['1550-7416'], + ['1539-8560'], + ['2156-5376'], + ['1119-023X'], + ['1684-5315'], + ['1996-0786'], + ['1684-5374'], + ['1996-0794'], + ]; } public function getValidIssn() @@ -76,16 +76,16 @@ class IssnValidatorTest extends ConstraintValidatorTestCase public function getInvalidIssn() { - return array( - array(0, Issn::TOO_SHORT_ERROR), - array('1539', Issn::TOO_SHORT_ERROR), - array('2156-537A', Issn::INVALID_CHARACTERS_ERROR), - array('1119-0231', Issn::CHECKSUM_FAILED_ERROR), - array('1684-5312', Issn::CHECKSUM_FAILED_ERROR), - array('1996-0783', Issn::CHECKSUM_FAILED_ERROR), - array('1684-537X', Issn::CHECKSUM_FAILED_ERROR), - array('1996-0795', Issn::CHECKSUM_FAILED_ERROR), - ); + return [ + [0, Issn::TOO_SHORT_ERROR], + ['1539', Issn::TOO_SHORT_ERROR], + ['2156-537A', Issn::INVALID_CHARACTERS_ERROR], + ['1119-0231', Issn::CHECKSUM_FAILED_ERROR], + ['1684-5312', Issn::CHECKSUM_FAILED_ERROR], + ['1996-0783', Issn::CHECKSUM_FAILED_ERROR], + ['1684-537X', Issn::CHECKSUM_FAILED_ERROR], + ['1996-0795', Issn::CHECKSUM_FAILED_ERROR], + ]; } public function testNullIsValid() @@ -120,10 +120,10 @@ class IssnValidatorTest extends ConstraintValidatorTestCase */ public function testCaseSensitiveIssns($issn) { - $constraint = new Issn(array( + $constraint = new Issn([ 'caseSensitive' => true, 'message' => 'myMessage', - )); + ]); $this->validator->validate($issn, $constraint); @@ -138,10 +138,10 @@ class IssnValidatorTest extends ConstraintValidatorTestCase */ public function testRequireHyphenIssns($issn) { - $constraint = new Issn(array( + $constraint = new Issn([ 'requireHyphen' => true, 'message' => 'myMessage', - )); + ]); $this->validator->validate($issn, $constraint); @@ -168,9 +168,9 @@ class IssnValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidIssn($issn, $code) { - $constraint = new Issn(array( + $constraint = new Issn([ 'message' => 'myMessage', - )); + ]); $this->validator->validate($issn, $constraint); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php index 2980f2a2..247301df 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php @@ -57,11 +57,11 @@ class LanguageValidatorTest extends ConstraintValidatorTestCase public function getValidLanguages() { - return array( - array('en'), - array('en_US'), - array('my'), - ); + return [ + ['en'], + ['en_US'], + ['my'], + ]; } /** @@ -69,9 +69,9 @@ class LanguageValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidLanguages($language) { - $constraint = new Language(array( + $constraint = new Language([ 'message' => 'myMessage', - )); + ]); $this->validator->validate($language, $constraint); @@ -83,10 +83,10 @@ class LanguageValidatorTest extends ConstraintValidatorTestCase public function getInvalidLanguages() { - return array( - array('EN'), - array('foobar'), - ); + return [ + ['EN'], + ['foobar'], + ]; } public function testValidateUsingCountrySpecificLocale() @@ -96,9 +96,9 @@ class LanguageValidatorTest extends ConstraintValidatorTestCase \Locale::setDefault('fr_FR'); $existingLanguage = 'en'; - $this->validator->validate($existingLanguage, new Language(array( + $this->validator->validate($existingLanguage, new Language([ 'message' => 'aMessage', - ))); + ])); $this->assertNoViolation(); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php index da98387c..955d8b55 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php @@ -46,50 +46,50 @@ class LengthValidatorTest extends ConstraintValidatorTestCase public function getThreeOrLessCharacters() { - return array( - array(12), - array('12'), - array('üü'), - array('éé'), - array(123), - array('123'), - array('üüü'), - array('ééé'), - ); + return [ + [12], + ['12'], + ['üü'], + ['éé'], + [123], + ['123'], + ['üüü'], + ['ééé'], + ]; } public function getFourCharacters() { - return array( - array(1234), - array('1234'), - array('üüüü'), - array('éééé'), - ); + return [ + [1234], + ['1234'], + ['üüüü'], + ['éééé'], + ]; } public function getFiveOrMoreCharacters() { - return array( - array(12345), - array('12345'), - array('üüüüü'), - array('ééééé'), - array(123456), - array('123456'), - array('üüüüüü'), - array('éééééé'), - ); + return [ + [12345], + ['12345'], + ['üüüüü'], + ['ééééé'], + [123456], + ['123456'], + ['üüüüüü'], + ['éééééé'], + ]; } public function getOneCharset() { - return array( - array('é', 'utf8', true), - array("\xE9", 'CP1252', true), - array("\xE9", 'XXX', false), - array("\xE9", 'utf8', false), - ); + return [ + ['é', 'utf8', true], + ["\xE9", 'CP1252', true], + ["\xE9", 'XXX', false], + ["\xE9", 'utf8', false], + ]; } /** @@ -97,7 +97,7 @@ class LengthValidatorTest extends ConstraintValidatorTestCase */ public function testValidValuesMin($value) { - $constraint = new Length(array('min' => 5)); + $constraint = new Length(['min' => 5]); $this->validator->validate($value, $constraint); $this->assertNoViolation(); @@ -108,7 +108,7 @@ class LengthValidatorTest extends ConstraintValidatorTestCase */ public function testValidValuesMax($value) { - $constraint = new Length(array('max' => 3)); + $constraint = new Length(['max' => 3]); $this->validator->validate($value, $constraint); $this->assertNoViolation(); @@ -130,10 +130,10 @@ class LengthValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidValuesMin($value) { - $constraint = new Length(array( + $constraint = new Length([ 'min' => 4, 'minMessage' => 'myMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -151,10 +151,10 @@ class LengthValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidValuesMax($value) { - $constraint = new Length(array( + $constraint = new Length([ 'max' => 4, 'maxMessage' => 'myMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -172,11 +172,11 @@ class LengthValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidValuesExactLessThanFour($value) { - $constraint = new Length(array( + $constraint = new Length([ 'min' => 4, 'max' => 4, 'exactMessage' => 'myMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -194,11 +194,11 @@ class LengthValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidValuesExactMoreThanFour($value) { - $constraint = new Length(array( + $constraint = new Length([ 'min' => 4, 'max' => 4, 'exactMessage' => 'myMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -216,12 +216,12 @@ class LengthValidatorTest extends ConstraintValidatorTestCase */ public function testOneCharset($value, $charset, $isValid) { - $constraint = new Length(array( + $constraint = new Length([ 'min' => 1, 'max' => 1, 'charset' => $charset, 'charsetMessage' => 'myMessage', - )); + ]); $this->validator->validate($value, $constraint); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php index f31a50e6..b77deff6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php @@ -39,21 +39,21 @@ class LessThanOrEqualValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideValidComparisons() { - return array( - array(1, 2), - array(1, 1), - array(new \DateTime('2000-01-01'), new \DateTime('2000-01-01')), - array(new \DateTime('2000-01-01'), new \DateTime('2020-01-01')), - array(new \DateTime('2000-01-01'), '2000-01-01'), - array(new \DateTime('2000-01-01'), '2020-01-01'), - array(new \DateTime('2000-01-01 UTC'), '2000-01-01 UTC'), - array(new \DateTime('2000-01-01 UTC'), '2020-01-01 UTC'), - array(new ComparisonTest_Class(4), new ComparisonTest_Class(5)), - array(new ComparisonTest_Class(5), new ComparisonTest_Class(5)), - array('a', 'a'), - array('a', 'z'), - array(null, 1), - ); + return [ + [1, 2], + [1, 1], + [new \DateTime('2000-01-01'), new \DateTime('2000-01-01')], + [new \DateTime('2000-01-01'), new \DateTime('2020-01-01')], + [new \DateTime('2000-01-01'), '2000-01-01'], + [new \DateTime('2000-01-01'), '2020-01-01'], + [new \DateTime('2000-01-01 UTC'), '2000-01-01 UTC'], + [new \DateTime('2000-01-01 UTC'), '2020-01-01 UTC'], + [new ComparisonTest_Class(4), new ComparisonTest_Class(5)], + [new ComparisonTest_Class(5), new ComparisonTest_Class(5)], + ['a', 'a'], + ['a', 'z'], + [null, 1], + ]; } /** @@ -61,10 +61,10 @@ class LessThanOrEqualValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideValidComparisonsToPropertyPath() { - return array( - array(4), - array(5), - ); + return [ + [4], + [5], + ]; } /** @@ -72,13 +72,13 @@ class LessThanOrEqualValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideInvalidComparisons() { - return array( - array(2, '2', 1, '1', 'integer'), - array(new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new \DateTime('2010-01-01 UTC'), 'Jan 1, 2010, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new ComparisonTest_Class(5), '5', new ComparisonTest_Class(4), '4', __NAMESPACE__.'\ComparisonTest_Class'), - array('c', '"c"', 'b', '"b"', 'string'), - ); + return [ + [2, '2', 1, '1', 'integer'], + [new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new \DateTime('2010-01-01 UTC'), 'Jan 1, 2010, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new ComparisonTest_Class(5), '5', new ComparisonTest_Class(4), '4', __NAMESPACE__.'\ComparisonTest_Class'], + ['c', '"c"', 'b', '"b"', 'string'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php index a5d69355..7d209ed5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php @@ -39,15 +39,15 @@ class LessThanValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideValidComparisons() { - return array( - array(1, 2), - array(new \DateTime('2000-01-01'), new \DateTime('2010-01-01')), - array(new \DateTime('2000-01-01'), '2010-01-01'), - array(new \DateTime('2000-01-01 UTC'), '2010-01-01 UTC'), - array(new ComparisonTest_Class(4), new ComparisonTest_Class(5)), - array('22', '333'), - array(null, 1), - ); + return [ + [1, 2], + [new \DateTime('2000-01-01'), new \DateTime('2010-01-01')], + [new \DateTime('2000-01-01'), '2010-01-01'], + [new \DateTime('2000-01-01 UTC'), '2010-01-01 UTC'], + [new ComparisonTest_Class(4), new ComparisonTest_Class(5)], + ['22', '333'], + [null, 1], + ]; } /** @@ -55,9 +55,9 @@ class LessThanValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideValidComparisonsToPropertyPath() { - return array( - array(4), - ); + return [ + [4], + ]; } /** @@ -65,18 +65,18 @@ class LessThanValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideInvalidComparisons() { - return array( - array(3, '3', 2, '2', 'integer'), - array(2, '2', 2, '2', 'integer'), - array(new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new \DateTime('2010-01-01 UTC'), 'Jan 1, 2010, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new \DateTime('2000-01-01 UTC'), 'Jan 1, 2000, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new ComparisonTest_Class(5), '5', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), - array(new ComparisonTest_Class(6), '6', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), - array('333', '"333"', '22', '"22"', 'string'), - ); + return [ + [3, '3', 2, '2', 'integer'], + [2, '2', 2, '2', 'integer'], + [new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new \DateTime('2010-01-01 UTC'), 'Jan 1, 2010, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new \DateTime('2000-01-01 UTC'), 'Jan 1, 2000, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new ComparisonTest_Class(5), '5', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'], + [new ComparisonTest_Class(6), '6', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'], + ['333', '"333"', '22', '"22"', 'string'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php index 29409e61..3d512311 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php @@ -56,14 +56,14 @@ class LocaleValidatorTest extends ConstraintValidatorTestCase public function getValidLocales() { - return array( - array('en'), - array('en_US'), - array('pt'), - array('pt_PT'), - array('zh_Hans'), - array('fil_PH'), - ); + return [ + ['en'], + ['en_US'], + ['pt'], + ['pt_PT'], + ['zh_Hans'], + ['fil_PH'], + ]; } /** @@ -71,9 +71,9 @@ class LocaleValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidLocales($locale) { - $constraint = new Locale(array( + $constraint = new Locale([ 'message' => 'myMessage', - )); + ]); $this->validator->validate($locale, $constraint); @@ -85,9 +85,9 @@ class LocaleValidatorTest extends ConstraintValidatorTestCase public function getInvalidLocales() { - return array( - array('EN'), - array('foobar'), - ); + return [ + ['EN'], + ['foobar'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LuhnValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LuhnValidatorTest.php index 3ee04d7f..02aae3ad 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LuhnValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LuhnValidatorTest.php @@ -48,26 +48,26 @@ class LuhnValidatorTest extends ConstraintValidatorTestCase public function getValidNumbers() { - return array( - array('42424242424242424242'), - array('378282246310005'), - array('371449635398431'), - array('378734493671000'), - array('5610591081018250'), - array('30569309025904'), - array('38520000023237'), - array('6011111111111117'), - array('6011000990139424'), - array('3530111333300000'), - array('3566002020360505'), - array('5555555555554444'), - array('5105105105105100'), - array('4111111111111111'), - array('4012888888881881'), - array('4222222222222'), - array('5019717010103742'), - array('6331101999990016'), - ); + return [ + ['42424242424242424242'], + ['378282246310005'], + ['371449635398431'], + ['378734493671000'], + ['5610591081018250'], + ['30569309025904'], + ['38520000023237'], + ['6011111111111117'], + ['6011000990139424'], + ['3530111333300000'], + ['3566002020360505'], + ['5555555555554444'], + ['5105105105105100'], + ['4111111111111111'], + ['4012888888881881'], + ['4222222222222'], + ['5019717010103742'], + ['6331101999990016'], + ]; } /** @@ -75,9 +75,9 @@ class LuhnValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidNumbers($number, $code) { - $constraint = new Luhn(array( + $constraint = new Luhn([ 'message' => 'myMessage', - )); + ]); $this->validator->validate($number, $constraint); @@ -89,13 +89,13 @@ class LuhnValidatorTest extends ConstraintValidatorTestCase public function getInvalidNumbers() { - return array( - array('1234567812345678', Luhn::CHECKSUM_FAILED_ERROR), - array('4222222222222222', Luhn::CHECKSUM_FAILED_ERROR), - array('0000000000000000', Luhn::CHECKSUM_FAILED_ERROR), - array('000000!000000000', Luhn::INVALID_CHARACTERS_ERROR), - array('42-22222222222222', Luhn::INVALID_CHARACTERS_ERROR), - ); + return [ + ['1234567812345678', Luhn::CHECKSUM_FAILED_ERROR], + ['4222222222222222', Luhn::CHECKSUM_FAILED_ERROR], + ['0000000000000000', Luhn::CHECKSUM_FAILED_ERROR], + ['000000!000000000', Luhn::INVALID_CHARACTERS_ERROR], + ['42-22222222222222', Luhn::INVALID_CHARACTERS_ERROR], + ]; } /** @@ -111,12 +111,12 @@ class LuhnValidatorTest extends ConstraintValidatorTestCase public function getInvalidTypes() { - return array( - array(0), - array(123), - array(42424242424242424242), - array(378282246310005), - array(371449635398431), - ); + return [ + [0], + [123], + [42424242424242424242], + [378282246310005], + [371449635398431], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php index fd92febf..f634e0c1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php @@ -34,20 +34,20 @@ class NotBlankValidatorTest extends ConstraintValidatorTestCase public function getValidValues() { - return array( - array('foobar'), - array(0), - array(0.0), - array('0'), - array(1234), - ); + return [ + ['foobar'], + [0], + [0.0], + ['0'], + [1234], + ]; } public function testNullIsInvalid() { - $constraint = new NotBlank(array( + $constraint = new NotBlank([ 'message' => 'myMessage', - )); + ]); $this->validator->validate(null, $constraint); @@ -59,9 +59,9 @@ class NotBlankValidatorTest extends ConstraintValidatorTestCase public function testBlankIsInvalid() { - $constraint = new NotBlank(array( + $constraint = new NotBlank([ 'message' => 'myMessage', - )); + ]); $this->validator->validate('', $constraint); @@ -73,9 +73,9 @@ class NotBlankValidatorTest extends ConstraintValidatorTestCase public function testFalseIsInvalid() { - $constraint = new NotBlank(array( + $constraint = new NotBlank([ 'message' => 'myMessage', - )); + ]); $this->validator->validate(false, $constraint); @@ -87,11 +87,11 @@ class NotBlankValidatorTest extends ConstraintValidatorTestCase public function testEmptyArrayIsInvalid() { - $constraint = new NotBlank(array( + $constraint = new NotBlank([ 'message' => 'myMessage', - )); + ]); - $this->validator->validate(array(), $constraint); + $this->validator->validate([], $constraint); $this->buildViolation('myMessage') ->setParameter('{{ value }}', 'array') diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php index e7031d4c..810f7a17 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php @@ -39,15 +39,15 @@ class NotEqualToValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideValidComparisons() { - return array( - array(1, 2), - array('22', '333'), - array(new \DateTime('2001-01-01'), new \DateTime('2000-01-01')), - array(new \DateTime('2001-01-01'), '2000-01-01'), - array(new \DateTime('2001-01-01 UTC'), '2000-01-01 UTC'), - array(new ComparisonTest_Class(6), new ComparisonTest_Class(5)), - array(null, 1), - ); + return [ + [1, 2], + ['22', '333'], + [new \DateTime('2001-01-01'), new \DateTime('2000-01-01')], + [new \DateTime('2001-01-01'), '2000-01-01'], + [new \DateTime('2001-01-01 UTC'), '2000-01-01 UTC'], + [new ComparisonTest_Class(6), new ComparisonTest_Class(5)], + [null, 1], + ]; } /** @@ -55,9 +55,9 @@ class NotEqualToValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideValidComparisonsToPropertyPath() { - return array( - array(0), - ); + return [ + [0], + ]; } /** @@ -65,14 +65,14 @@ class NotEqualToValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideInvalidComparisons() { - return array( - array(3, '3', 3, '3', 'integer'), - array('2', '"2"', 2, '2', 'integer'), - array('a', '"a"', 'a', '"a"', 'string'), - array(new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new \DateTime('2000-01-01 UTC'), 'Jan 1, 2000, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array(new ComparisonTest_Class(5), '5', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), - ); + return [ + [3, '3', 3, '3', 'integer'], + ['2', '"2"', 2, '2', 'integer'], + ['a', '"a"', 'a', '"a"', 'string'], + [new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new \DateTime('2000-01-01 UTC'), 'Jan 1, 2000, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [new ComparisonTest_Class(5), '5', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php index 907f36c0..0cb9ec54 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php @@ -39,18 +39,18 @@ class NotIdenticalToValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideValidComparisons() { - return array( - array(1, 2), - array('2', 2), - array('22', '333'), - array(new \DateTime('2001-01-01'), new \DateTime('2000-01-01')), - array(new \DateTime('2000-01-01'), new \DateTime('2000-01-01')), - array(new \DateTime('2001-01-01'), '2000-01-01'), - array(new \DateTime('2000-01-01'), '2000-01-01'), - array(new \DateTime('2001-01-01'), '2000-01-01'), - array(new \DateTime('2000-01-01 UTC'), '2000-01-01 UTC'), - array(null, 1), - ); + return [ + [1, 2], + ['2', 2], + ['22', '333'], + [new \DateTime('2001-01-01'), new \DateTime('2000-01-01')], + [new \DateTime('2000-01-01'), new \DateTime('2000-01-01')], + [new \DateTime('2001-01-01'), '2000-01-01'], + [new \DateTime('2000-01-01'), '2000-01-01'], + [new \DateTime('2001-01-01'), '2000-01-01'], + [new \DateTime('2000-01-01 UTC'), '2000-01-01 UTC'], + [null, 1], + ]; } /** @@ -58,9 +58,9 @@ class NotIdenticalToValidatorTest extends AbstractComparisonValidatorTestCase */ public function provideValidComparisonsToPropertyPath() { - return array( - array(0), - ); + return [ + [0], + ]; } public function provideAllInvalidComparisons() @@ -84,12 +84,12 @@ class NotIdenticalToValidatorTest extends AbstractComparisonValidatorTestCase $date = new \DateTime('2000-01-01'); $object = new ComparisonTest_Class(2); - $comparisons = array( - array(3, '3', 3, '3', 'integer'), - array('a', '"a"', 'a', '"a"', 'string'), - array($date, 'Jan 1, 2000, 12:00 AM', $date, 'Jan 1, 2000, 12:00 AM', 'DateTime'), - array($object, '2', $object, '2', __NAMESPACE__.'\ComparisonTest_Class'), - ); + $comparisons = [ + [3, '3', 3, '3', 'integer'], + ['a', '"a"', 'a', '"a"', 'string'], + [$date, 'Jan 1, 2000, 12:00 AM', $date, 'Jan 1, 2000, 12:00 AM', 'DateTime'], + [$object, '2', $object, '2', __NAMESPACE__.'\ComparisonTest_Class'], + ]; return $comparisons; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php index feb3c2f8..a726d063 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php @@ -34,19 +34,19 @@ class NotNullValidatorTest extends ConstraintValidatorTestCase public function getValidValues() { - return array( - array(0), - array(false), - array(true), - array(''), - ); + return [ + [0], + [false], + [true], + [''], + ]; } public function testNullIsInvalid() { - $constraint = new NotNull(array( + $constraint = new NotNull([ 'message' => 'myMessage', - )); + ]); $this->validator->validate(null, $constraint); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php index 7eb931ee..661161d8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php @@ -25,43 +25,43 @@ class RangeValidatorTest extends ConstraintValidatorTestCase public function testNullIsValid() { - $this->validator->validate(null, new Range(array('min' => 10, 'max' => 20))); + $this->validator->validate(null, new Range(['min' => 10, 'max' => 20])); $this->assertNoViolation(); } public function getTenToTwenty() { - return array( - array(10.00001), - array(19.99999), - array('10.00001'), - array('19.99999'), - array(10), - array(20), - array(10.0), - array(20.0), - ); + return [ + [10.00001], + [19.99999], + ['10.00001'], + ['19.99999'], + [10], + [20], + [10.0], + [20.0], + ]; } public function getLessThanTen() { - return array( - array(9.99999, '9.99999'), - array('9.99999', '"9.99999"'), - array(5, '5'), - array(1.0, '1.0'), - ); + return [ + [9.99999, '9.99999'], + ['9.99999', '"9.99999"'], + [5, '5'], + [1.0, '1.0'], + ]; } public function getMoreThanTwenty() { - return array( - array(20.000001, '20.000001'), - array('20.000001', '"20.000001"'), - array(21, '21'), - array(30.0, '30.0'), - ); + return [ + [20.000001, '20.000001'], + ['20.000001', '"20.000001"'], + [21, '21'], + [30.0, '30.0'], + ]; } /** @@ -69,7 +69,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase */ public function testValidValuesMin($value) { - $constraint = new Range(array('min' => 10)); + $constraint = new Range(['min' => 10]); $this->validator->validate($value, $constraint); $this->assertNoViolation(); @@ -80,7 +80,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase */ public function testValidValuesMax($value) { - $constraint = new Range(array('max' => 20)); + $constraint = new Range(['max' => 20]); $this->validator->validate($value, $constraint); $this->assertNoViolation(); @@ -91,7 +91,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase */ public function testValidValuesMinMax($value) { - $constraint = new Range(array('min' => 10, 'max' => 20)); + $constraint = new Range(['min' => 10, 'max' => 20]); $this->validator->validate($value, $constraint); $this->assertNoViolation(); @@ -102,10 +102,10 @@ class RangeValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidValuesMin($value, $formattedValue) { - $constraint = new Range(array( + $constraint = new Range([ 'min' => 10, 'minMessage' => 'myMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -121,10 +121,10 @@ class RangeValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidValuesMax($value, $formattedValue) { - $constraint = new Range(array( + $constraint = new Range([ 'max' => 20, 'maxMessage' => 'myMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -140,12 +140,12 @@ class RangeValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidValuesCombinedMax($value, $formattedValue) { - $constraint = new Range(array( + $constraint = new Range([ 'min' => 10, 'max' => 20, 'minMessage' => 'myMinMessage', 'maxMessage' => 'myMaxMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -161,12 +161,12 @@ class RangeValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidValuesCombinedMin($value, $formattedValue) { - $constraint = new Range(array( + $constraint = new Range([ 'min' => 10, 'max' => 20, 'minMessage' => 'myMinMessage', 'maxMessage' => 'myMaxMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -183,15 +183,15 @@ class RangeValidatorTest extends ConstraintValidatorTestCase // the default timezone $this->setDefaultTimezone('UTC'); - $tests = array( - array(new \DateTime('March 10, 2014')), - array(new \DateTime('March 15, 2014')), - array(new \DateTime('March 20, 2014')), - ); + $tests = [ + [new \DateTime('March 10, 2014')], + [new \DateTime('March 15, 2014')], + [new \DateTime('March 20, 2014')], + ]; - $tests[] = array(new \DateTimeImmutable('March 10, 2014')); - $tests[] = array(new \DateTimeImmutable('March 15, 2014')); - $tests[] = array(new \DateTimeImmutable('March 20, 2014')); + $tests[] = [new \DateTimeImmutable('March 10, 2014')]; + $tests[] = [new \DateTimeImmutable('March 15, 2014')]; + $tests[] = [new \DateTimeImmutable('March 20, 2014')]; $this->restoreDefaultTimezone(); @@ -204,13 +204,13 @@ class RangeValidatorTest extends ConstraintValidatorTestCase // the default timezone $this->setDefaultTimezone('UTC'); - $tests = array( - array(new \DateTime('March 20, 2013'), 'Mar 20, 2013, 12:00 AM'), - array(new \DateTime('March 9, 2014'), 'Mar 9, 2014, 12:00 AM'), - ); + $tests = [ + [new \DateTime('March 20, 2013'), 'Mar 20, 2013, 12:00 AM'], + [new \DateTime('March 9, 2014'), 'Mar 9, 2014, 12:00 AM'], + ]; - $tests[] = array(new \DateTimeImmutable('March 20, 2013'), 'Mar 20, 2013, 12:00 AM'); - $tests[] = array(new \DateTimeImmutable('March 9, 2014'), 'Mar 9, 2014, 12:00 AM'); + $tests[] = [new \DateTimeImmutable('March 20, 2013'), 'Mar 20, 2013, 12:00 AM']; + $tests[] = [new \DateTimeImmutable('March 9, 2014'), 'Mar 9, 2014, 12:00 AM']; $this->restoreDefaultTimezone(); @@ -223,13 +223,13 @@ class RangeValidatorTest extends ConstraintValidatorTestCase // the default timezone $this->setDefaultTimezone('UTC'); - $tests = array( - array(new \DateTime('March 21, 2014'), 'Mar 21, 2014, 12:00 AM'), - array(new \DateTime('March 9, 2015'), 'Mar 9, 2015, 12:00 AM'), - ); + $tests = [ + [new \DateTime('March 21, 2014'), 'Mar 21, 2014, 12:00 AM'], + [new \DateTime('March 9, 2015'), 'Mar 9, 2015, 12:00 AM'], + ]; - $tests[] = array(new \DateTimeImmutable('March 21, 2014'), 'Mar 21, 2014, 12:00 AM'); - $tests[] = array(new \DateTimeImmutable('March 9, 2015'), 'Mar 9, 2015, 12:00 AM'); + $tests[] = [new \DateTimeImmutable('March 21, 2014'), 'Mar 21, 2014, 12:00 AM']; + $tests[] = [new \DateTimeImmutable('March 9, 2015'), 'Mar 9, 2015, 12:00 AM']; $this->restoreDefaultTimezone(); @@ -241,7 +241,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase */ public function testValidDatesMin($value) { - $constraint = new Range(array('min' => 'March 10, 2014')); + $constraint = new Range(['min' => 'March 10, 2014']); $this->validator->validate($value, $constraint); $this->assertNoViolation(); @@ -252,7 +252,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase */ public function testValidDatesMax($value) { - $constraint = new Range(array('max' => 'March 20, 2014')); + $constraint = new Range(['max' => 'March 20, 2014']); $this->validator->validate($value, $constraint); $this->assertNoViolation(); @@ -263,7 +263,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase */ public function testValidDatesMinMax($value) { - $constraint = new Range(array('min' => 'March 10, 2014', 'max' => 'March 20, 2014')); + $constraint = new Range(['min' => 'March 10, 2014', 'max' => 'March 20, 2014']); $this->validator->validate($value, $constraint); $this->assertNoViolation(); @@ -278,10 +278,10 @@ class RangeValidatorTest extends ConstraintValidatorTestCase // Make sure we have the correct version loaded IntlTestHelper::requireIntl($this, '57.1'); - $constraint = new Range(array( + $constraint = new Range([ 'min' => 'March 10, 2014', 'minMessage' => 'myMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -301,10 +301,10 @@ class RangeValidatorTest extends ConstraintValidatorTestCase // Make sure we have the correct version loaded IntlTestHelper::requireIntl($this, '57.1'); - $constraint = new Range(array( + $constraint = new Range([ 'max' => 'March 20, 2014', 'maxMessage' => 'myMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -324,12 +324,12 @@ class RangeValidatorTest extends ConstraintValidatorTestCase // Make sure we have the correct version loaded IntlTestHelper::requireIntl($this, '57.1'); - $constraint = new Range(array( + $constraint = new Range([ 'min' => 'March 10, 2014', 'max' => 'March 20, 2014', 'minMessage' => 'myMinMessage', 'maxMessage' => 'myMaxMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -349,12 +349,12 @@ class RangeValidatorTest extends ConstraintValidatorTestCase // Make sure we have the correct version loaded IntlTestHelper::requireIntl($this, '57.1'); - $constraint = new Range(array( + $constraint = new Range([ 'min' => 'March 10, 2014', 'max' => 'March 20, 2014', 'minMessage' => 'myMinMessage', 'maxMessage' => 'myMaxMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -367,22 +367,22 @@ class RangeValidatorTest extends ConstraintValidatorTestCase public function getInvalidValues() { - return array( - array(9.999999), - array(20.000001), - array('9.999999'), - array('20.000001'), - array(new \stdClass()), - ); + return [ + [9.999999], + [20.000001], + ['9.999999'], + ['20.000001'], + [new \stdClass()], + ]; } public function testNonNumeric() { - $this->validator->validate('abcd', new Range(array( + $this->validator->validate('abcd', new Range([ 'min' => 10, 'max' => 20, 'invalidMessage' => 'myMessage', - ))); + ])); $this->buildViolation('myMessage') ->setParameter('{{ value }}', '"abcd"') diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php index 26ef1b27..8dc1e4af 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php @@ -28,37 +28,37 @@ class RegexTest extends TestCase public function provideHtmlPatterns() { - return array( + return [ // HTML5 wraps the pattern in ^(?:pattern)$ - array('/^[0-9]+$/', '[0-9]+'), - array('/[0-9]+$/', '.*[0-9]+'), - array('/^[0-9]+/', '[0-9]+.*'), - array('/[0-9]+/', '.*[0-9]+.*'), + ['/^[0-9]+$/', '[0-9]+'], + ['/[0-9]+$/', '.*[0-9]+'], + ['/^[0-9]+/', '[0-9]+.*'], + ['/[0-9]+/', '.*[0-9]+.*'], // We need a smart way to allow matching of patterns that contain // ^ and $ at various sub-clauses of an or-clause // .*(pattern).* seems to work correctly - array('/[0-9]$|[a-z]+/', '.*([0-9]$|[a-z]+).*'), - array('/[0-9]$|^[a-z]+/', '.*([0-9]$|^[a-z]+).*'), - array('/^[0-9]|[a-z]+$/', '.*(^[0-9]|[a-z]+$).*'), + ['/[0-9]$|[a-z]+/', '.*([0-9]$|[a-z]+).*'], + ['/[0-9]$|^[a-z]+/', '.*([0-9]$|^[a-z]+).*'], + ['/^[0-9]|[a-z]+$/', '.*(^[0-9]|[a-z]+$).*'], // Unescape escaped delimiters - array('/^[0-9]+\/$/', '[0-9]+/'), - array('#^[0-9]+\#$#', '[0-9]+#'), + ['/^[0-9]+\/$/', '[0-9]+/'], + ['#^[0-9]+\#$#', '[0-9]+#'], // Cannot be converted - array('/^[0-9]+$/i', null), + ['/^[0-9]+$/i', null], // Inverse matches are simple, just wrap in // ((?!pattern).)* - array('/^[0-9]+$/', '((?!^[0-9]+$).)*', false), - array('/[0-9]+$/', '((?![0-9]+$).)*', false), - array('/^[0-9]+/', '((?!^[0-9]+).)*', false), - array('/[0-9]+/', '((?![0-9]+).)*', false), - array('/[0-9]$|[a-z]+/', '((?![0-9]$|[a-z]+).)*', false), - array('/[0-9]$|^[a-z]+/', '((?![0-9]$|^[a-z]+).)*', false), - array('/^[0-9]|[a-z]+$/', '((?!^[0-9]|[a-z]+$).)*', false), - array('/^[0-9]+\/$/', '((?!^[0-9]+/$).)*', false), - array('#^[0-9]+\#$#', '((?!^[0-9]+#$).)*', false), - array('/^[0-9]+$/i', null, false), - ); + ['/^[0-9]+$/', '((?!^[0-9]+$).)*', false], + ['/[0-9]+$/', '((?![0-9]+$).)*', false], + ['/^[0-9]+/', '((?!^[0-9]+).)*', false], + ['/[0-9]+/', '((?![0-9]+).)*', false], + ['/[0-9]$|[a-z]+/', '((?![0-9]$|[a-z]+).)*', false], + ['/[0-9]$|^[a-z]+/', '((?![0-9]$|^[a-z]+).)*', false], + ['/^[0-9]|[a-z]+$/', '((?!^[0-9]|[a-z]+$).)*', false], + ['/^[0-9]+\/$/', '((?!^[0-9]+/$).)*', false], + ['#^[0-9]+\#$#', '((?!^[0-9]+#$).)*', false], + ['/^[0-9]+$/i', null, false], + ]; } /** @@ -66,10 +66,10 @@ class RegexTest extends TestCase */ public function testGetHtmlPattern($pattern, $htmlPattern, $match = true) { - $constraint = new Regex(array( + $constraint = new Regex([ 'pattern' => $pattern, 'match' => $match, - )); + ]); $this->assertSame($pattern, $constraint->pattern); $this->assertSame($htmlPattern, $constraint->getHtmlPattern()); @@ -77,10 +77,10 @@ class RegexTest extends TestCase public function testGetCustomHtmlPattern() { - $constraint = new Regex(array( + $constraint = new Regex([ 'pattern' => '((?![0-9]$|[a-z]+).)*', 'htmlPattern' => 'foobar', - )); + ]); $this->assertSame('((?![0-9]$|[a-z]+).)*', $constraint->pattern); $this->assertSame('foobar', $constraint->getHtmlPattern()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php index 5194b081..55e739b0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php @@ -24,14 +24,14 @@ class RegexValidatorTest extends ConstraintValidatorTestCase public function testNullIsValid() { - $this->validator->validate(null, new Regex(array('pattern' => '/^[0-9]+$/'))); + $this->validator->validate(null, new Regex(['pattern' => '/^[0-9]+$/'])); $this->assertNoViolation(); } public function testEmptyStringIsValid() { - $this->validator->validate('', new Regex(array('pattern' => '/^[0-9]+$/'))); + $this->validator->validate('', new Regex(['pattern' => '/^[0-9]+$/'])); $this->assertNoViolation(); } @@ -41,7 +41,7 @@ class RegexValidatorTest extends ConstraintValidatorTestCase */ public function testExpectsStringCompatibleType() { - $this->validator->validate(new \stdClass(), new Regex(array('pattern' => '/^[0-9]+$/'))); + $this->validator->validate(new \stdClass(), new Regex(['pattern' => '/^[0-9]+$/'])); } /** @@ -49,7 +49,7 @@ class RegexValidatorTest extends ConstraintValidatorTestCase */ public function testValidValues($value) { - $constraint = new Regex(array('pattern' => '/^[0-9]+$/')); + $constraint = new Regex(['pattern' => '/^[0-9]+$/']); $this->validator->validate($value, $constraint); $this->assertNoViolation(); @@ -57,12 +57,12 @@ class RegexValidatorTest extends ConstraintValidatorTestCase public function getValidValues() { - return array( - array(0), - array('0'), - array('090909'), - array(90909), - ); + return [ + [0], + ['0'], + ['090909'], + [90909], + ]; } /** @@ -70,10 +70,10 @@ class RegexValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidValues($value) { - $constraint = new Regex(array( + $constraint = new Regex([ 'pattern' => '/^[0-9]+$/', 'message' => 'myMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -85,9 +85,9 @@ class RegexValidatorTest extends ConstraintValidatorTestCase public function getInvalidValues() { - return array( - array('abcd'), - array('090foo'), - ); + return [ + ['abcd'], + ['090foo'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php index a22251d0..fe22e967 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php @@ -63,11 +63,11 @@ class TimeValidatorTest extends ConstraintValidatorTestCase public function getValidTimes() { - return array( - array('01:02:03'), - array('00:00:00'), - array('23:59:59'), - ); + return [ + ['01:02:03'], + ['00:00:00'], + ['23:59:59'], + ]; } /** @@ -75,9 +75,9 @@ class TimeValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidTimes($time, $code) { - $constraint = new Time(array( + $constraint = new Time([ 'message' => 'myMessage', - )); + ]); $this->validator->validate($time, $constraint); @@ -89,15 +89,15 @@ class TimeValidatorTest extends ConstraintValidatorTestCase public function getInvalidTimes() { - return array( - array('foobar', Time::INVALID_FORMAT_ERROR), - array('foobar 12:34:56', Time::INVALID_FORMAT_ERROR), - array('12:34:56 foobar', Time::INVALID_FORMAT_ERROR), - array('00:00', Time::INVALID_FORMAT_ERROR), - array('24:00:00', Time::INVALID_TIME_ERROR), - array('00:60:00', Time::INVALID_TIME_ERROR), - array('00:00:60', Time::INVALID_TIME_ERROR), - ); + return [ + ['foobar', Time::INVALID_FORMAT_ERROR], + ['foobar 12:34:56', Time::INVALID_FORMAT_ERROR], + ['12:34:56 foobar', Time::INVALID_FORMAT_ERROR], + ['00:00', Time::INVALID_FORMAT_ERROR], + ['24:00:00', Time::INVALID_TIME_ERROR], + ['00:60:00', Time::INVALID_TIME_ERROR], + ['00:00:60', Time::INVALID_TIME_ERROR], + ]; } public function testDateTimeImmutableIsValid() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php index 86ce972a..17334bea 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php @@ -26,7 +26,7 @@ class TypeValidatorTest extends ConstraintValidatorTestCase public function testNullIsValid() { - $constraint = new Type(array('type' => 'integer')); + $constraint = new Type(['type' => 'integer']); $this->validator->validate(null, $constraint); @@ -35,7 +35,7 @@ class TypeValidatorTest extends ConstraintValidatorTestCase public function testEmptyIsValidIfString() { - $constraint = new Type(array('type' => 'string')); + $constraint = new Type(['type' => 'string']); $this->validator->validate('', $constraint); @@ -44,10 +44,10 @@ class TypeValidatorTest extends ConstraintValidatorTestCase public function testEmptyIsInvalidIfNoString() { - $constraint = new Type(array( + $constraint = new Type([ 'type' => 'integer', 'message' => 'myMessage', - )); + ]); $this->validator->validate('', $constraint); @@ -63,7 +63,7 @@ class TypeValidatorTest extends ConstraintValidatorTestCase */ public function testValidValues($value, $type) { - $constraint = new Type(array('type' => $type)); + $constraint = new Type(['type' => $type]); $this->validator->validate($value, $constraint); @@ -75,36 +75,36 @@ class TypeValidatorTest extends ConstraintValidatorTestCase $object = new \stdClass(); $file = $this->createFile(); - return array( - array(true, 'Boolean'), - array(false, 'Boolean'), - array(true, 'boolean'), - array(false, 'boolean'), - array(true, 'bool'), - array(false, 'bool'), - array(0, 'numeric'), - array('0', 'numeric'), - array(1.5, 'numeric'), - array('1.5', 'numeric'), - array(0, 'integer'), - array(1.5, 'float'), - array('12345', 'string'), - array(array(), 'array'), - array($object, 'object'), - array($object, 'stdClass'), - array($file, 'resource'), - array('12345', 'digit'), - array('12a34', 'alnum'), - array('abcde', 'alpha'), - array("\n\r\t", 'cntrl'), - array('arf12', 'graph'), - array('abcde', 'lower'), - array('ABCDE', 'upper'), - array('arf12', 'print'), - array('*&$()', 'punct'), - array("\n\r\t", 'space'), - array('AB10BC99', 'xdigit'), - ); + return [ + [true, 'Boolean'], + [false, 'Boolean'], + [true, 'boolean'], + [false, 'boolean'], + [true, 'bool'], + [false, 'bool'], + [0, 'numeric'], + ['0', 'numeric'], + [1.5, 'numeric'], + ['1.5', 'numeric'], + [0, 'integer'], + [1.5, 'float'], + ['12345', 'string'], + [[], 'array'], + [$object, 'object'], + [$object, 'stdClass'], + [$file, 'resource'], + ['12345', 'digit'], + ['12a34', 'alnum'], + ['abcde', 'alpha'], + ["\n\r\t", 'cntrl'], + ['arf12', 'graph'], + ['abcde', 'lower'], + ['ABCDE', 'upper'], + ['arf12', 'print'], + ['*&$()', 'punct'], + ["\n\r\t", 'space'], + ['AB10BC99', 'xdigit'], + ]; } /** @@ -112,10 +112,10 @@ class TypeValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidValues($value, $type, $valueAsString) { - $constraint = new Type(array( + $constraint = new Type([ 'type' => $type, 'message' => 'myMessage', - )); + ]); $this->validator->validate($value, $constraint); @@ -131,36 +131,36 @@ class TypeValidatorTest extends ConstraintValidatorTestCase $object = new \stdClass(); $file = $this->createFile(); - return array( - array('foobar', 'numeric', '"foobar"'), - array('foobar', 'boolean', '"foobar"'), - array('0', 'integer', '"0"'), - array('1.5', 'float', '"1.5"'), - array(12345, 'string', '12345'), - array($object, 'boolean', 'object'), - array($object, 'numeric', 'object'), - array($object, 'integer', 'object'), - array($object, 'float', 'object'), - array($object, 'string', 'object'), - array($object, 'resource', 'object'), - array($file, 'boolean', 'resource'), - array($file, 'numeric', 'resource'), - array($file, 'integer', 'resource'), - array($file, 'float', 'resource'), - array($file, 'string', 'resource'), - array($file, 'object', 'resource'), - array('12a34', 'digit', '"12a34"'), - array('1a#23', 'alnum', '"1a#23"'), - array('abcd1', 'alpha', '"abcd1"'), - array("\nabc", 'cntrl', "\"\nabc\""), - array("abc\n", 'graph', "\"abc\n\""), - array('abCDE', 'lower', '"abCDE"'), - array('ABcde', 'upper', '"ABcde"'), - array("\nabc", 'print', "\"\nabc\""), - array('abc&$!', 'punct', '"abc&$!"'), - array("\nabc", 'space', "\"\nabc\""), - array('AR1012', 'xdigit', '"AR1012"'), - ); + return [ + ['foobar', 'numeric', '"foobar"'], + ['foobar', 'boolean', '"foobar"'], + ['0', 'integer', '"0"'], + ['1.5', 'float', '"1.5"'], + [12345, 'string', '12345'], + [$object, 'boolean', 'object'], + [$object, 'numeric', 'object'], + [$object, 'integer', 'object'], + [$object, 'float', 'object'], + [$object, 'string', 'object'], + [$object, 'resource', 'object'], + [$file, 'boolean', 'resource'], + [$file, 'numeric', 'resource'], + [$file, 'integer', 'resource'], + [$file, 'float', 'resource'], + [$file, 'string', 'resource'], + [$file, 'object', 'resource'], + ['12a34', 'digit', '"12a34"'], + ['1a#23', 'alnum', '"1a#23"'], + ['abcd1', 'alpha', '"abcd1"'], + ["\nabc", 'cntrl', "\"\nabc\""], + ["abc\n", 'graph', "\"abc\n\""], + ['abCDE', 'lower', '"abCDE"'], + ['ABcde', 'upper', '"ABcde"'], + ["\nabc", 'print', "\"\nabc\""], + ['abc&$!', 'punct', '"abc&$!"'], + ["\nabc", 'space', "\"\nabc\""], + ['AR1012', 'xdigit', '"AR1012"'], + ]; } protected function createFile() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php index 13cacb0f..bd1c9a3e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php @@ -67,67 +67,67 @@ class UrlValidatorTest extends ConstraintValidatorTestCase public function getValidUrls() { - return array( - array('http://a.pl'), - array('http://www.google.com'), - array('http://www.google.com.'), - array('http://www.google.museum'), - array('https://google.com/'), - array('https://google.com:80/'), - array('http://www.example.coop/'), - array('http://www.test-example.com/'), - array('http://www.symfony.com/'), - array('http://symfony.fake/blog/'), - array('http://symfony.com/?'), - array('http://symfony.com/search?type=&q=url+validator'), - array('http://symfony.com/#'), - array('http://symfony.com/#?'), - array('http://www.symfony.com/doc/current/book/validation.html#supported-constraints'), - array('http://very.long.domain.name.com/'), - array('http://localhost/'), - array('http://myhost123/'), - array('http://127.0.0.1/'), - array('http://127.0.0.1:80/'), - array('http://[::1]/'), - array('http://[::1]:80/'), - array('http://[1:2:3::4:5:6:7]/'), - array('http://sãopaulo.com/'), - array('http://xn--sopaulo-xwa.com/'), - array('http://sãopaulo.com.br/'), - array('http://xn--sopaulo-xwa.com.br/'), - array('http://пример.испытание/'), - array('http://xn--e1afmkfd.xn--80akhbyknj4f/'), - array('http://مثال.إختبار/'), - array('http://xn--mgbh0fb.xn--kgbechtv/'), - array('http://例子.测试/'), - array('http://xn--fsqu00a.xn--0zwm56d/'), - array('http://例子.測試/'), - array('http://xn--fsqu00a.xn--g6w251d/'), - array('http://例え.テスト/'), - array('http://xn--r8jz45g.xn--zckzah/'), - array('http://مثال.آزمایشی/'), - array('http://xn--mgbh0fb.xn--hgbk6aj7f53bba/'), - array('http://실례.테스트/'), - array('http://xn--9n2bp8q.xn--9t4b11yi5a/'), - array('http://العربية.idn.icann.org/'), - array('http://xn--ogb.idn.icann.org/'), - array('http://xn--e1afmkfd.xn--80akhbyknj4f.xn--e1afmkfd/'), - array('http://xn--espaa-rta.xn--ca-ol-fsay5a/'), - array('http://xn--d1abbgf6aiiy.xn--p1ai/'), - array('http://☎.com/'), - array('http://username:password@symfony.com'), - array('http://user.name:password@symfony.com'), - array('http://username:pass.word@symfony.com'), - array('http://user.name:pass.word@symfony.com'), - array('http://user-name@symfony.com'), - array('http://symfony.com?'), - array('http://symfony.com?query=1'), - array('http://symfony.com/?query=1'), - array('http://symfony.com#'), - array('http://symfony.com#fragment'), - array('http://symfony.com/#fragment'), - array('http://symfony.com/#one_more%20test'), - ); + return [ + ['http://a.pl'], + ['http://www.google.com'], + ['http://www.google.com.'], + ['http://www.google.museum'], + ['https://google.com/'], + ['https://google.com:80/'], + ['http://www.example.coop/'], + ['http://www.test-example.com/'], + ['http://www.symfony.com/'], + ['http://symfony.fake/blog/'], + ['http://symfony.com/?'], + ['http://symfony.com/search?type=&q=url+validator'], + ['http://symfony.com/#'], + ['http://symfony.com/#?'], + ['http://www.symfony.com/doc/current/book/validation.html#supported-constraints'], + ['http://very.long.domain.name.com/'], + ['http://localhost/'], + ['http://myhost123/'], + ['http://127.0.0.1/'], + ['http://127.0.0.1:80/'], + ['http://[::1]/'], + ['http://[::1]:80/'], + ['http://[1:2:3::4:5:6:7]/'], + ['http://sãopaulo.com/'], + ['http://xn--sopaulo-xwa.com/'], + ['http://sãopaulo.com.br/'], + ['http://xn--sopaulo-xwa.com.br/'], + ['http://пример.испытание/'], + ['http://xn--e1afmkfd.xn--80akhbyknj4f/'], + ['http://مثال.إختبار/'], + ['http://xn--mgbh0fb.xn--kgbechtv/'], + ['http://例子.测试/'], + ['http://xn--fsqu00a.xn--0zwm56d/'], + ['http://例子.測試/'], + ['http://xn--fsqu00a.xn--g6w251d/'], + ['http://例え.テスト/'], + ['http://xn--r8jz45g.xn--zckzah/'], + ['http://مثال.آزمایشی/'], + ['http://xn--mgbh0fb.xn--hgbk6aj7f53bba/'], + ['http://실례.테스트/'], + ['http://xn--9n2bp8q.xn--9t4b11yi5a/'], + ['http://العربية.idn.icann.org/'], + ['http://xn--ogb.idn.icann.org/'], + ['http://xn--e1afmkfd.xn--80akhbyknj4f.xn--e1afmkfd/'], + ['http://xn--espaa-rta.xn--ca-ol-fsay5a/'], + ['http://xn--d1abbgf6aiiy.xn--p1ai/'], + ['http://☎.com/'], + ['http://username:password@symfony.com'], + ['http://user.name:password@symfony.com'], + ['http://username:pass.word@symfony.com'], + ['http://user.name:pass.word@symfony.com'], + ['http://user-name@symfony.com'], + ['http://symfony.com?'], + ['http://symfony.com?query=1'], + ['http://symfony.com/?query=1'], + ['http://symfony.com#'], + ['http://symfony.com#fragment'], + ['http://symfony.com/#fragment'], + ['http://symfony.com/#one_more%20test'], + ]; } /** @@ -135,9 +135,9 @@ class UrlValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidUrls($url) { - $constraint = new Url(array( + $constraint = new Url([ 'message' => 'myMessage', - )); + ]); $this->validator->validate($url, $constraint); @@ -149,29 +149,29 @@ class UrlValidatorTest extends ConstraintValidatorTestCase public function getInvalidUrls() { - return array( - array('google.com'), - array('://google.com'), - array('http ://google.com'), - array('http:/google.com'), - array('http://goog_le.com'), - array('http://google.com::aa'), - array('http://google.com:aa'), - array('ftp://google.fr'), - array('faked://google.fr'), - array('http://127.0.0.1:aa/'), - array('ftp://[::1]/'), - array('http://[::1'), - array('http://hello.☎/'), - array('http://:password@symfony.com'), - array('http://:password@@symfony.com'), - array('http://username:passwordsymfony.com'), - array('http://usern@me:password@symfony.com'), - array('http://example.com/exploit.html?'), - array('http://example.com/exploit.html?hel lo'), - array('http://example.com/exploit.html?not_a%hex'), - array('http://'), - ); + return [ + ['google.com'], + ['://google.com'], + ['http ://google.com'], + ['http:/google.com'], + ['http://goog_le.com'], + ['http://google.com::aa'], + ['http://google.com:aa'], + ['ftp://google.fr'], + ['faked://google.fr'], + ['http://127.0.0.1:aa/'], + ['ftp://[::1]/'], + ['http://[::1'], + ['http://hello.☎/'], + ['http://:password@symfony.com'], + ['http://:password@@symfony.com'], + ['http://username:passwordsymfony.com'], + ['http://usern@me:password@symfony.com'], + ['http://example.com/exploit.html?'], + ['http://example.com/exploit.html?hel lo'], + ['http://example.com/exploit.html?not_a%hex'], + ['http://'], + ]; } /** @@ -179,9 +179,9 @@ class UrlValidatorTest extends ConstraintValidatorTestCase */ public function testCustomProtocolIsValid($url) { - $constraint = new Url(array( - 'protocols' => array('ftp', 'file', 'git'), - )); + $constraint = new Url([ + 'protocols' => ['ftp', 'file', 'git'], + ]); $this->validator->validate($url, $constraint); @@ -190,11 +190,11 @@ class UrlValidatorTest extends ConstraintValidatorTestCase public function getValidCustomUrls() { - return array( - array('ftp://google.com'), - array('file://127.0.0.1'), - array('git://[::1]/'), - ); + return [ + ['ftp://google.com'], + ['file://127.0.0.1'], + ['git://[::1]/'], + ]; } /** @@ -203,12 +203,12 @@ class UrlValidatorTest extends ConstraintValidatorTestCase */ public function testCheckDns($violation) { - DnsMock::withMockedHosts(array('example.com' => array(array('type' => $violation ? '' : 'A')))); + DnsMock::withMockedHosts(['example.com' => [['type' => $violation ? '' : 'A']]]); - $constraint = new Url(array( + $constraint = new Url([ 'checkDNS' => 'ANY', 'dnsMessage' => 'myMessage', - )); + ]); $this->validator->validate('http://example.com', $constraint); @@ -224,7 +224,7 @@ class UrlValidatorTest extends ConstraintValidatorTestCase public function getCheckDns() { - return array(array(true), array(false)); + return [[true], [false]]; } /** @@ -233,12 +233,12 @@ class UrlValidatorTest extends ConstraintValidatorTestCase */ public function testCheckDnsByType($type) { - DnsMock::withMockedHosts(array('example.com' => array(array('type' => $type)))); + DnsMock::withMockedHosts(['example.com' => [['type' => $type]]]); - $constraint = new Url(array( + $constraint = new Url([ 'checkDNS' => $type, 'dnsMessage' => 'myMessage', - )); + ]); $this->validator->validate('http://example.com', $constraint); @@ -247,20 +247,20 @@ class UrlValidatorTest extends ConstraintValidatorTestCase public function getCheckDnsTypes() { - return array( - array('ANY'), - array('A'), - array('A6'), - array('AAAA'), - array('CNAME'), - array('MX'), - array('NAPTR'), - array('NS'), - array('PTR'), - array('SOA'), - array('SRV'), - array('TXT'), - ); + return [ + ['ANY'], + ['A'], + ['A6'], + ['AAAA'], + ['CNAME'], + ['MX'], + ['NAPTR'], + ['NS'], + ['PTR'], + ['SOA'], + ['SRV'], + ['TXT'], + ]; } /** @@ -268,12 +268,12 @@ class UrlValidatorTest extends ConstraintValidatorTestCase */ public function testCheckDnsWithBoolean() { - DnsMock::withMockedHosts(array('example.com' => array(array('type' => 'A')))); + DnsMock::withMockedHosts(['example.com' => [['type' => 'A']]]); - $constraint = new Url(array( + $constraint = new Url([ 'checkDNS' => true, 'dnsMessage' => 'myMessage', - )); + ]); $this->validator->validate('http://example.com', $constraint); @@ -286,12 +286,12 @@ class UrlValidatorTest extends ConstraintValidatorTestCase */ public function testCheckDnsWithInvalidType() { - DnsMock::withMockedHosts(array('example.com' => array(array('type' => 'A')))); + DnsMock::withMockedHosts(['example.com' => [['type' => 'A']]]); - $constraint = new Url(array( + $constraint = new Url([ 'checkDNS' => 'BOGUS', 'dnsMessage' => 'myMessage', - )); + ]); $this->validator->validate('http://example.com', $constraint); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php index a39ec93d..6c379b94 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php @@ -75,14 +75,14 @@ class UuidValidatorTest extends ConstraintValidatorTestCase public function getValidStrictUuids() { - return array( - array('216fff40-98d9-11e3-a5e2-0800200c9a66'), // Version 1 UUID in lowercase - array('216fff40-98d9-11e3-a5e2-0800200c9a66', array(Uuid::V1_MAC)), - array('216FFF40-98D9-11E3-A5E2-0800200C9A66'), // Version 1 UUID in UPPERCASE - array('456daefb-5aa6-41b5-8dbc-068b05a8b201'), // Version 4 UUID in lowercase - array('456daEFb-5AA6-41B5-8DBC-068B05A8B201'), // Version 4 UUID in mixed case - array('456daEFb-5AA6-41B5-8DBC-068B05A8B201', array(Uuid::V4_RANDOM)), - ); + return [ + ['216fff40-98d9-11e3-a5e2-0800200c9a66'], // Version 1 UUID in lowercase + ['216fff40-98d9-11e3-a5e2-0800200c9a66', [Uuid::V1_MAC]], + ['216FFF40-98D9-11E3-A5E2-0800200C9A66'], // Version 1 UUID in UPPERCASE + ['456daefb-5aa6-41b5-8dbc-068b05a8b201'], // Version 4 UUID in lowercase + ['456daEFb-5AA6-41B5-8DBC-068B05A8B201'], // Version 4 UUID in mixed case + ['456daEFb-5AA6-41B5-8DBC-068B05A8B201', [Uuid::V4_RANDOM]], + ]; } /** @@ -90,9 +90,9 @@ class UuidValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidStrictUuids($uuid, $code, $versions = null) { - $constraint = new Uuid(array( + $constraint = new Uuid([ 'message' => 'testMessage', - )); + ]); if (null !== $versions) { $constraint->versions = $versions; @@ -108,48 +108,48 @@ class UuidValidatorTest extends ConstraintValidatorTestCase public function getInvalidStrictUuids() { - return array( - array('216fff40-98d9-11e3-a5e2_0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), - array('216gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), - array('216Gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), - array('216fff40-98d9-11e3-a5e-20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), - array('216f-ff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), - array('216fff40-98d9-11e3-a5e2-0800-200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), - array('216fff40-98d9-11e3-a5e2-0800200c-9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), - array('216fff40-98d9-11e3-a5e20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), - array('216fff4098d911e3a5e20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), - array('216fff40-98d9-11e3-a5e2-0800200c9a6', Uuid::TOO_SHORT_ERROR), - array('216fff40-98d9-11e3-a5e2-0800200c9a666', Uuid::TOO_LONG_ERROR), - array('216fff40-98d9-01e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), - array('216fff40-98d9-61e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), - array('216fff40-98d9-71e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), - array('216fff40-98d9-81e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), - array('216fff40-98d9-91e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), - array('216fff40-98d9-a1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), - array('216fff40-98d9-b1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), - array('216fff40-98d9-c1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), - array('216fff40-98d9-d1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), - array('216fff40-98d9-e1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), - array('216fff40-98d9-f1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), - array('216fff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR, array(Uuid::V2_DCE, Uuid::V3_MD5, Uuid::V4_RANDOM, Uuid::V5_SHA1)), - array('216fff40-98d9-21e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR, array(Uuid::V1_MAC, Uuid::V3_MD5, Uuid::V4_RANDOM, Uuid::V5_SHA1)), - array('216fff40-98d9-11e3-05e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), - array('216fff40-98d9-11e3-15e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), - array('216fff40-98d9-11e3-25e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), - array('216fff40-98d9-11e3-35e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), - array('216fff40-98d9-11e3-45e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), - array('216fff40-98d9-11e3-55e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), - array('216fff40-98d9-11e3-65e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), - array('216fff40-98d9-11e3-75e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), - array('216fff40-98d9-11e3-c5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), - array('216fff40-98d9-11e3-d5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), - array('216fff40-98d9-11e3-e5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), - array('216fff40-98d9-11e3-f5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + return [ + ['216fff40-98d9-11e3-a5e2_0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR], + ['216gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR], + ['216Gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR], + ['216fff40-98d9-11e3-a5e-20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR], + ['216f-ff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR], + ['216fff40-98d9-11e3-a5e2-0800-200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR], + ['216fff40-98d9-11e3-a5e2-0800200c-9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR], + ['216fff40-98d9-11e3-a5e20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR], + ['216fff4098d911e3a5e20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR], + ['216fff40-98d9-11e3-a5e2-0800200c9a6', Uuid::TOO_SHORT_ERROR], + ['216fff40-98d9-11e3-a5e2-0800200c9a666', Uuid::TOO_LONG_ERROR], + ['216fff40-98d9-01e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR], + ['216fff40-98d9-61e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR], + ['216fff40-98d9-71e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR], + ['216fff40-98d9-81e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR], + ['216fff40-98d9-91e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR], + ['216fff40-98d9-a1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR], + ['216fff40-98d9-b1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR], + ['216fff40-98d9-c1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR], + ['216fff40-98d9-d1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR], + ['216fff40-98d9-e1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR], + ['216fff40-98d9-f1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR], + ['216fff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR, [Uuid::V2_DCE, Uuid::V3_MD5, Uuid::V4_RANDOM, Uuid::V5_SHA1]], + ['216fff40-98d9-21e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR, [Uuid::V1_MAC, Uuid::V3_MD5, Uuid::V4_RANDOM, Uuid::V5_SHA1]], + ['216fff40-98d9-11e3-05e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR], + ['216fff40-98d9-11e3-15e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR], + ['216fff40-98d9-11e3-25e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR], + ['216fff40-98d9-11e3-35e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR], + ['216fff40-98d9-11e3-45e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR], + ['216fff40-98d9-11e3-55e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR], + ['216fff40-98d9-11e3-65e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR], + ['216fff40-98d9-11e3-75e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR], + ['216fff40-98d9-11e3-c5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR], + ['216fff40-98d9-11e3-d5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR], + ['216fff40-98d9-11e3-e5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR], + ['216fff40-98d9-11e3-f5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR], // Non-standard UUID allowed by some other systems - array('{216fff40-98d9-11e3-a5e2-0800200c9a66}', Uuid::INVALID_CHARACTERS_ERROR), - array('[216fff40-98d9-11e3-a5e2-0800200c9a66]', Uuid::INVALID_CHARACTERS_ERROR), - ); + ['{216fff40-98d9-11e3-a5e2-0800200c9a66}', Uuid::INVALID_CHARACTERS_ERROR], + ['[216fff40-98d9-11e3-a5e2-0800200c9a66]', Uuid::INVALID_CHARACTERS_ERROR], + ]; } /** @@ -157,9 +157,9 @@ class UuidValidatorTest extends ConstraintValidatorTestCase */ public function testValidNonStrictUuids($uuid) { - $constraint = new Uuid(array( + $constraint = new Uuid([ 'strict' => false, - )); + ]); $this->validator->validate($uuid, $constraint); @@ -168,19 +168,19 @@ class UuidValidatorTest extends ConstraintValidatorTestCase public function getValidNonStrictUuids() { - return array( - array('216fff40-98d9-11e3-a5e2-0800200c9a66'), // Version 1 UUID in lowercase - array('216FFF40-98D9-11E3-A5E2-0800200C9A66'), // Version 1 UUID in UPPERCASE - array('456daefb-5aa6-41b5-8dbc-068b05a8b201'), // Version 4 UUID in lowercase - array('456DAEFb-5AA6-41B5-8DBC-068b05a8B201'), // Version 4 UUID in mixed case + return [ + ['216fff40-98d9-11e3-a5e2-0800200c9a66'], // Version 1 UUID in lowercase + ['216FFF40-98D9-11E3-A5E2-0800200C9A66'], // Version 1 UUID in UPPERCASE + ['456daefb-5aa6-41b5-8dbc-068b05a8b201'], // Version 4 UUID in lowercase + ['456DAEFb-5AA6-41B5-8DBC-068b05a8B201'], // Version 4 UUID in mixed case // Non-standard UUIDs allowed by some other systems - array('216f-ff40-98d9-11e3-a5e2-0800-200c-9a66'), // Non-standard dash positions (every 4 chars) - array('216fff40-98d911e3-a5e20800-200c9a66'), // Non-standard dash positions (every 8 chars) - array('216fff4098d911e3a5e20800200c9a66'), // No dashes at all - array('{216fff40-98d9-11e3-a5e2-0800200c9a66}'), // Wrapped with curly braces - array('[216fff40-98d9-11e3-a5e2-0800200c9a66]'), // Wrapped with squared braces - ); + ['216f-ff40-98d9-11e3-a5e2-0800-200c-9a66'], // Non-standard dash positions (every 4 chars) + ['216fff40-98d911e3-a5e20800-200c9a66'], // Non-standard dash positions (every 8 chars) + ['216fff4098d911e3a5e20800200c9a66'], // No dashes at all + ['{216fff40-98d9-11e3-a5e2-0800200c9a66}'], // Wrapped with curly braces + ['[216fff40-98d9-11e3-a5e2-0800200c9a66]'], // Wrapped with squared braces + ]; } /** @@ -188,10 +188,10 @@ class UuidValidatorTest extends ConstraintValidatorTestCase */ public function testInvalidNonStrictUuids($uuid, $code) { - $constraint = new Uuid(array( + $constraint = new Uuid([ 'strict' => false, 'message' => 'myMessage', - )); + ]); $this->validator->validate($uuid, $constraint); @@ -203,14 +203,14 @@ class UuidValidatorTest extends ConstraintValidatorTestCase public function getInvalidNonStrictUuids() { - return array( - array('216fff40-98d9-11e3-a5e2_0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), - array('216gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), - array('216Gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), - array('216fff40-98d9-11e3-a5e2_0800200c9a6', Uuid::INVALID_CHARACTERS_ERROR), - array('216fff40-98d9-11e3-a5e-20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), - array('216fff40-98d9-11e3-a5e2-0800200c9a6', Uuid::TOO_SHORT_ERROR), - array('216fff40-98d9-11e3-a5e2-0800200c9a666', Uuid::TOO_LONG_ERROR), - ); + return [ + ['216fff40-98d9-11e3-a5e2_0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR], + ['216gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR], + ['216Gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR], + ['216fff40-98d9-11e3-a5e2_0800200c9a6', Uuid::INVALID_CHARACTERS_ERROR], + ['216fff40-98d9-11e3-a5e-20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR], + ['216fff40-98d9-11e3-a5e2-0800200c9a6', Uuid::TOO_SHORT_ERROR], + ['216fff40-98d9-11e3-a5e2-0800200c9a666', Uuid::TOO_LONG_ERROR], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ValidTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ValidTest.php index 9928bd82..7245dc90 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ValidTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ValidTest.php @@ -21,9 +21,9 @@ class ValidTest extends TestCase { public function testGroupsCanBeSet() { - $constraint = new Valid(array('groups' => 'foo')); + $constraint = new Valid(['groups' => 'foo']); - $this->assertSame(array('foo'), $constraint->groups); + $this->assertSame(['foo'], $constraint->groups); } public function testGroupsAreNullByDefault() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ValidValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ValidValidatorTest.php index c4ccf155..0ec1d421 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ValidValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ValidValidatorTest.php @@ -14,7 +14,7 @@ class ValidValidatorTest extends TestCase $validatorBuilder = new ValidatorBuilder(); $validator = $validatorBuilder->enableAnnotationMapping()->getValidator(); - $violations = $validator->validate(new Foo(), null, array('nested')); + $violations = $validator->validate(new Foo(), null, ['nested']); $this->assertCount(1, $violations); $this->assertSame('fooBar.fooBarBaz.foo', $violations->get(0)->getPropertyPath()); @@ -27,7 +27,7 @@ class ValidValidatorTest extends TestCase $foo = new Foo(); $foo->fooBar = null; - $violations = $validator->validate($foo, null, array('nested')); + $violations = $validator->validate($foo, null, ['nested']); $this->assertCount(0, $violations); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/DataCollector/ValidatorDataCollectorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/DataCollector/ValidatorDataCollectorTest.php index b28650c3..f32acf22 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/DataCollector/ValidatorDataCollectorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/DataCollector/ValidatorDataCollectorTest.php @@ -27,10 +27,10 @@ class ValidatorDataCollectorTest extends TestCase $collector = new ValidatorDataCollector($validator); - $violations = new ConstraintViolationList(array( + $violations = new ConstraintViolationList([ $this->createMock(ConstraintViolation::class), $this->createMock(ConstraintViolation::class), - )); + ]); $originalValidator->method('validate')->willReturn($violations); $validator->validate(new \stdClass()); @@ -57,10 +57,10 @@ class ValidatorDataCollectorTest extends TestCase $collector = new ValidatorDataCollector($validator); - $violations = new ConstraintViolationList(array( + $violations = new ConstraintViolationList([ $this->createMock(ConstraintViolation::class), $this->createMock(ConstraintViolation::class), - )); + ]); $originalValidator->method('validate')->willReturn($violations); $validator->validate(new \stdClass()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/DependencyInjection/AddConstraintValidatorsPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/DependencyInjection/AddConstraintValidatorsPassTest.php index c47cbcc9..c3224840 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/DependencyInjection/AddConstraintValidatorsPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/DependencyInjection/AddConstraintValidatorsPassTest.php @@ -25,21 +25,21 @@ class AddConstraintValidatorsPassTest extends TestCase { $container = new ContainerBuilder(); $validatorFactory = $container->register('validator.validator_factory') - ->addArgument(array()); + ->addArgument([]); $container->register('my_constraint_validator_service1', Validator1::class) - ->addTag('validator.constraint_validator', array('alias' => 'my_constraint_validator_alias1')); + ->addTag('validator.constraint_validator', ['alias' => 'my_constraint_validator_alias1']); $container->register('my_constraint_validator_service2', Validator2::class) ->addTag('validator.constraint_validator'); $addConstraintValidatorsPass = new AddConstraintValidatorsPass(); $addConstraintValidatorsPass->process($container); - $expected = (new Definition(ServiceLocator::class, array(array( + $expected = (new Definition(ServiceLocator::class, [[ Validator1::class => new ServiceClosureArgument(new Reference('my_constraint_validator_service1')), 'my_constraint_validator_alias1' => new ServiceClosureArgument(new Reference('my_constraint_validator_service1')), Validator2::class => new ServiceClosureArgument(new Reference('my_constraint_validator_service2')), - ))))->addTag('container.service_locator')->setPublic(false); + ]]))->addTag('container.service_locator')->setPublic(false); $this->assertEquals($expected, $container->getDefinition((string) $validatorFactory->getArgument(0))); } @@ -51,7 +51,7 @@ class AddConstraintValidatorsPassTest extends TestCase { $container = new ContainerBuilder(); $container->register('validator.validator_factory') - ->addArgument(array()); + ->addArgument([]); $container->register('my_abstract_constraint_validator') ->setAbstract(true) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/DependencyInjection/AddValidatorInitializersPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/DependencyInjection/AddValidatorInitializersPassTest.php index 61c13d25..8d87b635 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/DependencyInjection/AddValidatorInitializersPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/DependencyInjection/AddValidatorInitializersPassTest.php @@ -31,13 +31,13 @@ class AddValidatorInitializersPassTest extends TestCase ; $container ->register('validator.builder') - ->addArgument(array()) + ->addArgument([]) ; (new AddValidatorInitializersPass())->process($container); $this->assertEquals( - array(array('addObjectInitializers', array(array(new Reference('initializer1'), new Reference('initializer2'))))), + [['addObjectInitializers', [[new Reference('initializer1'), new Reference('initializer2')]]]], $container->getDefinition('validator.builder')->getMethodCalls() ); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintA.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintA.php index 8a196dcc..17ba0367 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintA.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintA.php @@ -26,6 +26,6 @@ class ConstraintA extends Constraint public function getTargets() { - return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + return [self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintAValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintAValidator.php index 867b024c..8b0d30f5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintAValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintAValidator.php @@ -29,7 +29,7 @@ class ConstraintAValidator extends ConstraintValidator public function validate($value, Constraint $constraint) { if ('VALID' != $value) { - $this->context->addViolation('message', array('param' => 'value')); + $this->context->addViolation('message', ['param' => 'value']); return; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintB.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintB.php index 62589233..99d1951e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintB.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintB.php @@ -18,6 +18,6 @@ class ConstraintB extends Constraint { public function getTargets() { - return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + return [self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintC.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintC.php index b0418b87..675066ef 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintC.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintC.php @@ -20,11 +20,11 @@ class ConstraintC extends Constraint public function getRequiredOptions() { - return array('option1'); + return ['option1']; } public function getTargets() { - return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + return [self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValue.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValue.php index 4ebd981e..b3fbd708 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValue.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValue.php @@ -26,6 +26,6 @@ class ConstraintWithValue extends Constraint public function getTargets() { - return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + return [self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValueAsDefault.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValueAsDefault.php index a975e078..618cca74 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValueAsDefault.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValueAsDefault.php @@ -26,6 +26,6 @@ class ConstraintWithValueAsDefault extends Constraint public function getTargets() { - return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + return [self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/CustomArrayObject.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/CustomArrayObject.php index feb25318..1edf1de0 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/CustomArrayObject.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/CustomArrayObject.php @@ -21,12 +21,12 @@ class CustomArrayObject implements \ArrayAccess, \IteratorAggregate, \Countable, public function __construct(array $array = null) { - $this->array = $array ?: array(); + $this->array = $array ?: []; } public function offsetExists($offset) { - return array_key_exists($offset, $this->array); + return \array_key_exists($offset, $this->array); } public function offsetGet($offset) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticCar.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticCar.php index 0b384872..af90ddc7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticCar.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticCar.php @@ -18,6 +18,6 @@ class EntityStaticCar extends EntityStaticVehicle { public static function loadValidatorMetadata(ClassMetadata $metadata) { - $metadata->addPropertyConstraint('wheels', new Length(array('max' => 99))); + $metadata->addPropertyConstraint('wheels', new Length(['max' => 99])); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticCarTurbo.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticCarTurbo.php index abf1edbd..d559074d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticCarTurbo.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticCarTurbo.php @@ -18,6 +18,6 @@ class EntityStaticCarTurbo extends EntityStaticCar { public static function loadValidatorMetadata(ClassMetadata $metadata) { - $metadata->addPropertyConstraint('wheels', new Length(array('max' => 99))); + $metadata->addPropertyConstraint('wheels', new Length(['max' => 99])); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticVehicle.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticVehicle.php index 9ce72935..1190318f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticVehicle.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticVehicle.php @@ -20,6 +20,6 @@ class EntityStaticVehicle public static function loadValidatorMetadata(ClassMetadata $metadata) { - $metadata->addPropertyConstraint('wheels', new Length(array('max' => 99))); + $metadata->addPropertyConstraint('wheels', new Length(['max' => 99])); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FailingConstraint.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FailingConstraint.php index 03019fc3..4ea07f74 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FailingConstraint.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FailingConstraint.php @@ -19,6 +19,6 @@ class FailingConstraint extends Constraint public function getTargets() { - return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + return [self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FailingConstraintValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FailingConstraintValidator.php index a019dd6f..12246438 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FailingConstraintValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FailingConstraintValidator.php @@ -18,6 +18,6 @@ class FailingConstraintValidator extends ConstraintValidator { public function validate($value, Constraint $constraint) { - $this->context->addViolation($constraint->message, array()); + $this->context->addViolation($constraint->message, []); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FakeClassMetadata.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FakeClassMetadata.php index 8c76a215..39f54777 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FakeClassMetadata.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FakeClassMetadata.php @@ -18,7 +18,7 @@ class FakeClassMetadata extends ClassMetadata public function addCustomPropertyMetadata($propertyName, $metadata) { if (!isset($this->members[$propertyName])) { - $this->members[$propertyName] = array(); + $this->members[$propertyName] = []; } $this->members[$propertyName][] = $metadata; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FakeMetadataFactory.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FakeMetadataFactory.php index 1b5a704d..5e34929b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FakeMetadataFactory.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FakeMetadataFactory.php @@ -17,7 +17,7 @@ use Symfony\Component\Validator\MetadataInterface; class FakeMetadataFactory implements MetadataFactoryInterface { - protected $metadatas = array(); + protected $metadatas = []; public function getMetadataFor($class) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/GroupSequenceProviderEntity.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/GroupSequenceProviderEntity.php index 2b0beaf9..77b3bf2f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/GroupSequenceProviderEntity.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/GroupSequenceProviderEntity.php @@ -22,7 +22,7 @@ class GroupSequenceProviderEntity implements GroupSequenceProviderInterface public $firstName; public $lastName; - protected $sequence = array(); + protected $sequence = []; public function __construct($sequence) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Cache/AbstractCacheTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Cache/AbstractCacheTest.php index 6083f65e..4d0363fd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Cache/AbstractCacheTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Cache/AbstractCacheTest.php @@ -26,7 +26,7 @@ abstract class AbstractCacheTest extends TestCase { $meta = $this->getMockBuilder(ClassMetadata::class) ->disableOriginalConstructor() - ->setMethods(array('getClassName')) + ->setMethods(['getClassName']) ->getMock(); $meta->expects($this->once()) @@ -46,7 +46,7 @@ abstract class AbstractCacheTest extends TestCase { $meta = $this->getMockBuilder(ClassMetadata::class) ->disableOriginalConstructor() - ->setMethods(array('getClassName')) + ->setMethods(['getClassName']) ->getMock(); $meta->expects($this->once()) @@ -63,7 +63,7 @@ abstract class AbstractCacheTest extends TestCase { $meta = $this->getMockBuilder(ClassMetadata::class) ->disableOriginalConstructor() - ->setMethods(array('getClassName')) + ->setMethods(['getClassName']) ->getMock(); $meta->expects($this->once()) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php index a3f8a8c1..d33342c4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php @@ -57,17 +57,17 @@ class ClassMetadataTest extends TestCase $this->metadata->addPropertyConstraint('firstName', new ConstraintA()); $this->metadata->addPropertyConstraint('lastName', new ConstraintB()); - $this->assertEquals(array('firstName', 'lastName'), $this->metadata->getConstrainedProperties()); + $this->assertEquals(['firstName', 'lastName'], $this->metadata->getConstrainedProperties()); } public function testAddMultiplePropertyConstraints() { - $this->metadata->addPropertyConstraints('lastName', array(new ConstraintA(), new ConstraintB())); + $this->metadata->addPropertyConstraints('lastName', [new ConstraintA(), new ConstraintB()]); - $constraints = array( - new ConstraintA(array('groups' => array('Default', 'Entity'))), - new ConstraintB(array('groups' => array('Default', 'Entity'))), - ); + $constraints = [ + new ConstraintA(['groups' => ['Default', 'Entity']]), + new ConstraintB(['groups' => ['Default', 'Entity']]), + ]; $properties = $this->metadata->getPropertyMetadata('lastName'); @@ -81,10 +81,10 @@ class ClassMetadataTest extends TestCase $this->metadata->addGetterConstraint('lastName', new ConstraintA()); $this->metadata->addGetterConstraint('lastName', new ConstraintB()); - $constraints = array( - new ConstraintA(array('groups' => array('Default', 'Entity'))), - new ConstraintB(array('groups' => array('Default', 'Entity'))), - ); + $constraints = [ + new ConstraintA(['groups' => ['Default', 'Entity']]), + new ConstraintB(['groups' => ['Default', 'Entity']]), + ]; $properties = $this->metadata->getPropertyMetadata('lastName'); @@ -95,12 +95,12 @@ class ClassMetadataTest extends TestCase public function testAddMultipleGetterConstraints() { - $this->metadata->addGetterConstraints('lastName', array(new ConstraintA(), new ConstraintB())); + $this->metadata->addGetterConstraints('lastName', [new ConstraintA(), new ConstraintB()]); - $constraints = array( - new ConstraintA(array('groups' => array('Default', 'Entity'))), - new ConstraintB(array('groups' => array('Default', 'Entity'))), - ); + $constraints = [ + new ConstraintA(['groups' => ['Default', 'Entity']]), + new ConstraintB(['groups' => ['Default', 'Entity']]), + ]; $properties = $this->metadata->getPropertyMetadata('lastName'); @@ -117,17 +117,17 @@ class ClassMetadataTest extends TestCase $this->metadata->mergeConstraints($parent); $this->metadata->addConstraint(new ConstraintA()); - $constraints = array( - new ConstraintA(array('groups' => array( + $constraints = [ + new ConstraintA(['groups' => [ 'Default', 'EntityParent', 'Entity', - ))), - new ConstraintA(array('groups' => array( + ]]), + new ConstraintA(['groups' => [ 'Default', 'Entity', - ))), - ); + ]]), + ]; $this->assertEquals($constraints, $this->metadata->getConstraints()); } @@ -136,46 +136,46 @@ class ClassMetadataTest extends TestCase { $parent = new ClassMetadata(self::PARENTCLASS); $parent->addPropertyConstraint('firstName', new ConstraintA()); - $parent->addPropertyConstraint('firstName', new ConstraintB(array('groups' => 'foo'))); + $parent->addPropertyConstraint('firstName', new ConstraintB(['groups' => 'foo'])); $this->metadata->mergeConstraints($parent); $this->metadata->addPropertyConstraint('firstName', new ConstraintA()); - $constraintA1 = new ConstraintA(array('groups' => array( + $constraintA1 = new ConstraintA(['groups' => [ 'Default', 'EntityParent', 'Entity', - ))); - $constraintA2 = new ConstraintA(array('groups' => array( + ]]); + $constraintA2 = new ConstraintA(['groups' => [ 'Default', 'Entity', - ))); - $constraintB = new ConstraintB(array( - 'groups' => array('foo'), - )); + ]]); + $constraintB = new ConstraintB([ + 'groups' => ['foo'], + ]); - $constraints = array( + $constraints = [ $constraintA1, $constraintB, $constraintA2, - ); + ]; - $constraintsByGroup = array( - 'Default' => array( + $constraintsByGroup = [ + 'Default' => [ $constraintA1, $constraintA2, - ), - 'EntityParent' => array( + ], + 'EntityParent' => [ $constraintA1, - ), - 'Entity' => array( + ], + 'Entity' => [ $constraintA1, $constraintA2, - ), - 'foo' => array( + ], + 'foo' => [ $constraintB, - ), - ); + ], + ]; $members = $this->metadata->getPropertyMetadata('firstName'); @@ -201,19 +201,19 @@ class ClassMetadataTest extends TestCase $this->metadata->mergeConstraints($parent); $this->metadata->addPropertyConstraint('internal', new ConstraintA()); - $parentConstraints = array( - new ConstraintA(array('groups' => array( + $parentConstraints = [ + new ConstraintA(['groups' => [ 'Default', 'EntityParent', 'Entity', - ))), - ); - $constraints = array( - new ConstraintA(array('groups' => array( + ]]), + ]; + $constraints = [ + new ConstraintA(['groups' => [ 'Default', 'Entity', - ))), - ); + ]]), + ]; $members = $this->metadata->getPropertyMetadata('internal'); @@ -233,8 +233,8 @@ class ClassMetadataTest extends TestCase public function testSerialize() { - $this->metadata->addConstraint(new ConstraintA(array('property1' => 'A'))); - $this->metadata->addConstraint(new ConstraintB(array('groups' => 'TestGroup'))); + $this->metadata->addConstraint(new ConstraintA(['property1' => 'A'])); + $this->metadata->addConstraint(new ConstraintB(['groups' => 'TestGroup'])); $this->metadata->addPropertyConstraint('firstName', new ConstraintA()); $this->metadata->addGetterConstraint('lastName', new ConstraintB()); @@ -245,7 +245,7 @@ class ClassMetadataTest extends TestCase public function testGroupSequencesWorkIfContainingDefaultGroup() { - $this->metadata->setGroupSequence(array('Foo', $this->metadata->getDefaultGroup())); + $this->metadata->setGroupSequence(['Foo', $this->metadata->getDefaultGroup()]); $this->assertInstanceOf('Symfony\Component\Validator\Constraints\GroupSequence', $this->metadata->getGroupSequence()); } @@ -255,7 +255,7 @@ class ClassMetadataTest extends TestCase */ public function testGroupSequencesFailIfNotContainingDefaultGroup() { - $this->metadata->setGroupSequence(array('Foo', 'Bar')); + $this->metadata->setGroupSequence(['Foo', 'Bar']); } /** @@ -263,7 +263,7 @@ class ClassMetadataTest extends TestCase */ public function testGroupSequencesFailIfContainingDefault() { - $this->metadata->setGroupSequence(array('Foo', $this->metadata->getDefaultGroup(), Constraint::DEFAULT_GROUP)); + $this->metadata->setGroupSequence(['Foo', $this->metadata->getDefaultGroup(), Constraint::DEFAULT_GROUP]); } /** @@ -273,7 +273,7 @@ class ClassMetadataTest extends TestCase { $metadata = new ClassMetadata(self::PROVIDERCLASS); $metadata->setGroupSequenceProvider(true); - $metadata->setGroupSequence(array('GroupSequenceProviderEntity', 'Foo')); + $metadata->setGroupSequence(['GroupSequenceProviderEntity', 'Foo']); } /** @@ -282,7 +282,7 @@ class ClassMetadataTest extends TestCase public function testGroupSequenceProviderFailsIfGroupSequenceIsSet() { $metadata = new ClassMetadata(self::PROVIDERCLASS); - $metadata->setGroupSequence(array('GroupSequenceProviderEntity', 'Foo')); + $metadata->setGroupSequence(['GroupSequenceProviderEntity', 'Foo']); $metadata->setGroupSequenceProvider(true); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php index de685227..a7876d7f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php @@ -31,10 +31,10 @@ class LazyLoadingMetadataFactoryTest extends TestCase $factory = new LazyLoadingMetadataFactory(new TestLoader()); $metadata = $factory->getMetadataFor(self::PARENT_CLASS); - $constraints = array( - new ConstraintA(array('groups' => array('Default', 'EntityParent'))), - new ConstraintA(array('groups' => array('Default', 'EntityInterfaceA', 'EntityParent'))), - ); + $constraints = [ + new ConstraintA(['groups' => ['Default', 'EntityParent']]), + new ConstraintA(['groups' => ['Default', 'EntityInterfaceA', 'EntityParent']]), + ]; $this->assertEquals($constraints, $metadata->getConstraints()); } @@ -44,34 +44,34 @@ class LazyLoadingMetadataFactoryTest extends TestCase $factory = new LazyLoadingMetadataFactory(new TestLoader()); $metadata = $factory->getMetadataFor(self::CLASS_NAME); - $constraints = array( - new ConstraintA(array('groups' => array( + $constraints = [ + new ConstraintA(['groups' => [ 'Default', 'Entity', - ))), - new ConstraintA(array('groups' => array( + ]]), + new ConstraintA(['groups' => [ 'Default', 'EntityParent', 'Entity', - ))), - new ConstraintA(array('groups' => array( + ]]), + new ConstraintA(['groups' => [ 'Default', 'EntityInterfaceA', 'EntityParent', 'Entity', - ))), - new ConstraintA(array('groups' => array( + ]]), + new ConstraintA(['groups' => [ 'Default', 'EntityInterfaceB', 'Entity', - ))), - new ConstraintA(array('groups' => array( + ]]), + new ConstraintA(['groups' => [ 'Default', 'EntityParentInterface', 'EntityInterfaceB', 'Entity', - ))), - ); + ]]), + ]; $this->assertEquals($constraints, $metadata->getConstraints()); } @@ -81,21 +81,21 @@ class LazyLoadingMetadataFactoryTest extends TestCase $cache = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Cache\CacheInterface')->getMock(); $factory = new LazyLoadingMetadataFactory(new TestLoader(), $cache); - $parentClassConstraints = array( - new ConstraintA(array('groups' => array('Default', 'EntityParent'))), - new ConstraintA(array('groups' => array('Default', 'EntityInterfaceA', 'EntityParent'))), - ); - $interfaceAConstraints = array( - new ConstraintA(array('groups' => array('Default', 'EntityInterfaceA'))), - ); + $parentClassConstraints = [ + new ConstraintA(['groups' => ['Default', 'EntityParent']]), + new ConstraintA(['groups' => ['Default', 'EntityInterfaceA', 'EntityParent']]), + ]; + $interfaceAConstraints = [ + new ConstraintA(['groups' => ['Default', 'EntityInterfaceA']]), + ]; $cache->expects($this->never()) ->method('has'); $cache->expects($this->exactly(2)) ->method('read') ->withConsecutive( - array($this->equalTo(self::PARENT_CLASS)), - array($this->equalTo(self::INTERFACE_A_CLASS)) + [$this->equalTo(self::PARENT_CLASS)], + [$this->equalTo(self::INTERFACE_A_CLASS)] ) ->will($this->returnValue(false)); $cache->expects($this->exactly(2)) @@ -135,8 +135,8 @@ class LazyLoadingMetadataFactoryTest extends TestCase $cache->expects($this->exactly(2)) ->method('read') ->withConsecutive( - array(self::PARENT_CLASS), - array(self::INTERFACE_A_CLASS) + [self::PARENT_CLASS], + [self::INTERFACE_A_CLASS] ) ->willReturnCallback(function ($name) use ($metadata, $parentClass, $interfaceClass) { if ($parentClass == $name) { @@ -194,7 +194,7 @@ class LazyLoadingMetadataFactoryTest extends TestCase $reader = new \Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader(); $factory = new LazyLoadingMetadataFactory($reader); $metadata = $factory->getMetadataFor('Symfony\Component\Validator\Tests\Fixtures\EntityStaticCarTurbo'); - $groups = array(); + $groups = []; foreach ($metadata->getPropertyMetadata('wheels') as $propertyMetadata) { $constraints = $propertyMetadata->getConstraints(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderTest.php index 783e9b27..e5009624 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderTest.php @@ -52,23 +52,23 @@ class AnnotationLoaderTest extends TestCase $loader->loadClassMetadata($metadata); $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); - $expected->setGroupSequence(array('Foo', 'Entity')); + $expected->setGroupSequence(['Foo', 'Entity']); $expected->addConstraint(new ConstraintA()); - $expected->addConstraint(new Callback(array('Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'))); - $expected->addConstraint(new Callback(array('callback' => 'validateMe', 'payload' => 'foo'))); + $expected->addConstraint(new Callback(['Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'])); + $expected->addConstraint(new Callback(['callback' => 'validateMe', 'payload' => 'foo'])); $expected->addConstraint(new Callback('validateMeStatic')); $expected->addPropertyConstraint('firstName', new NotNull()); - $expected->addPropertyConstraint('firstName', new Range(array('min' => 3))); - $expected->addPropertyConstraint('firstName', new All(array(new NotNull(), new Range(array('min' => 3))))); - $expected->addPropertyConstraint('firstName', new All(array('constraints' => array(new NotNull(), new Range(array('min' => 3)))))); - $expected->addPropertyConstraint('firstName', new Collection(array('fields' => array( - 'foo' => array(new NotNull(), new Range(array('min' => 3))), - 'bar' => new Range(array('min' => 5)), - )))); - $expected->addPropertyConstraint('firstName', new Choice(array( + $expected->addPropertyConstraint('firstName', new Range(['min' => 3])); + $expected->addPropertyConstraint('firstName', new All([new NotNull(), new Range(['min' => 3])])); + $expected->addPropertyConstraint('firstName', new All(['constraints' => [new NotNull(), new Range(['min' => 3])]])); + $expected->addPropertyConstraint('firstName', new Collection(['fields' => [ + 'foo' => [new NotNull(), new Range(['min' => 3])], + 'bar' => new Range(['min' => 5]), + ]])); + $expected->addPropertyConstraint('firstName', new Choice([ 'message' => 'Must be one of %choices%', - 'choices' => array('A', 'B'), - ))); + 'choices' => ['A', 'B'], + ])); $expected->addPropertyConstraint('childA', new Valid()); $expected->addPropertyConstraint('childB', new Valid()); $expected->addGetterConstraint('lastName', new NotNull()); @@ -124,23 +124,23 @@ class AnnotationLoaderTest extends TestCase $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); $expected->mergeConstraints($expected_parent); - $expected->setGroupSequence(array('Foo', 'Entity')); + $expected->setGroupSequence(['Foo', 'Entity']); $expected->addConstraint(new ConstraintA()); - $expected->addConstraint(new Callback(array('Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'))); - $expected->addConstraint(new Callback(array('callback' => 'validateMe', 'payload' => 'foo'))); + $expected->addConstraint(new Callback(['Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'])); + $expected->addConstraint(new Callback(['callback' => 'validateMe', 'payload' => 'foo'])); $expected->addConstraint(new Callback('validateMeStatic')); $expected->addPropertyConstraint('firstName', new NotNull()); - $expected->addPropertyConstraint('firstName', new Range(array('min' => 3))); - $expected->addPropertyConstraint('firstName', new All(array(new NotNull(), new Range(array('min' => 3))))); - $expected->addPropertyConstraint('firstName', new All(array('constraints' => array(new NotNull(), new Range(array('min' => 3)))))); - $expected->addPropertyConstraint('firstName', new Collection(array('fields' => array( - 'foo' => array(new NotNull(), new Range(array('min' => 3))), - 'bar' => new Range(array('min' => 5)), - )))); - $expected->addPropertyConstraint('firstName', new Choice(array( + $expected->addPropertyConstraint('firstName', new Range(['min' => 3])); + $expected->addPropertyConstraint('firstName', new All([new NotNull(), new Range(['min' => 3])])); + $expected->addPropertyConstraint('firstName', new All(['constraints' => [new NotNull(), new Range(['min' => 3])]])); + $expected->addPropertyConstraint('firstName', new Collection(['fields' => [ + 'foo' => [new NotNull(), new Range(['min' => 3])], + 'bar' => new Range(['min' => 5]), + ]])); + $expected->addPropertyConstraint('firstName', new Choice([ 'message' => 'Must be one of %choices%', - 'choices' => array('A', 'B'), - ))); + 'choices' => ['A', 'B'], + ])); $expected->addPropertyConstraint('childA', new Valid()); $expected->addPropertyConstraint('childB', new Valid()); $expected->addGetterConstraint('lastName', new NotNull()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/FilesLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/FilesLoaderTest.php index 6fee7b6f..2cf009fc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/FilesLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/FilesLoaderTest.php @@ -34,12 +34,12 @@ class FilesLoaderTest extends TestCase public function getFilesLoader(LoaderInterface $loader) { - return $this->getMockForAbstractClass('Symfony\Component\Validator\Tests\Fixtures\FilesLoader', array(array( + return $this->getMockForAbstractClass('Symfony\Component\Validator\Tests\Fixtures\FilesLoader', [[ __DIR__.'/constraint-mapping.xml', __DIR__.'/constraint-mapping.yaml', __DIR__.'/constraint-mapping.test', __DIR__.'/constraint-mapping.txt', - ), $loader)); + ], $loader]); } public function getFileLoader() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/LoaderChainTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/LoaderChainTest.php index 0d28b0a3..f9905386 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/LoaderChainTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/LoaderChainTest.php @@ -31,10 +31,10 @@ class LoaderChainTest extends TestCase ->method('loadClassMetadata') ->with($this->equalTo($metadata)); - $chain = new LoaderChain(array( + $chain = new LoaderChain([ $loader1, $loader2, - )); + ]); $chain->loadClassMetadata($metadata); } @@ -53,10 +53,10 @@ class LoaderChainTest extends TestCase ->method('loadClassMetadata') ->will($this->returnValue(false)); - $chain = new LoaderChain(array( + $chain = new LoaderChain([ $loader1, $loader2, - )); + ]); $this->assertTrue($chain->loadClassMetadata($metadata)); } @@ -75,10 +75,10 @@ class LoaderChainTest extends TestCase ->method('loadClassMetadata') ->will($this->returnValue(false)); - $chain = new LoaderChain(array( + $chain = new LoaderChain([ $loader1, $loader2, - )); + ]); $this->assertFalse($chain->loadClassMetadata($metadata)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php index 100e4fa0..d6b20a0c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php @@ -53,26 +53,26 @@ class XmlFileLoaderTest extends TestCase $loader->loadClassMetadata($metadata); $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); - $expected->setGroupSequence(array('Foo', 'Entity')); + $expected->setGroupSequence(['Foo', 'Entity']); $expected->addConstraint(new ConstraintA()); $expected->addConstraint(new ConstraintB()); $expected->addConstraint(new Callback('validateMe')); $expected->addConstraint(new Callback('validateMeStatic')); - $expected->addConstraint(new Callback(array('Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'))); + $expected->addConstraint(new Callback(['Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'])); $expected->addConstraint(new Traverse(false)); $expected->addPropertyConstraint('firstName', new NotNull()); - $expected->addPropertyConstraint('firstName', new Range(array('min' => 3))); - $expected->addPropertyConstraint('firstName', new Choice(array('A', 'B'))); - $expected->addPropertyConstraint('firstName', new All(array(new NotNull(), new Range(array('min' => 3))))); - $expected->addPropertyConstraint('firstName', new All(array('constraints' => array(new NotNull(), new Range(array('min' => 3)))))); - $expected->addPropertyConstraint('firstName', new Collection(array('fields' => array( - 'foo' => array(new NotNull(), new Range(array('min' => 3))), - 'bar' => array(new Range(array('min' => 5))), - )))); - $expected->addPropertyConstraint('firstName', new Choice(array( + $expected->addPropertyConstraint('firstName', new Range(['min' => 3])); + $expected->addPropertyConstraint('firstName', new Choice(['A', 'B'])); + $expected->addPropertyConstraint('firstName', new All([new NotNull(), new Range(['min' => 3])])); + $expected->addPropertyConstraint('firstName', new All(['constraints' => [new NotNull(), new Range(['min' => 3])]])); + $expected->addPropertyConstraint('firstName', new Collection(['fields' => [ + 'foo' => [new NotNull(), new Range(['min' => 3])], + 'bar' => [new Range(['min' => 5])], + ]])); + $expected->addPropertyConstraint('firstName', new Choice([ 'message' => 'Must be one of %choices%', - 'choices' => array('A', 'B'), - ))); + 'choices' => ['A', 'B'], + ])); $expected->addGetterConstraint('lastName', new NotNull()); $expected->addGetterConstraint('valid', new IsTrue()); $expected->addGetterConstraint('permissions', new IsTrue()); @@ -88,7 +88,7 @@ class XmlFileLoaderTest extends TestCase $loader->loadClassMetadata($metadata); $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); - $expected->addPropertyConstraint('firstName', new Regex(array('pattern' => '/^1/', 'match' => false))); + $expected->addPropertyConstraint('firstName', new Regex(['pattern' => '/^1/', 'match' => false])); $properties = $metadata->getPropertyMetadata('firstName'); $constraints = $properties[0]->getConstraints(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php index 9920fb07..afa50cbe 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php @@ -35,7 +35,7 @@ class YamlFileLoaderTest extends TestCase $r = new \ReflectionProperty($loader, 'classes'); $r->setAccessible(true); - $this->assertSame(array(), $r->getValue($loader)); + $this->assertSame([], $r->getValue($loader)); } /** @@ -52,10 +52,10 @@ class YamlFileLoaderTest extends TestCase public function provideInvalidYamlFiles() { - return array( - array('nonvalid-mapping.yml'), - array('bad-format.yml'), - ); + return [ + ['nonvalid-mapping.yml'], + ['bad-format.yml'], + ]; } /** @@ -98,25 +98,25 @@ class YamlFileLoaderTest extends TestCase $loader->loadClassMetadata($metadata); $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); - $expected->setGroupSequence(array('Foo', 'Entity')); + $expected->setGroupSequence(['Foo', 'Entity']); $expected->addConstraint(new ConstraintA()); $expected->addConstraint(new ConstraintB()); $expected->addConstraint(new Callback('validateMe')); $expected->addConstraint(new Callback('validateMeStatic')); - $expected->addConstraint(new Callback(array('Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'))); + $expected->addConstraint(new Callback(['Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'])); $expected->addPropertyConstraint('firstName', new NotNull()); - $expected->addPropertyConstraint('firstName', new Range(array('min' => 3))); - $expected->addPropertyConstraint('firstName', new Choice(array('A', 'B'))); - $expected->addPropertyConstraint('firstName', new All(array(new NotNull(), new Range(array('min' => 3))))); - $expected->addPropertyConstraint('firstName', new All(array('constraints' => array(new NotNull(), new Range(array('min' => 3)))))); - $expected->addPropertyConstraint('firstName', new Collection(array('fields' => array( - 'foo' => array(new NotNull(), new Range(array('min' => 3))), - 'bar' => array(new Range(array('min' => 5))), - )))); - $expected->addPropertyConstraint('firstName', new Choice(array( + $expected->addPropertyConstraint('firstName', new Range(['min' => 3])); + $expected->addPropertyConstraint('firstName', new Choice(['A', 'B'])); + $expected->addPropertyConstraint('firstName', new All([new NotNull(), new Range(['min' => 3])])); + $expected->addPropertyConstraint('firstName', new All(['constraints' => [new NotNull(), new Range(['min' => 3])]])); + $expected->addPropertyConstraint('firstName', new Collection(['fields' => [ + 'foo' => [new NotNull(), new Range(['min' => 3])], + 'bar' => [new Range(['min' => 5])], + ]])); + $expected->addPropertyConstraint('firstName', new Choice([ 'message' => 'Must be one of %choices%', - 'choices' => array('A', 'B'), - ))); + 'choices' => ['A', 'B'], + ])); $expected->addGetterConstraint('lastName', new NotNull()); $expected->addGetterConstraint('valid', new IsTrue()); $expected->addGetterConstraint('permissions', new IsTrue()); @@ -132,7 +132,7 @@ class YamlFileLoaderTest extends TestCase $loader->loadClassMetadata($metadata); $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); - $expected->addPropertyConstraint('firstName', new Range(array('max' => PHP_INT_MAX))); + $expected->addPropertyConstraint('firstName', new Range(['max' => PHP_INT_MAX])); $this->assertEquals($expected, $metadata); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/MemberMetadataTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/MemberMetadataTest.php index 593f90fa..b6983f75 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/MemberMetadataTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/MemberMetadataTest.php @@ -45,8 +45,8 @@ class MemberMetadataTest extends TestCase public function testSerialize() { - $this->metadata->addConstraint(new ConstraintA(array('property1' => 'A'))); - $this->metadata->addConstraint(new ConstraintB(array('groups' => 'TestGroup'))); + $this->metadata->addConstraint(new ConstraintA(['property1' => 'A'])); + $this->metadata->addConstraint(new ConstraintB(['groups' => 'TestGroup'])); $metadata = unserialize(serialize($this->metadata)); @@ -55,7 +55,7 @@ class MemberMetadataTest extends TestCase public function testSerializeCollectionCascaded() { - $this->metadata->addConstraint(new Valid(array('traverse' => true))); + $this->metadata->addConstraint(new Valid(['traverse' => true])); $metadata = unserialize(serialize($this->metadata)); @@ -64,7 +64,7 @@ class MemberMetadataTest extends TestCase public function testSerializeCollectionNotCascaded() { - $this->metadata->addConstraint(new Valid(array('traverse' => false))); + $this->metadata->addConstraint(new Valid(['traverse' => false])); $metadata = unserialize(serialize($this->metadata)); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Util/PropertyPathTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Util/PropertyPathTest.php index 235e1780..f796463b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Util/PropertyPathTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Util/PropertyPathTest.php @@ -26,12 +26,12 @@ class PropertyPathTest extends TestCase public function provideAppendPaths() { - return array( - array('foo', '', 'foo', 'It returns the basePath if subPath is empty'), - array('', 'bar', 'bar', 'It returns the subPath if basePath is empty'), - array('foo', 'bar', 'foo.bar', 'It append the subPath to the basePath'), - array('foo', '[bar]', 'foo[bar]', 'It does not include the dot separator if subPath uses the array notation'), - array('0', 'bar', '0.bar', 'Leading zeros are kept.'), - ); + return [ + ['foo', '', 'foo', 'It returns the basePath if subPath is empty'], + ['', 'bar', 'bar', 'It returns the subPath if basePath is empty'], + ['foo', 'bar', 'foo.bar', 'It append the subPath to the basePath'], + ['foo', '[bar]', 'foo[bar]', 'It does not include the dot separator if subPath uses the array notation'], + ['0', 'bar', '0.bar', 'Leading zeros are kept.'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php index 6587dae1..1df64de4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php @@ -41,7 +41,7 @@ abstract class AbstractTest extends AbstractValidatorTest /** * @return ValidatorInterface */ - abstract protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()); + abstract protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = []); protected function setUp() { @@ -74,7 +74,7 @@ abstract class AbstractTest extends AbstractValidatorTest public function testValidateWithEmptyArrayAsConstraint() { - $violations = $this->validator->validate('value', array()); + $violations = $this->validator->validate('value', []); $this->assertCount(0, $violations); } @@ -89,20 +89,20 @@ abstract class AbstractTest extends AbstractValidatorTest $context->addViolation('Message 2'); }; - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => function () {}, 'groups' => 'Group 1', - ))); - $this->metadata->addConstraint(new Callback(array( + ])); + $this->metadata->addConstraint(new Callback([ 'callback' => $callback1, 'groups' => 'Group 2', - ))); - $this->metadata->addConstraint(new Callback(array( + ])); + $this->metadata->addConstraint(new Callback([ 'callback' => $callback2, 'groups' => 'Group 3', - ))); + ])); - $sequence = new GroupSequence(array('Group 1', 'Group 2', 'Group 3')); + $sequence = new GroupSequence(['Group 1', 'Group 2', 'Group 3']); $violations = $this->validator->validate($entity, new Valid(), $sequence); /* @var ConstraintViolationInterface[] $violations */ @@ -123,16 +123,16 @@ abstract class AbstractTest extends AbstractValidatorTest }; $this->metadata->addPropertyConstraint('reference', new Valid()); - $this->referenceMetadata->addConstraint(new Callback(array( + $this->referenceMetadata->addConstraint(new Callback([ 'callback' => $callback1, 'groups' => 'Group 1', - ))); - $this->referenceMetadata->addConstraint(new Callback(array( + ])); + $this->referenceMetadata->addConstraint(new Callback([ 'callback' => $callback2, 'groups' => 'Group 2', - ))); + ])); - $sequence = new GroupSequence(array('Group 1', 'Entity')); + $sequence = new GroupSequence(['Group 1', 'Entity']); $violations = $this->validator->validate($entity, new Valid(), $sequence); /* @var ConstraintViolationInterface[] $violations */ @@ -157,7 +157,7 @@ abstract class AbstractTest extends AbstractValidatorTest $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('', $violations[0]->getPropertyPath()); // The root is different as we're in a new context @@ -180,17 +180,17 @@ abstract class AbstractTest extends AbstractValidatorTest $this->assertSame($entity->reference, $context->getValue()); $this->assertSame($entity->reference, $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => $callback1, 'groups' => 'Group', - ))); - $this->referenceMetadata->addConstraint(new Callback(array( + ])); + $this->referenceMetadata->addConstraint(new Callback([ 'callback' => $callback2, 'groups' => 'Group', - ))); + ])); $violations = $this->validator->validate($entity, new Valid(), 'Group'); @@ -236,17 +236,17 @@ abstract class AbstractTest extends AbstractValidatorTest $this->assertSame($entity->reference, $context->getValue()); $this->assertSame($entity->reference, $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => $callback1, 'groups' => 'Group', - ))); - $this->referenceMetadata->addConstraint(new Callback(array( + ])); + $this->referenceMetadata->addConstraint(new Callback([ 'callback' => $callback2, 'groups' => 'Group', - ))); + ])); $violations = $this->validator->validate($entity, new Valid(), 'Group'); @@ -254,7 +254,7 @@ abstract class AbstractTest extends AbstractValidatorTest $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('subpath', $violations[0]->getPropertyPath()); $this->assertSame($entity, $violations[0]->getRoot()); $this->assertSame($entity->reference, $violations[0]->getInvalidValue()); @@ -278,7 +278,7 @@ abstract class AbstractTest extends AbstractValidatorTest ->getValidator() ->inContext($context) ->atPath('subpath') - ->validate(array('key' => $value->reference)) + ->validate(['key' => $value->reference]) ; // context changes shouldn't leak out of the validate() call @@ -299,17 +299,17 @@ abstract class AbstractTest extends AbstractValidatorTest $this->assertSame($entity->reference, $context->getValue()); $this->assertSame($entity->reference, $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => $callback1, 'groups' => 'Group', - ))); - $this->referenceMetadata->addConstraint(new Callback(array( + ])); + $this->referenceMetadata->addConstraint(new Callback([ 'callback' => $callback2, 'groups' => 'Group', - ))); + ])); $violations = $this->validator->validate($entity, new Valid(), 'Group'); @@ -317,7 +317,7 @@ abstract class AbstractTest extends AbstractValidatorTest $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('subpath[key]', $violations[0]->getPropertyPath()); $this->assertSame($entity, $violations[0]->getRoot()); $this->assertSame($entity->reference, $violations[0]->getInvalidValue()); @@ -328,7 +328,7 @@ abstract class AbstractTest extends AbstractValidatorTest public function testTraverseTraversableByDefault() { $entity = new Entity(); - $traversable = new \ArrayIterator(array('key' => $entity)); + $traversable = new \ArrayIterator(['key' => $entity]); $callback = function ($value, ExecutionContextInterface $context) use ($entity, $traversable) { $this->assertSame($this::ENTITY_CLASS, $context->getClassName()); @@ -340,14 +340,14 @@ abstract class AbstractTest extends AbstractValidatorTest $this->assertSame($entity, $context->getValue()); $this->assertSame($entity, $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; $this->metadataFactory->addMetadata(new ClassMetadata('ArrayIterator')); - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $violations = $this->validate($traversable, new Valid(), 'Group'); @@ -355,7 +355,7 @@ abstract class AbstractTest extends AbstractValidatorTest $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('[key]', $violations[0]->getPropertyPath()); $this->assertSame($traversable, $violations[0]->getRoot()); $this->assertSame($entity, $violations[0]->getInvalidValue()); @@ -366,7 +366,7 @@ abstract class AbstractTest extends AbstractValidatorTest public function testTraversalEnabledOnClass() { $entity = new Entity(); - $traversable = new \ArrayIterator(array('key' => $entity)); + $traversable = new \ArrayIterator(['key' => $entity]); $callback = function ($value, ExecutionContextInterface $context) { $context->addViolation('Message'); @@ -376,10 +376,10 @@ abstract class AbstractTest extends AbstractValidatorTest $traversableMetadata->addConstraint(new Traverse(true)); $this->metadataFactory->addMetadata($traversableMetadata); - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $violations = $this->validate($traversable, new Valid(), 'Group'); @@ -390,7 +390,7 @@ abstract class AbstractTest extends AbstractValidatorTest public function testTraversalDisabledOnClass() { $entity = new Entity(); - $traversable = new \ArrayIterator(array('key' => $entity)); + $traversable = new \ArrayIterator(['key' => $entity]); $callback = function ($value, ExecutionContextInterface $context) { $this->fail('Should not be called'); @@ -400,10 +400,10 @@ abstract class AbstractTest extends AbstractValidatorTest $traversableMetadata->addConstraint(new Traverse(false)); $this->metadataFactory->addMetadata($traversableMetadata); - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $violations = $this->validate($traversable, new Valid(), 'Group'); @@ -426,7 +426,7 @@ abstract class AbstractTest extends AbstractValidatorTest public function testReferenceTraversalDisabledOnClass() { $entity = new Entity(); - $entity->reference = new \ArrayIterator(array('key' => new Reference())); + $entity->reference = new \ArrayIterator(['key' => new Reference()]); $callback = function ($value, ExecutionContextInterface $context) { $this->fail('Should not be called'); @@ -436,10 +436,10 @@ abstract class AbstractTest extends AbstractValidatorTest $traversableMetadata->addConstraint(new Traverse(false)); $this->metadataFactory->addMetadata($traversableMetadata); - $this->referenceMetadata->addConstraint(new Callback(array( + $this->referenceMetadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $this->metadata->addPropertyConstraint('reference', new Valid()); $violations = $this->validate($entity, new Valid(), 'Group'); @@ -451,7 +451,7 @@ abstract class AbstractTest extends AbstractValidatorTest public function testReferenceTraversalEnabledOnReferenceDisabledOnClass() { $entity = new Entity(); - $entity->reference = new \ArrayIterator(array('key' => new Reference())); + $entity->reference = new \ArrayIterator(['key' => new Reference()]); $callback = function ($value, ExecutionContextInterface $context) { $this->fail('Should not be called'); @@ -461,13 +461,13 @@ abstract class AbstractTest extends AbstractValidatorTest $traversableMetadata->addConstraint(new Traverse(false)); $this->metadataFactory->addMetadata($traversableMetadata); - $this->referenceMetadata->addConstraint(new Callback(array( + $this->referenceMetadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); - $this->metadata->addPropertyConstraint('reference', new Valid(array( + ])); + $this->metadata->addPropertyConstraint('reference', new Valid([ 'traverse' => true, - ))); + ])); $violations = $this->validate($entity, new Valid(), 'Group'); @@ -478,7 +478,7 @@ abstract class AbstractTest extends AbstractValidatorTest public function testReferenceTraversalDisabledOnReferenceEnabledOnClass() { $entity = new Entity(); - $entity->reference = new \ArrayIterator(array('key' => new Reference())); + $entity->reference = new \ArrayIterator(['key' => new Reference()]); $callback = function ($value, ExecutionContextInterface $context) { $this->fail('Should not be called'); @@ -488,13 +488,13 @@ abstract class AbstractTest extends AbstractValidatorTest $traversableMetadata->addConstraint(new Traverse(true)); $this->metadataFactory->addMetadata($traversableMetadata); - $this->referenceMetadata->addConstraint(new Callback(array( + $this->referenceMetadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); - $this->metadata->addPropertyConstraint('reference', new Valid(array( + ])); + $this->metadata->addPropertyConstraint('reference', new Valid([ 'traverse' => false, - ))); + ])); $violations = $this->validate($entity, new Valid(), 'Group'); @@ -523,7 +523,7 @@ abstract class AbstractTest extends AbstractValidatorTest $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('', $violations[0]->getPropertyPath()); $this->assertSame($entity, $violations[0]->getRoot()); $this->assertSame('Invalid value', $violations[0]->getInvalidValue()); @@ -539,12 +539,12 @@ abstract class AbstractTest extends AbstractValidatorTest $context->addViolation('Message'); }; - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => $callback, - 'groups' => array('Group 1', 'Group 2'), - ))); + 'groups' => ['Group 1', 'Group 2'], + ])); - $violations = $this->validator->validate($entity, new Valid(), array('Group 1', 'Group 2')); + $violations = $this->validator->validate($entity, new Valid(), ['Group 1', 'Group 2']); /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); @@ -558,12 +558,12 @@ abstract class AbstractTest extends AbstractValidatorTest $context->addViolation('Message'); }; - $this->metadata->addPropertyConstraint('firstName', new Callback(array( + $this->metadata->addPropertyConstraint('firstName', new Callback([ 'callback' => $callback, - 'groups' => array('Group 1', 'Group 2'), - ))); + 'groups' => ['Group 1', 'Group 2'], + ])); - $violations = $this->validator->validate($entity, new Valid(), array('Group 1', 'Group 2')); + $violations = $this->validator->validate($entity, new Valid(), ['Group 1', 'Group 2']); /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); @@ -582,7 +582,7 @@ abstract class AbstractTest extends AbstractValidatorTest $called = false; $entity = new Entity(); $entity->firstName = 'Bernhard'; - $entity->data = array('firstName' => 'Bernhard'); + $entity->data = ['firstName' => 'Bernhard']; $callback = function ($value, ExecutionContextInterface $context) use ($entity, &$called) { $called = true; @@ -591,7 +591,7 @@ abstract class AbstractTest extends AbstractValidatorTest $this->metadata->addConstraint(new Callback($callback)); $this->metadata->addPropertyConstraint('firstName', new Callback($callback)); - $this->metadata->addPropertyConstraint('data', new Collection(array('firstName' => new Expression('value == this.firstName')))); + $this->metadata->addPropertyConstraint('data', new Collection(['firstName' => new Expression('value == this.firstName')])); $this->validator->validate($entity); @@ -618,10 +618,10 @@ abstract class AbstractTest extends AbstractValidatorTest ->method('initialize') ->with($entity); - $this->validator = $this->createValidator($this->metadataFactory, array( + $this->validator = $this->createValidator($this->metadataFactory, [ $initializer1, $initializer2, - )); + ]); // prepare constraint which // * checks that "initialized" is set to true @@ -656,15 +656,15 @@ abstract class AbstractTest extends AbstractValidatorTest public function testCollectionConstraitViolationHasCorrectContext() { - $data = array( + $data = [ 'foo' => 'fooValue', - ); + ]; // Missing field must not be the first in the collection validation - $constraint = new Collection(array( + $constraint = new Collection([ 'foo' => new NotNull(), 'bar' => new NotNull(), - )); + ]); $violations = $this->validate($data, $constraint); @@ -680,11 +680,11 @@ abstract class AbstractTest extends AbstractValidatorTest $reference->value = ''; $entity->childA = $reference; - $this->metadata->addPropertyConstraint('firstName', new NotBlank(array('groups' => 'group1'))); - $this->metadata->addPropertyConstraint('childA', new Valid(array('groups' => 'group1'))); + $this->metadata->addPropertyConstraint('firstName', new NotBlank(['groups' => 'group1'])); + $this->metadata->addPropertyConstraint('childA', new Valid(['groups' => 'group1'])); $this->referenceMetadata->addPropertyConstraint('value', new NotBlank()); - $violations = $this->validator->validate($entity, null, array()); + $violations = $this->validator->validate($entity, null, []); $this->assertCount(0, $violations); } @@ -697,11 +697,11 @@ abstract class AbstractTest extends AbstractValidatorTest $reference->value = ''; $entity->childA = $reference; - $this->metadata->addPropertyConstraint('firstName', new NotBlank(array('groups' => 'group1'))); - $this->metadata->addPropertyConstraint('childA', new Valid(array('groups' => 'group1'))); - $this->referenceMetadata->addPropertyConstraint('value', new NotBlank(array('groups' => 'group1'))); + $this->metadata->addPropertyConstraint('firstName', new NotBlank(['groups' => 'group1'])); + $this->metadata->addPropertyConstraint('childA', new Valid(['groups' => 'group1'])); + $this->referenceMetadata->addPropertyConstraint('value', new NotBlank(['groups' => 'group1'])); - $violations = $this->validator->validate($entity, null, array('Default', 'group1')); + $violations = $this->validator->validate($entity, null, ['Default', 'group1']); $this->assertCount(2, $violations); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php index 7d303ce8..ecfc10fe 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php @@ -80,13 +80,13 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame('Bernhard', $context->getValue()); $this->assertSame('Bernhard', $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; - $constraint = new Callback(array( + $constraint = new Callback([ 'callback' => $callback, 'groups' => 'Group', - )); + ]); $violations = $this->validate('Bernhard', $constraint, 'Group'); @@ -94,7 +94,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('', $violations[0]->getPropertyPath()); $this->assertSame('Bernhard', $violations[0]->getRoot()); $this->assertSame('Bernhard', $violations[0]->getInvalidValue()); @@ -116,13 +116,13 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame($entity, $context->getValue()); $this->assertSame($entity, $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $violations = $this->validate($entity, null, 'Group'); @@ -130,7 +130,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('', $violations[0]->getPropertyPath()); $this->assertSame($entity, $violations[0]->getRoot()); $this->assertSame($entity, $violations[0]->getInvalidValue()); @@ -155,13 +155,13 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame('Bernhard', $context->getValue()); $this->assertSame('Bernhard', $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; - $this->metadata->addPropertyConstraint('firstName', new Callback(array( + $this->metadata->addPropertyConstraint('firstName', new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $violations = $this->validate($entity, null, 'Group'); @@ -169,7 +169,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('firstName', $violations[0]->getPropertyPath()); $this->assertSame($entity, $violations[0]->getRoot()); $this->assertSame('Bernhard', $violations[0]->getInvalidValue()); @@ -194,13 +194,13 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame('Schussek', $context->getValue()); $this->assertSame('Schussek', $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; - $this->metadata->addGetterConstraint('lastName', new Callback(array( + $this->metadata->addGetterConstraint('lastName', new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $violations = $this->validate($entity, null, 'Group'); @@ -208,7 +208,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('lastName', $violations[0]->getPropertyPath()); $this->assertSame($entity, $violations[0]->getRoot()); $this->assertSame('Schussek', $violations[0]->getInvalidValue()); @@ -219,7 +219,7 @@ abstract class AbstractValidatorTest extends TestCase public function testArray() { $entity = new Entity(); - $array = array('key' => $entity); + $array = ['key' => $entity]; $callback = function ($value, ExecutionContextInterface $context) use ($entity, $array) { $this->assertSame($this::ENTITY_CLASS, $context->getClassName()); @@ -231,13 +231,13 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame($entity, $context->getValue()); $this->assertSame($entity, $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $violations = $this->validate($array, null, 'Group'); @@ -245,7 +245,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('[key]', $violations[0]->getPropertyPath()); $this->assertSame($array, $violations[0]->getRoot()); $this->assertSame($entity, $violations[0]->getInvalidValue()); @@ -256,7 +256,7 @@ abstract class AbstractValidatorTest extends TestCase public function testRecursiveArray() { $entity = new Entity(); - $array = array(2 => array('key' => $entity)); + $array = [2 => ['key' => $entity]]; $callback = function ($value, ExecutionContextInterface $context) use ($entity, $array) { $this->assertSame($this::ENTITY_CLASS, $context->getClassName()); @@ -268,13 +268,13 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame($entity, $context->getValue()); $this->assertSame($entity, $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $violations = $this->validate($array, null, 'Group'); @@ -282,7 +282,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('[2][key]', $violations[0]->getPropertyPath()); $this->assertSame($array, $violations[0]->getRoot()); $this->assertSame($entity, $violations[0]->getInvalidValue()); @@ -293,7 +293,7 @@ abstract class AbstractValidatorTest extends TestCase public function testTraversable() { $entity = new Entity(); - $traversable = new \ArrayIterator(array('key' => $entity)); + $traversable = new \ArrayIterator(['key' => $entity]); $callback = function ($value, ExecutionContextInterface $context) use ($entity, $traversable) { $this->assertSame($this::ENTITY_CLASS, $context->getClassName()); @@ -305,13 +305,13 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame($entity, $context->getValue()); $this->assertSame($entity, $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $violations = $this->validate($traversable, null, 'Group'); @@ -319,7 +319,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('[key]', $violations[0]->getPropertyPath()); $this->assertSame($traversable, $violations[0]->getRoot()); $this->assertSame($entity, $violations[0]->getInvalidValue()); @@ -330,9 +330,9 @@ abstract class AbstractValidatorTest extends TestCase public function testRecursiveTraversable() { $entity = new Entity(); - $traversable = new \ArrayIterator(array( - 2 => new \ArrayIterator(array('key' => $entity)), - )); + $traversable = new \ArrayIterator([ + 2 => new \ArrayIterator(['key' => $entity]), + ]); $callback = function ($value, ExecutionContextInterface $context) use ($entity, $traversable) { $this->assertSame($this::ENTITY_CLASS, $context->getClassName()); @@ -344,13 +344,13 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame($entity, $context->getValue()); $this->assertSame($entity, $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $violations = $this->validate($traversable, null, 'Group'); @@ -358,7 +358,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('[2][key]', $violations[0]->getPropertyPath()); $this->assertSame($traversable, $violations[0]->getRoot()); $this->assertSame($entity, $violations[0]->getInvalidValue()); @@ -381,14 +381,14 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame($entity->reference, $context->getValue()); $this->assertSame($entity->reference, $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; $this->metadata->addPropertyConstraint('reference', new Valid()); - $this->referenceMetadata->addConstraint(new Callback(array( + $this->referenceMetadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $violations = $this->validate($entity, null, 'Group'); @@ -396,7 +396,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('reference', $violations[0]->getPropertyPath()); $this->assertSame($entity, $violations[0]->getRoot()); $this->assertSame($entity->reference, $violations[0]->getInvalidValue()); @@ -422,14 +422,14 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame('Foobar', $context->getValue()); $this->assertSame('Foobar', $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; $this->metadata->addPropertyConstraint('reference', new Valid()); - $this->referenceMetadata->addPropertyConstraint('value', new Callback(array( + $this->referenceMetadata->addPropertyConstraint('value', new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $violations = $this->validate($entity, null, 'Group'); @@ -437,7 +437,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('reference.value', $violations[0]->getPropertyPath()); $this->assertSame($entity, $violations[0]->getRoot()); $this->assertSame('Foobar', $violations[0]->getInvalidValue()); @@ -463,14 +463,14 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame('Bamboo', $context->getValue()); $this->assertSame('Bamboo', $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; $this->metadata->addPropertyConstraint('reference', new Valid()); - $this->referenceMetadata->addPropertyConstraint('privateValue', new Callback(array( + $this->referenceMetadata->addPropertyConstraint('privateValue', new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $violations = $this->validate($entity, null, 'Group'); @@ -478,7 +478,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('reference.privateValue', $violations[0]->getPropertyPath()); $this->assertSame($entity, $violations[0]->getRoot()); $this->assertSame('Bamboo', $violations[0]->getInvalidValue()); @@ -515,7 +515,7 @@ abstract class AbstractValidatorTest extends TestCase public function testArrayReference() { $entity = new Entity(); - $entity->reference = array('key' => new Reference()); + $entity->reference = ['key' => new Reference()]; $callback = function ($value, ExecutionContextInterface $context) use ($entity) { $this->assertSame($this::REFERENCE_CLASS, $context->getClassName()); @@ -527,14 +527,14 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame($entity->reference['key'], $context->getValue()); $this->assertSame($entity->reference['key'], $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; $this->metadata->addPropertyConstraint('reference', new Valid()); - $this->referenceMetadata->addConstraint(new Callback(array( + $this->referenceMetadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $violations = $this->validate($entity, null, 'Group'); @@ -542,7 +542,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('reference[key]', $violations[0]->getPropertyPath()); $this->assertSame($entity, $violations[0]->getRoot()); $this->assertSame($entity->reference['key'], $violations[0]->getInvalidValue()); @@ -554,7 +554,7 @@ abstract class AbstractValidatorTest extends TestCase public function testRecursiveArrayReference() { $entity = new Entity(); - $entity->reference = array(2 => array('key' => new Reference())); + $entity->reference = [2 => ['key' => new Reference()]]; $callback = function ($value, ExecutionContextInterface $context) use ($entity) { $this->assertSame($this::REFERENCE_CLASS, $context->getClassName()); @@ -566,14 +566,14 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame($entity->reference[2]['key'], $context->getValue()); $this->assertSame($entity->reference[2]['key'], $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; $this->metadata->addPropertyConstraint('reference', new Valid()); - $this->referenceMetadata->addConstraint(new Callback(array( + $this->referenceMetadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $violations = $this->validate($entity, null, 'Group'); @@ -581,7 +581,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('reference[2][key]', $violations[0]->getPropertyPath()); $this->assertSame($entity, $violations[0]->getRoot()); $this->assertSame($entity->reference[2]['key'], $violations[0]->getInvalidValue()); @@ -592,15 +592,15 @@ abstract class AbstractValidatorTest extends TestCase public function testArrayTraversalCannotBeDisabled() { $entity = new Entity(); - $entity->reference = array('key' => new Reference()); + $entity->reference = ['key' => new Reference()]; $callback = function ($value, ExecutionContextInterface $context) { - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; - $this->metadata->addPropertyConstraint('reference', new Valid(array( + $this->metadata->addPropertyConstraint('reference', new Valid([ 'traverse' => false, - ))); + ])); $this->referenceMetadata->addConstraint(new Callback($callback)); $violations = $this->validate($entity); @@ -612,15 +612,15 @@ abstract class AbstractValidatorTest extends TestCase public function testRecursiveArrayTraversalCannotBeDisabled() { $entity = new Entity(); - $entity->reference = array(2 => array('key' => new Reference())); + $entity->reference = [2 => ['key' => new Reference()]]; $callback = function ($value, ExecutionContextInterface $context) { - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; - $this->metadata->addPropertyConstraint('reference', new Valid(array( + $this->metadata->addPropertyConstraint('reference', new Valid([ 'traverse' => false, - ))); + ])); $this->referenceMetadata->addConstraint(new Callback($callback)); $violations = $this->validate($entity); @@ -632,7 +632,7 @@ abstract class AbstractValidatorTest extends TestCase public function testIgnoreScalarsDuringArrayTraversal() { $entity = new Entity(); - $entity->reference = array('string', 1234); + $entity->reference = ['string', 1234]; $this->metadata->addPropertyConstraint('reference', new Valid()); @@ -645,7 +645,7 @@ abstract class AbstractValidatorTest extends TestCase public function testIgnoreNullDuringArrayTraversal() { $entity = new Entity(); - $entity->reference = array(null); + $entity->reference = [null]; $this->metadata->addPropertyConstraint('reference', new Valid()); @@ -658,7 +658,7 @@ abstract class AbstractValidatorTest extends TestCase public function testTraversableReference() { $entity = new Entity(); - $entity->reference = new \ArrayIterator(array('key' => new Reference())); + $entity->reference = new \ArrayIterator(['key' => new Reference()]); $callback = function ($value, ExecutionContextInterface $context) use ($entity) { $this->assertSame($this::REFERENCE_CLASS, $context->getClassName()); @@ -670,14 +670,14 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame($entity->reference['key'], $context->getValue()); $this->assertSame($entity->reference['key'], $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; $this->metadata->addPropertyConstraint('reference', new Valid()); - $this->referenceMetadata->addConstraint(new Callback(array( + $this->referenceMetadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $violations = $this->validate($entity, null, 'Group'); @@ -685,7 +685,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('reference[key]', $violations[0]->getPropertyPath()); $this->assertSame($entity, $violations[0]->getRoot()); $this->assertSame($entity->reference['key'], $violations[0]->getInvalidValue()); @@ -696,16 +696,16 @@ abstract class AbstractValidatorTest extends TestCase public function testDisableTraversableTraversal() { $entity = new Entity(); - $entity->reference = new \ArrayIterator(array('key' => new Reference())); + $entity->reference = new \ArrayIterator(['key' => new Reference()]); $callback = function ($value, ExecutionContextInterface $context) { - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; $this->metadataFactory->addMetadata(new ClassMetadata('ArrayIterator')); - $this->metadata->addPropertyConstraint('reference', new Valid(array( + $this->metadata->addPropertyConstraint('reference', new Valid([ 'traverse' => false, - ))); + ])); $this->referenceMetadata->addConstraint(new Callback($callback)); $violations = $this->validate($entity); @@ -722,9 +722,9 @@ abstract class AbstractValidatorTest extends TestCase $entity = new Entity(); $entity->reference = new \ArrayIterator(); - $this->metadata->addPropertyConstraint('reference', new Valid(array( + $this->metadata->addPropertyConstraint('reference', new Valid([ 'traverse' => false, - ))); + ])); $this->validate($entity); } @@ -732,9 +732,9 @@ abstract class AbstractValidatorTest extends TestCase public function testEnableRecursiveTraversableTraversal() { $entity = new Entity(); - $entity->reference = new \ArrayIterator(array( - 2 => new \ArrayIterator(array('key' => new Reference())), - )); + $entity->reference = new \ArrayIterator([ + 2 => new \ArrayIterator(['key' => new Reference()]), + ]); $callback = function ($value, ExecutionContextInterface $context) use ($entity) { $this->assertSame($this::REFERENCE_CLASS, $context->getClassName()); @@ -746,16 +746,16 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame($entity->reference[2]['key'], $context->getValue()); $this->assertSame($entity->reference[2]['key'], $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; - $this->metadata->addPropertyConstraint('reference', new Valid(array( + $this->metadata->addPropertyConstraint('reference', new Valid([ 'traverse' => true, - ))); - $this->referenceMetadata->addConstraint(new Callback(array( + ])); + $this->referenceMetadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group', - ))); + ])); $violations = $this->validate($entity, null, 'Group'); @@ -763,7 +763,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('reference[2][key]', $violations[0]->getPropertyPath()); $this->assertSame($entity, $violations[0]->getRoot()); $this->assertSame($entity->reference[2]['key'], $violations[0]->getInvalidValue()); @@ -789,21 +789,21 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame('Bernhard', $context->getValue()); $this->assertSame('Bernhard', $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; $callback2 = function ($value, ExecutionContextInterface $context) { $context->addViolation('Other violation'); }; - $this->metadata->addPropertyConstraint('firstName', new Callback(array( + $this->metadata->addPropertyConstraint('firstName', new Callback([ 'callback' => $callback1, 'groups' => 'Group', - ))); - $this->metadata->addPropertyConstraint('lastName', new Callback(array( + ])); + $this->metadata->addPropertyConstraint('lastName', new Callback([ 'callback' => $callback2, 'groups' => 'Group', - ))); + ])); $violations = $this->validateProperty($entity, 'firstName', 'Group'); @@ -811,7 +811,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('firstName', $violations[0]->getPropertyPath()); $this->assertSame($entity, $violations[0]->getRoot()); $this->assertSame('Bernhard', $violations[0]->getInvalidValue()); @@ -847,21 +847,21 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame('Bernhard', $context->getValue()); $this->assertSame('Bernhard', $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; $callback2 = function ($value, ExecutionContextInterface $context) { $context->addViolation('Other violation'); }; - $this->metadata->addPropertyConstraint('firstName', new Callback(array( + $this->metadata->addPropertyConstraint('firstName', new Callback([ 'callback' => $callback1, 'groups' => 'Group', - ))); - $this->metadata->addPropertyConstraint('lastName', new Callback(array( + ])); + $this->metadata->addPropertyConstraint('lastName', new Callback([ 'callback' => $callback2, 'groups' => 'Group', - ))); + ])); $violations = $this->validatePropertyValue( $entity, @@ -874,7 +874,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('firstName', $violations[0]->getPropertyPath()); $this->assertSame($entity, $violations[0]->getRoot()); $this->assertSame('Bernhard', $violations[0]->getInvalidValue()); @@ -896,21 +896,21 @@ abstract class AbstractValidatorTest extends TestCase $this->assertSame('Bernhard', $context->getValue()); $this->assertSame('Bernhard', $value); - $context->addViolation('Message %param%', array('%param%' => 'value')); + $context->addViolation('Message %param%', ['%param%' => 'value']); }; $callback2 = function ($value, ExecutionContextInterface $context) { $context->addViolation('Other violation'); }; - $this->metadata->addPropertyConstraint('firstName', new Callback(array( + $this->metadata->addPropertyConstraint('firstName', new Callback([ 'callback' => $callback1, 'groups' => 'Group', - ))); - $this->metadata->addPropertyConstraint('lastName', new Callback(array( + ])); + $this->metadata->addPropertyConstraint('lastName', new Callback([ 'callback' => $callback2, 'groups' => 'Group', - ))); + ])); $violations = $this->validatePropertyValue( self::ENTITY_CLASS, @@ -923,7 +923,7 @@ abstract class AbstractValidatorTest extends TestCase $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); - $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame(['%param%' => 'value'], $violations[0]->getParameters()); $this->assertSame('', $violations[0]->getPropertyPath()); $this->assertSame('Bernhard', $violations[0]->getRoot()); $this->assertSame('Bernhard', $violations[0]->getInvalidValue()); @@ -990,14 +990,14 @@ abstract class AbstractValidatorTest extends TestCase $context->addViolation('Message'); }; - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group 1', - ))); - $this->metadata->addConstraint(new Callback(array( + ])); + $this->metadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group 2', - ))); + ])); $violations = $this->validate($entity, null, 'Group 2'); @@ -1013,16 +1013,16 @@ abstract class AbstractValidatorTest extends TestCase $context->addViolation('Message'); }; - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group 1', - ))); - $this->metadata->addConstraint(new Callback(array( + ])); + $this->metadata->addConstraint(new Callback([ 'callback' => $callback, 'groups' => 'Group 2', - ))); + ])); - $violations = $this->validate($entity, null, array('Group 1', 'Group 2')); + $violations = $this->validate($entity, null, ['Group 1', 'Group 2']); /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(2, $violations); @@ -1039,20 +1039,20 @@ abstract class AbstractValidatorTest extends TestCase $context->addViolation('Violation in Group 3'); }; - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => function () {}, 'groups' => 'Group 1', - ))); - $this->metadata->addConstraint(new Callback(array( + ])); + $this->metadata->addConstraint(new Callback([ 'callback' => $callback1, 'groups' => 'Group 2', - ))); - $this->metadata->addConstraint(new Callback(array( + ])); + $this->metadata->addConstraint(new Callback([ 'callback' => $callback2, 'groups' => 'Group 3', - ))); + ])); - $sequence = new GroupSequence(array('Group 1', 'Group 2', 'Group 3', 'Entity')); + $sequence = new GroupSequence(['Group 1', 'Group 2', 'Group 3', 'Entity']); $this->metadata->setGroupSequence($sequence); $violations = $this->validate($entity, null, 'Default'); @@ -1073,20 +1073,20 @@ abstract class AbstractValidatorTest extends TestCase $context->addViolation('Violation in Group 3'); }; - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => function () {}, 'groups' => 'Group 1', - ))); - $this->metadata->addConstraint(new Callback(array( + ])); + $this->metadata->addConstraint(new Callback([ 'callback' => $callback1, 'groups' => 'Group 2', - ))); - $this->metadata->addConstraint(new Callback(array( + ])); + $this->metadata->addConstraint(new Callback([ 'callback' => $callback2, 'groups' => 'Group 3', - ))); + ])); - $sequence = array('Group 1', 'Group 2', 'Group 3', 'Entity'); + $sequence = ['Group 1', 'Group 2', 'Group 3', 'Entity']; $this->metadata->setGroupSequence($sequence); $violations = $this->validate($entity, null, 'Default'); @@ -1109,16 +1109,16 @@ abstract class AbstractValidatorTest extends TestCase }; $this->metadata->addPropertyConstraint('reference', new Valid()); - $this->referenceMetadata->addConstraint(new Callback(array( + $this->referenceMetadata->addConstraint(new Callback([ 'callback' => $callback1, 'groups' => 'Default', - ))); - $this->referenceMetadata->addConstraint(new Callback(array( + ])); + $this->referenceMetadata->addConstraint(new Callback([ 'callback' => $callback2, 'groups' => 'Group 1', - ))); + ])); - $sequence = new GroupSequence(array('Group 1', 'Entity')); + $sequence = new GroupSequence(['Group 1', 'Entity']); $this->metadata->setGroupSequence($sequence); $violations = $this->validate($entity, null, 'Default'); @@ -1139,16 +1139,16 @@ abstract class AbstractValidatorTest extends TestCase $context->addViolation('Violation in group sequence'); }; - $this->metadata->addConstraint(new Callback(array( + $this->metadata->addConstraint(new Callback([ 'callback' => $callback1, 'groups' => 'Other Group', - ))); - $this->metadata->addConstraint(new Callback(array( + ])); + $this->metadata->addConstraint(new Callback([ 'callback' => $callback2, 'groups' => 'Group 1', - ))); + ])); - $sequence = new GroupSequence(array('Group 1', 'Entity')); + $sequence = new GroupSequence(['Group 1', 'Entity']); $this->metadata->setGroupSequence($sequence); $violations = $this->validate($entity, null, 'Other Group'); @@ -1173,18 +1173,18 @@ abstract class AbstractValidatorTest extends TestCase }; $metadata = new ClassMetadata(\get_class($entity)); - $metadata->addConstraint(new Callback(array( + $metadata->addConstraint(new Callback([ 'callback' => function () {}, 'groups' => 'Group 1', - ))); - $metadata->addConstraint(new Callback(array( + ])); + $metadata->addConstraint(new Callback([ 'callback' => $callback1, 'groups' => 'Group 2', - ))); - $metadata->addConstraint(new Callback(array( + ])); + $metadata->addConstraint(new Callback([ 'callback' => $callback2, 'groups' => 'Group 3', - ))); + ])); $metadata->setGroupSequenceProvider(true); $this->metadataFactory->addMetadata($metadata); @@ -1200,33 +1200,33 @@ abstract class AbstractValidatorTest extends TestCase public function getTestReplaceDefaultGroup() { - return array( - array( - 'sequence' => new GroupSequence(array('Group 1', 'Group 2', 'Group 3', 'Entity')), - 'assertViolations' => array( + return [ + [ + 'sequence' => new GroupSequence(['Group 1', 'Group 2', 'Group 3', 'Entity']), + 'assertViolations' => [ 'Violation in Group 2', - ), - ), - array( - 'sequence' => array('Group 1', 'Group 2', 'Group 3', 'Entity'), - 'assertViolations' => array( + ], + ], + [ + 'sequence' => ['Group 1', 'Group 2', 'Group 3', 'Entity'], + 'assertViolations' => [ 'Violation in Group 2', - ), - ), - array( - 'sequence' => new GroupSequence(array('Group 1', array('Group 2', 'Group 3'), 'Entity')), - 'assertViolations' => array( + ], + ], + [ + 'sequence' => new GroupSequence(['Group 1', ['Group 2', 'Group 3'], 'Entity']), + 'assertViolations' => [ 'Violation in Group 2', 'Violation in Group 3', - ), - ), - array( - 'sequence' => array('Group 1', array('Group 2', 'Group 3'), 'Entity'), - 'assertViolations' => array( + ], + ], + [ + 'sequence' => ['Group 1', ['Group 2', 'Group 3'], 'Entity'], + 'assertViolations' => [ 'Violation in Group 2', 'Violation in Group 3', - ), - ), - ); + ], + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php index 9e0afe06..8109b6b9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php @@ -12,6 +12,10 @@ namespace Symfony\Component\Validator\Tests\Validator; use Symfony\Component\Translation\IdentityTranslator; +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\Length; +use Symfony\Component\Validator\Constraints\NotBlank; use Symfony\Component\Validator\ConstraintValidatorFactory; use Symfony\Component\Validator\Context\ExecutionContextFactory; use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; @@ -22,7 +26,7 @@ use Symfony\Component\Validator\Validator\RecursiveValidator; class RecursiveValidatorTest extends AbstractTest { - protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()) + protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = []) { $translator = new IdentityTranslator(); $translator->setLocale('en'); @@ -40,26 +44,26 @@ class RecursiveValidatorTest extends AbstractTest $childB = new ChildB(); $childA->name = false; $childB->name = 'fake'; - $entity->childA = array($childA); - $entity->childB = array($childB); + $entity->childA = [$childA]; + $entity->childB = [$childB]; $validatorContext = $this->getMockBuilder('Symfony\Component\Validator\Validator\ContextualValidatorInterface')->getMock(); $validatorContext ->expects($this->once()) ->method('validate') - ->with($entity, null, array()) + ->with($entity, null, []) ->willReturnSelf(); $validator = $this ->getMockBuilder('Symfony\Component\Validator\Validator\RecursiveValidator') ->disableOriginalConstructor() - ->setMethods(array('startContext')) + ->setMethods(['startContext']) ->getMock(); $validator ->expects($this->once()) ->method('startContext') ->willReturn($validatorContext); - $validator->validate($entity, null, array()); + $validator->validate($entity, null, []); } public function testRelationBetweenChildAAndChildB() @@ -73,26 +77,60 @@ class RecursiveValidatorTest extends AbstractTest $childA->name = false; $childB->name = 'fake'; - $entity->childA = array($childA); - $entity->childB = array($childB); + $entity->childA = [$childA]; + $entity->childB = [$childB]; $validatorContext = $this->getMockBuilder('Symfony\Component\Validator\Validator\ContextualValidatorInterface')->getMock(); $validatorContext ->expects($this->once()) ->method('validate') - ->with($entity, null, array()) + ->with($entity, null, []) ->willReturnSelf(); $validator = $this ->getMockBuilder('Symfony\Component\Validator\Validator\RecursiveValidator') ->disableOriginalConstructor() - ->setMethods(array('startContext')) + ->setMethods(['startContext']) ->getMock(); $validator ->expects($this->once()) ->method('startContext') ->willReturn($validatorContext); - $validator->validate($entity, null, array()); + $validator->validate($entity, null, []); + } + + public function testCollectionConstraintValidateAllGroupsForNestedConstraints() + { + $this->metadata->addPropertyConstraint('data', new Collection(['fields' => [ + 'one' => [new NotBlank(['groups' => 'one']), new Length(['min' => 2, 'groups' => 'two'])], + 'two' => [new NotBlank(['groups' => 'two'])], + ]])); + + $entity = new Entity(); + $entity->data = ['one' => 't', 'two' => '']; + + $violations = $this->validator->validate($entity, null, ['one', 'two']); + + $this->assertCount(2, $violations); + $this->assertInstanceOf(Length::class, $violations->get(0)->getConstraint()); + $this->assertInstanceOf(NotBlank::class, $violations->get(1)->getConstraint()); + } + + public function testAllConstraintValidateAllGroupsForNestedConstraints() + { + $this->metadata->addPropertyConstraint('data', new All(['constraints' => [ + new NotBlank(['groups' => 'one']), + new Length(['min' => 2, 'groups' => 'two']), + ]])); + + $entity = new Entity(); + $entity->data = ['one' => 't', 'two' => '']; + + $violations = $this->validator->validate($entity, null, ['one', 'two']); + + $this->assertCount(2, $violations); + $this->assertInstanceOf(NotBlank::class, $violations->get(0)->getConstraint()); + $this->assertInstanceOf(Length::class, $violations->get(1)->getConstraint()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/TraceableValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/TraceableValidatorTest.php index b2eef769..b80efed2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/TraceableValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/TraceableValidatorTest.php @@ -15,7 +15,6 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintViolation; use Symfony\Component\Validator\ConstraintViolationList; -use Symfony\Component\Validator\ConstraintViolationListInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Mapping\MetadataInterface; use Symfony\Component\Validator\Validator\ContextualValidatorInterface; @@ -27,17 +26,17 @@ class TraceableValidatorTest extends TestCase public function testValidate() { $originalValidator = $this->createMock(ValidatorInterface::class); - $violations = new ConstraintViolationList(array( + $violations = new ConstraintViolationList([ $this->createMock(ConstraintViolation::class), $this->createMock(ConstraintViolation::class), - )); + ]); $originalValidator->expects($this->exactly(2))->method('validate')->willReturn($violations); $validator = new TraceableValidator($originalValidator); $object = new \stdClass(); - $constraints = array($this->createMock(Constraint::class)); - $groups = array('Default', 'Create'); + $constraints = [$this->createMock(Constraint::class)]; + $groups = ['Default', 'Create']; $validator->validate($object, $constraints, $groups); $line = __LINE__ - 1; @@ -50,17 +49,17 @@ class TraceableValidatorTest extends TestCase $this->assertSame(iterator_to_array($violations), $callData['violations']); - $this->assertSame(array( + $this->assertSame([ 'value' => $object, 'constraints' => $constraints, 'groups' => $groups, - ), $callData['context']); + ], $callData['context']); - $this->assertEquals(array( + $this->assertEquals([ 'name' => 'TraceableValidatorTest.php', 'file' => __FILE__, 'line' => $line, - ), $callData['caller']); + ], $callData['caller']); $validator->validate($object, $constraints, $groups); $collectedData = $validator->getCollectedData(); @@ -87,13 +86,13 @@ class TraceableValidatorTest extends TestCase $expects('startContext')->willReturn($expected = $this->createMock(ContextualValidatorInterface::class)); $this->assertSame($expected, $validator->startContext(), 'returns original validator startContext() result'); - $expects('validate')->willReturn($expected = $this->createMock(ConstraintViolationListInterface::class)); + $expects('validate')->willReturn($expected = new ConstraintViolationList()); $this->assertSame($expected, $validator->validate('value'), 'returns original validator validate() result'); - $expects('validateProperty')->willReturn($expected = $this->createMock(ConstraintViolationListInterface::class)); + $expects('validateProperty')->willReturn($expected = new ConstraintViolationList()); $this->assertSame($expected, $validator->validateProperty(new \stdClass(), 'property'), 'returns original validator validateProperty() result'); - $expects('validatePropertyValue')->willReturn($expected = $this->createMock(ConstraintViolationListInterface::class)); + $expects('validatePropertyValue')->willReturn($expected = new ConstraintViolationList()); $this->assertSame($expected, $validator->validatePropertyValue(new \stdClass(), 'property', 'value'), 'returns original validator validatePropertyValue() result'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php index 77d58641..16d81697 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php @@ -41,7 +41,7 @@ class ValidatorBuilderTest extends TestCase public function testAddObjectInitializers() { - $this->assertSame($this->builder, $this->builder->addObjectInitializers(array())); + $this->assertSame($this->builder, $this->builder->addObjectInitializers([])); } public function testAddXmlMapping() @@ -51,7 +51,7 @@ class ValidatorBuilderTest extends TestCase public function testAddXmlMappings() { - $this->assertSame($this->builder, $this->builder->addXmlMappings(array())); + $this->assertSame($this->builder, $this->builder->addXmlMappings([])); } public function testAddYamlMapping() @@ -61,7 +61,7 @@ class ValidatorBuilderTest extends TestCase public function testAddYamlMappings() { - $this->assertSame($this->builder, $this->builder->addYamlMappings(array())); + $this->assertSame($this->builder, $this->builder->addYamlMappings([])); } public function testAddMethodMapping() @@ -71,7 +71,7 @@ class ValidatorBuilderTest extends TestCase public function testAddMethodMappings() { - $this->assertSame($this->builder, $this->builder->addMethodMappings(array())); + $this->assertSame($this->builder, $this->builder->addMethodMappings([])); } public function testEnableAnnotationMapping() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php index f50f767b..50253c50 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Validator\Validator; use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\Composite; use Symfony\Component\Validator\Constraints\GroupSequence; use Symfony\Component\Validator\ConstraintValidatorFactoryInterface; use Symfony\Component\Validator\Context\ExecutionContext; @@ -56,11 +57,11 @@ class RecursiveContextualValidator implements ContextualValidatorInterface * constraint validators * @param ObjectInitializerInterface[] $objectInitializers The object initializers */ - public function __construct(ExecutionContextInterface $context, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = array()) + public function __construct(ExecutionContextInterface $context, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = []) { $this->context = $context; $this->defaultPropertyPath = $context->getPropertyPath(); - $this->defaultGroups = array($context->getGroup() ?: Constraint::DEFAULT_GROUP); + $this->defaultGroups = [$context->getGroup() ?: Constraint::DEFAULT_GROUP]; $this->metadataFactory = $metadataFactory; $this->validatorFactory = $validatorFactory; $this->objectInitializers = $objectInitializers; @@ -100,7 +101,7 @@ class RecursiveContextualValidator implements ContextualValidatorInterface // You can pass a single constraint or an array of constraints // Make sure to deal with an array in the rest of the code if (!\is_array($constraints)) { - $constraints = array($constraints); + $constraints = [$constraints]; } $metadata = new GenericMetadata(); @@ -282,7 +283,7 @@ class RecursiveContextualValidator implements ContextualValidatorInterface return $groups; } - return array($groups); + return [$groups]; } /** @@ -730,7 +731,7 @@ class RecursiveContextualValidator implements ContextualValidatorInterface private function stepThroughGroupSequence($value, $object, $cacheKey, MetadataInterface $metadata = null, $propertyPath, $traversalStrategy, GroupSequence $groupSequence, $cascadedGroup, ExecutionContextInterface $context) { $violationCount = \count($context->getViolations()); - $cascadedGroups = $cascadedGroup ? array($cascadedGroup) : null; + $cascadedGroups = $cascadedGroup ? [$cascadedGroup] : null; foreach ($groupSequence->groups as $groupInSequence) { $groups = (array) $groupInSequence; @@ -787,6 +788,10 @@ class RecursiveContextualValidator implements ContextualValidatorInterface if (null !== $cacheKey) { $constraintHash = spl_object_hash($constraint); + if ($constraint instanceof Composite) { + $constraintHash .= $group; + } + if ($context->isConstraintValidated($cacheKey, $constraintHash)) { continue; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveValidator.php index 33c2ec9e..a258fd4a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveValidator.php @@ -41,7 +41,7 @@ class RecursiveValidator implements ValidatorInterface * constraint validators * @param ObjectInitializerInterface[] $objectInitializers The object initializers */ - public function __construct(ExecutionContextFactoryInterface $contextFactory, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = array()) + public function __construct(ExecutionContextFactoryInterface $contextFactory, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = []) { $this->contextFactory = $contextFactory; $this->metadataFactory = $metadataFactory; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/TraceableValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/TraceableValidator.php index 96134e27..f1b514d6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/TraceableValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/TraceableValidator.php @@ -21,7 +21,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; class TraceableValidator implements ValidatorInterface { private $validator; - private $collectedData = array(); + private $collectedData = []; public function __construct(ValidatorInterface $validator) { @@ -38,7 +38,7 @@ class TraceableValidator implements ValidatorInterface public function reset() { - $this->collectedData = array(); + $this->collectedData = []; } /** @@ -92,11 +92,11 @@ class TraceableValidator implements ValidatorInterface $name = str_replace('\\', '/', $file); $name = substr($name, strrpos($name, '/') + 1); - $this->collectedData[] = array( + $this->collectedData[] = [ 'caller' => compact('name', 'file', 'line'), 'context' => compact('value', 'constraints', 'groups'), 'violations' => iterator_to_array($violations), - ); + ]; return $violations; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ValidatorBuilder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ValidatorBuilder.php index 3562b945..d9cb6b8b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ValidatorBuilder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Validator/ValidatorBuilder.php @@ -37,10 +37,10 @@ use Symfony\Component\Validator\Validator\RecursiveValidator; */ class ValidatorBuilder implements ValidatorBuilderInterface { - private $initializers = array(); - private $xmlMappings = array(); - private $yamlMappings = array(); - private $methodMappings = array(); + private $initializers = []; + private $xmlMappings = []; + private $yamlMappings = []; + private $methodMappings = []; /** * @var Reader|null @@ -271,7 +271,7 @@ class ValidatorBuilder implements ValidatorBuilderInterface */ public function getLoaders() { - $loaders = array(); + $loaders = []; foreach ($this->xmlMappings as $xmlMapping) { $loaders[] = new XmlFileLoader($xmlMapping); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/AmqpCaster.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/AmqpCaster.php index 655262f4..19bdc295 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/AmqpCaster.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/AmqpCaster.php @@ -20,7 +20,7 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class AmqpCaster { - private static $flags = array( + private static $flags = [ AMQP_DURABLE => 'AMQP_DURABLE', AMQP_PASSIVE => 'AMQP_PASSIVE', AMQP_EXCLUSIVE => 'AMQP_EXCLUSIVE', @@ -35,22 +35,22 @@ class AmqpCaster AMQP_MULTIPLE => 'AMQP_MULTIPLE', AMQP_NOWAIT => 'AMQP_NOWAIT', AMQP_REQUEUE => 'AMQP_REQUEUE', - ); + ]; - private static $exchangeTypes = array( + private static $exchangeTypes = [ AMQP_EX_TYPE_DIRECT => 'AMQP_EX_TYPE_DIRECT', AMQP_EX_TYPE_FANOUT => 'AMQP_EX_TYPE_FANOUT', AMQP_EX_TYPE_TOPIC => 'AMQP_EX_TYPE_TOPIC', AMQP_EX_TYPE_HEADERS => 'AMQP_EX_TYPE_HEADERS', - ); + ]; public static function castConnection(\AMQPConnection $c, array $a, Stub $stub, $isNested) { $prefix = Caster::PREFIX_VIRTUAL; - $a += array( + $a += [ $prefix.'is_connected' => $c->isConnected(), - ); + ]; // Recent version of the extension already expose private properties if (isset($a["\x00AMQPConnection\x00login"])) { @@ -64,7 +64,7 @@ class AmqpCaster $timeout = $c->getTimeout(); } - $a += array( + $a += [ $prefix.'is_connected' => $c->isConnected(), $prefix.'login' => $c->getLogin(), $prefix.'password' => $c->getPassword(), @@ -72,7 +72,7 @@ class AmqpCaster $prefix.'vhost' => $c->getVhost(), $prefix.'port' => $c->getPort(), $prefix.'read_timeout' => $timeout, - ); + ]; return $a; } @@ -81,21 +81,21 @@ class AmqpCaster { $prefix = Caster::PREFIX_VIRTUAL; - $a += array( + $a += [ $prefix.'is_connected' => $c->isConnected(), $prefix.'channel_id' => $c->getChannelId(), - ); + ]; // Recent version of the extension already expose private properties if (isset($a["\x00AMQPChannel\x00connection"])) { return $a; } - $a += array( + $a += [ $prefix.'connection' => $c->getConnection(), $prefix.'prefetch_size' => $c->getPrefetchSize(), $prefix.'prefetch_count' => $c->getPrefetchCount(), - ); + ]; return $a; } @@ -104,21 +104,21 @@ class AmqpCaster { $prefix = Caster::PREFIX_VIRTUAL; - $a += array( + $a += [ $prefix.'flags' => self::extractFlags($c->getFlags()), - ); + ]; // Recent version of the extension already expose private properties if (isset($a["\x00AMQPQueue\x00name"])) { return $a; } - $a += array( + $a += [ $prefix.'connection' => $c->getConnection(), $prefix.'channel' => $c->getChannel(), $prefix.'name' => $c->getName(), $prefix.'arguments' => $c->getArguments(), - ); + ]; return $a; } @@ -127,9 +127,9 @@ class AmqpCaster { $prefix = Caster::PREFIX_VIRTUAL; - $a += array( + $a += [ $prefix.'flags' => self::extractFlags($c->getFlags()), - ); + ]; $type = isset(self::$exchangeTypes[$c->getType()]) ? new ConstStub(self::$exchangeTypes[$c->getType()], $c->getType()) : $c->getType(); @@ -140,13 +140,13 @@ class AmqpCaster return $a; } - $a += array( + $a += [ $prefix.'connection' => $c->getConnection(), $prefix.'channel' => $c->getChannel(), $prefix.'name' => $c->getName(), $prefix.'type' => $type, $prefix.'arguments' => $c->getArguments(), - ); + ]; return $a; } @@ -165,10 +165,10 @@ class AmqpCaster } if (!($filter & Caster::EXCLUDE_VERBOSE)) { - $a += array($prefix.'body' => $c->getBody()); + $a += [$prefix.'body' => $c->getBody()]; } - $a += array( + $a += [ $prefix.'delivery_tag' => $c->getDeliveryTag(), $prefix.'is_redelivery' => $c->isRedelivery(), $prefix.'exchange_name' => $c->getExchangeName(), @@ -186,14 +186,14 @@ class AmqpCaster $prefix.'type' => $c->getType(), $prefix.'user_id' => $c->getUserId(), $prefix.'app_id' => $c->getAppId(), - ); + ]; return $a; } private static function extractFlags($flags) { - $flagsArray = array(); + $flagsArray = []; foreach (self::$flags as $value => $name) { if ($flags & $value) { @@ -202,7 +202,7 @@ class AmqpCaster } if (!$flagsArray) { - $flagsArray = array('AMQP_NOPARAM'); + $flagsArray = ['AMQP_NOPARAM']; } return new ConstStub(implode('|', $flagsArray), $flags); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ArgsStub.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ArgsStub.php index 7cd759a5..081fb47e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ArgsStub.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ArgsStub.php @@ -20,13 +20,13 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class ArgsStub extends EnumStub { - private static $parameters = array(); + private static $parameters = []; public function __construct(array $args, $function, $class) { list($variadic, $params) = self::getParameters($function, $class); - $values = array(); + $values = []; foreach ($args as $k => $v) { $values[$k] = !is_scalar($v) && !$v instanceof Stub ? new CutStub($v) : $v; } @@ -41,7 +41,7 @@ class ArgsStub extends EnumStub $values[] = new EnumStub(array_splice($values, \count($params)), false); $params[] = $variadic; } - if (array('...') === $params) { + if (['...'] === $params) { $this->dumpKeys = false; $this->value = $values[0]->value; } else { @@ -58,11 +58,11 @@ class ArgsStub extends EnumStub try { $r = null !== $class ? new \ReflectionMethod($class, $function) : new \ReflectionFunction($function); } catch (\ReflectionException $e) { - return array(null, null); + return [null, null]; } $variadic = '...'; - $params = array(); + $params = []; foreach ($r->getParameters() as $v) { $k = '$'.$v->name; if ($v->isPassedByReference()) { @@ -75,6 +75,6 @@ class ArgsStub extends EnumStub } } - return self::$parameters[$k] = array($variadic, $params); + return self::$parameters[$k] = [$variadic, $params]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/Caster.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/Caster.php index 30cb9fc0..93d0ce2b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/Caster.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/Caster.php @@ -56,7 +56,7 @@ class Caster if ($hasDebugInfo) { $a = $obj->__debugInfo(); } elseif ($obj instanceof \Closure) { - $a = array(); + $a = []; } else { $a = (array) $obj; } @@ -65,10 +65,10 @@ class Caster } if ($a) { - static $publicProperties = array(); + static $publicProperties = []; $i = 0; - $prefixedKeys = array(); + $prefixedKeys = []; foreach ($a as $k => $v) { if (isset($k[0]) ? "\0" !== $k[0] : \PHP_VERSION_ID >= 70200) { if (!isset($publicProperties[$class])) { @@ -109,7 +109,7 @@ class Caster * * @return array The filtered array */ - public static function filter(array $a, $filter, array $listedProperties = array(), &$count = 0) + public static function filter(array $a, $filter, array $listedProperties = [], &$count = 0) { $count = 0; @@ -119,7 +119,7 @@ class Caster if (null === $v) { $type |= self::EXCLUDE_NULL & $filter; $type |= self::EXCLUDE_EMPTY & $filter; - } elseif (false === $v || '' === $v || '0' === $v || 0 === $v || 0.0 === $v || array() === $v) { + } elseif (false === $v || '' === $v || '0' === $v || 0 === $v || 0.0 === $v || [] === $v) { $type |= self::EXCLUDE_EMPTY & $filter; } if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !\in_array($k, $listedProperties, true)) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ClassStub.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ClassStub.php index 859c1ec4..1a85098e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ClassStub.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ClassStub.php @@ -37,16 +37,16 @@ class ClassStub extends ConstStub if ($callable instanceof \Closure) { $r = new \ReflectionFunction($callable); } elseif (\is_object($callable)) { - $r = array($callable, '__invoke'); + $r = [$callable, '__invoke']; } elseif (\is_array($callable)) { $r = $callable; } elseif (false !== $i = strpos($callable, '::')) { - $r = array(substr($callable, 0, $i), substr($callable, 2 + $i)); + $r = [substr($callable, 0, $i), substr($callable, 2 + $i)]; } else { $r = new \ReflectionFunction($callable); } } elseif (0 < $i = strpos($identifier, '::') ?: strpos($identifier, '->')) { - $r = array(substr($identifier, 0, $i), substr($identifier, 2 + $i)); + $r = [substr($identifier, 0, $i), substr($identifier, 2 + $i)]; } else { $r = new \ReflectionClass($identifier); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DOMCaster.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DOMCaster.php index 3a998653..65151b4f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DOMCaster.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DOMCaster.php @@ -20,7 +20,7 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class DOMCaster { - private static $errorCodes = array( + private static $errorCodes = [ DOM_PHP_ERR => 'DOM_PHP_ERR', DOM_INDEX_SIZE_ERR => 'DOM_INDEX_SIZE_ERR', DOMSTRING_SIZE_ERR => 'DOMSTRING_SIZE_ERR', @@ -38,9 +38,9 @@ class DOMCaster DOM_NAMESPACE_ERR => 'DOM_NAMESPACE_ERR', DOM_INVALID_ACCESS_ERR => 'DOM_INVALID_ACCESS_ERR', DOM_VALIDATION_ERR => 'DOM_VALIDATION_ERR', - ); + ]; - private static $nodeTypes = array( + private static $nodeTypes = [ XML_ELEMENT_NODE => 'XML_ELEMENT_NODE', XML_ATTRIBUTE_NODE => 'XML_ATTRIBUTE_NODE', XML_TEXT_NODE => 'XML_TEXT_NODE', @@ -59,7 +59,7 @@ class DOMCaster XML_ATTRIBUTE_DECL_NODE => 'XML_ATTRIBUTE_DECL_NODE', XML_ENTITY_DECL_NODE => 'XML_ENTITY_DECL_NODE', XML_NAMESPACE_DECL_NODE => 'XML_NAMESPACE_DECL_NODE', - ); + ]; public static function castException(\DOMException $e, array $a, Stub $stub, $isNested) { @@ -73,26 +73,26 @@ class DOMCaster public static function castLength($dom, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ 'length' => $dom->length, - ); + ]; return $a; } public static function castImplementation($dom, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ Caster::PREFIX_VIRTUAL.'Core' => '1.0', Caster::PREFIX_VIRTUAL.'XML' => '2.0', - ); + ]; return $a; } public static function castNode(\DOMNode $dom, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ 'nodeName' => $dom->nodeName, 'nodeValue' => new CutStub($dom->nodeValue), 'nodeType' => new ConstStub(self::$nodeTypes[$dom->nodeType], $dom->nodeType), @@ -109,14 +109,14 @@ class DOMCaster 'localName' => $dom->localName, 'baseURI' => $dom->baseURI ? new LinkStub($dom->baseURI) : $dom->baseURI, 'textContent' => new CutStub($dom->textContent), - ); + ]; return $a; } public static function castNameSpaceNode(\DOMNameSpaceNode $dom, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ 'nodeName' => $dom->nodeName, 'nodeValue' => new CutStub($dom->nodeValue), 'nodeType' => new ConstStub(self::$nodeTypes[$dom->nodeType], $dom->nodeType), @@ -125,14 +125,14 @@ class DOMCaster 'namespaceURI' => $dom->namespaceURI, 'ownerDocument' => new CutStub($dom->ownerDocument), 'parentNode' => new CutStub($dom->parentNode), - ); + ]; return $a; } public static function castDocument(\DOMDocument $dom, array $a, Stub $stub, $isNested, $filter = 0) { - $a += array( + $a += [ 'doctype' => $dom->doctype, 'implementation' => $dom->implementation, 'documentElement' => new CutStub($dom->documentElement), @@ -152,12 +152,12 @@ class DOMCaster 'preserveWhiteSpace' => $dom->preserveWhiteSpace, 'recover' => $dom->recover, 'substituteEntities' => $dom->substituteEntities, - ); + ]; if (!($filter & Caster::EXCLUDE_VERBOSE)) { $formatOutput = $dom->formatOutput; $dom->formatOutput = true; - $a += array(Caster::PREFIX_VIRTUAL.'xml' => $dom->saveXML()); + $a += [Caster::PREFIX_VIRTUAL.'xml' => $dom->saveXML()]; $dom->formatOutput = $formatOutput; } @@ -166,136 +166,136 @@ class DOMCaster public static function castCharacterData(\DOMCharacterData $dom, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ 'data' => $dom->data, 'length' => $dom->length, - ); + ]; return $a; } public static function castAttr(\DOMAttr $dom, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ 'name' => $dom->name, 'specified' => $dom->specified, 'value' => $dom->value, 'ownerElement' => $dom->ownerElement, 'schemaTypeInfo' => $dom->schemaTypeInfo, - ); + ]; return $a; } public static function castElement(\DOMElement $dom, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ 'tagName' => $dom->tagName, 'schemaTypeInfo' => $dom->schemaTypeInfo, - ); + ]; return $a; } public static function castText(\DOMText $dom, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ 'wholeText' => $dom->wholeText, - ); + ]; return $a; } public static function castTypeinfo(\DOMTypeinfo $dom, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ 'typeName' => $dom->typeName, 'typeNamespace' => $dom->typeNamespace, - ); + ]; return $a; } public static function castDomError(\DOMDomError $dom, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ 'severity' => $dom->severity, 'message' => $dom->message, 'type' => $dom->type, 'relatedException' => $dom->relatedException, 'related_data' => $dom->related_data, 'location' => $dom->location, - ); + ]; return $a; } public static function castLocator(\DOMLocator $dom, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ 'lineNumber' => $dom->lineNumber, 'columnNumber' => $dom->columnNumber, 'offset' => $dom->offset, 'relatedNode' => $dom->relatedNode, 'uri' => $dom->uri ? new LinkStub($dom->uri, $dom->lineNumber) : $dom->uri, - ); + ]; return $a; } public static function castDocumentType(\DOMDocumentType $dom, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ 'name' => $dom->name, 'entities' => $dom->entities, 'notations' => $dom->notations, 'publicId' => $dom->publicId, 'systemId' => $dom->systemId, 'internalSubset' => $dom->internalSubset, - ); + ]; return $a; } public static function castNotation(\DOMNotation $dom, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ 'publicId' => $dom->publicId, 'systemId' => $dom->systemId, - ); + ]; return $a; } public static function castEntity(\DOMEntity $dom, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ 'publicId' => $dom->publicId, 'systemId' => $dom->systemId, 'notationName' => $dom->notationName, 'actualEncoding' => $dom->actualEncoding, 'encoding' => $dom->encoding, 'version' => $dom->version, - ); + ]; return $a; } public static function castProcessingInstruction(\DOMProcessingInstruction $dom, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ 'target' => $dom->target, 'data' => $dom->data, - ); + ]; return $a; } public static function castXPath(\DOMXPath $dom, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ 'document' => $dom->document, - ); + ]; return $a; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DateCaster.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DateCaster.php index 175d9865..3b030b73 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DateCaster.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DateCaster.php @@ -31,7 +31,7 @@ class DateCaster .($location ? ($d->format('I') ? "\nDST On" : "\nDST Off") : '') ; - $a = array(); + $a = []; $a[$prefix.'date'] = new ConstStub(self::formatDateTime($d, $location ? ' e (P)' : ' P'), $title); $stub->class .= $d->format(' @U'); @@ -45,7 +45,7 @@ class DateCaster $numberOfSeconds = $now->add($interval)->getTimestamp() - $now->getTimestamp(); $title = number_format($numberOfSeconds, 0, '.', ' ').'s'; - $i = array(Caster::PREFIX_VIRTUAL.'interval' => new ConstStub(self::formatInterval($interval), $title)); + $i = [Caster::PREFIX_VIRTUAL.'interval' => new ConstStub(self::formatInterval($interval), $title)]; return $filter & Caster::EXCLUDE_VERBOSE ? $i : $i + $a; } @@ -78,7 +78,7 @@ class DateCaster $formatted = (new \DateTime('now', $timeZone))->format($location ? 'e (P)' : 'P'); $title = $location && \extension_loaded('intl') ? \Locale::getDisplayRegion('-'.$location['country_code'], \Locale::getDefault()) : ''; - $z = array(Caster::PREFIX_VIRTUAL.'timezone' => new ConstStub($formatted, $title)); + $z = [Caster::PREFIX_VIRTUAL.'timezone' => new ConstStub($formatted, $title)]; return $filter & Caster::EXCLUDE_VERBOSE ? $z : $z + $a; } @@ -89,7 +89,7 @@ class DateCaster return $a; } - $dates = array(); + $dates = []; if (\PHP_VERSION_ID >= 70107) { // see https://bugs.php.net/bug.php?id=74639 foreach (clone $p as $i => $d) { if (3 === $i) { @@ -112,7 +112,7 @@ class DateCaster ($end = $p->getEndDate()) ? 'to '.self::formatDateTime($end) : 'recurring '.$p->recurrences.' time/s' ); - $p = array(Caster::PREFIX_VIRTUAL.'period' => new ConstStub($period, implode("\n", $dates))); + $p = [Caster::PREFIX_VIRTUAL.'period' => new ConstStub($period, implode("\n", $dates))]; return $filter & Caster::EXCLUDE_VERBOSE ? $p : $p + $a; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DoctrineCaster.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DoctrineCaster.php index 785d0270..696b8781 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DoctrineCaster.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DoctrineCaster.php @@ -25,8 +25,8 @@ class DoctrineCaster { public static function castCommonProxy(CommonProxy $proxy, array $a, Stub $stub, $isNested) { - foreach (array('__cloner__', '__initializer__') as $k) { - if (array_key_exists($k, $a)) { + foreach (['__cloner__', '__initializer__'] as $k) { + if (\array_key_exists($k, $a)) { unset($a[$k]); ++$stub->cut; } @@ -37,8 +37,8 @@ class DoctrineCaster public static function castOrmProxy(OrmProxy $proxy, array $a, Stub $stub, $isNested) { - foreach (array('_entityPersister', '_identifier') as $k) { - if (array_key_exists($k = "\0Doctrine\\ORM\\Proxy\\Proxy\0".$k, $a)) { + foreach (['_entityPersister', '_identifier'] as $k) { + if (\array_key_exists($k = "\0Doctrine\\ORM\\Proxy\\Proxy\0".$k, $a)) { unset($a[$k]); ++$stub->cut; } @@ -49,8 +49,8 @@ class DoctrineCaster public static function castPersistentCollection(PersistentCollection $coll, array $a, Stub $stub, $isNested) { - foreach (array('snapshot', 'association', 'typeClass') as $k) { - if (array_key_exists($k = "\0Doctrine\\ORM\\PersistentCollection\0".$k, $a)) { + foreach (['snapshot', 'association', 'typeClass'] as $k) { + if (\array_key_exists($k = "\0Doctrine\\ORM\\PersistentCollection\0".$k, $a)) { $a[$k] = new CutStub($a[$k]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ExceptionCaster.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ExceptionCaster.php index 49df71da..e0acbe39 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ExceptionCaster.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ExceptionCaster.php @@ -24,7 +24,7 @@ class ExceptionCaster { public static $srcContext = 1; public static $traceArgs = true; - public static $errorTypes = array( + public static $errorTypes = [ E_DEPRECATED => 'E_DEPRECATED', E_USER_DEPRECATED => 'E_USER_DEPRECATED', E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', @@ -40,9 +40,9 @@ class ExceptionCaster E_USER_WARNING => 'E_USER_WARNING', E_USER_NOTICE => 'E_USER_NOTICE', E_STRICT => 'E_STRICT', - ); + ]; - private static $framesCache = array(); + private static $framesCache = []; public static function castError(\Error $e, array $a, Stub $stub, $isNested, $filter = 0) { @@ -92,10 +92,10 @@ class ExceptionCaster $a[$s] = new ConstStub(self::$errorTypes[$a[$s]], $a[$s]); } - $trace = array(array( + $trace = [[ 'file' => $a[$sPrefix.'file'], 'line' => $a[$sPrefix.'line'], - )); + ]]; if (isset($a[$sPrefix.'trace'])) { $trace = array_merge($trace, $a[$sPrefix.'trace']); @@ -117,16 +117,16 @@ class ExceptionCaster $frames = $trace->value; $prefix = Caster::PREFIX_VIRTUAL; - $a = array(); + $a = []; $j = \count($frames); if (0 > $i = $trace->sliceOffset) { $i = max(0, $j + $i); } if (!isset($trace->value[$i])) { - return array(); + return []; } $lastCall = isset($frames[$i]['function']) ? (isset($frames[$i]['class']) ? $frames[0]['class'].$frames[$i]['type'] : '').$frames[$i]['function'].'()' : ''; - $frames[] = array('function' => ''); + $frames[] = ['function' => '']; $collapse = false; for ($j += $trace->numberingOffset - $i++; isset($frames[$i]); ++$i, --$j) { @@ -134,16 +134,16 @@ class ExceptionCaster $call = isset($f['function']) ? (isset($f['class']) ? $f['class'].$f['type'] : '').$f['function'] : '???'; $frame = new FrameStub( - array( + [ 'object' => isset($f['object']) ? $f['object'] : null, 'class' => isset($f['class']) ? $f['class'] : null, 'type' => isset($f['type']) ? $f['type'] : null, 'function' => isset($f['function']) ? $f['function'] : null, - ) + $frames[$i - 1], + ] + $frames[$i - 1], false, true ); - $f = self::castFrameStub($frame, array(), $frame, true); + $f = self::castFrameStub($frame, [], $frame, true); if (isset($f[$prefix.'src'])) { foreach ($f[$prefix.'src']->value as $label => $frame) { if (0 === strpos($label, "\0~collapse=0")) { @@ -239,7 +239,7 @@ class ExceptionCaster $srcAttr .= '&separator=:'; } $srcAttr .= $ellipsis ? '&ellipsis-type=path&ellipsis='.$ellipsis.'&ellipsis-tail='.$ellipsisTail : ''; - self::$framesCache[$cacheKey] = $a[$prefix.'src'] = new EnumStub(array("\0~$srcAttr\0$srcKey" => $src)); + self::$framesCache[$cacheKey] = $a[$prefix.'src'] = new EnumStub(["\0~$srcAttr\0$srcKey" => $src]); } } @@ -265,7 +265,7 @@ class ExceptionCaster $trace = $a[$xPrefix.'trace']; unset($a[$xPrefix.'trace']); // Ensures the trace is always last } else { - $trace = array(); + $trace = []; } if (!($filter & Caster::EXCLUDE_VERBOSE) && $trace) { @@ -291,23 +291,23 @@ class ExceptionCaster if (isset($trace[0]['file'], $trace[0]['line']) && $trace[0]['file'] === $file && $trace[0]['line'] === $line) { return; } - array_unshift($trace, array( + array_unshift($trace, [ 'function' => $class ? 'new '.$class : null, 'file' => $file, 'line' => $line, - )); + ]); } private static function extractSource($srcLines, $line, $srcContext, $title, $lang, $file = null) { $srcLines = explode("\n", $srcLines); - $src = array(); + $src = []; for ($i = $line - 1 - $srcContext; $i <= $line - 1 + $srcContext; ++$i) { $src[] = (isset($srcLines[$i]) ? $srcLines[$i] : '')."\n"; } - $srcLines = array(); + $srcLines = []; $ltrim = 0; do { $pad = null; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/LinkStub.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/LinkStub.php index f32f3420..b589b502 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/LinkStub.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/LinkStub.php @@ -66,7 +66,7 @@ class LinkStub extends ConstStub private function getComposerRoot($file, &$inVendor) { if (null === self::$vendorRoots) { - self::$vendorRoots = array(); + self::$vendorRoots = []; foreach (get_declared_classes() as $class) { if ('C' === $class[0] && 0 === strpos($class, 'ComposerAutoloaderInit')) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/PdoCaster.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/PdoCaster.php index 83a001d9..8af51829 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/PdoCaster.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/PdoCaster.php @@ -20,53 +20,53 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class PdoCaster { - private static $pdoAttributes = array( - 'CASE' => array( + private static $pdoAttributes = [ + 'CASE' => [ \PDO::CASE_LOWER => 'LOWER', \PDO::CASE_NATURAL => 'NATURAL', \PDO::CASE_UPPER => 'UPPER', - ), - 'ERRMODE' => array( + ], + 'ERRMODE' => [ \PDO::ERRMODE_SILENT => 'SILENT', \PDO::ERRMODE_WARNING => 'WARNING', \PDO::ERRMODE_EXCEPTION => 'EXCEPTION', - ), + ], 'TIMEOUT', 'PREFETCH', 'AUTOCOMMIT', 'PERSISTENT', 'DRIVER_NAME', 'SERVER_INFO', - 'ORACLE_NULLS' => array( + 'ORACLE_NULLS' => [ \PDO::NULL_NATURAL => 'NATURAL', \PDO::NULL_EMPTY_STRING => 'EMPTY_STRING', \PDO::NULL_TO_STRING => 'TO_STRING', - ), + ], 'CLIENT_VERSION', 'SERVER_VERSION', 'STATEMENT_CLASS', 'EMULATE_PREPARES', 'CONNECTION_STATUS', 'STRINGIFY_FETCHES', - 'DEFAULT_FETCH_MODE' => array( + 'DEFAULT_FETCH_MODE' => [ \PDO::FETCH_ASSOC => 'ASSOC', \PDO::FETCH_BOTH => 'BOTH', \PDO::FETCH_LAZY => 'LAZY', \PDO::FETCH_NUM => 'NUM', \PDO::FETCH_OBJ => 'OBJ', - ), - ); + ], + ]; public static function castPdo(\PDO $c, array $a, Stub $stub, $isNested) { - $attr = array(); + $attr = []; $errmode = $c->getAttribute(\PDO::ATTR_ERRMODE); $c->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); foreach (self::$pdoAttributes as $k => $v) { if (!isset($k[0])) { $k = $v; - $v = array(); + $v = []; } try { @@ -85,11 +85,11 @@ class PdoCaster } $prefix = Caster::PREFIX_VIRTUAL; - $a += array( + $a += [ $prefix.'inTransaction' => method_exists($c, 'inTransaction'), $prefix.'errorInfo' => $c->errorInfo(), $prefix.'attributes' => new EnumStub($attr), - ); + ]; if ($a[$prefix.'inTransaction']) { $a[$prefix.'inTransaction'] = $c->inTransaction(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/PgSqlCaster.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/PgSqlCaster.php index 88414e4c..cd6bf5b5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/PgSqlCaster.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/PgSqlCaster.php @@ -20,7 +20,7 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class PgSqlCaster { - private static $paramCodes = array( + private static $paramCodes = [ 'server_encoding', 'client_encoding', 'is_superuser', @@ -31,17 +31,17 @@ class PgSqlCaster 'integer_datetimes', 'application_name', 'standard_conforming_strings', - ); + ]; - private static $transactionStatus = array( + private static $transactionStatus = [ PGSQL_TRANSACTION_IDLE => 'PGSQL_TRANSACTION_IDLE', PGSQL_TRANSACTION_ACTIVE => 'PGSQL_TRANSACTION_ACTIVE', PGSQL_TRANSACTION_INTRANS => 'PGSQL_TRANSACTION_INTRANS', PGSQL_TRANSACTION_INERROR => 'PGSQL_TRANSACTION_INERROR', PGSQL_TRANSACTION_UNKNOWN => 'PGSQL_TRANSACTION_UNKNOWN', - ); + ]; - private static $resultStatus = array( + private static $resultStatus = [ PGSQL_EMPTY_QUERY => 'PGSQL_EMPTY_QUERY', PGSQL_COMMAND_OK => 'PGSQL_COMMAND_OK', PGSQL_TUPLES_OK => 'PGSQL_TUPLES_OK', @@ -50,9 +50,9 @@ class PgSqlCaster PGSQL_BAD_RESPONSE => 'PGSQL_BAD_RESPONSE', PGSQL_NONFATAL_ERROR => 'PGSQL_NONFATAL_ERROR', PGSQL_FATAL_ERROR => 'PGSQL_FATAL_ERROR', - ); + ]; - private static $diagCodes = array( + private static $diagCodes = [ 'severity' => PGSQL_DIAG_SEVERITY, 'sqlstate' => PGSQL_DIAG_SQLSTATE, 'message' => PGSQL_DIAG_MESSAGE_PRIMARY, @@ -65,7 +65,7 @@ class PgSqlCaster 'file' => PGSQL_DIAG_SOURCE_FILE, 'line' => PGSQL_DIAG_SOURCE_LINE, 'function' => PGSQL_DIAG_SOURCE_FUNCTION, - ); + ]; public static function castLargeObject($lo, array $a, Stub $stub, $isNested) { @@ -127,14 +127,14 @@ class PgSqlCaster $fields = pg_num_fields($result); for ($i = 0; $i < $fields; ++$i) { - $field = array( + $field = [ 'name' => pg_field_name($result, $i), 'table' => sprintf('%s (OID: %s)', pg_field_table($result, $i), pg_field_table($result, $i, true)), 'type' => sprintf('%s (OID: %s)', pg_field_type($result, $i), pg_field_type_oid($result, $i)), 'nullable' => (bool) pg_field_is_null($result, $i), 'storage' => pg_field_size($result, $i).' bytes', 'display' => pg_field_prtlen($result, $i).' chars', - ); + ]; if (' (OID: )' === $field['table']) { $field['table'] = null; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/RedisCaster.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/RedisCaster.php index 409a0d48..1e2fb399 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/RedisCaster.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/RedisCaster.php @@ -20,11 +20,11 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class RedisCaster { - private static $serializer = array( + private static $serializer = [ \Redis::SERIALIZER_NONE => 'NONE', \Redis::SERIALIZER_PHP => 'PHP', 2 => 'IGBINARY', // Optional Redis::SERIALIZER_IGBINARY - ); + ]; public static function castRedis(\Redis $c, array $a, Stub $stub, $isNested) { @@ -40,15 +40,15 @@ class RedisCaster } if (!$connected = $c->isConnected()) { - return $a + array( + return $a + [ $prefix.'isConnected' => $connected, - ); + ]; } $ser = $c->getOption(\Redis::OPT_SERIALIZER); $retry = \defined('Redis::OPT_SCAN') ? $c->getOption(\Redis::OPT_SCAN) : 0; - return $a + array( + return $a + [ $prefix.'isConnected' => $connected, $prefix.'host' => $c->getHost(), $prefix.'port' => $c->getPort(), @@ -56,22 +56,22 @@ class RedisCaster $prefix.'dbNum' => $c->getDbNum(), $prefix.'timeout' => $c->getTimeout(), $prefix.'persistentId' => $c->getPersistentID(), - $prefix.'options' => new EnumStub(array( + $prefix.'options' => new EnumStub([ 'READ_TIMEOUT' => $c->getOption(\Redis::OPT_READ_TIMEOUT), 'SERIALIZER' => isset(self::$serializer[$ser]) ? new ConstStub(self::$serializer[$ser], $ser) : $ser, 'PREFIX' => $c->getOption(\Redis::OPT_PREFIX), 'SCAN' => new ConstStub($retry ? 'RETRY' : 'NORETRY', $retry), - )), - ); + ]), + ]; } public static function castRedisArray(\RedisArray $c, array $a, Stub $stub, $isNested) { $prefix = Caster::PREFIX_VIRTUAL; - return $a + array( + return $a + [ $prefix.'hosts' => $c->_hosts(), $prefix.'function' => ClassStub::wrapCallable($c->_function()), - ); + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php index 9bfef069..1543bbfd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php @@ -20,7 +20,7 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class ReflectionCaster { - private static $extraMap = array( + private static $extraMap = [ 'docComment' => 'getDocComment', 'extension' => 'getExtensionName', 'isDisabled' => 'isDisabled', @@ -29,7 +29,7 @@ class ReflectionCaster 'isUserDefined' => 'isUserDefined', 'isGenerator' => 'isGenerator', 'isVariadic' => 'isVariadic', - ); + ]; public static function castClosure(\Closure $c, array $a, Stub $stub, $isNested, $filter = 0) { @@ -47,8 +47,8 @@ class ReflectionCaster if (isset($a[$prefix.'parameters'])) { foreach ($a[$prefix.'parameters']->value as &$v) { $param = $v; - $v = new EnumStub(array()); - foreach (static::castParameter($param, array(), $stub, true) as $k => $param) { + $v = new EnumStub([]); + foreach (static::castParameter($param, [], $stub, true) as $k => $param) { if ("\0" === $k[0]) { $v->value[substr($k, 3)] = $param; } @@ -90,11 +90,11 @@ class ReflectionCaster { $prefix = Caster::PREFIX_VIRTUAL; - $a += array( + $a += [ $prefix.'name' => $c instanceof \ReflectionNamedType ? $c->getName() : $c->__toString(), $prefix.'allowsNull' => $c->allowsNull(), $prefix.'isBuiltin' => $c->isBuiltin(), - ); + ]; return $a; } @@ -107,28 +107,28 @@ class ReflectionCaster $a[$prefix.'this'] = new CutStub($c->getThis()); } $function = $c->getFunction(); - $frame = array( + $frame = [ 'class' => isset($function->class) ? $function->class : null, 'type' => isset($function->class) ? ($function->isStatic() ? '::' : '->') : null, 'function' => $function->name, 'file' => $c->getExecutingFile(), 'line' => $c->getExecutingLine(), - ); + ]; if ($trace = $c->getTrace(DEBUG_BACKTRACE_IGNORE_ARGS)) { $function = new \ReflectionGenerator($c->getExecutingGenerator()); - array_unshift($trace, array( + array_unshift($trace, [ 'function' => 'yield', 'file' => $function->getExecutingFile(), 'line' => $function->getExecutingLine() - 1, - )); + ]); $trace[] = $frame; $a[$prefix.'trace'] = new TraceStub($trace, false, 0, -1, -1); } else { $function = new FrameStub($frame, false, true); - $function = ExceptionCaster::castFrameStub($function, array(), $function, true); - $a[$prefix.'executing'] = new EnumStub(array( + $function = ExceptionCaster::castFrameStub($function, [], $function, true); + $a[$prefix.'executing'] = new EnumStub([ "\0~separator= \0".$frame['class'].$frame['type'].$frame['function'].'()' => $function[$prefix.'src'], - )); + ]); } $a[Caster::PREFIX_VIRTUAL.'closed'] = false; @@ -144,11 +144,11 @@ class ReflectionCaster $a[$prefix.'modifiers'] = implode(' ', $n); } - self::addMap($a, $c, array( + self::addMap($a, $c, [ 'extends' => 'getParentClass', 'implements' => 'getInterfaceNames', 'constants' => 'getConstants', - )); + ]); foreach ($c->getProperties() as $n) { $a[$prefix.'properties'][$n->name] = $n; @@ -169,17 +169,17 @@ class ReflectionCaster { $prefix = Caster::PREFIX_VIRTUAL; - self::addMap($a, $c, array( + self::addMap($a, $c, [ 'returnsReference' => 'returnsReference', 'returnType' => 'getReturnType', 'class' => 'getClosureScopeClass', 'this' => 'getClosureThis', - )); + ]); if (isset($a[$prefix.'returnType'])) { $v = $a[$prefix.'returnType']; $v = $v instanceof \ReflectionNamedType ? $v->getName() : $v->__toString(); - $a[$prefix.'returnType'] = new ClassStub($a[$prefix.'returnType']->allowsNull() ? '?'.$v : $v, array(class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '')); + $a[$prefix.'returnType'] = new ClassStub($a[$prefix.'returnType']->allowsNull() ? '?'.$v : $v, [class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '']); } if (isset($a[$prefix.'class'])) { $a[$prefix.'class'] = new ClassStub($a[$prefix.'class']); @@ -238,12 +238,12 @@ class ReflectionCaster // Added by HHVM unset($a['info']); - self::addMap($a, $c, array( + self::addMap($a, $c, [ 'position' => 'getPosition', 'isVariadic' => 'isVariadic', 'byReference' => 'isPassedByReference', 'allowsNull' => 'allowsNull', - )); + ]); if (method_exists($c, 'getType')) { if ($v = $c->getType()) { @@ -255,7 +255,7 @@ class ReflectionCaster if (isset($a[$prefix.'typeHint'])) { $v = $a[$prefix.'typeHint']; - $a[$prefix.'typeHint'] = new ClassStub($v, array(class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '')); + $a[$prefix.'typeHint'] = new ClassStub($v, [class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '']); } else { unset($a[$prefix.'allowsNull']); } @@ -288,7 +288,7 @@ class ReflectionCaster public static function castExtension(\ReflectionExtension $c, array $a, Stub $stub, $isNested) { - self::addMap($a, $c, array( + self::addMap($a, $c, [ 'version' => 'getVersion', 'dependencies' => 'getDependencies', 'iniEntries' => 'getIniEntries', @@ -297,26 +297,26 @@ class ReflectionCaster 'constants' => 'getConstants', 'functions' => 'getFunctions', 'classes' => 'getClasses', - )); + ]); return $a; } public static function castZendExtension(\ReflectionZendExtension $c, array $a, Stub $stub, $isNested) { - self::addMap($a, $c, array( + self::addMap($a, $c, [ 'version' => 'getVersion', 'author' => 'getAuthor', 'copyright' => 'getCopyright', 'url' => 'getURL', - )); + ]); return $a; } private static function addExtra(&$a, \Reflector $c) { - $x = isset($a[Caster::PREFIX_VIRTUAL.'extra']) ? $a[Caster::PREFIX_VIRTUAL.'extra']->value : array(); + $x = isset($a[Caster::PREFIX_VIRTUAL.'extra']) ? $a[Caster::PREFIX_VIRTUAL.'extra']->value : []; if (method_exists($c, 'getFileName') && $m = $c->getFileName()) { $x['file'] = new LinkStub($m, $c->getStartLine()); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/SplCaster.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/SplCaster.php index 0780c0a3..a223adb7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/SplCaster.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/SplCaster.php @@ -20,12 +20,12 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class SplCaster { - private static $splFileObjectFlags = array( + private static $splFileObjectFlags = [ \SplFileObject::DROP_NEW_LINE => 'DROP_NEW_LINE', \SplFileObject::READ_AHEAD => 'READ_AHEAD', \SplFileObject::SKIP_EMPTY => 'SKIP_EMPTY', \SplFileObject::READ_CSV => 'READ_CSV', - ); + ]; public static function castArrayObject(\ArrayObject $c, array $a, Stub $stub, $isNested) { @@ -39,9 +39,9 @@ class SplCaster public static function castHeap(\Iterator $c, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ Caster::PREFIX_VIRTUAL.'heap' => iterator_to_array(clone $c), - ); + ]; return $a; } @@ -52,10 +52,10 @@ class SplCaster $mode = $c->getIteratorMode(); $c->setIteratorMode(\SplDoublyLinkedList::IT_MODE_KEEP | $mode & ~\SplDoublyLinkedList::IT_MODE_DELETE); - $a += array( + $a += [ $prefix.'mode' => new ConstStub((($mode & \SplDoublyLinkedList::IT_MODE_LIFO) ? 'IT_MODE_LIFO' : 'IT_MODE_FIFO').' | '.(($mode & \SplDoublyLinkedList::IT_MODE_DELETE) ? 'IT_MODE_DELETE' : 'IT_MODE_KEEP'), $mode), $prefix.'dllist' => iterator_to_array($c), - ); + ]; $c->setIteratorMode($mode); return $a; @@ -63,7 +63,7 @@ class SplCaster public static function castFileInfo(\SplFileInfo $c, array $a, Stub $stub, $isNested) { - static $map = array( + static $map = [ 'path' => 'getPath', 'filename' => 'getFilename', 'basename' => 'getBasename', @@ -86,7 +86,7 @@ class SplCaster 'dir' => 'isDir', 'link' => 'isLink', 'linkTarget' => 'getLinkTarget', - ); + ]; $prefix = Caster::PREFIX_VIRTUAL; @@ -105,7 +105,7 @@ class SplCaster $a[$prefix.'perms'] = new ConstStub(sprintf('0%o', $a[$prefix.'perms']), $a[$prefix.'perms']); } - static $mapDate = array('aTime', 'mTime', 'cTime'); + static $mapDate = ['aTime', 'mTime', 'cTime']; foreach ($mapDate as $key) { if (isset($a[$prefix.$key])) { $a[$prefix.$key] = new ConstStub(date('Y-m-d H:i:s', $a[$prefix.$key]), $a[$prefix.$key]); @@ -117,14 +117,14 @@ class SplCaster public static function castFileObject(\SplFileObject $c, array $a, Stub $stub, $isNested) { - static $map = array( + static $map = [ 'csvControl' => 'getCsvControl', 'flags' => 'getFlags', 'maxLineLen' => 'getMaxLineLen', 'fstat' => 'fstat', 'eof' => 'eof', 'key' => 'key', - ); + ]; $prefix = Caster::PREFIX_VIRTUAL; @@ -136,7 +136,7 @@ class SplCaster } if (isset($a[$prefix.'flags'])) { - $flagsArray = array(); + $flagsArray = []; foreach (self::$splFileObjectFlags as $value => $name) { if ($a[$prefix.'flags'] & $value) { $flagsArray[] = $name; @@ -146,7 +146,7 @@ class SplCaster } if (isset($a[$prefix.'fstat'])) { - $a[$prefix.'fstat'] = new CutArrayStub($a[$prefix.'fstat'], array('dev', 'ino', 'nlink', 'rdev', 'blksize', 'blocks')); + $a[$prefix.'fstat'] = new CutArrayStub($a[$prefix.'fstat'], ['dev', 'ino', 'nlink', 'rdev', 'blksize', 'blocks']); } return $a; @@ -154,29 +154,29 @@ class SplCaster public static function castFixedArray(\SplFixedArray $c, array $a, Stub $stub, $isNested) { - $a += array( + $a += [ Caster::PREFIX_VIRTUAL.'storage' => $c->toArray(), - ); + ]; return $a; } public static function castObjectStorage(\SplObjectStorage $c, array $a, Stub $stub, $isNested) { - $storage = array(); + $storage = []; unset($a[Caster::PREFIX_DYNAMIC."\0gcdata"]); // Don't hit https://bugs.php.net/65967 $clone = clone $c; foreach ($clone as $obj) { - $storage[] = array( + $storage[] = [ 'object' => $obj, 'info' => $clone->getInfo(), - ); + ]; } - $a += array( + $a += [ Caster::PREFIX_VIRTUAL.'storage' => $storage, - ); + ]; return $a; } @@ -199,10 +199,10 @@ class SplCaster $a = Caster::castObject($c, $class); $c->setFlags($flags); } - $a += array( + $a += [ $prefix.'flag::STD_PROP_LIST' => (bool) ($flags & \ArrayObject::STD_PROP_LIST), $prefix.'flag::ARRAY_AS_PROPS' => (bool) ($flags & \ArrayObject::ARRAY_AS_PROPS), - ); + ]; if ($c instanceof \ArrayObject) { $a[$prefix.'iteratorClass'] = new ClassStub($c->getIteratorClass()); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/StubCaster.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/StubCaster.php index b0bf5dc8..9927d426 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/StubCaster.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/StubCaster.php @@ -35,7 +35,7 @@ class StubCaster $stub->class = Stub::STRING_BINARY; } - $a = array(); + $a = []; } return $a; @@ -51,7 +51,7 @@ class StubCaster if ($isNested) { $stub->cut += \count($a); - return array(); + return []; } return $a; @@ -66,7 +66,7 @@ class StubCaster $stub->cut = $c->cut; $stub->attr = $c->attr; - $a = array(); + $a = []; if ($c->value) { foreach (array_keys($c->value) as $k) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/SymfonyCaster.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/SymfonyCaster.php index 5d9decb6..ae7134f5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/SymfonyCaster.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/SymfonyCaster.php @@ -16,14 +16,14 @@ use Symfony\Component\VarDumper\Cloner\Stub; class SymfonyCaster { - private static $requestGetters = array( + private static $requestGetters = [ 'pathInfo' => 'getPathInfo', 'requestUri' => 'getRequestUri', 'baseUrl' => 'getBaseUrl', 'basePath' => 'getBasePath', 'method' => 'getMethod', 'format' => 'getRequestFormat', - ); + ]; public static function castRequest(Request $request, array $a, Stub $stub, $isNested) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/XmlReaderCaster.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/XmlReaderCaster.php index 19b26e69..3ae9ec0b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/XmlReaderCaster.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/XmlReaderCaster.php @@ -19,7 +19,7 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class XmlReaderCaster { - private static $nodeTypes = array( + private static $nodeTypes = [ \XMLReader::NONE => 'NONE', \XMLReader::ELEMENT => 'ELEMENT', \XMLReader::ATTRIBUTE => 'ATTRIBUTE', @@ -38,12 +38,12 @@ class XmlReaderCaster \XMLReader::END_ELEMENT => 'END_ELEMENT', \XMLReader::END_ENTITY => 'END_ENTITY', \XMLReader::XML_DECLARATION => 'XML_DECLARATION', - ); + ]; public static function castXmlReader(\XMLReader $reader, array $a, Stub $stub, $isNested) { $props = Caster::PREFIX_VIRTUAL.'parserProperties'; - $info = array( + $info = [ 'localName' => $reader->localName, 'prefix' => $reader->prefix, 'nodeType' => new ConstStub(self::$nodeTypes[$reader->nodeType], $reader->nodeType), @@ -55,20 +55,20 @@ class XmlReaderCaster 'value' => $reader->value, 'namespaceURI' => $reader->namespaceURI, 'baseURI' => $reader->baseURI ? new LinkStub($reader->baseURI) : $reader->baseURI, - $props => array( + $props => [ 'LOADDTD' => $reader->getParserProperty(\XMLReader::LOADDTD), 'DEFAULTATTRS' => $reader->getParserProperty(\XMLReader::DEFAULTATTRS), 'VALIDATE' => $reader->getParserProperty(\XMLReader::VALIDATE), 'SUBST_ENTITIES' => $reader->getParserProperty(\XMLReader::SUBST_ENTITIES), - ), - ); + ], + ]; - if ($info[$props] = Caster::filter($info[$props], Caster::EXCLUDE_EMPTY, array(), $count)) { + if ($info[$props] = Caster::filter($info[$props], Caster::EXCLUDE_EMPTY, [], $count)) { $info[$props] = new EnumStub($info[$props]); $info[$props]->cut = $count; } - $info = Caster::filter($info, Caster::EXCLUDE_EMPTY, array(), $count); + $info = Caster::filter($info, Caster::EXCLUDE_EMPTY, [], $count); // +2 because hasValue and hasAttributes are always filtered $stub->cut += $count + 2; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/XmlResourceCaster.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/XmlResourceCaster.php index 5d0207ee..117138c7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/XmlResourceCaster.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/XmlResourceCaster.php @@ -20,7 +20,7 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class XmlResourceCaster { - private static $xmlErrors = array( + private static $xmlErrors = [ XML_ERROR_NONE => 'XML_ERROR_NONE', XML_ERROR_NO_MEMORY => 'XML_ERROR_NO_MEMORY', XML_ERROR_SYNTAX => 'XML_ERROR_SYNTAX', @@ -43,7 +43,7 @@ class XmlResourceCaster XML_ERROR_INCORRECT_ENCODING => 'XML_ERROR_INCORRECT_ENCODING', XML_ERROR_UNCLOSED_CDATA_SECTION => 'XML_ERROR_UNCLOSED_CDATA_SECTION', XML_ERROR_EXTERNAL_ENTITY_HANDLING => 'XML_ERROR_EXTERNAL_ENTITY_HANDLING', - ); + ]; public static function castXml($h, array $a, Stub $stub, $isNested) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php index 5501fc69..de09f180 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php @@ -21,124 +21,124 @@ use Symfony\Component\VarDumper\Exception\ThrowingCasterException; */ abstract class AbstractCloner implements ClonerInterface { - public static $defaultCasters = array( - '__PHP_Incomplete_Class' => array('Symfony\Component\VarDumper\Caster\Caster', 'castPhpIncompleteClass'), + public static $defaultCasters = [ + '__PHP_Incomplete_Class' => ['Symfony\Component\VarDumper\Caster\Caster', 'castPhpIncompleteClass'], - 'Symfony\Component\VarDumper\Caster\CutStub' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'castStub'), - 'Symfony\Component\VarDumper\Caster\CutArrayStub' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'castCutArray'), - 'Symfony\Component\VarDumper\Caster\ConstStub' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'castStub'), - 'Symfony\Component\VarDumper\Caster\EnumStub' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'castEnum'), + 'Symfony\Component\VarDumper\Caster\CutStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castStub'], + 'Symfony\Component\VarDumper\Caster\CutArrayStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castCutArray'], + 'Symfony\Component\VarDumper\Caster\ConstStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castStub'], + 'Symfony\Component\VarDumper\Caster\EnumStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castEnum'], - 'Closure' => array('Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castClosure'), - 'Generator' => array('Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castGenerator'), - 'ReflectionType' => array('Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castType'), - 'ReflectionGenerator' => array('Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castReflectionGenerator'), - 'ReflectionClass' => array('Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castClass'), - 'ReflectionFunctionAbstract' => array('Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castFunctionAbstract'), - 'ReflectionMethod' => array('Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castMethod'), - 'ReflectionParameter' => array('Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castParameter'), - 'ReflectionProperty' => array('Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castProperty'), - 'ReflectionExtension' => array('Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castExtension'), - 'ReflectionZendExtension' => array('Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castZendExtension'), + 'Closure' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castClosure'], + 'Generator' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castGenerator'], + 'ReflectionType' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castType'], + 'ReflectionGenerator' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castReflectionGenerator'], + 'ReflectionClass' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castClass'], + 'ReflectionFunctionAbstract' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castFunctionAbstract'], + 'ReflectionMethod' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castMethod'], + 'ReflectionParameter' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castParameter'], + 'ReflectionProperty' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castProperty'], + 'ReflectionExtension' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castExtension'], + 'ReflectionZendExtension' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castZendExtension'], - 'Doctrine\Common\Persistence\ObjectManager' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'), - 'Doctrine\Common\Proxy\Proxy' => array('Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castCommonProxy'), - 'Doctrine\ORM\Proxy\Proxy' => array('Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castOrmProxy'), - 'Doctrine\ORM\PersistentCollection' => array('Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castPersistentCollection'), + 'Doctrine\Common\Persistence\ObjectManager' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], + 'Doctrine\Common\Proxy\Proxy' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castCommonProxy'], + 'Doctrine\ORM\Proxy\Proxy' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castOrmProxy'], + 'Doctrine\ORM\PersistentCollection' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castPersistentCollection'], - 'DOMException' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castException'), - 'DOMStringList' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'), - 'DOMNameList' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'), - 'DOMImplementation' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castImplementation'), - 'DOMImplementationList' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'), - 'DOMNode' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castNode'), - 'DOMNameSpaceNode' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castNameSpaceNode'), - 'DOMDocument' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castDocument'), - 'DOMNodeList' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'), - 'DOMNamedNodeMap' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'), - 'DOMCharacterData' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castCharacterData'), - 'DOMAttr' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castAttr'), - 'DOMElement' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castElement'), - 'DOMText' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castText'), - 'DOMTypeinfo' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castTypeinfo'), - 'DOMDomError' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castDomError'), - 'DOMLocator' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castLocator'), - 'DOMDocumentType' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castDocumentType'), - 'DOMNotation' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castNotation'), - 'DOMEntity' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castEntity'), - 'DOMProcessingInstruction' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castProcessingInstruction'), - 'DOMXPath' => array('Symfony\Component\VarDumper\Caster\DOMCaster', 'castXPath'), + 'DOMException' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castException'], + 'DOMStringList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], + 'DOMNameList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], + 'DOMImplementation' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castImplementation'], + 'DOMImplementationList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], + 'DOMNode' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNode'], + 'DOMNameSpaceNode' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNameSpaceNode'], + 'DOMDocument' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDocument'], + 'DOMNodeList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], + 'DOMNamedNodeMap' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], + 'DOMCharacterData' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castCharacterData'], + 'DOMAttr' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castAttr'], + 'DOMElement' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castElement'], + 'DOMText' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castText'], + 'DOMTypeinfo' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castTypeinfo'], + 'DOMDomError' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDomError'], + 'DOMLocator' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLocator'], + 'DOMDocumentType' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDocumentType'], + 'DOMNotation' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNotation'], + 'DOMEntity' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castEntity'], + 'DOMProcessingInstruction' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castProcessingInstruction'], + 'DOMXPath' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castXPath'], - 'XmlReader' => array('Symfony\Component\VarDumper\Caster\XmlReaderCaster', 'castXmlReader'), + 'XmlReader' => ['Symfony\Component\VarDumper\Caster\XmlReaderCaster', 'castXmlReader'], - 'ErrorException' => array('Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castErrorException'), - 'Exception' => array('Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castException'), - 'Error' => array('Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castError'), - 'Symfony\Component\DependencyInjection\ContainerInterface' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'), - 'Symfony\Component\HttpFoundation\Request' => array('Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castRequest'), - 'Symfony\Component\VarDumper\Exception\ThrowingCasterException' => array('Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castThrowingCasterException'), - 'Symfony\Component\VarDumper\Caster\TraceStub' => array('Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castTraceStub'), - 'Symfony\Component\VarDumper\Caster\FrameStub' => array('Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castFrameStub'), - 'Symfony\Component\Debug\Exception\SilencedErrorContext' => array('Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castSilencedErrorContext'), + 'ErrorException' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castErrorException'], + 'Exception' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castException'], + 'Error' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castError'], + 'Symfony\Component\DependencyInjection\ContainerInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], + 'Symfony\Component\HttpFoundation\Request' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castRequest'], + 'Symfony\Component\VarDumper\Exception\ThrowingCasterException' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castThrowingCasterException'], + 'Symfony\Component\VarDumper\Caster\TraceStub' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castTraceStub'], + 'Symfony\Component\VarDumper\Caster\FrameStub' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castFrameStub'], + 'Symfony\Component\Debug\Exception\SilencedErrorContext' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castSilencedErrorContext'], - 'PHPUnit_Framework_MockObject_MockObject' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'), - 'Prophecy\Prophecy\ProphecySubjectInterface' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'), - 'Mockery\MockInterface' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'), + 'PHPUnit_Framework_MockObject_MockObject' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], + 'Prophecy\Prophecy\ProphecySubjectInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], + 'Mockery\MockInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'PDO' => array('Symfony\Component\VarDumper\Caster\PdoCaster', 'castPdo'), - 'PDOStatement' => array('Symfony\Component\VarDumper\Caster\PdoCaster', 'castPdoStatement'), + 'PDO' => ['Symfony\Component\VarDumper\Caster\PdoCaster', 'castPdo'], + 'PDOStatement' => ['Symfony\Component\VarDumper\Caster\PdoCaster', 'castPdoStatement'], - 'AMQPConnection' => array('Symfony\Component\VarDumper\Caster\AmqpCaster', 'castConnection'), - 'AMQPChannel' => array('Symfony\Component\VarDumper\Caster\AmqpCaster', 'castChannel'), - 'AMQPQueue' => array('Symfony\Component\VarDumper\Caster\AmqpCaster', 'castQueue'), - 'AMQPExchange' => array('Symfony\Component\VarDumper\Caster\AmqpCaster', 'castExchange'), - 'AMQPEnvelope' => array('Symfony\Component\VarDumper\Caster\AmqpCaster', 'castEnvelope'), + 'AMQPConnection' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castConnection'], + 'AMQPChannel' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castChannel'], + 'AMQPQueue' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castQueue'], + 'AMQPExchange' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castExchange'], + 'AMQPEnvelope' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castEnvelope'], - 'ArrayObject' => array('Symfony\Component\VarDumper\Caster\SplCaster', 'castArrayObject'), - 'ArrayIterator' => array('Symfony\Component\VarDumper\Caster\SplCaster', 'castArrayIterator'), - 'SplDoublyLinkedList' => array('Symfony\Component\VarDumper\Caster\SplCaster', 'castDoublyLinkedList'), - 'SplFileInfo' => array('Symfony\Component\VarDumper\Caster\SplCaster', 'castFileInfo'), - 'SplFileObject' => array('Symfony\Component\VarDumper\Caster\SplCaster', 'castFileObject'), - 'SplFixedArray' => array('Symfony\Component\VarDumper\Caster\SplCaster', 'castFixedArray'), - 'SplHeap' => array('Symfony\Component\VarDumper\Caster\SplCaster', 'castHeap'), - 'SplObjectStorage' => array('Symfony\Component\VarDumper\Caster\SplCaster', 'castObjectStorage'), - 'SplPriorityQueue' => array('Symfony\Component\VarDumper\Caster\SplCaster', 'castHeap'), - 'OuterIterator' => array('Symfony\Component\VarDumper\Caster\SplCaster', 'castOuterIterator'), + 'ArrayObject' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castArrayObject'], + 'ArrayIterator' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castArrayIterator'], + 'SplDoublyLinkedList' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castDoublyLinkedList'], + 'SplFileInfo' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castFileInfo'], + 'SplFileObject' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castFileObject'], + 'SplFixedArray' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castFixedArray'], + 'SplHeap' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castHeap'], + 'SplObjectStorage' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castObjectStorage'], + 'SplPriorityQueue' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castHeap'], + 'OuterIterator' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castOuterIterator'], - 'MongoCursorInterface' => array('Symfony\Component\VarDumper\Caster\MongoCaster', 'castCursor'), + 'MongoCursorInterface' => ['Symfony\Component\VarDumper\Caster\MongoCaster', 'castCursor'], - 'Redis' => array('Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedis'), - 'RedisArray' => array('Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedisArray'), + 'Redis' => ['Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedis'], + 'RedisArray' => ['Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedisArray'], - 'DateTimeInterface' => array('Symfony\Component\VarDumper\Caster\DateCaster', 'castDateTime'), - 'DateInterval' => array('Symfony\Component\VarDumper\Caster\DateCaster', 'castInterval'), - 'DateTimeZone' => array('Symfony\Component\VarDumper\Caster\DateCaster', 'castTimeZone'), - 'DatePeriod' => array('Symfony\Component\VarDumper\Caster\DateCaster', 'castPeriod'), + 'DateTimeInterface' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castDateTime'], + 'DateInterval' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castInterval'], + 'DateTimeZone' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castTimeZone'], + 'DatePeriod' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castPeriod'], - ':curl' => array('Symfony\Component\VarDumper\Caster\ResourceCaster', 'castCurl'), - ':dba' => array('Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'), - ':dba persistent' => array('Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'), - ':gd' => array('Symfony\Component\VarDumper\Caster\ResourceCaster', 'castGd'), - ':mysql link' => array('Symfony\Component\VarDumper\Caster\ResourceCaster', 'castMysqlLink'), - ':pgsql large object' => array('Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLargeObject'), - ':pgsql link' => array('Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLink'), - ':pgsql link persistent' => array('Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLink'), - ':pgsql result' => array('Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castResult'), - ':process' => array('Symfony\Component\VarDumper\Caster\ResourceCaster', 'castProcess'), - ':stream' => array('Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStream'), - ':persistent stream' => array('Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStream'), - ':stream-context' => array('Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStreamContext'), - ':xml' => array('Symfony\Component\VarDumper\Caster\XmlResourceCaster', 'castXml'), - ); + ':curl' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castCurl'], + ':dba' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'], + ':dba persistent' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'], + ':gd' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castGd'], + ':mysql link' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castMysqlLink'], + ':pgsql large object' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLargeObject'], + ':pgsql link' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLink'], + ':pgsql link persistent' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLink'], + ':pgsql result' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castResult'], + ':process' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castProcess'], + ':stream' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStream'], + ':persistent stream' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStream'], + ':stream-context' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStreamContext'], + ':xml' => ['Symfony\Component\VarDumper\Caster\XmlResourceCaster', 'castXml'], + ]; protected $maxItems = 2500; protected $maxString = -1; protected $minDepth = 1; protected $useExt; - private $casters = array(); + private $casters = []; private $prevErrorHandler; - private $classInfo = array(); + private $classInfo = []; private $filter = 0; /** @@ -213,7 +213,7 @@ abstract class AbstractCloner implements ClonerInterface */ public function cloneVar($var, $filter = 0) { - $this->prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = array()) { + $this->prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) { if (E_RECOVERABLE_ERROR === $type || E_USER_ERROR === $type) { // Cloner never dies throw new \ErrorException($msg, 0, $type, $file, $line); @@ -270,7 +270,7 @@ abstract class AbstractCloner implements ClonerInterface list($i, $parents, $hasDebugInfo) = $this->classInfo[$class]; } else { $i = 2; - $parents = array(strtolower($class)); + $parents = [strtolower($class)]; $hasDebugInfo = method_exists($class, '__debugInfo'); foreach (class_parents($class) as $p) { @@ -283,7 +283,7 @@ abstract class AbstractCloner implements ClonerInterface } $parents[] = '*'; - $this->classInfo[$class] = array($i, $parents, $hasDebugInfo); + $this->classInfo[$class] = [$i, $parents, $hasDebugInfo]; } $a = Caster::castObject($obj, $class, $hasDebugInfo); @@ -297,7 +297,7 @@ abstract class AbstractCloner implements ClonerInterface } } } catch (\Exception $e) { - $a = array((Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)) + $a; + $a = [(Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)] + $a; } return $a; @@ -313,7 +313,7 @@ abstract class AbstractCloner implements ClonerInterface */ protected function castResource(Stub $stub, $isNested) { - $a = array(); + $a = []; $res = $stub->value; $type = $stub->class; @@ -324,7 +324,7 @@ abstract class AbstractCloner implements ClonerInterface } } } catch (\Exception $e) { - $a = array((Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)) + $a; + $a = [(Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)] + $a; } return $a; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Cursor.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Cursor.php index 888f4f2b..5b0542f6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Cursor.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Cursor.php @@ -38,6 +38,6 @@ class Cursor public $hashLength = 0; public $hashCut = 0; public $stop = false; - public $attr = array(); + public $attr = []; public $skipChildren = false; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Data.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Data.php index 8e4700d8..bb5ee94d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Data.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Data.php @@ -79,7 +79,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate return $item->value; } - $children = $item->position ? $this->data[$item->position] : array(); + $children = $item->position ? $this->data[$item->position] : []; foreach ($children as $k => $v) { if ($recursive && !($v = $this->getStub($v)) instanceof Stub) { @@ -125,7 +125,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate if (null !== $data = $this->seek($key)) { $item = $this->getStub($data->data[$data->position][$data->key]); - return $item instanceof Stub || array() === $item ? $data : $item; + return $item instanceof Stub || [] === $item ? $data : $item; } } @@ -239,7 +239,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate if (!($item = $this->getStub($item)) instanceof Stub || !$item->position) { return; } - $keys = array($key); + $keys = [$key]; switch ($item->type) { case Stub::TYPE_OBJECT: @@ -259,7 +259,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate $children = $this->data[$item->position]; foreach ($keys as $key) { - if (isset($children[$key]) || array_key_exists($key, $children)) { + if (isset($children[$key]) || \array_key_exists($key, $children)) { $data = clone $this; $data->key = $key; $data->position = $item->position; @@ -275,7 +275,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate */ public function dump(DumperInterface $dumper) { - $refs = array(0); + $refs = [0]; $this->dumpItem($dumper, new Cursor(), $refs, $this->data[$this->position][$this->key]); } @@ -295,7 +295,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate $firstSeen = true; if (!$item instanceof Stub) { - $cursor->attr = array(); + $cursor->attr = []; $type = \gettype($item); if ($item && 'array' === $type) { $item = $this->getStub($item); @@ -336,10 +336,10 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate if ($cut >= 0) { $cut += \count($children); } - $children = array(); + $children = []; } } else { - $children = array(); + $children = []; } switch ($item->type) { case Stub::TYPE_STRING: diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Stub.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Stub.php index 3b8e60d9..27dd3ef3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Stub.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Stub.php @@ -16,7 +16,7 @@ namespace Symfony\Component\VarDumper\Cloner; * * @author Nicolas Grekas */ -class Stub implements \Serializable +class Stub { const TYPE_REF = 1; const TYPE_STRING = 2; @@ -37,21 +37,31 @@ class Stub implements \Serializable public $handle = 0; public $refCount = 0; public $position = 0; - public $attr = array(); + public $attr = []; + + private static $defaultProperties = []; /** * @internal */ - public function serialize() + public function __sleep() { - return \serialize(array($this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr)); - } + $properties = []; - /** - * @internal - */ - public function unserialize($serialized) - { - list($this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr) = \unserialize($serialized); + if (!isset(self::$defaultProperties[$c = \get_class($this)])) { + self::$defaultProperties[$c] = get_class_vars($c); + + foreach ((new \ReflectionClass($c))->getStaticProperties() as $k => $v) { + unset(self::$defaultProperties[$c][$k]); + } + } + + foreach (self::$defaultProperties[$c] as $k => $v) { + if ($this->$k !== $v) { + $properties[] = $k; + } + } + + return $properties; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/VarCloner.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/VarCloner.php index 7a3816cf..f418aa08 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/VarCloner.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/VarCloner.php @@ -19,7 +19,7 @@ class VarCloner extends AbstractCloner private static $gid; private static $hashMask = 0; private static $hashOffset = 0; - private static $arrayCache = array(); + private static $arrayCache = []; /** * {@inheritdoc} @@ -29,19 +29,20 @@ class VarCloner extends AbstractCloner $len = 1; // Length of $queue $pos = 0; // Number of cloned items past the minimum depth $refsCounter = 0; // Hard references counter - $queue = array(array($var)); // This breadth-first queue is the return value - $indexedArrays = array(); // Map of queue indexes that hold numerically indexed arrays - $hardRefs = array(); // Map of original zval hashes to stub objects - $objRefs = array(); // Map of original object handles to their stub object couterpart - $resRefs = array(); // Map of original resource handles to their stub object couterpart - $values = array(); // Map of stub objects' hashes to original values + $queue = [[$var]]; // This breadth-first queue is the return value + $indexedArrays = []; // Map of queue indexes that hold numerically indexed arrays + $hardRefs = []; // Map of original zval hashes to stub objects + $objRefs = []; // Map of original object handles to their stub object counterpart + $objects = []; // Keep a ref to objects to ensure their handle cannot be reused while cloning + $resRefs = []; // Map of original resource handles to their stub object counterpart + $values = []; // Map of stub objects' hashes to original values $maxItems = $this->maxItems; $maxString = $this->maxString; $minDepth = $this->minDepth; $currentDepth = 0; // Current tree depth $currentDepthFinalIndex = 0; // Final $queue index for current tree depth $minimumDepthReached = 0 === $minDepth; // Becomes true when minimum tree depth has been reached - $cookie = (object) array(); // Unique object used to detect hard references + $cookie = (object) []; // Unique object used to detect hard references $a = null; // Array cast for nested structures $stub = null; // Stub capturing the main properties of an original item value // or null if the original value is used directly @@ -74,7 +75,7 @@ class VarCloner extends AbstractCloner if (\is_int($k)) { continue; } - foreach (array($k => true) as $gk => $gv) { + foreach ([$k => true] as $gk => $gv) { } if ($gk !== $k) { $fromObjCast = true; @@ -163,7 +164,7 @@ class VarCloner extends AbstractCloner // Happens with copies of $GLOBALS if (isset($v[$gid])) { unset($v[$gid]); - $a = array(); + $a = []; foreach ($v as $gk => &$gv) { $a[$gk] = &$gv; } @@ -200,6 +201,7 @@ class VarCloner extends AbstractCloner } if (empty($objRefs[$h])) { $objRefs[$h] = $stub; + $objects[] = $v; } else { $stub = $objRefs[$h]; ++$stub->refCount; @@ -254,12 +256,12 @@ class VarCloner extends AbstractCloner if ($arrayStub === $stub) { if ($arrayStub->cut) { - $stub = array($arrayStub->cut, $arrayStub->class => $arrayStub->position); + $stub = [$arrayStub->cut, $arrayStub->class => $arrayStub->position]; $arrayStub->cut = 0; } elseif (isset(self::$arrayCache[$arrayStub->class][$arrayStub->position])) { $stub = self::$arrayCache[$arrayStub->class][$arrayStub->position]; } else { - self::$arrayCache[$arrayStub->class][$arrayStub->position] = $stub = array($arrayStub->class => $arrayStub->position); + self::$arrayCache[$arrayStub->class][$arrayStub->position] = $stub = [$arrayStub->class => $arrayStub->position]; } } @@ -273,10 +275,10 @@ class VarCloner extends AbstractCloner if ($fromObjCast) { $fromObjCast = false; $refs = $vals; - $vals = array(); + $vals = []; $j = -1; foreach ($queue[$i] as $k => $v) { - foreach (array($k => true) as $gk => $gv) { + foreach ([$k => true] as $gk => $gv) { } if ($gk !== $k) { $vals = (object) $vals; @@ -300,7 +302,7 @@ class VarCloner extends AbstractCloner private static function initHashMask() { - $obj = (object) array(); + $obj = (object) []; self::$hashOffset = 16 - PHP_INT_SIZE; self::$hashMask = -1; @@ -308,7 +310,7 @@ class VarCloner extends AbstractCloner self::$hashOffset += 16; } else { // check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below - $obFuncs = array('ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush'); + $obFuncs = ['ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush']; foreach (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) as $frame) { if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && \in_array($frame['function'], $obFuncs)) { $frame['line'] = 0; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php index 228f8f2e..30cd1a1b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php @@ -39,7 +39,7 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface /** * @param callable|resource|string|null $output A line dumper callable, an opened stream or an output path, defaults to static::$defaultOutput - * @param string $charset The default character encoding to use for non-UTF8 strings + * @param string|null $charset The default character encoding to use for non-UTF8 strings * @param int $flags A bit field of static::DUMP_* constants to fine tune dumps representation */ public function __construct($output = null, $charset = null, $flags = 0) @@ -73,7 +73,7 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface $output = fopen($output, 'wb'); } $this->outputStream = $output; - $this->lineDumper = array($this, 'echoLine'); + $this->lineDumper = [$this, 'echoLine']; } return $prev; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/CliDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/CliDumper.php index 419cfeb4..2bd347d9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/CliDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/CliDumper.php @@ -26,7 +26,7 @@ class CliDumper extends AbstractDumper protected $colors; protected $maxStringWidth = 0; - protected $styles = array( + protected $styles = [ // See http://en.wikipedia.org/wiki/ANSI_escape_code#graphics 'default' => '38;5;208', 'num' => '1;38;5;38', @@ -40,17 +40,17 @@ class CliDumper extends AbstractDumper 'meta' => '38;5;170', 'key' => '38;5;113', 'index' => '38;5;38', - ); + ]; protected static $controlCharsRx = '/[\x00-\x1F\x7F]+/'; - protected static $controlCharsMap = array( + protected static $controlCharsMap = [ "\t" => '\t', "\n" => '\n', "\v" => '\v', "\f" => '\f', "\r" => '\r', "\033" => '\e', - ); + ]; protected $collapseNextHash = false; protected $expandNextHash = false; @@ -64,7 +64,7 @@ class CliDumper extends AbstractDumper if ('\\' === \DIRECTORY_SEPARATOR && !$this->isWindowsTrueColor()) { // Use only the base 16 xterm colors when using ANSICON or standard Windows 10 CLI - $this->setStyles(array( + $this->setStyles([ 'default' => '31', 'num' => '1;34', 'const' => '1;31', @@ -74,7 +74,7 @@ class CliDumper extends AbstractDumper 'meta' => '35', 'key' => '32', 'index' => '34', - )); + ]); } } @@ -152,7 +152,7 @@ class CliDumper extends AbstractDumper break; default: - $attr += array('value' => $this->utf8Encode($value)); + $attr += ['value' => $this->utf8Encode($value)]; $value = $this->utf8Encode($type); break; } @@ -177,10 +177,10 @@ class CliDumper extends AbstractDumper $this->line .= '""'; $this->endValue($cursor); } else { - $attr += array( + $attr += [ 'length' => 0 <= $cut ? mb_strlen($str, 'UTF-8') + $cut : 0, 'binary' => $bin, - ); + ]; $str = explode("\n", $str); if (isset($str[1]) && !isset($str[2]) && !isset($str[1][0])) { unset($str[1]); @@ -272,9 +272,9 @@ class CliDumper extends AbstractDumper } if ($cursor->softRefCount || 0 < $cursor->softRefHandle) { - $prefix .= $this->style('ref', (Cursor::HASH_RESOURCE === $type ? '@' : '#').(0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->softRefTo), array('count' => $cursor->softRefCount)); + $prefix .= $this->style('ref', (Cursor::HASH_RESOURCE === $type ? '@' : '#').(0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->softRefTo), ['count' => $cursor->softRefCount]); } elseif ($cursor->hardRefTo && !$cursor->refIndex && $class) { - $prefix .= $this->style('ref', '&'.$cursor->hardRefTo, array('count' => $cursor->hardRefCount)); + $prefix .= $this->style('ref', '&'.$cursor->hardRefTo, ['count' => $cursor->hardRefCount]); } elseif (!$hasChild && Cursor::HASH_RESOURCE === $type) { $prefix = substr($prefix, 0, -1); } @@ -327,7 +327,7 @@ class CliDumper extends AbstractDumper if ($cursor->hashKeyIsBinary) { $key = $this->utf8Encode($key); } - $attr = array('binary' => $cursor->hashKeyIsBinary); + $attr = ['binary' => $cursor->hashKeyIsBinary]; $bin = $cursor->hashKeyIsBinary ? 'b' : ''; $style = 'key'; switch ($cursor->hashType) { @@ -364,7 +364,7 @@ class CliDumper extends AbstractDumper $style = 'meta'; if (isset($key[0][1])) { parse_str(substr($key[0], 1), $attr); - $attr += array('binary' => $cursor->hashKeyIsBinary); + $attr += ['binary' => $cursor->hashKeyIsBinary]; } break; case '*': @@ -389,13 +389,13 @@ class CliDumper extends AbstractDumper $this->line .= $bin.$this->style($style, $key[1], $attr).(isset($attr['separator']) ? $attr['separator'] : ': '); } else { // This case should not happen - $this->line .= '-'.$bin.'"'.$this->style('private', $key, array('class' => '')).'": '; + $this->line .= '-'.$bin.'"'.$this->style('private', $key, ['class' => '']).'": '; } break; } if ($cursor->hardRefTo) { - $this->line .= $this->style('ref', '&'.($cursor->hardRefCount ? $cursor->hardRefTo : ''), array('count' => $cursor->hardRefCount)).' '; + $this->line .= $this->style('ref', '&'.($cursor->hardRefCount ? $cursor->hardRefTo : ''), ['count' => $cursor->hardRefCount]).' '; } } } @@ -409,7 +409,7 @@ class CliDumper extends AbstractDumper * * @return string The value with style decoration */ - protected function style($style, $value, $attr = array()) + protected function style($style, $value, $attr = []) { if (null === $this->colors) { $this->colors = $this->supportsColors(); @@ -495,7 +495,7 @@ class CliDumper extends AbstractDumper } } - $h = stream_get_meta_data($this->outputStream) + array('wrapper_type' => null); + $h = stream_get_meta_data($this->outputStream) + ['wrapper_type' => null]; $h = 'Output' === $h['stream_type'] && 'PHP' === $h['wrapper_type'] ? fopen('php://stdout', 'wb') : $this->outputStream; return static::$defaultColors = $this->hasColorSupport($h); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php index d498e12f..2e617c7c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php @@ -30,7 +30,7 @@ class HtmlDumper extends CliDumper protected $colors = true; protected $headerIsDumped = false; protected $lastDepth = -1; - protected $styles = array( + protected $styles = [ 'default' => 'background-color:#18171B; color:#FF8400; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', 'num' => 'font-weight:bold; color:#1299DA', 'const' => 'font-weight:bold', @@ -44,14 +44,14 @@ class HtmlDumper extends CliDumper 'key' => 'color:#56DB3A', 'index' => 'color:#1299DA', 'ellipsis' => 'color:#FF8400', - ); + ]; - private $displayOptions = array( + private $displayOptions = [ 'maxDepth' => 1, 'maxStringLength' => 160, 'fileLinkFormat' => null, - ); - private $extraDisplayOptions = array(); + ]; + private $extraDisplayOptions = []; /** * {@inheritdoc} @@ -108,7 +108,7 @@ class HtmlDumper extends CliDumper /** * {@inheritdoc} */ - public function dump(Data $data, $output = null, array $extraDisplayOptions = array()) + public function dump(Data $data, $output = null, array $extraDisplayOptions = []) { $this->extraDisplayOptions = $extraDisplayOptions; $result = parent::dump($data, $output); @@ -785,7 +785,7 @@ EOHTML /** * {@inheritdoc} */ - protected function style($style, $value, $attr = array()) + protected function style($style, $value, $attr = []) { if ('' === $value) { return ''; @@ -873,7 +873,7 @@ EOHTML } if (-1 === $depth) { - $args = array('"'.$this->dumpId.'"'); + $args = ['"'.$this->dumpId.'"']; if ($this->extraDisplayOptions) { $args[] = json_encode($this->extraDisplayOptions, JSON_FORCE_OBJECT); } @@ -895,7 +895,7 @@ EOHTML $options = $this->extraDisplayOptions + $this->displayOptions; if ($fmt = $options['fileLinkFormat']) { - return \is_string($fmt) ? strtr($fmt, array('%f' => $file, '%l' => $line)) : $fmt->format($file, $line); + return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : $fmt->format($file, $line); } return false; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/LICENSE index 15fc1c88..cf8b3ebe 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014-2018 Fabien Potencier +Copyright (c) 2014-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php index 105d5638..728697b4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php @@ -22,7 +22,7 @@ class CasterTest extends TestCase { use VarDumperTestTrait; - private $referenceArray = array( + private $referenceArray = [ 'null' => null, 'empty' => false, 'public' => 'pub', @@ -30,7 +30,7 @@ class CasterTest extends TestCase "\0+\0dynamic" => 'dyn', "\0*\0protected" => 'prot', "\0Foo\0private" => 'priv', - ); + ]; /** * @dataProvider provideFilter @@ -48,107 +48,107 @@ class CasterTest extends TestCase public function provideFilter() { - return array( - array( + return [ + [ 0, - array(), - ), - array( + [], + ], + [ Caster::EXCLUDE_PUBLIC, - array( + [ 'null' => null, 'empty' => false, 'public' => 'pub', - ), - ), - array( + ], + ], + [ Caster::EXCLUDE_NULL, - array( + [ 'null' => null, - ), - ), - array( + ], + ], + [ Caster::EXCLUDE_EMPTY, - array( + [ 'null' => null, 'empty' => false, - ), - ), - array( + ], + ], + [ Caster::EXCLUDE_VIRTUAL, - array( + [ "\0~\0virtual" => 'virt', - ), - ), - array( + ], + ], + [ Caster::EXCLUDE_DYNAMIC, - array( + [ "\0+\0dynamic" => 'dyn', - ), - ), - array( + ], + ], + [ Caster::EXCLUDE_PROTECTED, - array( + [ "\0*\0protected" => 'prot', - ), - ), - array( + ], + ], + [ Caster::EXCLUDE_PRIVATE, - array( + [ "\0Foo\0private" => 'priv', - ), - ), - array( + ], + ], + [ Caster::EXCLUDE_VERBOSE, - array( + [ 'public' => 'pub', "\0*\0protected" => 'prot', - ), - array('public', "\0*\0protected"), - ), - array( + ], + ['public', "\0*\0protected"], + ], + [ Caster::EXCLUDE_NOT_IMPORTANT, - array( + [ 'null' => null, 'empty' => false, "\0~\0virtual" => 'virt', "\0+\0dynamic" => 'dyn', "\0Foo\0private" => 'priv', - ), - array('public', "\0*\0protected"), - ), - array( + ], + ['public', "\0*\0protected"], + ], + [ Caster::EXCLUDE_VIRTUAL | Caster::EXCLUDE_DYNAMIC, - array( + [ "\0~\0virtual" => 'virt', "\0+\0dynamic" => 'dyn', - ), - ), - array( + ], + ], + [ Caster::EXCLUDE_NOT_IMPORTANT | Caster::EXCLUDE_VERBOSE, $this->referenceArray, - array('public', "\0*\0protected"), - ), - array( + ['public', "\0*\0protected"], + ], + [ Caster::EXCLUDE_NOT_IMPORTANT | Caster::EXCLUDE_EMPTY, - array( + [ 'null' => null, 'empty' => false, "\0~\0virtual" => 'virt', "\0+\0dynamic" => 'dyn', "\0*\0protected" => 'prot', "\0Foo\0private" => 'priv', - ), - array('public', 'empty'), - ), - array( + ], + ['public', 'empty'], + ], + [ Caster::EXCLUDE_VERBOSE | Caster::EXCLUDE_EMPTY | Caster::EXCLUDE_STRICT, - array( + [ 'empty' => false, - ), - array('public', 'empty'), - ), - ); + ], + ['public', 'empty'], + ], + ]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php index dafa16cd..da8b4d0f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php @@ -55,7 +55,7 @@ EODUMP; $stub = new Stub(); $date = new \DateTime($time, new \DateTimeZone($timezone)); - $cast = DateCaster::castDateTime($date, array('foo' => 'bar'), $stub, false, 0); + $cast = DateCaster::castDateTime($date, ['foo' => 'bar'], $stub, false, 0); $xDump = <<createInterval($intervalSpec, $ms, $invert); $stub = new Stub(); - $cast = DateCaster::castInterval($interval, array('foo' => 'bar'), $stub, false, Caster::EXCLUDE_VERBOSE); + $cast = DateCaster::castInterval($interval, ['foo' => 'bar'], $stub, false, Caster::EXCLUDE_VERBOSE); $xDump = <<= 70100 && isset($i->f)) ? '.0' : ''; - return array( - array('PT0S', 0, 0, '0s', '0s'), - array('PT0S', 0.1, 0, $withMs ? '+ 00:00:00.100' : '0s', '%is'), - array('PT1S', 0, 0, '+ 00:00:01'.$ms, '%is'), - array('PT2M', 0, 0, '+ 00:02:00'.$ms, '%is'), - array('PT3H', 0, 0, '+ 03:00:00'.$ms, '%ss'), - array('P4D', 0, 0, '+ 4d', '%ss'), - array('P5M', 0, 0, '+ 5m', null), - array('P6Y', 0, 0, '+ 6y', null), - array('P1Y2M3DT4H5M6S', 0, 0, '+ 1y 2m 3d 04:05:06'.$ms, null), - array('PT1M60S', 0, 0, '+ 00:02:00'.$ms, null), - array('PT1H60M', 0, 0, '+ 02:00:00'.$ms, null), - array('P1DT24H', 0, 0, '+ 2d', null), - array('P1M32D', 0, 0, '+ 1m 32d', null), + return [ + ['PT0S', 0, 0, '0s', '0s'], + ['PT0S', 0.1, 0, $withMs ? '+ 00:00:00.100' : '0s', '%is'], + ['PT1S', 0, 0, '+ 00:00:01'.$ms, '%is'], + ['PT2M', 0, 0, '+ 00:02:00'.$ms, '%is'], + ['PT3H', 0, 0, '+ 03:00:00'.$ms, '%ss'], + ['P4D', 0, 0, '+ 4d', '%ss'], + ['P5M', 0, 0, '+ 5m', null], + ['P6Y', 0, 0, '+ 6y', null], + ['P1Y2M3DT4H5M6S', 0, 0, '+ 1y 2m 3d 04:05:06'.$ms, null], + ['PT1M60S', 0, 0, '+ 00:02:00'.$ms, null], + ['PT1H60M', 0, 0, '+ 02:00:00'.$ms, null], + ['P1DT24H', 0, 0, '+ 2d', null], + ['P1M32D', 0, 0, '+ 1m 32d', null], - array('PT0S', 0, 1, '0s', '0s'), - array('PT0S', 0.1, 1, $withMs ? '- 00:00:00.100' : '0s', '%is'), - array('PT1S', 0, 1, '- 00:00:01'.$ms, '%is'), - array('PT2M', 0, 1, '- 00:02:00'.$ms, '%is'), - array('PT3H', 0, 1, '- 03:00:00'.$ms, '%ss'), - array('P4D', 0, 1, '- 4d', '%ss'), - array('P5M', 0, 1, '- 5m', null), - array('P6Y', 0, 1, '- 6y', null), - array('P1Y2M3DT4H5M6S', 0, 1, '- 1y 2m 3d 04:05:06'.$ms, null), - array('PT1M60S', 0, 1, '- 00:02:00'.$ms, null), - array('PT1H60M', 0, 1, '- 02:00:00'.$ms, null), - array('P1DT24H', 0, 1, '- 2d', null), - array('P1M32D', 0, 1, '- 1m 32d', null), - ); + ['PT0S', 0, 1, '0s', '0s'], + ['PT0S', 0.1, 1, $withMs ? '- 00:00:00.100' : '0s', '%is'], + ['PT1S', 0, 1, '- 00:00:01'.$ms, '%is'], + ['PT2M', 0, 1, '- 00:02:00'.$ms, '%is'], + ['PT3H', 0, 1, '- 03:00:00'.$ms, '%ss'], + ['P4D', 0, 1, '- 4d', '%ss'], + ['P5M', 0, 1, '- 5m', null], + ['P6Y', 0, 1, '- 6y', null], + ['P1Y2M3DT4H5M6S', 0, 1, '- 1y 2m 3d 04:05:06'.$ms, null], + ['PT1M60S', 0, 1, '- 00:02:00'.$ms, null], + ['PT1H60M', 0, 1, '- 02:00:00'.$ms, null], + ['P1DT24H', 0, 1, '- 2d', null], + ['P1M32D', 0, 1, '- 1m 32d', null], + ]; } /** @@ -267,7 +267,7 @@ EODUMP; $timezone = new \DateTimeZone($timezone); $stub = new Stub(); - $cast = DateCaster::castTimeZone($timezone, array('foo' => 'bar'), $stub, false, Caster::EXCLUDE_VERBOSE); + $cast = DateCaster::castTimeZone($timezone, ['foo' => 'bar'], $stub, false, Caster::EXCLUDE_VERBOSE); $xDump = <<= 70100 && isset($i->f) ? '.0' : ''; - $periods = array( - array('2017-01-01', 'P1D', '2017-01-03', 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) to 2017-01-03 00:00:00.0', '1) 2017-01-01%a2) 2017-01-02'), - array('2017-01-01', 'P1D', 1, 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) recurring 2 time/s', '1) 2017-01-01%a2) 2017-01-02'), + $periods = [ + ['2017-01-01', 'P1D', '2017-01-03', 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) to 2017-01-03 00:00:00.0', '1) 2017-01-01%a2) 2017-01-02'], + ['2017-01-01', 'P1D', 1, 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) recurring 2 time/s', '1) 2017-01-01%a2) 2017-01-02'], - array('2017-01-01', 'P1D', '2017-01-04', 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) to 2017-01-04 00:00:00.0', '1) 2017-01-01%a2) 2017-01-02%a3) 2017-01-03'), - array('2017-01-01', 'P1D', 2, 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) recurring 3 time/s', '1) 2017-01-01%a2) 2017-01-02%a3) 2017-01-03'), + ['2017-01-01', 'P1D', '2017-01-04', 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) to 2017-01-04 00:00:00.0', '1) 2017-01-01%a2) 2017-01-02%a3) 2017-01-03'], + ['2017-01-01', 'P1D', 2, 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) recurring 3 time/s', '1) 2017-01-01%a2) 2017-01-02%a3) 2017-01-03'], - array('2017-01-01', 'P1D', '2017-01-05', 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) to 2017-01-05 00:00:00.0', '1) 2017-01-01%a2) 2017-01-02%a1 more'), - array('2017-01-01', 'P1D', 3, 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) recurring 4 time/s', '1) 2017-01-01%a2) 2017-01-02%a3) 2017-01-03%a1 more'), + ['2017-01-01', 'P1D', '2017-01-05', 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) to 2017-01-05 00:00:00.0', '1) 2017-01-01%a2) 2017-01-02%a1 more'], + ['2017-01-01', 'P1D', 3, 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) recurring 4 time/s', '1) 2017-01-01%a2) 2017-01-02%a3) 2017-01-03%a1 more'], - array('2017-01-01', 'P1D', '2017-01-21', 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) to 2017-01-21 00:00:00.0', '1) 2017-01-01%a17 more'), - array('2017-01-01', 'P1D', 19, 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) recurring 20 time/s', '1) 2017-01-01%a17 more'), + ['2017-01-01', 'P1D', '2017-01-21', 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) to 2017-01-21 00:00:00.0', '1) 2017-01-01%a17 more'], + ['2017-01-01', 'P1D', 19, 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) recurring 20 time/s', '1) 2017-01-01%a17 more'], - array('2017-01-01 01:00:00', 'P1D', '2017-01-03 01:00:00', 0, 'every + 1d, from 2017-01-01 01:00:00.0 (included) to 2017-01-03 01:00:00.0', '1) 2017-01-01 01:00:00.0%a2) 2017-01-02 01:00:00.0'), - array('2017-01-01 01:00:00', 'P1D', 1, 0, 'every + 1d, from 2017-01-01 01:00:00.0 (included) recurring 2 time/s', '1) 2017-01-01 01:00:00.0%a2) 2017-01-02 01:00:00.0'), + ['2017-01-01 01:00:00', 'P1D', '2017-01-03 01:00:00', 0, 'every + 1d, from 2017-01-01 01:00:00.0 (included) to 2017-01-03 01:00:00.0', '1) 2017-01-01 01:00:00.0%a2) 2017-01-02 01:00:00.0'], + ['2017-01-01 01:00:00', 'P1D', 1, 0, 'every + 1d, from 2017-01-01 01:00:00.0 (included) recurring 2 time/s', '1) 2017-01-01 01:00:00.0%a2) 2017-01-02 01:00:00.0'], - array('2017-01-01', 'P1DT1H', '2017-01-03', 0, "every + 1d 01:00:00$ms, from 2017-01-01 00:00:00.0 (included) to 2017-01-03 00:00:00.0", '1) 2017-01-01 00:00:00.0%a2) 2017-01-02 01:00:00.0'), - array('2017-01-01', 'P1DT1H', 1, 0, "every + 1d 01:00:00$ms, from 2017-01-01 00:00:00.0 (included) recurring 2 time/s", '1) 2017-01-01 00:00:00.0%a2) 2017-01-02 01:00:00.0'), + ['2017-01-01', 'P1DT1H', '2017-01-03', 0, "every + 1d 01:00:00$ms, from 2017-01-01 00:00:00.0 (included) to 2017-01-03 00:00:00.0", '1) 2017-01-01 00:00:00.0%a2) 2017-01-02 01:00:00.0'], + ['2017-01-01', 'P1DT1H', 1, 0, "every + 1d 01:00:00$ms, from 2017-01-01 00:00:00.0 (included) recurring 2 time/s", '1) 2017-01-01 00:00:00.0%a2) 2017-01-02 01:00:00.0'], - array('2017-01-01', 'P1D', '2017-01-04', \DatePeriod::EXCLUDE_START_DATE, 'every + 1d, from 2017-01-01 00:00:00.0 (excluded) to 2017-01-04 00:00:00.0', '1) 2017-01-02%a2) 2017-01-03'), - array('2017-01-01', 'P1D', 2, \DatePeriod::EXCLUDE_START_DATE, 'every + 1d, from 2017-01-01 00:00:00.0 (excluded) recurring 2 time/s', '1) 2017-01-02%a2) 2017-01-03'), - ); + ['2017-01-01', 'P1D', '2017-01-04', \DatePeriod::EXCLUDE_START_DATE, 'every + 1d, from 2017-01-01 00:00:00.0 (excluded) to 2017-01-04 00:00:00.0', '1) 2017-01-02%a2) 2017-01-03'], + ['2017-01-01', 'P1D', 2, \DatePeriod::EXCLUDE_START_DATE, 'every + 1d, from 2017-01-01 00:00:00.0 (excluded) recurring 2 time/s', '1) 2017-01-02%a2) 2017-01-03'], + ]; if (\PHP_VERSION_ID < 70107) { array_walk($periods, function (&$i) { $i[5] = ''; }); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php index 4f9b538a..ea83e771 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php @@ -36,7 +36,7 @@ class ExceptionCasterTest extends TestCase public function testDefaultSettings() { - $ref = array('foo'); + $ref = ['foo']; $e = $this->getTestException('foo', $ref); $expectedDump = <<<'EODUMP' @@ -57,7 +57,7 @@ Exception { EODUMP; $this->assertDumpMatchesFormat($expectedDump, $e); - $this->assertSame(array('foo'), $ref); + $this->assertSame(['foo'], $ref); } public function testSeek() @@ -166,19 +166,19 @@ EODUMP; { require_once \dirname(__DIR__).'/Fixtures/Twig.php'; - $f = array( - new FrameStub(array( + $f = [ + new FrameStub([ 'file' => \dirname(__DIR__).'/Fixtures/Twig.php', 'line' => 20, 'class' => '__TwigTemplate_VarDumperFixture_u75a09', - )), - new FrameStub(array( + ]), + new FrameStub([ 'file' => \dirname(__DIR__).'/Fixtures/Twig.php', 'line' => 21, 'class' => '__TwigTemplate_VarDumperFixture_u75a09', 'object' => new \__TwigTemplate_VarDumperFixture_u75a09(null, __FILE__), - )), - ); + ]), + ]; $expectedDump = <<<'EODUMP' array:2 [ diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php index 000e5fee..19bbe0f8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php @@ -29,9 +29,9 @@ class PdoCasterTest extends TestCase public function testCastPdo() { $pdo = new \PDO('sqlite::memory:'); - $pdo->setAttribute(\PDO::ATTR_STATEMENT_CLASS, array('PDOStatement', array($pdo))); + $pdo->setAttribute(\PDO::ATTR_STATEMENT_CLASS, ['PDOStatement', [$pdo]]); - $cast = PdoCaster::castPdo($pdo, array(), new Stub(), false); + $cast = PdoCaster::castPdo($pdo, [], new Stub(), false); $this->assertInstanceOf('Symfony\Component\VarDumper\Caster\EnumStub', $cast["\0~\0attributes"]); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php index 4e675915..96cb80eb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php @@ -90,10 +90,10 @@ EOTXT if (\defined('HHVM_VERSION_ID')) { $this->markTestSkipped('Not for HHVM.'); } - $var = array( + $var = [ (new \ReflectionMethod($this, __FUNCTION__))->getClosure($this), (new \ReflectionMethod(__CLASS__, 'tearDownAfterClass'))->getClosure(), - ); + ]; $this->assertDumpMatchesFormat( <<assertDumpMatchesFormat($expectedDump, array($r, $r->getExecutingGenerator())); + $this->assertDumpMatchesFormat($expectedDump, [$r, $r->getExecutingGenerator()]); foreach ($generator as $v) { } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php index d3c9ec25..984b340c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php @@ -23,8 +23,8 @@ class SplCasterTest extends TestCase public function getCastFileInfoTests() { - return array( - array(__FILE__, <<<'EOTXT' + return [ + [__FILE__, <<<'EOTXT' SplFileInfo { %Apath: "%sCaster" filename: "SplCasterTest.php" @@ -35,7 +35,7 @@ SplFileInfo { aTime: %s-%s-%d %d:%d:%d mTime: %s-%s-%d %d:%d:%d cTime: %s-%s-%d %d:%d:%d - inode: %d + inode: %i size: %d perms: 0%d owner: %d @@ -49,8 +49,8 @@ SplFileInfo { link: false %A} EOTXT - ), - array('https://google.com/about', <<<'EOTXT' + ], + ['https://google.com/about', <<<'EOTXT' SplFileInfo { %Apath: "https://google.com" filename: "about" @@ -60,8 +60,8 @@ SplFileInfo { realPath: false %A} EOTXT - ), - ); + ], + ]; } /** @dataProvider getCastFileInfoTests */ @@ -85,7 +85,7 @@ SplFileObject { aTime: %s-%s-%d %d:%d:%d mTime: %s-%s-%d %d:%d:%d cTime: %s-%s-%d %d:%d:%d - inode: %d + inode: %i size: %d perms: 0%d owner: %d @@ -105,7 +105,7 @@ SplFileObject { maxLineLen: 0 fstat: array:26 [ "dev" => %d - "ino" => %d + "ino" => %i "nlink" => %d "rdev" => 0 "blksize" => %i @@ -137,12 +137,12 @@ EOTXT; public function provideCastSplDoublyLinkedList() { - return array( - array(\SplDoublyLinkedList::IT_MODE_FIFO, 'IT_MODE_FIFO | IT_MODE_KEEP'), - array(\SplDoublyLinkedList::IT_MODE_LIFO, 'IT_MODE_LIFO | IT_MODE_KEEP'), - array(\SplDoublyLinkedList::IT_MODE_FIFO | \SplDoublyLinkedList::IT_MODE_DELETE, 'IT_MODE_FIFO | IT_MODE_DELETE'), - array(\SplDoublyLinkedList::IT_MODE_LIFO | \SplDoublyLinkedList::IT_MODE_DELETE, 'IT_MODE_LIFO | IT_MODE_DELETE'), - ); + return [ + [\SplDoublyLinkedList::IT_MODE_FIFO, 'IT_MODE_FIFO | IT_MODE_KEEP'], + [\SplDoublyLinkedList::IT_MODE_LIFO, 'IT_MODE_LIFO | IT_MODE_KEEP'], + [\SplDoublyLinkedList::IT_MODE_FIFO | \SplDoublyLinkedList::IT_MODE_DELETE, 'IT_MODE_FIFO | IT_MODE_DELETE'], + [\SplDoublyLinkedList::IT_MODE_LIFO | \SplDoublyLinkedList::IT_MODE_DELETE, 'IT_MODE_LIFO | IT_MODE_DELETE'], + ]; } public function testCastObjectStorageIsntModified() @@ -169,7 +169,7 @@ EOTXT; if (\defined('HHVM_VERSION')) { $this->markTestSkipped('HHVM as different internal details.'); } - $var = new \ArrayObject(array(123)); + $var = new \ArrayObject([123]); $var->foo = 234; $expected = <<markTestSkipped('HHVM as different internal details.'); } - $var = new MyArrayIterator(array(234)); + $var = new MyArrayIterator([234]); $expected = <<setDumpHeader(''); $dumper->setDumpBoundaries('', ''); - $dumper->setDisplayOptions(array('fileLinkFormat' => '%f:%l')); + $dumper->setDisplayOptions(['fileLinkFormat' => '%f:%l']); $dump = $dumper->dump($cloner->cloneVar($var), true); $expectedDump = <<<'EODUMP' @@ -110,13 +110,13 @@ EODUMP; public function testLinkStubWithNoFileLink() { - $var = array(new LinkStub('example.com', 0, 'http://example.com')); + $var = [new LinkStub('example.com', 0, 'http://example.com')]; $cloner = new VarCloner(); $dumper = new HtmlDumper(); $dumper->setDumpHeader(''); $dumper->setDumpBoundaries('', ''); - $dumper->setDisplayOptions(array('fileLinkFormat' => '%f:%l')); + $dumper->setDisplayOptions(['fileLinkFormat' => '%f:%l']); $dump = $dumper->dump($cloner->cloneVar($var), true); $expectedDump = <<<'EODUMP' @@ -131,13 +131,13 @@ EODUMP; public function testClassStub() { - $var = array(new ClassStub('hello', array(FooInterface::class, 'foo'))); + $var = [new ClassStub('hello', [FooInterface::class, 'foo'])]; $cloner = new VarCloner(); $dumper = new HtmlDumper(); $dumper->setDumpHeader(''); $dumper->setDumpBoundaries('', ''); - $dump = $dumper->dump($cloner->cloneVar($var), true, array('fileLinkFormat' => '%f:%l')); + $dump = $dumper->dump($cloner->cloneVar($var), true, ['fileLinkFormat' => '%f:%l']); $expectedDump = <<<'EODUMP' array:1 [ @@ -151,7 +151,7 @@ EODUMP; public function testClassStubWithNotExistingClass() { - $var = array(new ClassStub(NotExisting::class)); + $var = [new ClassStub(NotExisting::class)]; $cloner = new VarCloner(); $dumper = new HtmlDumper(); @@ -172,13 +172,13 @@ EODUMP; public function testClassStubWithNotExistingMethod() { - $var = array(new ClassStub('hello', array(FooInterface::class, 'missing'))); + $var = [new ClassStub('hello', [FooInterface::class, 'missing'])]; $cloner = new VarCloner(); $dumper = new HtmlDumper(); $dumper->setDumpHeader(''); $dumper->setDumpBoundaries('', ''); - $dump = $dumper->dump($cloner->cloneVar($var), true, array('fileLinkFormat' => '%f:%l')); + $dump = $dumper->dump($cloner->cloneVar($var), true, ['fileLinkFormat' => '%f:%l']); $expectedDump = <<<'EODUMP' array:1 [ diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php index 374d298a..1d7b3f62 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php @@ -66,15 +66,15 @@ EODUMP; public function provideNodes() { - return array( - array(0, <<<'EODUMP' + return [ + [0, <<<'EODUMP' XMLReader { +nodeType: NONE …13 } EODUMP - ), - array(1, <<<'EODUMP' + ], + [1, <<<'EODUMP' XMLReader { +localName: "foo" +nodeType: ELEMENT @@ -82,8 +82,8 @@ XMLReader { …11 } EODUMP - ), - array(2, <<<'EODUMP' + ], + [2, <<<'EODUMP' XMLReader { +localName: "#text" +nodeType: SIGNIFICANT_WHITESPACE @@ -96,8 +96,8 @@ XMLReader { …9 } EODUMP - ), - array(3, <<<'EODUMP' + ], + [3, <<<'EODUMP' XMLReader { +localName: "bar" +nodeType: ELEMENT @@ -106,8 +106,8 @@ XMLReader { …10 } EODUMP - ), - array(4, <<<'EODUMP' + ], + [4, <<<'EODUMP' XMLReader { +localName: "bar" +nodeType: END_ELEMENT @@ -116,8 +116,8 @@ XMLReader { …10 } EODUMP - ), - array(6, <<<'EODUMP' + ], + [6, <<<'EODUMP' XMLReader { +localName: "bar" +nodeType: ELEMENT @@ -127,8 +127,8 @@ XMLReader { …9 } EODUMP - ), - array(9, <<<'EODUMP' + ], + [9, <<<'EODUMP' XMLReader { +localName: "#text" +nodeType: TEXT @@ -138,8 +138,8 @@ XMLReader { …9 } EODUMP - ), - array(12, <<<'EODUMP' + ], + [12, <<<'EODUMP' XMLReader { +localName: "bar" +nodeType: ELEMENT @@ -149,8 +149,8 @@ XMLReader { …9 } EODUMP - ), - array(13, <<<'EODUMP' + ], + [13, <<<'EODUMP' XMLReader { +localName: "bar" +nodeType: END_ELEMENT @@ -159,8 +159,8 @@ XMLReader { …10 } EODUMP - ), - array(15, <<<'EODUMP' + ], + [15, <<<'EODUMP' XMLReader { +localName: "bar" +nodeType: ELEMENT @@ -170,8 +170,8 @@ XMLReader { …9 } EODUMP - ), - array(16, <<<'EODUMP' + ], + [16, <<<'EODUMP' XMLReader { +localName: "#text" +nodeType: SIGNIFICANT_WHITESPACE @@ -184,8 +184,8 @@ XMLReader { …9 } EODUMP - ), - array(17, <<<'EODUMP' + ], + [17, <<<'EODUMP' XMLReader { +localName: "baz" +prefix: "baz" @@ -196,8 +196,8 @@ XMLReader { …8 } EODUMP - ), - array(18, <<<'EODUMP' + ], + [18, <<<'EODUMP' XMLReader { +localName: "baz" +prefix: "baz" @@ -208,8 +208,8 @@ XMLReader { …8 } EODUMP - ), - array(19, <<<'EODUMP' + ], + [19, <<<'EODUMP' XMLReader { +localName: "#text" +nodeType: SIGNIFICANT_WHITESPACE @@ -222,8 +222,8 @@ XMLReader { …9 } EODUMP - ), - array(21, <<<'EODUMP' + ], + [21, <<<'EODUMP' XMLReader { +localName: "#text" +nodeType: SIGNIFICANT_WHITESPACE @@ -233,8 +233,8 @@ XMLReader { …9 } EODUMP - ), - array(22, <<<'EODUMP' + ], + [22, <<<'EODUMP' XMLReader { +localName: "foo" +nodeType: END_ELEMENT @@ -242,7 +242,7 @@ XMLReader { …11 } EODUMP - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Cloner/DataTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Cloner/DataTest.php index d10951be..7d20bced 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Cloner/DataTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Cloner/DataTest.php @@ -21,9 +21,9 @@ class DataTest extends TestCase { public function testBasicData() { - $values = array(1 => 123, 4.5, 'abc', null, false); + $values = [1 => 123, 4.5, 'abc', null, false]; $data = $this->cloneVar($values); - $clonedValues = array(); + $clonedValues = []; $this->assertInstanceOf(Data::class, $data); $this->assertCount(\count($values), $data); @@ -62,7 +62,7 @@ class DataTest extends TestCase public function testArray() { - $values = array(array(), array(123)); + $values = [[], [123]]; $data = $this->cloneVar($values); $this->assertSame($values, $data->getValue(true)); @@ -83,7 +83,7 @@ class DataTest extends TestCase public function testStub() { - $data = $this->cloneVar(array(new ClassStub('stdClass'))); + $data = $this->cloneVar([new ClassStub('stdClass')]); $data = $data[0]; $this->assertSame('string', $data->getType()); @@ -93,15 +93,15 @@ class DataTest extends TestCase public function testHardRefs() { - $values = array(array()); + $values = [[]]; $values[1] = &$values[0]; $values[2][0] = &$values[2]; $data = $this->cloneVar($values); - $this->assertSame(array(), $data[0]->getValue()); - $this->assertSame(array(), $data[1]->getValue()); - $this->assertEquals(array($data[2]->getValue()), $data[2]->getValue(true)); + $this->assertSame([], $data[0]->getValue()); + $this->assertSame([], $data[1]->getValue()); + $this->assertEquals([$data[2]->getValue()], $data[2]->getValue(true)); $this->assertSame('array (count=3)', (string) $data); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Cloner/VarClonerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Cloner/VarClonerTest.php index 12fabcf0..3b180af4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Cloner/VarClonerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Cloner/VarClonerTest.php @@ -21,7 +21,7 @@ class VarClonerTest extends TestCase { public function testMaxIntBoundary() { - $data = array(PHP_INT_MAX => 123); + $data = [PHP_INT_MAX => 123]; $cloner = new VarCloner(); $clone = $cloner->cloneVar($data); @@ -149,42 +149,42 @@ EOTXT; public function testLimits() { // Level 0: - $data = array( + $data = [ // Level 1: - array( + [ // Level 2: - array( + [ // Level 3: 'Level 3 Item 0', 'Level 3 Item 1', 'Level 3 Item 2', 'Level 3 Item 3', - ), - array( + ], + [ 'Level 3 Item 4', 'Level 3 Item 5', 'Level 3 Item 6', - ), - array( + ], + [ 'Level 3 Item 7', - ), - ), - array( - array( + ], + ], + [ + [ 'Level 3 Item 8', - ), + ], 'Level 2 Item 0', - ), - array( + ], + [ 'Level 2 Item 1', - ), + ], 'Level 1 Item 0', - array( + [ // Test setMaxString: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'SHORT', - ), - ); + ], + ]; $cloner = new VarCloner(); $cloner->setMinDepth(2); @@ -381,16 +381,16 @@ EOTXT; public function testCaster() { - $cloner = new VarCloner(array( + $cloner = new VarCloner([ '*' => function ($obj, $array) { - return array('foo' => 123); + return ['foo' => 123]; }, __CLASS__ => function ($obj, $array) { ++$array['foo']; return $array; }, - )); + ]); $clone = $cloner->cloneVar($this); $expected = <<setColors(false); $cloner = new VarCloner(); - $cloner->addCasters(array( + $cloner->addCasters([ ':stream' => function ($res, $a) { unset($a['uri'], $a['wrapper_data']); return $a; }, - )); + ]); $data = $cloner->cloneVar($var); ob_start(); @@ -119,11 +119,11 @@ EOTXT $dumper->setColors(false); $cloner = new VarCloner(); - $var = array( - 'array' => array('a', 'b'), + $var = [ + 'array' => ['a', 'b'], 'string' => 'hello', 'multiline string' => "this\nis\na\multiline\nstring", - ); + ]; $dump = $dumper->dump($cloner->cloneVar($var), true); @@ -179,7 +179,7 @@ array:3 [ EOTXT; - yield array($expected, CliDumper::DUMP_COMMA_SEPARATOR); + yield [$expected, CliDumper::DUMP_COMMA_SEPARATOR]; $expected = <<<'EOTXT' array:3 [ @@ -198,7 +198,7 @@ array:3 [ EOTXT; - yield array($expected, CliDumper::DUMP_TRAILING_COMMA); + yield [$expected, CliDumper::DUMP_TRAILING_COMMA]; } /** @@ -261,7 +261,7 @@ EOTXT public function testObjectCast() { - $var = (object) array(1 => 1); + $var = (object) [1 => 1]; $var->{1} = 2; if (\PHP_VERSION_ID >= 70200) { @@ -322,10 +322,10 @@ EOTXT putenv('DUMP_LIGHT_ARRAY=1'); putenv('DUMP_STRING_LENGTH=1'); - $var = array( + $var = [ range(1, 3), - array('foo', 2 => 'bar'), - ); + ['foo', 2 => 'bar'], + ]; $this->assertDumpEquals( <<setColors(false); $cloner = new VarCloner(); - $cloner->addCasters(array( + $cloner->addCasters([ ':stream' => function ($res, $a) { unset($a['wrapper_data']); return $a; }, - )); - $cloner->addCasters(array( + ]); + $cloner->addCasters([ ':stream' => eval('return function () use ($twig) { try { - $twig->render(array()); + $twig->render([]); } catch (\Twig\Error\RuntimeError $e) { throw $e->getPrevious(); } };'), - )); + ]); $ref = (int) $out; $data = $cloner->cloneVar($out); @@ -419,7 +419,7 @@ EOTXT public function testRefsInProperties() { - $var = (object) array('foo' => 'foo'); + $var = (object) ['foo' => 'foo']; $var->bar = &$var->foo; $dumper = new CliDumper(); @@ -580,12 +580,12 @@ EOTXT } $var = function &() { - $var = array(); + $var = []; $var[] = &$var; return $var; }; - return array($var(), $GLOBALS, &$GLOBALS); + return [$var(), $GLOBALS, &$GLOBALS]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Dumper/FunctionsTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Dumper/FunctionsTest.php index 81ecdddc..0bd596c2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Dumper/FunctionsTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Dumper/FunctionsTest.php @@ -43,7 +43,7 @@ class FunctionsTest extends TestCase $return = dump($var1, $var2, $var3); $out = ob_get_clean(); - $this->assertEquals(array($var1, $var2, $var3), $return); + $this->assertEquals([$var1, $var2, $var3], $return); } protected function setupVarDumper() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php index 98ca471a..8a7e68eb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php @@ -32,13 +32,13 @@ class HtmlDumperTest extends TestCase $dumper->setDumpHeader(''); $dumper->setDumpBoundaries('', ''); $cloner = new VarCloner(); - $cloner->addCasters(array( + $cloner->addCasters([ ':stream' => function ($res, $a) { unset($a['uri'], $a['wrapper_data']); return $a; }, - )); + ]); $data = $cloner->cloneVar($var); ob_start(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Fixtures/Twig.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Fixtures/Twig.php index fe254292..8b84d820 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Fixtures/Twig.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Fixtures/Twig.php @@ -11,11 +11,11 @@ class __TwigTemplate_VarDumperFixture_u75a09 extends Twig\Template parent::__construct($env); } $this->parent = false; - $this->blocks = array(); + $this->blocks = []; $this->path = $path; } - protected function doDisplay(array $context, array $blocks = array()) + protected function doDisplay(array $context, array $blocks = []) { // line 2 throw new \Exception('Foobar'); @@ -28,7 +28,7 @@ class __TwigTemplate_VarDumperFixture_u75a09 extends Twig\Template public function getDebugInfo() { - return array(20 => 1, 21 => 2); + return [20 => 1, 21 => 2]; } public function getSourceContext() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Fixtures/dumb-var.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Fixtures/dumb-var.php index 59ee19bd..de51cebc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Fixtures/dumb-var.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Fixtures/dumb-var.php @@ -14,19 +14,19 @@ $foo->bar = 'bar'; $g = fopen(__FILE__, 'r'); -$var = array( +$var = [ 'number' => 1, null, 'const' => 1.1, true, false, NAN, INF, -INF, PHP_INT_MAX, 'str' => "déjà\n", "\xE9\x00", - '[]' => array(), + '[]' => [], 'res' => $g, 'obj' => $foo, 'closure' => function ($a, \PDO &$b = null) {}, 'line' => __LINE__ - 1, - 'nobj' => array((object) array()), -); + 'nobj' => [(object) []], +]; -$r = array(); +$r = []; $r[] = &$r; $var['recurs'] = &$r; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitTest.php index 464d67f6..18042fb3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitTest.php @@ -21,7 +21,7 @@ class VarDumperTestTraitTest extends TestCase public function testItComparesLargeData() { $howMany = 700; - $data = array_fill_keys(range(0, $howMany), array('a', 'b', 'c', 'd')); + $data = array_fill_keys(range(0, $howMany), ['a', 'b', 'c', 'd']); $expected = sprintf("array:%d [\n", $howMany + 1); for ($i = 0; $i <= $howMany; ++$i) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/VarDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/VarDumper.php index a9ed05b3..2ef20c06 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/VarDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/VarDumper/VarDumper.php @@ -29,7 +29,7 @@ class VarDumper { if (null === self::$handler) { $cloner = new VarCloner(); - $dumper = \in_array(\PHP_SAPI, array('cli', 'phpdbg'), true) ? new CliDumper() : new HtmlDumper(); + $dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? new CliDumper() : new HtmlDumper(); self::$handler = function ($var) use ($cloner, $dumper) { $dumper->dump($cloner->cloneVar($var)); }; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/EventListener/AddLinkHeaderListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/EventListener/AddLinkHeaderListener.php index ef2fdee7..3d04f9a1 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/EventListener/AddLinkHeaderListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/EventListener/AddLinkHeaderListener.php @@ -52,6 +52,6 @@ class AddLinkHeaderListener implements EventSubscriberInterface */ public static function getSubscribedEvents() { - return array(KernelEvents::RESPONSE => 'onKernelResponse'); + return [KernelEvents::RESPONSE => 'onKernelResponse']; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/HttpHeaderSerializer.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/HttpHeaderSerializer.php index e2ef3d2f..b329fd37 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/HttpHeaderSerializer.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/HttpHeaderSerializer.php @@ -31,13 +31,13 @@ final class HttpHeaderSerializer */ public function serialize($links) { - $elements = array(); + $elements = []; foreach ($links as $link) { if ($link->isTemplated()) { continue; } - $attributesParts = array('', sprintf('rel="%s"', implode(' ', $link->getRels()))); + $attributesParts = ['', sprintf('rel="%s"', implode(' ', $link->getRels()))]; foreach ($link->getAttributes() as $key => $value) { if (\is_array($value)) { foreach ($value as $v) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/README.md b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/README.md index 61fd3bff..d246e507 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/README.md +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/README.md @@ -11,7 +11,7 @@ It can also be used with extensions defined in the [HTML5 link type extensions w Resources --------- - * [Documentation](https://symfony.com/doc/current/components/weblink/introduction.html) + * [Documentation](https://symfony.com/doc/current/components/web_link.html) * [Contributing](https://symfony.com/doc/current/contributing/index.html) * [Report issues](https://github.com/symfony/symfony/issues) and [send Pull Requests](https://github.com/symfony/symfony/pulls) diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/Tests/EventListener/AddLinkHeaderListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/Tests/EventListener/AddLinkHeaderListenerTest.php index c592eb23..5a714715 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/Tests/EventListener/AddLinkHeaderListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/Tests/EventListener/AddLinkHeaderListenerTest.php @@ -28,8 +28,8 @@ class AddLinkHeaderListenerTest extends TestCase { public function testOnKernelResponse() { - $request = new Request(array(), array(), array('_links' => new GenericLinkProvider(array(new Link('preload', '/foo'))))); - $response = new Response('', 200, array('Link' => '; rel="http://www.w3.org/ns/hydra/core#apiDocumentation"')); + $request = new Request([], [], ['_links' => new GenericLinkProvider([new Link('preload', '/foo')])]); + $response = new Response('', 200, ['Link' => '; rel="http://www.w3.org/ns/hydra/core#apiDocumentation"']); $subscriber = new AddLinkHeaderListener(); @@ -42,16 +42,16 @@ class AddLinkHeaderListenerTest extends TestCase $this->assertInstanceOf(EventSubscriberInterface::class, $subscriber); - $expected = array( + $expected = [ '; rel="http://www.w3.org/ns/hydra/core#apiDocumentation"', '; rel="preload"', - ); + ]; $this->assertEquals($expected, $response->headers->get('Link', null, false)); } public function testSubscribedEvents() { - $this->assertEquals(array(KernelEvents::RESPONSE => 'onKernelResponse'), AddLinkHeaderListener::getSubscribedEvents()); + $this->assertEquals([KernelEvents::RESPONSE => 'onKernelResponse'], AddLinkHeaderListener::getSubscribedEvents()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/Tests/HttpHeaderSerializerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/Tests/HttpHeaderSerializerTest.php index 553371fb..fb4bbd96 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/Tests/HttpHeaderSerializerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/WebLink/Tests/HttpHeaderSerializerTest.php @@ -29,19 +29,19 @@ class HttpHeaderSerializerTest extends TestCase public function testSerialize() { - $links = array( + $links = [ new Link('prerender', '/1'), (new Link('dns-prefetch', '/2'))->withAttribute('pr', 0.7), (new Link('preload', '/3'))->withAttribute('as', 'script')->withAttribute('nopush', false), (new Link('preload', '/4'))->withAttribute('as', 'image')->withAttribute('nopush', true), - (new Link('alternate', '/5'))->withRel('next')->withAttribute('hreflang', array('fr', 'de'))->withAttribute('title', 'Hello'), - ); + (new Link('alternate', '/5'))->withRel('next')->withAttribute('hreflang', ['fr', 'de'])->withAttribute('title', 'Hello'), + ]; $this->assertEquals('; rel="prerender",; rel="dns-prefetch"; pr="0.7",; rel="preload"; as="script",; rel="preload"; as="image"; nopush,; rel="alternate next"; hreflang="fr"; hreflang="de"; title="Hello"', $this->serializer->serialize($links)); } public function testSerializeEmpty() { - $this->assertNull($this->serializer->serialize(array())); + $this->assertNull($this->serializer->serialize([])); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Definition.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Definition.php index ec0a0150..e6d23a2f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Definition.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Definition.php @@ -21,8 +21,8 @@ use Symfony\Component\Workflow\Exception\LogicException; */ final class Definition { - private $places = array(); - private $transitions = array(); + private $places = []; + private $transitions = []; private $initialPlace; /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/DefinitionBuilder.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/DefinitionBuilder.php index 16d66286..87f4566d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/DefinitionBuilder.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/DefinitionBuilder.php @@ -22,15 +22,15 @@ use Symfony\Component\Workflow\Exception\InvalidArgumentException; */ class DefinitionBuilder { - private $places = array(); - private $transitions = array(); + private $places = []; + private $transitions = []; private $initialPlace; /** * @param string[] $places * @param Transition[] $transitions */ - public function __construct(array $places = array(), array $transitions = array()) + public function __construct(array $places = [], array $transitions = []) { $this->addPlaces($places); $this->addTransitions($transitions); @@ -51,8 +51,8 @@ class DefinitionBuilder */ public function reset() { - $this->places = array(); - $this->transitions = array(); + $this->places = []; + $this->transitions = []; $this->initialPlace = null; return $this; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/DependencyInjection/ValidateWorkflowsPass.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/DependencyInjection/ValidateWorkflowsPass.php index 71000957..57573823 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/DependencyInjection/ValidateWorkflowsPass.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/DependencyInjection/ValidateWorkflowsPass.php @@ -34,13 +34,13 @@ class ValidateWorkflowsPass implements CompilerPassInterface $taggedServices = $container->findTaggedServiceIds($this->definitionTag, true); foreach ($taggedServices as $id => $tags) { foreach ($tags as $tag) { - if (!array_key_exists('name', $tag)) { + if (!\array_key_exists('name', $tag)) { throw new RuntimeException(sprintf('The "name" for the tag "%s" of service "%s" must be set.', $this->definitionTag, $id)); } - if (!array_key_exists('type', $tag)) { + if (!\array_key_exists('type', $tag)) { throw new RuntimeException(sprintf('The "type" for the tag "%s" of service "%s" must be set.', $this->definitionTag, $id)); } - if (!array_key_exists('marking_store', $tag)) { + if (!\array_key_exists('marking_store', $tag)) { throw new RuntimeException(sprintf('The "marking_store" for the tag "%s" of service "%s" must be set.', $this->definitionTag, $id)); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/DumperInterface.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/DumperInterface.php index b0eebd34..797c63e3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/DumperInterface.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/DumperInterface.php @@ -31,5 +31,5 @@ interface DumperInterface * * @return string The representation of the workflow */ - public function dump(Definition $definition, Marking $marking = null, array $options = array()); + public function dump(Definition $definition, Marking $marking = null, array $options = []); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/GraphvizDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/GraphvizDumper.php index 3681b6f1..88a6888a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/GraphvizDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/GraphvizDumper.php @@ -26,11 +26,11 @@ use Symfony\Component\Workflow\Marking; */ class GraphvizDumper implements DumperInterface { - protected static $defaultOptions = array( - 'graph' => array('ratio' => 'compress', 'rankdir' => 'LR'), - 'node' => array('fontsize' => 9, 'fontname' => 'Arial', 'color' => '#333333', 'fillcolor' => 'lightblue', 'fixedsize' => true, 'width' => 1), - 'edge' => array('fontsize' => 9, 'fontname' => 'Arial', 'color' => '#333333', 'arrowhead' => 'normal', 'arrowsize' => 0.5), - ); + protected static $defaultOptions = [ + 'graph' => ['ratio' => 'compress', 'rankdir' => 'LR'], + 'node' => ['fontsize' => 9, 'fontname' => 'Arial', 'color' => '#333333', 'fillcolor' => 'lightblue', 'fixedsize' => true, 'width' => 1], + 'edge' => ['fontsize' => 9, 'fontname' => 'Arial', 'color' => '#333333', 'arrowhead' => 'normal', 'arrowsize' => 0.5], + ]; /** * {@inheritdoc} @@ -43,7 +43,7 @@ class GraphvizDumper implements DumperInterface * * node: The default options for nodes (places + transitions) * * edge: The default options for edges */ - public function dump(Definition $definition, Marking $marking = null, array $options = array()) + public function dump(Definition $definition, Marking $marking = null, array $options = []) { $places = $this->findPlaces($definition, $marking); $transitions = $this->findTransitions($definition); @@ -63,10 +63,10 @@ class GraphvizDumper implements DumperInterface */ protected function findPlaces(Definition $definition, Marking $marking = null) { - $places = array(); + $places = []; foreach ($definition->getPlaces() as $place) { - $attributes = array(); + $attributes = []; if ($place === $definition->getInitialPlace()) { $attributes['style'] = 'filled'; } @@ -74,9 +74,9 @@ class GraphvizDumper implements DumperInterface $attributes['color'] = '#FF0000'; $attributes['shape'] = 'doublecircle'; } - $places[$place] = array( + $places[$place] = [ 'attributes' => $attributes, - ); + ]; } return $places; @@ -87,13 +87,13 @@ class GraphvizDumper implements DumperInterface */ protected function findTransitions(Definition $definition) { - $transitions = array(); + $transitions = []; foreach ($definition->getTransitions() as $transition) { - $transitions[] = array( - 'attributes' => array('shape' => 'box', 'regular' => true), + $transitions[] = [ + 'attributes' => ['shape' => 'box', 'regular' => true], 'name' => $transition->getName(), - ); + ]; } return $transitions; @@ -132,22 +132,22 @@ class GraphvizDumper implements DumperInterface */ protected function findEdges(Definition $definition) { - $dotEdges = array(); + $dotEdges = []; foreach ($definition->getTransitions() as $transition) { foreach ($transition->getFroms() as $from) { - $dotEdges[] = array( + $dotEdges[] = [ 'from' => $from, 'to' => $transition->getName(), 'direction' => 'from', - ); + ]; } foreach ($transition->getTos() as $to) { - $dotEdges[] = array( + $dotEdges[] = [ 'from' => $transition->getName(), 'to' => $to, 'direction' => 'to', - ); + ]; } } @@ -203,7 +203,7 @@ class GraphvizDumper implements DumperInterface private function addAttributes(array $attributes) { - $code = array(); + $code = []; foreach ($attributes as $k => $v) { $code[] = sprintf('%s="%s"', $k, $v); @@ -214,7 +214,7 @@ class GraphvizDumper implements DumperInterface private function addOptions(array $options) { - $code = array(); + $code = []; foreach ($options as $k => $v) { $code[] = sprintf('%s="%s"', $k, $v); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/StateMachineGraphvizDumper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/StateMachineGraphvizDumper.php index 9f68e1da..7c35dc0e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/StateMachineGraphvizDumper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/StateMachineGraphvizDumper.php @@ -27,7 +27,7 @@ class StateMachineGraphvizDumper extends GraphvizDumper * * node: The default options for nodes (places) * * edge: The default options for edges */ - public function dump(Definition $definition, Marking $marking = null, array $options = array()) + public function dump(Definition $definition, Marking $marking = null, array $options = []) { $places = $this->findPlaces($definition, $marking); $edges = $this->findEdges($definition); @@ -46,15 +46,15 @@ class StateMachineGraphvizDumper extends GraphvizDumper */ protected function findEdges(Definition $definition) { - $edges = array(); + $edges = []; foreach ($definition->getTransitions() as $transition) { foreach ($transition->getFroms() as $from) { foreach ($transition->getTos() as $to) { - $edges[$from][] = array( + $edges[$from][] = [ 'name' => $transition->getName(), 'to' => $to, - ); + ]; } } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/EventListener/AuditTrailListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/EventListener/AuditTrailListener.php index ba56b586..95a9590c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/EventListener/AuditTrailListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/EventListener/AuditTrailListener.php @@ -48,10 +48,10 @@ class AuditTrailListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( - 'workflow.leave' => array('onLeave'), - 'workflow.transition' => array('onTransition'), - 'workflow.enter' => array('onEnter'), - ); + return [ + 'workflow.leave' => ['onLeave'], + 'workflow.transition' => ['onTransition'], + 'workflow.enter' => ['onEnter'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/EventListener/GuardListener.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/EventListener/GuardListener.php index b2e6b8c7..c8f00d9e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/EventListener/GuardListener.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/EventListener/GuardListener.php @@ -84,7 +84,7 @@ class GuardListener $roles = $token->getRoles(); } - $variables = array( + $variables = [ 'token' => $token, 'user' => $token->getUser(), 'subject' => $event->getSubject(), @@ -97,7 +97,7 @@ class GuardListener 'trust_resolver' => $this->trustResolver, // needed for the is_valid expression function 'validator' => $this->validator, - ); + ]; return $variables; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/LICENSE index 15fc1c88..cf8b3ebe 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014-2018 Fabien Potencier +Copyright (c) 2014-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Marking.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Marking.php index d44ae9fb..8cb2dbed 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Marking.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Marking.php @@ -18,12 +18,12 @@ namespace Symfony\Component\Workflow; */ class Marking { - private $places = array(); + private $places = []; /** * @param int[] $representation Keys are the place name and values should be 1 */ - public function __construct(array $representation = array()) + public function __construct(array $representation = []) { foreach ($representation as $place => $nbToken) { $this->mark($place); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/MarkingStore/MultipleStateMarkingStore.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/MarkingStore/MultipleStateMarkingStore.php index 6d2d0884..926f96fa 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/MarkingStore/MultipleStateMarkingStore.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/MarkingStore/MultipleStateMarkingStore.php @@ -44,7 +44,7 @@ class MultipleStateMarkingStore implements MarkingStoreInterface */ public function getMarking($subject) { - return new Marking($this->propertyAccessor->getValue($subject, $this->property) ?: array()); + return new Marking($this->propertyAccessor->getValue($subject, $this->property) ?: []); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/MarkingStore/SingleStateMarkingStore.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/MarkingStore/SingleStateMarkingStore.php index d6afc6ae..82ddb9cd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/MarkingStore/SingleStateMarkingStore.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/MarkingStore/SingleStateMarkingStore.php @@ -49,7 +49,7 @@ class SingleStateMarkingStore implements MarkingStoreInterface return new Marking(); } - return new Marking(array($placeName => 1)); + return new Marking([$placeName => 1]); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Registry.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Registry.php index 4c41312e..93fb7233 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Registry.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Registry.php @@ -21,7 +21,7 @@ use Symfony\Component\Workflow\SupportStrategy\SupportStrategyInterface; */ class Registry { - private $workflows = array(); + private $workflows = []; /** * @param Workflow $workflow @@ -35,7 +35,7 @@ class Registry $supportStrategy = new ClassInstanceSupportStrategy($supportStrategy); } - $this->workflows[] = array($workflow, $supportStrategy); + $this->workflows[] = [$workflow, $supportStrategy]; } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DefinitionBuilderTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DefinitionBuilderTest.php index 20eb1c8f..f330777a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DefinitionBuilderTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DefinitionBuilderTest.php @@ -13,12 +13,12 @@ class DefinitionBuilderTest extends TestCase */ public function testAddPlaceInvalidName() { - $builder = new DefinitionBuilder(array('a"', 'b')); + $builder = new DefinitionBuilder(['a"', 'b']); } public function testSetInitialPlace() { - $builder = new DefinitionBuilder(array('a', 'b')); + $builder = new DefinitionBuilder(['a', 'b']); $builder->setInitialPlace('b'); $definition = $builder->build(); @@ -31,7 +31,7 @@ class DefinitionBuilderTest extends TestCase $transition0 = new Transition('name0', $places[0], $places[1]); $transition1 = new Transition('name1', $places[0], $places[1]); - $builder = new DefinitionBuilder($places, array($transition0)); + $builder = new DefinitionBuilder($places, [$transition0]); $builder->addTransition($transition1); $definition = $builder->build(); @@ -43,7 +43,7 @@ class DefinitionBuilderTest extends TestCase public function testAddPlace() { - $builder = new DefinitionBuilder(array('a'), array()); + $builder = new DefinitionBuilder(['a'], []); $builder->addPlace('b'); $definition = $builder->build(); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DefinitionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DefinitionTest.php index 8eb1b6e4..506cfee6 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DefinitionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DefinitionTest.php @@ -11,7 +11,7 @@ class DefinitionTest extends TestCase public function testAddPlaces() { $places = range('a', 'e'); - $definition = new Definition($places, array()); + $definition = new Definition($places, []); $this->assertCount(5, $definition->getPlaces()); @@ -23,14 +23,14 @@ class DefinitionTest extends TestCase */ public function testAddPlacesInvalidArgument() { - $places = array('a"', 'e"'); - $definition = new Definition($places, array()); + $places = ['a"', 'e"']; + $definition = new Definition($places, []); } public function testSetInitialPlace() { $places = range('a', 'e'); - $definition = new Definition($places, array(), $places[3]); + $definition = new Definition($places, [], $places[3]); $this->assertEquals($places[3], $definition->getInitialPlace()); } @@ -41,7 +41,7 @@ class DefinitionTest extends TestCase */ public function testSetInitialPlaceAndPlaceIsNotDefined() { - $definition = new Definition(array(), array(), 'd'); + $definition = new Definition([], [], 'd'); } public function testAddTransition() @@ -49,7 +49,7 @@ class DefinitionTest extends TestCase $places = range('a', 'b'); $transition = new Transition('name', $places[0], $places[1]); - $definition = new Definition($places, array($transition)); + $definition = new Definition($places, [$transition]); $this->assertCount(1, $definition->getTransitions()); $this->assertSame($transition, $definition->getTransitions()[0]); @@ -63,7 +63,7 @@ class DefinitionTest extends TestCase { $places = range('a', 'b'); - new Definition($places, array(new Transition('name', 'c', $places[1]))); + new Definition($places, [new Transition('name', 'c', $places[1])]); } /** @@ -74,6 +74,6 @@ class DefinitionTest extends TestCase { $places = range('a', 'b'); - new Definition($places, array(new Transition('name', $places[0], 'c'))); + new Definition($places, [new Transition('name', $places[0], 'c')]); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DependencyInjection/ValidateWorkflowsPassTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DependencyInjection/ValidateWorkflowsPassTest.php index 1a38588f..c9cb8402 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DependencyInjection/ValidateWorkflowsPassTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DependencyInjection/ValidateWorkflowsPassTest.php @@ -15,18 +15,18 @@ class ValidateWorkflowsPassTest extends TestCase { $container = new ContainerBuilder(); $container->register('definition1', WorkflowDefinition::class) - ->addArgument(array('a', 'b', 'c')) - ->addArgument(array( - new Definition(Transition::class, array('t1', 'a', 'b')), - new Definition(Transition::class, array('t2', 'a', 'c')), - )) - ->addTag('workflow.definition', array('name' => 'wf1', 'type' => 'state_machine', 'marking_store' => 'foo')); + ->addArgument(['a', 'b', 'c']) + ->addArgument([ + new Definition(Transition::class, ['t1', 'a', 'b']), + new Definition(Transition::class, ['t2', 'a', 'c']), + ]) + ->addTag('workflow.definition', ['name' => 'wf1', 'type' => 'state_machine', 'marking_store' => 'foo']); (new ValidateWorkflowsPass())->process($container); $workflowDefinition = $container->get('definition1'); - $this->assertSame(array('a' => 'a', 'b' => 'b', 'c' => 'c'), $workflowDefinition->getPlaces()); - $this->assertEquals(array(new Transition('t1', 'a', 'b'), new Transition('t2', 'a', 'c')), $workflowDefinition->getTransitions()); + $this->assertSame(['a' => 'a', 'b' => 'b', 'c' => 'c'], $workflowDefinition->getPlaces()); + $this->assertEquals([new Transition('t1', 'a', 'b'), new Transition('t2', 'a', 'c')], $workflowDefinition->getTransitions()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php index 067cb9d4..a5d9087f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php @@ -40,23 +40,23 @@ class GraphvizDumperTest extends TestCase public function provideWorkflowDefinitionWithMarking() { - yield array( + yield [ $this->createComplexWorkflowDefinition(), - new Marking(array('b' => 1)), + new Marking(['b' => 1]), $this->createComplexWorkflowDefinitionDumpWithMarking(), - ); + ]; - yield array( + yield [ $this->createSimpleWorkflowDefinition(), - new Marking(array('c' => 1, 'd' => 1)), + new Marking(['c' => 1, 'd' => 1]), $this->createSimpleWorkflowDumpWithMarking(), - ); + ]; } public function provideWorkflowDefinitionWithoutMarking() { - yield array($this->createComplexWorkflowDefinition(), $this->provideComplexWorkflowDumpWithoutMarking()); - yield array($this->createSimpleWorkflowDefinition(), $this->provideSimpleWorkflowDumpWithoutMarking()); + yield [$this->createComplexWorkflowDefinition(), $this->provideComplexWorkflowDumpWithoutMarking()]; + yield [$this->createSimpleWorkflowDefinition(), $this->provideSimpleWorkflowDumpWithoutMarking()]; } public function createComplexWorkflowDefinitionDumpWithMarking() diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Dumper/StateMachineGraphvizDumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Dumper/StateMachineGraphvizDumperTest.php index 7277b1c6..473d31ec 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Dumper/StateMachineGraphvizDumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Dumper/StateMachineGraphvizDumperTest.php @@ -48,7 +48,7 @@ EOGRAPH; public function testDumpWithMarking() { $definition = $this->createComplexStateMachineDefinition(); - $marking = new Marking(array('b' => 1)); + $marking = new Marking(['b' => 1]); $expected = <<<'EOGRAPH' digraph workflow { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/EventListener/AuditTrailListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/EventListener/AuditTrailListenerTest.php index beee3664..8fab0e9e 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/EventListener/AuditTrailListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/EventListener/AuditTrailListenerTest.php @@ -30,11 +30,11 @@ class AuditTrailListenerTest extends TestCase $workflow->apply($object, 't1'); - $expected = array( + $expected = [ 'Leaving "a" for subject of class "stdClass" in workflow "unnamed".', 'Transition "t1" for subject of class "stdClass" in workflow "unnamed".', 'Entering "b" for subject of class "stdClass" in workflow "unnamed".', - ); + ]; $this->assertSame($expected, $logger->logs); } @@ -42,9 +42,9 @@ class AuditTrailListenerTest extends TestCase class Logger extends AbstractLogger { - public $logs = array(); + public $logs = []; - public function log($level, $message, array $context = array()) + public function log($level, $message, array $context = []) { $this->logs[] = $message; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/EventListener/GuardListenerTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/EventListener/GuardListenerTest.php index 8686d74c..d27c63e5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/EventListener/GuardListenerTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/EventListener/GuardListenerTest.php @@ -25,17 +25,17 @@ class GuardListenerTest extends TestCase protected function setUp() { - $this->configuration = array( + $this->configuration = [ 'test_is_granted' => 'is_granted("something")', 'test_is_valid' => 'is_valid(subject)', - 'test_expression' => array( + 'test_expression' => [ new GuardExpression(new Transition('name', 'from', 'to'), '!is_valid(subject)'), new GuardExpression(new Transition('name', 'from', 'to'), 'is_valid(subject)'), - ), - ); + ], + ]; $expressionLanguage = new ExpressionLanguage(); $token = $this->getMockBuilder(TokenInterface::class)->getMock(); - $token->expects($this->any())->method('getRoles')->willReturn(array(new Role('ROLE_USER'))); + $token->expects($this->any())->method('getRoles')->willReturn([new Role('ROLE_USER')]); $tokenStorage = $this->getMockBuilder(TokenStorageInterface::class)->getMock(); $tokenStorage->expects($this->any())->method('getToken')->willReturn($token); $this->authenticationChecker = $this->getMockBuilder(AuthorizationCheckerInterface::class)->getMock(); @@ -170,7 +170,7 @@ class GuardListenerTest extends TestCase $this->validator ->expects($this->once()) ->method('validate') - ->willReturn($valid ? array() : array('a violation')) + ->willReturn($valid ? [] : ['a violation']) ; } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/MarkingStore/MultipleStateMarkingStoreTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/MarkingStore/MultipleStateMarkingStoreTest.php index a0504af4..647ae42b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/MarkingStore/MultipleStateMarkingStoreTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/MarkingStore/MultipleStateMarkingStoreTest.php @@ -24,7 +24,7 @@ class MultipleStateMarkingStoreTest extends TestCase $markingStore->setMarking($subject, $marking); - $this->assertSame(array('first_place' => 1), $subject->myMarks); + $this->assertSame(['first_place' => 1], $subject->myMarks); $marking2 = $markingStore->getMarking($subject); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/MarkingTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/MarkingTest.php index 98f031e9..9ed6df04 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/MarkingTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/MarkingTest.php @@ -9,28 +9,28 @@ class MarkingTest extends TestCase { public function testMarking() { - $marking = new Marking(array('a' => 1)); + $marking = new Marking(['a' => 1]); $this->assertTrue($marking->has('a')); $this->assertFalse($marking->has('b')); - $this->assertSame(array('a' => 1), $marking->getPlaces()); + $this->assertSame(['a' => 1], $marking->getPlaces()); $marking->mark('b'); $this->assertTrue($marking->has('a')); $this->assertTrue($marking->has('b')); - $this->assertSame(array('a' => 1, 'b' => 1), $marking->getPlaces()); + $this->assertSame(['a' => 1, 'b' => 1], $marking->getPlaces()); $marking->unmark('a'); $this->assertFalse($marking->has('a')); $this->assertTrue($marking->has('b')); - $this->assertSame(array('b' => 1), $marking->getPlaces()); + $this->assertSame(['b' => 1], $marking->getPlaces()); $marking->unmark('b'); $this->assertFalse($marking->has('a')); $this->assertFalse($marking->has('b')); - $this->assertSame(array(), $marking->getPlaces()); + $this->assertSame([], $marking->getPlaces()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/RegistryTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/RegistryTest.php index 262e7cfe..25d2e1cc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/RegistryTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/RegistryTest.php @@ -18,9 +18,9 @@ class RegistryTest extends TestCase { $this->registry = new Registry(); - $this->registry->add(new Workflow(new Definition(array(), array()), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow1'), $this->createSupportStrategy(Subject1::class)); - $this->registry->add(new Workflow(new Definition(array(), array()), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow2'), $this->createSupportStrategy(Subject2::class)); - $this->registry->add(new Workflow(new Definition(array(), array()), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow3'), $this->createSupportStrategy(Subject2::class)); + $this->registry->add(new Workflow(new Definition([], []), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow1'), $this->createSupportStrategy(Subject1::class)); + $this->registry->add(new Workflow(new Definition([], []), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow2'), $this->createSupportStrategy(Subject2::class)); + $this->registry->add(new Workflow(new Definition([], []), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow3'), $this->createSupportStrategy(Subject2::class)); } protected function tearDown() @@ -72,8 +72,8 @@ class RegistryTest extends TestCase { $registry = new Registry(); - $registry->add(new Workflow(new Definition(array(), array()), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow1'), Subject1::class); - $registry->add(new Workflow(new Definition(array(), array()), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow2'), Subject2::class); + $registry->add(new Workflow(new Definition([], []), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow1'), Subject1::class); + $registry->add(new Workflow(new Definition([], []), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow2'), Subject2::class); $workflow = $registry->get(new Subject1()); $this->assertInstanceOf(Workflow::class, $workflow); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/TransitionTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/TransitionTest.php index 74bab16f..2f500ff5 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/TransitionTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/TransitionTest.php @@ -21,7 +21,7 @@ class TransitionTest extends TestCase $transition = new Transition('name', 'a', 'b'); $this->assertSame('name', $transition->getName()); - $this->assertSame(array('a'), $transition->getFroms()); - $this->assertSame(array('b'), $transition->getTos()); + $this->assertSame(['a'], $transition->getFroms()); + $this->assertSame(['b'], $transition->getTos()); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Validator/StateMachineValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Validator/StateMachineValidatorTest.php index dccbf383..4e344560 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Validator/StateMachineValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Validator/StateMachineValidatorTest.php @@ -15,7 +15,7 @@ class StateMachineValidatorTest extends TestCase */ public function testWithMultipleTransitionWithSameNameShareInput() { - $places = array('a', 'b', 'c'); + $places = ['a', 'b', 'c']; $transitions[] = new Transition('t1', 'a', 'b'); $transitions[] = new Transition('t1', 'a', 'c'); $definition = new Definition($places, $transitions); @@ -41,8 +41,8 @@ class StateMachineValidatorTest extends TestCase */ public function testWithMultipleTos() { - $places = array('a', 'b', 'c'); - $transitions[] = new Transition('t1', 'a', array('b', 'c')); + $places = ['a', 'b', 'c']; + $transitions[] = new Transition('t1', 'a', ['b', 'c']); $definition = new Definition($places, $transitions); (new StateMachineValidator())->validate($definition, 'foo'); @@ -66,8 +66,8 @@ class StateMachineValidatorTest extends TestCase */ public function testWithMultipleFroms() { - $places = array('a', 'b', 'c'); - $transitions[] = new Transition('t1', array('a', 'b'), 'c'); + $places = ['a', 'b', 'c']; + $transitions[] = new Transition('t1', ['a', 'b'], 'c'); $definition = new Definition($places, $transitions); (new StateMachineValidator())->validate($definition, 'foo'); @@ -87,14 +87,14 @@ class StateMachineValidatorTest extends TestCase public function testValid() { - $places = array('a', 'b', 'c'); + $places = ['a', 'b', 'c']; $transitions[] = new Transition('t1', 'a', 'b'); $transitions[] = new Transition('t2', 'a', 'c'); $definition = new Definition($places, $transitions); (new StateMachineValidator())->validate($definition, 'foo'); - // the test simply ensures that the validation does not fail (i.e. it does not throw any exceptions) + // the test ensures that the validation does not fail (i.e. it does not throw any exceptions) $this->addToAssertionCount(1); // The graph looks like: diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Validator/WorkflowValidatorTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Validator/WorkflowValidatorTest.php index 245617b6..4a5c5a57 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Validator/WorkflowValidatorTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Validator/WorkflowValidatorTest.php @@ -29,7 +29,7 @@ class WorkflowValidatorTest extends TestCase (new WorkflowValidator(true))->validate($definition, 'foo'); - // the test simply ensures that the validation does not fail (i.e. it does not throw any exceptions) + // the test ensures that the validation does not fail (i.e. it does not throw any exceptions) $this->addToAssertionCount(1); } @@ -41,7 +41,7 @@ class WorkflowValidatorTest extends TestCase { $places = range('a', 'c'); - $transitions = array(); + $transitions = []; $transitions[] = new Transition('t0', 'c', 'b'); $transitions[] = new Transition('t1', 'a', 'b'); $transitions[] = new Transition('t1', 'a', 'c'); @@ -55,7 +55,7 @@ class WorkflowValidatorTest extends TestCase { $places = range('a', 'd'); - $transitions = array(); + $transitions = []; $transitions[] = new Transition('t1', 'a', 'b'); $transitions[] = new Transition('t1', 'b', 'c'); $transitions[] = new Transition('t1', 'd', 'c'); @@ -64,7 +64,7 @@ class WorkflowValidatorTest extends TestCase (new WorkflowValidator())->validate($definition, 'foo'); - // the test simply ensures that the validation does not fail (i.e. it does not throw any exceptions) + // the test ensures that the validation does not fail (i.e. it does not throw any exceptions) $this->addToAssertionCount(1); } } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/WorkflowBuilderTrait.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/WorkflowBuilderTrait.php index 3084be57..b9d58e46 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/WorkflowBuilderTrait.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/WorkflowBuilderTrait.php @@ -11,9 +11,9 @@ trait WorkflowBuilderTrait { $places = range('a', 'g'); - $transitions = array(); - $transitions[] = new Transition('t1', 'a', array('b', 'c')); - $transitions[] = new Transition('t2', array('b', 'c'), 'd'); + $transitions = []; + $transitions[] = new Transition('t1', 'a', ['b', 'c']); + $transitions[] = new Transition('t2', ['b', 'c'], 'd'); $transitions[] = new Transition('t3', 'd', 'e'); $transitions[] = new Transition('t4', 'd', 'f'); $transitions[] = new Transition('t5', 'e', 'g'); @@ -37,7 +37,7 @@ trait WorkflowBuilderTrait { $places = range('a', 'c'); - $transitions = array(); + $transitions = []; $transitions[] = new Transition('t1', 'a', 'b'); $transitions[] = new Transition('t2', 'b', 'c'); @@ -53,8 +53,8 @@ trait WorkflowBuilderTrait { $places = range('a', 'c'); - $transitions = array(); - $transitions[] = new Transition('a_to_bc', 'a', array('b', 'c')); + $transitions = []; + $transitions[] = new Transition('a_to_bc', 'a', ['b', 'c']); $transitions[] = new Transition('b_to_c', 'b', 'c'); $transitions[] = new Transition('to_a', 'b', 'a'); $transitions[] = new Transition('to_a', 'c', 'a'); @@ -79,7 +79,7 @@ trait WorkflowBuilderTrait private function createComplexStateMachineDefinition() { - $places = array('a', 'b', 'c', 'd'); + $places = ['a', 'b', 'c', 'd']; $transitions[] = new Transition('t1', 'a', 'b'); $transitions[] = new Transition('t1', 'd', 'b'); diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/WorkflowTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/WorkflowTest.php index 547fb03e..68ebaafc 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/WorkflowTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/WorkflowTest.php @@ -25,7 +25,7 @@ class WorkflowTest extends TestCase { $subject = new \stdClass(); $subject->marking = null; - $workflow = new Workflow(new Definition(array(), array()), $this->getMockBuilder(MarkingStoreInterface::class)->getMock()); + $workflow = new Workflow(new Definition([], []), $this->getMockBuilder(MarkingStoreInterface::class)->getMock()); $workflow->getMarking($subject); } @@ -38,7 +38,7 @@ class WorkflowTest extends TestCase { $subject = new \stdClass(); $subject->marking = null; - $workflow = new Workflow(new Definition(array(), array()), new MultipleStateMarkingStore()); + $workflow = new Workflow(new Definition([], []), new MultipleStateMarkingStore()); $workflow->getMarking($subject); } @@ -50,8 +50,8 @@ class WorkflowTest extends TestCase public function testGetMarkingWithImpossiblePlace() { $subject = new \stdClass(); - $subject->marking = array('nope' => 1); - $workflow = new Workflow(new Definition(array(), array()), new MultipleStateMarkingStore()); + $subject->marking = ['nope' => 1]; + $workflow = new Workflow(new Definition([], []), new MultipleStateMarkingStore()); $workflow->getMarking($subject); } @@ -67,7 +67,7 @@ class WorkflowTest extends TestCase $this->assertInstanceOf(Marking::class, $marking); $this->assertTrue($marking->has('a')); - $this->assertSame(array('a' => 1), $subject->marking); + $this->assertSame(['a' => 1], $subject->marking); } public function testGetMarkingWithExistingMarking() @@ -75,7 +75,7 @@ class WorkflowTest extends TestCase $definition = $this->createComplexWorkflowDefinition(); $subject = new \stdClass(); $subject->marking = null; - $subject->marking = array('b' => 1, 'c' => 1); + $subject->marking = ['b' => 1, 'c' => 1]; $workflow = new Workflow($definition, new MultipleStateMarkingStore()); $marking = $workflow->getMarking($subject); @@ -105,19 +105,19 @@ class WorkflowTest extends TestCase $this->assertTrue($workflow->can($subject, 't1')); $this->assertFalse($workflow->can($subject, 't2')); - $subject->marking = array('b' => 1); + $subject->marking = ['b' => 1]; $this->assertFalse($workflow->can($subject, 't1')); // In a workflow net, all "from" places should contain a token to enable // the transition. $this->assertFalse($workflow->can($subject, 't2')); - $subject->marking = array('b' => 1, 'c' => 1); + $subject->marking = ['b' => 1, 'c' => 1]; $this->assertFalse($workflow->can($subject, 't1')); $this->assertTrue($workflow->can($subject, 't2')); - $subject->marking = array('f' => 1); + $subject->marking = ['f' => 1]; $this->assertFalse($workflow->can($subject, 't5')); $this->assertTrue($workflow->can($subject, 't6')); @@ -143,7 +143,7 @@ class WorkflowTest extends TestCase $subject = new \stdClass(); $subject->marking = null; - $dispatchedEvents = array(); + $dispatchedEvents = []; $eventDispatcher = new EventDispatcher(); $workflow = new Workflow($definition, new MultipleStateMarkingStore(), $eventDispatcher, 'workflow_name'); @@ -159,7 +159,7 @@ class WorkflowTest extends TestCase $workflow->can($subject, 't3'); - $this->assertSame(array('workflow_name.guard.t3'), $dispatchedEvents); + $this->assertSame(['workflow_name.guard.t3'], $dispatchedEvents); } /** @@ -187,7 +187,7 @@ class WorkflowTest extends TestCase $this->assertFalse($workflow->can($subject, 'b_to_c')); $this->assertFalse($workflow->can($subject, 'to_a')); - $subject->marking = array('b' => 1); + $subject->marking = ['b' => 1]; $this->assertFalse($workflow->can($subject, 'a_to_bc')); $this->assertTrue($workflow->can($subject, 'b_to_c')); $this->assertTrue($workflow->can($subject, 'to_a')); @@ -244,10 +244,10 @@ class WorkflowTest extends TestCase public function testApplyWithSameNameTransition2() { $subject = new \stdClass(); - $subject->marking = array('a' => 1, 'b' => 1); + $subject->marking = ['a' => 1, 'b' => 1]; $places = range('a', 'd'); - $transitions = array(); + $transitions = []; $transitions[] = new Transition('t', 'a', 'c'); $transitions[] = new Transition('t', 'b', 'd'); $definition = new Definition($places, $transitions); @@ -269,7 +269,7 @@ class WorkflowTest extends TestCase $eventDispatcher = new EventDispatcherMock(); $workflow = new Workflow($definition, new MultipleStateMarkingStore(), $eventDispatcher, 'workflow_name'); - $eventNameExpected = array( + $eventNameExpected = [ 'workflow.guard', 'workflow.workflow_name.guard', 'workflow.workflow_name.guard.t1', @@ -297,7 +297,7 @@ class WorkflowTest extends TestCase 'workflow.workflow_name.guard', 'workflow.workflow_name.guard.t2', 'workflow.workflow_name.announce.t2', - ); + ]; $marking = $workflow->apply($subject, 't1'); @@ -317,14 +317,14 @@ class WorkflowTest extends TestCase $this->assertEquals($name, $event->getWorkflowName()); }; - $eventNames = array( + $eventNames = [ 'workflow.guard', 'workflow.leave', 'workflow.transition', 'workflow.enter', 'workflow.entered', 'workflow.announce', - ); + ]; foreach ($eventNames as $eventName) { $dispatcher->addListener($eventName, $assertWorkflowName); @@ -335,20 +335,20 @@ class WorkflowTest extends TestCase public function testMarkingStateOnApplyWithEventDispatcher() { - $definition = new Definition(range('a', 'f'), array(new Transition('t', range('a', 'c'), range('d', 'f')))); + $definition = new Definition(range('a', 'f'), [new Transition('t', range('a', 'c'), range('d', 'f'))]); $subject = new \stdClass(); - $subject->marking = array('a' => 1, 'b' => 1, 'c' => 1); + $subject->marking = ['a' => 1, 'b' => 1, 'c' => 1]; $dispatcher = new EventDispatcher(); $workflow = new Workflow($definition, new MultipleStateMarkingStore(), $dispatcher, 'test'); $assertInitialState = function (Event $event) { - $this->assertEquals(new Marking(array('a' => 1, 'b' => 1, 'c' => 1)), $event->getMarking()); + $this->assertEquals(new Marking(['a' => 1, 'b' => 1, 'c' => 1]), $event->getMarking()); }; $assertTransitionState = function (Event $event) { - $this->assertEquals(new Marking(array()), $event->getMarking()); + $this->assertEquals(new Marking([]), $event->getMarking()); }; $dispatcher->addListener('workflow.leave', $assertInitialState); @@ -381,13 +381,13 @@ class WorkflowTest extends TestCase $this->assertEmpty($workflow->getEnabledTransitions($subject)); - $subject->marking = array('d' => 1); + $subject->marking = ['d' => 1]; $transitions = $workflow->getEnabledTransitions($subject); $this->assertCount(2, $transitions); $this->assertSame('t3', $transitions[0]->getName()); $this->assertSame('t4', $transitions[1]->getName()); - $subject->marking = array('c' => 1, 'e' => 1); + $subject->marking = ['c' => 1, 'e' => 1]; $transitions = $workflow->getEnabledTransitions($subject); $this->assertCount(1, $transitions); $this->assertSame('t5', $transitions[0]->getName()); @@ -404,7 +404,7 @@ class WorkflowTest extends TestCase $this->assertCount(1, $transitions); $this->assertSame('a_to_bc', $transitions[0]->getName()); - $subject->marking = array('b' => 1, 'c' => 1); + $subject->marking = ['b' => 1, 'c' => 1]; $transitions = $workflow->getEnabledTransitions($subject); $this->assertCount(3, $transitions); $this->assertSame('b_to_c', $transitions[0]->getName()); @@ -415,7 +415,7 @@ class WorkflowTest extends TestCase class EventDispatcherMock implements \Symfony\Component\EventDispatcher\EventDispatcherInterface { - public $dispatchedEvents = array(); + public $dispatchedEvents = []; public function dispatch($eventName, \Symfony\Component\EventDispatcher\Event $event = null) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Validator/StateMachineValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Validator/StateMachineValidator.php index 4f32ae51..7dbe6949 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Validator/StateMachineValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Validator/StateMachineValidator.php @@ -21,7 +21,7 @@ class StateMachineValidator implements DefinitionValidatorInterface { public function validate(Definition $definition, $name) { - $transitionFromNames = array(); + $transitionFromNames = []; foreach ($definition->getTransitions() as $transition) { // Make sure that each transition has exactly one TO if (1 !== \count($transition->getTos())) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Validator/WorkflowValidator.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Validator/WorkflowValidator.php index d271b0de..92534dd8 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Validator/WorkflowValidator.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Validator/WorkflowValidator.php @@ -32,7 +32,7 @@ class WorkflowValidator implements DefinitionValidatorInterface public function validate(Definition $definition, $name) { // Make sure all transitions for one place has unique name. - $places = array_fill_keys($definition->getPlaces(), array()); + $places = array_fill_keys($definition->getPlaces(), []); foreach ($definition->getTransitions() as $transition) { foreach ($transition->getFroms() as $from) { if (\in_array($transition->getName(), $places[$from])) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Workflow.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Workflow.php index d3d18f03..a0500b37 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Workflow.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Workflow/Workflow.php @@ -172,7 +172,7 @@ class Workflow */ public function getEnabledTransitions($subject) { - $enabled = array(); + $enabled = []; $marking = $this->getMarking($subject); foreach ($this->definition->getTransitions() as $transition) { diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/CHANGELOG.md b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/CHANGELOG.md index 1b07b239..fd41c9dd 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/CHANGELOG.md +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/CHANGELOG.md @@ -113,7 +113,7 @@ CHANGELOG * Added support for customizing the dumped YAML string through an optional bit field: ```php - Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE | Yaml::DUMP_OBJECT); + Yaml::dump(['foo' => new A(), 'bar' => 1], 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE | Yaml::DUMP_OBJECT); ``` 3.0.0 diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Command/LintCommand.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Command/LintCommand.php index 36e7e8b9..cc19a565 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Command/LintCommand.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Command/LintCommand.php @@ -91,14 +91,14 @@ EOF throw new RuntimeException('Please provide a filename or pipe file content to STDIN.'); } - return $this->display($io, array($this->validate($stdin, $flags))); + return $this->display($io, [$this->validate($stdin, $flags)]); } if (!$this->isReadable($filename)) { throw new RuntimeException(sprintf('File or directory "%s" is not readable.', $filename)); } - $filesInfo = array(); + $filesInfo = []; foreach ($this->getFiles($filename) as $file) { $filesInfo[] = $this->validate(file_get_contents($file), $flags, $file); } @@ -119,12 +119,12 @@ EOF try { $this->getParser()->parse($content, Yaml::PARSE_CONSTANT | $flags); } catch (ParseException $e) { - return array('file' => $file, 'line' => $e->getParsedLine(), 'valid' => false, 'message' => $e->getMessage()); + return ['file' => $file, 'line' => $e->getParsedLine(), 'valid' => false, 'message' => $e->getMessage()]; } finally { restore_error_handler(); } - return array('file' => $file, 'valid' => true); + return ['file' => $file, 'valid' => true]; } private function display(SymfonyStyle $io, array $files) @@ -188,7 +188,7 @@ EOF } foreach ($this->getDirectoryIterator($fileOrDirectory) as $file) { - if (!\in_array($file->getExtension(), array('yml', 'yaml'))) { + if (!\in_array($file->getExtension(), ['yml', 'yaml'])) { continue; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Escaper.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Escaper.php index 2b1321f6..4d3ce244 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Escaper.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Escaper.php @@ -28,20 +28,20 @@ class Escaper // first to ensure proper escaping because str_replace operates iteratively // on the input arrays. This ordering of the characters avoids the use of strtr, // which performs more slowly. - private static $escapees = array('\\', '\\\\', '\\"', '"', + private static $escapees = ['\\', '\\\\', '\\"', '"', "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9", - ); - private static $escaped = array('\\\\', '\\"', '\\\\', '\\"', + ]; + private static $escaped = ['\\\\', '\\"', '\\\\', '\\"', '\\0', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\a', '\\b', '\\t', '\\n', '\\v', '\\f', '\\r', '\\x0e', '\\x0f', '\\x10', '\\x11', '\\x12', '\\x13', '\\x14', '\\x15', '\\x16', '\\x17', '\\x18', '\\x19', '\\x1a', '\\e', '\\x1c', '\\x1d', '\\x1e', '\\x1f', '\\N', '\\_', '\\L', '\\P', - ); + ]; /** * Determines if a PHP value would require double quoting in YAML. @@ -78,7 +78,7 @@ class Escaper { // Determines if a PHP value is entirely composed of a value that would // require single quoting in YAML. - if (\in_array(strtolower($value), array('null', '~', 'true', 'false', 'y', 'n', 'yes', 'no', 'on', 'off'))) { + if (\in_array(strtolower($value), ['null', '~', 'true', 'false', 'y', 'n', 'yes', 'no', 'on', 'off'])) { return true; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Inline.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Inline.php index 7c9d4e03..5d71a1f3 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Inline.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Inline.php @@ -63,7 +63,7 @@ class Inline * * @throws ParseException */ - public static function parse($value, $flags = 0, $references = array()) + public static function parse($value, $flags = 0, $references = []) { if (\is_bool($flags)) { @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); @@ -93,7 +93,7 @@ class Inline if (\func_num_args() >= 5) { $references = func_get_arg(4); } else { - $references = array(); + $references = []; } } @@ -110,35 +110,37 @@ class Inline mb_internal_encoding('ASCII'); } - $i = 0; - $tag = self::parseTag($value, $i, $flags); - switch ($value[$i]) { - case '[': - $result = self::parseSequence($value, $flags, $i, $references); - ++$i; - break; - case '{': - $result = self::parseMapping($value, $flags, $i, $references); - ++$i; - break; - default: - $result = self::parseScalar($value, $flags, null, $i, null === $tag, $references); - } + try { + $i = 0; + $tag = self::parseTag($value, $i, $flags); + switch ($value[$i]) { + case '[': + $result = self::parseSequence($value, $flags, $i, $references); + ++$i; + break; + case '{': + $result = self::parseMapping($value, $flags, $i, $references); + ++$i; + break; + default: + $result = self::parseScalar($value, $flags, null, $i, null === $tag, $references); + } - if (null !== $tag) { - return new TaggedValue($tag, $result); - } + if (null !== $tag) { + return new TaggedValue($tag, $result); + } - // some comments are allowed at the end - if (preg_replace('/\s+#.*$/A', '', substr($value, $i))) { - throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i)), self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } + // some comments are allowed at the end + if (preg_replace('/\s+#.*$/A', '', substr($value, $i))) { + throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i)), self::$parsedLineNumber + 1, $value, self::$parsedFilename); + } - if (isset($mbEncoding)) { - mb_internal_encoding($mbEncoding); + return $result; + } finally { + if (isset($mbEncoding)) { + mb_internal_encoding($mbEncoding); + } } - - return $result; } /** @@ -283,7 +285,7 @@ class Inline { // array if (($value || Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE & $flags) && !self::isHash($value)) { - $output = array(); + $output = []; foreach ($value as $val) { $output[] = self::dump($val, $flags); } @@ -292,7 +294,7 @@ class Inline } // hash - $output = array(); + $output = []; foreach ($value as $key => $val) { $output[] = sprintf('%s: %s', self::dump($key, $flags), self::dump($val, $flags)); } @@ -316,9 +318,9 @@ class Inline * * @internal */ - public static function parseScalar($scalar, $flags = 0, $delimiters = null, &$i = 0, $evaluate = true, $references = array(), $legacyOmittedKeySupport = false) + public static function parseScalar($scalar, $flags = 0, $delimiters = null, &$i = 0, $evaluate = true, $references = [], $legacyOmittedKeySupport = false) { - if (\in_array($scalar[$i], array('"', "'"))) { + if (\in_array($scalar[$i], ['"', "'"])) { // quoted scalar $output = self::parseQuotedScalar($scalar, $i); @@ -407,9 +409,9 @@ class Inline * * @throws ParseException When malformed inline YAML string is parsed */ - private static function parseSequence($sequence, $flags, &$i = 0, $references = array()) + private static function parseSequence($sequence, $flags, &$i = 0, $references = []) { - $output = array(); + $output = []; $len = \strlen($sequence); ++$i; @@ -435,8 +437,8 @@ class Inline $value = self::parseMapping($sequence, $flags, $i, $references); break; default: - $isQuoted = \in_array($sequence[$i], array('"', "'")); - $value = self::parseScalar($sequence, $flags, array(',', ']'), $i, null === $tag, $references); + $isQuoted = \in_array($sequence[$i], ['"', "'"]); + $value = self::parseScalar($sequence, $flags, [',', ']'], $i, null === $tag, $references); // the value can be an array if a reference has been resolved to an array var if (\is_string($value) && !$isQuoted && false !== strpos($value, ': ')) { @@ -476,9 +478,9 @@ class Inline * * @throws ParseException When malformed inline YAML string is parsed */ - private static function parseMapping($mapping, $flags, &$i = 0, $references = array()) + private static function parseMapping($mapping, $flags, &$i = 0, $references = []) { - $output = array(); + $output = []; $len = \strlen($mapping); ++$i; $allowOverwrite = false; @@ -499,8 +501,8 @@ class Inline } // key - $isKeyQuoted = \in_array($mapping[$i], array('"', "'"), true); - $key = self::parseScalar($mapping, $flags, array(':', ' '), $i, false, array(), true); + $isKeyQuoted = \in_array($mapping[$i], ['"', "'"], true); + $key = self::parseScalar($mapping, $flags, [':', ' '], $i, false, [], true); if (':' !== $key && false === $i = strpos($mapping, ':', $i)) { break; @@ -518,7 +520,7 @@ class Inline } } - if (':' !== $key && !$isKeyQuoted && (!isset($mapping[$i + 1]) || !\in_array($mapping[$i + 1], array(' ', ',', '[', ']', '{', '}'), true))) { + if (':' !== $key && !$isKeyQuoted && (!isset($mapping[$i + 1]) || !\in_array($mapping[$i + 1], [' ', ',', '[', ']', '{', '}'], true))) { @trigger_error(self::getDeprecationMessage('Using a colon after an unquoted mapping key that is not followed by an indication character (i.e. " ", ",", "[", "]", "{", "}") is deprecated since Symfony 3.2 and will throw a ParseException in 4.0.'), E_USER_DEPRECATED); } @@ -576,7 +578,7 @@ class Inline } break; default: - $value = self::parseScalar($mapping, $flags, array(',', '}'), $i, null === $tag, $references); + $value = self::parseScalar($mapping, $flags, [',', '}'], $i, null === $tag, $references); // Spec: Keys MUST be unique; first one wins. // Parser cannot abort this mapping earlier, since lines // are processed sequentially. @@ -614,7 +616,7 @@ class Inline * * @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved */ - private static function evaluateScalar($scalar, $flags, $references = array()) + private static function evaluateScalar($scalar, $flags, $references = []) { $scalar = trim($scalar); $scalarLower = strtolower($scalar); @@ -631,7 +633,7 @@ class Inline throw new ParseException('A reference must contain at least one character.', self::$parsedLineNumber + 1, $value, self::$parsedFilename); } - if (!array_key_exists($value, $references)) { + if (!\array_key_exists($value, $references)) { throw new ParseException(sprintf('Reference "%s" does not exist.', $value), self::$parsedLineNumber + 1, $value, self::$parsedFilename); } @@ -764,7 +766,7 @@ class Inline @trigger_error(self::getDeprecationMessage('Using the comma as a group separator for floats is deprecated since Symfony 3.2 and will be removed in 4.0.'), E_USER_DEPRECATED); } - return (float) str_replace(array(',', '_'), '', $scalar); + return (float) str_replace([',', '_'], '', $scalar); case Parser::preg_match(self::getTimestampRegex(), $scalar): if (Yaml::PARSE_DATETIME & $flags) { // When no timezone is provided in the parsed date, YAML spec says we must assume UTC. @@ -803,7 +805,7 @@ class Inline $nextOffset += strspn($value, ' ', $nextOffset); // Is followed by a scalar - if ((!isset($value[$nextOffset]) || !\in_array($value[$nextOffset], array('[', '{'), true)) && 'tagged' !== $tag) { + if ((!isset($value[$nextOffset]) || !\in_array($value[$nextOffset], ['[', '{'], true)) && 'tagged' !== $tag) { // Manage non-whitelisted scalars in {@link self::evaluateScalar()} return; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/LICENSE b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/LICENSE index 21d7fb9e..a677f437 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/LICENSE +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Parser.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Parser.php index 36c9f1d9..cc094085 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Parser.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Parser.php @@ -29,12 +29,13 @@ class Parser private $filename; private $offset = 0; private $totalNumberOfLines; - private $lines = array(); + private $lines = []; private $currentLineNb = -1; private $currentLine = ''; - private $refs = array(); - private $skippedLineNumbers = array(); - private $locallySkippedLineNumbers = array(); + private $refs = []; + private $skippedLineNumbers = []; + private $locallySkippedLineNumbers = []; + private $refsBeingParsed = []; public function __construct() { @@ -126,7 +127,7 @@ class Parser throw new ParseException('The YAML value does not appear to be valid UTF-8.', -1, null, $this->filename); } - $this->refs = array(); + $this->refs = []; $mbEncoding = null; $e = null; @@ -147,11 +148,11 @@ class Parser mb_internal_encoding($mbEncoding); } - $this->lines = array(); + $this->lines = []; $this->currentLine = ''; - $this->refs = array(); - $this->skippedLineNumbers = array(); - $this->locallySkippedLineNumbers = array(); + $this->refs = []; + $this->skippedLineNumbers = []; + $this->locallySkippedLineNumbers = []; if (null !== $e) { throw $e; @@ -166,7 +167,7 @@ class Parser $this->currentLine = ''; $value = $this->cleanup($value); $this->lines = explode("\n", $value); - $this->locallySkippedLineNumbers = array(); + $this->locallySkippedLineNumbers = []; if (null === $this->totalNumberOfLines) { $this->totalNumberOfLines = \count($this->lines); @@ -176,7 +177,7 @@ class Parser return null; } - $data = array(); + $data = []; $context = null; $allowOverwrite = false; @@ -212,6 +213,7 @@ class Parser if (isset($values['value']) && self::preg_match('#^&(?P[^ ]+) *(?P.*)#u', $values['value'], $matches)) { $isRef = $matches['ref']; + $this->refsBeingParsed[] = $isRef; $values['value'] = $matches['value']; } @@ -244,10 +246,11 @@ class Parser } if ($isRef) { $this->refs[$isRef] = end($data); + array_pop($this->refsBeingParsed); } } elseif ( self::preg_match('#^(?P(?:![^\s]++\s++)?(?:'.Inline::REGEX_QUOTED_STRING.'|(?:!?!php/const:)?[^ \'"\[\{!].*?)) *\:(\s++(?P.+))?$#u', rtrim($this->currentLine), $values) - && (false === strpos($values['key'], ' #') || \in_array($values['key'][0], array('"', "'"))) + && (false === strpos($values['key'], ' #') || \in_array($values['key'][0], ['"', "'"])) ) { if ($context && 'sequence' == $context) { throw new ParseException('You cannot define a mapping item when in a sequence', $this->currentLineNb + 1, $this->currentLine, $this->filename); @@ -286,7 +289,11 @@ class Parser $allowOverwrite = true; if (isset($values['value'][0]) && '*' === $values['value'][0]) { $refName = substr(rtrim($values['value']), 1); - if (!array_key_exists($refName, $this->refs)) { + if (!\array_key_exists($refName, $this->refs)) { + if (false !== $pos = array_search($refName, $this->refsBeingParsed, true)) { + throw new ParseException(sprintf('Circular reference [%s, %s] detected for reference "%s".', implode(', ', \array_slice($this->refsBeingParsed, $pos)), $refName, $refName), $this->currentLineNb + 1, $this->currentLine, $this->filename); + } + throw new ParseException(sprintf('Reference "%s" does not exist.', $refName), $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } @@ -340,6 +347,7 @@ class Parser } } elseif ('<<' !== $key && isset($values['value']) && self::preg_match('#^&(?P[^ ]++) *+(?P.*)#u', $values['value'], $matches)) { $isRef = $matches['ref']; + $this->refsBeingParsed[] = $isRef; $values['value'] = $matches['value']; } @@ -395,6 +403,7 @@ class Parser } if ($isRef) { $this->refs[$isRef] = $data[$key]; + array_pop($this->refsBeingParsed); } } else { // multiple documents are not supported @@ -500,6 +509,7 @@ class Parser $parser->totalNumberOfLines = $this->totalNumberOfLines; $parser->skippedLineNumbers = $skippedLineNumbers; $parser->refs = &$this->refs; + $parser->refsBeingParsed = $this->refsBeingParsed; return $parser->doParse($yaml, $flags); } @@ -586,7 +596,7 @@ class Parser $newIndent = $indentation; } - $data = array(); + $data = []; if ($this->getCurrentLineIndentation() >= $newIndent) { $data[] = substr($this->currentLine, $newIndent); } elseif ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()) { @@ -688,7 +698,11 @@ class Parser $value = substr($value, 1); } - if (!array_key_exists($value, $this->refs)) { + if (!\array_key_exists($value, $this->refs)) { + if (false !== $pos = array_search($value, $this->refsBeingParsed, true)) { + throw new ParseException(sprintf('Circular reference [%s, %s] detected for reference "%s".', implode(', ', \array_slice($this->refsBeingParsed, $pos)), $value, $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); + } + throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); } @@ -721,7 +735,7 @@ class Parser return Inline::parse($value, $flags, $this->refs); } - $lines = array(); + $lines = []; while ($this->moveToNextLine()) { // unquoted strings end before the first unindented line @@ -786,7 +800,7 @@ class Parser } $isCurrentLineBlank = $this->isCurrentLineBlank(); - $blockLines = array(); + $blockLines = []; // leading blank lines are consumed before determining indentation while ($notEOF && $isCurrentLineBlank) { @@ -958,7 +972,7 @@ class Parser */ private function cleanup($value) { - $value = str_replace(array("\r\n", "\r"), "\n", $value); + $value = str_replace(["\r\n", "\r"], "\n", $value); // strip YAML header $count = 0; diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php index a5baf234..2bf0286b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php @@ -31,7 +31,7 @@ class LintCommandTest extends TestCase $tester = $this->createCommandTester(); $filename = $this->createFile('foo: bar'); - $ret = $tester->execute(array('filename' => $filename), array('verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false)); + $ret = $tester->execute(['filename' => $filename], ['verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false]); $this->assertEquals(0, $ret, 'Returns 0 in case of success'); $this->assertRegExp('/^\/\/ OK in /', trim($tester->getDisplay())); @@ -45,7 +45,7 @@ bar'; $tester = $this->createCommandTester(); $filename = $this->createFile($incorrectContent); - $ret = $tester->execute(array('filename' => $filename), array('decorated' => false)); + $ret = $tester->execute(['filename' => $filename], ['decorated' => false]); $this->assertEquals(1, $ret, 'Returns 1 in case of error'); $this->assertContains('Unable to parse at line 3 (near "bar").', trim($tester->getDisplay())); @@ -56,7 +56,7 @@ bar'; $yaml = <<createCommandTester()->execute(array('filename' => $this->createFile($yaml)), array('verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false)); + $ret = $this->createCommandTester()->execute(['filename' => $this->createFile($yaml)], ['verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false]); $this->assertSame(0, $ret, 'lint:yaml exits with code 0 in case of success'); } @@ -65,7 +65,7 @@ YAML; $yaml = <<createCommandTester()->execute(array('filename' => $this->createFile($yaml), '--parse-tags' => true), array('verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false)); + $ret = $this->createCommandTester()->execute(['filename' => $this->createFile($yaml), '--parse-tags' => true], ['verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false]); $this->assertSame(0, $ret, 'lint:yaml exits with code 0 in case of success'); } @@ -74,7 +74,7 @@ YAML; $yaml = <<createCommandTester()->execute(array('filename' => $this->createFile($yaml)), array('verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false)); + $ret = $this->createCommandTester()->execute(['filename' => $this->createFile($yaml)], ['verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false]); $this->assertSame(1, $ret, 'lint:yaml exits with code 1 in case of error'); } @@ -87,7 +87,7 @@ YAML; $filename = $this->createFile(''); unlink($filename); - $ret = $tester->execute(array('filename' => $filename), array('decorated' => false)); + $ret = $tester->execute(['filename' => $filename], ['decorated' => false]); } /** @@ -117,7 +117,7 @@ YAML; protected function setUp() { - $this->files = array(); + $this->files = []; @mkdir(sys_get_temp_dir().'/framework-yml-lint-test'); } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/DumperTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/DumperTest.php index d84a1408..e7a763ab 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/DumperTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/DumperTest.php @@ -22,20 +22,20 @@ class DumperTest extends TestCase protected $dumper; protected $path; - protected $array = array( + protected $array = [ '' => 'bar', 'foo' => '#bar', - 'foo\'bar' => array(), - 'bar' => array(1, 'foo'), - 'foobar' => array( + 'foo\'bar' => [], + 'bar' => [1, 'foo'], + 'foobar' => [ 'foo' => 'bar', - 'bar' => array(1, 'foo'), - 'foobar' => array( + 'bar' => [1, 'foo'], + 'foobar' => [ 'foo' => 'bar', - 'bar' => array(1, 'foo'), - ), - ), - ); + 'bar' => [1, 'foo'], + ], + ], + ]; protected function setUp() { @@ -208,7 +208,7 @@ EOF; public function testObjectSupportEnabled() { - $dump = $this->dumper->dump(array('foo' => new A(), 'bar' => 1), 0, 0, Yaml::DUMP_OBJECT); + $dump = $this->dumper->dump(['foo' => new A(), 'bar' => 1], 0, 0, Yaml::DUMP_OBJECT); $this->assertEquals('{ foo: !php/object \'O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}\', bar: 1 }', $dump, '->dump() is able to dump objects'); } @@ -218,14 +218,14 @@ EOF; */ public function testObjectSupportEnabledPassingTrue() { - $dump = $this->dumper->dump(array('foo' => new A(), 'bar' => 1), 0, 0, false, true); + $dump = $this->dumper->dump(['foo' => new A(), 'bar' => 1], 0, 0, false, true); $this->assertEquals('{ foo: !php/object \'O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}\', bar: 1 }', $dump, '->dump() is able to dump objects'); } public function testObjectSupportDisabledButNoExceptions() { - $dump = $this->dumper->dump(array('foo' => new A(), 'bar' => 1)); + $dump = $this->dumper->dump(['foo' => new A(), 'bar' => 1]); $this->assertEquals('{ foo: null, bar: 1 }', $dump, '->dump() does not dump objects when disabled'); } @@ -235,7 +235,7 @@ EOF; */ public function testObjectSupportDisabledWithExceptions() { - $this->dumper->dump(array('foo' => new A(), 'bar' => 1), 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE); + $this->dumper->dump(['foo' => new A(), 'bar' => 1], 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE); } /** @@ -244,18 +244,18 @@ EOF; */ public function testObjectSupportDisabledWithExceptionsPassingTrue() { - $this->dumper->dump(array('foo' => new A(), 'bar' => 1), 0, 0, true); + $this->dumper->dump(['foo' => new A(), 'bar' => 1], 0, 0, true); } public function testEmptyArray() { - $dump = $this->dumper->dump(array()); + $dump = $this->dumper->dump([]); $this->assertEquals('{ }', $dump); - $dump = $this->dumper->dump(array(), 0, 0, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE); + $dump = $this->dumper->dump([], 0, 0, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE); $this->assertEquals('[]', $dump); - $dump = $this->dumper->dump(array(), 9, 0, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE); + $dump = $this->dumper->dump([], 9, 0, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE); $this->assertEquals('[]', $dump); $dump = $this->dumper->dump(new \ArrayObject(), 0, 0, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE | Yaml::DUMP_OBJECT_AS_MAP); @@ -275,27 +275,27 @@ EOF; public function getEscapeSequences() { - return array( - 'empty string' => array('', "''"), - 'null' => array("\x0", '"\\0"'), - 'bell' => array("\x7", '"\\a"'), - 'backspace' => array("\x8", '"\\b"'), - 'horizontal-tab' => array("\t", '"\\t"'), - 'line-feed' => array("\n", '"\\n"'), - 'vertical-tab' => array("\v", '"\\v"'), - 'form-feed' => array("\xC", '"\\f"'), - 'carriage-return' => array("\r", '"\\r"'), - 'escape' => array("\x1B", '"\\e"'), - 'space' => array(' ', "' '"), - 'double-quote' => array('"', "'\"'"), - 'slash' => array('/', '/'), - 'backslash' => array('\\', '\\'), - 'next-line' => array("\xC2\x85", '"\\N"'), - 'non-breaking-space' => array("\xc2\xa0", '"\\_"'), - 'line-separator' => array("\xE2\x80\xA8", '"\\L"'), - 'paragraph-separator' => array("\xE2\x80\xA9", '"\\P"'), - 'colon' => array(':', "':'"), - ); + return [ + 'empty string' => ['', "''"], + 'null' => ["\x0", '"\\0"'], + 'bell' => ["\x7", '"\\a"'], + 'backspace' => ["\x8", '"\\b"'], + 'horizontal-tab' => ["\t", '"\\t"'], + 'line-feed' => ["\n", '"\\n"'], + 'vertical-tab' => ["\v", '"\\v"'], + 'form-feed' => ["\xC", '"\\f"'], + 'carriage-return' => ["\r", '"\\r"'], + 'escape' => ["\x1B", '"\\e"'], + 'space' => [' ', "' '"], + 'double-quote' => ['"', "'\"'"], + 'slash' => ['/', '/'], + 'backslash' => ['\\', '\\'], + 'next-line' => ["\xC2\x85", '"\\N"'], + 'non-breaking-space' => ["\xc2\xa0", '"\\_"'], + 'line-separator' => ["\xE2\x80\xA8", '"\\L"'], + 'paragraph-separator' => ["\xE2\x80\xA9", '"\\P"'], + 'colon' => [':', "':'"], + ]; } public function testBinaryDataIsDumpedBase64Encoded() @@ -303,7 +303,7 @@ EOF; $binaryData = file_get_contents(__DIR__.'/Fixtures/arrow.gif'); $expected = '{ data: !!binary '.base64_encode($binaryData).' }'; - $this->assertSame($expected, $this->dumper->dump(array('data' => $binaryData))); + $this->assertSame($expected, $this->dumper->dump(['data' => $binaryData])); } public function testNonUtf8DataIsDumpedBase64Encoded() @@ -324,18 +324,18 @@ EOF; public function objectAsMapProvider() { - $tests = array(); + $tests = []; $bar = new \stdClass(); $bar->class = 'classBar'; - $bar->args = array('bar'); + $bar->args = ['bar']; $zar = new \stdClass(); $foo = new \stdClass(); $foo->bar = $bar; $foo->zar = $zar; $object = new \stdClass(); $object->foo = $foo; - $tests['stdClass'] = array($object, $object); + $tests['stdClass'] = [$object, $object]; $arrayObject = new \ArrayObject(); $arrayObject['foo'] = 'bar'; @@ -343,19 +343,19 @@ EOF; $parsedArrayObject = new \stdClass(); $parsedArrayObject->foo = 'bar'; $parsedArrayObject->baz = 'foobar'; - $tests['ArrayObject'] = array($arrayObject, $parsedArrayObject); + $tests['ArrayObject'] = [$arrayObject, $parsedArrayObject]; $a = new A(); - $tests['arbitrary-object'] = array($a, null); + $tests['arbitrary-object'] = [$a, null]; return $tests; } public function testDumpingArrayObjectInstancesRespectsInlineLevel() { - $deep = new \ArrayObject(array('deep1' => 'd', 'deep2' => 'e')); - $inner = new \ArrayObject(array('inner1' => 'b', 'inner2' => 'c', 'inner3' => $deep)); - $outer = new \ArrayObject(array('outer1' => 'a', 'outer2' => $inner)); + $deep = new \ArrayObject(['deep1' => 'd', 'deep2' => 'e']); + $inner = new \ArrayObject(['inner1' => 'b', 'inner2' => 'c', 'inner3' => $deep]); + $outer = new \ArrayObject(['outer1' => 'a', 'outer2' => $inner]); $yaml = $this->dumper->dump($outer, 2, 0, Yaml::DUMP_OBJECT_AS_MAP); @@ -372,9 +372,9 @@ YAML; public function testDumpingArrayObjectInstancesWithNumericKeysInlined() { - $deep = new \ArrayObject(array('d', 'e')); - $inner = new \ArrayObject(array('b', 'c', $deep)); - $outer = new \ArrayObject(array('a', $inner)); + $deep = new \ArrayObject(['d', 'e']); + $inner = new \ArrayObject(['b', 'c', $deep]); + $outer = new \ArrayObject(['a', $inner]); $yaml = $this->dumper->dump($outer, 0, 0, Yaml::DUMP_OBJECT_AS_MAP); $expected = <<dumper->dump($outer, 2, 0, Yaml::DUMP_OBJECT_AS_MAP); $expected = << array( + $data = [ + 'data' => [ 'single_line' => 'foo bar baz', 'multi_line' => "foo\nline with trailing spaces:\n \nbar\ninteger like line:\n123456789\nempty line:\n\nbaz", 'multi_line_with_carriage_return' => "foo\nbar\r\nbaz", - 'nested_inlined_multi_line_string' => array( + 'nested_inlined_multi_line_string' => [ 'inlined_multi_line' => "foo\nbar\r\nempty line:\n\nbaz", - ), - ), - ); + ], + ], + ]; $this->assertSame(file_get_contents(__DIR__.'/Fixtures/multiple_lines_as_literal_block.yml'), $this->dumper->dump($data, 2, 0, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK)); } public function testDumpMultiLineStringAsScalarBlockWhenFirstLineHasLeadingSpace() { - $data = array( - 'data' => array( + $data = [ + 'data' => [ 'multi_line' => " the first line has leading spaces\nThe second line does not.", - ), - ); + ], + ]; $this->assertSame(file_get_contents(__DIR__.'/Fixtures/multiple_lines_as_literal_block_leading_space_in_first_line.yml'), $this->dumper->dump($data, 2, 0, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK)); } public function testCarriageReturnIsMaintainedWhenDumpingAsMultiLineLiteralBlock() { - $this->assertSame("- \"a\\r\\nb\\nc\"\n", $this->dumper->dump(array("a\r\nb\nc"), 2, 0, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK)); + $this->assertSame("- \"a\\r\\nb\\nc\"\n", $this->dumper->dump(["a\r\nb\nc"], 2, 0, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK)); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsAnchorAlias.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsAnchorAlias.yml index 5f9c9427..81b4129a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsAnchorAlias.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsAnchorAlias.yml @@ -14,7 +14,7 @@ yaml: | - Oren - *showell php: | - array('Steve', 'Clark', 'Brian', 'Oren', 'Steve') + ['Steve', 'Clark', 'Brian', 'Oren', 'Steve'] --- test: Alias of a Mapping @@ -28,4 +28,4 @@ yaml: | - banana - *hello php: | - array(array('Meat'=>'pork', 'Starch'=>'potato'), 'banana', array('Meat'=>'pork', 'Starch'=>'potato')) + [['Meat'=>'pork', 'Starch'=>'potato'], 'banana', ['Meat'=>'pork', 'Starch'=>'potato']] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsBasicTests.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsBasicTests.yml index dfd93021..1a08d8ea 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsBasicTests.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsBasicTests.yml @@ -9,7 +9,7 @@ yaml: | - banana - carrot php: | - array('apple', 'banana', 'carrot') + ['apple', 'banana', 'carrot'] --- test: Sequence With Item Being Null In The Middle brief: | @@ -21,7 +21,7 @@ yaml: | - - carrot php: | - array('apple', null, 'carrot') + ['apple', null, 'carrot'] --- test: Sequence With Last Item Being Null brief: | @@ -33,7 +33,7 @@ yaml: | - banana - php: | - array('apple', 'banana', null) + ['apple', 'banana', null] --- test: Nested Sequences brief: | @@ -46,7 +46,7 @@ yaml: | - bar - baz php: | - array(array('foo', 'bar', 'baz')) + [['foo', 'bar', 'baz']] --- test: Mixed Sequences brief: | @@ -61,7 +61,7 @@ yaml: | - banana - carrot php: | - array('apple', array('foo', 'bar', 'x123'), 'banana', 'carrot') + ['apple', ['foo', 'bar', 'x123'], 'banana', 'carrot'] --- test: Deeply Nested Sequences brief: | @@ -74,7 +74,7 @@ yaml: | - uno - dos php: | - array(array(array('uno', 'dos'))) + [[['uno', 'dos']]] --- test: Simple Mapping brief: | @@ -87,7 +87,7 @@ yaml: | foo: whatever bar: stuff php: | - array('foo' => 'whatever', 'bar' => 'stuff') + ['foo' => 'whatever', 'bar' => 'stuff'] --- test: Sequence in a Mapping brief: | @@ -98,7 +98,7 @@ yaml: | - uno - dos php: | - array('foo' => 'whatever', 'bar' => array('uno', 'dos')) + ['foo' => 'whatever', 'bar' => ['uno', 'dos']] --- test: Nested Mappings brief: | @@ -110,14 +110,14 @@ yaml: | name: steve sport: baseball php: | - array( + [ 'foo' => 'whatever', - 'bar' => array( + 'bar' => [ 'fruit' => 'apple', 'name' => 'steve', 'sport' => 'baseball' - ) - ) + ] + ] --- test: Mixed Mapping brief: | @@ -136,22 +136,22 @@ yaml: | perl: papers ruby: scissorses php: | - array( + [ 'foo' => 'whatever', - 'bar' => array( - array( + 'bar' => [ + [ 'fruit' => 'apple', 'name' => 'steve', 'sport' => 'baseball' - ), + ], 'more', - array( + [ 'python' => 'rocks', 'perl' => 'papers', 'ruby' => 'scissorses' - ) - ) - ) + ] + ] + ] --- test: Mapping-in-Sequence Shortcut todo: true @@ -163,7 +163,7 @@ yaml: | - work on YAML.py: - work on Store php: | - array(array('work on YAML.py' => array('work on Store'))) + [['work on YAML.py' => ['work on Store']]] --- test: Sequence-in-Mapping Shortcut todo: true @@ -177,7 +177,7 @@ yaml: | - '%.sourceforge.net' - '%.freepan.org' php: | - array('allow' => array('localhost', '%.sourceforge.net', '%.freepan.org')) + ['allow' => ['localhost', '%.sourceforge.net', '%.freepan.org']] --- todo: true test: Merge key @@ -192,11 +192,11 @@ yaml: | <<: age: 38 php: | - array( + [ 'mapping' => - array( + [ 'name' => 'Joe', 'job' => 'Accountant', 'age' => 38 - ) - ) + ] + ] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsBlockMapping.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsBlockMapping.yml index f7ca469b..1f3a2e54 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsBlockMapping.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsBlockMapping.yml @@ -5,7 +5,7 @@ brief: | yaml: | foo: bar php: | - array('foo' => 'bar') + ['foo' => 'bar'] --- test: Multi Element Mapping brief: | @@ -15,11 +15,11 @@ yaml: | white: walls blue: berries php: | - array( + [ 'red' => 'baron', 'white' => 'walls', 'blue' => 'berries', - ) + ] --- test: Values aligned brief: | @@ -30,11 +30,11 @@ yaml: | white: walls blue: berries php: | - array( + [ 'red' => 'baron', 'white' => 'walls', 'blue' => 'berries', - ) + ] --- test: Colons aligned brief: | @@ -44,8 +44,8 @@ yaml: | white : walls blue : berries php: | - array( + [ 'red' => 'baron', 'white' => 'walls', 'blue' => 'berries', - ) + ] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsDocumentSeparator.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsDocumentSeparator.yml index d9881025..67cb47ad 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsDocumentSeparator.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsDocumentSeparator.yml @@ -49,7 +49,7 @@ yaml: | foo: 1 bar: 2 php: | - array('foo' => 1, 'bar' => 2) + ['foo' => 1, 'bar' => 2] documents: 1 --- @@ -63,7 +63,7 @@ yaml: | foo: | --- php: | - array('foo' => "---\n") + ['foo' => "---\n"] --- test: Multiple Document Separators in Block @@ -79,7 +79,7 @@ yaml: | bar: | fooness php: | - array( + [ 'foo' => "---\nfoo: bar\n---\nyo: baz\n", 'bar' => "fooness\n" - ) + ] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsErrorTests.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsErrorTests.yml index e8506fcb..e8697f93 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsErrorTests.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsErrorTests.yml @@ -22,4 +22,4 @@ yaml: | firstline: 1 secondline: 2 php: | - array('foo' => null, 'firstline' => 1, 'secondline' => 2) + ['foo' => null, 'firstline' => 1, 'secondline' => 2] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsFlowCollections.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsFlowCollections.yml index 03090e4a..cc562cd9 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsFlowCollections.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsFlowCollections.yml @@ -8,7 +8,7 @@ brief: > yaml: | seq: [ a, b, c ] php: | - array('seq' => array('a', 'b', 'c')) + ['seq' => ['a', 'b', 'c']] --- test: Simple Inline Hash brief: > @@ -21,7 +21,7 @@ brief: > yaml: | hash: { name: Steve, foo: bar } php: | - array('hash' => array('name' => 'Steve', 'foo' => 'bar')) + ['hash' => ['name' => 'Steve', 'foo' => 'bar']] --- test: Multi-line Inline Collections todo: true @@ -38,15 +38,15 @@ yaml: | Python: python.org, Perl: use.perl.org } php: | - array( - 'languages' => array('Ruby', 'Perl', 'Python'), - 'websites' => array( + [ + 'languages' => ['Ruby', 'Perl', 'Python'], + 'websites' => [ 'YAML' => 'yaml.org', 'Ruby' => 'ruby-lang.org', 'Python' => 'python.org', 'Perl' => 'use.perl.org' - ) - ) + ] + ] --- test: Commas in Values (not in the spec!) todo: true @@ -57,4 +57,4 @@ brief: > yaml: | attendances: [ 45,123, 70,000, 17,222 ] php: | - array('attendances' => array(45123, 70000, 17222)) + ['attendances' => [45123, 70000, 17222]] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsFoldedScalars.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsFoldedScalars.yml index a14735a5..2895202a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsFoldedScalars.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsFoldedScalars.yml @@ -12,7 +12,7 @@ yaml: | Foo Bar php: | - array('this' => "Foo\nBar\n") + ['this' => "Foo\nBar\n"] --- test: The '+' indicator brief: > @@ -28,11 +28,11 @@ yaml: | dummy: value php: | - array( + [ 'normal' => "extra new lines not kept\n", 'preserving' => "extra new lines are kept\n\n\n", 'dummy' => 'value' - ) + ] --- test: Three trailing newlines in literals brief: > @@ -64,14 +64,14 @@ yaml: | same as "kept" above: "This has four newlines.\n\n\n\n" php: | - array( + [ 'clipped' => "This has one newline.\n", 'same as "clipped" above' => "This has one newline.\n", 'stripped' => 'This has no newline.', 'same as "stripped" above' => 'This has no newline.', 'kept' => "This has four newlines.\n\n\n\n", 'same as "kept" above' => "This has four newlines.\n\n\n\n" - ) + ] --- test: Extra trailing newlines with spaces todo: true @@ -95,8 +95,8 @@ yaml: | php: | - array('this' => "Foo\n\n \n", - 'kept' => "Foo\n\n \n" ) + ['this' => "Foo\n\n \n", + 'kept' => "Foo\n\n \n"] --- test: Folded Block in a Sequence @@ -115,12 +115,12 @@ yaml: | hmm - dog php: | - array( + [ 'apple', 'banana', "can't you see the beauty of yaml? hmm\n", 'dog' - ) + ] --- test: Folded Block as a Mapping Value brief: > @@ -135,10 +135,10 @@ yaml: | by a knee injury. source: espn php: | - array( + [ 'quote' => "Mark McGwire's year was crippled by a knee injury.\n", 'source' => 'espn' - ) + ] --- test: Three trailing newlines in folded blocks brief: > @@ -166,11 +166,11 @@ yaml: | same as "kept" above: "This has four newlines.\n\n\n\n" php: | - array( + [ 'clipped' => "This has one newline.\n", 'same as "clipped" above' => "This has one newline.\n", 'stripped' => 'This has no newline.', 'same as "stripped" above' => 'This has no newline.', 'kept' => "This has four newlines.\n\n\n\n", 'same as "kept" above' => "This has four newlines.\n\n\n\n" - ) + ] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsNullsAndEmpties.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsNullsAndEmpties.yml index 9a5300f2..ea8e36ed 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsNullsAndEmpties.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsNullsAndEmpties.yml @@ -6,7 +6,7 @@ brief: > yaml: | empty: [] php: | - array('empty' => array()) + ['empty' => []] --- test: Empty Mapping brief: > @@ -15,19 +15,19 @@ brief: > yaml: | empty: {} php: | - array('empty' => array()) + ['empty' => []] --- test: Empty Sequence as Entire Document yaml: | [] php: | - array() + [] --- test: Empty Mapping as Entire Document yaml: | {} php: | - array() + [] --- test: Null as Document yaml: | diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsSpecificationExamples.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsSpecificationExamples.yml index 3f93c982..4ecd828f 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsSpecificationExamples.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsSpecificationExamples.yml @@ -6,7 +6,7 @@ yaml: | - Sammy Sosa - Ken Griffey php: | - array('Mark McGwire', 'Sammy Sosa', 'Ken Griffey') + ['Mark McGwire', 'Sammy Sosa', 'Ken Griffey'] --- test: Mapping of scalars to scalars spec: 2.2 @@ -15,7 +15,7 @@ yaml: | avg: 0.278 rbi: 147 php: | - array('hr' => 65, 'avg' => 0.278, 'rbi' => 147) + ['hr' => 65, 'avg' => 0.278, 'rbi' => 147] --- test: Mapping of scalars to sequences spec: 2.3 @@ -29,13 +29,13 @@ yaml: | - Chicago Cubs - Atlanta Braves php: | - array('american' => - array( 'Boston Red Sox', 'Detroit Tigers', - 'New York Yankees' ), + ['american' => + ['Boston Red Sox', 'Detroit Tigers', + 'New York Yankees'], 'national' => - array( 'New York Mets', 'Chicago Cubs', - 'Atlanta Braves' ) - ) + ['New York Mets', 'Chicago Cubs', + 'Atlanta Braves'] + ] --- test: Sequence of mappings spec: 2.4 @@ -49,10 +49,10 @@ yaml: | hr: 63 avg: 0.288 php: | - array( - array('name' => 'Mark McGwire', 'hr' => 65, 'avg' => 0.278), - array('name' => 'Sammy Sosa', 'hr' => 63, 'avg' => 0.288) - ) + [ + ['name' => 'Mark McGwire', 'hr' => 65, 'avg' => 0.278], + ['name' => 'Sammy Sosa', 'hr' => 63, 'avg' => 0.288] + ] --- test: Legacy A5 todo: true @@ -134,11 +134,11 @@ yaml: | - [ Mark McGwire , 65 , 0.278 ] - [ Sammy Sosa , 63 , 0.288 ] php: | - array( - array( 'name', 'hr', 'avg' ), - array( 'Mark McGwire', 65, 0.278 ), - array( 'Sammy Sosa', 63, 0.288 ) - ) + [ + [ 'name', 'hr', 'avg' ], + [ 'Mark McGwire', 65, 0.278 ], + [ 'Sammy Sosa', 63, 0.288 ] + ] --- test: Mapping of mappings todo: true @@ -150,12 +150,12 @@ yaml: | avg: 0.288 } php: | - array( + [ 'Mark McGwire' => - array( 'hr' => 65, 'avg' => 0.278 ), + [ 'hr' => 65, 'avg' => 0.278 ], 'Sammy Sosa' => - array( 'hr' => 63, 'avg' => 0.288 ) - ) + [ 'hr' => 63, 'avg' => 0.288 ] + ] --- test: Two documents in a stream each with a leading comment todo: true @@ -208,10 +208,10 @@ yaml: | - Sammy Sosa - Ken Griffey php: | - array( - 'hr' => array( 'Mark McGwire', 'Sammy Sosa' ), - 'rbi' => array( 'Sammy Sosa', 'Ken Griffey' ) - ) + [ + 'hr' => [ 'Mark McGwire', 'Sammy Sosa' ], + 'rbi' => [ 'Sammy Sosa', 'Ken Griffey' ] + ] --- test: Node for Sammy Sosa appears twice in this document spec: 2.10 @@ -225,12 +225,12 @@ yaml: | - *SS # Subsequent occurrence - Ken Griffey php: | - array( + [ 'hr' => - array('Mark McGwire', 'Sammy Sosa'), + ['Mark McGwire', 'Sammy Sosa'], 'rbi' => - array('Sammy Sosa', 'Ken Griffey') - ) + ['Sammy Sosa', 'Ken Griffey'] + ] --- test: Mapping between sequences todo: true @@ -297,20 +297,20 @@ yaml: | - item : Big Shoes quantity: 1 php: | - array ( - array ( + [ + [ 'item' => 'Super Hoop', 'quantity' => 1, - ), - array ( + ], + [ 'item' => 'Basketball', 'quantity' => 4, - ), - array ( + ], + [ 'item' => 'Big Shoes', 'quantity' => 1, - ) - ) + ] + ] perl: | [ { item => 'Super Hoop', quantity => 1 }, @@ -462,11 +462,11 @@ yaml: | 65 Home Runs 0.278 Batting Average php: | - array( + [ 'name' => 'Mark McGwire', 'accomplishment' => "Mark set a major league home run record in 1998.\n", 'stats' => "65 Home Runs\n0.278 Batting Average\n" - ) + ] --- test: Quoted scalars todo: true @@ -512,11 +512,11 @@ yaml: | octal: 014 hexadecimal: 0xC php: | - array( + [ 'canonical' => 12345, 'octal' => 014, 'hexadecimal' => 0xC - ) + ] --- test: Decimal Integer deprecated: true @@ -524,9 +524,9 @@ spec: 2.19 yaml: | decimal: +12,345 php: | - array( + [ 'decimal' => 12345.0, - ) + ] --- # FIX: spec shows parens around -inf and NaN test: Floating point @@ -538,13 +538,13 @@ yaml: | not a number: .NaN float as whole number: !!float 1 php: | - array( + [ 'canonical' => 1230.15, 'exponential' => 1230.15, 'negative infinity' => log(0), 'not a number' => -log(0), 'float as whole number' => (float) 1 - ) + ] --- test: Fixed Floating point deprecated: true @@ -552,9 +552,9 @@ spec: 2.20 yaml: | fixed: 1,230.15 php: | - array( + [ 'fixed' => 1230.15, - ) + ] --- test: Timestamps todo: true @@ -565,12 +565,12 @@ yaml: | spaced: 2001-12-14 21:59:43.10 -05:00 date: 2002-12-14 # Time is noon UTC php: | - array( + [ 'canonical' => YAML::mktime( 2001, 12, 15, 2, 59, 43, 0.10 ), 'iso8601' => YAML::mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ), 'spaced' => YAML::mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ), 'date' => Date.new( 2002, 12, 14 ) - ) + ] --- test: legacy Timestamps test todo: true @@ -581,12 +581,12 @@ yaml: | spaced: 2001-12-14 21:59:43.00 -05:00 date: 2002-12-14 php: | - array( + [ 'canonical' => Time::utc( 2001, 12, 15, 2, 59, 43, 0 ), 'iso8601' => YAML::mktime( 2001, 2, 28, 21, 59, 43, 0, "-05:00" ), 'spaced' => YAML::mktime( 2001, 12, 14, 21, 59, 43, 0, "-05:00" ), 'date' => Date.new( 2002, 12, 14 ) - ) + ] --- test: Various explicit families todo: true @@ -754,20 +754,20 @@ yaml: | Backup contact is Nancy Billsmer @ 338-4338. php: | - array( + [ 'invoice' => 34843, 'date' => gmmktime(0, 0, 0, 1, 23, 2001), 'bill-to' => - array( 'given' => 'Chris', 'family' => 'Dumars', 'address' => array( 'lines' => "458 Walkman Dr.\nSuite #292\n", 'city' => 'Royal Oak', 'state' => 'MI', 'postal' => 48046 ) ) + [ 'given' => 'Chris', 'family' => 'Dumars', 'address' => [ 'lines' => "458 Walkman Dr.\nSuite #292\n", 'city' => 'Royal Oak', 'state' => 'MI', 'postal' => 48046 ] ] , 'ship-to' => - array( 'given' => 'Chris', 'family' => 'Dumars', 'address' => array( 'lines' => "458 Walkman Dr.\nSuite #292\n", 'city' => 'Royal Oak', 'state' => 'MI', 'postal' => 48046 ) ) + [ 'given' => 'Chris', 'family' => 'Dumars', 'address' => [ 'lines' => "458 Walkman Dr.\nSuite #292\n", 'city' => 'Royal Oak', 'state' => 'MI', 'postal' => 48046 ] ] , 'product' => - array( - array( 'sku' => 'BL394D', 'quantity' => 4, 'description' => 'Basketball', 'price' => 450.00 ), - array( 'sku' => 'BL4438H', 'quantity' => 1, 'description' => 'Super Hoop', 'price' => 2392.00 ) - ), + [ + [ 'sku' => 'BL394D', 'quantity' => 4, 'description' => 'Basketball', 'price' => 450.00 ], + [ 'sku' => 'BL4438H', 'quantity' => 1, 'description' => 'Super Hoop', 'price' => 2392.00 ] + ], 'tax' => 251.42, 'total' => 4443.52, 'comments' => "Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338.\n" - ) + ] --- test: Log file todo: true @@ -826,9 +826,9 @@ yaml: | # These are three throwaway comment # lines (the first line is empty). php: | - array( + [ 'this' => "contains three lines of text.\nThe third one starts with a\n# character. This isn't a comment.\n" - ) + ] --- test: Document with a single value todo: true @@ -878,11 +878,11 @@ yaml: | date : 2001-01-23 total : 4443.52 php: | - array( + [ 'invoice' => 34843, 'date' => gmmktime(0, 0, 0, 1, 23, 2001), 'total' => 4443.52 - ) + ] --- test: Single-line documents todo: true @@ -934,7 +934,7 @@ yaml: | also int: ! "12" string: !!str 12 php: | - array( 'integer' => 12, 'also int' => 12, 'string' => '12' ) + [ 'integer' => 12, 'also int' => 12, 'string' => '12' ] --- test: Private types todo: true @@ -966,7 +966,7 @@ yaml: | # The URI is 'tag:yaml.org,2002:str' - !!str a Unicode string php: | - array( 'a Unicode string' ) + [ 'a Unicode string' ] --- test: Type family under perl.yaml.org todo: true @@ -1039,9 +1039,9 @@ yaml: | repeated use of this value. alias : *A001 php: | - array( 'anchor' => 'This scalar has an anchor.', + [ 'anchor' => 'This scalar has an anchor.', 'override' => "The alias node below is a repeated use of this value.\n", - 'alias' => "The alias node below is a repeated use of this value.\n" ) + 'alias' => "The alias node below is a repeated use of this value.\n"] --- test: Flow and block formatting todo: true @@ -1152,12 +1152,12 @@ yaml: | redundant: |2 This value is indented 2 spaces. php: | - array( + [ 'leading spaces' => " This value starts with four spaces.\n", 'leading line break' => "\nThis value starts with a line break.\n", 'leading comment indicator' => "# first line starts with a\n# character.\n", 'redundant' => "This value is indented 2 spaces.\n" - ) + ] --- test: Chomping and keep modifiers yaml: | @@ -1176,14 +1176,14 @@ yaml: | same as "kept" above: "This has two newlines.\n\n" php: | - array( + [ 'clipped' => "This has one newline.\n", 'same as "clipped" above' => "This has one newline.\n", 'stripped' => 'This has no newline.', 'same as "stripped" above' => 'This has no newline.', 'kept' => "This has two newlines.\n\n", 'same as "kept" above' => "This has two newlines.\n\n" - ) + ] --- test: Literal combinations todo: true @@ -1221,7 +1221,7 @@ yaml: | both are equal to: " This has no newline." php: | - array( + [ 'empty' => '', 'literal' => "The \\ ' \" characters may be\nfreely used. Leading white\n space " + "is significant.\n\nLine breaks are significant.\nThus this value contains one\n" + @@ -1232,7 +1232,7 @@ php: | 'indented and chomped' => ' This has no newline.', 'also written as' => ' This has no newline.', 'both are equal to' => ' This has no newline.' - ) + [ --- test: Folded combinations todo: true @@ -1288,7 +1288,7 @@ yaml: | # Explicit comments may follow # but must be less indented. php: | - array( + [ 'empty' => '', 'one paragraph' => 'Line feeds are converted to spaces, so this value'. " contains no line breaks except for the final one.\n", @@ -1300,7 +1300,7 @@ php: | 'above is equal to' => "This is a folded paragraph followed by a list:\n". " * first entry\n * second entry\nFollowed by another folded paragraph, ". "another list:\n\n * first entry\n\n * second entry\n\nAnd a final folded paragraph.\n" - ) + ] --- test: Single quotes todo: true @@ -1315,13 +1315,13 @@ yaml: | line break' is same as: "this contains six spaces\nand one line break" php: | - array( + [ 'empty' => '', 'second' => '! : \\ etc. can be used freely.', 'third' => "a single quote ' must be escaped.", 'span' => "this contains six spaces\nand one line break", 'is same as' => "this contains six spaces\nand one line break" - ) + ] --- test: Double quotes todo: true @@ -1335,14 +1335,14 @@ yaml: | spaces" is equal to: "this contains four spaces" php: | - array( + [ 'empty' => '', 'second' => '! : etc. can be used freely.', 'third' => 'a " or a \\ must be escaped.', 'fourth' => "this value ends with an LF.\n", 'span' => "this contains four spaces", 'is equal to' => "this contains four spaces" - ) + ] --- test: Unquoted strings todo: true @@ -1371,7 +1371,7 @@ yaml: | note: { one-line keys: but multi-line values } php: | - array( + [ 'first' => 'There is no unquoted empty string.', 'second' => 12, 'third' => '12', @@ -1379,7 +1379,7 @@ php: | 'indicators' => "this has no comments. #:foo and bar# are both text.", 'flow' => [ 'can span lines', 'like this' ], 'note' => { 'one-line keys' => 'but multi-line values' } - ) + ] --- test: Spanning sequences todo: true @@ -1393,11 +1393,11 @@ yaml: | - one - two php: | - array( + [ 'flow' => [ 'one', 'two' ], 'spanning' => [ 'one', 'two' ], 'block' => [ 'one', 'two' ] - ) + ] --- test: Flow mappings yaml: | @@ -1408,10 +1408,10 @@ yaml: | one: 1 two: 2 php: | - array( - 'flow' => array( 'one' => 1, 'two' => 2 ), - 'block' => array( 'one' => 1, 'two' => 2 ) - ) + [ + 'flow' => [ 'one' => 1, 'two' => 2 ], + 'block' => [ 'one' => 1, 'two' => 2 ] + ] --- test: Representations of 12 todo: true @@ -1433,7 +1433,7 @@ yaml: | - foo/bar - /a.*b/ php: | - array( 12, '12', '12', '12', '12', '/foo/bar', 'd:/foo/bar', 'foo/bar', '/a.*b/' ) + [ 12, '12', '12', '12', '12', '/foo/bar', 'd:/foo/bar', 'foo/bar', '/a.*b/' ] --- test: "Null" todo: true @@ -1455,12 +1455,12 @@ yaml: | only two with values. php: | - array ( + [ 'canonical' => null, 'english' => null, - 'sparse' => array( null, '2nd entry', null, '4th entry', null ]), + 'sparse' => [ null, '2nd entry', null, '4th entry', null ]], 'four' => 'This mapping has five keys, only two with values.' - ) + ] --- test: Omap todo: true @@ -1525,29 +1525,29 @@ yaml: | octal: 014 hexadecimal: 0xC php: | - array( + [ 'canonical' => 12345, 'octal' => 12, 'hexadecimal' => 12 - ) + ] --- test: Decimal deprecated: true yaml: | decimal: +12,345 php: | - array( + [ 'decimal' => 12345.0, - ) + ] --- test: Fixed Float deprecated: true yaml: | fixed: 1,230.15 php: | - array( + [ 'fixed' => 1230.15, - ) + ] --- test: Float yaml: | @@ -1556,12 +1556,12 @@ yaml: | negative infinity: -.inf not a number: .NaN php: | - array( + [ 'canonical' => 1230.15, 'exponential' => 1230.15, 'negative infinity' => log(0), 'not a number' => -log(0) - ) + ] --- test: Timestamp todo: true @@ -1571,12 +1571,12 @@ yaml: | space separated: 2001-12-14 21:59:43.10 -05:00 date (noon UTC): 2002-12-14 ruby: | - array( + [ 'canonical' => YAML::mktime( 2001, 12, 15, 2, 59, 43, 0.10 ), 'valid iso8601' => YAML::mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ), 'space separated' => YAML::mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ), 'date (noon UTC)' => Date.new( 2002, 12, 14 ) - ) + ] --- test: Binary todo: true diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsTypeTransfers.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsTypeTransfers.yml index dea0be01..e96b5536 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsTypeTransfers.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsTypeTransfers.yml @@ -25,14 +25,14 @@ yaml: | - No, I mean, "And what about Yaml?" - Oh, oh yeah. Uh.. Yaml for Ruby. php: | - array( + [ "What's Yaml?", "It's for writing data structures in plain text.", "And?", "And what? That's not good enough for you?", "No, I mean, \"And what about Yaml?\"", "Oh, oh yeah. Uh.. Yaml for Ruby." - ) + ] --- test: Indicators in Strings brief: > @@ -43,11 +43,11 @@ yaml: | same for the pound sign: here we have it#in a string the comma can, honestly, be used in most cases: [ but not in, inline collections ] php: | - array( + [ 'the colon followed by space is an indicator' => 'but is a string:right here', 'same for the pound sign' => 'here we have it#in a string', - 'the comma can, honestly, be used in most cases' => array('but not in', 'inline collections') - ) + 'the comma can, honestly, be used in most cases' => ['but not in', 'inline collections'] + ] --- test: Forcing Strings brief: > @@ -57,10 +57,10 @@ yaml: | date string: !!str 2001-08-01 number string: !!str 192 php: | - array( + [ 'date string' => '2001-08-01', 'number string' => '192' - ) + ] --- test: Single-quoted Strings brief: > @@ -75,12 +75,12 @@ yaml: | why do i hate them?: 'it''s very hard to explain' entities: '£ me' php: | - array( + [ 'all my favorite symbols' => '#:!/%.)', 'a few i hate' => '&(*', 'why do i hate them?' => 'it\'s very hard to explain', 'entities' => '£ me' - ) + ] --- test: Double-quoted Strings brief: > @@ -90,9 +90,9 @@ brief: > yaml: | i know where i want my line breaks: "one here\nand another here\n" php: | - array( + [ 'i know where i want my line breaks' => "one here\nand another here\n" - ) + ] --- test: Multi-line Quoted Strings todo: true @@ -106,10 +106,10 @@ yaml: | let it go on and on to other lines until i end it with a quote." php: | - array('i want a long string' => "so i'm going to ". + ['i want a long string' => "so i'm going to ". "let it go on and on to other lines ". "until i end it with a quote." - ) + ] --- test: Plain scalars @@ -128,7 +128,7 @@ yaml: | - This would impair my skiing ability somewhat for the duration, as can be imagined. php: | - array( + [ "My little toe is broken in two places;", "I'm crazy to have skied this way;", "I'm not the craziest he's seen, since there was always ". @@ -139,7 +139,7 @@ php: | "He's going to put my foot in plaster for a month;", "This would impair my skiing ability somewhat for the duration, ". "as can be imagined." - ) + ] --- test: 'Null' brief: > @@ -149,11 +149,11 @@ yaml: | hosted by: Bob and David date of next season: ~ php: | - array( + [ 'name' => 'Mr. Show', 'hosted by' => 'Bob and David', 'date of next season' => null - ) + ] --- test: Boolean brief: > @@ -162,10 +162,10 @@ yaml: | Is Gus a Liar?: true Do I rely on Gus for Sustenance?: false php: | - array( + [ 'Is Gus a Liar?' => true, 'Do I rely on Gus for Sustenance?' => false - ) + ] --- test: Integers dump_skip: true @@ -177,10 +177,10 @@ yaml: | zero: 0 simple: 12 php: | - array( + [ 'zero' => 0, 'simple' => 12, - ) + ] --- test: Positive Big Integer deprecated: true @@ -192,9 +192,9 @@ brief: > yaml: | one-thousand: 1,000 php: | - array( + [ 'one-thousand' => 1000.0, - ) + ] --- test: Negative Big Integer deprecated: true @@ -206,9 +206,9 @@ brief: > yaml: | negative one-thousand: -1,000 php: | - array( + [ 'negative one-thousand' => -1000.0 - ) + ] --- test: Floats dump_skip: true @@ -220,10 +220,10 @@ yaml: | a simple float: 2.00 scientific notation: 1.00009e+3 php: | - array( + [ 'a simple float' => 2.0, 'scientific notation' => 1000.09 - ) + ] --- test: Larger Float dump_skip: true @@ -235,9 +235,9 @@ brief: > yaml: | larger float: 1,000.09 php: | - array( + [ 'larger float' => 1000.09, - ) + ] --- test: Time todo: true @@ -250,10 +250,10 @@ yaml: | iso8601: 2001-12-14t21:59:43.10-05:00 space separated: 2001-12-14 21:59:43.10 -05:00 php: | - array( + [ 'iso8601' => mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ), 'space separated' => mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ) - ) + ] --- test: Date todo: true diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/booleanMappingKeys.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/booleanMappingKeys.yml index 26799e8e..88287f1b 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/booleanMappingKeys.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/booleanMappingKeys.yml @@ -5,7 +5,7 @@ yaml: | true: true false: false php: | - array( + [ 'true' => true, 'false' => false, - ) + ] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/escapedCharacters.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/escapedCharacters.yml index cc0356d3..87d352db 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/escapedCharacters.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/escapedCharacters.yml @@ -142,14 +142,14 @@ test: Double quotes with a line feed yaml: | { double: "some value\n \"some quoted string\" and 'some single quotes one'" } php: | - array( + [ 'double' => "some value\n \"some quoted string\" and 'some single quotes one'" - ) + ] --- test: Backslashes yaml: | { single: 'foo\Var', no-quotes: foo\Var, double: "foo\\Var" } php: | - array( + [ 'single' => 'foo\Var', 'no-quotes' => 'foo\Var', 'double' => 'foo\Var' - ) + ] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/legacyBooleanMappingKeys.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/legacyBooleanMappingKeys.yml index 5e8d0917..db950165 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/legacyBooleanMappingKeys.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/legacyBooleanMappingKeys.yml @@ -5,10 +5,10 @@ yaml: | true: true false: false php: | - array( + [ 1 => true, 0 => false, - ) + ] --- test: Boolean yaml: | @@ -16,8 +16,8 @@ yaml: | logical: true answer: false php: | - array( + [ false => 'used as key', 'logical' => true, 'answer' => false - ) + ] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/legacyNullMappingKey.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/legacyNullMappingKey.yml index 551a6205..14f93c2d 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/legacyNullMappingKey.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/legacyNullMappingKey.yml @@ -4,6 +4,6 @@ spec: 2.21 yaml: | null: ~ php: | - array( + [ '' => null, - ) + ] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/nullMappingKey.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/nullMappingKey.yml index 7dcadc72..cd90f7b4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/nullMappingKey.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/nullMappingKey.yml @@ -4,6 +4,6 @@ spec: 2.21 yaml: | null: ~ php: | - array( + [ 'null' => null, - ) + ] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/numericMappingKeys.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/numericMappingKeys.yml index 9cfb7713..246447e4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/numericMappingKeys.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/numericMappingKeys.yml @@ -6,7 +6,7 @@ yaml: | 1: foo 0: bar php: | - array(1 => 'foo', 0 => 'bar') + [1 => 'foo', 0 => 'bar'] --- test: Integers as Map Keys brief: > @@ -16,8 +16,8 @@ yaml: | 2: two 3: three php: | - array( + [ 1 => 'one', 2 => 'two', 3 => 'three' - ) + ] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml index b72a9b69..af3ab385 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml @@ -11,7 +11,7 @@ yaml: | ex6: foo#foo # comment here ex7: foo # ignore me # and me php: | - array('ex1' => 'foo # bar', 'ex2' => 'foo # bar', 'ex3' => 'foo # bar', 'ex4' => 'foo', 'ex5' => 'foo', 'ex6' => 'foo#foo', 'ex7' => 'foo') + ['ex1' => 'foo # bar', 'ex2' => 'foo # bar', 'ex3' => 'foo # bar', 'ex4' => 'foo', 'ex5' => 'foo', 'ex6' => 'foo#foo', 'ex7' => 'foo'] --- test: Comments in the middle brief: > @@ -24,7 +24,7 @@ yaml: | # some comment # some comment php: | - array('foo' => array('bar' => 'foo')) + ['foo' => ['bar' => 'foo']] --- test: Comments on a hash line brief: > @@ -33,7 +33,7 @@ yaml: | foo: # a comment foo: bar # a comment php: | - array('foo' => array('foo' => 'bar')) + ['foo' => ['foo' => 'bar']] --- test: 'Value starting with a #' brief: > @@ -41,7 +41,7 @@ brief: > yaml: | foo: '#bar' php: | - array('foo' => '#bar') + ['foo' => '#bar'] --- test: Document starting with a comment and a separator brief: > @@ -51,7 +51,7 @@ yaml: | --- foo: bar # a comment php: | - array('foo' => 'bar') + ['foo' => 'bar'] --- test: Comment containing a colon on a hash line brief: > @@ -65,7 +65,7 @@ brief: > 'Hash key containing a #' yaml: 'foo#bar: baz' php: | - array('foo#bar' => 'baz') + ['foo#bar' => 'baz'] --- test: 'Hash key ending with a space and a #' brief: > @@ -73,4 +73,4 @@ brief: > yaml: | 'foo #': baz php: | - array('foo #' => 'baz') + ['foo #' => 'baz'] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfCompact.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfCompact.yml index 1339d23a..8cadae2c 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfCompact.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfCompact.yml @@ -13,22 +13,22 @@ yaml: | nick: Biggies quantity: 1 php: | - array ( - array ( + [ + [ 'item' => 'Super Hoop', - ), - array ( + ], + [ 'item' => 'Basketball', 'quantity' => 1, - ), - array ( - 'item' => array( + ], + [ + 'item' => [ 'name' => 'Big Shoes', 'nick' => 'Biggies' - ), + ], 'quantity' => 1 - ) - ) + ] + ] --- test: Compact notation combined with inline notation brief: | @@ -39,18 +39,18 @@ yaml: | - { item: Super Hoop, quantity: 1 } - [ Basketball, Big Shoes ] php: | - array ( - 'items' => array ( - array ( + [ + 'items' => [ + [ 'item' => 'Super Hoop', 'quantity' => 1, - ), - array ( + ], + [ 'Basketball', 'Big Shoes' - ) - ) - ) + ] + ] + ] --- %YAML:1.0 test: Compact notation brief: | @@ -66,22 +66,22 @@ yaml: | nick: Biggies quantity: 1 php: | - array ( - array ( + [ + [ 'item' => 'Super Hoop', - ), - array ( + ], + [ 'item' => 'Basketball', 'quantity' => 1, - ), - array ( - 'item' => array( + ], + [ + 'item' => [ 'name' => 'Big Shoes', 'nick' => 'Biggies' - ), + ], 'quantity' => 1 - ) - ) + ] + ] --- test: Compact notation combined with inline notation brief: | @@ -92,18 +92,18 @@ yaml: | - { item: Super Hoop, quantity: 1 } - [ Basketball, Big Shoes ] php: | - array ( - 'items' => array ( - array ( + [ + 'items' => [ + [ 'item' => 'Super Hoop', 'quantity' => 1, - ), - array ( + ], + [ 'Basketball', 'Big Shoes' - ) - ) - ) + ] + ] + ] --- %YAML:1.0 test: Compact notation brief: | @@ -119,22 +119,22 @@ yaml: | nick: Biggies quantity: 1 php: | - array ( - array ( + [ + [ 'item' => 'Super Hoop', - ), - array ( + ], + [ 'item' => 'Basketball', 'quantity' => 1, - ), - array ( - 'item' => array( + ], + [ + 'item' => [ 'name' => 'Big Shoes', 'nick' => 'Biggies' - ), + ], 'quantity' => 1 - ) - ) + ] + ] --- test: Compact notation combined with inline notation brief: | @@ -145,15 +145,15 @@ yaml: | - { item: Super Hoop, quantity: 1 } - [ Basketball, Big Shoes ] php: | - array ( - 'items' => array ( - array ( + [ + 'items' => [ + [ 'item' => 'Super Hoop', 'quantity' => 1, - ), - array ( + ], + [ 'Basketball', 'Big Shoes' - ) - ) - ) + ] + ] + ] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfMergeKey.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfMergeKey.yml index 83264cfa..af787ae4 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfMergeKey.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfMergeKey.yml @@ -46,16 +46,16 @@ yaml: | head_inline: &head_inline { <<: [ *foo , *dong , *foo2 ] } recursive_inline: { <<: *head_inline, c: { <<: *foo2 } } php: | - array( - 'foo' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull'), - 'bar' => array('a' => 'before', 'd' => 'other', 'e' => null, 'b' => 'new', 'c' => array('foo' => 'bar', 'bar' => 'foo'), 'x' => 'Oren'), - 'bar_inline' => array('a' => 'before', 'd' => 'other', 'b' => 'new', 'c' => array('foo' => 'bar', 'bar' => 'foo'), 'e' => 'notnull', 'x' => 'Oren'), - 'foo2' => array('a' => 'Ballmer'), - 'ding' => array('fi', 'fei', 'fo', 'fam'), - 'check' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam', 'isit' => 'tested'), - 'head' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam'), - 'taz' => array('a' => 'Steve', 'w' => array('p' => 1234)), - 'nested' => array('a' => 'Steve', 'w' => array('p' => 12345), 'd' => 'Doug', 'z' => array('p' => 12345)), - 'head_inline' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam'), - 'recursive_inline' => array('a' => 'Steve', 'b' => 'Clark', 'c' => array('a' => 'Ballmer'), 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam'), - ) + [ + 'foo' => ['a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull'], + 'bar' => ['a' => 'before', 'd' => 'other', 'e' => null, 'b' => 'new', 'c' => ['foo' => 'bar', 'bar' => 'foo'], 'x' => 'Oren'], + 'bar_inline' => ['a' => 'before', 'd' => 'other', 'b' => 'new', 'c' => ['foo' => 'bar', 'bar' => 'foo'], 'e' => 'notnull', 'x' => 'Oren'], + 'foo2' => ['a' => 'Ballmer'], + 'ding' => ['fi', 'fei', 'fo', 'fam'], + 'check' => ['a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam', 'isit' => 'tested'], + 'head' => ['a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam'], + 'taz' => ['a' => 'Steve', 'w' => ['p' => 1234]], + 'nested' => ['a' => 'Steve', 'w' => ['p' => 12345], 'd' => 'Doug', 'z' => ['p' => 12345]], + 'head_inline' => ['a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam'], + 'recursive_inline' => ['a' => 'Steve', 'b' => 'Clark', 'c' => ['a' => 'Ballmer'], 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam'], + ] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfObjects.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfObjects.yml index ee124b24..144615f2 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfObjects.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfObjects.yml @@ -8,4 +8,4 @@ yaml: | ex3: 'foo # bar' # comment ex4: foo # comment php: | - array('ex1' => 'foo # bar', 'ex2' => 'foo # bar', 'ex3' => 'foo # bar', 'ex4' => 'foo') + ['ex1' => 'foo # bar', 'ex2' => 'foo # bar', 'ex3' => 'foo # bar', 'ex4' => 'foo'] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfQuotes.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfQuotes.yml index 7c60baec..c8326fdb 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfQuotes.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfQuotes.yml @@ -5,7 +5,7 @@ brief: > yaml: | foo: '| bar' php: | - array('foo' => '| bar') + ['foo' => '| bar'] --- test: A key can be a quoted string brief: > @@ -19,15 +19,15 @@ yaml: | "foo4: ": bar foo5: { "foo \" bar: ": bar, 'foo '' bar: ': bar } php: | - array( + [ 'foo1' => 'bar', 'foo2' => 'bar', 'foo " bar' => 'bar', 'foo \' bar' => 'bar', 'foo3: ' => 'bar', 'foo4: ' => 'bar', - 'foo5' => array( + 'foo5' => [ 'foo " bar: ' => 'bar', 'foo \' bar: ' => 'bar', - ), - ) + ], + ] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml index 2a0b9c87..2ea417a7 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml @@ -5,19 +5,19 @@ brief: > yaml: | stripped_title: { name: "foo bar", help: "bar foo" } php: | - array('stripped_title' => array('name' => 'foo bar', 'help' => 'bar foo')) + ['stripped_title' => ['name' => 'foo bar', 'help' => 'bar foo']] --- test: Empty sequence yaml: | foo: [ ] php: | - array('foo' => array()) + ['foo' => []] --- test: Empty value yaml: | foo: php: | - array('foo' => null) + ['foo' => null] --- test: Inline string parsing brief: > @@ -25,7 +25,7 @@ brief: > yaml: | test: ['complex: string', 'another [string]'] php: | - array('test' => array('complex: string', 'another [string]')) + ['test' => ['complex: string', 'another [string]']] --- test: Boolean brief: > @@ -40,7 +40,7 @@ yaml: | - 'null' - '~' php: | - array( + [ false, true, null, @@ -49,7 +49,7 @@ php: | 'true', 'null', '~', - ) + ] --- test: Empty lines in literal blocks brief: > @@ -63,7 +63,7 @@ yaml: | bar php: | - array('foo' => array('bar' => "foo\n\n\n \nbar\n")) + ['foo' => ['bar' => "foo\n\n\n \nbar\n"]] --- test: Empty lines in folded blocks brief: > @@ -77,7 +77,7 @@ yaml: | bar php: | - array('foo' => array('bar' => "\nfoo\n\nbar\n")) + ['foo' => ['bar' => "\nfoo\n\nbar\n"]] --- test: IP addresses brief: > @@ -85,7 +85,7 @@ brief: > yaml: | foo: 10.0.0.2 php: | - array('foo' => '10.0.0.2') + ['foo' => '10.0.0.2'] --- test: A sequence with an embedded mapping brief: > @@ -94,28 +94,28 @@ yaml: | - foo - bar: { bar: foo } php: | - array('foo', array('bar' => array('bar' => 'foo'))) + ['foo', ['bar' => ['bar' => 'foo']]] --- test: Octal brief: as in spec example 2.19, octal value is converted yaml: | foo: 0123 php: | - array('foo' => 83) + ['foo' => 83] --- test: Octal strings brief: Octal notation in a string must remain a string yaml: | foo: "0123" php: | - array('foo' => '0123') + ['foo' => '0123'] --- test: Octal strings brief: Octal notation in a string must remain a string yaml: | foo: '0123' php: | - array('foo' => '0123') + ['foo' => '0123'] --- test: Octal strings brief: Octal notation in a string must remain a string @@ -123,18 +123,18 @@ yaml: | foo: | 0123 php: | - array('foo' => "0123\n") + ['foo' => "0123\n"] --- test: Document as a simple hash brief: Document as a simple hash yaml: | { foo: bar } php: | - array('foo' => 'bar') + ['foo' => 'bar'] --- test: Document as a simple array brief: Document as a simple array yaml: | [ foo, bar ] php: | - array('foo', 'bar') + ['foo', 'bar'] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/unindentedCollections.yml b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/unindentedCollections.yml index 0c96108e..c85952df 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/unindentedCollections.yml +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/unindentedCollections.yml @@ -8,7 +8,7 @@ yaml: | - item2 - item3 php: | - array('collection' => array('item1', 'item2', 'item3')) + ['collection' => ['item1', 'item2', 'item3']] --- test: Nested unindented collection (two levels) brief: > @@ -20,7 +20,7 @@ yaml: | - b - c php: | - array('collection' => array('key' => array('a', 'b', 'c'))) + ['collection' => ['key' => ['a', 'b', 'c']]] --- test: Nested unindented collection (three levels) brief: > @@ -33,7 +33,7 @@ yaml: | - two - three php: | - array('collection' => array('key' => array('subkey' => array('one', 'two', 'three')))) + ['collection' => ['key' => ['subkey' => ['one', 'two', 'three']]]] --- test: Key/value after unindented collection (1) brief: > @@ -46,7 +46,7 @@ yaml: | - c foo: bar php: | - array('collection' => array('key' => array('a', 'b', 'c')), 'foo' => 'bar') + ['collection' => ['key' => ['a', 'b', 'c']], 'foo' => 'bar'] --- test: Key/value after unindented collection (at the same level) brief: > @@ -59,7 +59,7 @@ yaml: | - c foo: bar php: | - array('collection' => array('key' => array('a', 'b', 'c'), 'foo' => 'bar')) + ['collection' => ['key' => ['a', 'b', 'c'], 'foo' => 'bar']] --- test: Shortcut Key after unindented collection brief: > @@ -69,7 +69,7 @@ yaml: | - key: foo foo: bar php: | - array('collection' => array(array('key' => 'foo', 'foo' => 'bar'))) + ['collection' => [['key' => 'foo', 'foo' => 'bar']]] --- test: Shortcut Key after unindented collection with custom spaces brief: > @@ -79,4 +79,4 @@ yaml: | - key: foo foo: bar php: | - array('collection' => array(array('key' => 'foo', 'foo' => 'bar'))) + ['collection' => [['key' => 'foo', 'foo' => 'bar']]] diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/InlineTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/InlineTest.php index f2c4ab60..950c7023 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/InlineTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/InlineTest.php @@ -53,13 +53,13 @@ class InlineTest extends TestCase public function getTestsForParsePhpConstants() { - return array( - array('!php/const Symfony\Component\Yaml\Yaml::PARSE_CONSTANT', Yaml::PARSE_CONSTANT), - array('!php/const PHP_INT_MAX', PHP_INT_MAX), - array('[!php/const PHP_INT_MAX]', array(PHP_INT_MAX)), - array('{ foo: !php/const PHP_INT_MAX }', array('foo' => PHP_INT_MAX)), - array('!php/const NULL', null), - ); + return [ + ['!php/const Symfony\Component\Yaml\Yaml::PARSE_CONSTANT', Yaml::PARSE_CONSTANT], + ['!php/const PHP_INT_MAX', PHP_INT_MAX], + ['[!php/const PHP_INT_MAX]', [PHP_INT_MAX]], + ['{ foo: !php/const PHP_INT_MAX }', ['foo' => PHP_INT_MAX]], + ['!php/const NULL', null], + ]; } /** @@ -92,13 +92,13 @@ class InlineTest extends TestCase public function getTestsForParseLegacyPhpConstants() { - return array( - array('!php/const:Symfony\Component\Yaml\Yaml::PARSE_CONSTANT', Yaml::PARSE_CONSTANT), - array('!php/const:PHP_INT_MAX', PHP_INT_MAX), - array('[!php/const:PHP_INT_MAX]', array(PHP_INT_MAX)), - array('{ foo: !php/const:PHP_INT_MAX }', array('foo' => PHP_INT_MAX)), - array('!php/const:NULL', null), - ); + return [ + ['!php/const:Symfony\Component\Yaml\Yaml::PARSE_CONSTANT', Yaml::PARSE_CONSTANT], + ['!php/const:PHP_INT_MAX', PHP_INT_MAX], + ['[!php/const:PHP_INT_MAX]', [PHP_INT_MAX]], + ['{ foo: !php/const:PHP_INT_MAX }', ['foo' => PHP_INT_MAX]], + ['!php/const:NULL', null], + ]; } /** @@ -130,7 +130,7 @@ class InlineTest extends TestCase } try { - $requiredLocales = array('fr_FR.UTF-8', 'fr_FR.UTF8', 'fr_FR.utf-8', 'fr_FR.utf8', 'French_France.1252'); + $requiredLocales = ['fr_FR.UTF-8', 'fr_FR.UTF8', 'fr_FR.utf-8', 'fr_FR.utf8', 'French_France.1252']; if (false === setlocale(LC_NUMERIC, $requiredLocales)) { $this->markTestSkipped('Could not set any of required locales: '.implode(', ', $requiredLocales)); } @@ -232,7 +232,7 @@ class InlineTest extends TestCase */ public function testParseReferences($yaml, $expected) { - $this->assertSame($expected, Inline::parse($yaml, 0, array('var' => 'var-value'))); + $this->assertSame($expected, Inline::parse($yaml, 0, ['var' => 'var-value'])); } /** @@ -241,31 +241,31 @@ class InlineTest extends TestCase */ public function testParseReferencesAsFifthArgument($yaml, $expected) { - $this->assertSame($expected, Inline::parse($yaml, false, false, false, array('var' => 'var-value'))); + $this->assertSame($expected, Inline::parse($yaml, false, false, false, ['var' => 'var-value'])); } public function getDataForParseReferences() { - return array( - 'scalar' => array('*var', 'var-value'), - 'list' => array('[ *var ]', array('var-value')), - 'list-in-list' => array('[[ *var ]]', array(array('var-value'))), - 'map-in-list' => array('[ { key: *var } ]', array(array('key' => 'var-value'))), - 'embedded-mapping-in-list' => array('[ key: *var ]', array(array('key' => 'var-value'))), - 'map' => array('{ key: *var }', array('key' => 'var-value')), - 'list-in-map' => array('{ key: [*var] }', array('key' => array('var-value'))), - 'map-in-map' => array('{ foo: { bar: *var } }', array('foo' => array('bar' => 'var-value'))), - ); + return [ + 'scalar' => ['*var', 'var-value'], + 'list' => ['[ *var ]', ['var-value']], + 'list-in-list' => ['[[ *var ]]', [['var-value']]], + 'map-in-list' => ['[ { key: *var } ]', [['key' => 'var-value']]], + 'embedded-mapping-in-list' => ['[ key: *var ]', [['key' => 'var-value']]], + 'map' => ['{ key: *var }', ['key' => 'var-value']], + 'list-in-map' => ['{ key: [*var] }', ['key' => ['var-value']]], + 'map-in-map' => ['{ foo: { bar: *var } }', ['foo' => ['bar' => 'var-value']]], + ]; } public function testParseMapReferenceInSequence() { - $foo = array( + $foo = [ 'a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', - ); - $this->assertSame(array($foo), Inline::parse('[*foo]', 0, array('foo' => $foo))); + ]; + $this->assertSame([$foo], Inline::parse('[*foo]', 0, ['foo' => $foo])); } /** @@ -273,12 +273,12 @@ class InlineTest extends TestCase */ public function testParseMapReferenceInSequenceAsFifthArgument() { - $foo = array( + $foo = [ 'a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', - ); - $this->assertSame(array($foo), Inline::parse('[*foo]', false, false, false, array('foo' => $foo))); + ]; + $this->assertSame([$foo], Inline::parse('[*foo]', false, false, false, ['foo' => $foo])); } /** @@ -316,7 +316,7 @@ class InlineTest extends TestCase public function getReservedIndicators() { - return array(array('@'), array('`')); + return [['@'], ['`']]; } /** @@ -336,7 +336,7 @@ class InlineTest extends TestCase public function getScalarIndicators() { - return array(array('|'), array('>')); + return [['|'], ['>']]; } /** @@ -359,240 +359,240 @@ class InlineTest extends TestCase public function getDataForIsHash() { - return array( - array(array(), false), - array(array(1, 2, 3), false), - array(array(2 => 1, 1 => 2, 0 => 3), true), - array(array('foo' => 1, 'bar' => 2), true), - ); + return [ + [[], false], + [[1, 2, 3], false], + [[2 => 1, 1 => 2, 0 => 3], true], + [['foo' => 1, 'bar' => 2], true], + ]; } public function getTestsForParse() { - return array( - array('', ''), - array('null', null), - array('false', false), - array('true', true), - array('12', 12), - array('-12', -12), - array('1_2', 12), - array('_12', '_12'), - array('12_', 12), - array('"quoted string"', 'quoted string'), - array("'quoted string'", 'quoted string'), - array('12.30e+02', 12.30e+02), - array('123.45_67', 123.4567), - array('0x4D2', 0x4D2), - array('0x_4_D_2_', 0x4D2), - array('02333', 02333), - array('0_2_3_3_3', 02333), - array('.Inf', -log(0)), - array('-.Inf', log(0)), - array("'686e444'", '686e444'), - array('686e444', 646e444), - array('123456789123456789123456789123456789', '123456789123456789123456789123456789'), - array('"foo\r\nbar"', "foo\r\nbar"), - array("'foo#bar'", 'foo#bar'), - array("'foo # bar'", 'foo # bar'), - array("'#cfcfcf'", '#cfcfcf'), - array('::form_base.html.twig', '::form_base.html.twig'), + return [ + ['', ''], + ['null', null], + ['false', false], + ['true', true], + ['12', 12], + ['-12', -12], + ['1_2', 12], + ['_12', '_12'], + ['12_', 12], + ['"quoted string"', 'quoted string'], + ["'quoted string'", 'quoted string'], + ['12.30e+02', 12.30e+02], + ['123.45_67', 123.4567], + ['0x4D2', 0x4D2], + ['0x_4_D_2_', 0x4D2], + ['02333', 02333], + ['0_2_3_3_3', 02333], + ['.Inf', -log(0)], + ['-.Inf', log(0)], + ["'686e444'", '686e444'], + ['686e444', 646e444], + ['123456789123456789123456789123456789', '123456789123456789123456789123456789'], + ['"foo\r\nbar"', "foo\r\nbar"], + ["'foo#bar'", 'foo#bar'], + ["'foo # bar'", 'foo # bar'], + ["'#cfcfcf'", '#cfcfcf'], + ['::form_base.html.twig', '::form_base.html.twig'], // Pre-YAML-1.2 booleans - array("'y'", 'y'), - array("'n'", 'n'), - array("'yes'", 'yes'), - array("'no'", 'no'), - array("'on'", 'on'), - array("'off'", 'off'), + ["'y'", 'y'], + ["'n'", 'n'], + ["'yes'", 'yes'], + ["'no'", 'no'], + ["'on'", 'on'], + ["'off'", 'off'], - array('2007-10-30', gmmktime(0, 0, 0, 10, 30, 2007)), - array('2007-10-30T02:59:43Z', gmmktime(2, 59, 43, 10, 30, 2007)), - array('2007-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 2007)), - array('1960-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 1960)), - array('1730-10-30T02:59:43Z', gmmktime(2, 59, 43, 10, 30, 1730)), + ['2007-10-30', gmmktime(0, 0, 0, 10, 30, 2007)], + ['2007-10-30T02:59:43Z', gmmktime(2, 59, 43, 10, 30, 2007)], + ['2007-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 2007)], + ['1960-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 1960)], + ['1730-10-30T02:59:43Z', gmmktime(2, 59, 43, 10, 30, 1730)], - array('"a \\"string\\" with \'quoted strings inside\'"', 'a "string" with \'quoted strings inside\''), - array("'a \"string\" with ''quoted strings inside'''", 'a "string" with \'quoted strings inside\''), + ['"a \\"string\\" with \'quoted strings inside\'"', 'a "string" with \'quoted strings inside\''], + ["'a \"string\" with ''quoted strings inside'''", 'a "string" with \'quoted strings inside\''], // sequences // urls are no key value mapping. see #3609. Valid yaml "key: value" mappings require a space after the colon - array('[foo, http://urls.are/no/mappings, false, null, 12]', array('foo', 'http://urls.are/no/mappings', false, null, 12)), - array('[ foo , bar , false , null , 12 ]', array('foo', 'bar', false, null, 12)), - array('[\'foo,bar\', \'foo bar\']', array('foo,bar', 'foo bar')), + ['[foo, http://urls.are/no/mappings, false, null, 12]', ['foo', 'http://urls.are/no/mappings', false, null, 12]], + ['[ foo , bar , false , null , 12 ]', ['foo', 'bar', false, null, 12]], + ['[\'foo,bar\', \'foo bar\']', ['foo,bar', 'foo bar']], // mappings - array('{foo: bar,bar: foo,"false": false, "null": null,integer: 12}', array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12)), - array('{ foo : bar, bar : foo, "false" : false, "null" : null, integer : 12 }', array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12)), - array('{foo: \'bar\', bar: \'foo: bar\'}', array('foo' => 'bar', 'bar' => 'foo: bar')), - array('{\'foo\': \'bar\', "bar": \'foo: bar\'}', array('foo' => 'bar', 'bar' => 'foo: bar')), - array('{\'foo\'\'\': \'bar\', "bar\"": \'foo: bar\'}', array('foo\'' => 'bar', 'bar"' => 'foo: bar')), - array('{\'foo: \': \'bar\', "bar: ": \'foo: bar\'}', array('foo: ' => 'bar', 'bar: ' => 'foo: bar')), - array('{"foo:bar": "baz"}', array('foo:bar' => 'baz')), - array('{"foo":"bar"}', array('foo' => 'bar')), + ['{foo: bar,bar: foo,"false": false, "null": null,integer: 12}', ['foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12]], + ['{ foo : bar, bar : foo, "false" : false, "null" : null, integer : 12 }', ['foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12]], + ['{foo: \'bar\', bar: \'foo: bar\'}', ['foo' => 'bar', 'bar' => 'foo: bar']], + ['{\'foo\': \'bar\', "bar": \'foo: bar\'}', ['foo' => 'bar', 'bar' => 'foo: bar']], + ['{\'foo\'\'\': \'bar\', "bar\"": \'foo: bar\'}', ['foo\'' => 'bar', 'bar"' => 'foo: bar']], + ['{\'foo: \': \'bar\', "bar: ": \'foo: bar\'}', ['foo: ' => 'bar', 'bar: ' => 'foo: bar']], + ['{"foo:bar": "baz"}', ['foo:bar' => 'baz']], + ['{"foo":"bar"}', ['foo' => 'bar']], // nested sequences and mappings - array('[foo, [bar, foo]]', array('foo', array('bar', 'foo'))), - array('[foo, {bar: foo}]', array('foo', array('bar' => 'foo'))), - array('{ foo: {bar: foo} }', array('foo' => array('bar' => 'foo'))), - array('{ foo: [bar, foo] }', array('foo' => array('bar', 'foo'))), - array('{ foo:{bar: foo} }', array('foo' => array('bar' => 'foo'))), - array('{ foo:[bar, foo] }', array('foo' => array('bar', 'foo'))), + ['[foo, [bar, foo]]', ['foo', ['bar', 'foo']]], + ['[foo, {bar: foo}]', ['foo', ['bar' => 'foo']]], + ['{ foo: {bar: foo} }', ['foo' => ['bar' => 'foo']]], + ['{ foo: [bar, foo] }', ['foo' => ['bar', 'foo']]], + ['{ foo:{bar: foo} }', ['foo' => ['bar' => 'foo']]], + ['{ foo:[bar, foo] }', ['foo' => ['bar', 'foo']]], - array('[ foo, [ bar, foo ] ]', array('foo', array('bar', 'foo'))), + ['[ foo, [ bar, foo ] ]', ['foo', ['bar', 'foo']]], - array('[{ foo: {bar: foo} }]', array(array('foo' => array('bar' => 'foo')))), + ['[{ foo: {bar: foo} }]', [['foo' => ['bar' => 'foo']]]], - array('[foo, [bar, [foo, [bar, foo]], foo]]', array('foo', array('bar', array('foo', array('bar', 'foo')), 'foo'))), + ['[foo, [bar, [foo, [bar, foo]], foo]]', ['foo', ['bar', ['foo', ['bar', 'foo']], 'foo']]], - array('[foo, {bar: foo, foo: [foo, {bar: foo}]}, [foo, {bar: foo}]]', array('foo', array('bar' => 'foo', 'foo' => array('foo', array('bar' => 'foo'))), array('foo', array('bar' => 'foo')))), + ['[foo, {bar: foo, foo: [foo, {bar: foo}]}, [foo, {bar: foo}]]', ['foo', ['bar' => 'foo', 'foo' => ['foo', ['bar' => 'foo']]], ['foo', ['bar' => 'foo']]]], - array('[foo, bar: { foo: bar }]', array('foo', '1' => array('bar' => array('foo' => 'bar')))), - array('[foo, \'@foo.baz\', { \'%foo%\': \'foo is %foo%\', bar: \'%foo%\' }, true, \'@service_container\']', array('foo', '@foo.baz', array('%foo%' => 'foo is %foo%', 'bar' => '%foo%'), true, '@service_container')), - ); + ['[foo, bar: { foo: bar }]', ['foo', '1' => ['bar' => ['foo' => 'bar']]]], + ['[foo, \'@foo.baz\', { \'%foo%\': \'foo is %foo%\', bar: \'%foo%\' }, true, \'@service_container\']', ['foo', '@foo.baz', ['%foo%' => 'foo is %foo%', 'bar' => '%foo%'], true, '@service_container']], + ]; } public function getTestsForParseWithMapObjects() { - return array( - array('', ''), - array('null', null), - array('false', false), - array('true', true), - array('12', 12), - array('-12', -12), - array('"quoted string"', 'quoted string'), - array("'quoted string'", 'quoted string'), - array('12.30e+02', 12.30e+02), - array('0x4D2', 0x4D2), - array('02333', 02333), - array('.Inf', -log(0)), - array('-.Inf', log(0)), - array("'686e444'", '686e444'), - array('686e444', 646e444), - array('123456789123456789123456789123456789', '123456789123456789123456789123456789'), - array('"foo\r\nbar"', "foo\r\nbar"), - array("'foo#bar'", 'foo#bar'), - array("'foo # bar'", 'foo # bar'), - array("'#cfcfcf'", '#cfcfcf'), - array('::form_base.html.twig', '::form_base.html.twig'), + return [ + ['', ''], + ['null', null], + ['false', false], + ['true', true], + ['12', 12], + ['-12', -12], + ['"quoted string"', 'quoted string'], + ["'quoted string'", 'quoted string'], + ['12.30e+02', 12.30e+02], + ['0x4D2', 0x4D2], + ['02333', 02333], + ['.Inf', -log(0)], + ['-.Inf', log(0)], + ["'686e444'", '686e444'], + ['686e444', 646e444], + ['123456789123456789123456789123456789', '123456789123456789123456789123456789'], + ['"foo\r\nbar"', "foo\r\nbar"], + ["'foo#bar'", 'foo#bar'], + ["'foo # bar'", 'foo # bar'], + ["'#cfcfcf'", '#cfcfcf'], + ['::form_base.html.twig', '::form_base.html.twig'], - array('2007-10-30', gmmktime(0, 0, 0, 10, 30, 2007)), - array('2007-10-30T02:59:43Z', gmmktime(2, 59, 43, 10, 30, 2007)), - array('2007-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 2007)), - array('1960-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 1960)), - array('1730-10-30T02:59:43Z', gmmktime(2, 59, 43, 10, 30, 1730)), + ['2007-10-30', gmmktime(0, 0, 0, 10, 30, 2007)], + ['2007-10-30T02:59:43Z', gmmktime(2, 59, 43, 10, 30, 2007)], + ['2007-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 2007)], + ['1960-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 1960)], + ['1730-10-30T02:59:43Z', gmmktime(2, 59, 43, 10, 30, 1730)], - array('"a \\"string\\" with \'quoted strings inside\'"', 'a "string" with \'quoted strings inside\''), - array("'a \"string\" with ''quoted strings inside'''", 'a "string" with \'quoted strings inside\''), + ['"a \\"string\\" with \'quoted strings inside\'"', 'a "string" with \'quoted strings inside\''], + ["'a \"string\" with ''quoted strings inside'''", 'a "string" with \'quoted strings inside\''], // sequences // urls are no key value mapping. see #3609. Valid yaml "key: value" mappings require a space after the colon - array('[foo, http://urls.are/no/mappings, false, null, 12]', array('foo', 'http://urls.are/no/mappings', false, null, 12)), - array('[ foo , bar , false , null , 12 ]', array('foo', 'bar', false, null, 12)), - array('[\'foo,bar\', \'foo bar\']', array('foo,bar', 'foo bar')), + ['[foo, http://urls.are/no/mappings, false, null, 12]', ['foo', 'http://urls.are/no/mappings', false, null, 12]], + ['[ foo , bar , false , null , 12 ]', ['foo', 'bar', false, null, 12]], + ['[\'foo,bar\', \'foo bar\']', ['foo,bar', 'foo bar']], // mappings - array('{foo: bar,bar: foo,"false": false,"null": null,integer: 12}', (object) array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12), Yaml::PARSE_OBJECT_FOR_MAP), - array('{ foo : bar, bar : foo, "false" : false, "null" : null, integer : 12 }', (object) array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12), Yaml::PARSE_OBJECT_FOR_MAP), - array('{foo: \'bar\', bar: \'foo: bar\'}', (object) array('foo' => 'bar', 'bar' => 'foo: bar')), - array('{\'foo\': \'bar\', "bar": \'foo: bar\'}', (object) array('foo' => 'bar', 'bar' => 'foo: bar')), - array('{\'foo\'\'\': \'bar\', "bar\"": \'foo: bar\'}', (object) array('foo\'' => 'bar', 'bar"' => 'foo: bar')), - array('{\'foo: \': \'bar\', "bar: ": \'foo: bar\'}', (object) array('foo: ' => 'bar', 'bar: ' => 'foo: bar')), - array('{"foo:bar": "baz"}', (object) array('foo:bar' => 'baz')), - array('{"foo":"bar"}', (object) array('foo' => 'bar')), + ['{foo: bar,bar: foo,"false": false,"null": null,integer: 12}', (object) ['foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12], Yaml::PARSE_OBJECT_FOR_MAP], + ['{ foo : bar, bar : foo, "false" : false, "null" : null, integer : 12 }', (object) ['foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12], Yaml::PARSE_OBJECT_FOR_MAP], + ['{foo: \'bar\', bar: \'foo: bar\'}', (object) ['foo' => 'bar', 'bar' => 'foo: bar']], + ['{\'foo\': \'bar\', "bar": \'foo: bar\'}', (object) ['foo' => 'bar', 'bar' => 'foo: bar']], + ['{\'foo\'\'\': \'bar\', "bar\"": \'foo: bar\'}', (object) ['foo\'' => 'bar', 'bar"' => 'foo: bar']], + ['{\'foo: \': \'bar\', "bar: ": \'foo: bar\'}', (object) ['foo: ' => 'bar', 'bar: ' => 'foo: bar']], + ['{"foo:bar": "baz"}', (object) ['foo:bar' => 'baz']], + ['{"foo":"bar"}', (object) ['foo' => 'bar']], // nested sequences and mappings - array('[foo, [bar, foo]]', array('foo', array('bar', 'foo'))), - array('[foo, {bar: foo}]', array('foo', (object) array('bar' => 'foo'))), - array('{ foo: {bar: foo} }', (object) array('foo' => (object) array('bar' => 'foo'))), - array('{ foo: [bar, foo] }', (object) array('foo' => array('bar', 'foo'))), + ['[foo, [bar, foo]]', ['foo', ['bar', 'foo']]], + ['[foo, {bar: foo}]', ['foo', (object) ['bar' => 'foo']]], + ['{ foo: {bar: foo} }', (object) ['foo' => (object) ['bar' => 'foo']]], + ['{ foo: [bar, foo] }', (object) ['foo' => ['bar', 'foo']]], - array('[ foo, [ bar, foo ] ]', array('foo', array('bar', 'foo'))), + ['[ foo, [ bar, foo ] ]', ['foo', ['bar', 'foo']]], - array('[{ foo: {bar: foo} }]', array((object) array('foo' => (object) array('bar' => 'foo')))), + ['[{ foo: {bar: foo} }]', [(object) ['foo' => (object) ['bar' => 'foo']]]], - array('[foo, [bar, [foo, [bar, foo]], foo]]', array('foo', array('bar', array('foo', array('bar', 'foo')), 'foo'))), + ['[foo, [bar, [foo, [bar, foo]], foo]]', ['foo', ['bar', ['foo', ['bar', 'foo']], 'foo']]], - array('[foo, {bar: foo, foo: [foo, {bar: foo}]}, [foo, {bar: foo}]]', array('foo', (object) array('bar' => 'foo', 'foo' => array('foo', (object) array('bar' => 'foo'))), array('foo', (object) array('bar' => 'foo')))), + ['[foo, {bar: foo, foo: [foo, {bar: foo}]}, [foo, {bar: foo}]]', ['foo', (object) ['bar' => 'foo', 'foo' => ['foo', (object) ['bar' => 'foo']]], ['foo', (object) ['bar' => 'foo']]]], - array('[foo, bar: { foo: bar }]', array('foo', '1' => (object) array('bar' => (object) array('foo' => 'bar')))), - array('[foo, \'@foo.baz\', { \'%foo%\': \'foo is %foo%\', bar: \'%foo%\' }, true, \'@service_container\']', array('foo', '@foo.baz', (object) array('%foo%' => 'foo is %foo%', 'bar' => '%foo%'), true, '@service_container')), + ['[foo, bar: { foo: bar }]', ['foo', '1' => (object) ['bar' => (object) ['foo' => 'bar']]]], + ['[foo, \'@foo.baz\', { \'%foo%\': \'foo is %foo%\', bar: \'%foo%\' }, true, \'@service_container\']', ['foo', '@foo.baz', (object) ['%foo%' => 'foo is %foo%', 'bar' => '%foo%'], true, '@service_container']], - array('{}', new \stdClass()), - array('{ foo : bar, bar : {} }', (object) array('foo' => 'bar', 'bar' => new \stdClass())), - array('{ foo : [], bar : {} }', (object) array('foo' => array(), 'bar' => new \stdClass())), - array('{foo: \'bar\', bar: {} }', (object) array('foo' => 'bar', 'bar' => new \stdClass())), - array('{\'foo\': \'bar\', "bar": {}}', (object) array('foo' => 'bar', 'bar' => new \stdClass())), - array('{\'foo\': \'bar\', "bar": \'{}\'}', (object) array('foo' => 'bar', 'bar' => '{}')), + ['{}', new \stdClass()], + ['{ foo : bar, bar : {} }', (object) ['foo' => 'bar', 'bar' => new \stdClass()]], + ['{ foo : [], bar : {} }', (object) ['foo' => [], 'bar' => new \stdClass()]], + ['{foo: \'bar\', bar: {} }', (object) ['foo' => 'bar', 'bar' => new \stdClass()]], + ['{\'foo\': \'bar\', "bar": {}}', (object) ['foo' => 'bar', 'bar' => new \stdClass()]], + ['{\'foo\': \'bar\', "bar": \'{}\'}', (object) ['foo' => 'bar', 'bar' => '{}']], - array('[foo, [{}, {}]]', array('foo', array(new \stdClass(), new \stdClass()))), - array('[foo, [[], {}]]', array('foo', array(array(), new \stdClass()))), - array('[foo, [[{}, {}], {}]]', array('foo', array(array(new \stdClass(), new \stdClass()), new \stdClass()))), - array('[foo, {bar: {}}]', array('foo', '1' => (object) array('bar' => new \stdClass()))), - ); + ['[foo, [{}, {}]]', ['foo', [new \stdClass(), new \stdClass()]]], + ['[foo, [[], {}]]', ['foo', [[], new \stdClass()]]], + ['[foo, [[{}, {}], {}]]', ['foo', [[new \stdClass(), new \stdClass()], new \stdClass()]]], + ['[foo, {bar: {}}]', ['foo', '1' => (object) ['bar' => new \stdClass()]]], + ]; } public function getTestsForDump() { - return array( - array('null', null), - array('false', false), - array('true', true), - array('12', 12), - array("'1_2'", '1_2'), - array('_12', '_12'), - array("'12_'", '12_'), - array("'quoted string'", 'quoted string'), - array('!!float 1230', 12.30e+02), - array('1234', 0x4D2), - array('1243', 02333), - array("'0x_4_D_2_'", '0x_4_D_2_'), - array("'0_2_3_3_3'", '0_2_3_3_3'), - array('.Inf', -log(0)), - array('-.Inf', log(0)), - array("'686e444'", '686e444'), - array('"foo\r\nbar"', "foo\r\nbar"), - array("'foo#bar'", 'foo#bar'), - array("'foo # bar'", 'foo # bar'), - array("'#cfcfcf'", '#cfcfcf'), + return [ + ['null', null], + ['false', false], + ['true', true], + ['12', 12], + ["'1_2'", '1_2'], + ['_12', '_12'], + ["'12_'", '12_'], + ["'quoted string'", 'quoted string'], + ['!!float 1230', 12.30e+02], + ['1234', 0x4D2], + ['1243', 02333], + ["'0x_4_D_2_'", '0x_4_D_2_'], + ["'0_2_3_3_3'", '0_2_3_3_3'], + ['.Inf', -log(0)], + ['-.Inf', log(0)], + ["'686e444'", '686e444'], + ['"foo\r\nbar"', "foo\r\nbar"], + ["'foo#bar'", 'foo#bar'], + ["'foo # bar'", 'foo # bar'], + ["'#cfcfcf'", '#cfcfcf'], - array("'a \"string\" with ''quoted strings inside'''", 'a "string" with \'quoted strings inside\''), + ["'a \"string\" with ''quoted strings inside'''", 'a "string" with \'quoted strings inside\''], - array("'-dash'", '-dash'), - array("'-'", '-'), + ["'-dash'", '-dash'], + ["'-'", '-'], // Pre-YAML-1.2 booleans - array("'y'", 'y'), - array("'n'", 'n'), - array("'yes'", 'yes'), - array("'no'", 'no'), - array("'on'", 'on'), - array("'off'", 'off'), + ["'y'", 'y'], + ["'n'", 'n'], + ["'yes'", 'yes'], + ["'no'", 'no'], + ["'on'", 'on'], + ["'off'", 'off'], // sequences - array('[foo, bar, false, null, 12]', array('foo', 'bar', false, null, 12)), - array('[\'foo,bar\', \'foo bar\']', array('foo,bar', 'foo bar')), + ['[foo, bar, false, null, 12]', ['foo', 'bar', false, null, 12]], + ['[\'foo,bar\', \'foo bar\']', ['foo,bar', 'foo bar']], // mappings - array('{ foo: bar, bar: foo, \'false\': false, \'null\': null, integer: 12 }', array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12)), - array('{ foo: bar, bar: \'foo: bar\' }', array('foo' => 'bar', 'bar' => 'foo: bar')), + ['{ foo: bar, bar: foo, \'false\': false, \'null\': null, integer: 12 }', ['foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12]], + ['{ foo: bar, bar: \'foo: bar\' }', ['foo' => 'bar', 'bar' => 'foo: bar']], // nested sequences and mappings - array('[foo, [bar, foo]]', array('foo', array('bar', 'foo'))), + ['[foo, [bar, foo]]', ['foo', ['bar', 'foo']]], - array('[foo, [bar, [foo, [bar, foo]], foo]]', array('foo', array('bar', array('foo', array('bar', 'foo')), 'foo'))), + ['[foo, [bar, [foo, [bar, foo]], foo]]', ['foo', ['bar', ['foo', ['bar', 'foo']], 'foo']]], - array('{ foo: { bar: foo } }', array('foo' => array('bar' => 'foo'))), + ['{ foo: { bar: foo } }', ['foo' => ['bar' => 'foo']]], - array('[foo, { bar: foo }]', array('foo', array('bar' => 'foo'))), + ['[foo, { bar: foo }]', ['foo', ['bar' => 'foo']]], - array('[foo, { bar: foo, foo: [foo, { bar: foo }] }, [foo, { bar: foo }]]', array('foo', array('bar' => 'foo', 'foo' => array('foo', array('bar' => 'foo'))), array('foo', array('bar' => 'foo')))), + ['[foo, { bar: foo, foo: [foo, { bar: foo }] }, [foo, { bar: foo }]]', ['foo', ['bar' => 'foo', 'foo' => ['foo', ['bar' => 'foo']]], ['foo', ['bar' => 'foo']]]], - array('[foo, \'@foo.baz\', { \'%foo%\': \'foo is %foo%\', bar: \'%foo%\' }, true, \'@service_container\']', array('foo', '@foo.baz', array('%foo%' => 'foo is %foo%', 'bar' => '%foo%'), true, '@service_container')), + ['[foo, \'@foo.baz\', { \'%foo%\': \'foo is %foo%\', bar: \'%foo%\' }, true, \'@service_container\']', ['foo', '@foo.baz', ['%foo%' => 'foo is %foo%', 'bar' => '%foo%'], true, '@service_container']], - array('{ foo: { bar: { 1: 2, baz: 3 } } }', array('foo' => array('bar' => array(1 => 2, 'baz' => 3)))), - ); + ['{ foo: { bar: { 1: 2, baz: 3 } } }', ['foo' => ['bar' => [1 => 2, 'baz' => 3]]]], + ]; } /** @@ -625,12 +625,12 @@ class InlineTest extends TestCase public function getTimestampTests() { - return array( - 'canonical' => array('2001-12-15T02:59:43.1Z', 2001, 12, 15, 2, 59, 43.1, '+0000'), - 'ISO-8601' => array('2001-12-15t21:59:43.10-05:00', 2001, 12, 16, 2, 59, 43.1, '-0500'), - 'spaced' => array('2001-12-15 21:59:43.10 -5', 2001, 12, 16, 2, 59, 43.1, '-0500'), - 'date' => array('2001-12-15', 2001, 12, 15, 0, 0, 0, '+0000'), - ); + return [ + 'canonical' => ['2001-12-15T02:59:43.1Z', 2001, 12, 15, 2, 59, 43.1, '+0000'], + 'ISO-8601' => ['2001-12-15t21:59:43.10-05:00', 2001, 12, 16, 2, 59, 43.1, '-0500'], + 'spaced' => ['2001-12-15 21:59:43.10 -5', 2001, 12, 16, 2, 59, 43.1, '-0500'], + 'date' => ['2001-12-15', 2001, 12, 15, 0, 0, 0, '+0000'], + ]; } /** @@ -647,7 +647,7 @@ class InlineTest extends TestCase $expected->setTime($hour, $minute, $second); } - $expectedNested = array('nested' => array($expected)); + $expectedNested = ['nested' => [$expected]]; $yamlNested = "{nested: [$yaml]}"; $this->assertEquals($expectedNested, Inline::parse($yamlNested, Yaml::PARSE_DATETIME)); @@ -663,13 +663,13 @@ class InlineTest extends TestCase public function getDateTimeDumpTests() { - $tests = array(); + $tests = []; $dateTime = new \DateTime('2001-12-15 21:59:43', new \DateTimeZone('UTC')); - $tests['date-time-utc'] = array($dateTime, '2001-12-15T21:59:43+00:00'); + $tests['date-time-utc'] = [$dateTime, '2001-12-15T21:59:43+00:00']; $dateTime = new \DateTimeImmutable('2001-07-15 21:59:43', new \DateTimeZone('Europe/Berlin')); - $tests['immutable-date-time-europe-berlin'] = array($dateTime, '2001-07-15T21:59:43+02:00'); + $tests['immutable-date-time-europe-berlin'] = [$dateTime, '2001-07-15T21:59:43+02:00']; return $tests; } @@ -684,11 +684,11 @@ class InlineTest extends TestCase public function getBinaryData() { - return array( - 'enclosed with double quotes' => array('!!binary "SGVsbG8gd29ybGQ="'), - 'enclosed with single quotes' => array("!!binary 'SGVsbG8gd29ybGQ='"), - 'containing spaces' => array('!!binary "SGVs bG8gd 29ybGQ="'), - ); + return [ + 'enclosed with double quotes' => ['!!binary "SGVsbG8gd29ybGQ="'], + 'enclosed with single quotes' => ["!!binary 'SGVsbG8gd29ybGQ='"], + 'containing spaces' => ['!!binary "SGVs bG8gd 29ybGQ="'], + ]; } /** @@ -708,12 +708,12 @@ class InlineTest extends TestCase public function getInvalidBinaryData() { - return array( - 'length not a multiple of four' => array('!!binary "SGVsbG8d29ybGQ="', '/The normalized base64 encoded data \(data without whitespace characters\) length must be a multiple of four \(\d+ bytes given\)/'), - 'invalid characters' => array('!!binary "SGVsbG8#d29ybGQ="', '/The base64 encoded data \(.*\) contains invalid characters/'), - 'too many equals characters' => array('!!binary "SGVsbG8gd29yb==="', '/The base64 encoded data \(.*\) contains invalid characters/'), - 'misplaced equals character' => array('!!binary "SGVsbG8gd29ybG=Q"', '/The base64 encoded data \(.*\) contains invalid characters/'), - ); + return [ + 'length not a multiple of four' => ['!!binary "SGVsbG8d29ybGQ="', '/The normalized base64 encoded data \(data without whitespace characters\) length must be a multiple of four \(\d+ bytes given\)/'], + 'invalid characters' => ['!!binary "SGVsbG8#d29ybGQ="', '/The base64 encoded data \(.*\) contains invalid characters/'], + 'too many equals characters' => ['!!binary "SGVsbG8gd29yb==="', '/The base64 encoded data \(.*\) contains invalid characters/'], + 'misplaced equals character' => ['!!binary "SGVsbG8gd29ybG=Q"', '/The base64 encoded data \(.*\) contains invalid characters/'], + ]; } /** @@ -729,7 +729,7 @@ class InlineTest extends TestCase { $longStringWithQuotes = str_repeat("x\r\n\\\"x\"x", 1000); - $yamlString = Inline::dump(array('longStringWithQuotes' => $longStringWithQuotes)); + $yamlString = Inline::dump(['longStringWithQuotes' => $longStringWithQuotes]); $arrayFromYaml = Inline::parse($yamlString); $this->assertEquals($longStringWithQuotes, $arrayFromYaml['longStringWithQuotes']); @@ -741,7 +741,7 @@ class InlineTest extends TestCase */ public function testOmittedMappingKeyIsParsedAsColon() { - $this->assertSame(array(':' => 'foo'), Inline::parse('{: foo}')); + $this->assertSame([':' => 'foo'], Inline::parse('{: foo}')); } /** @@ -754,15 +754,15 @@ class InlineTest extends TestCase public function getTestsForNullValues() { - return array( - 'null before closing curly brace' => array('{foo:}', array('foo' => null)), - 'null before comma' => array('{foo:, bar: baz}', array('foo' => null, 'bar' => 'baz')), - ); + return [ + 'null before closing curly brace' => ['{foo:}', ['foo' => null]], + 'null before comma' => ['{foo:, bar: baz}', ['foo' => null, 'bar' => 'baz']], + ]; } public function testTheEmptyStringIsAValidMappingKey() { - $this->assertSame(array('' => 'foo'), Inline::parse('{ "": foo }')); + $this->assertSame(['' => 'foo'], Inline::parse('{ "": foo }')); } /** @@ -788,12 +788,12 @@ class InlineTest extends TestCase public function getNotPhpCompatibleMappingKeyData() { - return array( - 'boolean-true' => array('{true: "foo"}', array('true' => 'foo')), - 'boolean-false' => array('{false: "foo"}', array('false' => 'foo')), - 'null' => array('{null: "foo"}', array('null' => 'foo')), - 'float' => array('{0.25: "foo"}', array('0.25' => 'foo')), - ); + return [ + 'boolean-true' => ['{true: "foo"}', ['true' => 'foo']], + 'boolean-false' => ['{false: "foo"}', ['false' => 'foo']], + 'null' => ['{null: "foo"}', ['null' => 'foo']], + 'float' => ['{0.25: "foo"}', ['0.25' => 'foo']], + ]; } /** @@ -802,7 +802,7 @@ class InlineTest extends TestCase */ public function testDeprecatedStrTag() { - $this->assertSame(array('foo' => 'bar'), Inline::parse('{ foo: !str bar }')); + $this->assertSame(['foo' => 'bar'], Inline::parse('{ foo: !str bar }')); } /** diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/ParserTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/ParserTest.php index 6372fe45..0f25732a 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/ParserTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/ParserTest.php @@ -39,7 +39,7 @@ class ParserTest extends TestCase */ public function testSpecifications($expected, $yaml, $comment, $deprecated) { - $deprecations = array(); + $deprecations = []; if ($deprecated) { set_error_handler(function ($type, $msg) use (&$deprecations) { @@ -104,12 +104,12 @@ class ParserTest extends TestCase public function testTabsInYaml() { // test tabs in YAML - $yamls = array( + $yamls = [ "foo:\n bar", "foo:\n bar", "foo:\n bar", "foo:\n bar", - ); + ]; foreach ($yamls as $yaml) { try { @@ -136,7 +136,7 @@ EOF; public function getBlockChompingTests() { - $tests = array(); + $tests = []; $yaml = <<<'EOF' foo: |- @@ -147,11 +147,11 @@ bar: |- two EOF; - $expected = array( + $expected = [ 'foo' => "one\ntwo", 'bar' => "one\ntwo", - ); - $tests['Literal block chomping strip with single trailing newline'] = array($expected, $yaml); + ]; + $tests['Literal block chomping strip with single trailing newline'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: |- @@ -164,19 +164,19 @@ bar: |- EOF; - $expected = array( + $expected = [ 'foo' => "one\ntwo", 'bar' => "one\ntwo", - ); - $tests['Literal block chomping strip with multiple trailing newlines'] = array($expected, $yaml); + ]; + $tests['Literal block chomping strip with multiple trailing newlines'] = [$expected, $yaml]; $yaml = <<<'EOF' {} EOF; - $expected = array(); - $tests['Literal block chomping strip with multiple trailing newlines after a 1-liner'] = array($expected, $yaml); + $expected = []; + $tests['Literal block chomping strip with multiple trailing newlines after a 1-liner'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: |- @@ -186,11 +186,11 @@ bar: |- one two EOF; - $expected = array( + $expected = [ 'foo' => "one\ntwo", 'bar' => "one\ntwo", - ); - $tests['Literal block chomping strip without trailing newline'] = array($expected, $yaml); + ]; + $tests['Literal block chomping strip without trailing newline'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: | @@ -201,11 +201,11 @@ bar: | two EOF; - $expected = array( + $expected = [ 'foo' => "one\ntwo\n", 'bar' => "one\ntwo\n", - ); - $tests['Literal block chomping clip with single trailing newline'] = array($expected, $yaml); + ]; + $tests['Literal block chomping clip with single trailing newline'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: | @@ -218,11 +218,11 @@ bar: | EOF; - $expected = array( + $expected = [ 'foo' => "one\ntwo\n", 'bar' => "one\ntwo\n", - ); - $tests['Literal block chomping clip with multiple trailing newlines'] = array($expected, $yaml); + ]; + $tests['Literal block chomping clip with multiple trailing newlines'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: @@ -231,14 +231,14 @@ foo: two EOF; - $expected = array( - 'foo' => array( - array( + $expected = [ + 'foo' => [ + [ 'bar' => "one\n\ntwo", - ), - ), - ); - $tests['Literal block chomping clip with embedded blank line inside unindented collection'] = array($expected, $yaml); + ], + ], + ]; + $tests['Literal block chomping clip with embedded blank line inside unindented collection'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: | @@ -248,11 +248,11 @@ bar: | one two EOF; - $expected = array( + $expected = [ 'foo' => "one\ntwo\n", 'bar' => "one\ntwo", - ); - $tests['Literal block chomping clip without trailing newline'] = array($expected, $yaml); + ]; + $tests['Literal block chomping clip without trailing newline'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: |+ @@ -263,11 +263,11 @@ bar: |+ two EOF; - $expected = array( + $expected = [ 'foo' => "one\ntwo\n", 'bar' => "one\ntwo\n", - ); - $tests['Literal block chomping keep with single trailing newline'] = array($expected, $yaml); + ]; + $tests['Literal block chomping keep with single trailing newline'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: |+ @@ -280,11 +280,11 @@ bar: |+ EOF; - $expected = array( + $expected = [ 'foo' => "one\ntwo\n\n", 'bar' => "one\ntwo\n\n", - ); - $tests['Literal block chomping keep with multiple trailing newlines'] = array($expected, $yaml); + ]; + $tests['Literal block chomping keep with multiple trailing newlines'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: |+ @@ -294,11 +294,11 @@ bar: |+ one two EOF; - $expected = array( + $expected = [ 'foo' => "one\ntwo\n", 'bar' => "one\ntwo", - ); - $tests['Literal block chomping keep without trailing newline'] = array($expected, $yaml); + ]; + $tests['Literal block chomping keep without trailing newline'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: >- @@ -309,11 +309,11 @@ bar: >- two EOF; - $expected = array( + $expected = [ 'foo' => 'one two', 'bar' => 'one two', - ); - $tests['Folded block chomping strip with single trailing newline'] = array($expected, $yaml); + ]; + $tests['Folded block chomping strip with single trailing newline'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: >- @@ -326,11 +326,11 @@ bar: >- EOF; - $expected = array( + $expected = [ 'foo' => 'one two', 'bar' => 'one two', - ); - $tests['Folded block chomping strip with multiple trailing newlines'] = array($expected, $yaml); + ]; + $tests['Folded block chomping strip with multiple trailing newlines'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: >- @@ -340,11 +340,11 @@ bar: >- one two EOF; - $expected = array( + $expected = [ 'foo' => 'one two', 'bar' => 'one two', - ); - $tests['Folded block chomping strip without trailing newline'] = array($expected, $yaml); + ]; + $tests['Folded block chomping strip without trailing newline'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: > @@ -355,11 +355,11 @@ bar: > two EOF; - $expected = array( + $expected = [ 'foo' => "one two\n", 'bar' => "one two\n", - ); - $tests['Folded block chomping clip with single trailing newline'] = array($expected, $yaml); + ]; + $tests['Folded block chomping clip with single trailing newline'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: > @@ -372,11 +372,11 @@ bar: > EOF; - $expected = array( + $expected = [ 'foo' => "one two\n", 'bar' => "one two\n", - ); - $tests['Folded block chomping clip with multiple trailing newlines'] = array($expected, $yaml); + ]; + $tests['Folded block chomping clip with multiple trailing newlines'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: > @@ -386,11 +386,11 @@ bar: > one two EOF; - $expected = array( + $expected = [ 'foo' => "one two\n", 'bar' => 'one two', - ); - $tests['Folded block chomping clip without trailing newline'] = array($expected, $yaml); + ]; + $tests['Folded block chomping clip without trailing newline'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: >+ @@ -401,11 +401,11 @@ bar: >+ two EOF; - $expected = array( + $expected = [ 'foo' => "one two\n", 'bar' => "one two\n", - ); - $tests['Folded block chomping keep with single trailing newline'] = array($expected, $yaml); + ]; + $tests['Folded block chomping keep with single trailing newline'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: >+ @@ -418,11 +418,11 @@ bar: >+ EOF; - $expected = array( + $expected = [ 'foo' => "one two\n\n", 'bar' => "one two\n\n", - ); - $tests['Folded block chomping keep with multiple trailing newlines'] = array($expected, $yaml); + ]; + $tests['Folded block chomping keep with multiple trailing newlines'] = [$expected, $yaml]; $yaml = <<<'EOF' foo: >+ @@ -432,11 +432,11 @@ bar: >+ one two EOF; - $expected = array( + $expected = [ 'foo' => "one two\n", 'bar' => 'one two', - ); - $tests['Folded block chomping keep without trailing newline'] = array($expected, $yaml); + ]; + $tests['Folded block chomping keep without trailing newline'] = [$expected, $yaml]; return $tests; } @@ -463,9 +463,9 @@ foo: |- bar EOF; - $expected = array( + $expected = [ 'foo' => "\n\nbar", - ); + ]; $this->assertSame($expected, $this->parser->parse($yaml)); } @@ -476,7 +476,7 @@ EOF; foo: !php/object O:30:"Symfony\Component\Yaml\Tests\B":1:{s:1:"b";s:3:"foo";} bar: 1 EOF; - $this->assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($input, Yaml::PARSE_OBJECT), '->parse() is able to parse objects'); + $this->assertEquals(['foo' => new B(), 'bar' => 1], $this->parser->parse($input, Yaml::PARSE_OBJECT), '->parse() is able to parse objects'); } /** @@ -488,7 +488,7 @@ EOF; foo: !php/object:O:30:"Symfony\Component\Yaml\Tests\B":1:{s:1:"b";s:3:"foo";} bar: 1 EOF; - $this->assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($input, false, true), '->parse() is able to parse objects'); + $this->assertEquals(['foo' => new B(), 'bar' => 1], $this->parser->parse($input, false, true), '->parse() is able to parse objects'); } /** @@ -497,25 +497,25 @@ EOF; */ public function testObjectSupportEnabledWithDeprecatedTag($yaml) { - $this->assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($yaml, Yaml::PARSE_OBJECT), '->parse() is able to parse objects'); + $this->assertEquals(['foo' => new B(), 'bar' => 1], $this->parser->parse($yaml, Yaml::PARSE_OBJECT), '->parse() is able to parse objects'); } public function deprecatedObjectValueProvider() { - return array( - array( + return [ + [ <<assertEquals(array('foo' => null, 'bar' => 1), $this->parser->parse($input), '->parse() does not parse objects'); + $this->assertEquals(['foo' => null, 'bar' => 1], $this->parser->parse($input), '->parse() does not parse objects'); } /** @@ -547,7 +547,7 @@ YAML public function getObjectForMapTests() { - $tests = array(); + $tests = []; $yaml = <<<'EOF' foo: @@ -555,20 +555,20 @@ foo: EOF; $expected = new \stdClass(); $expected->foo = new \stdClass(); - $expected->foo->fiz = array('cat'); - $tests['mapping'] = array($yaml, $expected); + $expected->foo->fiz = ['cat']; + $tests['mapping'] = [$yaml, $expected]; $yaml = '{ "foo": "bar", "fiz": "cat" }'; $expected = new \stdClass(); $expected->foo = 'bar'; $expected->fiz = 'cat'; - $tests['inline-mapping'] = array($yaml, $expected); + $tests['inline-mapping'] = [$yaml, $expected]; $yaml = "foo: bar\nbaz: foobar"; $expected = new \stdClass(); $expected->foo = 'bar'; $expected->baz = 'foobar'; - $tests['object-for-map-is-applied-after-parsing'] = array($yaml, $expected); + $tests['object-for-map-is-applied-after-parsing'] = [$yaml, $expected]; $yaml = <<<'EOT' array: @@ -576,12 +576,12 @@ array: - key: two EOT; $expected = new \stdClass(); - $expected->array = array(); + $expected->array = []; $expected->array[0] = new \stdClass(); $expected->array[0]->key = 'one'; $expected->array[1] = new \stdClass(); $expected->array[1]->key = 'two'; - $tests['nest-map-and-sequence'] = array($yaml, $expected); + $tests['nest-map-and-sequence'] = [$yaml, $expected]; $yaml = <<<'YAML' map: @@ -592,7 +592,7 @@ YAML; $expected->map = new \stdClass(); $expected->map->{1} = 'one'; $expected->map->{2} = 'two'; - $tests['numeric-keys'] = array($yaml, $expected); + $tests['numeric-keys'] = [$yaml, $expected]; $yaml = <<<'YAML' map: @@ -603,7 +603,7 @@ YAML; $expected->map = new \stdClass(); $expected->map->{0} = 'one'; $expected->map->{1} = 'two'; - $tests['zero-indexed-numeric-keys'] = array($yaml, $expected); + $tests['zero-indexed-numeric-keys'] = [$yaml, $expected]; return $tests; } @@ -621,9 +621,9 @@ YAML; { $yaml = "items: \n foo: bar"; - $expected = array( - 'items' => array('foo' => 'bar'), - ); + $expected = [ + 'items' => ['foo' => 'bar'], + ]; $this->assertSame($expected, $this->parser->parse($yaml)); } @@ -649,10 +649,10 @@ foo: !php/object:O:30:"Symfony\Tests\Component\Yaml\B":1:{s:1:"b";s:3:"foo";} bar: 1 EOF; - return array( - 'yaml-tag' => array($yamlTag), - 'local-tag' => array($localTag), - ); + return [ + 'yaml-tag' => [$yamlTag], + 'local-tag' => [$localTag], + ]; } /** @@ -660,11 +660,11 @@ EOF; */ public function testNonUtf8Exception() { - $yamls = array( + $yamls = [ iconv('UTF-8', 'ISO-8859-1', "foo: 'äöüß'"), iconv('UTF-8', 'ISO-8859-15', "euro: '€'"), iconv('UTF-8', 'CP1252', "cp1252: '©ÉÇáñ'"), - ); + ]; foreach ($yamls as $yaml) { try { @@ -755,19 +755,19 @@ a: - foo d: e EOT; - $expected = array( - 'a' => array( - array( - 'b' => array( - array( + $expected = [ + 'a' => [ + [ + 'b' => [ + [ 'bar' => 'baz', - ), - ), - ), + ], + ], + ], 'foo', - ), + ], 'd' => 'e', - ); + ]; $this->assertSame($expected, $this->parser->parse($yaml)); } @@ -781,12 +781,12 @@ a: # comment d: e EOT; - $expected = array( - 'a' => array( - 'b' => array('c'), + $expected = [ + 'a' => [ + 'b' => ['c'], 'd' => 'e', - ), - ); + ], + ]; $this->assertSame($expected, $this->parser->parse($yaml)); } @@ -802,25 +802,25 @@ a: 1.1 # another comment EOT; - $expected = array( - 'a' => array( - 'b' => array(), + $expected = [ + 'a' => [ + 'b' => [], 'd' => 1.1, - ), - ); + ], + ]; $this->assertSame($expected, $this->parser->parse($yaml)); } public function getParseExceptionNotAffectedMultiLineStringLastResortParsing() { - $tests = array(); + $tests = []; $yaml = <<<'EOT' a b: EOT; - $tests['parse error on first line'] = array($yaml); + $tests['parse error on first line'] = [$yaml]; $yaml = <<<'EOT' a @@ -828,12 +828,12 @@ a b c: EOT; - $tests['parse error due to inconsistent indentation'] = array($yaml); + $tests['parse error due to inconsistent indentation'] = [$yaml]; $yaml = <<<'EOT' & * ! | > ' " % @ ` #, { asd a;sdasd }-@^qw3 EOT; - $tests['symfony/symfony/issues/22967#issuecomment-322067742'] = array($yaml); + $tests['symfony/symfony/issues/22967#issuecomment-322067742'] = [$yaml]; return $tests; } @@ -855,9 +855,9 @@ test: true yes you can EOT; - $expected = array( + $expected = [ 'test' => 'You can have things that don\'t look like strings here true yes you can', - ); + ]; $this->assertSame($expected, $this->parser->parse($yaml)); @@ -866,9 +866,9 @@ a: b c EOT; - $expected = array( + $expected = [ 'a' => 'b c', - ); + ]; $this->assertSame($expected, $this->parser->parse($yaml)); } @@ -922,11 +922,11 @@ parent: child: duplicate child: duplicate EOD; - $expected = array( - 'parent' => array( + $expected = [ + 'parent' => [ 'child' => 'first', - ), - ); + ], + ]; $this->assertSame($expected, Yaml::parse($input)); } @@ -939,11 +939,11 @@ EOD; parent: { child: first, child: duplicate } parent: { child: duplicate, child: duplicate } EOD; - $expected = array( - 'parent' => array( + $expected = [ + 'parent' => [ 'child' => 'first', - ), - ); + ], + ]; $this->assertSame($expected, Yaml::parse($input)); } @@ -960,30 +960,30 @@ EOD; public function getParseExceptionOnDuplicateData() { - $tests = array(); + $tests = []; $yaml = <<assertEquals(array('hash' => null), Yaml::parse($input)); + $this->assertEquals(['hash' => null], Yaml::parse($input)); } public function testCommentAtTheRootIndent() { - $this->assertEquals(array( - 'services' => array( - 'app.foo_service' => array( + $this->assertEquals([ + 'services' => [ + 'app.foo_service' => [ 'class' => 'Foo', - ), - 'app/bar_service' => array( + ], + 'app/bar_service' => [ 'class' => 'Bar', - ), - ), - ), Yaml::parse(<<<'EOF' + ], + ], + ], Yaml::parse(<<<'EOF' # comment 1 services: # comment 2 @@ -1052,7 +1052,7 @@ EOF public function testStringBlockWithComments() { - $this->assertEquals(array('content' => <<<'EOT' + $this->assertEquals(['content' => <<<'EOT' # comment 1 header @@ -1063,7 +1063,7 @@ header footer # comment3 EOT - ), Yaml::parse(<<<'EOF' + ], Yaml::parse(<<<'EOF' content: | # comment 1 header @@ -1080,7 +1080,7 @@ EOF public function testFoldedStringBlockWithComments() { - $this->assertEquals(array(array('content' => <<<'EOT' + $this->assertEquals([['content' => <<<'EOT' # comment 1 header @@ -1091,7 +1091,7 @@ header footer # comment3 EOT - )), Yaml::parse(<<<'EOF' + ]], Yaml::parse(<<<'EOF' - content: | # comment 1 @@ -1109,7 +1109,7 @@ EOF public function testNestedFoldedStringBlockWithComments() { - $this->assertEquals(array(array( + $this->assertEquals([[ 'title' => 'some title', 'content' => <<<'EOT' # comment 1 @@ -1122,7 +1122,7 @@ header footer # comment3 EOT - )), Yaml::parse(<<<'EOF' + ]], Yaml::parse(<<<'EOF' - title: some title content: | @@ -1141,17 +1141,17 @@ EOF public function testReferenceResolvingInInlineStrings() { - $this->assertEquals(array( + $this->assertEquals([ 'var' => 'var-value', 'scalar' => 'var-value', - 'list' => array('var-value'), - 'list_in_list' => array(array('var-value')), - 'map_in_list' => array(array('key' => 'var-value')), - 'embedded_mapping' => array(array('key' => 'var-value')), - 'map' => array('key' => 'var-value'), - 'list_in_map' => array('key' => array('var-value')), - 'map_in_map' => array('foo' => array('bar' => 'var-value')), - ), Yaml::parse(<<<'EOF' + 'list' => ['var-value'], + 'list_in_list' => [['var-value']], + 'map_in_list' => [['key' => 'var-value']], + 'embedded_mapping' => [['key' => 'var-value']], + 'map' => ['key' => 'var-value'], + 'list_in_map' => ['key' => ['var-value']], + 'map_in_map' => ['foo' => ['bar' => 'var-value']], + ], Yaml::parse(<<<'EOF' var: &var var-value scalar: *var list: [ *var ] @@ -1173,7 +1173,7 @@ EOF foo: 1 bar: 2 EOF; - $this->assertEquals(array('foo' => 1, 'bar' => 2), $this->parser->parse($yaml)); + $this->assertEquals(['foo' => 1, 'bar' => 2], $this->parser->parse($yaml)); } /** @@ -1188,12 +1188,12 @@ foo: 1.3: "baz" EOF; - $expected = array( - 'foo' => array( + $expected = [ + 'foo' => [ '1.2' => 'bar', '1.3' => 'baz', - ), - ); + ], + ]; $this->assertEquals($expected, $this->parser->parse($yaml)); } @@ -1209,10 +1209,10 @@ true: foo false: bar EOF; - $expected = array( + $expected = [ 1 => 'foo', 0 => 'bar', - ); + ]; $this->assertEquals($expected, $this->parser->parse($yaml)); } @@ -1230,14 +1230,14 @@ EOF; '~': 'null' EOF; - $expected = array( + $expected = [ '1.2' => 'bar', '1.3' => 'baz', 'true' => 'foo', 'false' => 'bar', 'null' => 'null', '~' => 'null', - ); + ]; $this->assertEquals($expected, $this->parser->parse($yaml)); } @@ -1262,7 +1262,7 @@ foo: bar: foobar # Note: a comment after a colon EOT; - $this->assertSame(array('foo' => array('bar' => 'foobar')), $this->parser->parse($yaml)); + $this->assertSame(['foo' => ['bar' => 'foobar']], $this->parser->parse($yaml)); } /** @@ -1275,7 +1275,7 @@ EOT; public function getCommentLikeStringInScalarBlockData() { - $tests = array(); + $tests = []; $yaml = <<<'EOT' pages: @@ -1292,9 +1292,9 @@ pages: footer # comment3 EOT; - $expected = array( - 'pages' => array( - array( + $expected = [ + 'pages' => [ + [ 'title' => 'some title', 'content' => <<<'EOT' # comment 1 @@ -1308,10 +1308,10 @@ header footer # comment3 EOT , - ), - ), - ); - $tests[] = array($yaml, $expected); + ], + ], + ]; + $tests[] = [$yaml, $expected]; $yaml = <<<'EOT' test: | @@ -1328,7 +1328,7 @@ collection: # bar baz EOT; - $expected = array( + $expected = [ 'test' => <<<'EOT' foo # bar @@ -1336,8 +1336,8 @@ baz EOT , - 'collection' => array( - array( + 'collection' => [ + [ 'one' => <<<'EOT' foo # bar @@ -1345,18 +1345,18 @@ baz EOT , - ), - array( + ], + [ 'two' => <<<'EOT' foo # bar baz EOT , - ), - ), - ); - $tests[] = array($yaml, $expected); + ], + ], + ]; + $tests[] = [$yaml, $expected]; $yaml = <<<'EOT' foo: @@ -1368,17 +1368,17 @@ foo: # comment foobar: ~ EOT; - $expected = array( - 'foo' => array( - 'bar' => array( + $expected = [ + 'foo' => [ + 'bar' => [ 'scalar-block' => "line1 line2>\n", - ), - 'baz' => array( + ], + 'baz' => [ 'foobar' => null, - ), - ), - ); - $tests[] = array($yaml, $expected); + ], + ], + ]; + $tests[] = [$yaml, $expected]; $yaml = <<<'EOT' a: @@ -1388,13 +1388,13 @@ a: # second row d: hello EOT; - $expected = array( - 'a' => array( + $expected = [ + 'a' => [ 'b' => 'hello', 'd' => 'hello', - ), - ); - $tests[] = array($yaml, $expected); + ], + ]; + $tests[] = [$yaml, $expected]; return $tests; } @@ -1412,13 +1412,13 @@ test: > EOT; $this->assertSame( - array( + [ 'test' => <<<'EOT'

    A heading

    • a list
    • may be a good example
    EOT , - ), + ], $this->parser->parse($yaml) ); } @@ -1436,7 +1436,7 @@ test: > EOT; $this->assertSame( - array( + [ 'test' => <<<'EOT'

    A heading

      @@ -1445,7 +1445,7 @@ EOT;
    EOT , - ), + ], $this->parser->parse($yaml) ); } @@ -1455,28 +1455,28 @@ EOT */ public function testParseBinaryData($data) { - $this->assertSame(array('data' => 'Hello world'), $this->parser->parse($data)); + $this->assertSame(['data' => 'Hello world'], $this->parser->parse($data)); } public function getBinaryData() { - return array( - 'enclosed with double quotes' => array('data: !!binary "SGVsbG8gd29ybGQ="'), - 'enclosed with single quotes' => array("data: !!binary 'SGVsbG8gd29ybGQ='"), - 'containing spaces' => array('data: !!binary "SGVs bG8gd 29ybGQ="'), - 'in block scalar' => array( + return [ + 'enclosed with double quotes' => ['data: !!binary "SGVsbG8gd29ybGQ="'], + 'enclosed with single quotes' => ["data: !!binary 'SGVsbG8gd29ybGQ='"], + 'containing spaces' => ['data: !!binary "SGVs bG8gd 29ybGQ="'], + 'in block scalar' => [ <<<'EOT' data: !!binary | SGVsbG8gd29ybGQ= EOT - ), - 'containing spaces in block scalar' => array( + ], + 'containing spaces in block scalar' => [ <<<'EOT' data: !!binary | SGVs bG8gd 29ybGQ= EOT - ), - ); + ], + ]; } /** @@ -1496,44 +1496,44 @@ EOT public function getInvalidBinaryData() { - return array( - 'length not a multiple of four' => array('data: !!binary "SGVsbG8d29ybGQ="', '/The normalized base64 encoded data \(data without whitespace characters\) length must be a multiple of four \(\d+ bytes given\)/'), - 'invalid characters' => array('!!binary "SGVsbG8#d29ybGQ="', '/The base64 encoded data \(.*\) contains invalid characters/'), - 'too many equals characters' => array('data: !!binary "SGVsbG8gd29yb==="', '/The base64 encoded data \(.*\) contains invalid characters/'), - 'misplaced equals character' => array('data: !!binary "SGVsbG8gd29ybG=Q"', '/The base64 encoded data \(.*\) contains invalid characters/'), - 'length not a multiple of four in block scalar' => array( + return [ + 'length not a multiple of four' => ['data: !!binary "SGVsbG8d29ybGQ="', '/The normalized base64 encoded data \(data without whitespace characters\) length must be a multiple of four \(\d+ bytes given\)/'], + 'invalid characters' => ['!!binary "SGVsbG8#d29ybGQ="', '/The base64 encoded data \(.*\) contains invalid characters/'], + 'too many equals characters' => ['data: !!binary "SGVsbG8gd29yb==="', '/The base64 encoded data \(.*\) contains invalid characters/'], + 'misplaced equals character' => ['data: !!binary "SGVsbG8gd29ybG=Q"', '/The base64 encoded data \(.*\) contains invalid characters/'], + 'length not a multiple of four in block scalar' => [ <<<'EOT' data: !!binary | SGVsbG8d29ybGQ= EOT , '/The normalized base64 encoded data \(data without whitespace characters\) length must be a multiple of four \(\d+ bytes given\)/', - ), - 'invalid characters in block scalar' => array( + ], + 'invalid characters in block scalar' => [ <<<'EOT' data: !!binary | SGVsbG8#d29ybGQ= EOT , '/The base64 encoded data \(.*\) contains invalid characters/', - ), - 'too many equals characters in block scalar' => array( + ], + 'too many equals characters in block scalar' => [ <<<'EOT' data: !!binary | SGVsbG8gd29yb=== EOT , '/The base64 encoded data \(.*\) contains invalid characters/', - ), - 'misplaced equals character in block scalar' => array( + ], + 'misplaced equals character in block scalar' => [ <<<'EOT' data: !!binary | SGVsbG8gd29ybG=Q EOT , '/The base64 encoded data \(.*\) contains invalid characters/', - ), - ); + ], + ]; } public function testParseDateAsMappingValue() @@ -1546,7 +1546,7 @@ EOT; $expectedDate->setDate(2002, 12, 14); $expectedDate->setTime(0, 0, 0); - $this->assertEquals(array('date' => $expectedDate), $this->parser->parse($yaml, Yaml::PARSE_DATETIME)); + $this->assertEquals(['date' => $expectedDate], $this->parser->parse($yaml, Yaml::PARSE_DATETIME)); } /** @@ -1568,8 +1568,8 @@ EOT; public function parserThrowsExceptionWithCorrectLineNumberProvider() { - return array( - array( + return [ + [ 4, <<<'YAML' foo: @@ -1577,8 +1577,8 @@ foo: # bar bar: "123", YAML - ), - array( + ], + [ 5, <<<'YAML' foo: @@ -1587,8 +1587,8 @@ foo: # bar bar: "123", YAML - ), - array( + ], + [ 8, <<<'YAML' foo: @@ -1600,8 +1600,8 @@ bar: # bar bar: "123", YAML - ), - array( + ], + [ 10, <<<'YAML' foo: @@ -1615,8 +1615,8 @@ bar: # bar bar: "123", YAML - ), - ); + ], + ]; } public function testParseMultiLineQuotedString() @@ -1629,7 +1629,7 @@ foo" bar: baz EOT; - $this->assertSame(array('foo' => 'bar baz foobar foo', 'bar' => 'baz'), $this->parser->parse($yaml)); + $this->assertSame(['foo' => 'bar baz foobar foo', 'bar' => 'baz'], $this->parser->parse($yaml)); } public function testMultiLineQuotedStringWithTrailingBackslash() @@ -1640,7 +1640,7 @@ foobar: bar" YAML; - $this->assertSame(array('foobar' => 'foobar'), $this->parser->parse($yaml)); + $this->assertSame(['foobar' => 'foobar'], $this->parser->parse($yaml)); } public function testCommentCharactersInMultiLineQuotedStrings() @@ -1651,12 +1651,12 @@ foo: #bar' bar: baz YAML; - $expected = array( - 'foo' => array( + $expected = [ + 'foo' => [ 'foobar' => 'foo #bar', 'bar' => 'baz', - ), - ); + ], + ]; $this->assertSame($expected, $this->parser->parse($yaml)); } @@ -1668,9 +1668,9 @@ foobar: 'foo bar' YAML; - $expected = array( + $expected = [ 'foobar' => "foo\nbar", - ); + ]; $this->assertSame($expected, $this->parser->parse($yaml)); } @@ -1685,7 +1685,7 @@ foo: bar bar: baz EOT; - $this->assertSame(array('foo' => 'bar baz foobar foo', 'bar' => 'baz'), $this->parser->parse($yaml)); + $this->assertSame(['foo' => 'bar baz foobar foo', 'bar' => 'baz'], $this->parser->parse($yaml)); } public function testParseMultiLineString() @@ -1703,7 +1703,7 @@ EOT; public function multiLineDataProvider() { - $tests = array(); + $tests = []; $yaml = <<<'EOF' foo: @@ -1713,15 +1713,15 @@ foo: two three EOF; - $expected = array( - 'foo' => array( - array( + $expected = [ + 'foo' => [ + [ 'bar' => "one\ntwo three", - ), - ), - ); + ], + ], + ]; - $tests[] = array($yaml, $expected, false); + $tests[] = [$yaml, $expected, false]; $yaml = <<<'EOF' bar @@ -1729,7 +1729,7 @@ bar EOF; $expected = 'bar "foo"'; - $tests[] = array($yaml, $expected, false); + $tests[] = [$yaml, $expected, false]; $yaml = <<<'EOF' bar @@ -1737,7 +1737,7 @@ bar EOF; $expected = 'bar "foo'; - $tests[] = array($yaml, $expected, false); + $tests[] = [$yaml, $expected, false]; $yaml = <<<'EOF' bar @@ -1746,7 +1746,7 @@ bar EOF; $expected = "bar\n'foo'"; - $tests[] = array($yaml, $expected, false); + $tests[] = [$yaml, $expected, false]; $yaml = <<<'EOF' bar @@ -1755,14 +1755,14 @@ foo' EOF; $expected = "bar\nfoo'"; - $tests[] = array($yaml, $expected, false); + $tests[] = [$yaml, $expected, false]; return $tests; } public function testTaggedInlineMapping() { - $this->assertEquals(new TaggedValue('foo', array('foo' => 'bar')), $this->parser->parse('!foo {foo: bar}', Yaml::PARSE_CUSTOM_TAGS)); + $this->assertEquals(new TaggedValue('foo', ['foo' => 'bar']), $this->parser->parse('!foo {foo: bar}', Yaml::PARSE_CUSTOM_TAGS)); } /** @@ -1775,32 +1775,32 @@ EOF; public function taggedValuesProvider() { - return array( - 'sequences' => array( - array(new TaggedValue('foo', array('yaml')), new TaggedValue('quz', array('bar'))), + return [ + 'sequences' => [ + [new TaggedValue('foo', ['yaml']), new TaggedValue('quz', ['bar'])], << array( - new TaggedValue('foo', array('foo' => new TaggedValue('quz', array('bar')), 'quz' => new TaggedValue('foo', array('quz' => 'bar')))), + ], + 'mappings' => [ + new TaggedValue('foo', ['foo' => new TaggedValue('quz', ['bar']), 'quz' => new TaggedValue('foo', ['quz' => 'bar'])]), << array( - array(new TaggedValue('foo', array('foo', 'bar')), new TaggedValue('quz', array('foo' => 'bar', 'quz' => new TaggedValue('bar', array('one' => 'bar'))))), + ], + 'inline' => [ + [new TaggedValue('foo', ['foo', 'bar']), new TaggedValue('quz', ['foo' => 'bar', 'quz' => new TaggedValue('bar', ['one' => 'bar'])])], <<parseFile(__DIR__.'/Fixtures/'.$testsFile); foreach ($files as $file) { $yamls = file_get_contents(__DIR__.'/Fixtures/'.$file.'.yml'); @@ -1912,7 +1912,7 @@ INI; } else { eval('$expected = '.trim($test['php']).';'); - $tests[] = array(var_export($expected, true), $test['yaml'], $test['test'], isset($test['deprecated']) ? $test['deprecated'] : false); + $tests[] = [var_export($expected, true), $test['yaml'], $test['test'], isset($test['deprecated']) ? $test['deprecated'] : false]; } } } @@ -1923,7 +1923,7 @@ INI; public function testCanParseVeryLongValue() { $longStringWithSpaces = str_repeat('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ', 20000); - $trickyVal = array('x' => $longStringWithSpaces); + $trickyVal = ['x' => $longStringWithSpaces]; $yamlString = Yaml::dump($trickyVal); $arrayFromYaml = $this->parser->parse($yamlString); @@ -1961,16 +1961,16 @@ transitions: - !php/const 'Symfony\Component\Yaml\Tests\B::BAR' to: !php/const 'Symfony\Component\Yaml\Tests\B::BAZ' YAML; - $expected = array( - 'transitions' => array( - 'foo' => array( - 'from' => array( + $expected = [ + 'transitions' => [ + 'foo' => [ + 'from' => [ 'bar', - ), + ], 'to' => 'baz', - ), - ), - ); + ], + ], + ]; $this->assertSame($expected, $this->parser->parse($yaml, Yaml::PARSE_CONSTANT)); } @@ -1990,16 +1990,16 @@ transitions: - !php/const:Symfony\Component\Yaml\Tests\B::BAR to: !php/const:Symfony\Component\Yaml\Tests\B::BAZ YAML; - $expected = array( - 'transitions' => array( - 'foo' => array( - 'from' => array( + $expected = [ + 'transitions' => [ + 'foo' => [ + 'from' => [ 'bar', - ), + ], 'to' => 'baz', - ), - ), - ); + ], + ], + ]; $this->assertSame($expected, $this->parser->parse($yaml, Yaml::PARSE_CONSTANT)); } @@ -2017,16 +2017,16 @@ transitions: - !php/const 'Symfony\Component\Yaml\Tests\B::BAR' to: !php/const 'Symfony\Component\Yaml\Tests\B::BAZ' YAML; - $expected = array( - 'transitions' => array( - 'foo' => array( - 'from' => array( + $expected = [ + 'transitions' => [ + 'foo' => [ + 'from' => [ 'bar', - ), + ], 'to' => 'baz', - ), - ), - ); + ], + ], + ]; $this->assertSame($expected, $this->parser->parse($yaml, Yaml::PARSE_CONSTANT | Yaml::PARSE_KEYS_AS_STRINGS)); } @@ -2047,23 +2047,23 @@ foobar: bar: ~ <<: [*FOO, *BAR] YAML; - $expected = (object) array( - 'foo' => (object) array( + $expected = (object) [ + 'foo' => (object) [ 'bar' => 1, - ), - 'bar' => (object) array( + ], + 'bar' => (object) [ 'baz' => 2, 'bar' => 1, - ), - 'baz' => (object) array( + ], + 'baz' => (object) [ 'baz_foo' => 3, 'baz_bar' => 4, - ), - 'foobar' => (object) array( + ], + 'foobar' => (object) [ 'bar' => null, 'baz' => 2, - ), - ); + ], + ]; $this->assertEquals($expected, $this->parser->parse($yaml, Yaml::PARSE_OBJECT_FOR_MAP)); } @@ -2121,18 +2121,18 @@ mergekeyderef: d: quux <<: *quux YAML; - $expected = array( - 'mergekeyrefdef' => array( + $expected = [ + 'mergekeyrefdef' => [ 'a' => 'foo', 'b' => 'bar', 'c' => 'baz', - ), - 'mergekeyderef' => array( + ], + 'mergekeyderef' => [ 'd' => 'quux', 'b' => 'bar', 'c' => 'baz', - ), - ); + ], + ]; $this->assertSame($expected, $this->parser->parse($yaml)); } @@ -2149,18 +2149,18 @@ mergekeyderef: d: quux <<: *quux YAML; - $expected = (object) array( - 'mergekeyrefdef' => (object) array( + $expected = (object) [ + 'mergekeyrefdef' => (object) [ 'a' => 'foo', 'b' => 'bar', 'c' => 'baz', - ), - 'mergekeyderef' => (object) array( + ], + 'mergekeyderef' => (object) [ 'd' => 'quux', 'b' => 'bar', 'c' => 'baz', - ), - ); + ], + ]; $this->assertEquals($expected, $this->parser->parse($yaml, Yaml::PARSE_OBJECT_FOR_MAP)); } @@ -2177,6 +2177,48 @@ EOE; $this->parser->parse($yaml); } + /** + * @dataProvider circularReferenceProvider + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessage Circular reference [foo, bar, foo] detected + */ + public function testDetectCircularReferences($yaml) + { + $this->parser->parse($yaml, Yaml::PARSE_CUSTOM_TAGS); + } + + public function circularReferenceProvider() + { + $tests = []; + + $yaml = << array( - array( + $expected = [ + 'foo' => [ + [ 'bar' => 'foobar', 'baz' => 'foobaz', - ), - ), - ); - $tests['comment line is first line in indented block'] = array($yaml, $expected); + ], + ], + ]; + $tests['comment line is first line in indented block'] = [$yaml, $expected]; $yaml = << array( - array( - 'bar' => array( - 'baz' => array(1, 2, 3), - ), - ), - ), - ); - $tests['mapping value on new line starting with a comment line'] = array($yaml, $expected); + $expected = [ + 'foo' => [ + [ + 'bar' => [ + 'baz' => [1, 2, 3], + ], + ], + ], + ]; + $tests['mapping value on new line starting with a comment line'] = [$yaml, $expected]; $yaml = << array( - array( + $expected = [ + 'foo' => [ + [ 'bar' => 'foobar', - ), - ), - ); - $tests['mapping in sequence starting on a new line'] = array($yaml, $expected); + ], + ], + ]; + $tests['mapping in sequence starting on a new line'] = [$yaml, $expected]; $yaml = << array( + $expected = [ + 'foo' => [ 'bar' => 'baz', - ), - ); - $tests['blank line at the beginning of an indented mapping value'] = array($yaml, $expected); + ], + ]; + $tests['blank line at the beginning of an indented mapping value'] = [$yaml, $expected]; return $tests; } diff --git a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/YamlTest.php b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/YamlTest.php index 3f6c2525..5a792c51 100644 --- a/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/YamlTest.php +++ b/src/cadolesuser-1.0/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/YamlTest.php @@ -18,7 +18,7 @@ class YamlTest extends TestCase { public function testParseAndDump() { - $data = array('lorem' => 'ipsum', 'dolor' => 'sit'); + $data = ['lorem' => 'ipsum', 'dolor' => 'sit']; $yml = Yaml::dump($data); $parsed = Yaml::parse($yml); $this->assertEquals($data, $parsed); @@ -30,7 +30,7 @@ class YamlTest extends TestCase */ public function testZeroIndentationThrowsException() { - Yaml::dump(array('lorem' => 'ipsum', 'dolor' => 'sit'), 2, 0); + Yaml::dump(['lorem' => 'ipsum', 'dolor' => 'sit'], 2, 0); } /** @@ -39,6 +39,6 @@ class YamlTest extends TestCase */ public function testNegativeIndentationThrowsException() { - Yaml::dump(array('lorem' => 'ipsum', 'dolor' => 'sit'), 2, -4); + Yaml::dump(['lorem' => 'ipsum', 'dolor' => 'sit'], 2, -4); } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/.php_cs.dist b/src/cadolesuser-1.0/vendor/twig/twig/.php_cs.dist index cd75923a..c9d9b7a5 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/.php_cs.dist +++ b/src/cadolesuser-1.0/vendor/twig/twig/.php_cs.dist @@ -1,15 +1,15 @@ setRules(array( + ->setRules([ '@Symfony' => true, '@Symfony:risky' => true, - 'array_syntax' => array('syntax' => 'long'), + 'array_syntax' => ['syntax' => 'short'], 'php_unit_fqcn_annotation' => false, 'no_unreachable_default_argument_value' => false, - 'braces' => array('allow_single_line_closure' => true), + 'braces' => ['allow_single_line_closure' => true], 'heredoc_to_nowdoc' => false, - )) + ]) ->setRiskyAllowed(true) ->setFinder(PhpCsFixer\Finder::create()->in(__DIR__)) ; diff --git a/src/cadolesuser-1.0/vendor/twig/twig/.travis.yml b/src/cadolesuser-1.0/vendor/twig/twig/.travis.yml index b71f9447..b860c795 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/.travis.yml +++ b/src/cadolesuser-1.0/vendor/twig/twig/.travis.yml @@ -12,6 +12,7 @@ matrix: - php: 7.0 - php: 7.1 - php: 7.2 + - php: 7.3 - php: nightly fast_finish: true @@ -22,9 +23,4 @@ before_install: install: - travis_retry composer install -script: | - if [[ $TRAVIS_PHP_VERSION = 7.* || $TRAVIS_PHP_VERSION = nightly ]]; then - SYMFONY_PHPUNIT_VERSION=6.1 ./vendor/bin/simple-phpunit - else - ./vendor/bin/simple-phpunit - fi +script: ./vendor/bin/simple-phpunit diff --git a/src/cadolesuser-1.0/vendor/twig/twig/CHANGELOG b/src/cadolesuser-1.0/vendor/twig/twig/CHANGELOG index 74bc851c..879d5fdf 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/CHANGELOG +++ b/src/cadolesuser-1.0/vendor/twig/twig/CHANGELOG @@ -1,3 +1,27 @@ +* 2.6.2 (2019-01-14) + + * fixed regression (key exists check for non ArrayObject objects) + +* 2.6.1 (2019-01-14) + + * fixed ArrayObject access with a null value + * fixed embedded templates starting with a BOM + * fixed using a Twig_TemplateWrapper instance as an argument to extends + * fixed error location when calling an undefined block + * deprecated passing a string as a source on Twig_Error + * switched generated code to use the PHP short array notation + * fixed float representation in compiled templates + * added a second argument to the join filter (last separator configuration) + +* 2.6.0 (2018-12-16) + + * made sure twig_include returns a string + * fixed multi-byte UFT-8 in escape('html_attr') + * added the "deprecated" tag + * added support for dynamically named tests + * fixed GlobalsInterface extended class + * fixed filesystem loader throwing an exception instead of returning false + * 2.5.0 (2018-07-13) * deprecated using the spaceless tag at the root level of a child template (noop anyway) @@ -116,9 +140,29 @@ * improved the performance of the filesystem loader * removed features that were deprecated in 1.x -* 1.35.5 (2018-XX-XX) +* 1.37.1 (2019-XX-XX) - * n/a + * fixed regression (key exists check for non ArrayObject objects) + * fixed logic in TemplateWrapper + +* 1.37.0 (2019-01-14) + + * fixed ArrayObject access with a null value + * fixed embedded templates starting with a BOM + * fixed using a Twig_TemplateWrapper instance as an argument to extends + * switched generated code to use the PHP short array notation + * dropped PHP 5.3 support + * fixed float representation in compiled templates + * added a second argument to the join filter (last separator configuration) + +* 1.36.0 (2018-12-16) + + * made sure twig_include returns a string + * fixed multi-byte UFT-8 in escape('html_attr') + * added the "deprecated" tag + * added support for dynamically named tests + * fixed GlobalsInterface extended class + * fixed filesystem loader throwing an exception instead of returning false * 1.35.4 (2018-07-13) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/LICENSE b/src/cadolesuser-1.0/vendor/twig/twig/LICENSE index e401cb97..d06ced2a 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/LICENSE +++ b/src/cadolesuser-1.0/vendor/twig/twig/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009-2018 by the Twig Team. +Copyright (c) 2009-2019 by the Twig Team. Some rights reserved. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/composer.json b/src/cadolesuser-1.0/vendor/twig/twig/composer.json index e0809552..094e1cec 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/composer.json +++ b/src/cadolesuser-1.0/vendor/twig/twig/composer.json @@ -28,11 +28,11 @@ }, "require": { "php": "^7.0", - "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-mbstring": "^1.3", "symfony/polyfill-ctype": "^1.8" }, "require-dev": { - "symfony/phpunit-bridge": "^3.3", + "symfony/phpunit-bridge": "^3.4.19|^4.1.8", "symfony/debug": "^2.7", "psr/container": "^1.0" }, @@ -51,7 +51,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.6-dev" } } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/doc/advanced.rst b/src/cadolesuser-1.0/vendor/twig/twig/doc/advanced.rst index 1fbefa25..531d0da4 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/doc/advanced.rst +++ b/src/cadolesuser-1.0/vendor/twig/twig/doc/advanced.rst @@ -131,13 +131,13 @@ Creating a filter is as simple as associating a name with a PHP callable:: $filter = new Twig_Filter('rot13', 'str_rot13'); // or a class static method - $filter = new Twig_Filter('rot13', array('SomeClass', 'rot13Filter')); + $filter = new Twig_Filter('rot13', ['SomeClass', 'rot13Filter']); $filter = new Twig_Filter('rot13', 'SomeClass::rot13Filter'); // or a class method - $filter = new Twig_Filter('rot13', array($this, 'rot13Filter')); + $filter = new Twig_Filter('rot13', [$this, 'rot13Filter']); // the one below needs a runtime implementation (see below for more information) - $filter = new Twig_Filter('rot13', array('SomeClass', 'rot13Filter')); + $filter = new Twig_Filter('rot13', ['SomeClass', 'rot13Filter']); The first argument passed to the ``Twig_Filter`` constructor is the name of the filter you will use in templates and the second one is the PHP callable to @@ -188,7 +188,7 @@ environment as the first argument to the filter call:: $charset = $env->getCharset(); return str_rot13($string); - }, array('needs_environment' => true)); + }, ['needs_environment' => true]); Context-aware Filters ~~~~~~~~~~~~~~~~~~~~~ @@ -200,11 +200,11 @@ the first argument to the filter call (or the second one if $filter = new Twig_Filter('rot13', function ($context, $string) { // ... - }, array('needs_context' => true)); + }, ['needs_context' => true]); $filter = new Twig_Filter('rot13', function (Twig_Environment $env, $context, $string) { // ... - }, array('needs_context' => true, 'needs_environment' => true)); + }, ['needs_context' => true, 'needs_environment' => true]); Automatic Escaping ~~~~~~~~~~~~~~~~~~ @@ -214,14 +214,14 @@ before printing. If your filter acts as an escaper (or explicitly outputs HTML or JavaScript code), you will want the raw output to be printed. In such a case, set the ``is_safe`` option:: - $filter = new Twig_Filter('nl2br', 'nl2br', array('is_safe' => array('html'))); + $filter = new Twig_Filter('nl2br', 'nl2br', ['is_safe' => ['html']]); Some filters may need to work on input that is already escaped or safe, for example when adding (safe) HTML tags to originally unsafe output. In such a case, set the ``pre_escape`` option to escape the input data before it is run through your filter:: - $filter = new Twig_Filter('somefilter', 'somefilter', array('pre_escape' => 'html', 'is_safe' => array('html'))); + $filter = new Twig_Filter('somefilter', 'somefilter', ['pre_escape' => 'html', 'is_safe' => ['html']]); Variadic Filters ~~~~~~~~~~~~~~~~ @@ -230,9 +230,9 @@ When a filter should accept an arbitrary number of arguments, set the ``is_variadic`` option to ``true``; Twig will pass the extra arguments as the last argument to the filter call as an array:: - $filter = new Twig_Filter('thumbnail', function ($file, array $options = array()) { + $filter = new Twig_Filter('thumbnail', function ($file, array $options = []) { // ... - }, array('is_variadic' => true)); + }, ['is_variadic' => true]); Be warned that named arguments passed to a variadic filter cannot be checked for validity as they will automatically end up in the option array. @@ -272,7 +272,7 @@ deprecated one when that makes sense:: $filter = new Twig_Filter('obsolete', function () { // ... - }, array('deprecated' => true, 'alternative' => 'new_one')); + }, ['deprecated' => true, 'alternative' => 'new_one']); When a filter is deprecated, Twig emits a deprecation notice when compiling a template using it. See :ref:`deprecation-notices` for more information. @@ -330,7 +330,7 @@ This is used by many of the tests built into Twig:: $test = new Twig_Test( 'odd', null, - array('node_class' => 'Twig_Node_Expression_Test_Odd')); + ['node_class' => 'Twig_Node_Expression_Test_Odd']); $twig->addTest($test); class Twig_Node_Expression_Test_Odd extends Twig_Node_Expression_Test @@ -358,9 +358,12 @@ The ``node`` sub-node will contain an expression of ``my_value``. Node-based tests also have access to the ``arguments`` node. This node will contain the various other arguments that have been provided to your test. +.. versionadded:: 2.6 + Dynamic tests support was added in Twig 2.6. + If you want to pass a variable number of positional or named arguments to the -test, set the ``is_variadic`` option to ``true``. Tests also support dynamic -name feature as filters and functions. +test, set the ``is_variadic`` option to ``true``. Tests support dynamic +names (see dynamic filters and functions for the syntax). Tags ---- @@ -470,7 +473,7 @@ The ``Project_Set_Node`` class itself is rather simple:: { public function __construct($name, Twig_Node_Expression $value, $line, $tag = null) { - parent::__construct(array('value' => $value), array('name' => $name), $line, $tag); + parent::__construct(['value' => $value], ['name' => $name], $line, $tag); } public function compile(Twig_Compiler $compiler) @@ -613,9 +616,9 @@ method:: { public function getGlobals() { - return array( + return [ 'text' => new Text(), - ); + ]; } // ... @@ -631,9 +634,9 @@ method:: { public function getFunctions() { - return array( + return [ new Twig_Function('lipsum', 'generate_lipsum'), - ); + ]; } // ... @@ -650,9 +653,9 @@ environment:: { public function getFilters() { - return array( + return [ new Twig_Filter('rot13', 'str_rot13'), - ); + ]; } // ... @@ -669,7 +672,7 @@ to the Twig environment:: { public function getTokenParsers() { - return array(new Project_Set_TokenParser()); + return [new Project_Set_TokenParser()]; } // ... @@ -689,15 +692,15 @@ The ``getOperators()`` methods lets you add new operators. Here is how to add { public function getOperators() { - return array( - array( - '!' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'), - ), - array( - '||' => array('precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '&&' => array('precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - ), - ); + return [ + [ + '!' => ['precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'], + ], + [ + '||' => ['precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '&&' => ['precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + ], + ]; } // ... @@ -712,9 +715,9 @@ The ``getTests()`` method lets you add new test functions:: { public function getTests() { - return array( + return [ new Twig_Test('even', 'twig_test_even'), - ); + ]; } // ... @@ -748,9 +751,9 @@ The simplest way to use methods is to define them on the extension itself:: public function getFunctions() { - return array( - new Twig_Function('rot13', array($this, 'rot13')), - ); + return [ + new Twig_Function('rot13', [$this, 'rot13']), + ]; } public function rot13($value) @@ -812,11 +815,11 @@ It is now possible to move the runtime logic to a new { public function getFunctions() { - return array( - new Twig_Function('rot13', array('Project_Twig_RuntimeExtension', 'rot13')), + return [ + new Twig_Function('rot13', ['Project_Twig_RuntimeExtension', 'rot13']), // or new Twig_Function('rot13', 'Project_Twig_RuntimeExtension::rot13'), - ); + ]; } } @@ -831,9 +834,9 @@ possible** (order matters):: { public function getFilters() { - return array( - new Twig_Filter('date', array($this, 'dateFilter')), - ); + return [ + new Twig_Filter('date', [$this, 'dateFilter']), + ]; } public function dateFilter($timestamp, $format = 'F j, Y H:i') @@ -890,10 +893,10 @@ The ``IntegrationTest.php`` file should look like this:: { public function getExtensions() { - return array( + return [ new Project_Twig_Extension1(), new Project_Twig_Extension2(), - ); + ]; } public function getFixturesDir() diff --git a/src/cadolesuser-1.0/vendor/twig/twig/doc/api.rst b/src/cadolesuser-1.0/vendor/twig/twig/doc/api.rst index bca0ed48..5d8bd7be 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/doc/api.rst +++ b/src/cadolesuser-1.0/vendor/twig/twig/doc/api.rst @@ -24,9 +24,9 @@ looks roughly like this:: require_once '/path/to/vendor/autoload.php'; $loader = new Twig_Loader_Filesystem('/path/to/templates'); - $twig = new Twig_Environment($loader, array( + $twig = new Twig_Environment($loader, [ 'cache' => '/path/to/compilation_cache', - )); + ]); This will create a template environment with the default settings and a loader that looks up the templates in the ``/path/to/templates/`` folder. Different @@ -52,7 +52,7 @@ returns a ``Twig_TemplateWrapper`` instance:: To render the template with some variables, call the ``render()`` method:: - echo $template->render(array('the' => 'variables', 'go' => 'here')); + echo $template->render(['the' => 'variables', 'go' => 'here']); .. note:: @@ -60,12 +60,12 @@ To render the template with some variables, call the ``render()`` method:: You can also load and render the template in one fell swoop:: - echo $twig->render('index.html', array('the' => 'variables', 'go' => 'here')); + echo $twig->render('index.html', ['the' => 'variables', 'go' => 'here']); If a template defines blocks, they can be rendered individually via the ``renderBlock()`` call:: - echo $template->renderBlock('block_name', array('the' => 'variables', 'go' => 'here')); + echo $template->renderBlock('block_name', ['the' => 'variables', 'go' => 'here']); .. _environment_options: @@ -75,7 +75,7 @@ Environment Options When creating a new ``Twig_Environment`` instance, you can pass an array of options as the constructor second argument:: - $twig = new Twig_Environment($loader, array('debug' => true)); + $twig = new Twig_Environment($loader, ['debug' => true]); The following options are available: @@ -161,7 +161,7 @@ load them:: It can also look for templates in an array of directories:: - $loader = new Twig_Loader_Filesystem(array($templateDir1, $templateDir2)); + $loader = new Twig_Loader_Filesystem([$templateDir1, $templateDir2]); With such a configuration, Twig will first look for templates in ``$templateDir1`` and if they do not exist, it will fallback to look for them @@ -185,7 +185,7 @@ methods act on the "main" namespace):: Namespaced templates can be accessed via the special ``@namespace_name/template_path`` notation:: - $twig->render('@admin/index.html', array()); + $twig->render('@admin/index.html', []); ``Twig_Loader_Filesystem`` support absolute and relative paths. Using relative paths is preferred as it makes the cache keys independent of the project root @@ -205,12 +205,12 @@ the directory might be different from the one used on production servers):: ``Twig_Loader_Array`` loads a template from a PHP array. It's passed an array of strings bound to template names:: - $loader = new Twig_Loader_Array(array( + $loader = new Twig_Loader_Array([ 'index.html' => 'Hello {{ name }}!', - )); + ]); $twig = new Twig_Environment($loader); - echo $twig->render('index.html', array('name' => 'Fabien')); + echo $twig->render('index.html', ['name' => 'Fabien']); This loader is very useful for unit testing. It can also be used for small projects where storing all templates in a single PHP file might make sense. @@ -228,15 +228,15 @@ projects where storing all templates in a single PHP file might make sense. ``Twig_Loader_Chain`` delegates the loading of templates to other loaders:: - $loader1 = new Twig_Loader_Array(array( + $loader1 = new Twig_Loader_Array([ 'base.html' => '{% block content %}{% endblock %}', - )); - $loader2 = new Twig_Loader_Array(array( + ]); + $loader2 = new Twig_Loader_Array([ 'index.html' => '{% extends "base.html" %}{% block content %}Hello {{ name }}{% endblock %}', 'base.html' => 'Will never be loaded', - )); + ]); - $loader = new Twig_Loader_Chain(array($loader1, $loader2)); + $loader = new Twig_Loader_Chain([$loader1, $loader2]); $twig = new Twig_Environment($loader); @@ -458,15 +458,15 @@ by a policy instance. By default, Twig comes with one policy class: ``Twig_Sandbox_SecurityPolicy``. This class allows you to white-list some tags, filters, properties, and methods:: - $tags = array('if'); - $filters = array('upper'); - $methods = array( - 'Article' => array('getTitle', 'getBody'), - ); - $properties = array( - 'Article' => array('title', 'body'), - ); - $functions = array('range'); + $tags = ['if']; + $filters = ['upper']; + $methods = [ + 'Article' => ['getTitle', 'getBody'], + ]; + $properties = [ + 'Article' => ['title', 'body'], + ]; + $functions = ['range']; $policy = new Twig_Sandbox_SecurityPolicy($tags, $filters, $methods, $properties, $functions); With the previous configuration, the security policy will only allow usage of diff --git a/src/cadolesuser-1.0/vendor/twig/twig/doc/deprecated.rst b/src/cadolesuser-1.0/vendor/twig/twig/doc/deprecated.rst index 2a5ceb77..f96766da 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/doc/deprecated.rst +++ b/src/cadolesuser-1.0/vendor/twig/twig/doc/deprecated.rst @@ -13,6 +13,12 @@ Inheritance ``Twig_Error_Syntax`` exception. It does not work anyway, so most projects won't need to do anything to upgrade. +Errors +------ + + * Passing a string as the ``$source`` argument on ``Twig_Error`` constructor is + deprecated since Twig 2.6.1. Pass an instance of ``Twig_Source`` instead. + Tags ---- diff --git a/src/cadolesuser-1.0/vendor/twig/twig/doc/filters/join.rst b/src/cadolesuser-1.0/vendor/twig/twig/doc/filters/join.rst index 2fab9452..4d147381 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/doc/filters/join.rst +++ b/src/cadolesuser-1.0/vendor/twig/twig/doc/filters/join.rst @@ -1,6 +1,9 @@ ``join`` ======== +.. versionadded:: 1.36.1 + The ``and`` argument was added in Twig 1.36.1. + The ``join`` filter returns a string which is the concatenation of the items of a sequence: @@ -16,8 +19,17 @@ define it with the optional first parameter: {{ [1, 2, 3]|join('|') }} {# outputs 1|2|3 #} + +A second parameter can also be provided that will be the separator used between +the last two items of the sequence: +.. code-block:: jinja + + {{ [1, 2, 3]|join(', ', ' and ') }} + {# outputs 1, 2 and 3 #} + Arguments --------- * ``glue``: The separator +* ``and``: The separator for the last pair of input items diff --git a/src/cadolesuser-1.0/vendor/twig/twig/doc/filters/json_encode.rst b/src/cadolesuser-1.0/vendor/twig/twig/doc/filters/json_encode.rst index 7ff53d29..f02a7a89 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/doc/filters/json_encode.rst +++ b/src/cadolesuser-1.0/vendor/twig/twig/doc/filters/json_encode.rst @@ -14,8 +14,10 @@ The ``json_encode`` filter returns the JSON representation of a value: Arguments --------- -* ``options``: A bitmask of `json_encode options`_ (``{{ - data|json_encode(constant('JSON_PRETTY_PRINT')) }}``) +* ``options``: A bitmask of `json_encode options`_: ``{{ + data|json_encode(constant('JSON_PRETTY_PRINT')) }}``. + Combine constants using :ref:`bitwise operators`: + ``{{ data|json_encode(constant('JSON_PRETTY_PRINT') b-or constant('JSON_HEX_QUOT') }}`` .. _`json_encode`: https://secure.php.net/json_encode .. _`json_encode options`: https://secure.php.net/manual/en/json.constants.php diff --git a/src/cadolesuser-1.0/vendor/twig/twig/doc/functions/dump.rst b/src/cadolesuser-1.0/vendor/twig/twig/doc/functions/dump.rst index 53c00ac7..a3bf24e0 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/doc/functions/dump.rst +++ b/src/cadolesuser-1.0/vendor/twig/twig/doc/functions/dump.rst @@ -15,10 +15,10 @@ introspecting its variables: ``Twig_Extension_Debug`` extension explicitly when creating your Twig environment:: - $twig = new Twig_Environment($loader, array( + $twig = new Twig_Environment($loader, [ 'debug' => true, // ... - )); + ]); $twig->addExtension(new Twig_Extension_Debug()); Even when enabled, the ``dump`` function won't display anything if the diff --git a/src/cadolesuser-1.0/vendor/twig/twig/doc/functions/include.rst b/src/cadolesuser-1.0/vendor/twig/twig/doc/functions/include.rst index 8a824bf0..07937cdf 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/doc/functions/include.rst +++ b/src/cadolesuser-1.0/vendor/twig/twig/doc/functions/include.rst @@ -41,7 +41,7 @@ And if the expression evaluates to a ``Twig_Template`` or a $template = $twig->load('some_template.twig'); - $twig->display('template.twig', array('template' => $template)); + $twig->display('template.twig', ['template' => $template]); When you set the ``ignore_missing`` flag, Twig will return an empty string if the template does not exist: diff --git a/src/cadolesuser-1.0/vendor/twig/twig/doc/internals.rst b/src/cadolesuser-1.0/vendor/twig/twig/doc/internals.rst index 8e9bf2d5..610ae6eb 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/doc/internals.rst +++ b/src/cadolesuser-1.0/vendor/twig/twig/doc/internals.rst @@ -120,7 +120,7 @@ using):: /* Hello {{ name }} */ class __TwigTemplate_1121b6f109fe93ebe8c6e22e3712bceb extends Twig_Template { - protected function doDisplay(array $context, array $blocks = array()) + protected function doDisplay(array $context, array $blocks = []) { // line 1 echo "Hello "; diff --git a/src/cadolesuser-1.0/vendor/twig/twig/doc/intro.rst b/src/cadolesuser-1.0/vendor/twig/twig/doc/intro.rst index fb682503..7899e229 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/doc/intro.rst +++ b/src/cadolesuser-1.0/vendor/twig/twig/doc/intro.rst @@ -39,12 +39,6 @@ The recommended way to install Twig is via Composer: composer require "twig/twig:^2.0" -.. note:: - - To learn more about the other installation methods, read the - :doc:`installation` chapter; it also explains how to install - the Twig C extension. - Basic API Usage --------------- @@ -54,12 +48,12 @@ This section gives you a brief introduction to the PHP API for Twig. require_once '/path/to/vendor/autoload.php'; - $loader = new Twig_Loader_Array(array( + $loader = new Twig_Loader_Array([ 'index' => 'Hello {{ name }}!', - )); + ]); $twig = new Twig_Environment($loader); - echo $twig->render('index', array('name' => 'Fabien')); + echo $twig->render('index', ['name' => 'Fabien']); Twig uses a loader (``Twig_Loader_Array``) to locate templates, and an environment (``Twig_Environment``) to store the configuration. @@ -71,8 +65,8 @@ As templates are generally stored on the filesystem, Twig also comes with a filesystem loader:: $loader = new Twig_Loader_Filesystem('/path/to/templates'); - $twig = new Twig_Environment($loader, array( + $twig = new Twig_Environment($loader, [ 'cache' => '/path/to/compilation_cache', - )); + ]); - echo $twig->render('index.html', array('name' => 'Fabien')); + echo $twig->render('index.html', ['name' => 'Fabien']); diff --git a/src/cadolesuser-1.0/vendor/twig/twig/doc/recipes.rst b/src/cadolesuser-1.0/vendor/twig/twig/doc/recipes.rst index 5b91c9f2..f36872d9 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/doc/recipes.rst +++ b/src/cadolesuser-1.0/vendor/twig/twig/doc/recipes.rst @@ -35,7 +35,7 @@ However, this code won't find all deprecations (like using deprecated some Twig classes). To catch all notices, register a custom error handler like the one below:: - $deprecations = array(); + $deprecations = []; set_error_handler(function ($type, $msg) use (&$deprecations) { if (E_USER_DEPRECATED === $type) { $deprecations[] = $msg; @@ -160,37 +160,37 @@ To change the block delimiters, you need to create your own lexer object:: $twig = new Twig_Environment(...); - $lexer = new Twig_Lexer($twig, array( - 'tag_comment' => array('{#', '#}'), - 'tag_block' => array('{%', '%}'), - 'tag_variable' => array('{{', '}}'), - 'interpolation' => array('#{', '}'), - )); + $lexer = new Twig_Lexer($twig, [ + 'tag_comment' => ['{#', '#}'], + 'tag_block' => ['{%', '%}'], + 'tag_variable' => ['{{', '}}'], + 'interpolation' => ['#{', '}'], + ]); $twig->setLexer($lexer); Here are some configuration example that simulates some other template engines syntax:: // Ruby erb syntax - $lexer = new Twig_Lexer($twig, array( - 'tag_comment' => array('<%#', '%>'), - 'tag_block' => array('<%', '%>'), - 'tag_variable' => array('<%=', '%>'), - )); + $lexer = new Twig_Lexer($twig, [ + 'tag_comment' => ['<%#', '%>'], + 'tag_block' => ['<%', '%>'], + 'tag_variable' => ['<%=', '%>'], + ]); // SGML Comment Syntax - $lexer = new Twig_Lexer($twig, array( - 'tag_comment' => array(''), - 'tag_block' => array(''), - 'tag_variable' => array('${', '}'), - )); + $lexer = new Twig_Lexer($twig, [ + 'tag_comment' => [''], + 'tag_block' => [''], + 'tag_variable' => ['${', '}'], + ]); // Smarty like - $lexer = new Twig_Lexer($twig, array( - 'tag_comment' => array('{*', '*}'), - 'tag_block' => array('{', '}'), - 'tag_variable' => array('{$', '}'), - )); + $lexer = new Twig_Lexer($twig, [ + 'tag_comment' => ['{*', '*}'], + 'tag_block' => ['{', '}'], + 'tag_variable' => ['{$', '}'], + ]); Using dynamic Object Properties ------------------------------- @@ -230,12 +230,12 @@ Sometimes, when using nested loops, you need to access the parent context. The parent context is always accessible via the ``loop.parent`` variable. For instance, if you have the following template data:: - $data = array( - 'topics' => array( - 'topic1' => array('Message 1 of topic 1', 'Message 2 of topic 1'), - 'topic2' => array('Message 1 of topic 2', 'Message 2 of topic 2'), - ), - ); + $data = [ + 'topics' => [ + 'topic1' => ['Message 1 of topic 1', 'Message 2 of topic 1'], + 'topic2' => ['Message 1 of topic 2', 'Message 2 of topic 2'], + ], + ]; And the following template to display all messages in all topics: @@ -338,10 +338,10 @@ cache won't update the cache. To get around this, force Twig to invalidate the bytecode cache:: - $twig = new Twig_Environment($loader, array( + $twig = new Twig_Environment($loader, [ 'cache' => new Twig_Cache_Filesystem('/some/cache/path', Twig_Cache_Filesystem::FORCE_BYTECODE_INVALIDATION), // ... - )); + ]); Reusing a stateful Node Visitor ------------------------------- @@ -352,13 +352,13 @@ around, you probably want to reset it when visiting a new template. This can be easily achieved with the following code:: - protected $someTemplateState = array(); + protected $someTemplateState = []; public function enterNode(Twig_Node $node, Twig_Environment $env) { if ($node instanceof Twig_Node_Module) { // reset the state as we are entering a new template - $this->someTemplateState = array(); + $this->someTemplateState = []; } // ... @@ -431,7 +431,7 @@ Now, let's define a loader able to use this database:: protected function getValue($column, $name) { $sth = $this->dbh->prepare('SELECT '.$column.' FROM templates WHERE name = :name'); - $sth->execute(array(':name' => (string) $name)); + $sth->execute([':name' => (string) $name]); return $sth->fetchColumn(); } @@ -442,7 +442,7 @@ Finally, here is an example on how you can use it:: $loader = new DatabaseTwigLoader($dbh); $twig = new Twig_Environment($loader); - echo $twig->render('index.twig', array('name' => 'Fabien')); + echo $twig->render('index.twig', ['name' => 'Fabien']); Using different Template Sources -------------------------------- @@ -459,14 +459,14 @@ filesystem, or any other loader for that matter: the template name should be a logical name, and not the path from the filesystem:: $loader1 = new DatabaseTwigLoader($dbh); - $loader2 = new Twig_Loader_Array(array( + $loader2 = new Twig_Loader_Array([ 'base.twig' => '{% block content %}{% endblock %}', - )); - $loader = new Twig_Loader_Chain(array($loader1, $loader2)); + ]); + $loader = new Twig_Loader_Chain([$loader1, $loader2]); $twig = new Twig_Environment($loader); - echo $twig->render('index.twig', array('name' => 'Fabien')); + echo $twig->render('index.twig', ['name' => 'Fabien']); Now that the ``base.twig`` templates is defined in an array loader, you can remove it from the database, and everything else will still work as before. @@ -486,7 +486,7 @@ From PHP, it's also possible to load a template stored in a string via ``Twig_Environment::createTemplate()``:: $template = $twig->createTemplate('hello {{ name }}'); - echo $template->render(array('name' => 'Fabien')); + echo $template->render(['name' => 'Fabien']); Using Twig and AngularJS in the same Templates ---------------------------------------------- @@ -520,8 +520,8 @@ include in your templates: .. code-block:: php - $env->setLexer(new Twig_Lexer($env, array( - 'tag_variable' => array('{[', ']}'), - ))); + $env->setLexer(new Twig_Lexer($env, [ + 'tag_variable' => ['{[', ']}'], + ])); .. _callback: https://secure.php.net/manual/en/function.is-callable.php diff --git a/src/cadolesuser-1.0/vendor/twig/twig/doc/tags/extends.rst b/src/cadolesuser-1.0/vendor/twig/twig/doc/tags/extends.rst index cbb33e1f..4d4c48c8 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/doc/tags/extends.rst +++ b/src/cadolesuser-1.0/vendor/twig/twig/doc/tags/extends.rst @@ -160,7 +160,7 @@ instance, Twig will use it as the parent template:: $layout = $twig->load('some_layout_template.twig'); - $twig->display('template.twig', array('layout' => $layout)); + $twig->display('template.twig', ['layout' => $layout]); You can also provide a list of templates that are checked for existence. The first template that exists will be used as a parent: diff --git a/src/cadolesuser-1.0/vendor/twig/twig/doc/tags/if.rst b/src/cadolesuser-1.0/vendor/twig/twig/doc/tags/if.rst index 17e2df6f..225246e9 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/doc/tags/if.rst +++ b/src/cadolesuser-1.0/vendor/twig/twig/doc/tags/if.rst @@ -50,12 +50,12 @@ use more complex ``expressions`` there too: .. code-block:: jinja - {% if kenny.sick %} - Kenny is sick. - {% elseif kenny.dead %} - You killed Kenny! You bastard!!! + {% if product.stock > 10 %} + Available + {% elseif product.stock > 0 %} + Only {{ product.stock }} left! {% else %} - Kenny looks okay --- so far + Sold-out! {% endif %} .. note:: diff --git a/src/cadolesuser-1.0/vendor/twig/twig/doc/tags/include.rst b/src/cadolesuser-1.0/vendor/twig/twig/doc/tags/include.rst index 6049fee6..8593662c 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/doc/tags/include.rst +++ b/src/cadolesuser-1.0/vendor/twig/twig/doc/tags/include.rst @@ -57,7 +57,7 @@ And if the expression evaluates to a ``Twig_Template`` or a $template = $twig->load('some_template.twig'); - $twig->display('template.twig', array('template' => $template)); + $twig->display('template.twig', ['template' => $template]); You can mark an include with ``ignore missing`` in which case Twig will ignore the statement if the template to be included does not exist. It has to be diff --git a/src/cadolesuser-1.0/vendor/twig/twig/doc/tags/index.rst b/src/cadolesuser-1.0/vendor/twig/twig/doc/tags/index.rst index dbe2459e..373cf6e6 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/doc/tags/index.rst +++ b/src/cadolesuser-1.0/vendor/twig/twig/doc/tags/index.rst @@ -23,3 +23,4 @@ Tags use verbatim with + deprecated diff --git a/src/cadolesuser-1.0/vendor/twig/twig/doc/templates.rst b/src/cadolesuser-1.0/vendor/twig/twig/doc/templates.rst index 4205cfb9..8184246d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/doc/templates.rst +++ b/src/cadolesuser-1.0/vendor/twig/twig/doc/templates.rst @@ -550,11 +550,12 @@ even if you're not working with PHP you should feel comfortable with it. .. note:: - The operator precedence is as follows, with the lowest-precedence - operators listed first: ``b-and``, ``b-xor``, ``b-or``, ``or``, ``and``, - ``==``, ``!=``, ``<``, ``>``, ``>=``, ``<=``, ``in``, ``matches``, - ``starts with``, ``ends with``, ``..``, ``+``, ``-``, ``~``, ``*``, ``/``, - ``//``, ``%``, ``is``, ``**``, ``|``, ``[]``, and ``.``: + The operator precedence is as follows, with the lowest-precedence operators + listed first: ``?:`` (ternary operator), ``b-and``, ``b-xor``, ``b-or``, + ``or``, ``and``, ``==``, ``!=``, ``<``, ``>``, ``>=``, ``<=``, ``in``, + ``matches``, ``starts with``, ``ends with``, ``..``, ``+``, ``-``, ``~``, + ``*``, ``/``, ``//``, ``%``, ``is`` (tests), ``**``, ``??``, ``|`` + (filters), ``[]``, and ``.``. .. code-block:: jinja @@ -651,6 +652,8 @@ but exists for completeness' sake. The following operators are supported: * ``**``: Raises the left operand to the power of the right operand. ``{{ 2 ** 3 }}`` would return ``8``. +.. _template_logic: + Logic ~~~~~ @@ -666,7 +669,7 @@ You can combine multiple expressions with the following operators: .. note:: - Twig also support bitwise operators (``b-and``, ``b-xor``, and ``b-or``). + Twig also supports bitwise operators (``b-and``, ``b-xor``, and ``b-or``). .. note:: diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Compiler.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Compiler.php index 9e8a8d58..62aa314d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Compiler.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Compiler.php @@ -21,7 +21,7 @@ class Twig_Compiler private $source; private $indentation; private $env; - private $debugInfo = array(); + private $debugInfo = []; private $sourceOffset; private $sourceLine; private $varNameSalt = 0; @@ -63,7 +63,7 @@ class Twig_Compiler { $this->lastLine = null; $this->source = ''; - $this->debugInfo = array(); + $this->debugInfo = []; $this->sourceOffset = 0; // source code starts at 1 (as we then increment it when we encounter new lines) $this->sourceLine = 1; @@ -142,7 +142,7 @@ class Twig_Compiler setlocale(LC_NUMERIC, 'C'); } - $this->raw($value); + $this->raw(var_export($value, true)); if (false !== $locale) { setlocale(LC_NUMERIC, $locale); diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Environment.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Environment.php index 2a694894..f63153c3 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Environment.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Environment.php @@ -16,11 +16,11 @@ */ class Twig_Environment { - const VERSION = '2.5.0'; - const VERSION_ID = 20500; + const VERSION = '2.6.2'; + const VERSION_ID = 20602; const MAJOR_VERSION = 2; - const MINOR_VERSION = 5; - const RELEASE_VERSION = 0; + const MINOR_VERSION = 6; + const RELEASE_VERSION = 2; const EXTRA_VERSION = ''; private $charset; @@ -32,17 +32,17 @@ class Twig_Environment private $parser; private $compiler; private $baseTemplateClass; - private $globals = array(); + private $globals = []; private $resolvedGlobals; private $loadedTemplates; private $strictVariables; private $templateClassPrefix = '__TwigTemplate_'; private $originalCache; private $extensionSet; - private $runtimeLoaders = array(); - private $runtimes = array(); + private $runtimeLoaders = []; + private $runtimes = []; private $optionsHash; - private $loading = array(); + private $loading = []; /** * Constructor. @@ -81,11 +81,11 @@ class Twig_Environment * @param Twig_LoaderInterface $loader * @param array $options An array of options */ - public function __construct(Twig_LoaderInterface $loader, $options = array()) + public function __construct(Twig_LoaderInterface $loader, $options = []) { $this->setLoader($loader); - $options = array_merge(array( + $options = array_merge([ 'debug' => false, 'charset' => 'UTF-8', 'base_template_class' => 'Twig_Template', @@ -94,7 +94,7 @@ class Twig_Environment 'cache' => false, 'auto_reload' => null, 'optimizations' => -1, - ), $options); + ], $options); $this->debug = (bool) $options['debug']; $this->setCharset($options['charset']); @@ -284,7 +284,7 @@ class Twig_Environment * @throws Twig_Error_Syntax When an error occurred during compilation * @throws Twig_Error_Runtime When an error occurred during rendering */ - public function render($name, array $context = array()) + public function render($name, array $context = []) { return $this->loadTemplate($name)->render($context); } @@ -299,7 +299,7 @@ class Twig_Environment * @throws Twig_Error_Syntax When an error occurred during compilation * @throws Twig_Error_Runtime When an error occurred during rendering */ - public function display($name, array $context = array()) + public function display($name, array $context = []) { $this->loadTemplate($name)->display($context); } @@ -388,7 +388,7 @@ class Twig_Environment $this->extensionSet->initRuntime($this); if (isset($this->loading[$cls])) { - throw new Twig_Error_Runtime(sprintf('Circular reference detected for Twig template "%s", path: %s.', $name, implode(' -> ', array_merge($this->loading, array($name))))); + throw new Twig_Error_Runtime(sprintf('Circular reference detected for Twig template "%s", path: %s.', $name, implode(' -> ', array_merge($this->loading, [$name])))); } $this->loading[$cls] = $name; @@ -418,10 +418,10 @@ class Twig_Environment { $name = sprintf('__string_template__%s', hash('sha256', $template, false)); - $loader = new Twig_Loader_Chain(array( - new Twig_Loader_Array(array($name => $template)), + $loader = new Twig_Loader_Chain([ + new Twig_Loader_Array([$name => $template]), $current = $this->getLoader(), - )); + ]); $this->setLoader($loader); try { @@ -466,7 +466,7 @@ class Twig_Environment public function resolveTemplate($names) { if (!is_array($names)) { - $names = array($names); + $names = [$names]; } foreach ($names as $name) { @@ -720,7 +720,7 @@ class Twig_Environment */ public function getTags() { - $tags = array(); + $tags = []; foreach ($this->getTokenParsers() as $parser) { $tags[$parser->getTag()] = $parser; } @@ -955,7 +955,7 @@ class Twig_Environment private function updateOptionsHash() { - $this->optionsHash = implode(':', array( + $this->optionsHash = implode(':', [ $this->extensionSet->getSignature(), PHP_MAJOR_VERSION, PHP_MINOR_VERSION, @@ -963,7 +963,7 @@ class Twig_Environment (int) $this->debug, $this->baseTemplateClass, (int) $this->strictVariables, - )); + ]); } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Error.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Error.php index 77b0813e..1f368520 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Error.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Error.php @@ -63,7 +63,7 @@ class Twig_Error extends Exception if (null === $source) { $name = null; } elseif (!$source instanceof Twig_Source) { - // for compat with the Twig C ext., passing the template name as string is accepted + @trigger_error(sprintf('Passing a string as a source to %s is deprecated since version 2.6.1; pass a Twig_Source instance instead.', __CLASS__), E_USER_DEPRECATED); $name = $source; } else { $name = $source->getName(); @@ -234,14 +234,14 @@ class Twig_Error extends Exception $r = new ReflectionObject($template); $file = $r->getFileName(); - $exceptions = array($e = $this); + $exceptions = [$e = $this]; while ($e = $e->getPrevious()) { $exceptions[] = $e; } while ($e = array_pop($exceptions)) { $traces = $e->getTrace(); - array_unshift($traces, array('file' => $e->getFile(), 'line' => $e->getLine())); + array_unshift($traces, ['file' => $e->getFile(), 'line' => $e->getLine()]); while ($trace = array_shift($traces)) { if (!isset($trace['file']) || !isset($trace['line']) || $file != $trace['file']) { diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Error/Syntax.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Error/Syntax.php index aadd45e5..3f769201 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Error/Syntax.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Error/Syntax.php @@ -25,7 +25,7 @@ class Twig_Error_Syntax extends Twig_Error */ public function addSuggestions($name, array $items) { - $alternatives = array(); + $alternatives = []; foreach ($items as $item) { $lev = levenshtein($name, $item); if ($lev <= strlen($name) / 3 || false !== strpos($item, $name)) { diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/ExpressionParser.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/ExpressionParser.php index 117a4d29..4f4ad566 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/ExpressionParser.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/ExpressionParser.php @@ -178,7 +178,7 @@ class Twig_ExpressionParser $ref = new ReflectionClass($class); $negClass = 'Twig_Node_Expression_Unary_Neg'; $posClass = 'Twig_Node_Expression_Unary_Pos'; - if (!(in_array($ref->getName(), array($negClass, $posClass)) || $ref->isSubclassOf($negClass) || $ref->isSubclassOf($posClass))) { + if (!(in_array($ref->getName(), [$negClass, $posClass]) || $ref->isSubclassOf($negClass) || $ref->isSubclassOf($posClass))) { throw new Twig_Error_Syntax(sprintf('Unexpected unary operator "%s".', $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext()); } @@ -209,7 +209,7 @@ class Twig_ExpressionParser { $stream = $this->parser->getStream(); - $nodes = array(); + $nodes = []; // a string cannot be followed by another string in a single expression $nextCanBeString = true; while (true) { @@ -238,7 +238,7 @@ class Twig_ExpressionParser $stream = $this->parser->getStream(); $stream->expect(/* Twig_Token::PUNCTUATION_TYPE */ 9, '[', 'An array element was expected'); - $node = new Twig_Node_Expression_Array(array(), $stream->getCurrent()->getLine()); + $node = new Twig_Node_Expression_Array([], $stream->getCurrent()->getLine()); $first = true; while (!$stream->test(/* Twig_Token::PUNCTUATION_TYPE */ 9, ']')) { if (!$first) { @@ -263,7 +263,7 @@ class Twig_ExpressionParser $stream = $this->parser->getStream(); $stream->expect(/* Twig_Token::PUNCTUATION_TYPE */ 9, '{', 'A hash element was expected'); - $node = new Twig_Node_Expression_Array(array(), $stream->getCurrent()->getLine()); + $node = new Twig_Node_Expression_Array([], $stream->getCurrent()->getLine()); $first = true; while (!$stream->test(/* Twig_Token::PUNCTUATION_TYPE */ 9, '}')) { if (!$first) { @@ -352,7 +352,7 @@ class Twig_ExpressionParser return new Twig_Node_Expression_GetAttr($args->getNode(0), $args->getNode(1), count($args) > 2 ? $args->getNode(2) : null, Twig_Template::ANY_CALL, $line); default: if (null !== $alias = $this->parser->getImportedSymbol('function', $name)) { - $arguments = new Twig_Node_Expression_Array(array(), $line); + $arguments = new Twig_Node_Expression_Array([], $line); foreach ($this->parseArguments() as $n) { $arguments->addElement($n); } @@ -375,7 +375,7 @@ class Twig_ExpressionParser $stream = $this->parser->getStream(); $token = $stream->next(); $lineno = $token->getLine(); - $arguments = new Twig_Node_Expression_Array(array(), $lineno); + $arguments = new Twig_Node_Expression_Array([], $lineno); $type = Twig_Template::ANY_CALL; if ('.' == $token->getValue()) { $token = $stream->next(); @@ -434,7 +434,7 @@ class Twig_ExpressionParser } $class = $this->getFilterNodeClass('slice', $token->getLine()); - $arguments = new Twig_Node(array($arg, $length)); + $arguments = new Twig_Node([$arg, $length]); $filter = new $class($node, new Twig_Node_Expression_Constant('slice', $token->getLine()), $arguments, $token->getLine()); $stream->expect(/* Twig_Token::PUNCTUATION_TYPE */ 9, ']'); @@ -493,7 +493,7 @@ class Twig_ExpressionParser */ public function parseArguments($namedArguments = false, $definition = false) { - $args = array(); + $args = []; $stream = $this->parser->getStream(); $stream->expect(/* Twig_Token::PUNCTUATION_TYPE */ 9, '(', 'A list of arguments must begin with an opening parenthesis'); @@ -549,11 +549,11 @@ class Twig_ExpressionParser public function parseAssignmentExpression() { $stream = $this->parser->getStream(); - $targets = array(); + $targets = []; while (true) { $token = $stream->expect(/* Twig_Token::NAME_TYPE */ 5, null, 'Only variables can be assigned to'); $value = $token->getValue(); - if (in_array(strtolower($value), array('true', 'false', 'none', 'null'))) { + if (in_array(strtolower($value), ['true', 'false', 'none', 'null'])) { throw new Twig_Error_Syntax(sprintf('You cannot assign a value to "%s".', $value), $token->getLine(), $stream->getSourceContext()); } $targets[] = new Twig_Node_Expression_AssignName($value, $token->getLine()); @@ -568,7 +568,7 @@ class Twig_ExpressionParser public function parseMultitargetExpression() { - $targets = array(); + $targets = []; while (true) { $targets[] = $this->parseExpression(); if (!$this->parser->getStream()->nextIf(/* Twig_Token::PUNCTUATION_TYPE */ 9, ',')) { @@ -604,7 +604,7 @@ class Twig_ExpressionParser $name = $stream->expect(/* Twig_Token::NAME_TYPE */ 5)->getValue(); if ($test = $this->env->getTest($name)) { - return array($name, $test); + return [$name, $test]; } if ($stream->test(/* Twig_Token::NAME_TYPE */ 5)) { @@ -614,7 +614,7 @@ class Twig_ExpressionParser if ($test = $this->env->getTest($name)) { $stream->next(); - return array($name, $test); + return [$name, $test]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension.php index e8916b4f..5d1b5055 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension.php @@ -13,32 +13,32 @@ abstract class Twig_Extension implements Twig_ExtensionInterface { public function getTokenParsers() { - return array(); + return []; } public function getNodeVisitors() { - return array(); + return []; } public function getFilters() { - return array(); + return []; } public function getTests() { - return array(); + return []; } public function getFunctions() { - return array(); + return []; } public function getOperators() { - return array(); + return []; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Core.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Core.php index a45b29a6..073a80be 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Core.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Core.php @@ -11,10 +11,10 @@ final class Twig_Extension_Core extends Twig_Extension { - private $dateFormats = array('F j, Y H:i', '%d days'); - private $numberFormat = array(0, '.', ','); + private $dateFormats = ['F j, Y H:i', '%d days']; + private $numberFormat = [0, '.', ',']; private $timezone = null; - private $escapers = array(); + private $escapers = []; /** * Defines a new escaper to be used via the escape filter. @@ -97,7 +97,7 @@ final class Twig_Extension_Core extends Twig_Extension */ public function setNumberFormat($decimal, $decimalPoint, $thousandSep) { - $this->numberFormat = array($decimal, $decimalPoint, $thousandSep); + $this->numberFormat = [$decimal, $decimalPoint, $thousandSep]; } /** @@ -112,7 +112,7 @@ final class Twig_Extension_Core extends Twig_Extension public function getTokenParsers() { - return array( + return [ new Twig_TokenParser_For(), new Twig_TokenParser_If(), new Twig_TokenParser_Extends(), @@ -129,18 +129,19 @@ final class Twig_Extension_Core extends Twig_Extension new Twig_TokenParser_Do(), new Twig_TokenParser_Embed(), new Twig_TokenParser_With(), - ); + new Twig_TokenParser_Deprecated(), + ]; } public function getFilters() { - return array( + return [ // formatting filters - new Twig_Filter('date', 'twig_date_format_filter', array('needs_environment' => true)), - new Twig_Filter('date_modify', 'twig_date_modify_filter', array('needs_environment' => true)), + new Twig_Filter('date', 'twig_date_format_filter', ['needs_environment' => true]), + new Twig_Filter('date_modify', 'twig_date_modify_filter', ['needs_environment' => true]), new Twig_Filter('format', 'sprintf'), new Twig_Filter('replace', 'twig_replace_filter'), - new Twig_Filter('number_format', 'twig_number_format_filter', array('needs_environment' => true)), + new Twig_Filter('number_format', 'twig_number_format_filter', ['needs_environment' => true]), new Twig_Filter('abs', 'abs'), new Twig_Filter('round', 'twig_round'), @@ -150,108 +151,108 @@ final class Twig_Extension_Core extends Twig_Extension new Twig_Filter('convert_encoding', 'twig_convert_encoding'), // string filters - new Twig_Filter('title', 'twig_title_string_filter', array('needs_environment' => true)), - new Twig_Filter('capitalize', 'twig_capitalize_string_filter', array('needs_environment' => true)), - new Twig_Filter('upper', 'twig_upper_filter', array('needs_environment' => true)), - new Twig_Filter('lower', 'twig_lower_filter', array('needs_environment' => true)), + new Twig_Filter('title', 'twig_title_string_filter', ['needs_environment' => true]), + new Twig_Filter('capitalize', 'twig_capitalize_string_filter', ['needs_environment' => true]), + new Twig_Filter('upper', 'twig_upper_filter', ['needs_environment' => true]), + new Twig_Filter('lower', 'twig_lower_filter', ['needs_environment' => true]), new Twig_Filter('striptags', 'strip_tags'), new Twig_Filter('trim', 'twig_trim_filter'), - new Twig_Filter('nl2br', 'nl2br', array('pre_escape' => 'html', 'is_safe' => array('html'))), + new Twig_Filter('nl2br', 'nl2br', ['pre_escape' => 'html', 'is_safe' => ['html']]), // array helpers new Twig_Filter('join', 'twig_join_filter'), - new Twig_Filter('split', 'twig_split_filter', array('needs_environment' => true)), + new Twig_Filter('split', 'twig_split_filter', ['needs_environment' => true]), new Twig_Filter('sort', 'twig_sort_filter'), new Twig_Filter('merge', 'twig_array_merge'), new Twig_Filter('batch', 'twig_array_batch'), // string/array filters - new Twig_Filter('reverse', 'twig_reverse_filter', array('needs_environment' => true)), - new Twig_Filter('length', 'twig_length_filter', array('needs_environment' => true)), - new Twig_Filter('slice', 'twig_slice', array('needs_environment' => true)), - new Twig_Filter('first', 'twig_first', array('needs_environment' => true)), - new Twig_Filter('last', 'twig_last', array('needs_environment' => true)), + new Twig_Filter('reverse', 'twig_reverse_filter', ['needs_environment' => true]), + new Twig_Filter('length', 'twig_length_filter', ['needs_environment' => true]), + new Twig_Filter('slice', 'twig_slice', ['needs_environment' => true]), + new Twig_Filter('first', 'twig_first', ['needs_environment' => true]), + new Twig_Filter('last', 'twig_last', ['needs_environment' => true]), // iteration and runtime - new Twig_Filter('default', '_twig_default_filter', array('node_class' => 'Twig_Node_Expression_Filter_Default')), + new Twig_Filter('default', '_twig_default_filter', ['node_class' => 'Twig_Node_Expression_Filter_Default']), new Twig_Filter('keys', 'twig_get_array_keys_filter'), // escaping - new Twig_Filter('escape', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')), - new Twig_Filter('e', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')), - ); + new Twig_Filter('escape', 'twig_escape_filter', ['needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe']), + new Twig_Filter('e', 'twig_escape_filter', ['needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe']), + ]; } public function getFunctions() { - return array( + return [ new Twig_Function('max', 'max'), new Twig_Function('min', 'min'), new Twig_Function('range', 'range'), new Twig_Function('constant', 'twig_constant'), new Twig_Function('cycle', 'twig_cycle'), - new Twig_Function('random', 'twig_random', array('needs_environment' => true)), - new Twig_Function('date', 'twig_date_converter', array('needs_environment' => true)), - new Twig_Function('include', 'twig_include', array('needs_environment' => true, 'needs_context' => true, 'is_safe' => array('all'))), - new Twig_Function('source', 'twig_source', array('needs_environment' => true, 'is_safe' => array('all'))), - ); + new Twig_Function('random', 'twig_random', ['needs_environment' => true]), + new Twig_Function('date', 'twig_date_converter', ['needs_environment' => true]), + new Twig_Function('include', 'twig_include', ['needs_environment' => true, 'needs_context' => true, 'is_safe' => ['all']]), + new Twig_Function('source', 'twig_source', ['needs_environment' => true, 'is_safe' => ['all']]), + ]; } public function getTests() { - return array( - new Twig_Test('even', null, array('node_class' => 'Twig_Node_Expression_Test_Even')), - new Twig_Test('odd', null, array('node_class' => 'Twig_Node_Expression_Test_Odd')), - new Twig_Test('defined', null, array('node_class' => 'Twig_Node_Expression_Test_Defined')), - new Twig_Test('same as', null, array('node_class' => 'Twig_Node_Expression_Test_Sameas')), - new Twig_Test('none', null, array('node_class' => 'Twig_Node_Expression_Test_Null')), - new Twig_Test('null', null, array('node_class' => 'Twig_Node_Expression_Test_Null')), - new Twig_Test('divisible by', null, array('node_class' => 'Twig_Node_Expression_Test_Divisibleby')), - new Twig_Test('constant', null, array('node_class' => 'Twig_Node_Expression_Test_Constant')), + return [ + new Twig_Test('even', null, ['node_class' => 'Twig_Node_Expression_Test_Even']), + new Twig_Test('odd', null, ['node_class' => 'Twig_Node_Expression_Test_Odd']), + new Twig_Test('defined', null, ['node_class' => 'Twig_Node_Expression_Test_Defined']), + new Twig_Test('same as', null, ['node_class' => 'Twig_Node_Expression_Test_Sameas']), + new Twig_Test('none', null, ['node_class' => 'Twig_Node_Expression_Test_Null']), + new Twig_Test('null', null, ['node_class' => 'Twig_Node_Expression_Test_Null']), + new Twig_Test('divisible by', null, ['node_class' => 'Twig_Node_Expression_Test_Divisibleby']), + new Twig_Test('constant', null, ['node_class' => 'Twig_Node_Expression_Test_Constant']), new Twig_Test('empty', 'twig_test_empty'), new Twig_Test('iterable', 'twig_test_iterable'), - ); + ]; } public function getOperators() { - return array( - array( - 'not' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'), - '-' => array('precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Neg'), - '+' => array('precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Pos'), - ), - array( - 'or' => array('precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'and' => array('precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'b-or' => array('precedence' => 16, 'class' => 'Twig_Node_Expression_Binary_BitwiseOr', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'b-xor' => array('precedence' => 17, 'class' => 'Twig_Node_Expression_Binary_BitwiseXor', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'b-and' => array('precedence' => 18, 'class' => 'Twig_Node_Expression_Binary_BitwiseAnd', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '==' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Equal', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '!=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '<' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Less', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '>' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Greater', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '>=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '<=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'not in' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotIn', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'in' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_In', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'matches' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Matches', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'starts with' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_StartsWith', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'ends with' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_EndsWith', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '..' => array('precedence' => 25, 'class' => 'Twig_Node_Expression_Binary_Range', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '+' => array('precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Add', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '-' => array('precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Sub', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '~' => array('precedence' => 40, 'class' => 'Twig_Node_Expression_Binary_Concat', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '*' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mul', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '/' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Div', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '//' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_FloorDiv', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '%' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'is' => array('precedence' => 100, 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'is not' => array('precedence' => 100, 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '**' => array('precedence' => 200, 'class' => 'Twig_Node_Expression_Binary_Power', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT), - '??' => array('precedence' => 300, 'class' => 'Twig_Node_Expression_NullCoalesce', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT), - ), - ); + return [ + [ + 'not' => ['precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'], + '-' => ['precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Neg'], + '+' => ['precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Pos'], + ], + [ + 'or' => ['precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'and' => ['precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'b-or' => ['precedence' => 16, 'class' => 'Twig_Node_Expression_Binary_BitwiseOr', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'b-xor' => ['precedence' => 17, 'class' => 'Twig_Node_Expression_Binary_BitwiseXor', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'b-and' => ['precedence' => 18, 'class' => 'Twig_Node_Expression_Binary_BitwiseAnd', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '==' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Equal', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '!=' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '<' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Less', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '>' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Greater', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '>=' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '<=' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'not in' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotIn', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'in' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_In', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'matches' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Matches', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'starts with' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_StartsWith', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'ends with' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_EndsWith', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '..' => ['precedence' => 25, 'class' => 'Twig_Node_Expression_Binary_Range', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '+' => ['precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Add', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '-' => ['precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Sub', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '~' => ['precedence' => 40, 'class' => 'Twig_Node_Expression_Binary_Concat', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '*' => ['precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mul', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '/' => ['precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Div', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '//' => ['precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_FloorDiv', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '%' => ['precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'is' => ['precedence' => 100, 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'is not' => ['precedence' => 100, 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '**' => ['precedence' => 200, 'class' => 'Twig_Node_Expression_Binary_Power', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT], + '??' => ['precedence' => 300, 'class' => 'Twig_Node_Expression_NullCoalesce', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT], + ], + ]; } } @@ -340,7 +341,7 @@ function twig_random(Twig_Environment $env, $values = null) * @param Twig_Environment $env * @param DateTimeInterface|DateInterval|string $date A date * @param string|null $format The target format, null to use the default - * @param DateTimeZone|string|null|false $timezone The target timezone, null to use the default, false to leave unchanged + * @param DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged * * @return string The formatted date */ @@ -389,7 +390,7 @@ function twig_date_modify_filter(Twig_Environment $env, $date, $modifier) * * @param Twig_Environment $env * @param DateTimeInterface|string|null $date A date or null to use the current time - * @param DateTimeZone|string|null|false $timezone The target timezone, null to use the default, false to leave unchanged + * @param DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged * * @return DateTime A DateTime instance */ @@ -581,7 +582,7 @@ function twig_slice(Twig_Environment $env, $item, $start, $length = null, $prese try { return iterator_to_array(new LimitIterator($item, $start, null === $length ? -1 : $length), $preserveKeys); } catch (OutOfBoundsException $exception) { - return array(); + return []; } } @@ -630,9 +631,12 @@ function twig_last(Twig_Environment $env, $item) /** * Joins the values to a string. * - * The separator between elements is an empty string per default, you can define it with the optional parameter. + * The separators between elements are empty strings per default, you can define them with the optional parameters. * *
    + *  {{ [1, 2, 3]|join(', ', ' and ') }}
    + *  {# returns 1, 2 and 3 #}
    + *
      *  {{ [1, 2, 3]|join('|') }}
      *  {# returns 1|2|3 #}
      *
    @@ -640,18 +644,34 @@ function twig_last(Twig_Environment $env, $item)
      *  {# returns 123 #}
      * 
    * - * @param array $value An array - * @param string $glue The separator + * @param array $value An array + * @param string $glue The separator + * @param string|null $and The separator for the last pair * * @return string The concatenated string */ -function twig_join_filter($value, $glue = '') +function twig_join_filter($value, $glue = '', $and = null) { if ($value instanceof Traversable) { $value = iterator_to_array($value, false); + } else { + $value = (array) $value; } - return implode($glue, (array) $value); + if (0 === count($value)) { + return ''; + } + + if (null === $and || $and === $glue) { + return implode($glue, $value); + } + + $v = array_values($value); + if (1 === count($v)) { + return $v[0]; + } + + return implode($glue, array_slice($value, 0, -1)).$and.$v[count($v) - 1]; } /** @@ -690,10 +710,10 @@ function twig_split_filter(Twig_Environment $env, $value, $delimiter, $limit = n $length = mb_strlen($value, $env->getCharset()); if ($length < $limit) { - return array($value); + return [$value]; } - $r = array(); + $r = []; for ($i = 0; $i < $length; $i += $limit) { $r[] = mb_substr($value, $i, $limit, $env->getCharset()); } @@ -739,7 +759,7 @@ function twig_get_array_keys_filter($array) } if ($array instanceof Iterator) { - $keys = array(); + $keys = []; $array->rewind(); while ($array->valid()) { $keys[] = $array->key(); @@ -749,7 +769,7 @@ function twig_get_array_keys_filter($array) return $keys; } - $keys = array(); + $keys = []; foreach ($array as $key => $item) { $keys[] = $key; } @@ -758,7 +778,7 @@ function twig_get_array_keys_filter($array) } if (!is_array($array)) { - return array(); + return []; } return array_keys($array); @@ -897,11 +917,15 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', if (!is_string($string)) { if (is_object($string) && method_exists($string, '__toString')) { $string = (string) $string; - } elseif (in_array($strategy, array('html', 'js', 'css', 'html_attr', 'url'))) { + } elseif (in_array($strategy, ['html', 'js', 'css', 'html_attr', 'url'])) { return $string; } } + if ('' === $string) { + return ''; + } + if (null === $charset) { $charset = $env->getCharset(); } @@ -913,7 +937,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', // Using a static variable to avoid initializing the array // each time the function is called. Moving the declaration on the // top of the function slow downs other escaping strategies. - static $htmlspecialcharsCharsets = array( + static $htmlspecialcharsCharsets = [ 'ISO-8859-1' => true, 'ISO8859-1' => true, 'ISO-8859-15' => true, 'ISO8859-15' => true, 'utf-8' => true, 'UTF-8' => true, @@ -928,7 +952,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', 'SHIFT_JIS' => true, 'SJIS' => true, '932' => true, 'EUC-JP' => true, 'EUCJP' => true, 'ISO8859-5' => true, 'ISO-8859-5' => true, 'MACROMAN' => true, - ); + ]; if (isset($htmlspecialcharsCharsets[$charset])) { return htmlspecialchars($string, ENT_QUOTES | ENT_SUBSTITUTE, $charset); @@ -953,7 +977,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', $string = iconv($charset, 'UTF-8', $string); } - if (0 == strlen($string) ? false : 1 !== preg_match('/^./su', $string)) { + if (!preg_match('//u', $string)) { throw new Twig_Error_Runtime('The string to escape is not a valid UTF-8 string.'); } @@ -965,7 +989,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', * Escape sequences supported only by JavaScript, not JSON, are ommitted. * \" is also supported but omitted, because the resulting string is not HTML safe. */ - static $shortMap = array( + static $shortMap = [ '\\' => '\\\\', '/' => '\\/', "\x08" => '\b', @@ -973,7 +997,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', "\x0A" => '\n', "\x0D" => '\r', "\x09" => '\t', - ); + ]; if (isset($shortMap[$char])) { return $shortMap[$char]; @@ -1001,27 +1025,14 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', $string = iconv($charset, 'UTF-8', $string); } - if (0 == strlen($string) ? false : 1 !== preg_match('/^./su', $string)) { + if (!preg_match('//u', $string)) { throw new Twig_Error_Runtime('The string to escape is not a valid UTF-8 string.'); } $string = preg_replace_callback('#[^a-zA-Z0-9]#Su', function ($matches) { $char = $matches[0]; - // \xHH - if (!isset($char[1])) { - $hex = ltrim(strtoupper(bin2hex($char)), '0'); - if (0 === strlen($hex)) { - $hex = '0'; - } - - return '\\'.$hex.' '; - } - - // \uHHHH - $char = twig_convert_encoding($char, 'UTF-16BE', 'UTF-8'); - - return '\\'.ltrim(strtoupper(bin2hex($char)), '0').' '; + return sprintf('\\%X ', 1 === strlen($char) ? ord($char) : mb_ord($char, 'UTF-8')); }, $string); if ('UTF-8' !== $charset) { @@ -1035,7 +1046,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', $string = iconv($charset, 'UTF-8', $string); } - if (0 == strlen($string) ? false : 1 !== preg_match('/^./su', $string)) { + if (!preg_match('//u', $string)) { throw new Twig_Error_Runtime('The string to escape is not a valid UTF-8 string.'); } @@ -1046,19 +1057,6 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (https://www.zend.com) * @license https://framework.zend.com/license/new-bsd New BSD License */ - /* - * While HTML supports far more named entities, the lowest common denominator - * has become HTML5's XML Serialisation which is restricted to the those named - * entities that XML supports. Using HTML entities would result in this error: - * XML Parsing Error: undefined entity - */ - static $entityMap = array( - 34 => 'quot', /* quotation mark */ - 38 => 'amp', /* ampersand */ - 60 => 'lt', /* less-than sign */ - 62 => 'gt', /* greater-than sign */ - ); - $chr = $matches[0]; $ord = ord($chr); @@ -1074,23 +1072,32 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', * Check if the current character to escape has a name entity we should * replace it with while grabbing the hex value of the character. */ - if (1 == strlen($chr)) { - $hex = strtoupper(substr('00'.bin2hex($chr), -2)); - } else { - $chr = twig_convert_encoding($chr, 'UTF-16BE', 'UTF-8'); - $hex = strtoupper(substr('0000'.bin2hex($chr), -4)); - } + if (1 === strlen($chr)) { + /* + * While HTML supports far more named entities, the lowest common denominator + * has become HTML5's XML Serialisation which is restricted to the those named + * entities that XML supports. Using HTML entities would result in this error: + * XML Parsing Error: undefined entity + */ + static $entityMap = [ + 34 => '"', /* quotation mark */ + 38 => '&', /* ampersand */ + 60 => '<', /* less-than sign */ + 62 => '>', /* greater-than sign */ + ]; - $int = hexdec($hex); - if (array_key_exists($int, $entityMap)) { - return sprintf('&%s;', $entityMap[$int]); + if (isset($entityMap[$ord])) { + return $entityMap[$ord]; + } + + return sprintf('&#x%02X;', $ord); } /* * Per OWASP recommendations, we'll use hex entities for any other * characters where a named entity does not exist. */ - return sprintf('&#x%s;', $hex); + return sprintf('&#x%04X;', mb_ord($chr, 'UTF-8')); }, $string); if ('UTF-8' !== $charset) { @@ -1113,7 +1120,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', return $escapers[$strategy]($env, $string, $charset); } - $validStrategies = implode(', ', array_merge(array('html', 'js', 'url', 'css', 'html_attr'), array_keys($escapers))); + $validStrategies = implode(', ', array_merge(['html', 'js', 'url', 'css', 'html_attr'], array_keys($escapers))); throw new Twig_Error_Runtime(sprintf('Invalid escaping strategy "%s" (valid ones: %s).', $strategy, $validStrategies)); } @@ -1126,13 +1133,13 @@ function twig_escape_filter_is_safe(Twig_Node $filterArgs) { foreach ($filterArgs as $arg) { if ($arg instanceof Twig_Node_Expression_Constant) { - return array($arg->getAttribute('value')); + return [$arg->getAttribute('value')]; } - return array(); + return []; } - return array('html'); + return ['html']; } function twig_convert_encoding($string, $to, $from) @@ -1244,7 +1251,7 @@ function twig_ensure_traversable($seq) return $seq; } - return array(); + return []; } /** @@ -1271,7 +1278,7 @@ function twig_test_empty($value) return '' === (string) $value; } - return '' === $value || false === $value || null === $value || array() === $value; + return '' === $value || false === $value || null === $value || [] === $value; } /** @@ -1306,7 +1313,7 @@ function twig_test_iterable($value) * * @return string The rendered template */ -function twig_include(Twig_Environment $env, $context, $template, $variables = array(), $withContext = true, $ignoreMissing = false, $sandboxed = false) +function twig_include(Twig_Environment $env, $context, $template, $variables = [], $withContext = true, $ignoreMissing = false, $sandboxed = false) { $alreadySandboxed = false; $sandbox = null; @@ -1321,7 +1328,7 @@ function twig_include(Twig_Environment $env, $context, $template, $variables = a } } - $result = null; + $result = ''; try { $result = $env->resolveTemplate($template)->render($variables); } catch (Twig_Error_Loader $e) { @@ -1372,7 +1379,7 @@ function twig_source(Twig_Environment $env, $name, $ignoreMissing = false) * Provides the ability to get constants from instances as well as class/global constants. * * @param string $constant The name of the constant - * @param null|object $object The object to get the constant from + * @param object|null $object The object to get the constant from * * @return string */ @@ -1389,7 +1396,7 @@ function twig_constant($constant, $object = null) * Checks if a constant exists. * * @param string $constant The name of the constant - * @param null|object $object The object to get the constant from + * @param object|null $object The object to get the constant from * * @return bool */ @@ -1450,13 +1457,13 @@ function twig_array_batch($items, $size, $fill = null) * * @internal */ -function twig_get_attribute(Twig_Environment $env, Twig_Source $source, $object, $item, array $arguments = array(), $type = /* Twig_Template::ANY_CALL */ 'any', $isDefinedTest = false, $ignoreStrictCheck = false, $sandboxed = false) +function twig_get_attribute(Twig_Environment $env, Twig_Source $source, $object, $item, array $arguments = [], $type = /* Twig_Template::ANY_CALL */ 'any', $isDefinedTest = false, $ignoreStrictCheck = false, $sandboxed = false) { // array if (/* Twig_Template::METHOD_CALL */ 'method' !== $type) { $arrayItem = is_bool($item) || is_float($item) ? (int) $item : $item; - if ((is_array($object) && (isset($object[$arrayItem]) || array_key_exists($arrayItem, $object))) + if (((is_array($object) || $object instanceof ArrayObject) && (isset($object[$arrayItem]) || array_key_exists($arrayItem, $object))) || ($object instanceof ArrayAccess && isset($object[$arrayItem])) ) { if ($isDefinedTest) { @@ -1540,7 +1547,7 @@ function twig_get_attribute(Twig_Environment $env, Twig_Source $source, $object, } } - static $cache = array(); + static $cache = []; $class = get_class($object); @@ -1550,7 +1557,7 @@ function twig_get_attribute(Twig_Environment $env, Twig_Source $source, $object, $methods = get_class_methods($object); sort($methods); $lcMethods = array_map('strtolower', $methods); - $classCache = array(); + $classCache = []; foreach ($methods as $i => $method) { $classCache[$method] = $method; $classCache[$lcName = $lcMethods[$i]] = $method; diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Debug.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Debug.php index a4f7b3cf..f7d3d7cf 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Debug.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Debug.php @@ -23,9 +23,9 @@ final class Twig_Extension_Debug extends Twig_Extension || 'cli' === PHP_SAPI ; - return array( - new Twig_Function('dump', 'twig_var_dump', array('is_safe' => $isDumpOutputHtmlSafe ? array('html') : array(), 'needs_context' => true, 'needs_environment' => true)), - ); + return [ + new Twig_Function('dump', 'twig_var_dump', ['is_safe' => $isDumpOutputHtmlSafe ? ['html'] : [], 'needs_context' => true, 'needs_environment' => true]), + ]; } } @@ -38,7 +38,7 @@ function twig_var_dump(Twig_Environment $env, $context, ...$vars) ob_start(); if (!$vars) { - $vars = array(); + $vars = []; foreach ($context as $key => $value) { if (!$value instanceof Twig_Template) { $vars[$key] = $value; diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Escaper.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Escaper.php index c0fd6675..d4808f6d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Escaper.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Escaper.php @@ -25,19 +25,19 @@ final class Twig_Extension_Escaper extends Twig_Extension public function getTokenParsers() { - return array(new Twig_TokenParser_AutoEscape()); + return [new Twig_TokenParser_AutoEscape()]; } public function getNodeVisitors() { - return array(new Twig_NodeVisitor_Escaper()); + return [new Twig_NodeVisitor_Escaper()]; } public function getFilters() { - return array( - new Twig_Filter('raw', 'twig_raw_filter', array('is_safe' => array('all'))), - ); + return [ + new Twig_Filter('raw', 'twig_raw_filter', ['is_safe' => ['all']]), + ]; } /** @@ -51,7 +51,7 @@ final class Twig_Extension_Escaper extends Twig_Extension public function setDefaultStrategy($defaultStrategy) { if ('name' === $defaultStrategy) { - $defaultStrategy = array('Twig_FileExtensionEscapingStrategy', 'guess'); + $defaultStrategy = ['Twig_FileExtensionEscapingStrategy', 'guess']; } $this->defaultStrategy = $defaultStrategy; diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Optimizer.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Optimizer.php index 8b5bba51..140020fc 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Optimizer.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Optimizer.php @@ -20,7 +20,7 @@ final class Twig_Extension_Optimizer extends Twig_Extension public function getNodeVisitors() { - return array(new Twig_NodeVisitor_Optimizer($this->optimizers)); + return [new Twig_NodeVisitor_Optimizer($this->optimizers)]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Profiler.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Profiler.php index ffad77c4..065b221e 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Profiler.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Profiler.php @@ -11,7 +11,7 @@ class Twig_Extension_Profiler extends Twig_Extension { - private $actives = array(); + private $actives = []; public function __construct(Twig_Profiler_Profile $profile) { @@ -36,7 +36,7 @@ class Twig_Extension_Profiler extends Twig_Extension public function getNodeVisitors() { - return array(new Twig_Profiler_NodeVisitor_Profiler(get_class($this))); + return [new Twig_Profiler_NodeVisitor_Profiler(get_class($this))]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Sandbox.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Sandbox.php index 3ab71c3b..77b23c57 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Sandbox.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Sandbox.php @@ -23,12 +23,12 @@ final class Twig_Extension_Sandbox extends Twig_Extension public function getTokenParsers() { - return array(new Twig_TokenParser_Sandbox()); + return [new Twig_TokenParser_Sandbox()]; } public function getNodeVisitors() { - return array(new Twig_NodeVisitor_Sandbox()); + return [new Twig_NodeVisitor_Sandbox()]; } public function enableSandbox() diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Staging.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Staging.php index 926b2b78..36876b7a 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Staging.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/Staging.php @@ -18,11 +18,11 @@ */ final class Twig_Extension_Staging extends Twig_Extension { - private $functions = array(); - private $filters = array(); - private $visitors = array(); - private $tokenParsers = array(); - private $tests = array(); + private $functions = []; + private $filters = []; + private $visitors = []; + private $tokenParsers = []; + private $tests = []; public function addFunction(Twig_Function $function) { diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/StringLoader.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/StringLoader.php index de3593d8..606b24dc 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/StringLoader.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Extension/StringLoader.php @@ -13,9 +13,9 @@ final class Twig_Extension_StringLoader extends Twig_Extension { public function getFunctions() { - return array( - new Twig_Function('template_from_string', 'twig_template_from_string', array('needs_environment' => true)), - ); + return [ + new Twig_Function('template_from_string', 'twig_template_from_string', ['needs_environment' => true]), + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/ExtensionSet.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/ExtensionSet.php index 2ade646e..c1bd03c8 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/ExtensionSet.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/ExtensionSet.php @@ -28,8 +28,8 @@ final class Twig_ExtensionSet private $unaryOperators; private $binaryOperators; private $globals; - private $functionCallbacks = array(); - private $filterCallbacks = array(); + private $functionCallbacks = []; + private $filterCallbacks = []; private $lastModified = 0; public function __construct() @@ -330,7 +330,7 @@ final class Twig_ExtensionSet return $this->globals; } - $globals = array(); + $globals = []; foreach ($this->extensions as $extension) { if (!$extension instanceof Twig_Extension_GlobalsInterface) { continue; @@ -386,6 +386,19 @@ final class Twig_ExtensionSet return $this->tests[$name]; } + foreach ($this->tests as $pattern => $test) { + $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); + + if ($count) { + if (preg_match('#^'.$pattern.'$#', $name, $matches)) { + array_shift($matches); + $test->setArguments($matches); + + return $test; + } + } + } + return false; } @@ -419,13 +432,13 @@ final class Twig_ExtensionSet private function initExtensions() { - $this->parsers = array(); - $this->filters = array(); - $this->functions = array(); - $this->tests = array(); - $this->visitors = array(); - $this->unaryOperators = array(); - $this->binaryOperators = array(); + $this->parsers = []; + $this->filters = []; + $this->functions = []; + $this->tests = []; + $this->visitors = []; + $this->unaryOperators = []; + $this->binaryOperators = []; foreach ($this->extensions as $extension) { $this->initExtension($extension); diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/FactoryRuntimeLoader.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/FactoryRuntimeLoader.php index 2cdaded1..2a867122 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/FactoryRuntimeLoader.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/FactoryRuntimeLoader.php @@ -21,7 +21,7 @@ class Twig_FactoryRuntimeLoader implements Twig_RuntimeLoaderInterface /** * @param array $map An array where keys are class names and values factory callables */ - public function __construct($map = array()) + public function __construct($map = []) { $this->map = $map; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php index 8f8cd2ee..6b13c721 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php @@ -31,7 +31,7 @@ class Twig_FileExtensionEscapingStrategy */ public static function guess($name) { - if (in_array(substr($name, -1), array('/', '\\'))) { + if (in_array(substr($name, -1), ['/', '\\'])) { return 'html'; // return html for directories } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Filter.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Filter.php index d2182ef2..9a86d06d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Filter.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Filter.php @@ -23,7 +23,7 @@ class Twig_Filter private $name; private $callable; private $options; - private $arguments = array(); + private $arguments = []; /** * Creates a template filter. @@ -32,7 +32,7 @@ class Twig_Filter * @param callable|null $callable A callable implementing the filter. If null, you need to overwrite the "node_class" option to customize compilation. * @param array $options Options array */ - public function __construct(string $name, $callable = null, array $options = array()) + public function __construct(string $name, $callable = null, array $options = []) { if (__CLASS__ !== get_class($this)) { @trigger_error('Overriding '.__CLASS__.' is deprecated since version 2.4.0 and the class will be final in 3.0.', E_USER_DEPRECATED); @@ -40,7 +40,7 @@ class Twig_Filter $this->name = $name; $this->callable = $callable; - $this->options = array_merge(array( + $this->options = array_merge([ 'needs_environment' => false, 'needs_context' => false, 'is_variadic' => false, @@ -51,7 +51,7 @@ class Twig_Filter 'node_class' => 'Twig_Node_Expression_Filter', 'deprecated' => false, 'alternative' => null, - ), $options); + ], $options); } public function getName() diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Function.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Function.php index 75a99f24..b0b6cc06 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Function.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Function.php @@ -23,7 +23,7 @@ class Twig_Function private $name; private $callable; private $options; - private $arguments = array(); + private $arguments = []; /** * Creates a template function. @@ -32,7 +32,7 @@ class Twig_Function * @param callable|null $callable A callable implementing the function. If null, you need to overwrite the "node_class" option to customize compilation. * @param array $options Options array */ - public function __construct(string $name, $callable = null, array $options = array()) + public function __construct(string $name, $callable = null, array $options = []) { if (__CLASS__ !== get_class($this)) { @trigger_error('Overriding '.__CLASS__.' is deprecated since version 2.4.0 and the class will be final in 3.0.', E_USER_DEPRECATED); @@ -40,7 +40,7 @@ class Twig_Function $this->name = $name; $this->callable = $callable; - $this->options = array_merge(array( + $this->options = array_merge([ 'needs_environment' => false, 'needs_context' => false, 'is_variadic' => false, @@ -49,7 +49,7 @@ class Twig_Function 'node_class' => 'Twig_Node_Expression_Function', 'deprecated' => false, 'alternative' => null, - ), $options); + ], $options); } public function getName() @@ -102,7 +102,7 @@ class Twig_Function return $this->options['is_safe_callback']($functionArgs); } - return array(); + return []; } public function isVariadic() diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Lexer.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Lexer.php index fa06eaea..75f45d1a 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Lexer.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Lexer.php @@ -46,19 +46,19 @@ class Twig_Lexer const REGEX_DQ_STRING_PART = '/[^#"\\\\]*(?:(?:\\\\.|#(?!\{))[^#"\\\\]*)*/As'; const PUNCTUATION = '()[]{}?:.,|'; - public function __construct(Twig_Environment $env, array $options = array()) + public function __construct(Twig_Environment $env, array $options = []) { $this->env = $env; - $this->options = array_merge(array( - 'tag_comment' => array('{#', '#}'), - 'tag_block' => array('{%', '%}'), - 'tag_variable' => array('{{', '}}'), + $this->options = array_merge([ + 'tag_comment' => ['{#', '#}'], + 'tag_block' => ['{%', '%}'], + 'tag_variable' => ['{{', '}}'], 'whitespace_trim' => '-', - 'interpolation' => array('#{', '}'), - ), $options); + 'interpolation' => ['#{', '}'], + ], $options); - $this->regexes = array( + $this->regexes = [ 'lex_var' => '/\s*'.preg_quote($this->options['whitespace_trim'].$this->options['tag_variable'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_variable'][1], '/').'/A', 'lex_block' => '/\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')\n?/A', 'lex_raw_data' => '/('.preg_quote($this->options['tag_block'][0].$this->options['whitespace_trim'], '/').'|'.preg_quote($this->options['tag_block'][0], '/').')\s*(?:endverbatim)\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')/s', @@ -69,20 +69,20 @@ class Twig_Lexer 'lex_tokens_start' => '/('.preg_quote($this->options['tag_variable'][0], '/').'|'.preg_quote($this->options['tag_block'][0], '/').'|'.preg_quote($this->options['tag_comment'][0], '/').')('.preg_quote($this->options['whitespace_trim'], '/').')?/s', 'interpolation_start' => '/'.preg_quote($this->options['interpolation'][0], '/').'\s*/A', 'interpolation_end' => '/\s*'.preg_quote($this->options['interpolation'][1], '/').'/A', - ); + ]; } public function tokenize(Twig_Source $source) { $this->source = $source; - $this->code = str_replace(array("\r\n", "\r"), "\n", $source->getCode()); + $this->code = str_replace(["\r\n", "\r"], "\n", $source->getCode()); $this->cursor = 0; $this->lineno = 1; $this->end = strlen($this->code); - $this->tokens = array(); + $this->tokens = []; $this->state = self::STATE_DATA; - $this->states = array(); - $this->brackets = array(); + $this->states = []; + $this->brackets = []; $this->position = -1; // find all token starts in one go @@ -237,7 +237,7 @@ class Twig_Lexer elseif (false !== strpos(self::PUNCTUATION, $this->code[$this->cursor])) { // opening bracket if (false !== strpos('([{', $this->code[$this->cursor])) { - $this->brackets[] = array($this->code[$this->cursor], $this->lineno); + $this->brackets[] = [$this->code[$this->cursor], $this->lineno]; } // closing bracket elseif (false !== strpos(')]}', $this->code[$this->cursor])) { @@ -261,7 +261,7 @@ class Twig_Lexer } // opening double quoted string elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, null, $this->cursor)) { - $this->brackets[] = array('"', $this->lineno); + $this->brackets[] = ['"', $this->lineno]; $this->pushState(self::STATE_STRING); $this->moveCursor($match[0]); } @@ -299,7 +299,7 @@ class Twig_Lexer private function lexString() { if (preg_match($this->regexes['interpolation_start'], $this->code, $match, null, $this->cursor)) { - $this->brackets[] = array($this->options['interpolation'][0], $this->lineno); + $this->brackets[] = [$this->options['interpolation'][0], $this->lineno]; $this->pushToken(/* Twig_Token::INTERPOLATION_START_TYPE */ 10); $this->moveCursor($match[0]); $this->pushState(self::STATE_INTERPOLATION); @@ -352,7 +352,7 @@ class Twig_Lexer private function getOperatorRegex() { $operators = array_merge( - array('='), + ['='], array_keys($this->env->getUnaryOperators()), array_keys($this->env->getBinaryOperators()) ); @@ -360,7 +360,7 @@ class Twig_Lexer $operators = array_combine($operators, array_map('strlen', $operators)); arsort($operators); - $regex = array(); + $regex = []; foreach ($operators as $operator => $length) { // an operator that ends with a character must be followed by // a whitespace or a parenthesis diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Loader/Array.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Loader/Array.php index ba23bfa7..a7e8057f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Loader/Array.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Loader/Array.php @@ -23,12 +23,12 @@ */ final class Twig_Loader_Array implements Twig_LoaderInterface, Twig_ExistsLoaderInterface, Twig_SourceContextLoaderInterface { - private $templates = array(); + private $templates = []; /** * @param array $templates An array of templates (keys are the names, and values are the source code) */ - public function __construct(array $templates = array()) + public function __construct(array $templates = []) { $this->templates = $templates; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Loader/Chain.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Loader/Chain.php index dba9b776..c4ff8b6a 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Loader/Chain.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Loader/Chain.php @@ -16,13 +16,13 @@ */ final class Twig_Loader_Chain implements Twig_LoaderInterface, Twig_ExistsLoaderInterface, Twig_SourceContextLoaderInterface { - private $hasSourceCache = array(); - private $loaders = array(); + private $hasSourceCache = []; + private $loaders = []; /** * @param Twig_LoaderInterface[] $loaders */ - public function __construct(array $loaders = array()) + public function __construct(array $loaders = []) { foreach ($loaders as $loader) { $this->addLoader($loader); @@ -32,12 +32,12 @@ final class Twig_Loader_Chain implements Twig_LoaderInterface, Twig_ExistsLoader public function addLoader(Twig_LoaderInterface $loader) { $this->loaders[] = $loader; - $this->hasSourceCache = array(); + $this->hasSourceCache = []; } public function getSourceContext($name) { - $exceptions = array(); + $exceptions = []; foreach ($this->loaders as $loader) { if (!$loader->exists($name)) { continue; @@ -70,7 +70,7 @@ final class Twig_Loader_Chain implements Twig_LoaderInterface, Twig_ExistsLoader public function getCacheKey($name) { - $exceptions = array(); + $exceptions = []; foreach ($this->loaders as $loader) { if (!$loader->exists($name)) { continue; @@ -88,7 +88,7 @@ final class Twig_Loader_Chain implements Twig_LoaderInterface, Twig_ExistsLoader public function isFresh($name, $time) { - $exceptions = array(); + $exceptions = []; foreach ($this->loaders as $loader) { if (!$loader->exists($name)) { continue; diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Loader/Filesystem.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Loader/Filesystem.php index 1cd448a6..58d082ce 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Loader/Filesystem.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Loader/Filesystem.php @@ -19,9 +19,9 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI /** Identifier of the main namespace. */ const MAIN_NAMESPACE = '__main__'; - protected $paths = array(); - protected $cache = array(); - protected $errorCache = array(); + protected $paths = []; + protected $cache = []; + protected $errorCache = []; private $rootPath; @@ -29,7 +29,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI * @param string|array $paths A path or an array of paths where to look for templates * @param string|null $rootPath The root path common to all relative paths (null for getcwd()) */ - public function __construct($paths = array(), $rootPath = null) + public function __construct($paths = [], $rootPath = null) { $this->rootPath = (null === $rootPath ? getcwd() : $rootPath).DIRECTORY_SEPARATOR; if (false !== $realPath = realpath($rootPath)) { @@ -50,7 +50,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI */ public function getPaths($namespace = self::MAIN_NAMESPACE) { - return isset($this->paths[$namespace]) ? $this->paths[$namespace] : array(); + return isset($this->paths[$namespace]) ? $this->paths[$namespace] : []; } /** @@ -74,10 +74,10 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI public function setPaths($paths, $namespace = self::MAIN_NAMESPACE) { if (!is_array($paths)) { - $paths = array($paths); + $paths = [$paths]; } - $this->paths[$namespace] = array(); + $this->paths[$namespace] = []; foreach ($paths as $path) { $this->addPath($path, $namespace); } @@ -94,7 +94,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI public function addPath($path, $namespace = self::MAIN_NAMESPACE) { // invalidate the cache - $this->cache = $this->errorCache = array(); + $this->cache = $this->errorCache = []; $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path; if (!is_dir($checkPath)) { @@ -115,7 +115,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI public function prependPath($path, $namespace = self::MAIN_NAMESPACE) { // invalidate the cache - $this->cache = $this->errorCache = array(); + $this->cache = $this->errorCache = []; $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path; if (!is_dir($checkPath)) { @@ -189,9 +189,17 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI throw new Twig_Error_Loader($this->errorCache[$name]); } - $this->validateName($name); + try { + $this->validateName($name); - list($namespace, $shortname) = $this->parseName($name); + list($namespace, $shortname) = $this->parseName($name); + } catch (Twig_Error_Loader $e) { + if (!$throw) { + return false; + } + + throw $e; + } if (!isset($this->paths[$namespace])) { $this->errorCache[$name] = sprintf('There are no registered paths for namespace "%s".', $namespace); @@ -241,10 +249,10 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI $namespace = substr($name, 1, $pos - 1); $shortname = substr($name, $pos + 1); - return array($namespace, $shortname); + return [$namespace, $shortname]; } - return array($default, $name); + return [$default, $name]; } private function validateName($name) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node.php index 8b62c295..d0272ccd 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node.php @@ -35,7 +35,7 @@ class Twig_Node implements Countable, IteratorAggregate * @param int $lineno The line number * @param string $tag The tag name associated with the Node */ - public function __construct(array $nodes = array(), array $attributes = array(), $lineno = 0, $tag = null) + public function __construct(array $nodes = [], array $attributes = [], $lineno = 0, $tag = null) { foreach ($nodes as $name => $node) { if (!$node instanceof self) { @@ -50,17 +50,17 @@ class Twig_Node implements Countable, IteratorAggregate public function __toString() { - $attributes = array(); + $attributes = []; foreach ($this->attributes as $name => $value) { $attributes[] = sprintf('%s: %s', $name, str_replace("\n", '', var_export($value, true))); } - $repr = array(get_class($this).'('.implode(', ', $attributes)); + $repr = [get_class($this).'('.implode(', ', $attributes)]; if (count($this->nodes)) { foreach ($this->nodes as $name => $node) { $len = strlen($name) + 4; - $noderepr = array(); + $noderepr = []; foreach (explode("\n", (string) $node) as $line) { $noderepr[] = str_repeat(' ', $len).$line; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/AutoEscape.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/AutoEscape.php index 36a982bb..a191cbf2 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/AutoEscape.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/AutoEscape.php @@ -24,7 +24,7 @@ class Twig_Node_AutoEscape extends Twig_Node { public function __construct($value, Twig_Node $body, $lineno, $tag = 'autoescape') { - parent::__construct(array('body' => $body), array('value' => $value), $lineno, $tag); + parent::__construct(['body' => $body], ['value' => $value], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Block.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Block.php index be87ef69..2e8ebdfe 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Block.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Block.php @@ -19,14 +19,14 @@ class Twig_Node_Block extends Twig_Node { public function __construct($name, Twig_Node $body, $lineno, $tag = null) { - parent::__construct(array('body' => $body), array('name' => $name), $lineno, $tag); + parent::__construct(['body' => $body], ['name' => $name], $lineno, $tag); } public function compile(Twig_Compiler $compiler) { $compiler ->addDebugInfo($this) - ->write(sprintf("public function block_%s(\$context, array \$blocks = array())\n", $this->getAttribute('name')), "{\n") + ->write(sprintf("public function block_%s(\$context, array \$blocks = [])\n", $this->getAttribute('name')), "{\n") ->indent() ; diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/BlockReference.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/BlockReference.php index 92a9f398..0b0f7b36 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/BlockReference.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/BlockReference.php @@ -19,7 +19,7 @@ class Twig_Node_BlockReference extends Twig_Node implements Twig_NodeOutputInter { public function __construct($name, $lineno, $tag = null) { - parent::__construct(array(), array('name' => $name), $lineno, $tag); + parent::__construct([], ['name' => $name], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/CheckSecurity.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/CheckSecurity.php index d73185de..e3faf863 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/CheckSecurity.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/CheckSecurity.php @@ -29,8 +29,8 @@ class Twig_Node_CheckSecurity extends Twig_Node public function compile(Twig_Compiler $compiler) { - $tags = $filters = $functions = array(); - foreach (array('tags', 'filters', 'functions') as $type) { + $tags = $filters = $functions = []; + foreach (['tags', 'filters', 'functions'] as $type) { foreach ($this->{'used'.ucfirst($type)} as $name => $node) { if ($node instanceof Twig_Node) { ${$type}[$name] = $node->getTemplateLine(); @@ -48,9 +48,9 @@ class Twig_Node_CheckSecurity extends Twig_Node ->indent() ->write("\$this->extensions['Twig_Extension_Sandbox']->checkSecurity(\n") ->indent() - ->write(!$tags ? "array(),\n" : "array('".implode("', '", array_keys($tags))."'),\n") - ->write(!$filters ? "array(),\n" : "array('".implode("', '", array_keys($filters))."'),\n") - ->write(!$functions ? "array()\n" : "array('".implode("', '", array_keys($functions))."')\n") + ->write(!$tags ? "[],\n" : "['".implode("', '", array_keys($tags))."'],\n") + ->write(!$filters ? "[],\n" : "['".implode("', '", array_keys($filters))."'],\n") + ->write(!$functions ? "[]\n" : "['".implode("', '", array_keys($functions))."']\n") ->outdent() ->write(");\n") ->outdent() diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Do.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Do.php index cdd7e77a..13350454 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Do.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Do.php @@ -18,7 +18,7 @@ class Twig_Node_Do extends Twig_Node { public function __construct(Twig_Node_Expression $expr, $lineno, $tag = null) { - parent::__construct(array('expr' => $expr), array(), $lineno, $tag); + parent::__construct(['expr' => $expr], [], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Array.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Array.php index 5c71f5e0..664a2136 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Array.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Array.php @@ -14,7 +14,7 @@ class Twig_Node_Expression_Array extends Twig_Node_Expression public function __construct(array $elements, $lineno) { - parent::__construct($elements, array(), $lineno); + parent::__construct($elements, [], $lineno); $this->index = -1; foreach ($this->getKeyValuePairs() as $pair) { @@ -26,13 +26,13 @@ class Twig_Node_Expression_Array extends Twig_Node_Expression public function getKeyValuePairs() { - $pairs = array(); + $pairs = []; foreach (array_chunk($this->nodes, 2) as $pair) { - $pairs[] = array( + $pairs[] = [ 'key' => $pair[0], 'value' => $pair[1], - ); + ]; } return $pairs; @@ -62,7 +62,7 @@ class Twig_Node_Expression_Array extends Twig_Node_Expression public function compile(Twig_Compiler $compiler) { - $compiler->raw('array('); + $compiler->raw('['); $first = true; foreach ($this->getKeyValuePairs() as $pair) { if (!$first) { @@ -76,7 +76,7 @@ class Twig_Node_Expression_Array extends Twig_Node_Expression ->subcompile($pair['value']) ; } - $compiler->raw(')'); + $compiler->raw(']'); } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Binary.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Binary.php index 2401bc16..f5296fd1 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Binary.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Binary.php @@ -13,7 +13,7 @@ abstract class Twig_Node_Expression_Binary extends Twig_Node_Expression { public function __construct(Twig_Node $left, Twig_Node $right, $lineno) { - parent::__construct(array('left' => $left, 'right' => $right), array(), $lineno); + parent::__construct(['left' => $left, 'right' => $right], [], $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php index 48c982cf..daed1c5c 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php @@ -19,12 +19,12 @@ class Twig_Node_Expression_BlockReference extends Twig_Node_Expression { public function __construct(Twig_Node $name, Twig_Node $template = null, $lineno, $tag = null) { - $nodes = array('name' => $name); + $nodes = ['name' => $name]; if (null !== $template) { $nodes['template'] = $template; } - parent::__construct($nodes, array('is_defined_test' => false, 'output' => false), $lineno, $tag); + parent::__construct($nodes, ['is_defined_test' => false, 'output' => false], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Call.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Call.php index ac5ac0df..27b86e28 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Call.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Call.php @@ -17,6 +17,7 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression $callable = $this->getAttribute('callable'); $closingParenthesis = false; + $isArray = false; if (is_string($callable) && false === strpos($callable, '::')) { $compiler->raw($callable); } else { @@ -40,20 +41,21 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression $compiler->raw(sprintf('->%s', $callable[1])); } else { $closingParenthesis = true; - $compiler->raw(sprintf('call_user_func_array($this->env->get%s(\'%s\')->getCallable(), array', ucfirst($this->getAttribute('type')), $this->getAttribute('name'))); + $isArray = true; + $compiler->raw(sprintf('call_user_func_array($this->env->get%s(\'%s\')->getCallable(), ', ucfirst($this->getAttribute('type')), $this->getAttribute('name'))); } } - $this->compileArguments($compiler); + $this->compileArguments($compiler, $isArray); if ($closingParenthesis) { $compiler->raw(')'); } } - protected function compileArguments(Twig_Compiler $compiler) + protected function compileArguments(Twig_Compiler $compiler, $isArray = false) { - $compiler->raw('('); + $compiler->raw($isArray ? '[' : '('); $first = true; @@ -100,7 +102,7 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression } } - $compiler->raw(')'); + $compiler->raw($isArray ? ']' : ')'); } protected function getArguments($callable = null, $arguments) @@ -108,7 +110,7 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression $callType = $this->getAttribute('type'); $callName = $this->getAttribute('name'); - $parameters = array(); + $parameters = []; $named = false; foreach ($arguments as $name => $node) { if (!is_int($name)) { @@ -137,10 +139,10 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression } $callableParameters = $this->getCallableParameters($callable, $isVariadic); - $arguments = array(); - $names = array(); - $missingArguments = array(); - $optionalArguments = array(); + $arguments = []; + $names = []; + $missingArguments = []; + $optionalArguments = []; $pos = 0; foreach ($callableParameters as $callableParameter) { $names[] = $name = $this->normalizeName($callableParameter->name); @@ -160,12 +162,12 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression $arguments = array_merge($arguments, $optionalArguments); $arguments[] = $parameters[$name]; unset($parameters[$name]); - $optionalArguments = array(); + $optionalArguments = []; } elseif (array_key_exists($pos, $parameters)) { $arguments = array_merge($arguments, $optionalArguments); $arguments[] = $parameters[$pos]; unset($parameters[$pos]); - $optionalArguments = array(); + $optionalArguments = []; ++$pos; } elseif ($callableParameter->isDefaultValueAvailable()) { $optionalArguments[] = new Twig_Node_Expression_Constant($callableParameter->getDefaultValue(), -1); @@ -181,7 +183,7 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression } if ($isVariadic) { - $arbitraryArguments = new Twig_Node_Expression_Array(array(), -1); + $arbitraryArguments = new Twig_Node_Expression_Array([], -1); foreach ($parameters as $key => $value) { if (is_int($key)) { $arbitraryArguments->addElement($value); @@ -217,14 +219,14 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression protected function normalizeName($name) { - return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), $name)); + return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], $name)); } private function getCallableParameters($callable, $isVariadic) { list($r) = $this->reflectCallable($callable); if (null === $r) { - return array(); + return []; } $parameters = $r->getParameters(); @@ -244,7 +246,7 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression } if ($isVariadic) { $argument = end($parameters); - if ($argument && $argument->isArray() && $argument->isDefaultValueAvailable() && array() === $argument->getDefaultValue()) { + if ($argument && $argument->isArray() && $argument->isDefaultValueAvailable() && [] === $argument->getDefaultValue()) { array_pop($parameters); } else { $callableName = $r->name; @@ -252,7 +254,7 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression $callableName = $r->getDeclaringClass()->name.'::'.$callableName; } - throw new LogicException(sprintf('The last parameter of "%s" for %s "%s" must be an array with default value, eg. "array $arg = array()".', $callableName, $this->getAttribute('type'), $this->getAttribute('name'))); + throw new LogicException(sprintf('The last parameter of "%s" for %s "%s" must be an array with default value, eg. "array $arg = []".', $callableName, $this->getAttribute('type'), $this->getAttribute('name'))); } } @@ -268,27 +270,27 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression if (is_array($callable)) { if (!method_exists($callable[0], $callable[1])) { // __call() - return array(null, array()); + return [null, []]; } $r = new ReflectionMethod($callable[0], $callable[1]); } elseif (is_object($callable) && !$callable instanceof Closure) { $r = new ReflectionObject($callable); $r = $r->getMethod('__invoke'); - $callable = array($callable, '__invoke'); + $callable = [$callable, '__invoke']; } elseif (is_string($callable) && false !== $pos = strpos($callable, '::')) { $class = substr($callable, 0, $pos); $method = substr($callable, $pos + 2); if (!method_exists($class, $method)) { // __staticCall() - return array(null, array()); + return [null, []]; } $r = new ReflectionMethod($callable); - $callable = array($class, $method); + $callable = [$class, $method]; } else { $r = new ReflectionFunction($callable); } - return $this->reflector = array($r, $callable); + return $this->reflector = [$r, $callable]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php index c339d773..996772a0 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php @@ -13,7 +13,7 @@ class Twig_Node_Expression_Conditional extends Twig_Node_Expression { public function __construct(Twig_Node_Expression $expr1, Twig_Node_Expression $expr2, Twig_Node_Expression $expr3, $lineno) { - parent::__construct(array('expr1' => $expr1, 'expr2' => $expr2, 'expr3' => $expr3), array(), $lineno); + parent::__construct(['expr1' => $expr1, 'expr2' => $expr2, 'expr3' => $expr3], [], $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Constant.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Constant.php index bf4d031c..7304e8c3 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Constant.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Constant.php @@ -13,7 +13,7 @@ class Twig_Node_Expression_Constant extends Twig_Node_Expression { public function __construct($value, $lineno) { - parent::__construct(array(), array('value' => $value), $lineno); + parent::__construct([], ['value' => $value], $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php index efa91c5e..61b04708 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php @@ -13,7 +13,7 @@ class Twig_Node_Expression_Filter extends Twig_Node_Expression_Call { public function __construct(Twig_Node $node, Twig_Node_Expression_Constant $filterName, Twig_Node $arguments, $lineno, $tag = null) { - parent::__construct(array('node' => $node, 'filter' => $filterName, 'arguments' => $arguments), array(), $lineno, $tag); + parent::__construct(['node' => $node, 'filter' => $filterName, 'arguments' => $arguments], [], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Function.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Function.php index 6f4e8723..37281d7d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Function.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Function.php @@ -12,7 +12,7 @@ class Twig_Node_Expression_Function extends Twig_Node_Expression_Call { public function __construct($name, Twig_Node $arguments, $lineno) { - parent::__construct(array('arguments' => $arguments), array('name' => $name, 'is_defined_test' => false), $lineno); + parent::__construct(['arguments' => $arguments], ['name' => $name, 'is_defined_test' => false], $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php index c4c6b63f..3423af0b 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php @@ -13,12 +13,12 @@ class Twig_Node_Expression_GetAttr extends Twig_Node_Expression { public function __construct(Twig_Node_Expression $node, Twig_Node_Expression $attribute, Twig_Node_Expression $arguments = null, $type, $lineno) { - $nodes = array('node' => $node, 'attribute' => $attribute); + $nodes = ['node' => $node, 'attribute' => $attribute]; if (null !== $arguments) { $nodes['arguments'] = $arguments; } - parent::__construct($nodes, array('type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, 'optimizable' => true), $lineno); + parent::__construct($nodes, ['type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, 'optimizable' => true], $lineno); } public function compile(Twig_Compiler $compiler) @@ -71,7 +71,7 @@ class Twig_Node_Expression_GetAttr extends Twig_Node_Expression if ($this->hasNode('arguments')) { $compiler->raw(', ')->subcompile($this->getNode('arguments')); } else { - $compiler->raw(', array()'); + $compiler->raw(', []'); } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php index 709016eb..b8a83450 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php @@ -12,7 +12,7 @@ class Twig_Node_Expression_MethodCall extends Twig_Node_Expression { public function __construct(Twig_Node_Expression $node, $method, Twig_Node_Expression_Array $arguments, $lineno) { - parent::__construct(array('node' => $node, 'arguments' => $arguments), array('method' => $method, 'safe' => false), $lineno); + parent::__construct(['node' => $node, 'arguments' => $arguments], ['method' => $method, 'safe' => false], $lineno); if ($node instanceof Twig_Node_Expression_Name) { $node->setAttribute('always_defined', true); diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Name.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Name.php index 6459678b..f265267a 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Name.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Name.php @@ -11,15 +11,15 @@ */ class Twig_Node_Expression_Name extends Twig_Node_Expression { - private $specialVars = array( + private $specialVars = [ '_self' => '$this->getTemplateName()', '_context' => '$context', '_charset' => '$this->env->getCharset()', - ); + ]; public function __construct($name, $lineno) { - parent::__construct(array(), array('name' => $name, 'is_defined_test' => false, 'ignore_strict_check' => false, 'always_defined' => false), $lineno); + parent::__construct([], ['name' => $name, 'is_defined_test' => false, 'ignore_strict_check' => false, 'always_defined' => false], $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Parent.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Parent.php index 78692db2..86236852 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Parent.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Parent.php @@ -19,7 +19,7 @@ class Twig_Node_Expression_Parent extends Twig_Node_Expression { public function __construct($name, $lineno, $tag = null) { - parent::__construct(array(), array('output' => false, 'name' => $name), $lineno, $tag); + parent::__construct([], ['output' => false, 'name' => $name], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/TempName.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/TempName.php index 0a86e003..4be1cc2c 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/TempName.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/TempName.php @@ -12,7 +12,7 @@ class Twig_Node_Expression_TempName extends Twig_Node_Expression { public function __construct($name, $lineno) { - parent::__construct(array(), array('name' => $name), $lineno); + parent::__construct([], ['name' => $name], $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Test.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Test.php index 7a1aed8e..328823be 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Test.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Test.php @@ -12,12 +12,12 @@ class Twig_Node_Expression_Test extends Twig_Node_Expression_Call { public function __construct(Twig_Node $node, $name, Twig_Node $arguments = null, $lineno) { - $nodes = array('node' => $node); + $nodes = ['node' => $node]; if (null !== $arguments) { $nodes['arguments'] = $arguments; } - parent::__construct($nodes, array('name' => $name), $lineno); + parent::__construct($nodes, ['name' => $name], $lineno); } public function compile(Twig_Compiler $compiler) @@ -27,6 +27,7 @@ class Twig_Node_Expression_Test extends Twig_Node_Expression_Call $this->setAttribute('name', $name); $this->setAttribute('type', 'test'); + $this->setAttribute('arguments', $test->getArguments()); $this->setAttribute('callable', $test->getCallable()); $this->setAttribute('is_variadic', $test->isVariadic()); diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php index 135d3ccd..85ad1f68 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php @@ -13,7 +13,7 @@ abstract class Twig_Node_Expression_Unary extends Twig_Node_Expression { public function __construct(Twig_Node $node, $lineno) { - parent::__construct(array('node' => $node), array(), $lineno); + parent::__construct(['node' => $node], [], $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Flush.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Flush.php index fcc461ac..5d3ffd52 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Flush.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Flush.php @@ -18,7 +18,7 @@ class Twig_Node_Flush extends Twig_Node { public function __construct($lineno, $tag) { - parent::__construct(array(), array(), $lineno, $tag); + parent::__construct([], [], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/For.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/For.php index 4745c5a9..0ed1bc56 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/For.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/For.php @@ -21,18 +21,18 @@ class Twig_Node_For extends Twig_Node public function __construct(Twig_Node_Expression_AssignName $keyTarget, Twig_Node_Expression_AssignName $valueTarget, Twig_Node_Expression $seq, Twig_Node_Expression $ifexpr = null, Twig_Node $body, Twig_Node $else = null, $lineno, $tag = null) { - $body = new Twig_Node(array($body, $this->loop = new Twig_Node_ForLoop($lineno, $tag))); + $body = new Twig_Node([$body, $this->loop = new Twig_Node_ForLoop($lineno, $tag)]); if (null !== $ifexpr) { - $body = new Twig_Node_If(new Twig_Node(array($ifexpr, $body)), null, $lineno, $tag); + $body = new Twig_Node_If(new Twig_Node([$ifexpr, $body]), null, $lineno, $tag); } - $nodes = array('key_target' => $keyTarget, 'value_target' => $valueTarget, 'seq' => $seq, 'body' => $body); + $nodes = ['key_target' => $keyTarget, 'value_target' => $valueTarget, 'seq' => $seq, 'body' => $body]; if (null !== $else) { $nodes['else'] = $else; } - parent::__construct($nodes, array('with_loop' => true, 'ifexpr' => null !== $ifexpr), $lineno, $tag); + parent::__construct($nodes, ['with_loop' => true, 'ifexpr' => null !== $ifexpr], $lineno, $tag); } public function compile(Twig_Compiler $compiler) @@ -51,12 +51,12 @@ class Twig_Node_For extends Twig_Node if ($this->getAttribute('with_loop')) { $compiler - ->write("\$context['loop'] = array(\n") + ->write("\$context['loop'] = [\n") ->write(" 'parent' => \$context['_parent'],\n") ->write(" 'index0' => 0,\n") ->write(" 'index' => 1,\n") ->write(" 'first' => true,\n") - ->write(");\n") + ->write("];\n") ; if (!$this->getAttribute('ifexpr')) { diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/ForLoop.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/ForLoop.php index 06477cf1..31f282d7 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/ForLoop.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/ForLoop.php @@ -18,7 +18,7 @@ class Twig_Node_ForLoop extends Twig_Node { public function __construct($lineno, $tag = null) { - parent::__construct(array(), array('with_loop' => false, 'ifexpr' => false, 'else' => false), $lineno, $tag); + parent::__construct([], ['with_loop' => false, 'ifexpr' => false, 'else' => false], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/If.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/If.php index dcea3448..2980a673 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/If.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/If.php @@ -19,12 +19,12 @@ class Twig_Node_If extends Twig_Node { public function __construct(Twig_Node $tests, Twig_Node $else = null, $lineno, $tag = null) { - $nodes = array('tests' => $tests); + $nodes = ['tests' => $tests]; if (null !== $else) { $nodes['else'] = $else; } - parent::__construct($nodes, array(), $lineno, $tag); + parent::__construct($nodes, [], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Import.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Import.php index c77e320b..44b2131e 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Import.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Import.php @@ -18,7 +18,7 @@ class Twig_Node_Import extends Twig_Node { public function __construct(Twig_Node_Expression $expr, Twig_Node_Expression $var, $lineno, $tag = null) { - parent::__construct(array('expr' => $expr, 'var' => $var), array(), $lineno, $tag); + parent::__construct(['expr' => $expr, 'var' => $var], [], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Include.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Include.php index 2a5114cb..4b263819 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Include.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Include.php @@ -19,12 +19,12 @@ class Twig_Node_Include extends Twig_Node implements Twig_NodeOutputInterface { public function __construct(Twig_Node_Expression $expr, Twig_Node_Expression $variables = null, $only = false, $ignoreMissing = false, $lineno, $tag = null) { - $nodes = array('expr' => $expr); + $nodes = ['expr' => $expr]; if (null !== $variables) { $nodes['variables'] = $variables; } - parent::__construct($nodes, array('only' => (bool) $only, 'ignore_missing' => (bool) $ignoreMissing), $lineno, $tag); + parent::__construct($nodes, ['only' => (bool) $only, 'ignore_missing' => (bool) $ignoreMissing], $lineno, $tag); } public function compile(Twig_Compiler $compiler) @@ -74,7 +74,7 @@ class Twig_Node_Include extends Twig_Node implements Twig_NodeOutputInterface protected function addTemplateArguments(Twig_Compiler $compiler) { if (!$this->hasNode('variables')) { - $compiler->raw(false === $this->getAttribute('only') ? '$context' : 'array()'); + $compiler->raw(false === $this->getAttribute('only') ? '$context' : '[]'); } elseif (false === $this->getAttribute('only')) { $compiler ->raw('array_merge($context, ') diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Macro.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Macro.php index 9649be07..1f0d4682 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Macro.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Macro.php @@ -26,7 +26,7 @@ class Twig_Node_Macro extends Twig_Node } } - parent::__construct(array('body' => $body, 'arguments' => $arguments), array('name' => $name), $lineno, $tag); + parent::__construct(['body' => $body, 'arguments' => $arguments], ['name' => $name], $lineno, $tag); } public function compile(Twig_Compiler $compiler) @@ -61,7 +61,7 @@ class Twig_Node_Macro extends Twig_Node ; $compiler - ->write("\$context = \$this->env->mergeGlobals(array(\n") + ->write("\$context = \$this->env->mergeGlobals([\n") ->indent() ; @@ -83,8 +83,8 @@ class Twig_Node_Macro extends Twig_Node $compiler ->raw("\$__varargs__,\n") ->outdent() - ->write("));\n\n") - ->write("\$blocks = array();\n\n") + ->write("]);\n\n") + ->write("\$blocks = [];\n\n") ->write("ob_start();\n") ->write("try {\n") ->indent() diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Module.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Module.php index 4cb6c195..7b60746f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Module.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Module.php @@ -33,7 +33,7 @@ class Twig_Node_Module extends Twig_Node $this->source = $source; - $nodes = array( + $nodes = [ 'body' => $body, 'blocks' => $blocks, 'macros' => $macros, @@ -43,16 +43,16 @@ class Twig_Node_Module extends Twig_Node 'constructor_start' => new Twig_Node(), 'constructor_end' => new Twig_Node(), 'class_end' => new Twig_Node(), - ); + ]; if (null !== $parent) { $nodes['parent'] = $parent; } // embedded templates are set as attributes so that they are only visited once by the visitors - parent::__construct($nodes, array( + parent::__construct($nodes, [ 'index' => null, 'embedded_templates' => $embeddedTemplates, - ), 1); + ], 1); // populate the template name of all node children $this->setTemplateName($this->source->getName()); @@ -259,11 +259,11 @@ class Twig_Node_Module extends Twig_Node ->write("\$this->blocks = array_merge(\n") ->indent() ->write("\$this->traits,\n") - ->write("array(\n") + ->write("[\n") ; } else { $compiler - ->write("\$this->blocks = array(\n") + ->write("\$this->blocks = [\n") ; } @@ -274,20 +274,25 @@ class Twig_Node_Module extends Twig_Node foreach ($this->getNode('blocks') as $name => $node) { $compiler - ->write(sprintf("'%s' => array(\$this, 'block_%s'),\n", $name, $name)) + ->write(sprintf("'%s' => [\$this, 'block_%s'],\n", $name, $name)) ; } if ($countTraits) { $compiler ->outdent() - ->write(")\n") + ->write("]\n") + ->outdent() + ->write(");\n") + ; + } else { + $compiler + ->outdent() + ->write("];\n") ; } $compiler - ->outdent() - ->write(");\n") ->outdent() ->subcompile($this->getNode('constructor_end')) ->write("}\n\n") @@ -297,7 +302,7 @@ class Twig_Node_Module extends Twig_Node protected function compileDisplay(Twig_Compiler $compiler) { $compiler - ->write("protected function doDisplay(array \$context, array \$blocks = array())\n", "{\n") + ->write("protected function doDisplay(array \$context, array \$blocks = [])\n", "{\n") ->indent() ->subcompile($this->getNode('display_start')) ->subcompile($this->getNode('body')) @@ -366,7 +371,7 @@ class Twig_Node_Module extends Twig_Node } if (!count($nodes)) { - $nodes = new Twig_Node(array($nodes)); + $nodes = new Twig_Node([$nodes]); } foreach ($nodes as $node) { diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Print.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Print.php index 374db89b..215d712a 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Print.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Print.php @@ -19,7 +19,7 @@ class Twig_Node_Print extends Twig_Node implements Twig_NodeOutputInterface { public function __construct(Twig_Node_Expression $expr, $lineno, $tag = null) { - parent::__construct(array('expr' => $expr), array(), $lineno, $tag); + parent::__construct(['expr' => $expr], [], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Sandbox.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Sandbox.php index 03a6b45b..4976f743 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Sandbox.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Sandbox.php @@ -18,7 +18,7 @@ class Twig_Node_Sandbox extends Twig_Node { public function __construct(Twig_Node $body, $lineno, $tag = null) { - parent::__construct(array('body' => $body), array(), $lineno, $tag); + parent::__construct(['body' => $body], [], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Set.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Set.php index 02a8a2c0..0db73093 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Set.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Set.php @@ -18,7 +18,7 @@ class Twig_Node_Set extends Twig_Node implements Twig_NodeCaptureInterface { public function __construct($capture, Twig_Node $names, Twig_Node $values, $lineno, $tag = null) { - parent::__construct(array('names' => $names, 'values' => $values), array('capture' => $capture, 'safe' => false), $lineno, $tag); + parent::__construct(['names' => $names, 'values' => $values], ['capture' => $capture, 'safe' => false], $lineno, $tag); /* * Optimizes the node when capture is used for a large block of text. @@ -69,7 +69,7 @@ class Twig_Node_Set extends Twig_Node implements Twig_NodeCaptureInterface $compiler->raw(' = '); if (count($this->getNode('names')) > 1) { - $compiler->write('array('); + $compiler->write('['); foreach ($this->getNode('values') as $idx => $value) { if ($idx) { $compiler->raw(', '); @@ -77,7 +77,7 @@ class Twig_Node_Set extends Twig_Node implements Twig_NodeCaptureInterface $compiler->subcompile($value); } - $compiler->raw(')'); + $compiler->raw(']'); } else { if ($this->getAttribute('safe')) { $compiler diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Spaceless.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Spaceless.php index bccdb26d..06604f76 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Spaceless.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Spaceless.php @@ -20,7 +20,7 @@ class Twig_Node_Spaceless extends Twig_Node implements Twig_NodeOutputInterface { public function __construct(Twig_Node $body, $lineno, $tag = 'spaceless') { - parent::__construct(array('body' => $body), array(), $lineno, $tag); + parent::__construct(['body' => $body], [], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Text.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Text.php index f4577fee..ab24d719 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Text.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/Text.php @@ -19,7 +19,7 @@ class Twig_Node_Text extends Twig_Node implements Twig_NodeOutputInterface { public function __construct($data, $lineno) { - parent::__construct(array(), array('data' => $data), $lineno); + parent::__construct([], ['data' => $data], $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/With.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/With.php index baf721d0..c573c812 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/With.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Node/With.php @@ -18,12 +18,12 @@ class Twig_Node_With extends Twig_Node { public function __construct(Twig_Node $body, Twig_Node $variables = null, $only = false, $lineno, $tag = null) { - $nodes = array('body' => $body); + $nodes = ['body' => $body]; if (null !== $variables) { $nodes['variables'] = $variables; } - parent::__construct($nodes, array('only' => (bool) $only), $lineno, $tag); + parent::__construct($nodes, ['only' => (bool) $only], $lineno, $tag); } public function compile(Twig_Compiler $compiler) @@ -46,7 +46,7 @@ class Twig_Node_With extends Twig_Node ; if ($this->getAttribute('only')) { - $compiler->write("\$context = array('_parent' => \$context);\n"); + $compiler->write("\$context = ['_parent' => \$context];\n"); } else { $compiler->write("\$context['_parent'] = \$context;\n"); } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeTraverser.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeTraverser.php index dc6c4a03..bca741e2 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeTraverser.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeTraverser.php @@ -19,13 +19,13 @@ final class Twig_NodeTraverser { private $env; - private $visitors = array(); + private $visitors = []; /** * @param Twig_Environment $env * @param Twig_NodeVisitorInterface[] $visitors */ - public function __construct(Twig_Environment $env, array $visitors = array()) + public function __construct(Twig_Environment $env, array $visitors = []) { $this->env = $env; foreach ($visitors as $visitor) { @@ -36,7 +36,7 @@ final class Twig_NodeTraverser public function addVisitor(Twig_NodeVisitorInterface $visitor) { if (!isset($this->visitors[$visitor->getPriority()])) { - $this->visitors[$visitor->getPriority()] = array(); + $this->visitors[$visitor->getPriority()] = []; } $this->visitors[$visitor->getPriority()][] = $visitor; diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php index a6d28dea..628a1954 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php @@ -16,12 +16,12 @@ */ final class Twig_NodeVisitor_Escaper extends Twig_BaseNodeVisitor { - private $statusStack = array(); - private $blocks = array(); + private $statusStack = []; + private $blocks = []; private $safeAnalysis; private $traverser; private $defaultStrategy = false; - private $safeVars = array(); + private $safeVars = []; public function __construct() { @@ -34,8 +34,8 @@ final class Twig_NodeVisitor_Escaper extends Twig_BaseNodeVisitor if ($env->hasExtension('Twig_Extension_Escaper') && $defaultStrategy = $env->getExtension('Twig_Extension_Escaper')->getDefaultStrategy($node->getTemplateName())) { $this->defaultStrategy = $defaultStrategy; } - $this->safeVars = array(); - $this->blocks = array(); + $this->safeVars = []; + $this->blocks = []; } elseif ($node instanceof Twig_Node_AutoEscape) { $this->statusStack[] = $node->getAttribute('value'); } elseif ($node instanceof Twig_Node_Block) { @@ -51,8 +51,8 @@ final class Twig_NodeVisitor_Escaper extends Twig_BaseNodeVisitor { if ($node instanceof Twig_Node_Module) { $this->defaultStrategy = false; - $this->safeVars = array(); - $this->blocks = array(); + $this->safeVars = []; + $this->blocks = []; } elseif ($node instanceof Twig_Node_Expression_Filter) { return $this->preEscapeFilterNode($node, $env); } elseif ($node instanceof Twig_Node_Print) { @@ -113,7 +113,7 @@ final class Twig_NodeVisitor_Escaper extends Twig_BaseNodeVisitor if (null === $safe) { if (null === $this->traverser) { - $this->traverser = new Twig_NodeTraverser($env, array($this->safeAnalysis)); + $this->traverser = new Twig_NodeTraverser($env, [$this->safeAnalysis]); } $this->safeAnalysis->setSafeVars($this->safeVars); @@ -138,7 +138,7 @@ final class Twig_NodeVisitor_Escaper extends Twig_BaseNodeVisitor { $line = $node->getTemplateLine(); $name = new Twig_Node_Expression_Constant('escape', $line); - $args = new Twig_Node(array(new Twig_Node_Expression_Constant((string) $type, $line), new Twig_Node_Expression_Constant(null, $line), new Twig_Node_Expression_Constant(true, $line))); + $args = new Twig_Node([new Twig_Node_Expression_Constant((string) $type, $line), new Twig_Node_Expression_Constant(null, $line), new Twig_Node_Expression_Constant(true, $line)]); return new Twig_Node_Expression_Filter($node, $name, $args, $line); } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php index b3433c0a..1210571e 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php @@ -28,8 +28,8 @@ final class Twig_NodeVisitor_Optimizer extends Twig_BaseNodeVisitor // obsolete, does not do anything const OPTIMIZE_VAR_ACCESS = 8; - private $loops = array(); - private $loopsTargets = array(); + private $loops = []; + private $loopsTargets = []; private $optimizers; /** diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php index 48ae2933..64f93b8f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php @@ -11,8 +11,8 @@ final class Twig_NodeVisitor_SafeAnalysis extends Twig_BaseNodeVisitor { - private $data = array(); - private $safeVars = array(); + private $data = []; + private $safeVars = []; public function setSafeVars($safeVars) { @@ -51,10 +51,10 @@ final class Twig_NodeVisitor_SafeAnalysis extends Twig_BaseNodeVisitor } } } - $this->data[$hash][] = array( + $this->data[$hash][] = [ 'key' => $node, 'value' => $safe, - ); + ]; } protected function doEnterNode(Twig_Node $node, Twig_Environment $env) @@ -66,13 +66,13 @@ final class Twig_NodeVisitor_SafeAnalysis extends Twig_BaseNodeVisitor { if ($node instanceof Twig_Node_Expression_Constant) { // constants are marked safe for all - $this->setSafe($node, array('all')); + $this->setSafe($node, ['all']); } elseif ($node instanceof Twig_Node_Expression_BlockReference) { // blocks are safe by definition - $this->setSafe($node, array('all')); + $this->setSafe($node, ['all']); } elseif ($node instanceof Twig_Node_Expression_Parent) { // parent block is safe by definition - $this->setSafe($node, array('all')); + $this->setSafe($node, ['all']); } elseif ($node instanceof Twig_Node_Expression_Conditional) { // intersect safeness of both operands $safe = $this->intersectSafe($this->getSafe($node->getNode('expr2')), $this->getSafe($node->getNode('expr3'))); @@ -88,7 +88,7 @@ final class Twig_NodeVisitor_SafeAnalysis extends Twig_BaseNodeVisitor } $this->setSafe($node, $safe); } else { - $this->setSafe($node, array()); + $this->setSafe($node, []); } } elseif ($node instanceof Twig_Node_Expression_Function) { // function expression is safe when the function is safe @@ -98,23 +98,23 @@ final class Twig_NodeVisitor_SafeAnalysis extends Twig_BaseNodeVisitor if (false !== $function) { $this->setSafe($node, $function->getSafe($args)); } else { - $this->setSafe($node, array()); + $this->setSafe($node, []); } } elseif ($node instanceof Twig_Node_Expression_MethodCall) { if ($node->getAttribute('safe')) { - $this->setSafe($node, array('all')); + $this->setSafe($node, ['all']); } else { - $this->setSafe($node, array()); + $this->setSafe($node, []); } } elseif ($node instanceof Twig_Node_Expression_GetAttr && $node->getNode('node') instanceof Twig_Node_Expression_Name) { $name = $node->getNode('node')->getAttribute('name'); if (in_array($name, $this->safeVars)) { - $this->setSafe($node, array('all')); + $this->setSafe($node, ['all']); } else { - $this->setSafe($node, array()); + $this->setSafe($node, []); } } else { - $this->setSafe($node, array()); + $this->setSafe($node, []); } return $node; @@ -123,7 +123,7 @@ final class Twig_NodeVisitor_SafeAnalysis extends Twig_BaseNodeVisitor private function intersectSafe(array $a = null, array $b = null) { if (null === $a || null === $b) { - return array(); + return []; } if (in_array('all', $a)) { diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php index 46ac722d..4d41ff6a 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php @@ -25,9 +25,9 @@ final class Twig_NodeVisitor_Sandbox extends Twig_BaseNodeVisitor { if ($node instanceof Twig_Node_Module) { $this->inAModule = true; - $this->tags = array(); - $this->filters = array(); - $this->functions = array(); + $this->tags = []; + $this->filters = []; + $this->functions = []; return $node; } elseif ($this->inAModule) { @@ -65,7 +65,7 @@ final class Twig_NodeVisitor_Sandbox extends Twig_BaseNodeVisitor if ($node instanceof Twig_Node_Module) { $this->inAModule = false; - $node->setNode('display_start', new Twig_Node(array(new Twig_Node_CheckSecurity($this->filters, $this->tags, $this->functions), $node->getNode('display_start')))); + $node->setNode('display_start', new Twig_Node([new Twig_Node_CheckSecurity($this->filters, $this->tags, $this->functions), $node->getNode('display_start')])); } return $node; diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Parser.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Parser.php index 4f1fb7bd..43c5ea0d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Parser.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Parser.php @@ -17,7 +17,7 @@ */ class Twig_Parser { - private $stack = array(); + private $stack = []; private $stream; private $parent; private $handlers; @@ -29,7 +29,7 @@ class Twig_Parser private $env; private $importedSymbols; private $traits; - private $embeddedTemplates = array(); + private $embeddedTemplates = []; private $varNameSalt = 0; public function __construct(Twig_Environment $env) @@ -50,7 +50,7 @@ class Twig_Parser // tag handlers if (null === $this->handlers) { - $this->handlers = array(); + $this->handlers = []; foreach ($this->env->getTokenParsers() as $handler) { $handler->setParser($this); @@ -69,12 +69,12 @@ class Twig_Parser $this->stream = $stream; $this->parent = null; - $this->blocks = array(); - $this->macros = array(); - $this->traits = array(); - $this->blockStack = array(); - $this->importedSymbols = array(array()); - $this->embeddedTemplates = array(); + $this->blocks = []; + $this->macros = []; + $this->traits = []; + $this->blockStack = []; + $this->importedSymbols = [[]]; + $this->embeddedTemplates = []; $this->varNameSalt = 0; try { @@ -95,7 +95,7 @@ class Twig_Parser throw $e; } - $node = new Twig_Node_Module(new Twig_Node_Body(array($body)), $this->parent, new Twig_Node($this->blocks), new Twig_Node($this->macros), new Twig_Node($this->traits), $this->embeddedTemplates, $stream->getSourceContext()); + $node = new Twig_Node_Module(new Twig_Node_Body([$body]), $this->parent, new Twig_Node($this->blocks), new Twig_Node($this->macros), new Twig_Node($this->traits), $this->embeddedTemplates, $stream->getSourceContext()); $traverser = new Twig_NodeTraverser($this->env, $this->visitors); @@ -112,7 +112,7 @@ class Twig_Parser public function subparse($test, $dropNeedle = false) { $lineno = $this->getCurrentToken()->getLine(); - $rv = array(); + $rv = []; while (!$this->stream->isEOF()) { switch ($this->getCurrentToken()->getType()) { case /* Twig_Token::TEXT_TYPE */ 0: @@ -144,7 +144,7 @@ class Twig_Parser return $rv[0]; } - return new Twig_Node($rv, array(), $lineno); + return new Twig_Node($rv, [], $lineno); } if (!isset($this->handlers[$token->getValue()])) { @@ -180,7 +180,7 @@ class Twig_Parser return $rv[0]; } - return new Twig_Node($rv, array(), $lineno); + return new Twig_Node($rv, [], $lineno); } public function getBlockStack() @@ -215,7 +215,7 @@ class Twig_Parser public function setBlock($name, Twig_Node_Block $value) { - $this->blocks[$name] = new Twig_Node_Body(array($value), array(), $value->getTemplateLine()); + $this->blocks[$name] = new Twig_Node_Body([$value], [], $value->getTemplateLine()); } public function hasMacro($name) @@ -252,7 +252,7 @@ class Twig_Parser public function addImportedSymbol($type, $alias, $name = null, Twig_Node_Expression $node = null) { - $this->importedSymbols[0][$type][$alias] = array('name' => $name, 'node' => $node); + $this->importedSymbols[0][$type][$alias] = ['name' => $name, 'node' => $node]; } public function getImportedSymbol($type, $alias) @@ -271,7 +271,7 @@ class Twig_Parser public function pushLocalScope() { - array_unshift($this->importedSymbols, array()); + array_unshift($this->importedSymbols, []); } public function popLocalScope() @@ -323,7 +323,11 @@ class Twig_Parser (!$node instanceof Twig_Node_Text && !$node instanceof Twig_Node_BlockReference && ($node instanceof Twig_NodeOutputInterface && !$node instanceof Twig_Node_Spaceless)) ) { if (false !== strpos((string) $node, chr(0xEF).chr(0xBB).chr(0xBF))) { - throw new Twig_Error_Syntax('A template that extends another one cannot start with a byte order mark (BOM); it must be removed.', $node->getTemplateLine(), $this->stream->getSourceContext()); + $t = substr($node->getAttribute('data'), 3); + if ('' === $t || ctype_space($t)) { + // bypass empty nodes starting with a BOM + return; + } } throw new Twig_Error_Syntax('A template that extends another one cannot include content outside Twig blocks. Did you forget to put the content inside a {% block %} tag?', $node->getTemplateLine(), $this->stream->getSourceContext()); @@ -346,6 +350,7 @@ class Twig_Parser if ($nested && $node instanceof Twig_Node_BlockReference) { //throw new Twig_Error_Syntax('A block definition cannot be nested under non-capturing nodes.', $node->getTemplateLine(), $this->stream->getSourceContext()); @trigger_error(sprintf('Nesting a block definition under a non-capturing node in "%s" at line %d is deprecated since version 2.5.0 and will become a syntax error in 3.0.', $this->stream->getSourceContext()->getName(), $node->getTemplateLine()), E_USER_DEPRECATED); + return; } @@ -356,7 +361,7 @@ class Twig_Parser // here, $nested means "being at the root level of a child template" // we need to discard the wrapping "Twig_Node" for the "body" node - $nested = $nested || get_class($node) !== 'Twig_Node'; + $nested = $nested || 'Twig_Node' !== get_class($node); foreach ($node as $k => $n) { if (null !== $n && null === $this->filterBodyNodes($n, $nested)) { $node->removeNode($k); diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php index cdcdea25..f6084b51 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php @@ -16,7 +16,7 @@ final class Twig_Profiler_Dumper_Blackfire { public function dump(Twig_Profiler_Profile $profile) { - $data = array(); + $data = []; $this->dumpProfile('main()', $profile, $data); $this->dumpChildren('main()', $profile, $data); @@ -52,17 +52,17 @@ EOF; private function dumpProfile($edge, Twig_Profiler_Profile $profile, &$data) { if (isset($data[$edge])) { - $data[$edge]['ct'] += 1; + ++$data[$edge]['ct']; $data[$edge]['wt'] += floor($profile->getDuration() * 1000000); $data[$edge]['mu'] += $profile->getMemoryUsage(); $data[$edge]['pmu'] += $profile->getPeakMemoryUsage(); } else { - $data[$edge] = array( + $data[$edge] = [ 'ct' => 1, 'wt' => floor($profile->getDuration() * 1000000), 'mu' => $profile->getMemoryUsage(), 'pmu' => $profile->getPeakMemoryUsage(), - ); + ]; } } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php index 7c2f791c..25989e20 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php @@ -14,12 +14,12 @@ */ final class Twig_Profiler_Dumper_Html extends Twig_Profiler_Dumper_Base { - private static $colors = array( + private static $colors = [ 'block' => '#dfd', 'macro' => '#ddf', 'template' => '#ffd', 'big' => '#d44', - ); + ]; public function dump(Twig_Profiler_Profile $profile) { diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php index 5a21dde2..8ce40fa9 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php @@ -18,7 +18,7 @@ class Twig_Profiler_Node_EnterProfile extends Twig_Node { public function __construct($extensionName, $type, $name, $varName) { - parent::__construct(array(), array('extension_name' => $extensionName, 'name' => $name, 'type' => $type, 'var_name' => $varName)); + parent::__construct([], ['extension_name' => $extensionName, 'name' => $name, 'type' => $type, 'var_name' => $varName]); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php index d1d6a7cc..bcb912dd 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php @@ -18,7 +18,7 @@ class Twig_Profiler_Node_LeaveProfile extends Twig_Node { public function __construct($varName) { - parent::__construct(array(), array('var_name' => $varName)); + parent::__construct([], ['var_name' => $varName]); } public function compile(Twig_Compiler $compiler) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php index 8b428e9e..e17b3683 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php @@ -30,22 +30,22 @@ final class Twig_Profiler_NodeVisitor_Profiler extends Twig_BaseNodeVisitor { if ($node instanceof Twig_Node_Module) { $varName = $this->getVarName(); - $node->setNode('display_start', new Twig_Node(array(new Twig_Profiler_Node_EnterProfile($this->extensionName, Twig_Profiler_Profile::TEMPLATE, $node->getTemplateName(), $varName), $node->getNode('display_start')))); - $node->setNode('display_end', new Twig_Node(array(new Twig_Profiler_Node_LeaveProfile($varName), $node->getNode('display_end')))); + $node->setNode('display_start', new Twig_Node([new Twig_Profiler_Node_EnterProfile($this->extensionName, Twig_Profiler_Profile::TEMPLATE, $node->getTemplateName(), $varName), $node->getNode('display_start')])); + $node->setNode('display_end', new Twig_Node([new Twig_Profiler_Node_LeaveProfile($varName), $node->getNode('display_end')])); } elseif ($node instanceof Twig_Node_Block) { $varName = $this->getVarName(); - $node->setNode('body', new Twig_Node_Body(array( + $node->setNode('body', new Twig_Node_Body([ new Twig_Profiler_Node_EnterProfile($this->extensionName, Twig_Profiler_Profile::BLOCK, $node->getAttribute('name'), $varName), $node->getNode('body'), new Twig_Profiler_Node_LeaveProfile($varName), - ))); + ])); } elseif ($node instanceof Twig_Node_Macro) { $varName = $this->getVarName(); - $node->setNode('body', new Twig_Node_Body(array( + $node->setNode('body', new Twig_Node_Body([ new Twig_Profiler_Node_EnterProfile($this->extensionName, Twig_Profiler_Profile::MACRO, $node->getAttribute('name'), $varName), $node->getNode('body'), new Twig_Profiler_Node_LeaveProfile($varName), - ))); + ])); } return $node; diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Profile.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Profile.php index 2177f609..1cc982cf 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Profile.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Profiler/Profile.php @@ -24,9 +24,9 @@ class Twig_Profiler_Profile implements IteratorAggregate, Serializable private $template; private $name; private $type; - private $starts = array(); - private $ends = array(); - private $profiles = array(); + private $starts = []; + private $ends = []; + private $profiles = []; public function __construct($template = 'main', $type = self::ROOT, $name = 'main') { @@ -80,7 +80,7 @@ class Twig_Profiler_Profile implements IteratorAggregate, Serializable return $this->profiles; } - public function addProfile(Twig_Profiler_Profile $profile) + public function addProfile(self $profile) { $this->profiles[] = $profile; } @@ -130,11 +130,11 @@ class Twig_Profiler_Profile implements IteratorAggregate, Serializable */ public function enter() { - $this->starts = array( + $this->starts = [ 'wt' => microtime(true), 'mu' => memory_get_usage(), 'pmu' => memory_get_peak_usage(), - ); + ]; } /** @@ -142,16 +142,16 @@ class Twig_Profiler_Profile implements IteratorAggregate, Serializable */ public function leave() { - $this->ends = array( + $this->ends = [ 'wt' => microtime(true), 'mu' => memory_get_usage(), 'pmu' => memory_get_peak_usage(), - ); + ]; } public function reset() { - $this->starts = $this->ends = $this->profiles = array(); + $this->starts = $this->ends = $this->profiles = []; $this->enter(); } @@ -162,7 +162,7 @@ class Twig_Profiler_Profile implements IteratorAggregate, Serializable public function serialize() { - return serialize(array($this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles)); + return serialize([$this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles]); } public function unserialize($data) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php index 175b2e4f..9c0d3522 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php @@ -22,7 +22,7 @@ final class Twig_Sandbox_SecurityPolicy implements Twig_Sandbox_SecurityPolicyIn private $allowedProperties; private $allowedFunctions; - public function __construct(array $allowedTags = array(), array $allowedFilters = array(), array $allowedMethods = array(), array $allowedProperties = array(), array $allowedFunctions = array()) + public function __construct(array $allowedTags = [], array $allowedFilters = [], array $allowedMethods = [], array $allowedProperties = [], array $allowedFunctions = []) { $this->allowedTags = $allowedTags; $this->allowedFilters = $allowedFilters; @@ -43,9 +43,9 @@ final class Twig_Sandbox_SecurityPolicy implements Twig_Sandbox_SecurityPolicyIn public function setAllowedMethods(array $methods) { - $this->allowedMethods = array(); + $this->allowedMethods = []; foreach ($methods as $class => $m) { - $this->allowedMethods[$class] = array_map('strtolower', is_array($m) ? $m : array($m)); + $this->allowedMethods[$class] = array_map('strtolower', is_array($m) ? $m : [$m]); } } @@ -107,7 +107,7 @@ final class Twig_Sandbox_SecurityPolicy implements Twig_Sandbox_SecurityPolicyIn $allowed = false; foreach ($this->allowedProperties as $class => $properties) { if ($obj instanceof $class) { - $allowed = in_array($property, is_array($properties) ? $properties : array($properties)); + $allowed = in_array($property, is_array($properties) ? $properties : [$properties]); break; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Template.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Template.php index dc70d784..8a1d7608 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Template.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Template.php @@ -28,15 +28,15 @@ abstract class Twig_Template const METHOD_CALL = 'method'; protected $parent; - protected $parents = array(); + protected $parents = []; protected $env; - protected $blocks = array(); - protected $traits = array(); + protected $blocks = []; + protected $traits = []; /** * @internal */ - protected $extensions = array(); + protected $extensions = []; public function __construct(Twig_Environment $env) { @@ -86,7 +86,7 @@ abstract class Twig_Template * * @param array $context * - * @return Twig_Template|false The parent template or false if there is no parent + * @return Twig_Template|Twig_TemplateWrapper|false The parent template or false if there is no parent * * @internal */ @@ -103,8 +103,8 @@ abstract class Twig_Template return false; } - if ($parent instanceof self) { - return $this->parents[$parent->getTemplateName()] = $parent; + if ($parent instanceof self || $parent instanceof Twig_TemplateWrapper) { + return $this->parents[$parent->getSourceContext()->getName()] = $parent; } if (!isset($this->parents[$parent])) { @@ -142,7 +142,7 @@ abstract class Twig_Template * * @internal */ - public function displayParentBlock($name, array $context, array $blocks = array()) + public function displayParentBlock($name, array $context, array $blocks = []) { if (isset($this->traits[$name])) { $this->traits[$name][0]->displayBlock($name, $context, $blocks, false); @@ -166,7 +166,7 @@ abstract class Twig_Template * * @internal */ - public function displayBlock($name, array $context, array $blocks = array(), $useBlocks = true) + public function displayBlock($name, array $context, array $blocks = [], $useBlocks = true, self $templateContext = null) { if ($useBlocks && isset($blocks[$name])) { $template = $blocks[$name][0]; @@ -204,11 +204,11 @@ abstract class Twig_Template throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e); } } elseif (false !== $parent = $this->getParent($context)) { - $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false); + $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false, $templateContext ?? $this); } elseif (isset($blocks[$name])) { - throw new Twig_Error_Runtime(sprintf('Block "%s" should not call parent() in "%s" as the block does not exist in the parent template "%s".', $name, $blocks[$name][0]->getTemplateName(), $this->getTemplateName()), -1, $blocks[$name][0]->getTemplateName()); + throw new Twig_Error_Runtime(sprintf('Block "%s" should not call parent() in "%s" as the block does not exist in the parent template "%s".', $name, $blocks[$name][0]->getTemplateName(), $this->getTemplateName()), -1, $blocks[$name][0]->getSourceContext()); } else { - throw new Twig_Error_Runtime(sprintf('Block "%s" on template "%s" does not exist.', $name, $this->getTemplateName()), -1, $this->getTemplateName()); + throw new Twig_Error_Runtime(sprintf('Block "%s" on template "%s" does not exist.', $name, $this->getTemplateName()), -1, ($templateContext ?? $this)->getSourceContext()); } } @@ -226,7 +226,7 @@ abstract class Twig_Template * * @internal */ - public function renderParentBlock($name, array $context, array $blocks = array()) + public function renderParentBlock($name, array $context, array $blocks = []) { ob_start(); $this->displayParentBlock($name, $context, $blocks); @@ -249,7 +249,7 @@ abstract class Twig_Template * * @internal */ - public function renderBlock($name, array $context, array $blocks = array(), $useBlocks = true) + public function renderBlock($name, array $context, array $blocks = [], $useBlocks = true) { ob_start(); $this->displayBlock($name, $context, $blocks, $useBlocks); @@ -271,7 +271,7 @@ abstract class Twig_Template * * @internal */ - public function hasBlock($name, array $context, array $blocks = array()) + public function hasBlock($name, array $context, array $blocks = []) { if (isset($blocks[$name])) { return $blocks[$name][0] instanceof self; @@ -301,7 +301,7 @@ abstract class Twig_Template * * @internal */ - public function getBlockNames(array $context, array $blocks = array()) + public function getBlockNames(array $context, array $blocks = []) { $names = array_merge(array_keys($blocks), array_keys($this->blocks)); @@ -319,11 +319,7 @@ abstract class Twig_Template return $this->env->resolveTemplate($template); } - if ($template instanceof self) { - return $template; - } - - if ($template instanceof Twig_TemplateWrapper) { + if ($template instanceof self || $template instanceof Twig_TemplateWrapper) { return $template; } @@ -362,7 +358,7 @@ abstract class Twig_Template return $this->blocks; } - public function display(array $context, array $blocks = array()) + public function display(array $context, array $blocks = []) { $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks)); } @@ -384,7 +380,7 @@ abstract class Twig_Template return ob_get_clean(); } - protected function displayWithErrorHandling(array $context, array $blocks = array()) + protected function displayWithErrorHandling(array $context, array $blocks = []) { try { $this->doDisplay($context, $blocks); @@ -412,7 +408,7 @@ abstract class Twig_Template * @param array $context An array of parameters to pass to the template * @param array $blocks An array of blocks to pass to the template */ - abstract protected function doDisplay(array $context, array $blocks = array()); + abstract protected function doDisplay(array $context, array $blocks = []); } class_alias('Twig_Template', 'Twig\Template', false); diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TemplateWrapper.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TemplateWrapper.php index 47481840..b0ff5a75 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TemplateWrapper.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TemplateWrapper.php @@ -38,9 +38,11 @@ final class Twig_TemplateWrapper * * @return string The rendered template */ - public function render($context = array()) + public function render($context = []) { - return $this->template->render($context); + // using func_get_args() allows to not expose the blocks argument + // as it should only be used by internal code + return $this->template->render($context, func_get_args()[1] ?? []); } /** @@ -48,9 +50,11 @@ final class Twig_TemplateWrapper * * @param array $context An array of parameters to pass to the template */ - public function display($context = array()) + public function display($context = []) { - $this->template->display($context); + // using func_get_args() allows to not expose the blocks argument + // as it should only be used by internal code + $this->template->display($context, func_get_args()[1] ?? []); } /** @@ -61,7 +65,7 @@ final class Twig_TemplateWrapper * * @return bool */ - public function hasBlock($name, $context = array()) + public function hasBlock($name, $context = []) { return $this->template->hasBlock($name, $context); } @@ -73,7 +77,7 @@ final class Twig_TemplateWrapper * * @return string[] An array of defined template block names */ - public function getBlockNames($context = array()) + public function getBlockNames($context = []) { return $this->template->getBlockNames($context); } @@ -86,7 +90,7 @@ final class Twig_TemplateWrapper * * @return string The rendered block */ - public function renderBlock($name, $context = array()) + public function renderBlock($name, $context = []) { $context = $this->env->mergeGlobals($context); $level = ob_get_level(); @@ -110,7 +114,7 @@ final class Twig_TemplateWrapper * @param string $name The block name to render * @param array $context An array of parameters to pass to the template */ - public function displayBlock($name, $context = array()) + public function displayBlock($name, $context = []) { $this->template->displayBlock($name, $this->env->mergeGlobals($context)); } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Test.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Test.php index fc6c59b0..b604e78d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Test.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Test.php @@ -23,6 +23,7 @@ class Twig_Test private $name; private $callable; private $options; + private $arguments = []; /** * Creates a template test. @@ -31,7 +32,7 @@ class Twig_Test * @param callable|null $callable A callable implementing the test. If null, you need to overwrite the "node_class" option to customize compilation. * @param array $options Options array */ - public function __construct(string $name, $callable = null, array $options = array()) + public function __construct(string $name, $callable = null, array $options = []) { if (__CLASS__ !== get_class($this)) { @trigger_error('Overriding '.__CLASS__.' is deprecated since version 2.4.0 and the class will be final in 3.0.', E_USER_DEPRECATED); @@ -39,12 +40,12 @@ class Twig_Test $this->name = $name; $this->callable = $callable; - $this->options = array_merge(array( + $this->options = array_merge([ 'is_variadic' => false, 'node_class' => 'Twig_Node_Expression_Test', 'deprecated' => false, 'alternative' => null, - ), $options); + ], $options); } public function getName() @@ -67,6 +68,16 @@ class Twig_Test return $this->options['node_class']; } + public function setArguments($arguments) + { + $this->arguments = $arguments; + } + + public function getArguments() + { + return $this->arguments; + } + public function isVariadic() { return $this->options['is_variadic']; diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php index 2f032309..566ef3fe 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php @@ -29,7 +29,7 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase */ protected function getRuntimeLoaders() { - return array(); + return []; } /** @@ -37,7 +37,7 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase */ protected function getExtensions() { - return array(); + return []; } /** @@ -45,7 +45,7 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase */ protected function getTwigFilters() { - return array(); + return []; } /** @@ -53,7 +53,7 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase */ protected function getTwigFunctions() { - return array(); + return []; } /** @@ -61,7 +61,7 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase */ protected function getTwigTests() { - return array(); + return []; } /** @@ -84,7 +84,7 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase public function getTests($name, $legacyTests = false) { $fixturesDir = realpath($this->getFixturesDir()); - $tests = array(); + $tests = []; foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($fixturesDir), RecursiveIteratorIterator::LEAVES_ONLY) as $file) { if (!preg_match('/\.test$/', $file)) { @@ -103,7 +103,7 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase $deprecation = $match[3]; $templates = self::parseTemplates($match[4]); $exception = $match[6]; - $outputs = array(array(null, $match[5], null, '')); + $outputs = [[null, $match[5], null, '']]; } elseif (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*(?:--DEPRECATION--\s*(.*?))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)--DATA--.*?--EXPECT--.*/s', $test, $match)) { $message = $match[1]; $condition = $match[2]; @@ -115,12 +115,12 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase throw new InvalidArgumentException(sprintf('Test "%s" is not valid.', str_replace($fixturesDir.'/', '', $file))); } - $tests[] = array(str_replace($fixturesDir.'/', '', $file), $message, $condition, $templates, $exception, $outputs, $deprecation); + $tests[] = [str_replace($fixturesDir.'/', '', $file), $message, $condition, $templates, $exception, $outputs, $deprecation]; } if ($legacyTests && empty($tests)) { // add a dummy test to avoid a PHPUnit message - return array(array('not', '-', '', array(), '', array())); + return [['not', '-', '', [], '', []]]; } return $tests; @@ -147,10 +147,10 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase $loader = new Twig_Loader_Array($templates); foreach ($outputs as $i => $match) { - $config = array_merge(array( + $config = array_merge([ 'cache' => false, 'strict_variables' => true, - ), $match[2] ? eval($match[2].';') : array()); + ], $match[2] ? eval($match[2].';') : []); $twig = new Twig_Environment($loader, $config); $twig->addGlobal('global', 'global'); foreach ($this->getRuntimeLoaders() as $runtimeLoader) { @@ -178,13 +178,15 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase $p->setAccessible(true); $p->setValue($twig, '__TwigTemplate_'.hash('sha256', uniqid(mt_rand(), true), false).'_'); - $deprecations = array(); + $deprecations = []; try { - $prevHandler = set_error_handler(function ($type, $msg, $file, $line, $context = array()) use (&$deprecations, &$prevHandler) { + $prevHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$deprecations, &$prevHandler) { if (E_USER_DEPRECATED === $type) { $deprecations[] = $msg; + return true; } + return $prevHandler ? $prevHandler($type, $msg, $file, $line, $context) : false; }); @@ -242,7 +244,7 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase protected static function parseTemplates($test) { - $templates = array(); + $templates = []; preg_match_all('/--TEMPLATE(?:\((.*?)\))?--(.*?)(?=\-\-TEMPLATE|$)/s', $test, $matches, PREG_SET_ORDER); foreach ($matches as $match) { $templates[($match[1] ? $match[1] : 'index.twig')] = $match[2]; diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php index 158682c8..f4ba0585 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php @@ -42,7 +42,7 @@ abstract class Twig_Test_NodeTestCase extends TestCase protected function getEnvironment() { - return new Twig_Environment(new Twig_Loader_Array(array())); + return new Twig_Environment(new Twig_Loader_Array([])); } protected function getVariableGetter($name, $line = false) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php index 73dd09a9..789f9dce 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php @@ -30,7 +30,7 @@ final class Twig_TokenParser_AutoEscape extends Twig_TokenParser } $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); return new Twig_Node_AutoEscape($value, $body, $lineno, $this->getTag()); diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Block.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Block.php index 7da0a43f..16593611 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Block.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Block.php @@ -30,12 +30,12 @@ final class Twig_TokenParser_Block extends Twig_TokenParser if ($this->parser->hasBlock($name)) { throw new Twig_Error_Syntax(sprintf("The block '%s' has already been defined line %d.", $name, $this->parser->getBlock($name)->getTemplateLine()), $stream->getCurrent()->getLine(), $stream->getSourceContext()); } - $this->parser->setBlock($name, $block = new Twig_Node_Block($name, new Twig_Node(array()), $lineno)); + $this->parser->setBlock($name, $block = new Twig_Node_Block($name, new Twig_Node([]), $lineno)); $this->parser->pushLocalScope(); $this->parser->pushBlockStack($name); if ($stream->nextIf(/* Twig_Token::BLOCK_END_TYPE */ 3)) { - $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); if ($token = $stream->nextIf(/* Twig_Token::NAME_TYPE */ 5)) { $value = $token->getValue(); @@ -44,9 +44,9 @@ final class Twig_TokenParser_Block extends Twig_TokenParser } } } else { - $body = new Twig_Node(array( + $body = new Twig_Node([ new Twig_Node_Print($this->parser->getExpressionParser()->parseExpression(), $lineno), - )); + ]); } $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Embed.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Embed.php index e0f10bbd..273d823f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Embed.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Embed.php @@ -30,14 +30,14 @@ final class Twig_TokenParser_Embed extends Twig_TokenParser_Include } // inject a fake parent to make the parent() function work - $stream->injectTokens(array( + $stream->injectTokens([ new Twig_Token(/* Twig_Token::BLOCK_START_TYPE */ 1, '', $token->getLine()), new Twig_Token(/* Twig_Token::NAME_TYPE */ 5, 'extends', $token->getLine()), $parentToken, new Twig_Token(/* Twig_Token::BLOCK_END_TYPE */ 3, '', $token->getLine()), - )); + ]); - $module = $this->parser->parse($stream, array($this, 'decideBlockEnd'), true); + $module = $this->parser->parse($stream, [$this, 'decideBlockEnd'], true); // override the parent with the correct one if ($fakeParentToken === $parentToken) { diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Filter.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Filter.php index acada499..2dc45e36 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Filter.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Filter.php @@ -28,7 +28,7 @@ final class Twig_TokenParser_Filter extends Twig_TokenParser $filter = $this->parser->getExpressionParser()->parseFilterExpressionRaw($ref, $this->getTag()); $this->parser->getStream()->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); $this->parser->getStream()->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); $block = new Twig_Node_Block($name, $body, $token->getLine()); diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/For.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/For.php index 68d03fdf..fb869000 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/For.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/For.php @@ -37,10 +37,10 @@ final class Twig_TokenParser_For extends Twig_TokenParser } $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse(array($this, 'decideForFork')); + $body = $this->parser->subparse([$this, 'decideForFork']); if ('else' == $stream->next()->getValue()) { $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); - $else = $this->parser->subparse(array($this, 'decideForEnd'), true); + $else = $this->parser->subparse([$this, 'decideForEnd'], true); } else { $else = null; } @@ -67,7 +67,7 @@ final class Twig_TokenParser_For extends Twig_TokenParser public function decideForFork(Twig_Token $token) { - return $token->test(array('else', 'endfor')); + return $token->test(['else', 'endfor']); } public function decideForEnd(Twig_Token $token) @@ -97,7 +97,7 @@ final class Twig_TokenParser_For extends Twig_TokenParser { if ($node instanceof Twig_Node_Expression_GetAttr && $node->getNode('node') instanceof Twig_Node_Expression_Name && 'loop' == $node->getNode('node')->getAttribute('name')) { $attribute = $node->getNode('attribute'); - if ($attribute instanceof Twig_Node_Expression_Constant && in_array($attribute->getAttribute('value'), array('length', 'revindex0', 'revindex', 'last'))) { + if ($attribute instanceof Twig_Node_Expression_Constant && in_array($attribute->getAttribute('value'), ['length', 'revindex0', 'revindex', 'last'])) { throw new Twig_Error_Syntax(sprintf('The "loop.%s" variable is not defined when looping with a condition.', $attribute->getAttribute('value')), $node->getTemplateLine(), $stream->getSourceContext()); } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/From.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/From.php index 4a2935e1..b57b20aa 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/From.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/From.php @@ -24,7 +24,7 @@ final class Twig_TokenParser_From extends Twig_TokenParser $stream = $this->parser->getStream(); $stream->expect('import'); - $targets = array(); + $targets = []; do { $name = $stream->expect(/* Twig_Token::NAME_TYPE */ 5)->getValue(); diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/If.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/If.php index 77f9499d..8b206905 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/If.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/If.php @@ -31,8 +31,8 @@ final class Twig_TokenParser_If extends Twig_TokenParser $expr = $this->parser->getExpressionParser()->parseExpression(); $stream = $this->parser->getStream(); $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse(array($this, 'decideIfFork')); - $tests = array($expr, $body); + $body = $this->parser->subparse([$this, 'decideIfFork']); + $tests = [$expr, $body]; $else = null; $end = false; @@ -40,13 +40,13 @@ final class Twig_TokenParser_If extends Twig_TokenParser switch ($stream->next()->getValue()) { case 'else': $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); - $else = $this->parser->subparse(array($this, 'decideIfEnd')); + $else = $this->parser->subparse([$this, 'decideIfEnd']); break; case 'elseif': $expr = $this->parser->getExpressionParser()->parseExpression(); $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse(array($this, 'decideIfFork')); + $body = $this->parser->subparse([$this, 'decideIfFork']); $tests[] = $expr; $tests[] = $body; break; @@ -67,12 +67,12 @@ final class Twig_TokenParser_If extends Twig_TokenParser public function decideIfFork(Twig_Token $token) { - return $token->test(array('elseif', 'else', 'endif')); + return $token->test(['elseif', 'else', 'endif']); } public function decideIfEnd(Twig_Token $token) { - return $token->test(array('endif')); + return $token->test(['endif']); } public function getTag() diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Include.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Include.php index a887bea8..53d8c12d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Include.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Include.php @@ -53,7 +53,7 @@ class Twig_TokenParser_Include extends Twig_TokenParser $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); - return array($variables, $only, $ignoreMissing); + return [$variables, $only, $ignoreMissing]; } public function getTag() diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Macro.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Macro.php index 1182b681..315ed517 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Macro.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Macro.php @@ -30,7 +30,7 @@ final class Twig_TokenParser_Macro extends Twig_TokenParser $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); $this->parser->pushLocalScope(); - $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); if ($token = $stream->nextIf(/* Twig_Token::NAME_TYPE */ 5)) { $value = $token->getValue(); @@ -41,7 +41,7 @@ final class Twig_TokenParser_Macro extends Twig_TokenParser $this->parser->popLocalScope(); $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); - $this->parser->setMacro($name, new Twig_Node_Macro($name, new Twig_Node_Body(array($body)), $arguments, $lineno, $this->getTag())); + $this->parser->setMacro($name, new Twig_Node_Macro($name, new Twig_Node_Body([$body]), $arguments, $lineno, $this->getTag())); } public function decideBlockEnd(Twig_Token $token) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php index f7d963ed..495b72a9 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php @@ -26,7 +26,7 @@ final class Twig_TokenParser_Sandbox extends Twig_TokenParser { $stream = $this->parser->getStream(); $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); // in a sandbox tag, only include tags are allowed diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Set.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Set.php index 0d3012c8..cdc61d74 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Set.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Set.php @@ -52,7 +52,7 @@ final class Twig_TokenParser_Set extends Twig_TokenParser $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); - $values = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + $values = $this->parser->subparse([$this, 'decideBlockEnd'], true); $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php index 2c081bcf..fda4c4f3 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php @@ -29,7 +29,7 @@ final class Twig_TokenParser_Spaceless extends Twig_TokenParser $lineno = $token->getLine(); $this->parser->getStream()->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse(array($this, 'decideSpacelessEnd'), true); + $body = $this->parser->subparse([$this, 'decideSpacelessEnd'], true); $this->parser->getStream()->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); return new Twig_Node_Spaceless($body, $lineno, $this->getTag()); diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Use.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Use.php index efab1527..9de07ba1 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Use.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/Use.php @@ -34,7 +34,7 @@ final class Twig_TokenParser_Use extends Twig_TokenParser throw new Twig_Error_Syntax('The template references in a "use" statement must be a string.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); } - $targets = array(); + $targets = []; if ($stream->nextIf('with')) { do { $name = $stream->expect(/* Twig_Token::NAME_TYPE */ 5)->getValue(); @@ -54,7 +54,7 @@ final class Twig_TokenParser_Use extends Twig_TokenParser $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); - $this->parser->addTrait(new Twig_Node(array('template' => $template, 'targets' => new Twig_Node($targets)))); + $this->parser->addTrait(new Twig_Node(['template' => $template, 'targets' => new Twig_Node($targets)])); return new Twig_Node(); } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/With.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/With.php index 6f002cfb..2b0f95f2 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/With.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/TokenParser/With.php @@ -29,7 +29,7 @@ final class Twig_TokenParser_With extends Twig_TokenParser $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse(array($this, 'decideWithEnd'), true); + $body = $this->parser->subparse([$this, 'decideWithEnd'], true); $stream->expect(/* Twig_Token::BLOCK_END_TYPE */ 3); diff --git a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php index c3971eff..6959a412 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php @@ -49,7 +49,7 @@ final class Twig_Util_DeprecationCollector */ public function collect(Traversable $iterator) { - $deprecations = array(); + $deprecations = []; set_error_handler(function ($type, $msg) use (&$deprecations) { if (E_USER_DEPRECATED === $type) { $deprecations[] = $msg; diff --git a/src/cadolesuser-1.0/vendor/twig/twig/src/Extension/GlobalsInterface.php b/src/cadolesuser-1.0/vendor/twig/twig/src/Extension/GlobalsInterface.php index 024f314d..c170068a 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/src/Extension/GlobalsInterface.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/src/Extension/GlobalsInterface.php @@ -5,7 +5,7 @@ namespace Twig\Extension; class_exists('Twig_Extension_GlobalsInterface'); if (\false) { - interface GlobalsInterface extends \Twig_Extension_ExtensionInterface + interface GlobalsInterface extends \Twig_Extension_GlobalsInterface { } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Cache/FilesystemTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Cache/FilesystemTest.php index ab1e6d64..2b7093a0 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Cache/FilesystemTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Cache/FilesystemTest.php @@ -174,20 +174,20 @@ class Twig_Tests_Cache_FilesystemTest extends \PHPUnit\Framework\TestCase { $pattern = '#a/b/[a-zA-Z0-9]+/[a-zA-Z0-9]+.php$#'; - return array( - array($pattern, 'a/b'), - array($pattern, 'a/b/'), - array($pattern, 'a/b\\'), - array($pattern, 'a/b\\/'), - array($pattern, 'a/b\\//'), - array('#/'.substr($pattern, 1), '/a/b'), - ); + return [ + [$pattern, 'a/b'], + [$pattern, 'a/b/'], + [$pattern, 'a/b\\'], + [$pattern, 'a/b\\/'], + [$pattern, 'a/b\\//'], + ['#/'.substr($pattern, 1), '/a/b'], + ]; } private function generateSource() { - return strtr(' $this->classname, - )); + ]); } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/CompilerTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/CompilerTest.php index 4d4b8df9..62f2c36c 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/CompilerTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/CompilerTest.php @@ -20,7 +20,7 @@ class Twig_Tests_CompilerTest extends \PHPUnit\Framework\TestCase $this->markTestSkipped('Your platform does not support locales.'); } - $required_locales = array('fr_FR.UTF-8', 'fr_FR.UTF8', 'fr_FR.utf-8', 'fr_FR.utf8', 'French_France.1252'); + $required_locales = ['fr_FR.UTF-8', 'fr_FR.UTF8', 'fr_FR.utf-8', 'fr_FR.utf8', 'French_France.1252']; if (false === setlocale(LC_NUMERIC, $required_locales)) { $this->markTestSkipped('Could not set any of required locales: '.implode(', ', $required_locales)); } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/CustomExtensionTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/CustomExtensionTest.php index 313b790d..0ab44cc7 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/CustomExtensionTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/CustomExtensionTest.php @@ -30,10 +30,10 @@ class CustomExtensionTest extends \PHPUnit\Framework\TestCase public function provideInvalidExtensions() { - return array( - array(new InvalidOperatorExtension(new stdClass()), '"InvalidOperatorExtension::getOperators()" must return an array with operators, got "stdClass".'), - array(new InvalidOperatorExtension(array(1, 2, 3)), '"InvalidOperatorExtension::getOperators()" must return an array of 2 elements, got 3.'), - ); + return [ + [new InvalidOperatorExtension(new stdClass()), '"InvalidOperatorExtension::getOperators()" must return an array with operators, got "stdClass".'], + [new InvalidOperatorExtension([1, 2, 3]), '"InvalidOperatorExtension::getOperators()" must return an array of 2 elements, got 3.'], + ]; } } @@ -48,27 +48,27 @@ class InvalidOperatorExtension implements Twig_ExtensionInterface public function getTokenParsers() { - return array(); + return []; } public function getNodeVisitors() { - return array(); + return []; } public function getFilters() { - return array(); + return []; } public function getTests() { - return array(); + return []; } public function getFunctions() { - return array(); + return []; } public function getOperators() diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php index dfb7c8c4..2a5da404 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php @@ -13,19 +13,19 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase { public function testAutoescapeOption() { - $loader = new Twig_Loader_Array(array( + $loader = new Twig_Loader_Array([ 'html' => '{{ foo }} {{ foo }}', 'js' => '{{ bar }} {{ bar }}', - )); + ]); - $twig = new Twig_Environment($loader, array( + $twig = new Twig_Environment($loader, [ 'debug' => true, 'cache' => false, - 'autoescape' => array($this, 'escapingStrategyCallback'), - )); + 'autoescape' => [$this, 'escapingStrategyCallback'], + ]); - $this->assertEquals('foo<br/ > foo<br/ >', $twig->render('html', array('foo' => 'foo
    '))); - $this->assertEquals('foo\u003Cbr\/\u0020\u003E foo\u003Cbr\/\u0020\u003E', $twig->render('js', array('bar' => 'foo
    '))); + $this->assertEquals('foo<br/ > foo<br/ >', $twig->render('html', ['foo' => 'foo
    '])); + $this->assertEquals('foo\u003Cbr\/\u0020\u003E foo\u003Cbr\/\u0020\u003E', $twig->render('js', ['bar' => 'foo
    '])); } public function escapingStrategyCallback($name) @@ -65,7 +65,7 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase $this->assertEquals('bar', $globals['foo']); // globals can be modified after extensions and a template has been loaded - $arrayLoader = new Twig_Loader_Array(array('index' => '{{foo}}')); + $arrayLoader = new Twig_Loader_Array(['index' => '{{foo}}']); $twig = new Twig_Environment($arrayLoader); $twig->addGlobal('foo', 'foo'); $twig->getGlobals(); @@ -79,7 +79,7 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase $twig->getGlobals(); $twig->addGlobal('foo', 'bar'); $template = $twig->loadTemplate('index'); - $this->assertEquals('bar', $template->render(array())); + $this->assertEquals('bar', $template->render([])); // globals cannot be added after a template has been loaded $twig = new Twig_Environment($loader); @@ -132,10 +132,10 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase public function testExtensionsAreNotInitializedWhenRenderingACompiledTemplate() { $cache = new Twig_Cache_Filesystem($dir = sys_get_temp_dir().'/twig'); - $options = array('cache' => $cache, 'auto_reload' => false, 'debug' => false); + $options = ['cache' => $cache, 'auto_reload' => false, 'debug' => false]; // force compilation - $twig = new Twig_Environment($loader = new Twig_Loader_Array(array('index' => '{{ foo }}')), $options); + $twig = new Twig_Environment($loader = new Twig_Loader_Array(['index' => '{{ foo }}']), $options); $key = $cache->generateKey('index', $twig->getTemplateClass('index')); $cache->write($key, $twig->compileSource(new Twig_Source('{{ foo }}', 'index'))); @@ -143,15 +143,15 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase // check that extensions won't be initialized when rendering a template that is already in the cache $twig = $this ->getMockBuilder('Twig_Environment') - ->setConstructorArgs(array($loader, $options)) - ->setMethods(array('initExtensions')) + ->setConstructorArgs([$loader, $options]) + ->setMethods(['initExtensions']) ->getMock() ; $twig->expects($this->never())->method('initExtensions'); // render template - $output = $twig->render('index', array('foo' => 'bar')); + $output = $twig->render('index', ['foo' => 'bar']); $this->assertEquals('bar', $output); Twig_Tests_FilesystemHelper::removeDir($dir); @@ -164,7 +164,7 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase $cache = $this->getMockBuilder('Twig_CacheInterface')->getMock(); $loader = $this->getMockLoader($templateName, $templateContent); - $twig = new Twig_Environment($loader, array('cache' => $cache, 'auto_reload' => true, 'debug' => false)); + $twig = new Twig_Environment($loader, ['cache' => $cache, 'auto_reload' => true, 'debug' => false]); // Cache miss: getTimestamp returns 0 and as a result the load() is // skipped. @@ -191,7 +191,7 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase $cache = $this->getMockBuilder('Twig_CacheInterface')->getMock(); $loader = $this->getMockLoader($templateName, $templateContent); - $twig = new Twig_Environment($loader, array('cache' => $cache, 'auto_reload' => true, 'debug' => false)); + $twig = new Twig_Environment($loader, ['cache' => $cache, 'auto_reload' => true, 'debug' => false]); $now = time(); @@ -219,7 +219,7 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase $cache = $this->getMockBuilder('Twig_CacheInterface')->getMock(); $loader = $this->getMockLoader($templateName, $templateContent); - $twig = new Twig_Environment($loader, array('cache' => $cache, 'auto_reload' => true, 'debug' => false)); + $twig = new Twig_Environment($loader, ['cache' => $cache, 'auto_reload' => true, 'debug' => false]); $now = time(); @@ -280,7 +280,7 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase { $extension = $this->getMockBuilder('Twig_ExtensionInterface')->getMock(); - $loader = new Twig_Loader_Array(array('page' => 'hey')); + $loader = new Twig_Loader_Array(['page' => 'hey']); $twig = new Twig_Environment($loader); $twig->addExtension($extension); @@ -319,14 +319,14 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase $runtimeLoader = $this->getMockBuilder('Twig_RuntimeLoaderInterface')->getMock(); $runtimeLoader->expects($this->any())->method('load')->will($this->returnValue(new Twig_Tests_EnvironmentTest_Runtime())); - $loader = new Twig_Loader_Array(array( + $loader = new Twig_Loader_Array([ 'func_array' => '{{ from_runtime_array("foo") }}', 'func_array_default' => '{{ from_runtime_array() }}', 'func_array_named_args' => '{{ from_runtime_array(name="foo") }}', 'func_string' => '{{ from_runtime_string("foo") }}', 'func_string_default' => '{{ from_runtime_string() }}', 'func_string_named_args' => '{{ from_runtime_string(name="foo") }}', - )); + ]); $twig = new Twig_Environment($loader); $twig->addExtension(new Twig_Tests_EnvironmentTest_ExtensionWithoutRuntime()); @@ -347,7 +347,7 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase public function testFailLoadTemplate() { $template = 'testFailLoadTemplate.twig'; - $twig = new Twig_Environment(new Twig_Loader_Array(array($template => false))); + $twig = new Twig_Environment(new Twig_Loader_Array([$template => false])); //$twig->setCache(new CorruptCache()); $twig->loadTemplate($template, 'abc'); } @@ -358,9 +358,9 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase */ public function testFailLoadTemplateOnCircularReference() { - $twig = new Twig_Environment(new Twig_Loader_Array(array( + $twig = new Twig_Environment(new Twig_Loader_Array([ 'base.html.twig' => '{% extends "base.html.twig" %}', - ))); + ])); $twig->loadTemplate('base.html.twig'); } @@ -371,10 +371,10 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase */ public function testFailLoadTemplateOnComplexCircularReference() { - $twig = new Twig_Environment(new Twig_Loader_Array(array( + $twig = new Twig_Environment(new Twig_Loader_Array([ 'base1.html.twig' => '{% extends "base2.html.twig" %}', 'base2.html.twig' => '{% extends "base1.html.twig" %}', - ))); + ])); $twig->loadTemplate('base1.html.twig'); } @@ -420,9 +420,9 @@ class Twig_Tests_EnvironmentTest_Extension_WithGlobals extends Twig_Extension { public function getGlobals() { - return array( + return [ 'foo_global' => 'foo_global', - ); + ]; } } @@ -430,52 +430,52 @@ class Twig_Tests_EnvironmentTest_Extension extends Twig_Extension implements Twi { public function getTokenParsers() { - return array( + return [ new Twig_Tests_EnvironmentTest_TokenParser(), - ); + ]; } public function getNodeVisitors() { - return array( + return [ new Twig_Tests_EnvironmentTest_NodeVisitor(), - ); + ]; } public function getFilters() { - return array( + return [ new Twig_Filter('foo_filter'), - ); + ]; } public function getTests() { - return array( + return [ new Twig_Test('foo_test'), - ); + ]; } public function getFunctions() { - return array( + return [ new Twig_Function('foo_function'), - ); + ]; } public function getOperators() { - return array( - array('foo_unary' => array()), - array('foo_binary' => array()), - ); + return [ + ['foo_unary' => []], + ['foo_binary' => []], + ]; } public function getGlobals() { - return array( + return [ 'foo_global' => 'foo_global', - ); + ]; } } class_alias('Twig_Tests_EnvironmentTest_Extension', 'Twig\Tests\EnvironmentTest\Extension', false); @@ -528,10 +528,10 @@ class Twig_Tests_EnvironmentTest_ExtensionWithoutRuntime extends Twig_Extension { public function getFunctions() { - return array( - new Twig_Function('from_runtime_array', array('Twig_Tests_EnvironmentTest_Runtime', 'fromRuntime')), + return [ + new Twig_Function('from_runtime_array', ['Twig_Tests_EnvironmentTest_Runtime', 'fromRuntime']), new Twig_Function('from_runtime_string', 'Twig_Tests_EnvironmentTest_Runtime::fromRuntime'), - ); + ]; } public function getName() diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/ErrorTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/ErrorTest.php index c2beb0e5..4ca1b5a7 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/ErrorTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/ErrorTest.php @@ -22,14 +22,14 @@ class Twig_Tests_ErrorTest extends \PHPUnit\Framework\TestCase public function testErrorWithArrayFilename() { $error = new Twig_Error('foo'); - $error->setSourceContext(new Twig_Source('', array('foo' => 'bar'))); + $error->setSourceContext(new Twig_Source('', ['foo' => 'bar'])); $this->assertEquals('foo in {"foo":"bar"}', $error->getMessage()); } public function testTwigExceptionGuessWithMissingVarAndArrayLoader() { - $loader = new Twig_Loader_Array(array( + $loader = new Twig_Loader_Array([ 'base.html' => '{% block content %}{% endblock %}', 'index.html' => << true, 'debug' => true, 'cache' => false)); + $twig = new Twig_Environment($loader, ['strict_variables' => true, 'debug' => true, 'cache' => false]); $template = $twig->loadTemplate('index.html'); try { - $template->render(array()); + $template->render([]); $this->fail(); } catch (Twig_Error_Runtime $e) { @@ -58,7 +58,7 @@ EOHTML public function testTwigExceptionGuessWithExceptionAndArrayLoader() { - $loader = new Twig_Loader_Array(array( + $loader = new Twig_Loader_Array([ 'base.html' => '{% block content %}{% endblock %}', 'index.html' => << true, 'debug' => true, 'cache' => false)); + ]); + $twig = new Twig_Environment($loader, ['strict_variables' => true, 'debug' => true, 'cache' => false]); $template = $twig->loadTemplate('index.html'); try { - $template->render(array('foo' => new Twig_Tests_ErrorTest_Foo())); + $template->render(['foo' => new Twig_Tests_ErrorTest_Foo()]); $this->fail(); } catch (Twig_Error_Runtime $e) { @@ -87,11 +87,11 @@ EOHTML public function testTwigExceptionGuessWithMissingVarAndFilesystemLoader() { $loader = new Twig_Loader_Filesystem(__DIR__.'/Fixtures/errors'); - $twig = new Twig_Environment($loader, array('strict_variables' => true, 'debug' => true, 'cache' => false)); + $twig = new Twig_Environment($loader, ['strict_variables' => true, 'debug' => true, 'cache' => false]); $template = $twig->loadTemplate('index.html'); try { - $template->render(array()); + $template->render([]); $this->fail(); } catch (Twig_Error_Runtime $e) { @@ -106,11 +106,11 @@ EOHTML public function testTwigExceptionGuessWithExceptionAndFilesystemLoader() { $loader = new Twig_Loader_Filesystem(__DIR__.'/Fixtures/errors'); - $twig = new Twig_Environment($loader, array('strict_variables' => true, 'debug' => true, 'cache' => false)); + $twig = new Twig_Environment($loader, ['strict_variables' => true, 'debug' => true, 'cache' => false]); $template = $twig->loadTemplate('index.html'); try { - $template->render(array('foo' => new Twig_Tests_ErrorTest_Foo())); + $template->render(['foo' => new Twig_Tests_ErrorTest_Foo()]); $this->fail(); } catch (Twig_Error_Runtime $e) { @@ -128,12 +128,12 @@ EOHTML public function testTwigExceptionAddsFileAndLine($templates, $name, $line) { $loader = new Twig_Loader_Array($templates); - $twig = new Twig_Environment($loader, array('strict_variables' => true, 'debug' => true, 'cache' => false)); + $twig = new Twig_Environment($loader, ['strict_variables' => true, 'debug' => true, 'cache' => false]); $template = $twig->loadTemplate('index'); try { - $template->render(array()); + $template->render([]); $this->fail(); } catch (Twig_Error_Runtime $e) { @@ -143,7 +143,7 @@ EOHTML } try { - $template->render(array('foo' => new Twig_Tests_ErrorTest_Foo())); + $template->render(['foo' => new Twig_Tests_ErrorTest_Foo()]); $this->fail(); } catch (Twig_Error_Runtime $e) { @@ -155,39 +155,39 @@ EOHTML public function getErroredTemplates() { - return array( + return [ // error occurs in a template - array( - array( + [ + [ 'index' => "\n\n{{ foo.bar }}\n\n\n{{ 'foo' }}", - ), + ], 'index', 3, - ), + ], // error occurs in an included template - array( - array( + [ + [ 'index' => "{% include 'partial' %}", 'partial' => '{{ foo.bar }}', - ), + ], 'partial', 1, - ), + ], // error occurs in a parent block when called via parent() - array( - array( + [ + [ 'index' => "{% extends 'base' %} {% block content %} {{ parent() }} {% endblock %}", 'base' => '{% block content %}{{ foo.bar }}{% endblock %}', - ), + ], 'base', 1, - ), + ], // error occurs in a block from the child - array( - array( + [ + [ 'index' => "{% extends 'base' %} {% block content %} {{ foo.bar }} @@ -196,10 +196,10 @@ EOHTML {{ foo.bar }} {% endblock %}", 'base' => '{% block content %}{% endblock %}', - ), + ], 'index', 3, - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php index 3a173f03..e5497b63 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php @@ -17,7 +17,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testCanOnlyAssignToNames($template) { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source($template, 'index'))); @@ -25,20 +25,20 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase public function getFailingTestsForAssignment() { - return array( - array('{% set false = "foo" %}'), - array('{% set FALSE = "foo" %}'), - array('{% set true = "foo" %}'), - array('{% set TRUE = "foo" %}'), - array('{% set none = "foo" %}'), - array('{% set NONE = "foo" %}'), - array('{% set null = "foo" %}'), - array('{% set NULL = "foo" %}'), - array('{% set 3 = "foo" %}'), - array('{% set 1 + 2 = "foo" %}'), - array('{% set "bar" = "foo" %}'), - array('{% set %}{% endset %}'), - ); + return [ + ['{% set false = "foo" %}'], + ['{% set FALSE = "foo" %}'], + ['{% set true = "foo" %}'], + ['{% set TRUE = "foo" %}'], + ['{% set none = "foo" %}'], + ['{% set NONE = "foo" %}'], + ['{% set null = "foo" %}'], + ['{% set NULL = "foo" %}'], + ['{% set 3 = "foo" %}'], + ['{% set 1 + 2 = "foo" %}'], + ['{% set "bar" = "foo" %}'], + ['{% set %}{% endset %}'], + ]; } /** @@ -46,7 +46,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testArrayExpression($template, $expected) { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $stream = $env->tokenize(new Twig_Source($template, '')); $parser = new Twig_Parser($env); @@ -59,7 +59,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testArraySyntaxError($template) { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source($template, 'index'))); @@ -67,86 +67,86 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase public function getFailingTestsForArray() { - return array( - array('{{ [1, "a": "b"] }}'), - array('{{ {"a": "b", 2} }}'), - ); + return [ + ['{{ [1, "a": "b"] }}'], + ['{{ {"a": "b", 2} }}'], + ]; } public function getTestsForArray() { - return array( + return [ // simple array - array('{{ [1, 2] }}', new Twig_Node_Expression_Array(array( + ['{{ [1, 2] }}', new Twig_Node_Expression_Array([ new Twig_Node_Expression_Constant(0, 1), new Twig_Node_Expression_Constant(1, 1), new Twig_Node_Expression_Constant(1, 1), new Twig_Node_Expression_Constant(2, 1), - ), 1), - ), + ], 1), + ], // array with trailing , - array('{{ [1, 2, ] }}', new Twig_Node_Expression_Array(array( + ['{{ [1, 2, ] }}', new Twig_Node_Expression_Array([ new Twig_Node_Expression_Constant(0, 1), new Twig_Node_Expression_Constant(1, 1), new Twig_Node_Expression_Constant(1, 1), new Twig_Node_Expression_Constant(2, 1), - ), 1), - ), + ], 1), + ], // simple hash - array('{{ {"a": "b", "b": "c"} }}', new Twig_Node_Expression_Array(array( + ['{{ {"a": "b", "b": "c"} }}', new Twig_Node_Expression_Array([ new Twig_Node_Expression_Constant('a', 1), new Twig_Node_Expression_Constant('b', 1), new Twig_Node_Expression_Constant('b', 1), new Twig_Node_Expression_Constant('c', 1), - ), 1), - ), + ], 1), + ], // hash with trailing , - array('{{ {"a": "b", "b": "c", } }}', new Twig_Node_Expression_Array(array( + ['{{ {"a": "b", "b": "c", } }}', new Twig_Node_Expression_Array([ new Twig_Node_Expression_Constant('a', 1), new Twig_Node_Expression_Constant('b', 1), new Twig_Node_Expression_Constant('b', 1), new Twig_Node_Expression_Constant('c', 1), - ), 1), - ), + ], 1), + ], // hash in an array - array('{{ [1, {"a": "b", "b": "c"}] }}', new Twig_Node_Expression_Array(array( + ['{{ [1, {"a": "b", "b": "c"}] }}', new Twig_Node_Expression_Array([ new Twig_Node_Expression_Constant(0, 1), new Twig_Node_Expression_Constant(1, 1), new Twig_Node_Expression_Constant(1, 1), - new Twig_Node_Expression_Array(array( + new Twig_Node_Expression_Array([ new Twig_Node_Expression_Constant('a', 1), new Twig_Node_Expression_Constant('b', 1), new Twig_Node_Expression_Constant('b', 1), new Twig_Node_Expression_Constant('c', 1), - ), 1), - ), 1), - ), + ], 1), + ], 1), + ], // array in a hash - array('{{ {"a": [1, 2], "b": "c"} }}', new Twig_Node_Expression_Array(array( + ['{{ {"a": [1, 2], "b": "c"} }}', new Twig_Node_Expression_Array([ new Twig_Node_Expression_Constant('a', 1), - new Twig_Node_Expression_Array(array( + new Twig_Node_Expression_Array([ new Twig_Node_Expression_Constant(0, 1), new Twig_Node_Expression_Constant(1, 1), new Twig_Node_Expression_Constant(1, 1), new Twig_Node_Expression_Constant(2, 1), - ), 1), + ], 1), new Twig_Node_Expression_Constant('b', 1), new Twig_Node_Expression_Constant('c', 1), - ), 1), - ), - ); + ], 1), + ], + ]; } /** @@ -154,7 +154,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testStringExpressionDoesNotConcatenateTwoConsecutiveStrings() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false, 'optimizations' => 0)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false, 'optimizations' => 0]); $stream = $env->tokenize(new Twig_Source('{{ "a" "b" }}', 'index')); $parser = new Twig_Parser($env); @@ -166,7 +166,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testStringExpression($template, $expected) { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false, 'optimizations' => 0)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false, 'optimizations' => 0]); $stream = $env->tokenize(new Twig_Source($template, '')); $parser = new Twig_Parser($env); @@ -175,18 +175,18 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase public function getTestsForString() { - return array( - array( + return [ + [ '{{ "foo" }}', new Twig_Node_Expression_Constant('foo', 1), - ), - array( + ], + [ '{{ "foo #{bar}" }}', new Twig_Node_Expression_Binary_Concat( new Twig_Node_Expression_Constant('foo ', 1), new Twig_Node_Expression_Name('bar', 1), 1 ), - ), - array( + ], + [ '{{ "foo #{bar} baz" }}', new Twig_Node_Expression_Binary_Concat( new Twig_Node_Expression_Binary_Concat( new Twig_Node_Expression_Constant('foo ', 1), @@ -196,9 +196,9 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase new Twig_Node_Expression_Constant(' baz', 1), 1 ), - ), + ], - array( + [ '{{ "foo #{"foo #{bar} baz"} baz" }}', new Twig_Node_Expression_Binary_Concat( new Twig_Node_Expression_Binary_Concat( new Twig_Node_Expression_Constant('foo ', 1), @@ -216,8 +216,8 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase new Twig_Node_Expression_Constant(' baz', 1), 1 ), - ), - ); + ], + ]; } /** @@ -225,7 +225,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testAttributeCallDoesNotSupportNamedArguments() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source('{{ foo.bar(name="Foo") }}', 'index'))); @@ -236,7 +236,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testMacroCallDoesNotSupportNamedArguments() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source('{% from _self import foo %}{% macro foo() %}{% endmacro %}{{ foo(name="Foo") }}', 'index'))); @@ -248,7 +248,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testMacroDefinitionDoesNotSupportNonNameVariableName() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source('{% macro foo("a") %}{% endmacro %}', 'index'))); @@ -261,7 +261,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testMacroDefinitionDoesNotSupportNonConstantDefaultValues($template) { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source($template, 'index'))); @@ -269,10 +269,10 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase public function getMacroDefinitionDoesNotSupportNonConstantDefaultValues() { - return array( - array('{% macro foo(name = "a #{foo} a") %}{% endmacro %}'), - array('{% macro foo(name = [["b", "a #{foo} a"]]) %}{% endmacro %}'), - ); + return [ + ['{% macro foo(name = "a #{foo} a") %}{% endmacro %}'], + ['{% macro foo(name = [["b", "a #{foo} a"]]) %}{% endmacro %}'], + ]; } /** @@ -280,7 +280,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testMacroDefinitionSupportsConstantDefaultValues($template) { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source($template, 'index'))); @@ -292,15 +292,15 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase public function getMacroDefinitionSupportsConstantDefaultValues() { - return array( - array('{% macro foo(name = "aa") %}{% endmacro %}'), - array('{% macro foo(name = 12) %}{% endmacro %}'), - array('{% macro foo(name = true) %}{% endmacro %}'), - array('{% macro foo(name = ["a"]) %}{% endmacro %}'), - array('{% macro foo(name = [["a"]]) %}{% endmacro %}'), - array('{% macro foo(name = {a: "a"}) %}{% endmacro %}'), - array('{% macro foo(name = {a: {b: "a"}}) %}{% endmacro %}'), - ); + return [ + ['{% macro foo(name = "aa") %}{% endmacro %}'], + ['{% macro foo(name = 12) %}{% endmacro %}'], + ['{% macro foo(name = true) %}{% endmacro %}'], + ['{% macro foo(name = ["a"]) %}{% endmacro %}'], + ['{% macro foo(name = [["a"]]) %}{% endmacro %}'], + ['{% macro foo(name = {a: "a"}) %}{% endmacro %}'], + ['{% macro foo(name = {a: {b: "a"}}) %}{% endmacro %}'], + ]; } /** @@ -309,7 +309,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testUnknownFunction() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source('{{ cycl() }}', 'index'))); @@ -321,7 +321,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testUnknownFunctionWithoutSuggestions() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source('{{ foobar() }}', 'index'))); @@ -333,7 +333,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testUnknownFilter() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source('{{ 1|lowe }}', 'index'))); @@ -345,7 +345,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testUnknownFilterWithoutSuggestions() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source('{{ 1|foobar }}', 'index'))); @@ -357,7 +357,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testUnknownTest() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $stream = $env->tokenize(new Twig_Source('{{ 1 is nul }}', 'index')); $parser->parse($stream); @@ -369,7 +369,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testUnknownTestWithoutSuggestions() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source('{{ 1 is foobar }}', 'index'))); diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php index 9a4d6d1f..b05d000f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php @@ -25,36 +25,36 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase public function getRandomFunctionTestData() { - return array( - array(// array - array('apple', 'orange', 'citrus'), - array('apple', 'orange', 'citrus'), - ), - array(// Traversable - new ArrayObject(array('apple', 'orange', 'citrus')), - array('apple', 'orange', 'citrus'), - ), - array(// unicode string + return [ + [// array + ['apple', 'orange', 'citrus'], + ['apple', 'orange', 'citrus'], + ], + [// Traversable + new ArrayObject(['apple', 'orange', 'citrus']), + ['apple', 'orange', 'citrus'], + ], + [// unicode string 'Ä€é', - array('Ä', '€', 'é'), - ), - array(// numeric but string + ['Ä', '€', 'é'], + ], + [// numeric but string '123', - array('1', '2', '3'), - ), - array(// integer + ['1', '2', '3'], + ], + [// integer 5, range(0, 5, 1), - ), - array(// float + ], + [// float 5.9, range(0, 5, 1), - ), - array(// negative + ], + [// negative -2, - array(0, -1, -2), - ), - ); + [0, -1, -2], + ], + ]; } public function testRandomFunctionWithoutParameter() @@ -70,7 +70,7 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase public function testRandomFunctionReturnsAsIs() { $this->assertSame('', twig_random(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()), '')); - $this->assertSame('', twig_random(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('charset' => null)), '')); + $this->assertSame('', twig_random(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['charset' => null]), '')); $instance = new stdClass(); $this->assertSame($instance, twig_random(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()), $instance)); @@ -81,7 +81,7 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase */ public function testRandomFunctionOfEmptyArrayThrowsException() { - twig_random(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()), array()); + twig_random(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()), []); } public function testRandomFunctionOnNonUTF8String() @@ -92,7 +92,7 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase $text = iconv('UTF-8', 'ISO-8859-1', 'Äé'); for ($i = 0; $i < 30; ++$i) { $rand = twig_random($twig, $text); - $this->assertTrue(in_array(iconv('ISO-8859-1', 'UTF-8', $rand), array('Ä', 'é'), true)); + $this->assertTrue(in_array(iconv('ISO-8859-1', 'UTF-8', $rand), ['Ä', 'é'], true)); } } @@ -120,11 +120,11 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase public function provideCustomEscaperCases() { - return array( - array('fooUTF-8', 'foo', 'foo'), - array('UTF-8', null, 'foo'), - array('42UTF-8', 42, 'foo'), - ); + return [ + ['fooUTF-8', 'foo', 'foo'], + ['UTF-8', null, 'foo'], + ['42UTF-8', 42, 'foo'], + ]; } /** @@ -146,15 +146,15 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase public function provideTwigFirstCases() { - $i = array(1 => 'a', 2 => 'b', 3 => 'c'); + $i = [1 => 'a', 2 => 'b', 3 => 'c']; - return array( - array('a', 'abc'), - array(1, array(1, 2, 3)), - array('', null), - array('', ''), - array('a', new CoreTestIterator($i, array_keys($i), true, 3)), - ); + return [ + ['a', 'abc'], + [1, [1, 2, 3]], + ['', null], + ['', ''], + ['a', new CoreTestIterator($i, array_keys($i), true, 3)], + ]; } /** @@ -168,15 +168,15 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase public function provideTwigLastCases() { - $i = array(1 => 'a', 2 => 'b', 3 => 'c'); + $i = [1 => 'a', 2 => 'b', 3 => 'c']; - return array( - array('c', 'abc'), - array(3, array(1, 2, 3)), - array('', null), - array('', ''), - array('c', new CoreTestIterator($i, array_keys($i), true)), - ); + return [ + ['c', 'abc'], + [3, [1, 2, 3]], + ['', null], + ['', ''], + ['c', new CoreTestIterator($i, array_keys($i), true)], + ]; } /** @@ -189,17 +189,17 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase public function provideArrayKeyCases() { - $array = array('a' => 'a1', 'b' => 'b1', 'c' => 'c1'); + $array = ['a' => 'a1', 'b' => 'b1', 'c' => 'c1']; $keys = array_keys($array); - return array( - array($keys, $array), - array($keys, new CoreTestIterator($array, $keys)), - array($keys, new CoreTestIteratorAggregate($array, $keys)), - array($keys, new CoreTestIteratorAggregateAggregate($array, $keys)), - array(array(), null), - array(array('a'), new SimpleXMLElement('')), - ); + return [ + [$keys, $array], + [$keys, new CoreTestIterator($array, $keys)], + [$keys, new CoreTestIteratorAggregate($array, $keys)], + [$keys, new CoreTestIteratorAggregateAggregate($array, $keys)], + [[], null], + [['a'], new SimpleXMLElement('')], + ]; } /** @@ -212,22 +212,22 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase public function provideInFilterCases() { - $array = array(1, 2, 'a' => 3, 5, 6, 7); + $array = [1, 2, 'a' => 3, 5, 6, 7]; $keys = array_keys($array); - return array( - array(true, 1, $array), - array(true, '3', $array), - array(true, '3', 'abc3def'), - array(true, 1, new CoreTestIterator($array, $keys, true, 1)), - array(true, '3', new CoreTestIterator($array, $keys, true, 3)), - array(true, '3', new CoreTestIteratorAggregateAggregate($array, $keys, true, 3)), - array(false, 4, $array), - array(false, 4, new CoreTestIterator($array, $keys, true)), - array(false, 4, new CoreTestIteratorAggregateAggregate($array, $keys, true)), - array(false, 1, 1), - array(true, 'b', new SimpleXMLElement('b')), - ); + return [ + [true, 1, $array], + [true, '3', $array], + [true, '3', 'abc3def'], + [true, 1, new CoreTestIterator($array, $keys, true, 1)], + [true, '3', new CoreTestIterator($array, $keys, true, 3)], + [true, '3', new CoreTestIteratorAggregateAggregate($array, $keys, true, 3)], + [false, 4, $array], + [false, 4, new CoreTestIterator($array, $keys, true)], + [false, 4, new CoreTestIteratorAggregateAggregate($array, $keys, true)], + [false, 1, 1], + [true, 'b', new SimpleXMLElement('b')], + ]; } /** @@ -241,23 +241,23 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase public function provideSliceFilterCases() { - $i = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4); + $i = ['a' => 1, 'b' => 2, 'c' => 3, 'd' => 4]; $keys = array_keys($i); - return array( - array(array('a' => 1), $i, 0, 1, true), - array(array('a' => 1), $i, 0, 1, false), - array(array('b' => 2, 'c' => 3), $i, 1, 2), - array(array(1), array(1, 2, 3, 4), 0, 1), - array(array(2, 3), array(1, 2, 3, 4), 1, 2), - array(array(2, 3), new CoreTestIterator($i, $keys, true), 1, 2), - array(array('c' => 3, 'd' => 4), new CoreTestIteratorAggregate($i, $keys, true), 2, null, true), - array($i, new CoreTestIterator($i, $keys, true), 0, count($keys) + 10, true), - array(array(), new CoreTestIterator($i, $keys, true), count($keys) + 10), - array('de', 'abcdef', 3, 2), - array(array(), new SimpleXMLElement('12'), 3), - array(array(), new ArrayIterator(array(1, 2)), 3), - ); + return [ + [['a' => 1], $i, 0, 1, true], + [['a' => 1], $i, 0, 1, false], + [['b' => 2, 'c' => 3], $i, 1, 2], + [[1], [1, 2, 3, 4], 0, 1], + [[2, 3], [1, 2, 3, 4], 1, 2], + [[2, 3], new CoreTestIterator($i, $keys, true), 1, 2], + [['c' => 3, 'd' => 4], new CoreTestIteratorAggregate($i, $keys, true), 2, null, true], + [$i, new CoreTestIterator($i, $keys, true), 0, count($keys) + 10, true], + [[], new CoreTestIterator($i, $keys, true), count($keys) + 10], + ['de', 'abcdef', 3, 2], + [[], new SimpleXMLElement('12'), 3], + [[], new ArrayIterator([1, 2]), 3], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php index 20443aab..aef39c32 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php @@ -16,13 +16,13 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase protected function setUp() { - self::$params = array( + self::$params = [ 'name' => 'Fabien', 'obj' => new FooObject(), - 'arr' => array('obj' => new FooObject()), - ); + 'arr' => ['obj' => new FooObject()], + ]; - self::$templates = array( + self::$templates = [ '1_basic1' => '{{ obj.foo }}', '1_basic2' => '{{ name|upper }}', '1_basic3' => '{% if name %}foo{% endif %}', @@ -37,7 +37,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase '1_child' => "{% extends \"1_layout\" %}\n{% block content %}\n{{ \"a\"|json_encode }}\n{% endblock %}", '1_include' => '{{ include("1_basic1", sandboxed=true) }}', '1_range_operator' => '{{ (1..2)[0] }}', - ); + ]; } /** @@ -46,19 +46,19 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase */ public function testSandboxWithInheritance() { - $twig = $this->getEnvironment(true, array(), self::$templates, array('block')); - $twig->loadTemplate('1_child')->render(array()); + $twig = $this->getEnvironment(true, [], self::$templates, ['block']); + $twig->loadTemplate('1_child')->render([]); } public function testSandboxGloballySet() { - $twig = $this->getEnvironment(false, array(), self::$templates); + $twig = $this->getEnvironment(false, [], self::$templates); $this->assertEquals('FOO', $twig->loadTemplate('1_basic')->render(self::$params), 'Sandbox does nothing if it is disabled globally'); } public function testSandboxUnallowedMethodAccessor() { - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('1_basic1')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception if an unallowed method is called'); @@ -71,7 +71,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxUnallowedFilter() { - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('1_basic2')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception if an unallowed filter is called'); @@ -83,7 +83,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxUnallowedTag() { - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('1_basic3')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception if an unallowed tag is used in the template'); @@ -95,7 +95,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxUnallowedProperty() { - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('1_basic4')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception if an unallowed property is called in the template'); @@ -108,7 +108,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxUnallowedToString() { - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('1_basic5')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception if an unallowed method (__toString()) is called in the template'); @@ -121,7 +121,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxUnallowedToStringArray() { - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('1_basic6')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception if an unallowed method (__toString()) is called in the template'); @@ -134,7 +134,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxUnallowedFunction() { - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('1_basic7')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception if an unallowed function is called in the template'); @@ -146,7 +146,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxUnallowedRangeOperator() { - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('1_range_operator')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception if the unallowed range operator is called'); @@ -158,7 +158,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxAllowMethodFoo() { - $twig = $this->getEnvironment(true, array(), self::$templates, array(), array(), array('FooObject' => 'foo')); + $twig = $this->getEnvironment(true, [], self::$templates, [], [], ['FooObject' => 'foo']); FooObject::reset(); $this->assertEquals('foo', $twig->loadTemplate('1_basic1')->render(self::$params), 'Sandbox allow some methods'); $this->assertEquals(1, FooObject::$called['foo'], 'Sandbox only calls method once'); @@ -166,7 +166,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxAllowMethodToString() { - $twig = $this->getEnvironment(true, array(), self::$templates, array(), array(), array('FooObject' => '__toString')); + $twig = $this->getEnvironment(true, [], self::$templates, [], [], ['FooObject' => '__toString']); FooObject::reset(); $this->assertEquals('foo', $twig->loadTemplate('1_basic5')->render(self::$params), 'Sandbox allow some methods'); $this->assertEquals(1, FooObject::$called['__toString'], 'Sandbox only calls method once'); @@ -174,7 +174,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxAllowMethodToStringDisabled() { - $twig = $this->getEnvironment(false, array(), self::$templates); + $twig = $this->getEnvironment(false, [], self::$templates); FooObject::reset(); $this->assertEquals('foo', $twig->loadTemplate('1_basic5')->render(self::$params), 'Sandbox allows __toString when sandbox disabled'); $this->assertEquals(1, FooObject::$called['__toString'], 'Sandbox only calls method once'); @@ -182,38 +182,38 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxAllowFilter() { - $twig = $this->getEnvironment(true, array(), self::$templates, array(), array('upper')); + $twig = $this->getEnvironment(true, [], self::$templates, [], ['upper']); $this->assertEquals('FABIEN', $twig->loadTemplate('1_basic2')->render(self::$params), 'Sandbox allow some filters'); } public function testSandboxAllowTag() { - $twig = $this->getEnvironment(true, array(), self::$templates, array('if')); + $twig = $this->getEnvironment(true, [], self::$templates, ['if']); $this->assertEquals('foo', $twig->loadTemplate('1_basic3')->render(self::$params), 'Sandbox allow some tags'); } public function testSandboxAllowProperty() { - $twig = $this->getEnvironment(true, array(), self::$templates, array(), array(), array(), array('FooObject' => 'bar')); + $twig = $this->getEnvironment(true, [], self::$templates, [], [], [], ['FooObject' => 'bar']); $this->assertEquals('bar', $twig->loadTemplate('1_basic4')->render(self::$params), 'Sandbox allow some properties'); } public function testSandboxAllowFunction() { - $twig = $this->getEnvironment(true, array(), self::$templates, array(), array(), array(), array(), array('cycle')); + $twig = $this->getEnvironment(true, [], self::$templates, [], [], [], [], ['cycle']); $this->assertEquals('bar', $twig->loadTemplate('1_basic7')->render(self::$params), 'Sandbox allow some functions'); } public function testSandboxAllowRangeOperator() { - $twig = $this->getEnvironment(true, array(), self::$templates, array(), array(), array(), array(), array('range')); + $twig = $this->getEnvironment(true, [], self::$templates, [], [], [], [], ['range']); $this->assertEquals('1', $twig->loadTemplate('1_range_operator')->render(self::$params), 'Sandbox allow the range operator'); } public function testSandboxAllowFunctionsCaseInsensitive() { - foreach (array('getfoobar', 'getFoobar', 'getFooBar') as $name) { - $twig = $this->getEnvironment(true, array(), self::$templates, array(), array(), array('FooObject' => $name)); + foreach (['getfoobar', 'getFoobar', 'getFooBar'] as $name) { + $twig = $this->getEnvironment(true, [], self::$templates, [], [], ['FooObject' => $name]); FooObject::reset(); $this->assertEquals('foobarfoobar', $twig->loadTemplate('1_basic8')->render(self::$params), 'Sandbox allow methods in a case-insensitive way'); $this->assertEquals(2, FooObject::$called['getFooBar'], 'Sandbox only calls method once'); @@ -224,20 +224,20 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxLocallySetForAnInclude() { - self::$templates = array( + self::$templates = [ '2_basic' => '{{ obj.foo }}{% include "2_included" %}{{ obj.foo }}', '2_included' => '{% if obj.foo %}{{ obj.foo|upper }}{% endif %}', - ); + ]; - $twig = $this->getEnvironment(false, array(), self::$templates); + $twig = $this->getEnvironment(false, [], self::$templates); $this->assertEquals('fooFOOfoo', $twig->loadTemplate('2_basic')->render(self::$params), 'Sandbox does nothing if disabled globally and sandboxed not used for the include'); - self::$templates = array( + self::$templates = [ '3_basic' => '{{ obj.foo }}{% sandbox %}{% include "3_included" %}{% endsandbox %}{{ obj.foo }}', '3_included' => '{% if obj.foo %}{{ obj.foo|upper }}{% endif %}', - ); + ]; - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('3_basic')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception when the included file is sandboxed'); @@ -249,21 +249,21 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testMacrosInASandbox() { - $twig = $this->getEnvironment(true, array('autoescape' => 'html'), array('index' => <<getEnvironment(true, ['autoescape' => 'html'], ['index' => <<{{ text }}

    {% endmacro %} {{- macros.test('username') }} EOF - ), array('macro', 'import'), array('escape')); + ], ['macro', 'import'], ['escape']); - $this->assertEquals('

    username

    ', $twig->loadTemplate('index')->render(array())); + $this->assertEquals('

    username

    ', $twig->loadTemplate('index')->render([])); } public function testSandboxDisabledAfterIncludeFunctionError() { - $twig = $this->getEnvironment(false, array(), self::$templates); + $twig = $this->getEnvironment(false, [], self::$templates); $e = null; try { @@ -277,10 +277,10 @@ EOF $this->assertFalse($twig->getExtension('Twig_Extension_Sandbox')->isSandboxed(), 'Sandboxed include() function call should not leave Sandbox enabled when an error occurs.'); } - protected function getEnvironment($sandboxed, $options, $templates, $tags = array(), $filters = array(), $methods = array(), $properties = array(), $functions = array()) + protected function getEnvironment($sandboxed, $options, $templates, $tags = [], $filters = [], $methods = [], $properties = [], $functions = []) { $loader = new Twig_Loader_Array($templates); - $twig = new Twig_Environment($loader, array_merge(array('debug' => true, 'cache' => false, 'autoescape' => false), $options)); + $twig = new Twig_Environment($loader, array_merge(['debug' => true, 'cache' => false, 'autoescape' => false], $options)); $policy = new Twig_Sandbox_SecurityPolicy($tags, $filters, $methods, $properties, $functions); $twig->addExtension(new Twig_Extension_Sandbox($policy, $sandboxed)); @@ -290,13 +290,13 @@ EOF class FooObject { - public static $called = array('__toString' => 0, 'foo' => 0, 'getFooBar' => 0); + public static $called = ['__toString' => 0, 'foo' => 0, 'getFooBar' => 0]; public $bar = 'bar'; public static function reset() { - self::$called = array('__toString' => 0, 'foo' => 0, 'getFooBar' => 0); + self::$called = ['__toString' => 0, 'foo' => 0, 'getFooBar' => 0]; } public function __toString() diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/FactoryRuntimeLoaderTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/FactoryRuntimeLoaderTest.php index f97d3069..e8fc01e2 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/FactoryRuntimeLoaderTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/FactoryRuntimeLoaderTest.php @@ -13,7 +13,7 @@ class Twig_Tests_FactoryRuntimeLoaderTest extends \PHPUnit\Framework\TestCase { public function testLoad() { - $loader = new Twig_FactoryRuntimeLoader(array('stdClass' => 'getRuntime')); + $loader = new Twig_FactoryRuntimeLoader(['stdClass' => 'getRuntime']); $this->assertInstanceOf('stdClass', $loader->load('stdClass')); } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/FileExtensionEscapingStrategyTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/FileExtensionEscapingStrategyTest.php index a983a47c..6cdff00f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/FileExtensionEscapingStrategyTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/FileExtensionEscapingStrategyTest.php @@ -21,31 +21,31 @@ class Twig_Tests_FileExtensionEscapingStrategyTest extends \PHPUnit\Framework\Te public function getGuessData() { - return array( + return [ // default - array('html', 'foo.html'), - array('html', 'foo.html.twig'), - array('html', 'foo'), - array('html', 'foo.bar.twig'), - array('html', 'foo.txt/foo'), - array('html', 'foo.txt/foo.js/'), + ['html', 'foo.html'], + ['html', 'foo.html.twig'], + ['html', 'foo'], + ['html', 'foo.bar.twig'], + ['html', 'foo.txt/foo'], + ['html', 'foo.txt/foo.js/'], // css - array('css', 'foo.css'), - array('css', 'foo.css.twig'), - array('css', 'foo.twig.css'), - array('css', 'foo.js.css'), - array('css', 'foo.js.css.twig'), + ['css', 'foo.css'], + ['css', 'foo.css.twig'], + ['css', 'foo.twig.css'], + ['css', 'foo.js.css'], + ['css', 'foo.js.css.twig'], // js - array('js', 'foo.js'), - array('js', 'foo.js.twig'), - array('js', 'foo.txt/foo.js'), - array('js', 'foo.txt.twig/foo.js'), + ['js', 'foo.js'], + ['js', 'foo.js.twig'], + ['js', 'foo.txt/foo.js'], + ['js', 'foo.txt.twig/foo.js'], // txt - array(false, 'foo.txt'), - array(false, 'foo.txt.twig'), - ); + [false, 'foo.txt'], + [false, 'foo.txt.twig'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/block.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/block.test index 1290973a..a80b80c3 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/block.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/block.test @@ -14,8 +14,8 @@ blocks and autoescape {% set _content = block('content')|raw %} {{ _content|raw }} --DATA-- -return array('br' => '
    ') +return ['br' => '
    '] --CONFIG-- -return array('autoescape' => 'name') +return ['autoescape' => 'name'] --EXPECT-- <br /> diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/name.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/name.test index 98e89399..5ad573cf 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/name.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/name.test @@ -12,9 +12,9 @@ --TEMPLATE(index.txt.twig)-- {{ br -}} --DATA-- -return array('br' => '
    ') +return ['br' => '
    '] --CONFIG-- -return array('autoescape' => 'name') +return ['autoescape' => 'name'] --EXPECT-- <br /> \u003Cbr\u0020\/\u003E diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable.test index 7ff2eedb..8bb3c5f2 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable.test @@ -13,6 +13,6 @@ Exception for multiline array with undefined variable foo2: foo2, } %} --DATA-- -return array('foobar' => 'foobar') +return ['foobar' => 'foobar'] --EXCEPTION-- Twig_Error_Runtime: Variable "foo2" does not exist in "index.twig" at line 11. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable_again.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable_again.test index c425069b..5ef5e490 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable_again.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable_again.test @@ -13,6 +13,6 @@ Exception for multiline array with undefined variable foo2: foo2, } %} --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Runtime: Variable "foobar" does not exist in "index.twig" at line 7. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_function_with_undefined_variable.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_function_with_undefined_variable.test index 2f94a5ee..07b82c0c 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_function_with_undefined_variable.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_function_with_undefined_variable.test @@ -7,6 +7,6 @@ Exception for multile function with undefined variable --TEMPLATE(foo)-- Foo --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Runtime: Variable "with_context" does not exist in "index.twig" at line 3. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_tag_with_undefined_variable.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_tag_with_undefined_variable.test index 7b3b1daf..74803c09 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_tag_with_undefined_variable.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_tag_with_undefined_variable.test @@ -7,6 +7,6 @@ Exception for multiline tag with undefined variable --TEMPLATE(foo)-- Foo --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Runtime: Variable "vars" does not exist in "index.twig" at line 3. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/undefined_template_in_child_template.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/undefined_template_in_child_template.test index 1992510b..1f23723d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/undefined_template_in_child_template.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/undefined_template_in_child_template.test @@ -10,6 +10,6 @@ Exception for an undefined template in a child template {% block sidebar %} {% endblock %} --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Loader: Template "include.twig" is not defined in "index.twig" at line 5. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/_self.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/_self.test index 32fed8fd..fb88f4c8 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/_self.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/_self.test @@ -3,6 +3,6 @@ _self returns the template name --TEMPLATE-- {{ _self }} --DATA-- -return array() +return [] --EXPECT-- index.twig diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array.test index da567a63..bd0107f8 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array.test @@ -46,7 +46,7 @@ Twig supports array notation {{ does_not_exist[0].does_not_exist_either|default('ok') }} {{ does_not_exist[0]['does_not_exist_either']|default('ok') }} --DATA-- -return array('bar' => 'bar', 'foo' => array('bar' => 'bar'), 'array_access' => new ArrayObject(array('a' => 'b'))) +return ['bar' => 'bar', 'foo' => ['bar' => 'bar'], 'array_access' => new ArrayObject(['a' => 'b'])] --EXPECT-- 1,2 foo,bar @@ -74,9 +74,9 @@ ok ok ok --DATA-- -return array('bar' => 'bar', 'foo' => array('bar' => 'bar'), 'array_access' => new ArrayObject(array('a' => 'b'))) +return ['bar' => 'bar', 'foo' => ['bar' => 'bar'], 'array_access' => new ArrayObject(['a' => 'b'])] --CONFIG-- -return array('strict_variables' => false) +return ['strict_variables' => false] --EXPECT-- 1,2 foo,bar diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array_call.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array_call.test index f3df328f..8c7a2ee7 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array_call.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array_call.test @@ -6,7 +6,7 @@ Twig supports method calls {{ items[foo] }} {{ items[items[foo]] }} --DATA-- -return array('foo' => 'bar', 'items' => array('foo' => 'bar', 'bar' => 'foo')) +return ['foo' => 'bar', 'items' => ['foo' => 'bar', 'bar' => 'foo']] --EXPECT-- bar bar diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/binary.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/binary.test index f5e68456..b4e8be58 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/binary.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/binary.test @@ -22,7 +22,7 @@ Twig supports binary operations (+, -, *, /, ~, %, and, or) {{ foo ~ bar }} {{ 20 // 7 }} --DATA-- -return array('foo' => 'bar', 'bar' => 'foo') +return ['foo' => 'bar', 'bar' => 'foo'] --EXPECT-- 2 1 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/bitwise.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/bitwise.test index 74fe6cab..c2bda1cc 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/bitwise.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/bitwise.test @@ -6,7 +6,7 @@ Twig supports bitwise operations {{ 1 b-xor 5 }} {{ (1 and 0 b-or 0) is same as(1 and (0 b-or 0)) ? 'ok' : 'ko' }} --DATA-- -return array() +return [] --EXPECT-- 1 5 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/comparison.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/comparison.test index 726b8507..2811634f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/comparison.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/comparison.test @@ -6,7 +6,7 @@ Twig supports comparison operators (==, !=, <, >, >=, <=) {{ 1 == 1 }}/{{ 1 == 2 }} {{ 1 != 1 }}/{{ 1 != 2 }} --DATA-- -return array() +return [] --EXPECT-- ///1 1//1/1 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/divisibleby.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/divisibleby.test index 238dd279..f1bf5681 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/divisibleby.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/divisibleby.test @@ -9,7 +9,7 @@ Twig supports the "divisible by" operator by (3) ? 'OK' }} --DATA-- -return array() +return [] --EXPECT-- OK OK diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/dotdot.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/dotdot.test index 9cd0676c..0efa9305 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/dotdot.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/dotdot.test @@ -11,7 +11,7 @@ Twig supports the .. operator {% for i in 0 + 1 .. 10 - 1 %}{{ i }} {% endfor %} --DATA-- -return array('foo' => array(1, 10)) +return ['foo' => [1, 10]] --EXPECT-- 0 1 2 3 4 5 6 7 8 9 10 a b c d e f g h i j k l m n o p q r s t u v w x y z diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ends_with.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ends_with.test index 9ad5e5e8..c8086d6d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ends_with.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ends_with.test @@ -12,7 +12,7 @@ Twig supports the "ends with" operator {{ false ends with false ? 'OK' : 'KO' }} {{ false ends with '' ? 'OK' : 'KO' }} --DATA-- -return array() +return [] --EXPECT-- OK OK diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/grouping.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/grouping.test index 79f8e0b0..069ebf79 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/grouping.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/grouping.test @@ -3,6 +3,6 @@ Twig supports grouping of expressions --TEMPLATE-- {{ (2 + 2) / 2 }} --DATA-- -return array() +return [] --EXPECT-- 2 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/literals.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/literals.test index 7ae3bae9..308e8df2 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/literals.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/literals.test @@ -10,7 +10,7 @@ Twig supports literals 7 {{ null }} 8 {{ NULL }} --DATA-- -return array() +return [] --EXPECT-- 1 1 2 1 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/magic_call.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/magic_call.test index 1a27a2d6..60417e04 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/magic_call.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/magic_call.test @@ -21,7 +21,7 @@ class TestClassForMagicCallAttributes } } -return array('foo' => new TestClassForMagicCallAttributes()) +return ['foo' => new TestClassForMagicCallAttributes()] --EXPECT-- foo_from_call bar_from_getbar diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/matches.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/matches.test index b6c77165..95459c3b 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/matches.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/matches.test @@ -5,7 +5,7 @@ Twig supports the "matches" operator {{ 'foo' matches '/^fo/' ? 'OK' : 'KO' }} {{ 'foo' matches '/O/i' ? 'OK' : 'KO' }} --DATA-- -return array() +return [] --EXPECT-- OK OK diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/method_call.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/method_call.test index 5f801e63..1826842b 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/method_call.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/method_call.test @@ -12,9 +12,9 @@ Twig supports method calls {{ items.foo.in }} {{ items.foo.not }} --DATA-- -return array('foo' => 'bar', 'items' => array('foo' => new TwigTestFoo(), 'bar' => 'foo')) +return ['foo' => 'bar', 'items' => ['foo' => new TwigTestFoo(), 'bar' => 'foo']] --CONFIG-- -return array('strict_variables' => false) +return ['strict_variables' => false] --EXPECT-- foo foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/negative_numbers.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/negative_numbers.test index 1853b1b0..c2a6e340 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/negative_numbers.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/negative_numbers.test @@ -8,7 +8,7 @@ Twig manages negative numbers correctly {{ 5 + -1 }} {{ 5 + - 1 }} --DATA-- -return array() +return [] --EXPECT-- -1 -1 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/operators_as_variables.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/operators_as_variables.test index fe29d08b..fa9a843c 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/operators_as_variables.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/operators_as_variables.test @@ -7,7 +7,7 @@ Twig allows to use named operators as variable names {{ in }} {{ is }} --DATA-- -return array('matches' => array(1, 2, 3), 'in' => 'in', 'is' => 'is') +return ['matches' => [1, 2, 3], 'in' => 'in', 'is' => 'is'] --EXPECT-- 1 2 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/postfix.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/postfix.test index 542c3504..276cbf19 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/postfix.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/postfix.test @@ -12,7 +12,7 @@ Twig parses postfix expressions {{ macros.foo() }} {{ (macros).foo() }} --DATA-- -return array(); +return [] --EXPECT-- a A diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/power.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/power.test index eacc98f8..84fd2369 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/power.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/power.test @@ -9,7 +9,7 @@ Twig parses power expressions {{ b ** a }} {{ b ** b }} --DATA-- -return array('a' => 4, 'b' => -2); +return ['a' => 4, 'b' => -2] --EXPECT-- 8 -8 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/sameas.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/sameas.test index 601201de..83f3691f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/sameas.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/sameas.test @@ -11,7 +11,7 @@ Twig supports the "same as" operator as (true) ? 'OK' }} --DATA-- -return array() +return [] --EXPECT-- OK OK diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/starts_with.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/starts_with.test index 75d331e9..a78ff1ea 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/starts_with.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/starts_with.test @@ -13,7 +13,7 @@ with 'f' ? 'OK' : 'KO' }} {{ 'a' starts with false ? 'OK' : 'KO' }} {{ false starts with '' ? 'OK' : 'KO' }} --DATA-- -return array() +return [] --EXPECT-- OK OK diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/strings.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/strings.test index a9116613..f402c893 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/strings.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/strings.test @@ -4,7 +4,7 @@ Twig supports string interpolation {{ "foo #{"foo #{bar} baz"} baz" }} {{ "foo #{bar}#{bar} baz" }} --DATA-- -return array('bar' => 'BAR'); +return ['bar' => 'BAR'] --EXPECT-- foo foo BAR baz baz foo BARBAR baz diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator.test index 0e6fa96e..37eccc0f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator.test @@ -8,7 +8,7 @@ Twig supports the ternary operator {{ 1 == 1 ? 'foo
    ':'' }} {{ foo ~ (bar ? ('-' ~ bar) : '') }} --DATA-- -return array('foo' => 'foo', 'bar' => 'bar') +return ['foo' => 'foo', 'bar' => 'bar'] --EXPECT-- YES NO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_noelse.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_noelse.test index fdc660fc..8b0f7284 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_noelse.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_noelse.test @@ -4,7 +4,7 @@ Twig supports the ternary operator {{ 1 ? 'YES' }} {{ 0 ? 'YES' }} --DATA-- -return array() +return [] --EXPECT-- YES diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_nothen.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_nothen.test index 9057e837..ecd6b754 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_nothen.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_nothen.test @@ -4,7 +4,7 @@ Twig supports the ternary operator {{ 'YES' ?: 'NO' }} {{ 0 ?: 'NO' }} --DATA-- -return array() +return [] --EXPECT-- YES NO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/two_word_operators_as_variables.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/two_word_operators_as_variables.test index 0eaabb44..ad142918 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/two_word_operators_as_variables.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/two_word_operators_as_variables.test @@ -3,6 +3,6 @@ Twig does not allow to use two-word named operators as variable names --TEMPLATE-- {{ starts with }} --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Syntax: Unexpected token "operator" of value "starts with" in "index.twig" at line 2. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary.test index b79219a2..54225311 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary.test @@ -5,7 +5,7 @@ Twig supports unary operators (not, -, +) {{ +1 + 1 }}/{{ -1 - 1 }} {{ not (false or true) }} --DATA-- -return array() +return [] --EXPECT-- /1 2/-2 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_macro_arguments.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_macro_arguments.test index ad84a9c2..27deba3e 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_macro_arguments.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_macro_arguments.test @@ -13,7 +13,7 @@ Twig manages negative numbers as default parameters {% macro positive_number1(nb = +1) %}{{ nb }}{% endmacro %} {% macro positive_number2(nb = ++1) %}{{ nb }}{% endmacro %} --DATA-- -return array() +return [] --EXPECT-- -1 1 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_precedence.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_precedence.test index cc6eef8d..9c56ab12 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_precedence.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_precedence.test @@ -6,7 +6,7 @@ Twig unary operators precedence {{ -1 * -1 }} {{ 4 / -1 * 5 }} --DATA-- -return array() +return [] --EXPECT-- -2 0 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/abs.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/abs.test index 27e93fd6..7518769d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/abs.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/abs.test @@ -14,7 +14,7 @@ {{ number5|abs }} {{ number6|abs }} --DATA-- -return array('number1' => -5.5, 'number2' => -5, 'number3' => -0, 'number4' => 0, 'number5' => 5, 'number6' => 5.5) +return ['number1' => -5.5, 'number2' => -5, 'number3' => -0, 'number4' => 0, 'number5' => 5, 'number6' => 5.5] --EXPECT-- 5.5 5 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch.test index cb6de7f9..0acf25bd 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch.test @@ -9,7 +9,7 @@ {% endfor %} --DATA-- -return array('items' => array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j')) +return ['items' => ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']] --EXPECT--
    a
    diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_float.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_float.test index e2ec4beb..dad004ec 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_float.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_float.test @@ -9,7 +9,7 @@
    {% endfor %} --DATA-- -return array('items' => array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j')) +return ['items' => ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']] --EXPECT--
    a
    diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_empty_fill.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_empty_fill.test index af996f24..411b4fc7 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_empty_fill.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_empty_fill.test @@ -11,7 +11,7 @@ {% endfor %}
    --DATA-- -return array('items' => array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j')) +return ['items' => ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']] --EXPECT-- diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_exact_elements.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_exact_elements.test index 72483f4b..750d1557 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_exact_elements.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_exact_elements.test @@ -9,7 +9,7 @@ {% endfor %} --DATA-- -return array('items' => array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l')) +return ['items' => ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l']] --EXPECT--
    a
    diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_fill.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_fill.test index 746295f1..5d470d00 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_fill.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_fill.test @@ -11,7 +11,7 @@ {% endfor %}
    --DATA-- -return array('items' => array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j')) +return ['items' => ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']] --EXPECT-- diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_keys.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_keys.test index 6015380e..f3279a63 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_keys.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_keys.test @@ -4,7 +4,7 @@ {{ {'foo': 'bar', 'key': 'value'}|batch(4)|first|keys|join(',') }} {{ {'foo': 'bar', 'key': 'value'}|batch(4, 'fill')|first|keys|join(',') }} --DATA-- -return array() +return [] --EXPECT-- foo,key foo,key,0,1 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_zero_elements.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_zero_elements.test index b9c058d6..bc303da8 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_zero_elements.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_zero_elements.test @@ -4,7 +4,7 @@ {{ []|batch(3)|length }} {{ []|batch(3, 'fill')|length }} --DATA-- -return array() +return [] --EXPECT-- 0 0 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/convert_encoding.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/convert_encoding.test index b386d4e7..6f0091f3 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/convert_encoding.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/convert_encoding.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ "愛していますか?"|convert_encoding('ISO-2022-JP', 'UTF-8')|convert_encoding('UTF-8', 'ISO-2022-JP') }} --DATA-- -return array() +return [] --EXPECT-- 愛していますか? diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date.test index d17e5e2f..7878fe20 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date.test @@ -40,7 +40,7 @@ {{ '2010-01-28 15:00:00'|date(timezone="Asia/Hong_Kong") }} --DATA-- date_default_timezone_set('Europe/Paris'); -return array( +return [ 'date1' => mktime(13, 45, 0, 10, 4, 2010), 'date2' => new DateTime('2010-10-04 13:45'), 'date3' => '2010-10-04 13:45', @@ -49,7 +49,7 @@ return array( 'date6' => new DateTime('2010-10-04 13:45', new DateTimeZone('America/New_York')), 'date7' => '2010-01-28T15:00:00+04:00', 'timezone1' => new DateTimeZone('America/New_York'), -) +] --EXPECT-- October 4, 2010 13:45 04/10/2010 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format.test index 6ad504cd..bd278636 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format.test @@ -6,9 +6,9 @@ --DATA-- date_default_timezone_set('UTC'); $twig->getExtension('Twig_Extension_Core')->setDateFormat('Y-m-d', '%d days %h hours'); -return array( +return [ 'date1' => mktime(13, 45, 0, 10, 4, 2010), -) +] --EXPECT-- 2010-10-04 04/10/2010 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format_interval.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format_interval.test index 627ce56e..4f914718 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format_interval.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format_interval.test @@ -6,9 +6,9 @@ --DATA-- date_default_timezone_set('UTC'); $twig->getExtension('Twig_Extension_Core')->setDateFormat('Y-m-d', '%d days %h hours'); -return array( +return [ 'date2' => new DateInterval('P2D'), -) +] --EXPECT-- 2 days 0 hours 2 days diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_immutable.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_immutable.test index 6aad1fea..36c50662 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_immutable.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_immutable.test @@ -15,11 +15,11 @@ {{ date2|date('e', false) }} --DATA-- date_default_timezone_set('Europe/Paris'); -return array( +return [ 'date1' => new DateTimeImmutable('2010-10-04 13:45'), 'date2' => new DateTimeImmutable('2010-10-04 13:45', new DateTimeZone('America/New_York')), 'timezone1' => new DateTimeZone('America/New_York'), -) +] --EXPECT-- October 4, 2010 13:45 04/10/2010 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_interval.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_interval.test index a5a89f40..6e359913 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_interval.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_interval.test @@ -6,11 +6,11 @@ {{ date1|date('%d days %h hours', timezone1) }} --DATA-- date_default_timezone_set('UTC'); -return array( +return [ 'date1' => new DateInterval('P2D'), // This should have no effect on DateInterval formatting 'timezone1' => new DateTimeZone('America/New_York'), -) +] --EXPECT-- 2 days 2 days 0 hours diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_modify.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_modify.test index 53d3a69c..055ae971 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_modify.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_modify.test @@ -5,10 +5,10 @@ {{ date2|date_modify('-1day')|date('Y-m-d H:i:s') }} --DATA-- date_default_timezone_set('UTC'); -return array( +return [ 'date1' => '2010-10-04 13:45', 'date2' => new DateTime('2010-10-04 13:45'), -) +] --EXPECT-- 2010-10-03 13:45:00 2010-10-03 13:45:00 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_namedargs.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_namedargs.test index 4ecde8a1..2d1aa134 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_namedargs.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_namedargs.test @@ -6,7 +6,7 @@ {{ date|date('d/m/Y H:i:s P', timezone='America/Chicago') }} --DATA-- date_default_timezone_set('UTC'); -return array('date' => mktime(13, 45, 0, 10, 4, 2010)) +return ['date' => mktime(13, 45, 0, 10, 4, 2010)] --EXPECT-- 04/10/2010 08:45:00 -05:00 04/10/2010 08:45:00 -05:00 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/default.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/default.test index 15acf01c..bcbb34ed 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/default.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/default.test @@ -42,22 +42,22 @@ Deep nested: {{ object.self.undefinedMethod |default('default') is same as('default') ? 'ok' : 'ko' }} {{ object.undefinedMethod.self |default('default') is same as('default') ? 'ok' : 'ko' }} --DATA-- -return array( +return [ 'definedVar' => 'defined', 'zeroVar' => 0, 'emptyVar' => '', 'nullVar' => null, - 'nested' => array( + 'nested' => [ 'definedVar' => 'defined', 'zeroVar' => 0, 'emptyVar' => '', 'nullVar' => null, - 'definedArray' => array(0), - ), + 'definedArray' => [0], + ], 'object' => new TwigTestFoo(), -) +] --CONFIG-- -return array('strict_variables' => false) +return ['strict_variables' => false] --EXPECT-- Variable: ok @@ -100,22 +100,22 @@ ok ok ok --DATA-- -return array( +return [ 'definedVar' => 'defined', 'zeroVar' => 0, 'emptyVar' => '', 'nullVar' => null, - 'nested' => array( + 'nested' => [ 'definedVar' => 'defined', 'zeroVar' => 0, 'emptyVar' => '', 'nullVar' => null, - 'definedArray' => array(0), - ), + 'definedArray' => [0], + ], 'object' => new TwigTestFoo(), -) +] --CONFIG-- -return array('strict_variables' => true) +return ['strict_variables' => true] --EXPECT-- Variable: ok diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/dynamic_filter.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/dynamic_filter.test index 93c5913f..27dc8784 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/dynamic_filter.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/dynamic_filter.test @@ -4,7 +4,7 @@ dynamic filter {{ 'bar'|foo_path }} {{ 'bar'|a_foo_b_bar }} --DATA-- -return array() +return [] --EXPECT-- foo/bar a/b/bar diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape.test index a606c106..131f5b4e 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ "foo
    "|e }} --DATA-- -return array() +return [] --EXPECT-- foo <br /> diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_html_attr.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_html_attr.test index 009a2453..10e32755 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_html_attr.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_html_attr.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ '
    '|escape('html_attr') }} --DATA-- -return array() +return [] --EXPECT-- <br /> diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_javascript.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_javascript.test index 8e727811..4c2fb7a3 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_javascript.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_javascript.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ "é ♜ 𝌆"|e('js') }} --DATA-- -return array() +return [] --EXPECT-- \u00E9\u0020\u265C\u0020\uD834\uDF06 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_non_supported_charset.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_non_supported_charset.test index bba26a0d..93f34297 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_non_supported_charset.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_non_supported_charset.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ "愛していますか?
    "|e }} --DATA-- -return array() +return [] --EXPECT-- 愛していますか? <br /> diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/first.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/first.test index aa54645c..c164e4f6 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/first.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/first.test @@ -8,7 +8,7 @@ {{ 'Ä€é'|first }} {{ ''|first }} --DATA-- -return array('arr' => new ArrayObject(array(1, 2, 3, 4))) +return ['arr' => new ArrayObject([1, 2, 3, 4])] --EXPECT-- 1 1 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/force_escape.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/force_escape.test index eb9cba7c..7efbe320 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/force_escape.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/force_escape.test @@ -11,7 +11,7 @@ {{ foo }} {% endautoescape %} --DATA-- -return array() +return [] --EXPECT-- foo<br /> \u0020\u0020\u0020\u0020foo\u003Cbr\u0020\/\u003E\n diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/format.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/format.test index 97221ff8..efaf8317 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/format.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/format.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ string|format(foo, 3) }} --DATA-- -return array('string' => '%s/%d', 'foo' => 'bar') +return ['string' => '%s/%d', 'foo' => 'bar'] --EXPECT-- bar/3 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/join.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/join.test index b342c174..1a703e9b 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/join.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/join.test @@ -4,9 +4,35 @@ {{ ["foo", "bar"]|join(', ') }} {{ foo|join(', ') }} {{ bar|join(', ') }} + +{{ ["foo", "bar"]|join(', ', ' and ') }} +{{ foo|join(', ', ' and ') }} +{{ bar|join(', ', ' and ') }} +{{ ["one", "two", "three"]|join(', ', ' and ') }} +{{ ["a", "b", "c"]|join('','-') }} +{{ ["a", "b", "c"]|join('-','-') }} +{{ ["a", "b", "c"]|join('-','') }} +{{ ["hello"]|join('|','-') }} + +{{ {"a": "w", "b": "x", "c": "y", "d": "z"}|join }} +{{ {"a": "w", "b": "x", "c": "y", "d": "z"}|join(',') }} +{{ {"a": "w", "b": "x", "c": "y", "d": "z"}|join(',','-') }} --DATA-- -return array('foo' => new TwigTestFoo(), 'bar' => new ArrayObject(array(3, 4))) +return ['foo' => new TwigTestFoo(), 'bar' => new ArrayObject([3, 4])] --EXPECT-- foo, bar 1, 2 3, 4 + +foo and bar +1 and 2 +3 and 4 +one, two and three +ab-c +a-b-c +a-bc +hello + +wxyz +w,x,y,z +w,x,y-z diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/json_encode.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/json_encode.test index 1738d40c..ea45218f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/json_encode.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/json_encode.test @@ -5,7 +5,7 @@ {{ foo|json_encode|raw }} {{ [foo, "foo"]|json_encode|raw }} --DATA-- -return array('foo' => new Twig_Markup('foo', 'UTF-8')) +return ['foo' => new Twig_Markup('foo', 'UTF-8')] --EXPECT-- "foo" "foo" diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/last.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/last.test index 1b8031ee..624e098f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/last.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/last.test @@ -8,7 +8,7 @@ {{ 'Ä€é'|last }} {{ ''|last }} --DATA-- -return array('arr' => new ArrayObject(array(1, 2, 3, 4))) +return ['arr' => new ArrayObject([1, 2, 3, 4])] --EXPECT-- 4 4 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length.test index bad5cf56..67d2f6ac 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length.test @@ -12,18 +12,18 @@ {{ non_countable|length }} {{ simple_xml_element|length }} --DATA-- -return array( - 'array' => array(1, 4), +return [ + 'array' => [1, 4], 'string' => 'foo', 'number' => 1000, 'to_string_able' => new ToStringStub('foobar'), 'countable' => new CountableStub(42), /* also asserts we do *not* call __toString() */ - 'iterator_aggregate' => new IteratorAggregateStub(array('a', 'b', 'c')), /* also asserts we do *not* call __toString() */ + 'iterator_aggregate' => new IteratorAggregateStub(['a', 'b', 'c']), /* also asserts we do *not* call __toString() */ 'null' => null, 'magic' => new MagicCallStub(), /* used to assert we do *not* call __call */ 'non_countable' => new \StdClass(), 'simple_xml_element' => new \SimpleXMLElement(''), -); +] --EXPECT-- 2 3 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length_utf8.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length_utf8.test index e5b1b101..0f688335 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length_utf8.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length_utf8.test @@ -4,7 +4,7 @@ {{ string|length }} {{ markup|length }} --DATA-- -return array('string' => 'été', 'markup' => new Twig_Markup('foo', 'UTF-8')) +return ['string' => 'été', 'markup' => new Twig_Markup('foo', 'UTF-8')] --EXPECT-- 3 3 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/merge.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/merge.test index 81371a41..670077ab 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/merge.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/merge.test @@ -8,7 +8,14 @@ {{ numerics|merge([4, 5, 6])|join }} {{ traversable.a|merge(traversable.b)|join }} --DATA-- -return array('items' => array('foo' => 'bar'), 'numerics' => array(1, 2, 3), 'traversable' => array('a' => new ArrayObject(array(0 => 1, 1 => 2, 2 => 3)), 'b' => new ArrayObject(array('a' => 'b')))) +return [ + 'items' => ['foo' => 'bar'], + 'numerics' => [1, 2, 3], + 'traversable' => [ + 'a' => new ArrayObject([0 => 1, 1 => 2, 2 => 3]), + 'b' => new ArrayObject(['a' => 'b']) + ] +] --EXPECT-- barfoo foobar diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/nl2br.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/nl2br.test index 6545a9bb..524ec45f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/nl2br.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/nl2br.test @@ -4,7 +4,7 @@ {{ "I like Twig.\nYou will like it too.\n\nEverybody like it!"|nl2br }} {{ text|nl2br }} --DATA-- -return array('text' => "If you have some HTML\nit will be escaped.") +return ['text' => "If you have some HTML\nit will be escaped."] --EXPECT-- I like Twig.
    You will like it too.
    diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format.test index 639a8659..7f1e2e16 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format.test @@ -8,7 +8,7 @@ {{ 1020.25|number_format(2, ',') }} {{ 1020.25|number_format(2, ',', '.') }} --DATA-- -return array(); +return [] --EXPECT-- 20 20 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format_default.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format_default.test index 65c1cdb4..c550bb67 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format_default.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format_default.test @@ -10,7 +10,7 @@ {{ 1020.25|number_format(2, ',', '.') }} --DATA-- $twig->getExtension('Twig_Extension_Core')->setNumberFormat(2, '!', '='); -return array(); +return [] --EXPECT-- 20!00 20!25 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace.test index 06be7e27..02294da2 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace.test @@ -5,7 +5,7 @@ {{ 'I like single replace operation only %that%'|replace({'%that%' : '%that%1'}) }} {{ 'I like %this% and %that%.'|replace(traversable) }} --DATA-- -return array('traversable' => new ArrayObject(array('%this%' => 'foo', '%that%' => 'bar'))) +return ['traversable' => new ArrayObject(['%this%' => 'foo', '%that%' => 'bar'])] --EXPECT-- I liké foo and bar. I like single replace operation only %that%1 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace_invalid_arg.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace_invalid_arg.test index 2143a869..393b430c 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace_invalid_arg.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace_invalid_arg.test @@ -3,6 +3,6 @@ Exception for invalid argument type in replace call --TEMPLATE-- {{ 'test %foo%'|replace(stdClass) }} --DATA-- -return array('stdClass' => new stdClass()) +return ['stdClass' => new stdClass()] --EXCEPTION-- Twig_Error_Runtime: The "replace" filter expects an array or "Traversable" as replace values, got "stdClass" in "index.twig" at line 2. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/reverse.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/reverse.test index 7948ac45..97109f0e 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/reverse.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/reverse.test @@ -8,7 +8,7 @@ {{ {'a': 'c', 'b': 'a'}|reverse(preserveKeys=true)|join(glue=',') }} {{ {'a': 'c', 'b': 'a'}|reverse(preserve_keys=true)|join(glue=',') }} --DATA-- -return array('arr' => new ArrayObject(array(1, 2, 3, 4))) +return ['arr' => new ArrayObject([1, 2, 3, 4])] --EXPECT-- 4321 tnemenèvé4321 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/round.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/round.test index 57806b61..70923754 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/round.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/round.test @@ -10,7 +10,7 @@ {{ 21.3|round(-1, 'ceil')}} {{ 21.3|round(-1, 'floor')}} --DATA-- -return array() +return [] --EXPECT-- 3 2 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/slice.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/slice.test index b49b89fe..6166ea42 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/slice.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/slice.test @@ -26,7 +26,7 @@ {{ arr[2:]|join('') }} {{ xml|slice(1)|join('')}} --DATA-- -return array('start' => 1, 'length' => 2, 'arr' => new ArrayObject(array(1, 2, 3, 4)), 'xml' => new SimpleXMLElement('12')) +return ['start' => 1, 'length' => 2, 'arr' => new ArrayObject([1, 2, 3, 4]), 'xml' => new SimpleXMLElement('12')] --EXPECT-- 23 23 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/sort.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/sort.test index c67c18ea..fbd10316 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/sort.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/sort.test @@ -5,7 +5,7 @@ {{ array2|sort|join }} {{ traversable|sort|join }} --DATA-- -return array('array1' => array(4, 1), 'array2' => array('foo', 'bar'), 'traversable' => new ArrayObject(array(0 => 3, 1 => 2, 2 => 1))) +return ['array1' => [4, 1], 'array2' => ['foo', 'bar'], 'traversable' => new ArrayObject([0 => 3, 1 => 2, 2 => 1])] --EXPECT-- 14 barfoo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/special_chars.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/special_chars.test index dbaf7dc9..9869ec91 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/special_chars.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/special_chars.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ 'foo'|§ }} --DATA-- -return array() +return [] --EXPECT-- §foo§ diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split.test index a093ed79..92dbf0a0 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split.test @@ -9,7 +9,7 @@ {{ baz|split('', 2)|join('-') }} {{ foo|split(',', -2)|join('-') }} --DATA-- -return array('foo' => "one,two,three,four,five", 'baz' => '12345',) +return ['foo' => "one,two,three,four,five", 'baz' => '12345',] --EXPECT-- one-two-three-four-five one-two-three-four-five diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split_utf8.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split_utf8.test index 5757abaf..af48132f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split_utf8.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split_utf8.test @@ -10,7 +10,7 @@ {{ baz|split('', 1)|join('-') }} {{ baz|split('', 2)|join('-') }} --DATA-- -return array('foo' => 'Ä,é,Äほ', 'baz' => 'éÄßごa',) +return ['foo' => 'Ä,é,Äほ', 'baz' => 'éÄßごa',] --EXPECT-- é Ä-é-Äほ diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/static_calls.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/static_calls.test index 4e17b772..1626db0c 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/static_calls.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/static_calls.test @@ -4,7 +4,7 @@ Filters as static method calls {{ 'foo'|static_call_string }} {{ 'foo'|static_call_array }} --DATA-- -return array('foo' => 'foo') +return ['foo' => 'foo'] --EXPECT-- *foo* *foo* diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/trim.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/trim.test index b1ef7b47..432989ff 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/trim.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/trim.test @@ -11,7 +11,7 @@ {{ "/ foo/"|trim(character_mask="/", side="left") }} {{ " do nothing. "|trim("", "right") }} --DATA-- -return array('text' => " If you have some HTML it will be escaped. ") +return ['text' => " If you have some HTML it will be escaped. "] --EXPECT-- I like Twig. If you have some <strong>HTML</strong> it will be escaped. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode.test index 83a384c1..ac236990 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode.test @@ -6,7 +6,7 @@ {{ {}|url_encode|default("default") }} {{ 'spéßi%le%c0d@dspa ce'|url_encode }} --DATA-- -return array() +return [] --EXPECT-- foo=bar&number=3&sp%C3%A9%C3%9Fi%25l=e%25c0d%40d&spa%20ce= foo=bar&number=3&sp%C3%A9%C3%9Fi%25l=e%25c0d%40d&spa%20ce= diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/attribute.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/attribute.test index 71b2038a..2972bd45 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/attribute.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/attribute.test @@ -8,7 +8,7 @@ {{ attribute(obj, method) is defined ? 'ok' : 'ko' }} {{ attribute(obj, nonmethod) is defined ? 'ok' : 'ko' }} --DATA-- -return array('obj' => new TwigTestFoo(), 'method' => 'foo', 'array' => array('foo' => 'bar'), 'item' => 'foo', 'nonmethod' => 'xxx', 'arguments' => array('a', 'b')) +return ['obj' => new TwigTestFoo(), 'method' => 'foo', 'array' => ['foo' => 'bar'], 'item' => 'foo', 'nonmethod' => 'xxx', 'arguments' => ['a', 'b']] --EXPECT-- foo bar diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block.test index 8e54059a..1a4fd549 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block.test @@ -7,6 +7,6 @@ {% block foo %}{{ block('bar') }}{% endblock %} {% block bar %}BAR_BASE{% endblock %} --DATA-- -return array() +return [] --EXPECT-- BARBAR diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_with_template.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_with_template.test index 8305eb67..3d403d5b 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_with_template.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_with_template.test @@ -10,10 +10,10 @@ --TEMPLATE(included.twig)-- {% block foo %}FOO{% endblock %} --DATA-- -return array( +return [ 'included_loaded' => $twig->load('included.twig'), 'included_loaded_internal' => $twig->loadTemplate('included.twig'), -) +] --EXPECT-- FOO FOO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_without_name.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_without_name.test index 665cc87e..0affc9d0 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_without_name.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_without_name.test @@ -7,6 +7,6 @@ {% block foo %}{{ block() }}{% endblock %} {% block bar %}BAR_BASE{% endblock %} --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Syntax: The "block" function takes one argument (the block name) in "base.twig" at line 2. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/constant.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/constant.test index 63128791..d3f0e295 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/constant.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/constant.test @@ -4,7 +4,7 @@ {{ constant('DATE_W3C') == expect ? 'true' : 'false' }} {{ constant('ARRAY_AS_PROPS', object) }} --DATA-- -return array('expect' => DATE_W3C, 'object' => new ArrayObject(array('hi'))); +return ['expect' => DATE_W3C, 'object' => new ArrayObject(['hi'])] --EXPECT-- true 2 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/cycle.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/cycle.test index 522a63b8..0ac6dccd 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/cycle.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/cycle.test @@ -5,7 +5,7 @@ {{ cycle(array1, i) }}-{{ cycle(array2, i) }} {% endfor %} --DATA-- -return array('array1' => array('odd', 'even'), 'array2' => array('apple', 'orange', 'citrus')) +return ['array1' => ['odd', 'even'], 'array2' => ['apple', 'orange', 'citrus']] --EXPECT-- odd-apple even-orange diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date.test index c9f46446..45697cb1 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date.test @@ -10,13 +10,13 @@ {{ date() > date('-1day') ? 'OK' : 'KO' }} --DATA-- date_default_timezone_set('UTC'); -return array( +return [ 'date1' => mktime(13, 45, 0, 10, 4, 2010), 'date2' => new DateTime('2010-10-04 13:45'), 'date3' => '2010-10-04 13:45', 'date4' => 1286199900, // DateTime::createFromFormat('Y-m-d H:i', '2010-10-04 13:45', new DateTimeZone('UTC'))->getTimestamp() -- A unixtimestamp is always GMT 'date5' => -189291360, // DateTime::createFromFormat('Y-m-d H:i', '1964-01-02 03:04', new DateTimeZone('UTC'))->getTimestamp(), -) +] --EXPECT-- OK OK diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date_namedargs.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date_namedargs.test index b9dd9e38..11f60ee8 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date_namedargs.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date_namedargs.test @@ -5,7 +5,7 @@ {{ date(timezone="America/New_York", date=date)|date('d/m/Y H:i:s P', false) }} --DATA-- date_default_timezone_set('UTC'); -return array('date' => mktime(13, 45, 0, 10, 4, 2010)) +return ['date' => mktime(13, 45, 0, 10, 4, 2010)] --EXPECT-- 04/10/2010 09:45:00 -04:00 04/10/2010 09:45:00 -04:00 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump.test index f4072375..691a3abe 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump.test @@ -6,9 +6,9 @@ {{ dump('foo') }} {{ dump('foo', 'bar') }} --DATA-- -return array('foo' => 'foo', 'bar' => 'bar') +return ['foo' => 'foo', 'bar' => 'bar'] --CONFIG-- -return array('debug' => true, 'autoescape' => false); +return ['debug' => true, 'autoescape' => false] --EXPECT-- string(3) "foo" diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump_array.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump_array.test index 889b7a92..f33e80ff 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump_array.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump_array.test @@ -5,9 +5,9 @@ --TEMPLATE-- {{ dump() }} --DATA-- -return array('foo' => 'foo', 'bar' => 'bar') +return ['foo' => 'foo', 'bar' => 'bar'] --CONFIG-- -return array('debug' => true, 'autoescape' => false); +return ['debug' => true, 'autoescape' => false] --EXPECT-- array(3) { ["foo"]=> diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dynamic_function.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dynamic_function.test index 913fbc99..c7b3539c 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dynamic_function.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dynamic_function.test @@ -4,7 +4,7 @@ dynamic function {{ foo_path('bar') }} {{ a_foo_b_bar('bar') }} --DATA-- -return array() +return [] --EXPECT-- foo/bar a/b/bar diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/assignment.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/assignment.test index b7653b4e..c9ce8123 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/assignment.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/assignment.test @@ -7,7 +7,7 @@ FOO{{ tmp }}BAR --TEMPLATE(foo.twig)-- FOOBAR --DATA-- -return array() +return [] --EXPECT-- FOO FOOBARBAR diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/autoescaping.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/autoescaping.test index 56f8f3b5..a3666261 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/autoescaping.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/autoescaping.test @@ -5,6 +5,6 @@ --TEMPLATE(foo.twig)--

    Test

    --DATA-- -return array() +return [] --EXPECT--

    Test

    diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/basic.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/basic.test index a434182a..f90983c0 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/basic.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/basic.test @@ -8,7 +8,7 @@ BAR --TEMPLATE(foo.twig)-- FOOBAR --DATA-- -return array() +return [] --EXPECT-- FOO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/expression.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/expression.test index aba30ce3..c6d3d1c5 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/expression.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/expression.test @@ -8,7 +8,7 @@ BAR --TEMPLATE(foo.twig)-- FOOBAR --DATA-- -return array('foo' => 'foo.twig') +return ['foo' => 'foo.twig'] --EXPECT-- FOO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/ignore_missing.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/ignore_missing.test index 43a2ccc2..c05b43e1 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/ignore_missing.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/ignore_missing.test @@ -6,5 +6,5 @@ {{ include("foo.twig", ignore_missing = true, variables = {}) }} {{ include("foo.twig", ignore_missing = true, variables = {}, with_context = true) }} --DATA-- -return array() +return [] --EXPECT-- diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing.test index 4d2f6cf1..96445ecd 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ include("foo.twig") }} --DATA-- -return array(); +return [] --EXCEPTION-- Twig_Error_Loader: Template "foo.twig" is not defined in "index.twig" at line 2. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing_nested.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing_nested.test index 78fddc7a..082ef86c 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing_nested.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing_nested.test @@ -11,6 +11,6 @@ {{ include("foo.twig") }} {% endblock %} --DATA-- -return array(); +return [] --EXCEPTION-- Twig_Error_Loader: Template "foo.twig" is not defined in "base.twig" at line 3. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox.test index 7b9ccaca..af5cbf1a 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox.test @@ -8,6 +8,6 @@ {{ foo|e }} {{ foo|e }} --DATA-- -return array() +return [] --EXCEPTION-- Twig_Sandbox_SecurityNotAllowedFilterError: Filter "e" is not allowed in "foo.twig" at line 4. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling.test index 8ffc4922..1206b67f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling.test @@ -8,7 +8,7 @@ foo --TEMPLATE(bar.twig)-- {{ foo|e }} --DATA-- -return array('foo' => 'bar
    ') +return ['foo' => 'bar
    '] --EXPECT-- foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling_ignore_missing.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling_ignore_missing.test index 8bf6e102..c5be0088 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling_ignore_missing.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling_ignore_missing.test @@ -6,7 +6,7 @@ --TEMPLATE(bar.twig)-- {{ foo|e }} --DATA-- -return array('foo' => 'bar
    ') +return ['foo' => 'bar
    '] --EXPECT-- diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/template_instance.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/template_instance.test index 18d405a0..8ba956b8 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/template_instance.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/template_instance.test @@ -5,6 +5,6 @@ --TEMPLATE(foo.twig)-- BAR --DATA-- -return array('foo' => $twig->loadTemplate('foo.twig')) +return ['foo' => $twig->loadTemplate('foo.twig')] --EXPECT-- BAR FOO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/templates_as_array.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/templates_as_array.test index 1a810068..21e5bb2e 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/templates_as_array.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/templates_as_array.test @@ -6,7 +6,7 @@ --TEMPLATE(foo.twig)-- foo --DATA-- -return array() +return [] --EXPECT-- foo foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_context.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_context.test index 35611fbb..46ac8c79 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_context.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_context.test @@ -8,7 +8,7 @@ --TEMPLATE(foo.twig)-- {% for k, v in _context %}{{ k }},{% endfor %} --DATA-- -return array('foo' => 'bar') +return ['foo' => 'bar'] --EXPECT-- foo,global,_parent, global,_parent, diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_variables.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_variables.test index b2ace940..0ed98fed 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_variables.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_variables.test @@ -6,7 +6,7 @@ --TEMPLATE(foo.twig)-- {{ foo }} --DATA-- -return array('vars' => array('foo' => 'bar')) +return ['vars' => ['foo' => 'bar']] --EXPECT-- bar bar diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_call.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_call.test index 93354431..4dd5e270 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_call.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_call.test @@ -3,6 +3,6 @@ __call calls --TEMPLATE-- {{ 'foo'|magic_call }} --DATA-- -return array() +return [] --EXPECT-- magic_foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_static_call.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_static_call.test index 521a317c..944f15af 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_static_call.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_static_call.test @@ -4,7 +4,7 @@ __staticCall calls {{ 'foo'|magic_call_string }} {{ 'foo'|magic_call_array }} --DATA-- -return array() +return [] --EXPECT-- static_magic_foo static_magic_foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/max.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/max.test index e6c94af6..6d2de000 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/max.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/max.test @@ -5,7 +5,7 @@ {{ max(2, 1, 3, 5, 4) }} {{ max({2:"two", 1:"one", 3:"three", 5:"five", 4:"for"}) }} --DATA-- -return array() +return [] --EXPECT-- 5 5 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/min.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/min.test index 660471c0..1fe5446b 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/min.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/min.test @@ -5,7 +5,7 @@ {{ min([2, 1, 3, 5, 4]) }} {{ min({2:"two", 1:"one", 3:"three", 5:"five", 4:"for"}) }} --DATA-- -return array() +return [] --EXPECT-- 1 1 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/range.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/range.test index e0377c8d..2927333b 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/range.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/range.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ range(low=0+1, high=10+0, step=2)|join(',') }} --DATA-- -return array() +return [] --EXPECT-- 1,3,5,7,9 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/recursive_block_with_inheritance.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/recursive_block_with_inheritance.test index bf0556d2..1c3fffb5 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/recursive_block_with_inheritance.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/recursive_block_with_inheritance.test @@ -16,6 +16,6 @@ --TEMPLATE(base.twig)-- {{ block('list') }} --DATA-- -return array('item' => array('1', '2', array('3.1', array('3.2.1', '3.2.2'), '3.4'))) +return ['item' => ['1', '2', ['3.1', ['3.2.1', '3.2.2'], '3.4']]] --EXPECT--
    1. "1"
    2. "2"
      1. "3.1"
        1. "3.2.1"
        2. "3.2.2"
      2. "3.4"
    diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/source.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/source.test index 0e094c3b..b691ce7b 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/source.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/source.test @@ -8,7 +8,7 @@ BAR --TEMPLATE(foo.twig)-- {{ foo }}
    --DATA-- -return array() +return [] --EXPECT-- FOO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/special_chars.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/special_chars.test index 30c3df51..9c9e2494 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/special_chars.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/special_chars.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ §('foo') }} --DATA-- -return array() +return [] --EXPECT-- §foo§ diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/static_calls.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/static_calls.test index 57e5be39..dd13abb0 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/static_calls.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/static_calls.test @@ -4,7 +4,7 @@ Functions as static method calls {{ static_call_string('foo') }} {{ static_call_array('foo') }} --DATA-- -return array('foo' => 'foo') +return ['foo' => 'foo'] --EXPECT-- *foo* *foo* diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/template_from_string.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/template_from_string.test index 3d3b9587..33b0e40d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/template_from_string.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/template_from_string.test @@ -8,7 +8,7 @@ --TEMPLATE(parent.twig)-- {% block content %}{% endblock %} --DATA-- -return array('name' => 'Fabien', 'template' => "Hello {{ name }}") +return ['name' => 'Fabien', 'template' => "Hello {{ name }}"] --EXPECT-- Hello Fabien Hello Fabien diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/undefined_block.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/undefined_block.test index 1470e903..84b3eef6 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/undefined_block.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/undefined_block.test @@ -2,11 +2,15 @@ "block" function with undefined block --TEMPLATE-- {% extends "base.twig" %} -{% block foo %}{{ parent() }}{{ block('unknown') }}{{ block('bar') }}{% endblock %} +{% block foo %} + {{ parent() }} + {{ block('unknown') }} + {{ block('bar') }} +{% endblock %} --TEMPLATE(base.twig)-- {% block foo %}Foo{% endblock %} {% block bar %}Bar{% endblock %} --DATA-- -return array() +return [] --EXCEPTION-- -Twig_Error_Runtime: Block "unknown" on template "base.twig" does not exist in "base.twig" at line 2. +Twig_Error_Runtime: Block "unknown" on template "base.twig" does not exist in "index.twig" at line 5. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/default_values.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/default_values.test index 4ccff7b6..18bba524 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/default_values.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/default_values.test @@ -10,7 +10,7 @@ macro {{ test('foo') }} {{ test('bar', 'foo') }} --DATA-- -return array(); +return [] --EXPECT-- foobar barfoo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/nested_calls.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/nested_calls.test index cd254281..4577286d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/nested_calls.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/nested_calls.test @@ -13,6 +13,6 @@ macro {{ macros.foo(macros.bar()) }} --DATA-- -return array(); +return [] --EXPECT--
    diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/reserved_variables.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/reserved_variables.test index cbfb921b..05dd9213 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/reserved_variables.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/reserved_variables.test @@ -9,6 +9,6 @@ macro {{ test(this) }} --DATA-- -return array('this' => 'foo'); +return ['this' => 'foo'] --EXPECT-- foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/simple.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/simple.test index 6a366cdf..8fc6b477 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/simple.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/simple.test @@ -14,7 +14,7 @@ macro {{ test.test(1, "c") }} {{ test(1, "c") }} --DATA-- -return array(); +return [] --EXPECT-- a
    b
    a
    b
    diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/varargs.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/varargs.test index 412c90fa..dd4b5c9f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/varargs.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/varargs.test @@ -14,7 +14,7 @@ macro with arbitrary arguments {{ test1("foo", "bar", "foobar") }} {{ test2("foo", "bar", "foobar") }} --DATA-- -return array(); +return [] --EXPECT-- foo: bar, foobar diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/with_filters.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/with_filters.test index 685626f2..96064ba0 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/with_filters.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/with_filters.test @@ -9,6 +9,6 @@ macro with a filter {{ test.test() }} --DATA-- -return array(); +return [] --EXPECT-- foo<br /> diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/block_names_unicity.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/block_names_unicity.test index 40c06739..df074707 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/block_names_unicity.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/block_names_unicity.test @@ -13,7 +13,7 @@ Block names are unique per template {% endfilter %} {% block content %}{% endblock %} --DATA-- -return array(); +return [] --EXPECT-- First Second diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/combined_debug_info.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/combined_debug_info.test index ff977ad6..b5281dc5 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/combined_debug_info.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/combined_debug_info.test @@ -10,6 +10,6 @@ index foo {{ foo.bar }} --DATA-- -return array('foo' => 'foo'); +return ['foo' => 'foo'] --EXCEPTION-- Twig_Error_Runtime: Impossible to access an attribute ("bar") on a string variable ("foo") in "foo" at line 3. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/empty_token.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/empty_token.test index 65f6cd2b..25bdc9e4 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/empty_token.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/empty_token.test @@ -3,6 +3,6 @@ Twig outputs 0 nodes correctly --TEMPLATE-- {{ foo }}0{{ foo }} --DATA-- -return array('foo' => 'foo') +return ['foo' => 'foo'] --EXPECT-- foo0foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/issue_1143.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/issue_1143.test index ff7c8bb7..e2ab950e 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/issue_1143.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/issue_1143.test @@ -8,7 +8,7 @@ class House const REGION_S = 1; const REGION_P = 2; - public static $regionChoices = array(self::REGION_S => 'house.region.s', self::REGION_P => 'house.region.p'); + public static $regionChoices = [self::REGION_S => 'house.region.s', self::REGION_P => 'house.region.p']; public function getRegionChoices() { @@ -18,6 +18,6 @@ class House $object = new House(); $object->region = 1; -return array('object' => $object) +return ['object' => $object] --EXPECT-- house.region.s diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/multi_word_tests.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/multi_word_tests.test index 269a3057..96ca5517 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/multi_word_tests.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/multi_word_tests.test @@ -4,7 +4,7 @@ Twig allows multi-word tests without a custom node class {{ 'foo' is multi word ? 'yes' : 'no' }} {{ 'foo bar' is multi word ? 'yes' : 'no' }} --DATA-- -return array() +return [] --EXPECT-- no yes diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test index 2a80c1e4..5ae14dad 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test @@ -8,7 +8,7 @@ Hello '{{ images.image.0.group }}'! - {{ image.group }} {% endfor %} --DATA-- -return array('images' => new SimpleXMLElement('foobar')) +return ['images' => new SimpleXMLElement('foobar')] --EXPECT-- Hello 'foo'! example diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/strings_like_numbers.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/strings_like_numbers.test index e18e1107..62fe8848 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/strings_like_numbers.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/strings_like_numbers.test @@ -3,6 +3,6 @@ Twig does not confuse strings with integers in getAttribute() --TEMPLATE-- {{ hash['2e2'] }} --DATA-- -return array('hash' => array('2e2' => 'works')) +return ['hash' => ['2e2' => 'works']] --EXPECT-- works diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/basic.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/basic.test index 703d9355..7b037c7a 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/basic.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/basic.test @@ -14,7 +14,7 @@ {{ var }}
    {% endautoescape %} --DATA-- -return array('var' => '
    ') +return ['var' => '
    '] --EXPECT-- <br />
    <br />
    diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/blocks.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/blocks.test index 05ab83ce..292e1b41 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/blocks.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/blocks.test @@ -7,6 +7,6 @@ {% endblock %} {% endautoescape %} --DATA-- -return array('var' => '
    ') +return ['var' => '
    '] --EXPECT-- <br /> diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/double_escaping.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/double_escaping.test index 9c097246..1724b487 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/double_escaping.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/double_escaping.test @@ -5,6 +5,6 @@ {{ var|escape }} {% endautoescape %} --DATA-- -return array('var' => '
    ') +return ['var' => '
    '] --EXPECT-- <br /> diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/functions.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/functions.test index 653c41b8..170e7074 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/functions.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/functions.test @@ -44,7 +44,7 @@ safe_br {% endautoescape %} --DATA-- -return array() +return [] --EXPECT-- autoescape false diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/literal.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/literal.test index e389d4dd..1ed2bf35 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/literal.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/literal.test @@ -23,7 +23,7 @@ {% endautoescape %} --DATA-- -return array() +return [] --EXPECT-- 1. Simple literal diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/nested.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/nested.test index 798e6fea..0d88c7e3 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/nested.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/nested.test @@ -15,7 +15,7 @@ {% endautoescape %} {{ var }} --DATA-- -return array('var' => '
    ') +return ['var' => '
    '] --EXPECT-- <br /> <br /> diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/objects.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/objects.test index e896aa41..9d959b22 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/objects.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/objects.test @@ -19,7 +19,7 @@ class UserForAutoEscapeTest return 'Fabien
    '; } } -return array('user' => new UserForAutoEscapeTest()) +return ['user' => new UserForAutoEscapeTest()] --EXPECT-- Fabien<br /> fabien<br /> diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/raw.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/raw.test index 9f1cedd3..187327c8 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/raw.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/raw.test @@ -5,6 +5,6 @@ {{ var|raw }} {% endautoescape %} --DATA-- -return array('var' => '
    ') +return ['var' => '
    '] --EXPECT--
    diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test index 5b69449c..9a0137ee 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test @@ -5,7 +5,7 @@ {% autoescape 'html' %}{{ var }}{% endautoescape %} --DATA-- -return array('var' => '
    "') +return ['var' => '
    "'] --EXPECT-- \u003Cbr\u0020\/\u003E\u0022 <br />" diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/type.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/type.test index 1250f0db..9ae8d7bf 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/type.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/type.test @@ -39,7 +39,7 @@ escape types {% endautoescape %} --DATA-- -return array('msg' => "<>\n'\"") +return ['msg' => "<>\n'\""] --EXPECT-- 1. autoescape 'html' |escape('js') diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters.test index 7821a9aa..f97105bb 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters.test @@ -61,7 +61,7 @@ {% endautoescape %} --DATA-- -return array('var' => "\nTwig") +return ['var' => "\nTwig"] --EXPECT-- (escape_and_nl2br is an escaper filter) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters_arguments.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters_arguments.test index f58a1e09..50f72d83 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters_arguments.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters_arguments.test @@ -9,7 +9,7 @@ {{ var|nl2br(sep|escape) }} {% endautoescape %} --DATA-- -return array('var' => "\nTwig", 'sep' => '
    ') +return ['var' => "\nTwig", 'sep' => '
    '] --EXPECT-- <Fabien>
    Twig diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_pre_escape_filters.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_pre_escape_filters.test index 134c77ea..c9c73805 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_pre_escape_filters.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_pre_escape_filters.test @@ -31,7 +31,7 @@ {% endautoescape %} --DATA-- -return array('var' => "\nTwig") +return ['var' => "\nTwig"] --EXPECT-- (nl2br is pre_escaped for "html" and declared safe for "html") diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_preserves_safety_filters.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_preserves_safety_filters.test index 32d3943b..c764d434 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_preserves_safety_filters.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_preserves_safety_filters.test @@ -23,7 +23,7 @@ {% endautoescape %} --DATA-- -return array('var' => "\nTwig") +return ['var' => "\nTwig"] --EXPECT-- (preserves_safety is preserving safety for "html") diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/basic.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/basic.test index 360dcf03..988b09ce 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/basic.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/basic.test @@ -6,6 +6,6 @@ --TEMPLATE(foo.twig)-- {% block content %}{% endblock %} --DATA-- -return array('foo' => 'bar') +return ['foo' => 'bar'] --EXPECT-- FOObar diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/block_unique_name.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/block_unique_name.test index bc89ec82..7dac6abb 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/block_unique_name.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/block_unique_name.test @@ -6,6 +6,6 @@ {% endblock %} {% endblock %} --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Syntax: The block 'content' has already been defined line 2 in "index.twig" at line 3. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/special_chars.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/special_chars.test index be17fedf..e8e240eb 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/special_chars.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/special_chars.test @@ -5,6 +5,6 @@ § {% endblock § %} --DATA-- -return array() +return [] --EXPECT-- § diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/basic.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/basic.test index f44296ea..16781e41 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/basic.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/basic.test @@ -21,7 +21,7 @@ B {% endblock %} C --DATA-- -return array() +return [] --EXPECT-- FOO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/complex_dynamic_parent.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/complex_dynamic_parent.test index de5ea7ee..b799a8c9 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/complex_dynamic_parent.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/complex_dynamic_parent.test @@ -21,7 +21,7 @@ B {% endblock %} C --DATA-- -return array('foo' => 'foo') +return ['foo' => 'foo'] --EXPECT-- FOO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/dynamic_parent.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/dynamic_parent.test index 2a125e6b..6f0879e2 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/dynamic_parent.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/dynamic_parent.test @@ -21,7 +21,7 @@ B {% endblock %} C --DATA-- -return array('foo' => 'foo.twig') +return ['foo' => 'foo.twig'] --EXPECT-- FOO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/error_line.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/error_line.test index 43147370..8677cc37 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/error_line.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/error_line.test @@ -11,6 +11,6 @@ BAR --TEMPLATE(foo.twig)-- {% block c1 %}{% endblock %} --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Runtime: Variable "nothing" does not exist in "index.twig" at line 5. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/multiple.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/multiple.test index da161e6d..9f7b52f1 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/multiple.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/multiple.test @@ -28,7 +28,7 @@ B {% endblock %} C --DATA-- -return array() +return [] --EXPECT-- FOO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/nested.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/nested.test index 81563dce..9f337233 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/nested.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/nested.test @@ -24,7 +24,7 @@ B {% endblock %} C --DATA-- -return array() +return [] --EXPECT-- A block1 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/with_extends.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/with_extends.test index 2c1dd584..ce726ac0 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/with_extends.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/with_extends.test @@ -39,7 +39,7 @@ B {% endblock %} C --DATA-- -return array() +return [] --EXPECT-- A blockc1base diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/basic.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/basic.test index 82094f2f..866171ec 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/basic.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/basic.test @@ -5,6 +5,6 @@ Some text with a {{ var }} {% endfilter %} --DATA-- -return array('var' => 'var') +return ['var' => 'var'] --EXPECT-- SOME TEXT WITH A VAR diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/json_encode.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/json_encode.test index 3e7148bf..a2562b99 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/json_encode.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/json_encode.test @@ -3,6 +3,6 @@ --TEMPLATE-- {% filter json_encode|raw %}test{% endfilter %} --DATA-- -return array() +return [] --EXPECT-- "test" diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/multiple.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/multiple.test index 75512ef9..8eb3cbdd 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/multiple.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/multiple.test @@ -5,6 +5,6 @@ {{ var }} {% endfilter %} --DATA-- -return array('var' => 'VAR') +return ['var' => 'VAR'] --EXPECT-- Var diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/nested.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/nested.test index 7e4e4eb3..6d18e1af 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/nested.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/nested.test @@ -9,7 +9,7 @@ {{ var }} {% endfilter %} --DATA-- -return array('var' => 'var') +return ['var' => 'var'] --EXPECT-- Var Var diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_for_tag.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_for_tag.test index 22745ead..d2d87cfd 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_for_tag.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_for_tag.test @@ -7,7 +7,7 @@ {% endfor %} {% endfilter %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXPECT-- A B diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_if_tag.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_if_tag.test index afd95b29..f2e804bf 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_if_tag.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_if_tag.test @@ -20,7 +20,7 @@ FOO {% endfilter %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXPECT-- A, B diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/condition.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/condition.test index 380531f7..b1ad22fd 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/condition.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/condition.test @@ -5,9 +5,9 @@ {{ loop.index }}.{{ i }}{{ foo.bar }} {% endfor %} --DATA-- -return array('foo' => array('bar' => 'X')) +return ['foo' => ['bar' => 'X']] --CONFIG-- -return array('strict_variables' => false) +return ['strict_variables' => false] --EXPECT-- 1.1X 2.3X diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/context.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/context.test index ddc69307..3cdd575c 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/context.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/context.test @@ -8,7 +8,7 @@ * {{ item }} {% endfor %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXPECT-- * a * b diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/else.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/else.test index 20ccc880..86ec9c28 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/else.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/else.test @@ -7,17 +7,17 @@ no item {% endfor %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXPECT-- * a * b --DATA-- -return array('items' => array()) +return ['items' => []] --EXPECT-- no item --DATA-- -return array() +return [] --CONFIG-- -return array('strict_variables' => false) +return ['strict_variables' => false] --EXPECT-- no item diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/inner_variables.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/inner_variables.test index 49fb9ca6..e1ad3c73 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/inner_variables.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/inner_variables.test @@ -7,7 +7,7 @@ {% endfor %} {% endfor %} --DATA-- -return array('k' => 0) +return ['k' => 0] --EXPECT-- 0 1 1 1 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys.test index 4e22cb47..92135575 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys.test @@ -5,7 +5,7 @@ * {{ key }} {% endfor %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXPECT-- * 0 * 1 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys_and_values.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys_and_values.test index 4c211689..ab39ddf2 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys_and_values.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys_and_values.test @@ -5,7 +5,7 @@ * {{ key }}/{{ item }} {% endfor %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXPECT-- * 0/a * 1/b diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context.test index 93bc76a1..56a60c2e 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context.test @@ -8,7 +8,7 @@ {% endfor %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXPECT-- * 1/0 * 2/1 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context_local.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context_local.test index 58af2c32..58e5a9b3 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context_local.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context_local.test @@ -5,6 +5,6 @@ {% endfor %} {% if loop is not defined %}WORKS{% endif %} --DATA-- -return array('items' => array()) +return ['items' => []] --EXPECT-- WORKS diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined.test index 6a2af63b..e155cdfd 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined.test @@ -5,6 +5,6 @@ {{ loop.last }} {% endfor %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXCEPTION-- Twig_Error_Syntax: The "loop.last" variable is not defined when looping with a condition in "index.twig" at line 3. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined_cond.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined_cond.test index 1e819ca0..88a40f04 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined_cond.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined_cond.test @@ -4,6 +4,6 @@ {% for i, item in items if loop.last > 0 %} {% endfor %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXCEPTION-- Twig_Error_Syntax: The "loop" variable cannot be used in a looping condition in "index.twig" at line 2. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/nested_else.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/nested_else.test index f8b9f6bc..df1bb07a 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/nested_else.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/nested_else.test @@ -11,7 +11,7 @@ no item1 {% endfor %} --DATA-- -return array('items' => array('a', 'b'), 'items1' => array()) +return ['items' => ['a', 'b'], 'items1' => []] --EXPECT-- no a no b diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects.test index 50344379..2ba2d92c 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects.test @@ -18,14 +18,14 @@ --DATA-- class ItemsIterator implements Iterator { - protected $values = array('foo' => 'bar', 'bar' => 'foo'); + protected $values = ['foo' => 'bar', 'bar' => 'foo']; public function current() { return current($this->values); } public function key() { return key($this->values); } public function next() { return next($this->values); } public function rewind() { return reset($this->values); } public function valid() { return false !== current($this->values); } } -return array('items' => new ItemsIterator()) +return ['items' => new ItemsIterator()] --EXPECT-- * bar * 1/0 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects_countable.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects_countable.test index 4a1ff611..69150f25 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects_countable.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects_countable.test @@ -19,7 +19,7 @@ --DATA-- class ItemsIteratorCountable implements Iterator, Countable { - protected $values = array('foo' => 'bar', 'bar' => 'foo'); + protected $values = ['foo' => 'bar', 'bar' => 'foo']; public function current() { return current($this->values); } public function key() { return key($this->values); } public function next() { return next($this->values); } @@ -27,7 +27,7 @@ class ItemsIteratorCountable implements Iterator, Countable public function valid() { return false !== current($this->values); } public function count() { return count($this->values); } } -return array('items' => new ItemsIteratorCountable()) +return ['items' => new ItemsIteratorCountable()] --EXPECT-- * bar * 1/0 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/recursive.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/recursive.test index 17b2e222..3b677d60 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/recursive.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/recursive.test @@ -8,7 +8,7 @@ {% endfor %} {% endfor %} --DATA-- -return array('items' => array('a' => array('a1', 'a2', 'a3'), 'b' => array('b1'))) +return ['items' => ['a' => ['a1', 'a2', 'a3'], 'b' => ['b1']]] --EXPECT-- * a (2): * a1 (3) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/values.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/values.test index 82f2ae8a..384c41b2 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/values.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/values.test @@ -5,7 +5,7 @@ * {{ item }} {% endfor %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXPECT-- * a * b diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/from.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/from.test index 5f5da0ec..1d3c9e2b 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/from.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/from.test @@ -9,6 +9,6 @@ global variables called foobar {% endmacro %} --DATA-- -return array(); +return [] --EXPECT-- called foobar diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/basic.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/basic.test index c1c3d276..a02165e5 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/basic.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/basic.test @@ -9,14 +9,14 @@ NOTHING {% endif %} --DATA-- -return array('a' => 'a') +return ['a' => 'a'] --EXPECT-- a --DATA-- -return array('b' => 'b') +return ['b' => 'b'] --EXPECT-- b --DATA-- -return array() +return [] --EXPECT-- NOTHING diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/expression.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/expression.test index edfb73df..eb65083c 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/expression.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/expression.test @@ -9,14 +9,14 @@ A3 {% endif %} --DATA-- -return array('a' => 1) +return ['a' => 1] --EXPECT-- A1 --DATA-- -return array('a' => 12) +return ['a' => 12] --EXPECT-- A2 --DATA-- -return array('a' => 7) +return ['a' => 7] --EXPECT-- A3 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/basic.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/basic.test index 8fe1a6c1..9982b039 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/basic.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/basic.test @@ -8,7 +8,7 @@ BAR --TEMPLATE(foo.twig)-- FOOBAR --DATA-- -return array() +return [] --EXPECT-- FOO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/expression.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/expression.test index eaeeb112..23db1812 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/expression.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/expression.test @@ -8,7 +8,7 @@ BAR --TEMPLATE(foo.twig)-- FOOBAR --DATA-- -return array('foo' => 'foo.twig') +return ['foo' => 'foo.twig'] --EXPECT-- FOO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/ignore_missing.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/ignore_missing.test index 24aed06d..6c8bdb1e 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/ignore_missing.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/ignore_missing.test @@ -6,5 +6,5 @@ {% include "foo.twig" ignore missing with {} %} {% include "foo.twig" ignore missing with {} only %} --DATA-- -return array() +return [] --EXPECT-- diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing.test index f25e8715..5471e451 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing.test @@ -3,6 +3,6 @@ --TEMPLATE-- {% include "foo.twig" %} --DATA-- -return array(); +return [] --EXCEPTION-- Twig_Error_Loader: Template "foo.twig" is not defined in "index.twig" at line 2. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing_nested.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing_nested.test index 86c18644..f129e656 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing_nested.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing_nested.test @@ -11,6 +11,6 @@ {% include "foo.twig" %} {% endblock %} --DATA-- -return array(); +return [] --EXCEPTION-- Twig_Error_Loader: Template "foo.twig" is not defined in "base.twig" at line 3. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/only.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/only.test index 77760a09..d595f806 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/only.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/only.test @@ -8,7 +8,7 @@ --TEMPLATE(foo.twig)-- {% for k, v in _context %}{{ k }},{% endfor %} --DATA-- -return array('foo' => 'bar') +return ['foo' => 'bar'] --EXPECT-- foo,global,_parent, global,_parent, diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/template_instance.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/template_instance.test index 6ba064a3..4b2285e5 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/template_instance.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/template_instance.test @@ -5,6 +5,6 @@ --TEMPLATE(foo.twig)-- BAR --DATA-- -return array('foo' => $twig->loadTemplate('foo.twig')) +return ['foo' => $twig->loadTemplate('foo.twig')] --EXPECT-- BAR FOO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/templates_as_array.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/templates_as_array.test index ab670ee0..38063952 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/templates_as_array.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/templates_as_array.test @@ -6,7 +6,7 @@ --TEMPLATE(foo.twig)-- foo --DATA-- -return array() +return [] --EXPECT-- foo foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/with_variables.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/with_variables.test index 41384ac7..3b192aeb 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/with_variables.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/with_variables.test @@ -6,7 +6,7 @@ --TEMPLATE(foo.twig)-- {{ foo }} --DATA-- -return array('vars' => array('foo' => 'bar')) +return ['vars' => ['foo' => 'bar']] --EXPECT-- bar bar diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/basic.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/basic.test index 0778a4b4..703b61be 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/basic.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/basic.test @@ -9,6 +9,6 @@ FOO --TEMPLATE(foo.twig)-- {% block content %}{% endblock %} --DATA-- -return array() +return [] --EXPECT-- FOO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr.test index 9a81499a..b7bef646 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr.test @@ -20,13 +20,13 @@ block_expr {%- endblock %} {% endspaceless %} --DATA-- -return array( - 'item' => array( - 'children' => array( +return [ + 'item' => [ + 'children' => [ null, null, - ) - ) -) + ] + ] +] --EXPECT-- Element:
    Element:
    Element:
    diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr2.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr2.test index 3e868c0d..2d22852a 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr2.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr2.test @@ -22,13 +22,13 @@ block_expr2 {%- endblock %} {% endspaceless %} --DATA-- -return array( - 'item' => array( - 'children' => array( +return [ + 'item' => [ + 'children' => [ null, null, - ) - ) -) + ] + ] +] --EXPECT-- Element:
    Element:
    Element:
    diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/conditional.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/conditional.test index 8576e773..bd28248d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/conditional.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/conditional.test @@ -9,6 +9,6 @@ --TEMPLATE(bar.twig)-- {% block content %}BAR{% endblock %} --DATA-- -return array('foo' => 'foo.twig', 'standalone' => true) +return ['foo' => 'foo.twig', 'standalone' => true] --EXPECT-- FOOFOO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/dynamic.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/dynamic.test index ee06ddce..e6a0f017 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/dynamic.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/dynamic.test @@ -9,6 +9,6 @@ FOO --TEMPLATE(foo.twig)-- {% block content %}{% endblock %} --DATA-- -return array('foo' => 'foo.twig') +return ['foo' => 'foo.twig'] --EXPECT-- FOO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/empty.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/empty.test index 784f3571..ca11bf20 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/empty.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/empty.test @@ -5,6 +5,6 @@ --TEMPLATE(foo.twig)-- {% block content %}FOO{% endblock %} --DATA-- -return array() +return [] --EXPECT-- FOO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array.test index a1cb1ce8..4d2cb6c6 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array.test @@ -7,6 +7,6 @@ foo {% endblock %} --DATA-- -return array() +return [] --EXPECT-- foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_empty_name.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_empty_name.test index acc74f6a..51086511 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_empty_name.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_empty_name.test @@ -7,6 +7,6 @@ foo {% endblock %} --DATA-- -return array() +return [] --EXPECT-- foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_null_name.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_null_name.test index cfa648d4..c5ee6f19 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_null_name.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_null_name.test @@ -7,6 +7,6 @@ foo {% endblock %} --DATA-- -return array() +return [] --EXPECT-- foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple.test index dfc2b6c4..fc25badd 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple.test @@ -7,6 +7,6 @@ --TEMPLATE(base.twig)-- {% block content %}base {% endblock %} --DATA-- -return array() +return [] --EXPECT-- base layout index diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple_dynamic.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple_dynamic.test index 1d3e639c..fa887177 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple_dynamic.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple_dynamic.test @@ -13,7 +13,7 @@ --TEMPLATE(2_parent.twig)-- {% block content %}2{% endblock %} --DATA-- -return array() +return [] --EXPECT-- 1 parent diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks.test index faca9259..abea2e9d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks.test @@ -17,6 +17,6 @@ {% endblock %} {% endblock %} --DATA-- -return array() +return [] --EXPECT-- SUBSUBCONTENT diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks_parent_only.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks_parent_only.test index 0ad11d0c..20b7848f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks_parent_only.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks_parent_only.test @@ -10,6 +10,6 @@ {% endblock %} --TEMPLATE(foo.twig)-- --DATA-- -return array() +return [] --EXPECT-- CONTENTSUBCONTENTENDCONTENT diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_inheritance.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_inheritance.test index 71e3cdfd..0b585b48 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_inheritance.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_inheritance.test @@ -11,6 +11,6 @@ --TEMPLATE(base.twig)-- {% block body '' %} --DATA-- -return array() +return [] --EXPECT-- INSIDE diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent.test index 4f975db8..73f4c0ec 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent.test @@ -7,6 +7,6 @@ --TEMPLATE(foo.twig)-- {% block content %}BAR{% endblock %} --DATA-- -return array() +return [] --EXPECT-- BARFOOBAR diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_change.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_change.test index a8bc90ce..01bd544f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_change.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_change.test @@ -7,10 +7,10 @@ FOO --TEMPLATE(bar.twig)-- BAR --DATA-- -return array('foo' => true) +return ['foo' => true] --EXPECT-- FOO --DATA-- -return array('foo' => false) +return ['foo' => false] --EXPECT-- BAR diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_isolation.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_isolation.test index 62816713..58a37bd9 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_isolation.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_isolation.test @@ -13,7 +13,7 @@ {% block footer %}Default Footer{% endblock %} --DATA-- -return array() +return [] --EXPECT-- Included Content Default Footer diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_nested.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_nested.test index 71e7c208..d4347bac 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_nested.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_nested.test @@ -17,7 +17,7 @@ BAR {% endblock %} --DATA-- -return array() +return [] --EXPECT-- INSIDE OVERRIDDEN diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_without_extends_but_traits.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_without_extends_but_traits.test index 63c73055..39882b8b 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_without_extends_but_traits.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_without_extends_but_traits.test @@ -9,6 +9,6 @@ --TEMPLATE(foo.twig)-- {% block content %}BAR{% endblock %} --DATA-- -return array() +return [] --EXPECT-- BAR diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/template_instance.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/template_instance.test index d1876a52..9d62cdba 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/template_instance.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/template_instance.test @@ -9,6 +9,6 @@ --TEMPLATE(foo.twig)-- {% block content %}BAR{% endblock %} --DATA-- -return array('foo' => $twig->loadTemplate('foo.twig')) +return ['foo' => $twig->loadTemplate('foo.twig')] --EXPECT-- BARFOO diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/use.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/use.test index 8f9ece7c..4df32ee9 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/use.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/use.test @@ -35,7 +35,7 @@ {% block content_use2 'content_use2' %} {% block content_use2_only 'content_use2_only' %} --DATA-- -return array() +return [] --EXPECT-- content_parent content_use1 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/basic.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/basic.test index eef0c10d..ae090f9a 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/basic.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/basic.test @@ -10,7 +10,7 @@ {% endmacro %} --DATA-- -return array() +return [] --EXPECT-- diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/endmacro_name.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/endmacro_name.test index ae6203bb..3f3caf77 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/endmacro_name.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/endmacro_name.test @@ -9,7 +9,7 @@ {% macro foo() %}foo{% endmacro %} {% macro bar() %}bar{% endmacro bar %} --DATA-- -return array() +return [] --EXPECT-- foo bar diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/external.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/external.test index 5cd3dae6..b28ca19f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/external.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/external.test @@ -10,7 +10,7 @@ {% endmacro %} --DATA-- -return array() +return [] --EXPECT-- diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/from.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/from.test index 205f5918..8b9aae87 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/from.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/from.test @@ -11,7 +11,7 @@ {% macro foo(name) %}foo{{ name }}{% endmacro %} {% macro bar(name) %}bar{{ name }}{% endmacro %} --DATA-- -return array() +return [] --EXPECT-- foofoo foofoo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/global.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/global.test index 6b371768..832740ea 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/global.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/global.test @@ -8,7 +8,7 @@ --TEMPLATE(forms.twig)-- {% macro foo(name) %}{{ name|default('foo') }}{{ global }}{% endmacro %} --DATA-- -return array() +return [] --EXPECT-- fooglobal fooglobal diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/self_import.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/self_import.test index 17756cb6..ca3157dd 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/self_import.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/self_import.test @@ -10,7 +10,7 @@ {% endmacro %} --DATA-- -return array() +return [] --EXPECT-- diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/special_chars.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/special_chars.test index 37217707..491e91e8 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/special_chars.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/special_chars.test @@ -9,6 +9,6 @@ §{{ foo }}§ {% endmacro %} --DATA-- -return array() +return [] --EXPECT-- §foo§ diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/super_globals.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/super_globals.test index 56794628..643697ce 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/super_globals.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/super_globals.test @@ -9,6 +9,6 @@ Super globals as macro arguments {{ GET }} {% endmacro %} --DATA-- -return array() +return [] --EXPECT-- foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/sandbox/simple.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/sandbox/simple.test index de20f3db..4d232d8b 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/sandbox/simple.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/sandbox/simple.test @@ -14,7 +14,7 @@ sandbox tag --TEMPLATE(foo.twig)-- foo --DATA-- -return array() +return [] --EXPECT-- foo foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/basic.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/basic.test index a5a9f830..aae1427e 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/basic.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/basic.test @@ -11,7 +11,7 @@ {{ foo }}{{ bar }} --DATA-- -return array() +return [] --EXPECT-- foo foo<br /> diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture-empty.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture-empty.test index ec657f00..97fc43cc 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture-empty.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture-empty.test @@ -5,5 +5,5 @@ {% if foo %}FAIL{% endif %} --DATA-- -return array() +return [] --EXPECT-- diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture.test index f156a1a7..c3faf250 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture.test @@ -5,6 +5,6 @@ {{ foo }} --DATA-- -return array() +return [] --EXPECT-- f
    o
    o diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/expression.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/expression.test index 8ff434a0..bd472771 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/expression.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/expression.test @@ -6,7 +6,7 @@ {{ foo }} {{ bar }} --DATA-- -return array() +return [] --EXPECT-- foobar barfoo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/spaceless/simple.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/spaceless/simple.test index dd06dec2..98bd27a1 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/spaceless/simple.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/spaceless/simple.test @@ -7,6 +7,6 @@ {% endspaceless %} --DATA-- -return array() +return [] --EXPECT--
    foo
    diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/special_chars.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/special_chars.test index 789b4ba8..64ffd1d7 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/special_chars.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/special_chars.test @@ -3,6 +3,6 @@ --TEMPLATE-- {% § %} --DATA-- -return array() +return [] --EXPECT-- § diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/trim_block.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/trim_block.test index 1d2273f8..f1a1310a 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/trim_block.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/trim_block.test @@ -51,7 +51,7 @@ Combined: end --DATA-- -return array('leading' => 'leading space', 'trailing' => 'trailing space', 'both' => 'both') +return ['leading' => 'leading space', 'trailing' => 'trailing space', 'both' => 'both'] --EXPECT-- 15 18 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/aliases.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/aliases.test index f887006f..b6b1d5c6 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/aliases.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/aliases.test @@ -7,6 +7,6 @@ --TEMPLATE(blocks.twig)-- {% block content 'foo' %} --DATA-- -return array() +return [] --EXPECT-- foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/basic.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/basic.test index 7364d76d..be622a10 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/basic.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/basic.test @@ -7,6 +7,6 @@ --TEMPLATE(blocks.twig)-- {% block content 'foo' %} --DATA-- -return array() +return [] --EXPECT-- foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep.test index b551a1e6..771ba642 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep.test @@ -15,7 +15,7 @@ {% block content 'bar' %} {% block bar 'bar' %} --DATA-- -return array() +return [] --EXPECT-- foo foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep_empty.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep_empty.test index 05cca682..f14ce83d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep_empty.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep_empty.test @@ -6,5 +6,5 @@ {% use "bar.twig" %} --TEMPLATE(bar.twig)-- --DATA-- -return array() +return [] --EXPECT-- diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance.test index 0d0d470e..1edeaa11 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance.test @@ -19,7 +19,7 @@
    sub_container
    {% endblock %} --DATA-- -return array() +return [] --EXPECT--
    overridden sub_container
    diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance2.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance2.test index df95599c..accec509 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance2.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance2.test @@ -18,7 +18,7 @@
    sub_container
    {% endblock %} --DATA-- -return array() +return [] --EXPECT--
    overridden sub_container
    diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple.test index 198be0c5..85a63958 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple.test @@ -14,7 +14,7 @@ {% block content 'bar' %} {% block bar 'bar' %} --DATA-- -return array() +return [] --EXPECT-- bar foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple_aliases.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple_aliases.test index 8de871a8..413bdfa4 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple_aliases.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple_aliases.test @@ -15,7 +15,7 @@ {% block content 'bar' %} {% block bar 'bar' %} --DATA-- -return array() +return [] --EXPECT-- bar foo diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block.test index 59db23d9..49328f6e 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block.test @@ -17,7 +17,7 @@ Content of block {% endblock foobar %} --DATA-- -return array() +return [] --EXPECT-- Content of block Content of block (first override) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block2.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block2.test index d3f302df..274baa82 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block2.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block2.test @@ -17,7 +17,7 @@ Content of block {% endblock foobar %} --DATA-- -return array() +return [] --EXPECT-- Content of block Content of block (first override) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block3.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block3.test index 95b55a46..f6f22127 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block3.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block3.test @@ -29,7 +29,7 @@ Content of bar {% endblock bar %} --DATA-- -return array() +return [] --EXPECT-- Content of foo Content of foo (first override) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/use_with_parent.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/use_with_parent.test index 3fe2ad83..fad9a2d1 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/use_with_parent.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/use_with_parent.test @@ -17,7 +17,7 @@ --TEMPLATE(blocks.twig)-- {% block content 'BLOCK' %} --DATA-- -return array() +return [] --EXPECT-- PARENT CHILD diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/basic.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/basic.test index a95be557..9b60abc4 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/basic.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/basic.test @@ -5,6 +5,6 @@ {{ foo }} {% endverbatim %} --DATA-- -return array() +return [] --EXPECT-- {{ foo }} diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/whitespace_control.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/whitespace_control.test index eb610444..501922bd 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/whitespace_control.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/whitespace_control.test @@ -37,7 +37,7 @@ 5*** --DATA-- -return array() +return [] --EXPECT-- 1*** {{ 'bla' }} diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/basic.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/basic.test index 264ca5e7..7c2abd0f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/basic.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/basic.test @@ -7,7 +7,7 @@ {% endwith %} {{ foo }}{{ bar }} --DATA-- -return array('foo' => 'foo', 'bar' => 'bar') +return ['foo' => 'foo', 'bar' => 'bar'] --EXPECT-- fooBAZ foobar diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/expression.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/expression.test index 32ed0916..e4433d44 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/expression.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/expression.test @@ -5,6 +5,6 @@ {{ foo }}{{ bar }} {% endwith %} --DATA-- -return array('foo' => 'baz') +return ['foo' => 'baz'] --EXPECT-- fooBAZ diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/nested.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/nested.test index 98e3aef4..33ca390b 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/nested.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/nested.test @@ -9,7 +9,7 @@ nested "with" tags {% endwith %} {{ foo }}{{ bar }} --DATA-- -return array() +return [] --EXPECT-- FOOBAZ foobar diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_no_hash.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_no_hash.test index 93689f42..3e5395c8 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_no_hash.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_no_hash.test @@ -5,6 +5,6 @@ {{ foo }}{{ bar }} {% endwith %} --DATA-- -return array('vars' => 'no-hash') +return ['vars' => 'no-hash'] --EXCEPTION-- Twig_Error_Runtime: Variables passed to the "with" tag must be a hash in "index.twig" at line 2. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_only.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_only.test index 6247617e..dba30bd5 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_only.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_only.test @@ -5,6 +5,6 @@ {{ foo }}{{ bar }}{{ baz }} {% endwith %} --DATA-- -return array('foo' => 'baz', 'baz' => 'baz') +return ['foo' => 'baz', 'baz' => 'baz'] --EXCEPTION-- Twig_Error_Runtime: Variable "baz" does not exist in "index.twig" at line 3. diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/array.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/array.test index 1429d375..7c9a6c80 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/array.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/array.test @@ -5,15 +5,15 @@ array index test {{ key }} {% endfor %} --DATA-- -return array('days' => array( - 1 => array('money' => 9), - 2 => array('money' => 21), - 3 => array('money' => 38), - 4 => array('money' => 6), - 18 => array('money' => 6), - 19 => array('money' => 3), - 31 => array('money' => 11), -)); +return ['days' => [ + 1 => ['money' => 9], + 2 => ['money' => 21], + 3 => ['money' => 38], + 4 => ['money' => 6], + 18 => ['money' => 6], + 19 => ['money' => 3], + 31 => ['money' => 11], +]] --EXPECT-- 1 2 diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/constant.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/constant.test index 60218ac0..62d7806b 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/constant.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/constant.test @@ -6,7 +6,7 @@ {{ value is constant('TwigTestFoo::BAR_NAME') ? 'ok' : 'no' }} {{ 2 is constant('ARRAY_AS_PROPS', object) ? 'ok' : 'no' }} --DATA-- -return array('value' => 'bar', 'object' => new ArrayObject(array('hi'))); +return ['value' => 'bar', 'object' => new ArrayObject(['hi'])] --EXPECT-- ok ok diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined.test index d4e204ef..879c651e 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined.test @@ -34,18 +34,18 @@ {{ [1, 2] is defined ? 'ok' : 'ko' }} {{ { foo: "bar" } is defined ? 'ok' : 'ko' }} --DATA-- -return array( +return [ 'definedVar' => 'defined', 'zeroVar' => 0, 'nullVar' => null, - 'nested' => array( + 'nested' => [ 'definedVar' => 'defined', 'zeroVar' => 0, 'nullVar' => null, - 'definedArray' => array(0), - ), + 'definedArray' => [0], + ], 'object' => new TwigTestFoo(), -); +] --EXPECT-- ok ok @@ -80,20 +80,20 @@ ok ok ok --DATA-- -return array( +return [ 'definedVar' => 'defined', 'zeroVar' => 0, 'nullVar' => null, - 'nested' => array( + 'nested' => [ 'definedVar' => 'defined', 'zeroVar' => 0, 'nullVar' => null, - 'definedArray' => array(0), - ), + 'definedArray' => [0], + ], 'object' => new TwigTestFoo(), -); +] --CONFIG-- -return array('strict_variables' => false) +return ['strict_variables' => false] --EXPECT-- ok ok diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_attribute.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_attribute.test index 4a5b8dcd..5fd2fe3f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_attribute.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_attribute.test @@ -6,28 +6,28 @@ {{ attribute(nested, definedVarName) is defined ? 'ok' : 'ko' }} {{ attribute(nested, undefinedVarName) is not defined ? 'ok' : 'ko' }} --DATA-- -return array( - 'nested' => array( +return [ + 'nested' => [ 'definedVar' => 'defined', - ), + ], 'definedVarName' => 'definedVar', 'undefinedVarName' => 'undefinedVar', -); +] --EXPECT-- ok ok ok ok --DATA-- -return array( - 'nested' => array( +return [ + 'nested' => [ 'definedVar' => 'defined', - ), + ], 'definedVarName' => 'definedVar', 'undefinedVarName' => 'undefinedVar', -); +] --CONFIG-- -return array('strict_variables' => false) +return ['strict_variables' => false] --EXPECT-- ok ok diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks.test index 64d7d043..c8b90f8c 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks.test @@ -26,7 +26,7 @@ --TEMPLATE(blocks)-- {% block block1 %}{%endblock %} --DATA-- -return array() +return [] --EXPECT-- ok ko diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks_with_template.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks_with_template.test index 2c651657..f713cd23 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks_with_template.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks_with_template.test @@ -7,10 +7,10 @@ --TEMPLATE(included.twig)-- {% block foo %}FOO{% endblock %} --DATA-- -return array( +return [ 'included_loaded' => $twig->load('included.twig'), 'included_loaded_internal' => $twig->loadTemplate('included.twig'), -) +] --EXPECT-- ok ok diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_constants.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_constants.test index 2fa9929d..4a5d4526 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_constants.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_constants.test @@ -6,7 +6,7 @@ {{ constant('FOOBAR') is not defined ? 'ok' : 'ko' }} {{ constant('FOOBAR', object) is not defined ? 'ok' : 'ko' }} --DATA-- -return array('expect' => DATE_W3C, 'object' => new ArrayObject(array('hi'))); +return ['expect' => DATE_W3C, 'object' => new ArrayObject(['hi'])] --EXPECT-- ok ok diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/empty.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/empty.test index 807c0ed4..f227cda9 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/empty.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/empty.test @@ -16,15 +16,15 @@ {{ markup_empty is empty ? 'ok' : 'ko' }} {{ markup_not_empty is empty ? 'ko' : 'ok' }} --DATA-- -return array( +return [ 'string_empty' => '', 'string_zero' => '0', 'value_null' => null, 'value_false' => false, 'value_int_zero' => 0, - 'array_empty' => array(), 'array_not_empty' => array(1, 2), + 'array_empty' => [], 'array_not_empty' => [1, 2], 'magically_callable' => new MagicCallStub(), - 'countable_empty' => new CountableStub(array()), 'countable_not_empty' => new CountableStub(array(1, 2)), + 'countable_empty' => new CountableStub([]), 'countable_not_empty' => new CountableStub([1, 2]), 'tostring_empty' => new ToStringStub(''), 'tostring_not_empty' => new ToStringStub('0' /* edge case of using "0" as the string */), 'markup_empty' => new Twig_Markup('', 'UTF-8'), 'markup_not_empty' => new Twig_Markup('test', 'UTF-8'), -); +] --EXPECT-- ok ok diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/even.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/even.test index 695b4c2f..5c73b01e 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/even.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/even.test @@ -6,7 +6,7 @@ {{ 1 is not even ? 'ok' : 'ko' }} {{ 2 is not even ? 'ko' : 'ok' }} --DATA-- -return array() +return [] --EXPECT-- ok ok diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test index fc7c3b21..c4ffea1f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test @@ -74,7 +74,7 @@ TRUE {{ 5.5 in '125.5' ? 'TRUE' : 'FALSE' }} {{ '5.5' in 125.5 ? 'TRUE' : 'FALSE' }} --DATA-- -return array('bar' => 'bar', 'foo' => array('bar' => 'bar'), 'dir_object' => new SplFileInfo(__DIR__), 'object' => new stdClass(), 'resource' => opendir(__DIR__)) +return ['bar' => 'bar', 'foo' => ['bar' => 'bar'], 'dir_object' => new SplFileInfo(__DIR__), 'object' => new stdClass(), 'resource' => opendir(__DIR__)] --EXPECT-- TRUE TRUE diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test index 8e08061b..b53eb067 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test @@ -11,9 +11,9 @@ $foo1 = new TwigTestFoo(); $foo->position = $foo1; $foo1->position = $foo; -return array( +return [ 'object' => $foo, - 'object_list' => array($foo1, $foo), -); + 'object_list' => [$foo1, $foo], +] --EXPECT-- TRUE diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/iterable.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/iterable.test index ec525501..584c38cf 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/iterable.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/iterable.test @@ -6,12 +6,12 @@ {{ obj is iterable ? 'ok' : 'ko' }} {{ val is iterable ? 'ok' : 'ko' }} --DATA-- -return array( - 'foo' => array(), - 'traversable' => new ArrayIterator(array()), +return [ + 'foo' => [], + 'traversable' => new ArrayIterator([]), 'obj' => new stdClass(), 'val' => 'test', -); +] --EXPECT-- ok ok diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/null_coalesce.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/null_coalesce.test index 3d148c89..7af3255d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/null_coalesce.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/null_coalesce.test @@ -14,7 +14,7 @@ Twig supports the ?? operator {{ 1 + nope ?? nada ?? 2 }} {{ 1 + nope ?? 3 + nada ?? 2 }} --DATA-- -return array('bar' => 'OK', 'foo' => array('bar' => 'OK')) +return ['bar' => 'OK', 'foo' => ['bar' => 'OK']] --EXPECT-- OK OK diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/odd.test b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/odd.test index 1b8311e3..ec88bb51 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/odd.test +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/odd.test @@ -4,7 +4,7 @@ {{ 1 is odd ? 'ok' : 'ko' }} {{ 2 is odd ? 'ko' : 'ok' }} --DATA-- -return array() +return [] --EXPECT-- ok ok \ No newline at end of file diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php index 027180f1..d15c39e9 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php @@ -20,14 +20,14 @@ class Twig_Tests_IntegrationTest extends Twig_Test_IntegrationTestCase { public function getExtensions() { - $policy = new Twig_Sandbox_SecurityPolicy(array(), array(), array(), array(), array()); + $policy = new Twig_Sandbox_SecurityPolicy([], [], [], [], []); - return array( + return [ new Twig_Extension_Debug(), new Twig_Extension_Sandbox($policy, false), new Twig_Extension_StringLoader(), new TwigTestExtension(), - ); + ]; } public function getFixturesDir() @@ -46,7 +46,7 @@ class TwigTestFoo implements Iterator const BAR_NAME = 'bar'; public $position = 0; - public $array = array(1, 2); + public $array = [1, 2]; public function bar($param1 = null, $param2 = null) { @@ -128,49 +128,50 @@ class TwigTestExtension extends Twig_Extension { public function getTokenParsers() { - return array( + return [ new TwigTestTokenParser_§(), - ); + ]; } public function getFilters() { - return array( - new Twig_Filter('§', array($this, '§Filter')), - new Twig_Filter('escape_and_nl2br', array($this, 'escape_and_nl2br'), array('needs_environment' => true, 'is_safe' => array('html'))), - new Twig_Filter('nl2br', array($this, 'nl2br'), array('pre_escape' => 'html', 'is_safe' => array('html'))), - new Twig_Filter('escape_something', array($this, 'escape_something'), array('is_safe' => array('something'))), - new Twig_Filter('preserves_safety', array($this, 'preserves_safety'), array('preserves_safety' => array('html'))), + return [ + new Twig_Filter('§', [$this, '§Filter']), + new Twig_Filter('escape_and_nl2br', [$this, 'escape_and_nl2br'], ['needs_environment' => true, 'is_safe' => ['html']]), + new Twig_Filter('nl2br', [$this, 'nl2br'], ['pre_escape' => 'html', 'is_safe' => ['html']]), + new Twig_Filter('escape_something', [$this, 'escape_something'], ['is_safe' => ['something']]), + new Twig_Filter('preserves_safety', [$this, 'preserves_safety'], ['preserves_safety' => ['html']]), new Twig_Filter('static_call_string', 'TwigTestExtension::staticCall'), - new Twig_Filter('static_call_array', array('TwigTestExtension', 'staticCall')), - new Twig_Filter('magic_call', array($this, 'magicCall')), + new Twig_Filter('static_call_array', ['TwigTestExtension', 'staticCall']), + new Twig_Filter('magic_call', [$this, 'magicCall']), new Twig_Filter('magic_call_string', 'TwigTestExtension::magicStaticCall'), - new Twig_Filter('magic_call_array', array('TwigTestExtension', 'magicStaticCall')), - new Twig_Filter('*_path', array($this, 'dynamic_path')), - new Twig_Filter('*_foo_*_bar', array($this, 'dynamic_foo')), + new Twig_Filter('magic_call_array', ['TwigTestExtension', 'magicStaticCall']), + new Twig_Filter('*_path', [$this, 'dynamic_path']), + new Twig_Filter('*_foo_*_bar', [$this, 'dynamic_foo']), new Twig_Filter('anon_foo', function ($name) { return '*'.$name.'*'; }), - ); + ]; } public function getFunctions() { - return array( - new Twig_Function('§', array($this, '§Function')), - new Twig_Function('safe_br', array($this, 'br'), array('is_safe' => array('html'))), - new Twig_Function('unsafe_br', array($this, 'br')), + return [ + new Twig_Function('§', [$this, '§Function']), + new Twig_Function('safe_br', [$this, 'br'], ['is_safe' => ['html']]), + new Twig_Function('unsafe_br', [$this, 'br']), new Twig_Function('static_call_string', 'TwigTestExtension::staticCall'), - new Twig_Function('static_call_array', array('TwigTestExtension', 'staticCall')), - new Twig_Function('*_path', array($this, 'dynamic_path')), - new Twig_Function('*_foo_*_bar', array($this, 'dynamic_foo')), + new Twig_Function('static_call_array', ['TwigTestExtension', 'staticCall']), + new Twig_Function('*_path', [$this, 'dynamic_path']), + new Twig_Function('*_foo_*_bar', [$this, 'dynamic_foo']), new Twig_Function('anon_foo', function ($name) { return '*'.$name.'*'; }), - ); + ]; } public function getTests() { - return array( - new Twig_Test('multi word', array($this, 'is_multi_word')), - ); + return [ + new Twig_Test('multi word', [$this, 'is_multi_word']), + new Twig_Test('test_*', [$this, 'dynamic_test']), + ]; } public function §Filter($value) @@ -211,6 +212,11 @@ class TwigTestExtension extends Twig_Extension return $foo.'/'.$bar.'/'.$item; } + public function dynamic_test($element, $item) + { + return $element === $item; + } + public function escape_something($value) { return strtoupper($value); diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/LexerTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/LexerTest.php index b99ba742..9c131a34 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/LexerTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/LexerTest.php @@ -159,10 +159,10 @@ class Twig_Tests_LexerTest extends \PHPUnit\Framework\TestCase public function testStringWithEscapedDelimiter() { - $tests = array( + $tests = [ "{{ 'foo \' bar' }}" => 'foo \' bar', '{{ "foo \" bar" }}' => 'foo " bar', - ); + ]; $lexer = new Twig_Lexer(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); foreach ($tests as $template => $expected) { diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Loader/ArrayTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Loader/ArrayTest.php index 1fc9d2db..5c7e8b8f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Loader/ArrayTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Loader/ArrayTest.php @@ -16,24 +16,24 @@ class Twig_Tests_Loader_ArrayTest extends \PHPUnit\Framework\TestCase */ public function testGetSourceContextWhenTemplateDoesNotExist() { - $loader = new Twig_Loader_Array(array()); + $loader = new Twig_Loader_Array([]); $loader->getSourceContext('foo'); } public function testGetCacheKey() { - $loader = new Twig_Loader_Array(array('foo' => 'bar')); + $loader = new Twig_Loader_Array(['foo' => 'bar']); $this->assertEquals('foo:bar', $loader->getCacheKey('foo')); } public function testGetCacheKeyWhenTemplateHasDuplicateContent() { - $loader = new Twig_Loader_Array(array( + $loader = new Twig_Loader_Array([ 'foo' => 'bar', 'baz' => 'bar', - )); + ]); $this->assertEquals('foo:bar', $loader->getCacheKey('foo')); $this->assertEquals('baz:bar', $loader->getCacheKey('baz')); @@ -41,10 +41,10 @@ class Twig_Tests_Loader_ArrayTest extends \PHPUnit\Framework\TestCase public function testGetCacheKeyIsProtectedFromEdgeCollisions() { - $loader = new Twig_Loader_Array(array( + $loader = new Twig_Loader_Array([ 'foo__' => 'bar', 'foo' => '__bar', - )); + ]); $this->assertEquals('foo__:bar', $loader->getCacheKey('foo__')); $this->assertEquals('foo:__bar', $loader->getCacheKey('foo')); @@ -55,14 +55,14 @@ class Twig_Tests_Loader_ArrayTest extends \PHPUnit\Framework\TestCase */ public function testGetCacheKeyWhenTemplateDoesNotExist() { - $loader = new Twig_Loader_Array(array()); + $loader = new Twig_Loader_Array([]); $loader->getCacheKey('foo'); } public function testSetTemplate() { - $loader = new Twig_Loader_Array(array()); + $loader = new Twig_Loader_Array([]); $loader->setTemplate('foo', 'bar'); $this->assertEquals('bar', $loader->getSourceContext('foo')->getCode()); @@ -70,7 +70,7 @@ class Twig_Tests_Loader_ArrayTest extends \PHPUnit\Framework\TestCase public function testIsFresh() { - $loader = new Twig_Loader_Array(array('foo' => 'bar')); + $loader = new Twig_Loader_Array(['foo' => 'bar']); $this->assertTrue($loader->isFresh('foo', time())); } @@ -79,7 +79,7 @@ class Twig_Tests_Loader_ArrayTest extends \PHPUnit\Framework\TestCase */ public function testIsFreshWhenTemplateDoesNotExist() { - $loader = new Twig_Loader_Array(array()); + $loader = new Twig_Loader_Array([]); $loader->isFresh('foo', time()); } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Loader/ChainTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Loader/ChainTest.php index d02f292b..d5f43889 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Loader/ChainTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Loader/ChainTest.php @@ -14,11 +14,11 @@ class Twig_Tests_Loader_ChainTest extends \PHPUnit\Framework\TestCase public function testGetSourceContext() { $path = __DIR__.'/../Fixtures'; - $loader = new Twig_Loader_Chain(array( - new Twig_Loader_Array(array('foo' => 'bar')), - new Twig_Loader_Array(array('errors/index.html' => 'baz')), - new Twig_Loader_Filesystem(array($path)), - )); + $loader = new Twig_Loader_Chain([ + new Twig_Loader_Array(['foo' => 'bar']), + new Twig_Loader_Array(['errors/index.html' => 'baz']), + new Twig_Loader_Filesystem([$path]), + ]); $this->assertEquals('foo', $loader->getSourceContext('foo')->getName()); $this->assertSame('', $loader->getSourceContext('foo')->getPath()); @@ -37,17 +37,17 @@ class Twig_Tests_Loader_ChainTest extends \PHPUnit\Framework\TestCase */ public function testGetSourceContextWhenTemplateDoesNotExist() { - $loader = new Twig_Loader_Chain(array()); + $loader = new Twig_Loader_Chain([]); $loader->getSourceContext('foo'); } public function testGetCacheKey() { - $loader = new Twig_Loader_Chain(array( - new Twig_Loader_Array(array('foo' => 'bar')), - new Twig_Loader_Array(array('foo' => 'foobar', 'bar' => 'foo')), - )); + $loader = new Twig_Loader_Chain([ + new Twig_Loader_Array(['foo' => 'bar']), + new Twig_Loader_Array(['foo' => 'foobar', 'bar' => 'foo']), + ]); $this->assertEquals('foo:bar', $loader->getCacheKey('foo')); $this->assertEquals('bar:foo', $loader->getCacheKey('bar')); @@ -58,7 +58,7 @@ class Twig_Tests_Loader_ChainTest extends \PHPUnit\Framework\TestCase */ public function testGetCacheKeyWhenTemplateDoesNotExist() { - $loader = new Twig_Loader_Chain(array()); + $loader = new Twig_Loader_Chain([]); $loader->getCacheKey('foo'); } @@ -66,7 +66,7 @@ class Twig_Tests_Loader_ChainTest extends \PHPUnit\Framework\TestCase public function testAddLoader() { $loader = new Twig_Loader_Chain(); - $loader->addLoader(new Twig_Loader_Array(array('foo' => 'bar'))); + $loader->addLoader(new Twig_Loader_Array(['foo' => 'bar'])); $this->assertEquals('bar', $loader->getSourceContext('foo')->getCode()); } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php index a55f6869..0b920225 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php @@ -14,7 +14,7 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase public function testGetSourceContext() { $path = __DIR__.'/../Fixtures'; - $loader = new Twig_Loader_Filesystem(array($path)); + $loader = new Twig_Loader_Filesystem([$path]); $this->assertEquals('errors/index.html', $loader->getSourceContext('errors/index.html')->getName()); $this->assertEquals(realpath($path.'/errors/index.html'), realpath($loader->getSourceContext('errors/index.html')->getPath())); } @@ -24,7 +24,7 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase */ public function testSecurity($template) { - $loader = new Twig_Loader_Filesystem(array(__DIR__.'/../Fixtures')); + $loader = new Twig_Loader_Filesystem([__DIR__.'/../Fixtures']); try { $loader->getCacheKey($template); @@ -36,27 +36,27 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase public function getSecurityTests() { - return array( - array("AutoloaderTest\0.php"), - array('..\\AutoloaderTest.php'), - array('..\\\\\\AutoloaderTest.php'), - array('../AutoloaderTest.php'), - array('..////AutoloaderTest.php'), - array('./../AutoloaderTest.php'), - array('.\\..\\AutoloaderTest.php'), - array('././././././../AutoloaderTest.php'), - array('.\\./.\\./.\\./../AutoloaderTest.php'), - array('foo/../../AutoloaderTest.php'), - array('foo\\..\\..\\AutoloaderTest.php'), - array('foo/../bar/../../AutoloaderTest.php'), - array('foo/bar/../../../AutoloaderTest.php'), - array('filters/../../AutoloaderTest.php'), - array('filters//..//..//AutoloaderTest.php'), - array('filters\\..\\..\\AutoloaderTest.php'), - array('filters\\\\..\\\\..\\\\AutoloaderTest.php'), - array('filters\\//../\\/\\..\\AutoloaderTest.php'), - array('/../AutoloaderTest.php'), - ); + return [ + ["AutoloaderTest\0.php"], + ['..\\AutoloaderTest.php'], + ['..\\\\\\AutoloaderTest.php'], + ['../AutoloaderTest.php'], + ['..////AutoloaderTest.php'], + ['./../AutoloaderTest.php'], + ['.\\..\\AutoloaderTest.php'], + ['././././././../AutoloaderTest.php'], + ['.\\./.\\./.\\./../AutoloaderTest.php'], + ['foo/../../AutoloaderTest.php'], + ['foo\\..\\..\\AutoloaderTest.php'], + ['foo/../bar/../../AutoloaderTest.php'], + ['foo/bar/../../../AutoloaderTest.php'], + ['filters/../../AutoloaderTest.php'], + ['filters//..//..//AutoloaderTest.php'], + ['filters\\..\\..\\AutoloaderTest.php'], + ['filters\\\\..\\\\..\\\\AutoloaderTest.php'], + ['filters\\//../\\/\\..\\AutoloaderTest.php'], + ['/../AutoloaderTest.php'], + ]; } /** @@ -64,27 +64,27 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase */ public function testPaths($basePath, $cacheKey, $rootPath) { - $loader = new Twig_Loader_Filesystem(array($basePath.'/normal', $basePath.'/normal_bis'), $rootPath); - $loader->setPaths(array($basePath.'/named', $basePath.'/named_bis'), 'named'); + $loader = new Twig_Loader_Filesystem([$basePath.'/normal', $basePath.'/normal_bis'], $rootPath); + $loader->setPaths([$basePath.'/named', $basePath.'/named_bis'], 'named'); $loader->addPath($basePath.'/named_ter', 'named'); $loader->addPath($basePath.'/normal_ter'); $loader->prependPath($basePath.'/normal_final'); $loader->prependPath($basePath.'/named/../named_quater', 'named'); $loader->prependPath($basePath.'/named_final', 'named'); - $this->assertEquals(array( + $this->assertEquals([ $basePath.'/normal_final', $basePath.'/normal', $basePath.'/normal_bis', $basePath.'/normal_ter', - ), $loader->getPaths()); - $this->assertEquals(array( + ], $loader->getPaths()); + $this->assertEquals([ $basePath.'/named_final', $basePath.'/named/../named_quater', $basePath.'/named', $basePath.'/named_bis', $basePath.'/named_ter', - ), $loader->getPaths('named')); + ], $loader->getPaths('named')); // do not use realpath here as it would make the test unuseful $this->assertEquals($cacheKey, str_replace('\\', '/', $loader->getCacheKey('@named/named_absolute.html'))); @@ -95,55 +95,55 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase public function getBasePaths() { - return array( - array( + return [ + [ __DIR__.'/Fixtures', 'test/Twig/Tests/Loader/Fixtures/named_quater/named_absolute.html', null, - ), - array( + ], + [ __DIR__.'/Fixtures/../Fixtures', 'test/Twig/Tests/Loader/Fixtures/named_quater/named_absolute.html', null, - ), - array( + ], + [ 'test/Twig/Tests/Loader/Fixtures', 'test/Twig/Tests/Loader/Fixtures/named_quater/named_absolute.html', getcwd(), - ), - array( + ], + [ 'Fixtures', 'Fixtures/named_quater/named_absolute.html', getcwd().'/test/Twig/Tests/Loader', - ), - array( + ], + [ 'Fixtures', 'Fixtures/named_quater/named_absolute.html', getcwd().'/test/../test/Twig/Tests/Loader', - ), - ); + ], + ]; } public function testEmptyConstructor() { $loader = new Twig_Loader_Filesystem(); - $this->assertEquals(array(), $loader->getPaths()); + $this->assertEquals([], $loader->getPaths()); } public function testGetNamespaces() { $loader = new Twig_Loader_Filesystem(sys_get_temp_dir()); - $this->assertEquals(array(Twig_Loader_Filesystem::MAIN_NAMESPACE), $loader->getNamespaces()); + $this->assertEquals([Twig_Loader_Filesystem::MAIN_NAMESPACE], $loader->getNamespaces()); $loader->addPath(sys_get_temp_dir(), 'named'); - $this->assertEquals(array(Twig_Loader_Filesystem::MAIN_NAMESPACE, 'named'), $loader->getNamespaces()); + $this->assertEquals([Twig_Loader_Filesystem::MAIN_NAMESPACE, 'named'], $loader->getNamespaces()); } public function testFindTemplateExceptionNamespace() { $basePath = __DIR__.'/Fixtures'; - $loader = new Twig_Loader_Filesystem(array($basePath.'/normal')); + $loader = new Twig_Loader_Filesystem([$basePath.'/normal']); $loader->addPath($basePath.'/named', 'named'); try { @@ -158,7 +158,7 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase { $basePath = __DIR__.'/Fixtures'; - $loader = new Twig_Loader_Filesystem(array($basePath.'/normal')); + $loader = new Twig_Loader_Filesystem([$basePath.'/normal']); $loader->addPath($basePath.'/named', 'named'); // prime the cache for index.html in the named namespace @@ -171,7 +171,7 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase public function testLoadTemplateAndRenderBlockWithCache() { - $loader = new Twig_Loader_Filesystem(array()); + $loader = new Twig_Loader_Filesystem([]); $loader->addPath(__DIR__.'/Fixtures/themes/theme2'); $loader->addPath(__DIR__.'/Fixtures/themes/theme1'); $loader->addPath(__DIR__.'/Fixtures/themes/theme1', 'default_theme'); @@ -179,20 +179,20 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase $twig = new Twig_Environment($loader); $template = $twig->loadTemplate('blocks.html.twig'); - $this->assertSame('block from theme 1', $template->renderBlock('b1', array())); + $this->assertSame('block from theme 1', $template->renderBlock('b1', [])); $template = $twig->loadTemplate('blocks.html.twig'); - $this->assertSame('block from theme 2', $template->renderBlock('b2', array())); + $this->assertSame('block from theme 2', $template->renderBlock('b2', [])); } public function getArrayInheritanceTests() { - return array( - 'valid array inheritance' => array('array_inheritance_valid_parent.html.twig'), - 'array inheritance with null first template' => array('array_inheritance_null_parent.html.twig'), - 'array inheritance with empty first template' => array('array_inheritance_empty_parent.html.twig'), - 'array inheritance with non-existent first template' => array('array_inheritance_nonexistent_parent.html.twig'), - ); + return [ + 'valid array inheritance' => ['array_inheritance_valid_parent.html.twig'], + 'array inheritance with null first template' => ['array_inheritance_null_parent.html.twig'], + 'array inheritance with empty first template' => ['array_inheritance_empty_parent.html.twig'], + 'array inheritance with non-existent first template' => ['array_inheritance_nonexistent_parent.html.twig'], + ]; } /** @@ -202,22 +202,37 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase */ public function testArrayInheritance($templateName) { - $loader = new Twig_Loader_Filesystem(array()); + $loader = new Twig_Loader_Filesystem([]); $loader->addPath(__DIR__.'/Fixtures/inheritance'); $twig = new Twig_Environment($loader); $template = $twig->loadTemplate($templateName); - $this->assertSame('VALID Child', $template->renderBlock('body', array())); + $this->assertSame('VALID Child', $template->renderBlock('body', [])); } public function testLoadTemplateFromPhar() { - $loader = new Twig_Loader_Filesystem(array()); + $loader = new Twig_Loader_Filesystem([]); // phar-sample.phar was created with the following script: // $f = new Phar('phar-test.phar'); // $f->addFromString('hello.twig', 'hello from phar'); $loader->addPath('phar://'.__DIR__.'/Fixtures/phar/phar-sample.phar'); $this->assertSame('hello from phar', $loader->getSourceContext('hello.twig')->getCode()); } + + public function testTemplateExistsAlwaysReturnsBool() + { + $loader = new Twig_Loader_Filesystem([]); + $this->assertFalse($loader->exists("foo\0.twig")); + $this->assertFalse($loader->exists('../foo.twig')); + $this->assertFalse($loader->exists('@foo')); + $this->assertFalse($loader->exists('foo')); + $this->assertFalse($loader->exists('@foo/bar.twig')); + + $loader->addPath(__DIR__.'/Fixtures/normal'); + $this->assertTrue($loader->exists('index.html')); + $loader->addPath(__DIR__.'/Fixtures/normal', 'foo'); + $this->assertTrue($loader->exists('@foo/index.html')); + } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/AutoEscapeTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/AutoEscapeTest.php index 25d16023..1c9f0939 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/AutoEscapeTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/AutoEscapeTest.php @@ -13,7 +13,7 @@ class Twig_Tests_Node_AutoEscapeTest extends Twig_Test_NodeTestCase { public function testConstructor() { - $body = new Twig_Node(array(new Twig_Node_Text('foo', 1))); + $body = new Twig_Node([new Twig_Node_Text('foo', 1)]); $node = new Twig_Node_AutoEscape(true, $body, 1); $this->assertEquals($body, $node->getNode('body')); @@ -22,11 +22,11 @@ class Twig_Tests_Node_AutoEscapeTest extends Twig_Test_NodeTestCase public function getTests() { - $body = new Twig_Node(array(new Twig_Node_Text('foo', 1))); + $body = new Twig_Node([new Twig_Node_Text('foo', 1)]); $node = new Twig_Node_AutoEscape(true, $body, 1); - return array( - array($node, "// line 1\necho \"foo\";"), - ); + return [ + [$node, "// line 1\necho \"foo\";"], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/BlockReferenceTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/BlockReferenceTest.php index 84dac9bf..0eb60ca0 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/BlockReferenceTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/BlockReferenceTest.php @@ -20,12 +20,12 @@ class Twig_Tests_Node_BlockReferenceTest extends Twig_Test_NodeTestCase public function getTests() { - return array( - array(new Twig_Node_BlockReference('foo', 1), <<displayBlock('foo', \$context, \$blocks); EOF - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/BlockTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/BlockTest.php index e7246dcc..0b347df0 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/BlockTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/BlockTest.php @@ -25,15 +25,15 @@ class Twig_Tests_Node_BlockTest extends Twig_Test_NodeTestCase $body = new Twig_Node_Text('foo', 1); $node = new Twig_Node_Block('foo', $body, 1); - return array( - array($node, <<assertEquals($foo, $node->getNode(1)); @@ -21,17 +21,17 @@ class Twig_Tests_Node_Expression_ArrayTest extends Twig_Test_NodeTestCase public function getTests() { - $elements = array( + $elements = [ new Twig_Node_Expression_Constant('foo', 1), new Twig_Node_Expression_Constant('bar', 1), new Twig_Node_Expression_Constant('bar', 1), new Twig_Node_Expression_Constant('foo', 1), - ); + ]; $node = new Twig_Node_Expression_Array($elements, 1); - return array( - array($node, 'array("foo" => "bar", "bar" => "foo")'), - ); + return [ + [$node, '["foo" => "bar", "bar" => "foo"]'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/AssignNameTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/AssignNameTest.php index bf365de4..a325f0b4 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/AssignNameTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/AssignNameTest.php @@ -22,8 +22,8 @@ class Twig_Tests_Node_Expression_AssignNameTest extends Twig_Test_NodeTestCase { $node = new Twig_Node_Expression_AssignName('foo', 1); - return array( - array($node, '$context["foo"]'), - ); + return [ + [$node, '$context["foo"]'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AddTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AddTest.php index 02310a1b..333b2056 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AddTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AddTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_AddTest extends Twig_Test_NodeTestCase $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_Add($left, $right, 1); - return array( - array($node, '(1 + 2)'), - ); + return [ + [$node, '(1 + 2)'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AndTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AndTest.php index 2df3c8e4..56c055e7 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AndTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AndTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_AndTest extends Twig_Test_NodeTestCase $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_And($left, $right, 1); - return array( - array($node, '(1 && 2)'), - ); + return [ + [$node, '(1 && 2)'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ConcatTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ConcatTest.php index 759e4828..e83712e5 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ConcatTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ConcatTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_ConcatTest extends Twig_Test_NodeTestCas $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_Concat($left, $right, 1); - return array( - array($node, '(1 . 2)'), - ); + return [ + [$node, '(1 . 2)'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/DivTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/DivTest.php index 0e54b10a..011e7ce4 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/DivTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/DivTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_DivTest extends Twig_Test_NodeTestCase $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_Div($left, $right, 1); - return array( - array($node, '(1 / 2)'), - ); + return [ + [$node, '(1 / 2)'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/FloorDivTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/FloorDivTest.php index 5813dce6..1131a4e2 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/FloorDivTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/FloorDivTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_FloorDivTest extends Twig_Test_NodeTestC $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_FloorDiv($left, $right, 1); - return array( - array($node, '(int) floor((1 / 2))'), - ); + return [ + [$node, '(int) floor((1 / 2))'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ModTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ModTest.php index 4c663c78..7c3d00b8 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ModTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ModTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_ModTest extends Twig_Test_NodeTestCase $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_Mod($left, $right, 1); - return array( - array($node, '(1 % 2)'), - ); + return [ + [$node, '(1 % 2)'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/MulTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/MulTest.php index e92c95e6..6ed79bc4 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/MulTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/MulTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_MulTest extends Twig_Test_NodeTestCase $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_Mul($left, $right, 1); - return array( - array($node, '(1 * 2)'), - ); + return [ + [$node, '(1 * 2)'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/OrTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/OrTest.php index ec37c83e..fe9acb0c 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/OrTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/OrTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_OrTest extends Twig_Test_NodeTestCase $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_Or($left, $right, 1); - return array( - array($node, '(1 || 2)'), - ); + return [ + [$node, '(1 || 2)'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/SubTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/SubTest.php index 061cb270..e1420161 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/SubTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/SubTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_SubTest extends Twig_Test_NodeTestCase $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_Sub($left, $right, 1); - return array( - array($node, '(1 - 2)'), - ); + return [ + [$node, '(1 - 2)'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/CallTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/CallTest.php index 7b9ea926..8f1823ef 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/CallTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/CallTest.php @@ -13,8 +13,8 @@ class Twig_Tests_Node_Expression_CallTest extends \PHPUnit\Framework\TestCase { public function testGetArguments() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'date')); - $this->assertEquals(array('U', null), $this->getArguments($node, array('date', array('format' => 'U', 'timestamp' => null)))); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'date']); + $this->assertEquals(['U', null], $this->getArguments($node, ['date', ['format' => 'U', 'timestamp' => null]])); } /** @@ -23,8 +23,8 @@ class Twig_Tests_Node_Expression_CallTest extends \PHPUnit\Framework\TestCase */ public function testGetArgumentsWhenPositionalArgumentsAfterNamedArguments() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'date')); - $this->getArguments($node, array('date', array('timestamp' => 123456, 'Y-m-d'))); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'date']); + $this->getArguments($node, ['date', ['timestamp' => 123456, 'Y-m-d']]); } /** @@ -33,8 +33,8 @@ class Twig_Tests_Node_Expression_CallTest extends \PHPUnit\Framework\TestCase */ public function testGetArgumentsWhenArgumentIsDefinedTwice() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'date')); - $this->getArguments($node, array('date', array('Y-m-d', 'format' => 'U'))); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'date']); + $this->getArguments($node, ['date', ['Y-m-d', 'format' => 'U']]); } /** @@ -43,8 +43,8 @@ class Twig_Tests_Node_Expression_CallTest extends \PHPUnit\Framework\TestCase */ public function testGetArgumentsWithWrongNamedArgumentName() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'date')); - $this->getArguments($node, array('date', array('Y-m-d', 'timestamp' => null, 'unknown' => ''))); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'date']); + $this->getArguments($node, ['date', ['Y-m-d', 'timestamp' => null, 'unknown' => '']]); } /** @@ -53,8 +53,8 @@ class Twig_Tests_Node_Expression_CallTest extends \PHPUnit\Framework\TestCase */ public function testGetArgumentsWithWrongNamedArgumentNames() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'date')); - $this->getArguments($node, array('date', array('Y-m-d', 'timestamp' => null, 'unknown1' => '', 'unknown2' => ''))); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'date']); + $this->getArguments($node, ['date', ['Y-m-d', 'timestamp' => null, 'unknown1' => '', 'unknown2' => '']]); } /** @@ -63,38 +63,38 @@ class Twig_Tests_Node_Expression_CallTest extends \PHPUnit\Framework\TestCase */ public function testResolveArgumentsWithMissingValueForOptionalArgument() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'substr_compare')); - $this->getArguments($node, array('substr_compare', array('abcd', 'bc', 'offset' => 1, 'case_sensitivity' => true))); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'substr_compare']); + $this->getArguments($node, ['substr_compare', ['abcd', 'bc', 'offset' => 1, 'case_sensitivity' => true]]); } public function testResolveArgumentsOnlyNecessaryArgumentsForCustomFunction() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'custom_function')); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'custom_function']); - $this->assertEquals(array('arg1'), $this->getArguments($node, array(array($this, 'customFunction'), array('arg1' => 'arg1')))); + $this->assertEquals(['arg1'], $this->getArguments($node, [[$this, 'customFunction'], ['arg1' => 'arg1']])); } public function testGetArgumentsForStaticMethod() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'custom_static_function')); - $this->assertEquals(array('arg1'), $this->getArguments($node, array(__CLASS__.'::customStaticFunction', array('arg1' => 'arg1')))); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'custom_static_function']); + $this->assertEquals(['arg1'], $this->getArguments($node, [__CLASS__.'::customStaticFunction', ['arg1' => 'arg1']])); } /** * @expectedException LogicException - * @expectedExceptionMessage The last parameter of "Twig_Tests_Node_Expression_CallTest::customFunctionWithArbitraryArguments" for function "foo" must be an array with default value, eg. "array $arg = array()". + * @expectedExceptionMessage The last parameter of "Twig_Tests_Node_Expression_CallTest::customFunctionWithArbitraryArguments" for function "foo" must be an array with default value, eg. "array $arg = []". */ public function testResolveArgumentsWithMissingParameterForArbitraryArguments() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'foo', 'is_variadic' => true)); - $this->getArguments($node, array(array($this, 'customFunctionWithArbitraryArguments'), array())); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'foo', 'is_variadic' => true]); + $this->getArguments($node, [[$this, 'customFunctionWithArbitraryArguments'], []]); } - public static function customStaticFunction($arg1, $arg2 = 'default', $arg3 = array()) + public static function customStaticFunction($arg1, $arg2 = 'default', $arg3 = []) { } - public function customFunction($arg1, $arg2 = 'default', $arg3 = array()) + public function customFunction($arg1, $arg2 = 'default', $arg3 = []) { } @@ -112,22 +112,22 @@ class Twig_Tests_Node_Expression_CallTest extends \PHPUnit\Framework\TestCase /** * @expectedException LogicException - * @expectedExceptionMessageRegExp #^The last parameter of "custom_Twig_Tests_Node_Expression_CallTest_function" for function "foo" must be an array with default value, eg\. "array \$arg \= array\(\)"\.$# + * @expectedExceptionMessageRegExp #^The last parameter of "custom_Twig_Tests_Node_Expression_CallTest_function" for function "foo" must be an array with default value, eg\. "array \$arg \= \[\]"\.$# */ public function testResolveArgumentsWithMissingParameterForArbitraryArgumentsOnFunction() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'foo', 'is_variadic' => true)); - $node->getArguments('custom_Twig_Tests_Node_Expression_CallTest_function', array()); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'foo', 'is_variadic' => true]); + $node->getArguments('custom_Twig_Tests_Node_Expression_CallTest_function', []); } /** * @expectedException LogicException - * @expectedExceptionMessageRegExp #^The last parameter of "CallableTestClass\:\:__invoke" for function "foo" must be an array with default value, eg\. "array \$arg \= array\(\)"\.$# + * @expectedExceptionMessageRegExp #^The last parameter of "CallableTestClass\:\:__invoke" for function "foo" must be an array with default value, eg\. "array \$arg \= \[\]"\.$# */ public function testResolveArgumentsWithMissingParameterForArbitraryArgumentsOnObject() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'foo', 'is_variadic' => true)); - $node->getArguments(new CallableTestClass(), array()); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'foo', 'is_variadic' => true]); + $node->getArguments(new CallableTestClass(), []); } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConditionalTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConditionalTest.php index a3e8badf..ff9a5ad4 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConditionalTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConditionalTest.php @@ -25,13 +25,13 @@ class Twig_Tests_Node_Expression_ConditionalTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; $expr1 = new Twig_Node_Expression_Constant(1, 1); $expr2 = new Twig_Node_Expression_Constant(2, 1); $expr3 = new Twig_Node_Expression_Constant(3, 1); $node = new Twig_Node_Expression_Conditional($expr1, $expr2, $expr3, 1); - $tests[] = array($node, '((1) ? (2) : (3))'); + $tests[] = [$node, '((1) ? (2) : (3))']; return $tests; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConstantTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConstantTest.php index 2ff93182..c43de002 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConstantTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConstantTest.php @@ -20,10 +20,10 @@ class Twig_Tests_Node_Expression_ConstantTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; $node = new Twig_Node_Expression_Constant('foo', 1); - $tests[] = array($node, '"foo"'); + $tests[] = [$node, '"foo"']; return $tests; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/FilterTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/FilterTest.php index d3630c54..677b9655 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/FilterTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/FilterTest.php @@ -26,71 +26,71 @@ class Twig_Tests_Node_Expression_FilterTest extends Twig_Test_NodeTestCase public function getTests() { $environment = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); - $environment->addFilter(new Twig_Filter('bar', 'twig_tests_filter_dummy', array('needs_environment' => true))); - $environment->addFilter(new Twig_Filter('barbar', 'twig_tests_filter_barbar', array('needs_context' => true, 'is_variadic' => true))); + $environment->addFilter(new Twig_Filter('bar', 'twig_tests_filter_dummy', ['needs_environment' => true])); + $environment->addFilter(new Twig_Filter('barbar', 'twig_tests_filter_barbar', ['needs_context' => true, 'is_variadic' => true])); - $tests = array(); + $tests = []; $expr = new Twig_Node_Expression_Constant('foo', 1); $node = $this->createFilter($expr, 'upper'); - $node = $this->createFilter($node, 'number_format', array(new Twig_Node_Expression_Constant(2, 1), new Twig_Node_Expression_Constant('.', 1), new Twig_Node_Expression_Constant(',', 1))); + $node = $this->createFilter($node, 'number_format', [new Twig_Node_Expression_Constant(2, 1), new Twig_Node_Expression_Constant('.', 1), new Twig_Node_Expression_Constant(',', 1)]); - $tests[] = array($node, 'twig_number_format_filter($this->env, twig_upper_filter($this->env, "foo"), 2, ".", ",")'); + $tests[] = [$node, 'twig_number_format_filter($this->env, twig_upper_filter($this->env, "foo"), 2, ".", ",")']; // named arguments $date = new Twig_Node_Expression_Constant(0, 1); - $node = $this->createFilter($date, 'date', array( + $node = $this->createFilter($date, 'date', [ 'timezone' => new Twig_Node_Expression_Constant('America/Chicago', 1), 'format' => new Twig_Node_Expression_Constant('d/m/Y H:i:s P', 1), - )); - $tests[] = array($node, 'twig_date_format_filter($this->env, 0, "d/m/Y H:i:s P", "America/Chicago")'); + ]); + $tests[] = [$node, 'twig_date_format_filter($this->env, 0, "d/m/Y H:i:s P", "America/Chicago")']; // skip an optional argument $date = new Twig_Node_Expression_Constant(0, 1); - $node = $this->createFilter($date, 'date', array( + $node = $this->createFilter($date, 'date', [ 'timezone' => new Twig_Node_Expression_Constant('America/Chicago', 1), - )); - $tests[] = array($node, 'twig_date_format_filter($this->env, 0, null, "America/Chicago")'); + ]); + $tests[] = [$node, 'twig_date_format_filter($this->env, 0, null, "America/Chicago")']; // underscores vs camelCase for named arguments $string = new Twig_Node_Expression_Constant('abc', 1); - $node = $this->createFilter($string, 'reverse', array( + $node = $this->createFilter($string, 'reverse', [ 'preserve_keys' => new Twig_Node_Expression_Constant(true, 1), - )); - $tests[] = array($node, 'twig_reverse_filter($this->env, "abc", true)'); - $node = $this->createFilter($string, 'reverse', array( + ]); + $tests[] = [$node, 'twig_reverse_filter($this->env, "abc", true)']; + $node = $this->createFilter($string, 'reverse', [ 'preserveKeys' => new Twig_Node_Expression_Constant(true, 1), - )); - $tests[] = array($node, 'twig_reverse_filter($this->env, "abc", true)'); + ]); + $tests[] = [$node, 'twig_reverse_filter($this->env, "abc", true)']; // filter as an anonymous function $node = $this->createFilter(new Twig_Node_Expression_Constant('foo', 1), 'anonymous'); - $tests[] = array($node, 'call_user_func_array($this->env->getFilter(\'anonymous\')->getCallable(), array("foo"))'); + $tests[] = [$node, 'call_user_func_array($this->env->getFilter(\'anonymous\')->getCallable(), ["foo"])']; // needs environment $node = $this->createFilter($string, 'bar'); - $tests[] = array($node, 'twig_tests_filter_dummy($this->env, "abc")', $environment); + $tests[] = [$node, 'twig_tests_filter_dummy($this->env, "abc")', $environment]; - $node = $this->createFilter($string, 'bar', array(new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'twig_tests_filter_dummy($this->env, "abc", "bar")', $environment); + $node = $this->createFilter($string, 'bar', [new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'twig_tests_filter_dummy($this->env, "abc", "bar")', $environment]; // arbitrary named arguments $node = $this->createFilter($string, 'barbar'); - $tests[] = array($node, 'twig_tests_filter_barbar($context, "abc")', $environment); + $tests[] = [$node, 'twig_tests_filter_barbar($context, "abc")', $environment]; - $node = $this->createFilter($string, 'barbar', array('foo' => new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'twig_tests_filter_barbar($context, "abc", null, null, array("foo" => "bar"))', $environment); + $node = $this->createFilter($string, 'barbar', ['foo' => new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'twig_tests_filter_barbar($context, "abc", null, null, ["foo" => "bar"])', $environment]; - $node = $this->createFilter($string, 'barbar', array('arg2' => new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'twig_tests_filter_barbar($context, "abc", null, "bar")', $environment); + $node = $this->createFilter($string, 'barbar', ['arg2' => new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'twig_tests_filter_barbar($context, "abc", null, "bar")', $environment]; - $node = $this->createFilter($string, 'barbar', array( + $node = $this->createFilter($string, 'barbar', [ new Twig_Node_Expression_Constant('1', 1), new Twig_Node_Expression_Constant('2', 1), new Twig_Node_Expression_Constant('3', 1), 'foo' => new Twig_Node_Expression_Constant('bar', 1), - )); - $tests[] = array($node, 'twig_tests_filter_barbar($context, "abc", "1", "2", array(0 => "3", "foo" => "bar"))', $environment); + ]); + $tests[] = [$node, 'twig_tests_filter_barbar($context, "abc", "1", "2", [0 => "3", "foo" => "bar"])', $environment]; return $tests; } @@ -102,9 +102,9 @@ class Twig_Tests_Node_Expression_FilterTest extends Twig_Test_NodeTestCase public function testCompileWithWrongNamedArgumentName() { $date = new Twig_Node_Expression_Constant(0, 1); - $node = $this->createFilter($date, 'date', array( + $node = $this->createFilter($date, 'date', [ 'foobar' => new Twig_Node_Expression_Constant('America/Chicago', 1), - )); + ]); $compiler = $this->getCompiler(); $compiler->compile($node); @@ -117,15 +117,15 @@ class Twig_Tests_Node_Expression_FilterTest extends Twig_Test_NodeTestCase public function testCompileWithMissingNamedArgument() { $value = new Twig_Node_Expression_Constant(0, 1); - $node = $this->createFilter($value, 'replace', array( + $node = $this->createFilter($value, 'replace', [ 'to' => new Twig_Node_Expression_Constant('foo', 1), - )); + ]); $compiler = $this->getCompiler(); $compiler->compile($node); } - protected function createFilter($node, $name, array $arguments = array()) + protected function createFilter($node, $name, array $arguments = []) { $name = new Twig_Node_Expression_Constant($name, 1); $arguments = new Twig_Node($arguments); @@ -135,7 +135,7 @@ class Twig_Tests_Node_Expression_FilterTest extends Twig_Test_NodeTestCase protected function getEnvironment() { - $env = new Twig_Environment(new Twig_Loader_Array(array())); + $env = new Twig_Environment(new Twig_Loader_Array([])); $env->addFilter(new Twig_Filter('anonymous', function () {})); return $env; @@ -146,6 +146,6 @@ function twig_tests_filter_dummy() { } -function twig_tests_filter_barbar($context, $string, $arg1 = null, $arg2 = null, array $args = array()) +function twig_tests_filter_barbar($context, $string, $arg1 = null, $arg2 = null, array $args = []) { } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/FunctionTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/FunctionTest.php index 5824bde1..8b26989f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/FunctionTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/FunctionTest.php @@ -24,78 +24,78 @@ class Twig_Tests_Node_Expression_FunctionTest extends Twig_Test_NodeTestCase public function getTests() { $environment = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); - $environment->addFunction(new Twig_Function('foo', 'twig_tests_function_dummy', array())); - $environment->addFunction(new Twig_Function('bar', 'twig_tests_function_dummy', array('needs_environment' => true))); - $environment->addFunction(new Twig_Function('foofoo', 'twig_tests_function_dummy', array('needs_context' => true))); - $environment->addFunction(new Twig_Function('foobar', 'twig_tests_function_dummy', array('needs_environment' => true, 'needs_context' => true))); - $environment->addFunction(new Twig_Function('barbar', 'twig_tests_function_barbar', array('is_variadic' => true))); + $environment->addFunction(new Twig_Function('foo', 'twig_tests_function_dummy', [])); + $environment->addFunction(new Twig_Function('bar', 'twig_tests_function_dummy', ['needs_environment' => true])); + $environment->addFunction(new Twig_Function('foofoo', 'twig_tests_function_dummy', ['needs_context' => true])); + $environment->addFunction(new Twig_Function('foobar', 'twig_tests_function_dummy', ['needs_environment' => true, 'needs_context' => true])); + $environment->addFunction(new Twig_Function('barbar', 'twig_tests_function_barbar', ['is_variadic' => true])); - $tests = array(); + $tests = []; $node = $this->createFunction('foo'); - $tests[] = array($node, 'twig_tests_function_dummy()', $environment); + $tests[] = [$node, 'twig_tests_function_dummy()', $environment]; - $node = $this->createFunction('foo', array(new Twig_Node_Expression_Constant('bar', 1), new Twig_Node_Expression_Constant('foobar', 1))); - $tests[] = array($node, 'twig_tests_function_dummy("bar", "foobar")', $environment); + $node = $this->createFunction('foo', [new Twig_Node_Expression_Constant('bar', 1), new Twig_Node_Expression_Constant('foobar', 1)]); + $tests[] = [$node, 'twig_tests_function_dummy("bar", "foobar")', $environment]; $node = $this->createFunction('bar'); - $tests[] = array($node, 'twig_tests_function_dummy($this->env)', $environment); + $tests[] = [$node, 'twig_tests_function_dummy($this->env)', $environment]; - $node = $this->createFunction('bar', array(new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'twig_tests_function_dummy($this->env, "bar")', $environment); + $node = $this->createFunction('bar', [new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'twig_tests_function_dummy($this->env, "bar")', $environment]; $node = $this->createFunction('foofoo'); - $tests[] = array($node, 'twig_tests_function_dummy($context)', $environment); + $tests[] = [$node, 'twig_tests_function_dummy($context)', $environment]; - $node = $this->createFunction('foofoo', array(new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'twig_tests_function_dummy($context, "bar")', $environment); + $node = $this->createFunction('foofoo', [new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'twig_tests_function_dummy($context, "bar")', $environment]; $node = $this->createFunction('foobar'); - $tests[] = array($node, 'twig_tests_function_dummy($this->env, $context)', $environment); + $tests[] = [$node, 'twig_tests_function_dummy($this->env, $context)', $environment]; - $node = $this->createFunction('foobar', array(new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'twig_tests_function_dummy($this->env, $context, "bar")', $environment); + $node = $this->createFunction('foobar', [new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'twig_tests_function_dummy($this->env, $context, "bar")', $environment]; // named arguments - $node = $this->createFunction('date', array( + $node = $this->createFunction('date', [ 'timezone' => new Twig_Node_Expression_Constant('America/Chicago', 1), 'date' => new Twig_Node_Expression_Constant(0, 1), - )); - $tests[] = array($node, 'twig_date_converter($this->env, 0, "America/Chicago")'); + ]); + $tests[] = [$node, 'twig_date_converter($this->env, 0, "America/Chicago")']; // arbitrary named arguments $node = $this->createFunction('barbar'); - $tests[] = array($node, 'twig_tests_function_barbar()', $environment); + $tests[] = [$node, 'twig_tests_function_barbar()', $environment]; - $node = $this->createFunction('barbar', array('foo' => new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'twig_tests_function_barbar(null, null, array("foo" => "bar"))', $environment); + $node = $this->createFunction('barbar', ['foo' => new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'twig_tests_function_barbar(null, null, ["foo" => "bar"])', $environment]; - $node = $this->createFunction('barbar', array('arg2' => new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'twig_tests_function_barbar(null, "bar")', $environment); + $node = $this->createFunction('barbar', ['arg2' => new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'twig_tests_function_barbar(null, "bar")', $environment]; - $node = $this->createFunction('barbar', array( + $node = $this->createFunction('barbar', [ new Twig_Node_Expression_Constant('1', 1), new Twig_Node_Expression_Constant('2', 1), new Twig_Node_Expression_Constant('3', 1), 'foo' => new Twig_Node_Expression_Constant('bar', 1), - )); - $tests[] = array($node, 'twig_tests_function_barbar("1", "2", array(0 => "3", "foo" => "bar"))', $environment); + ]); + $tests[] = [$node, 'twig_tests_function_barbar("1", "2", [0 => "3", "foo" => "bar"])', $environment]; // function as an anonymous function - $node = $this->createFunction('anonymous', array(new Twig_Node_Expression_Constant('foo', 1))); - $tests[] = array($node, 'call_user_func_array($this->env->getFunction(\'anonymous\')->getCallable(), array("foo"))'); + $node = $this->createFunction('anonymous', [new Twig_Node_Expression_Constant('foo', 1)]); + $tests[] = [$node, 'call_user_func_array($this->env->getFunction(\'anonymous\')->getCallable(), ["foo"])']; return $tests; } - protected function createFunction($name, array $arguments = array()) + protected function createFunction($name, array $arguments = []) { return new Twig_Node_Expression_Function($name, new Twig_Node($arguments), 1); } protected function getEnvironment() { - $env = new Twig_Environment(new Twig_Loader_Array(array())); + $env = new Twig_Environment(new Twig_Loader_Array([])); $env->addFunction(new Twig_Function('anonymous', function () {})); return $env; @@ -106,6 +106,6 @@ function twig_tests_function_dummy() { } -function twig_tests_function_barbar($arg1 = null, $arg2 = null, array $args = array()) +function twig_tests_function_barbar($arg1 = null, $arg2 = null, array $args = []) { } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/GetAttrTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/GetAttrTest.php index a720d76f..82d8b1be 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/GetAttrTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/GetAttrTest.php @@ -15,7 +15,7 @@ class Twig_Tests_Node_Expression_GetAttrTest extends Twig_Test_NodeTestCase { $expr = new Twig_Node_Expression_Name('foo', 1); $attr = new Twig_Node_Expression_Constant('bar', 1); - $args = new Twig_Node_Expression_Array(array(), 1); + $args = new Twig_Node_Expression_Array([], 1); $args->addElement(new Twig_Node_Expression_Name('foo', 1)); $args->addElement(new Twig_Node_Expression_Constant('bar', 1)); $node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_Template::ARRAY_CALL, 1); @@ -28,23 +28,23 @@ class Twig_Tests_Node_Expression_GetAttrTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; $expr = new Twig_Node_Expression_Name('foo', 1); $attr = new Twig_Node_Expression_Constant('bar', 1); - $args = new Twig_Node_Expression_Array(array(), 1); + $args = new Twig_Node_Expression_Array([], 1); $node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_Template::ANY_CALL, 1); - $tests[] = array($node, sprintf('%s%s, "bar", array())', $this->getAttributeGetter(), $this->getVariableGetter('foo', 1))); + $tests[] = [$node, sprintf('%s%s, "bar", [])', $this->getAttributeGetter(), $this->getVariableGetter('foo', 1))]; $node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_Template::ARRAY_CALL, 1); - $tests[] = array($node, '(($__internal_%s = // line 1'."\n". - '($context["foo"] ?? null)) && is_array($__internal_%s) || $__internal_%s instanceof ArrayAccess ? ($__internal_%s["bar"] ?? null) : null)', null, true, ); + $tests[] = [$node, '(($__internal_%s = // line 1'."\n". + '($context["foo"] ?? null)) && is_array($__internal_%s) || $__internal_%s instanceof ArrayAccess ? ($__internal_%s["bar"] ?? null) : null)', null, true, ]; - $args = new Twig_Node_Expression_Array(array(), 1); + $args = new Twig_Node_Expression_Array([], 1); $args->addElement(new Twig_Node_Expression_Name('foo', 1)); $args->addElement(new Twig_Node_Expression_Constant('bar', 1)); $node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_Template::METHOD_CALL, 1); - $tests[] = array($node, sprintf('%s%s, "bar", array(0 => %s, 1 => "bar"), "method")', $this->getAttributeGetter(), $this->getVariableGetter('foo', 1), $this->getVariableGetter('foo'))); + $tests[] = [$node, sprintf('%s%s, "bar", [0 => %s, 1 => "bar"], "method")', $this->getAttributeGetter(), $this->getVariableGetter('foo', 1), $this->getVariableGetter('foo'))]; return $tests; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/NameTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/NameTest.php index d1697be3..7e6a901d 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/NameTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/NameTest.php @@ -24,16 +24,16 @@ class Twig_Tests_Node_Expression_NameTest extends Twig_Test_NodeTestCase $self = new Twig_Node_Expression_Name('_self', 1); $context = new Twig_Node_Expression_Name('_context', 1); - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('strict_variables' => true)); - $env1 = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('strict_variables' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['strict_variables' => true]); + $env1 = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['strict_variables' => false]); $output = '(isset($context["foo"]) || array_key_exists("foo", $context) ? $context["foo"] : (function () { throw new Twig_Error_Runtime(\'Variable "foo" does not exist.\', 1, $this->source); })())'; - return array( - array($node, "// line 1\n".$output, $env), - array($node, $this->getVariableGetter('foo', 1), $env1), - array($self, "// line 1\n\$this->getTemplateName()"), - array($context, "// line 1\n\$context"), - ); + return [ + [$node, "// line 1\n".$output, $env], + [$node, $this->getVariableGetter('foo', 1), $env1], + [$self, "// line 1\n\$this->getTemplateName()"], + [$context, "// line 1\n\$context"], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/NullCoalesceTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/NullCoalesceTest.php index 01ddb79b..dfb51b37 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/NullCoalesceTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/NullCoalesceTest.php @@ -17,6 +17,6 @@ class Twig_Tests_Node_Expression_NullCoalesceTest extends Twig_Test_NodeTestCase $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_NullCoalesce($left, $right, 1); - return array(array($node, "((// line 1\n\$context[\"foo\"]) ?? (2))")); + return [[$node, "((// line 1\n\$context[\"foo\"]) ?? (2))"]]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php index ab2bbe07..4e25a8be 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php @@ -20,8 +20,8 @@ class Twig_Tests_Node_Expression_ParentTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); - $tests[] = array(new Twig_Node_Expression_Parent('foo', 1), '$this->renderParentBlock("foo", $context, $blocks)'); + $tests = []; + $tests[] = [new Twig_Node_Expression_Parent('foo', 1), '$this->renderParentBlock("foo", $context, $blocks)']; return $tests; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/TestTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/TestTest.php index 7282b689..9cd61959 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/TestTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/TestTest.php @@ -26,54 +26,54 @@ class Twig_Tests_Node_Expression_TestTest extends Twig_Test_NodeTestCase public function getTests() { $environment = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); - $environment->addTest(new Twig_Test('barbar', 'twig_tests_test_barbar', array('is_variadic' => true, 'need_context' => true))); + $environment->addTest(new Twig_Test('barbar', 'twig_tests_test_barbar', ['is_variadic' => true, 'need_context' => true])); - $tests = array(); + $tests = []; $expr = new Twig_Node_Expression_Constant('foo', 1); - $node = new Twig_Node_Expression_Test_Null($expr, 'null', new Twig_Node(array()), 1); - $tests[] = array($node, '(null === "foo")'); + $node = new Twig_Node_Expression_Test_Null($expr, 'null', new Twig_Node([]), 1); + $tests[] = [$node, '(null === "foo")']; // test as an anonymous function - $node = $this->createTest(new Twig_Node_Expression_Constant('foo', 1), 'anonymous', array(new Twig_Node_Expression_Constant('foo', 1))); - $tests[] = array($node, 'call_user_func_array($this->env->getTest(\'anonymous\')->getCallable(), array("foo", "foo"))'); + $node = $this->createTest(new Twig_Node_Expression_Constant('foo', 1), 'anonymous', [new Twig_Node_Expression_Constant('foo', 1)]); + $tests[] = [$node, 'call_user_func_array($this->env->getTest(\'anonymous\')->getCallable(), ["foo", "foo"])']; // arbitrary named arguments $string = new Twig_Node_Expression_Constant('abc', 1); $node = $this->createTest($string, 'barbar'); - $tests[] = array($node, 'twig_tests_test_barbar("abc")', $environment); + $tests[] = [$node, 'twig_tests_test_barbar("abc")', $environment]; - $node = $this->createTest($string, 'barbar', array('foo' => new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'twig_tests_test_barbar("abc", null, null, array("foo" => "bar"))', $environment); + $node = $this->createTest($string, 'barbar', ['foo' => new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'twig_tests_test_barbar("abc", null, null, ["foo" => "bar"])', $environment]; - $node = $this->createTest($string, 'barbar', array('arg2' => new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'twig_tests_test_barbar("abc", null, "bar")', $environment); + $node = $this->createTest($string, 'barbar', ['arg2' => new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'twig_tests_test_barbar("abc", null, "bar")', $environment]; - $node = $this->createTest($string, 'barbar', array( + $node = $this->createTest($string, 'barbar', [ new Twig_Node_Expression_Constant('1', 1), new Twig_Node_Expression_Constant('2', 1), new Twig_Node_Expression_Constant('3', 1), 'foo' => new Twig_Node_Expression_Constant('bar', 1), - )); - $tests[] = array($node, 'twig_tests_test_barbar("abc", "1", "2", array(0 => "3", "foo" => "bar"))', $environment); + ]); + $tests[] = [$node, 'twig_tests_test_barbar("abc", "1", "2", [0 => "3", "foo" => "bar"])', $environment]; return $tests; } - protected function createTest($node, $name, array $arguments = array()) + protected function createTest($node, $name, array $arguments = []) { return new Twig_Node_Expression_Test($node, $name, new Twig_Node($arguments), 1); } protected function getEnvironment() { - $env = new Twig_Environment(new Twig_Loader_Array(array())); + $env = new Twig_Environment(new Twig_Loader_Array([])); $env->addTest(new Twig_Test('anonymous', function () {})); return $env; } } -function twig_tests_test_barbar($string, $arg1 = null, $arg2 = null, array $args = array()) +function twig_tests_test_barbar($string, $arg1 = null, $arg2 = null, array $args = []) { } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NegTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NegTest.php index b6333711..5c058816 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NegTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NegTest.php @@ -24,9 +24,9 @@ class Twig_Tests_Node_Expression_Unary_NegTest extends Twig_Test_NodeTestCase $node = new Twig_Node_Expression_Constant(1, 1); $node = new Twig_Node_Expression_Unary_Neg($node, 1); - return array( - array($node, '-1'), - array(new Twig_Node_Expression_Unary_Neg($node, 1), '- -1'), - ); + return [ + [$node, '-1'], + [new Twig_Node_Expression_Unary_Neg($node, 1), '- -1'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NotTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NotTest.php index d7c6f85e..9e45760a 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NotTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NotTest.php @@ -24,8 +24,8 @@ class Twig_Tests_Node_Expression_Unary_NotTest extends Twig_Test_NodeTestCase $node = new Twig_Node_Expression_Constant(1, 1); $node = new Twig_Node_Expression_Unary_Not($node, 1); - return array( - array($node, '!1'), - ); + return [ + [$node, '!1'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/PosTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/PosTest.php index 057250f3..bddcc4bf 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/PosTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/PosTest.php @@ -24,8 +24,8 @@ class Twig_Tests_Node_Expression_Unary_PosTest extends Twig_Test_NodeTestCase $node = new Twig_Node_Expression_Constant(1, 1); $node = new Twig_Node_Expression_Unary_Pos($node, 1); - return array( - array($node, '+1'), - ); + return [ + [$node, '+1'], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/ForTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/ForTest.php index 2bf4c7b4..278aeda3 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/ForTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/ForTest.php @@ -17,7 +17,7 @@ class Twig_Tests_Node_ForTest extends Twig_Test_NodeTestCase $valueTarget = new Twig_Node_Expression_AssignName('item', 1); $seq = new Twig_Node_Expression_Name('items', 1); $ifexpr = new Twig_Node_Expression_Constant(true, 1); - $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)), array(), 1); + $body = new Twig_Node([new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)], [], 1); $else = null; $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 1); $node->setAttribute('with_loop', false); @@ -38,18 +38,18 @@ class Twig_Tests_Node_ForTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; $keyTarget = new Twig_Node_Expression_AssignName('key', 1); $valueTarget = new Twig_Node_Expression_AssignName('item', 1); $seq = new Twig_Node_Expression_Name('items', 1); $ifexpr = null; - $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)), array(), 1); + $body = new Twig_Node([new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)], [], 1); $else = null; $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 1); $node->setAttribute('with_loop', false); - $tests[] = array($node, <<getVariableGetter('items')}); @@ -60,27 +60,27 @@ foreach (\$context['_seq'] as \$context["key"] => \$context["item"]) { unset(\$context['_seq'], \$context['_iterated'], \$context['key'], \$context['item'], \$context['_parent'], \$context['loop']); \$context = array_intersect_key(\$context, \$_parent) + \$_parent; EOF - ); + ]; $keyTarget = new Twig_Node_Expression_AssignName('k', 1); $valueTarget = new Twig_Node_Expression_AssignName('v', 1); $seq = new Twig_Node_Expression_Name('values', 1); $ifexpr = null; - $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)), array(), 1); + $body = new Twig_Node([new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)], [], 1); $else = null; $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 1); $node->setAttribute('with_loop', true); - $tests[] = array($node, <<getVariableGetter('values')}); -\$context['loop'] = array( +\$context['loop'] = [ 'parent' => \$context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true, -); +]; if (is_array(\$context['_seq']) || (is_object(\$context['_seq']) && \$context['_seq'] instanceof Countable)) { \$length = count(\$context['_seq']); \$context['loop']['revindex0'] = \$length - 1; @@ -103,27 +103,27 @@ foreach (\$context['_seq'] as \$context["k"] => \$context["v"]) { unset(\$context['_seq'], \$context['_iterated'], \$context['k'], \$context['v'], \$context['_parent'], \$context['loop']); \$context = array_intersect_key(\$context, \$_parent) + \$_parent; EOF - ); + ]; $keyTarget = new Twig_Node_Expression_AssignName('k', 1); $valueTarget = new Twig_Node_Expression_AssignName('v', 1); $seq = new Twig_Node_Expression_Name('values', 1); $ifexpr = new Twig_Node_Expression_Constant(true, 1); - $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)), array(), 1); + $body = new Twig_Node([new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)], [], 1); $else = null; $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 1); $node->setAttribute('with_loop', true); - $tests[] = array($node, <<getVariableGetter('values')}); -\$context['loop'] = array( +\$context['loop'] = [ 'parent' => \$context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true, -); +]; foreach (\$context['_seq'] as \$context["k"] => \$context["v"]) { if (true) { echo {$this->getVariableGetter('foo')}; @@ -136,28 +136,28 @@ foreach (\$context['_seq'] as \$context["k"] => \$context["v"]) { unset(\$context['_seq'], \$context['_iterated'], \$context['k'], \$context['v'], \$context['_parent'], \$context['loop']); \$context = array_intersect_key(\$context, \$_parent) + \$_parent; EOF - ); + ]; $keyTarget = new Twig_Node_Expression_AssignName('k', 1); $valueTarget = new Twig_Node_Expression_AssignName('v', 1); $seq = new Twig_Node_Expression_Name('values', 1); $ifexpr = null; - $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)), array(), 1); + $body = new Twig_Node([new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)], [], 1); $else = new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1); $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 1); $node->setAttribute('with_loop', true); - $tests[] = array($node, <<getVariableGetter('values')}); \$context['_iterated'] = false; -\$context['loop'] = array( +\$context['loop'] = [ 'parent' => \$context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true, -); +]; if (is_array(\$context['_seq']) || (is_object(\$context['_seq']) && \$context['_seq'] instanceof Countable)) { \$length = count(\$context['_seq']); \$context['loop']['revindex0'] = \$length - 1; @@ -184,7 +184,7 @@ if (!\$context['_iterated']) { unset(\$context['_seq'], \$context['_iterated'], \$context['k'], \$context['v'], \$context['_parent'], \$context['loop']); \$context = array_intersect_key(\$context, \$_parent) + \$_parent; EOF - ); + ]; return $tests; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/IfTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/IfTest.php index 4ab0e4cc..e7b92fc6 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/IfTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/IfTest.php @@ -13,10 +13,10 @@ class Twig_Tests_Node_IfTest extends Twig_Test_NodeTestCase { public function testConstructor() { - $t = new Twig_Node(array( + $t = new Twig_Node([ new Twig_Node_Expression_Constant(true, 1), new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1), - ), array(), 1); + ], [], 1); $else = null; $node = new Twig_Node_If($t, $else, 1); @@ -30,33 +30,33 @@ class Twig_Tests_Node_IfTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; - $t = new Twig_Node(array( + $t = new Twig_Node([ new Twig_Node_Expression_Constant(true, 1), new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1), - ), array(), 1); + ], [], 1); $else = null; $node = new Twig_Node_If($t, $else, 1); - $tests[] = array($node, <<getVariableGetter('foo')}; } EOF - ); + ]; - $t = new Twig_Node(array( + $t = new Twig_Node([ new Twig_Node_Expression_Constant(true, 1), new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1), new Twig_Node_Expression_Constant(false, 1), new Twig_Node_Print(new Twig_Node_Expression_Name('bar', 1), 1), - ), array(), 1); + ], [], 1); $else = null; $node = new Twig_Node_If($t, $else, 1); - $tests[] = array($node, <<getVariableGetter('foo')}; @@ -64,16 +64,16 @@ if (true) { echo {$this->getVariableGetter('bar')}; } EOF - ); + ]; - $t = new Twig_Node(array( + $t = new Twig_Node([ new Twig_Node_Expression_Constant(true, 1), new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1), - ), array(), 1); + ], [], 1); $else = new Twig_Node_Print(new Twig_Node_Expression_Name('bar', 1), 1); $node = new Twig_Node_If($t, $else, 1); - $tests[] = array($node, <<getVariableGetter('foo')}; @@ -81,7 +81,7 @@ if (true) { echo {$this->getVariableGetter('bar')}; } EOF - ); + ]; return $tests; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php index 36525b25..8335de8a 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php @@ -23,17 +23,17 @@ class Twig_Tests_Node_ImportTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; $macro = new Twig_Node_Expression_Constant('foo.twig', 1); $var = new Twig_Node_Expression_AssignName('macro', 1); $node = new Twig_Node_Import($macro, $var, 1); - $tests[] = array($node, <<loadTemplate("foo.twig", null, 1); EOF - ); + ]; return $tests; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php index d801f338..5dc0d714 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php @@ -20,7 +20,7 @@ class Twig_Tests_Node_IncludeTest extends Twig_Test_NodeTestCase $this->assertEquals($expr, $node->getNode('expr')); $this->assertFalse($node->getAttribute('only')); - $vars = new Twig_Node_Expression_Array(array(new Twig_Node_Expression_Constant('foo', 1), new Twig_Node_Expression_Constant(true, 1)), 1); + $vars = new Twig_Node_Expression_Array([new Twig_Node_Expression_Constant('foo', 1), new Twig_Node_Expression_Constant(true, 1)], 1); $node = new Twig_Node_Include($expr, $vars, true, false, 1); $this->assertEquals($vars, $node->getNode('variables')); $this->assertTrue($node->getAttribute('only')); @@ -28,15 +28,15 @@ class Twig_Tests_Node_IncludeTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; $expr = new Twig_Node_Expression_Constant('foo.twig', 1); $node = new Twig_Node_Include($expr, null, false, false, 1); - $tests[] = array($node, <<loadTemplate("foo.twig", null, 1)->display(\$context); EOF - ); + ]; $expr = new Twig_Node_Expression_Conditional( new Twig_Node_Expression_Constant(true, 1), @@ -45,38 +45,38 @@ EOF 0 ); $node = new Twig_Node_Include($expr, null, false, false, 1); - $tests[] = array($node, <<loadTemplate(((true) ? ("foo") : ("foo")), null, 1)->display(\$context); EOF - ); + ]; $expr = new Twig_Node_Expression_Constant('foo.twig', 1); - $vars = new Twig_Node_Expression_Array(array(new Twig_Node_Expression_Constant('foo', 1), new Twig_Node_Expression_Constant(true, 1)), 1); + $vars = new Twig_Node_Expression_Array([new Twig_Node_Expression_Constant('foo', 1), new Twig_Node_Expression_Constant(true, 1)], 1); $node = new Twig_Node_Include($expr, $vars, false, false, 1); - $tests[] = array($node, <<loadTemplate("foo.twig", null, 1)->display(array_merge(\$context, array("foo" => true))); +\$this->loadTemplate("foo.twig", null, 1)->display(array_merge(\$context, ["foo" => true])); EOF - ); + ]; $node = new Twig_Node_Include($expr, $vars, true, false, 1); - $tests[] = array($node, <<loadTemplate("foo.twig", null, 1)->display(array("foo" => true)); +\$this->loadTemplate("foo.twig", null, 1)->display(["foo" => true]); EOF - ); + ]; $node = new Twig_Node_Include($expr, $vars, true, true, 1); - $tests[] = array($node, <<loadTemplate("foo.twig", null, 1)->display(array("foo" => true)); + \$this->loadTemplate("foo.twig", null, 1)->display(["foo" => true]); } catch (Twig_Error_Loader \$e) { // ignore missing template } EOF - ); + ]; return $tests; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/MacroTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/MacroTest.php index f7beda2a..f5d3002b 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/MacroTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/MacroTest.php @@ -14,7 +14,7 @@ class Twig_Tests_Node_MacroTest extends Twig_Test_NodeTestCase public function testConstructor() { $body = new Twig_Node_Text('foo', 1); - $arguments = new Twig_Node(array(new Twig_Node_Expression_Name('foo', 1)), array(), 1); + $arguments = new Twig_Node([new Twig_Node_Expression_Name('foo', 1)], [], 1); $node = new Twig_Node_Macro('foo', $body, $arguments, 1); $this->assertEquals($body, $node->getNode('body')); @@ -25,24 +25,24 @@ class Twig_Tests_Node_MacroTest extends Twig_Test_NodeTestCase public function getTests() { $body = new Twig_Node_Text('foo', 1); - $arguments = new Twig_Node(array( + $arguments = new Twig_Node([ 'foo' => new Twig_Node_Expression_Constant(null, 1), 'bar' => new Twig_Node_Expression_Constant('Foo', 1), - ), array(), 1); + ], [], 1); $node = new Twig_Node_Macro('foo', $body, $arguments, 1); - return array( - array($node, <<env->mergeGlobals(array( + \$context = \$this->env->mergeGlobals([ "foo" => \$__foo__, "bar" => \$__bar__, "varargs" => \$__varargs__, - )); + ]); - \$blocks = array(); + \$blocks = []; ob_start(); try { @@ -54,7 +54,7 @@ public function macro_foo(\$__foo__ = null, \$__bar__ = "Foo", ...\$__varargs__) } } EOF - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/ModuleTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/ModuleTest.php index 93d35cd4..7d219193 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/ModuleTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/ModuleTest.php @@ -19,7 +19,7 @@ class Twig_Tests_Node_ModuleTest extends Twig_Test_NodeTestCase $macros = new Twig_Node(); $traits = new Twig_Node(); $source = new Twig_Source('{{ foo }}', 'foo.twig'); - $node = new Twig_Node_Module($body, $parent, $blocks, $macros, $traits, new Twig_Node(array()), $source); + $node = new Twig_Node_Module($body, $parent, $blocks, $macros, $traits, new Twig_Node([]), $source); $this->assertEquals($body, $node->getNode('body')); $this->assertEquals($blocks, $node->getNode('blocks')); @@ -32,7 +32,7 @@ class Twig_Tests_Node_ModuleTest extends Twig_Test_NodeTestCase { $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); - $tests = array(); + $tests = []; $body = new Twig_Node_Text('foo', 1); $extends = null; @@ -41,8 +41,8 @@ class Twig_Tests_Node_ModuleTest extends Twig_Test_NodeTestCase $traits = new Twig_Node(); $source = new Twig_Source('{{ foo }}', 'foo.twig'); - $node = new Twig_Node_Module($body, $extends, $blocks, $macros, $traits, new Twig_Node(array()), $source); - $tests[] = array($node, <<parent = false; - \$this->blocks = array( - ); + \$this->blocks = [ + ]; } - protected function doDisplay(array \$context, array \$blocks = array()) + protected function doDisplay(array \$context, array \$blocks = []) { // line 1 echo "foo"; @@ -84,15 +84,15 @@ class __TwigTemplate_%x extends Twig_Template } } EOF - , $twig, true); + , $twig, true]; $import = new Twig_Node_Import(new Twig_Node_Expression_Constant('foo.twig', 1), new Twig_Node_Expression_AssignName('macro', 1), 2); - $body = new Twig_Node(array($import)); + $body = new Twig_Node([$import]); $extends = new Twig_Node_Expression_Constant('layout.twig', 1); - $node = new Twig_Node_Module($body, $extends, $blocks, $macros, $traits, new Twig_Node(array()), $source); - $tests[] = array($node, <<parent = \$this->loadTemplate("layout.twig", "foo.twig", 1); - \$this->blocks = array( - ); + \$this->blocks = [ + ]; } protected function doGetParent(array \$context) @@ -117,7 +117,7 @@ class __TwigTemplate_%x extends Twig_Template return "layout.twig"; } - protected function doDisplay(array \$context, array \$blocks = array()) + protected function doDisplay(array \$context, array \$blocks = []) { // line 2 \$context["macro"] = \$this->loadTemplate("foo.twig", "foo.twig", 2); @@ -146,10 +146,10 @@ class __TwigTemplate_%x extends Twig_Template } } EOF - , $twig, true); + , $twig, true]; - $set = new Twig_Node_Set(false, new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 4))), new Twig_Node(array(new Twig_Node_Expression_Constant('foo', 4))), 4); - $body = new Twig_Node(array($set)); + $set = new Twig_Node_Set(false, new Twig_Node([new Twig_Node_Expression_AssignName('foo', 4)]), new Twig_Node([new Twig_Node_Expression_Constant('foo', 4)]), 4); + $body = new Twig_Node([$set]); $extends = new Twig_Node_Expression_Conditional( new Twig_Node_Expression_Constant(true, 2), new Twig_Node_Expression_Constant('foo', 2), @@ -157,9 +157,9 @@ EOF 2 ); - $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('debug' => true)); - $node = new Twig_Node_Module($body, $extends, $blocks, $macros, $traits, new Twig_Node(array()), $source); - $tests[] = array($node, <<getMockBuilder('Twig_LoaderInterface')->getMock(), ['debug' => true]); + $node = new Twig_Node_Module($body, $extends, $blocks, $macros, $traits, new Twig_Node([]), $source); + $tests[] = [$node, <<source = \$this->getSourceContext(); - \$this->blocks = array( - ); + \$this->blocks = [ + ]; } protected function doGetParent(array \$context) @@ -183,7 +183,7 @@ class __TwigTemplate_%x extends Twig_Template return \$this->loadTemplate(((true) ? ("foo") : ("foo")), "foo.twig", 2); } - protected function doDisplay(array \$context, array \$blocks = array()) + protected function doDisplay(array \$context, array \$blocks = []) { // line 4 \$context["foo"] = "foo"; @@ -212,7 +212,7 @@ class __TwigTemplate_%x extends Twig_Template } } EOF - , $twig, true); + , $twig, true]; return $tests; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/PrintTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/PrintTest.php index 4e0990fa..07502544 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/PrintTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/PrintTest.php @@ -21,8 +21,8 @@ class Twig_Tests_Node_PrintTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); - $tests[] = array(new Twig_Node_Print(new Twig_Node_Expression_Constant('foo', 1), 1), "// line 1\necho \"foo\";"); + $tests = []; + $tests[] = [new Twig_Node_Print(new Twig_Node_Expression_Constant('foo', 1), 1), "// line 1\necho \"foo\";"]; return $tests; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/SandboxTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/SandboxTest.php index 3c62f7bd..ef1f0728 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/SandboxTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/SandboxTest.php @@ -21,12 +21,12 @@ class Twig_Tests_Node_SandboxTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; $body = new Twig_Node_Text('foo', 1); $node = new Twig_Node_Sandbox($body, 1); - $tests[] = array($node, <<extensions['Twig_Extension_Sandbox']; if (!\$alreadySandboxed = \$sandbox->isSandboxed()) { @@ -37,7 +37,7 @@ if (!\$alreadySandboxed) { \$sandbox->disableSandbox(); } EOF - ); + ]; return $tests; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/SandboxedPrintTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/SandboxedPrintTest.php index f263859a..269a4619 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/SandboxedPrintTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/SandboxedPrintTest.php @@ -20,13 +20,13 @@ class Twig_Tests_Node_SandboxedPrintTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; - $tests[] = array(new Twig_Node_SandboxedPrint(new Twig_Node_Expression_Constant('foo', 1), 1), <<extensions['Twig_Extension_Sandbox']->ensureToStringAllowed("foo"); EOF - ); + ]; return $tests; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/SetTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/SetTest.php index 62ad2803..e09583f8 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/SetTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/SetTest.php @@ -13,8 +13,8 @@ class Twig_Tests_Node_SetTest extends Twig_Test_NodeTestCase { public function testConstructor() { - $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 1)), array(), 1); - $values = new Twig_Node(array(new Twig_Node_Expression_Constant('foo', 1)), array(), 1); + $names = new Twig_Node([new Twig_Node_Expression_AssignName('foo', 1)], [], 1); + $values = new Twig_Node([new Twig_Node_Expression_Constant('foo', 1)], [], 1); $node = new Twig_Node_Set(false, $names, $values, 1); $this->assertEquals($names, $node->getNode('names')); @@ -24,45 +24,45 @@ class Twig_Tests_Node_SetTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; - $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 1)), array(), 1); - $values = new Twig_Node(array(new Twig_Node_Expression_Constant('foo', 1)), array(), 1); + $names = new Twig_Node([new Twig_Node_Expression_AssignName('foo', 1)], [], 1); + $values = new Twig_Node([new Twig_Node_Expression_Constant('foo', 1)], [], 1); $node = new Twig_Node_Set(false, $names, $values, 1); - $tests[] = array($node, <<env->getCharset()); EOF - ); + ]; - $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 1)), array(), 1); + $names = new Twig_Node([new Twig_Node_Expression_AssignName('foo', 1)], [], 1); $values = new Twig_Node_Text('foo', 1); $node = new Twig_Node_Set(true, $names, $values, 1); - $tests[] = array($node, <<env->getCharset()); EOF - ); + ]; - $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 1), new Twig_Node_Expression_AssignName('bar', 1)), array(), 1); - $values = new Twig_Node(array(new Twig_Node_Expression_Constant('foo', 1), new Twig_Node_Expression_Name('bar', 1)), array(), 1); + $names = new Twig_Node([new Twig_Node_Expression_AssignName('foo', 1), new Twig_Node_Expression_AssignName('bar', 1)], [], 1); + $values = new Twig_Node([new Twig_Node_Expression_Constant('foo', 1), new Twig_Node_Expression_Name('bar', 1)], [], 1); $node = new Twig_Node_Set(false, $names, $values, 1); - $tests[] = array($node, <<getVariableGetter('bar')}); +list(\$context["foo"], \$context["bar"]) = ["foo", {$this->getVariableGetter('bar')}]; EOF - ); + ]; return $tests; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/SpacelessTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/SpacelessTest.php index 222ca092..c7e5fb65 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/SpacelessTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/SpacelessTest.php @@ -13,7 +13,7 @@ class Twig_Tests_Node_SpacelessTest extends Twig_Test_NodeTestCase { public function testConstructor() { - $body = new Twig_Node(array(new Twig_Node_Text('
    foo
    ', 1))); + $body = new Twig_Node([new Twig_Node_Text('
    foo
    ', 1)]); $node = new Twig_Node_Spaceless($body, 1); $this->assertEquals($body, $node->getNode('body')); @@ -21,17 +21,17 @@ class Twig_Tests_Node_SpacelessTest extends Twig_Test_NodeTestCase public function getTests() { - $body = new Twig_Node(array(new Twig_Node_Text('
    foo
    ', 1))); + $body = new Twig_Node([new Twig_Node_Text('
    foo
    ', 1)]); $node = new Twig_Node_Spaceless($body, 1); - return array( - array($node, <<
    foo
    "; echo trim(preg_replace('/>\s+<', ob_get_clean())); EOF - ), - ); + ], + ]; } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/TextTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/TextTest.php index ceaf67f4..f175e4d7 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/TextTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Node/TextTest.php @@ -20,8 +20,8 @@ class Twig_Tests_Node_TextTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); - $tests[] = array(new Twig_Node_Text('foo', 1), "// line 1\necho \"foo\";"); + $tests = []; + $tests[] = [new Twig_Node_Text('foo', 1), "// line 1\necho \"foo\";"]; return $tests; } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/NodeVisitor/OptimizerTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/NodeVisitor/OptimizerTest.php index 3baa628c..5f879413 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/NodeVisitor/OptimizerTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/NodeVisitor/OptimizerTest.php @@ -12,7 +12,7 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends \PHPUnit\Framework\TestCase { public function testRenderBlockOptimizer() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $stream = $env->parse($env->tokenize(new Twig_Source('{{ block("foo") }}', 'index'))); @@ -24,7 +24,7 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends \PHPUnit\Framework\TestCase public function testRenderParentBlockOptimizer() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $stream = $env->parse($env->tokenize(new Twig_Source('{% extends "foo" %}{% block content %}{{ parent() }}{% endblock %}', 'index'))); @@ -39,7 +39,7 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends \PHPUnit\Framework\TestCase */ public function testForOptimizer($template, $expected) { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false]); $stream = $env->parse($env->tokenize(new Twig_Source($template, 'index'))); @@ -50,41 +50,41 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends \PHPUnit\Framework\TestCase public function getTestsForForOptimizer() { - return array( - array('{% for i in foo %}{% endfor %}', array('i' => false)), + return [ + ['{% for i in foo %}{% endfor %}', ['i' => false]], - array('{% for i in foo %}{{ loop.index }}{% endfor %}', array('i' => true)), + ['{% for i in foo %}{{ loop.index }}{% endfor %}', ['i' => true]], - array('{% for i in foo %}{% for j in foo %}{% endfor %}{% endfor %}', array('i' => false, 'j' => false)), + ['{% for i in foo %}{% for j in foo %}{% endfor %}{% endfor %}', ['i' => false, 'j' => false]], - array('{% for i in foo %}{% include "foo" %}{% endfor %}', array('i' => true)), + ['{% for i in foo %}{% include "foo" %}{% endfor %}', ['i' => true]], - array('{% for i in foo %}{% include "foo" only %}{% endfor %}', array('i' => false)), + ['{% for i in foo %}{% include "foo" only %}{% endfor %}', ['i' => false]], - array('{% for i in foo %}{% include "foo" with { "foo": "bar" } only %}{% endfor %}', array('i' => false)), + ['{% for i in foo %}{% include "foo" with { "foo": "bar" } only %}{% endfor %}', ['i' => false]], - array('{% for i in foo %}{% include "foo" with { "foo": loop.index } only %}{% endfor %}', array('i' => true)), + ['{% for i in foo %}{% include "foo" with { "foo": loop.index } only %}{% endfor %}', ['i' => true]], - array('{% for i in foo %}{% for j in foo %}{{ loop.index }}{% endfor %}{% endfor %}', array('i' => false, 'j' => true)), + ['{% for i in foo %}{% for j in foo %}{{ loop.index }}{% endfor %}{% endfor %}', ['i' => false, 'j' => true]], - array('{% for i in foo %}{% for j in foo %}{{ loop.parent.loop.index }}{% endfor %}{% endfor %}', array('i' => true, 'j' => true)), + ['{% for i in foo %}{% for j in foo %}{{ loop.parent.loop.index }}{% endfor %}{% endfor %}', ['i' => true, 'j' => true]], - array('{% for i in foo %}{% set l = loop %}{% for j in foo %}{{ l.index }}{% endfor %}{% endfor %}', array('i' => true, 'j' => false)), + ['{% for i in foo %}{% set l = loop %}{% for j in foo %}{{ l.index }}{% endfor %}{% endfor %}', ['i' => true, 'j' => false]], - array('{% for i in foo %}{% for j in foo %}{{ foo.parent.loop.index }}{% endfor %}{% endfor %}', array('i' => false, 'j' => false)), + ['{% for i in foo %}{% for j in foo %}{{ foo.parent.loop.index }}{% endfor %}{% endfor %}', ['i' => false, 'j' => false]], - array('{% for i in foo %}{% for j in foo %}{{ loop["parent"].loop.index }}{% endfor %}{% endfor %}', array('i' => true, 'j' => true)), + ['{% for i in foo %}{% for j in foo %}{{ loop["parent"].loop.index }}{% endfor %}{% endfor %}', ['i' => true, 'j' => true]], - array('{% for i in foo %}{{ include("foo") }}{% endfor %}', array('i' => true)), + ['{% for i in foo %}{{ include("foo") }}{% endfor %}', ['i' => true]], - array('{% for i in foo %}{{ include("foo", with_context = false) }}{% endfor %}', array('i' => false)), + ['{% for i in foo %}{{ include("foo", with_context = false) }}{% endfor %}', ['i' => false]], - array('{% for i in foo %}{{ include("foo", with_context = true) }}{% endfor %}', array('i' => true)), + ['{% for i in foo %}{{ include("foo", with_context = true) }}{% endfor %}', ['i' => true]], - array('{% for i in foo %}{{ include("foo", { "foo": "bar" }, with_context = false) }}{% endfor %}', array('i' => false)), + ['{% for i in foo %}{{ include("foo", { "foo": "bar" }, with_context = false) }}{% endfor %}', ['i' => false]], - array('{% for i in foo %}{{ include("foo", { "foo": loop.index }, with_context = false) }}{% endfor %}', array('i' => true)), - ); + ['{% for i in foo %}{{ include("foo", { "foo": loop.index }, with_context = false) }}{% endfor %}', ['i' => true]], + ]; } public function checkForConfiguration(Twig_Node $node, $target, $withLoop) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/ParserTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/ParserTest.php index 72d19d85..94f6902f 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/ParserTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/ParserTest.php @@ -16,12 +16,12 @@ class Twig_Tests_ParserTest extends \PHPUnit\Framework\TestCase */ public function testUnknownTag() { - $stream = new Twig_TokenStream(array( + $stream = new Twig_TokenStream([ new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', 1), new Twig_Token(Twig_Token::NAME_TYPE, 'foo', 1), new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', 1), new Twig_Token(Twig_Token::EOF_TYPE, '', 1), - )); + ]); $parser = new Twig_Parser(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); $parser->parse($stream); } @@ -32,12 +32,12 @@ class Twig_Tests_ParserTest extends \PHPUnit\Framework\TestCase */ public function testUnknownTagWithoutSuggestions() { - $stream = new Twig_TokenStream(array( + $stream = new Twig_TokenStream([ new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', 1), new Twig_Token(Twig_Token::NAME_TYPE, 'foobar', 1), new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', 1), new Twig_Token(Twig_Token::EOF_TYPE, '', 1), - )); + ]); $parser = new Twig_Parser(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); $parser->parse($stream); } @@ -56,20 +56,20 @@ class Twig_Tests_ParserTest extends \PHPUnit\Framework\TestCase public function getFilterBodyNodesData() { - return array( - array( - new Twig_Node(array(new Twig_Node_Text(' ', 1))), - new Twig_Node(array()), - ), - array( - $input = new Twig_Node(array(new Twig_Node_Set(false, new Twig_Node(), new Twig_Node(), 1))), + return [ + [ + new Twig_Node([new Twig_Node_Text(' ', 1)]), + new Twig_Node([]), + ], + [ + $input = new Twig_Node([new Twig_Node_Set(false, new Twig_Node(), new Twig_Node(), 1)]), $input, - ), - array( - $input = new Twig_Node(array(new Twig_Node_Set(true, new Twig_Node(), new Twig_Node(array(new Twig_Node(array(new Twig_Node_Text('foo', 1))))), 1))), + ], + [ + $input = new Twig_Node([new Twig_Node_Set(true, new Twig_Node(), new Twig_Node([new Twig_Node([new Twig_Node_Text('foo', 1)])]), 1)]), $input, - ), - ); + ], + ]; } /** @@ -88,36 +88,45 @@ class Twig_Tests_ParserTest extends \PHPUnit\Framework\TestCase public function getFilterBodyNodesDataThrowsException() { - return array( - array(new Twig_Node_Text('foo', 1)), - array(new Twig_Node(array(new Twig_Node(array(new Twig_Node_Text('foo', 1)))))), - ); + return [ + [new Twig_Node_Text('foo', 1)], + [new Twig_Node([new Twig_Node([new Twig_Node_Text('foo', 1)])])], + ]; } /** - * @expectedException Twig_Error_Syntax - * @expectedExceptionMessage A template that extends another one cannot start with a byte order mark (BOM); it must be removed at line 1 + * @dataProvider getFilterBodyNodesWithBOMData */ - public function testFilterBodyNodesWithBOM() + public function testFilterBodyNodesWithBOM($emptyNode) { $parser = $this->getParser(); $m = new ReflectionMethod($parser, 'filterBodyNodes'); $m->setAccessible(true); - $m->invoke($parser, new Twig_Node_Text(chr(0xEF).chr(0xBB).chr(0xBF), 1)); + $this->assertNull($m->invoke($parser, new Twig_Node_Text(chr(0xEF).chr(0xBB).chr(0xBF).$emptyNode, 1))); + } + + public function getFilterBodyNodesWithBOMData() + { + return [ + [' '], + ["\t"], + ["\n"], + ["\n\t\n "], + ]; } public function testParseIsReentrant() { - $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array( + $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), [ 'autoescape' => false, 'optimizations' => 0, - )); + ]); $twig->addTokenParser(new TestTokenParser()); $parser = new Twig_Parser($twig); - $parser->parse(new Twig_TokenStream(array( + $parser->parse(new Twig_TokenStream([ new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', 1), new Twig_Token(Twig_Token::NAME_TYPE, 'test', 1), new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', 1), @@ -125,17 +134,17 @@ class Twig_Tests_ParserTest extends \PHPUnit\Framework\TestCase new Twig_Token(Twig_Token::NAME_TYPE, 'foo', 1), new Twig_Token(Twig_Token::VAR_END_TYPE, '', 1), new Twig_Token(Twig_Token::EOF_TYPE, '', 1), - ))); + ])); $this->assertNull($parser->getParent()); } public function testGetVarName() { - $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array( + $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), [ 'autoescape' => false, 'optimizations' => 0, - )); + ]); $twig->parse($twig->tokenize(new Twig_Source(<<setAccessible(true); - $p->setValue($parser, new Twig_TokenStream(array())); + $p->setValue($parser, new Twig_TokenStream([])); return $parser; } @@ -170,17 +179,17 @@ class TestTokenParser extends Twig_TokenParser public function parse(Twig_Token $token) { // simulate the parsing of another template right in the middle of the parsing of the current template - $this->parser->parse(new Twig_TokenStream(array( + $this->parser->parse(new Twig_TokenStream([ new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', 1), new Twig_Token(Twig_Token::NAME_TYPE, 'extends', 1), new Twig_Token(Twig_Token::STRING_TYPE, 'base', 1), new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', 1), new Twig_Token(Twig_Token::EOF_TYPE, '', 1), - ))); + ])); $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); - return new Twig_Node(array()); + return new Twig_Node([]); } public function getTag() diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php index a71b97b9..eead72bb 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php @@ -21,24 +21,24 @@ abstract class Twig_Tests_Profiler_Dumper_AbstractTest extends \PHPUnit\Framewor $profile->expects($this->any())->method('getMemoryUsage')->will($this->returnValue(0)); $profile->expects($this->any())->method('getPeakMemoryUsage')->will($this->returnValue(0)); - $subProfiles = array( + $subProfiles = [ $this->getIndexProfile( - array( + [ $this->getEmbeddedBlockProfile(), $this->getEmbeddedTemplateProfile( - array( + [ $this->getIncludedTemplateProfile(), - ) + ] ), $this->getMacroProfile(), $this->getEmbeddedTemplateProfile( - array( + [ $this->getIncludedTemplateProfile(), - ) + ] ), - ) + ] ), - ); + ]; $profile->expects($this->any())->method('getProfiles')->will($this->returnValue($subProfiles)); $profile->expects($this->any())->method('getIterator')->will($this->returnValue(new ArrayIterator($subProfiles))); @@ -46,27 +46,27 @@ abstract class Twig_Tests_Profiler_Dumper_AbstractTest extends \PHPUnit\Framewor return $profile; } - private function getIndexProfile(array $subProfiles = array()) + private function getIndexProfile(array $subProfiles = []) { return $this->generateProfile('main', 1, true, 'template', 'index.twig', $subProfiles); } - private function getEmbeddedBlockProfile(array $subProfiles = array()) + private function getEmbeddedBlockProfile(array $subProfiles = []) { return $this->generateProfile('body', 0.0001, false, 'block', 'embedded.twig', $subProfiles); } - private function getEmbeddedTemplateProfile(array $subProfiles = array()) + private function getEmbeddedTemplateProfile(array $subProfiles = []) { return $this->generateProfile('main', 0.0001, true, 'template', 'embedded.twig', $subProfiles); } - private function getIncludedTemplateProfile(array $subProfiles = array()) + private function getIncludedTemplateProfile(array $subProfiles = []) { return $this->generateProfile('main', 0.0001, true, 'template', 'included.twig', $subProfiles); } - private function getMacroProfile(array $subProfiles = array()) + private function getMacroProfile(array $subProfiles = []) { return $this->generateProfile('foo', 0.0001, false, 'macro', 'index.twig', $subProfiles); } @@ -81,7 +81,7 @@ abstract class Twig_Tests_Profiler_Dumper_AbstractTest extends \PHPUnit\Framewor * * @return Twig_Profiler_Profile */ - private function generateProfile($name, $duration, $isTemplate, $type, $templateName, array $subProfiles = array()) + private function generateProfile($name, $duration, $isTemplate, $type, $templateName, array $subProfiles = []) { $profile = $this->getMockBuilder('Twig_Profiler_Profile')->disableOriginalConstructor()->getMock(); diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php index 08db96a9..cc0aafd5 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php @@ -62,8 +62,8 @@ class Twig_Tests_Profiler_ProfileTest extends \PHPUnit\Framework\TestCase $profile->addProfile($a = new Twig_Profiler_Profile()); $profile->addProfile($b = new Twig_Profiler_Profile()); - $this->assertSame(array($a, $b), $profile->getProfiles()); - $this->assertSame(array($a, $b), iterator_to_array($profile)); + $this->assertSame([$a, $b], $profile->getProfiles()); + $this->assertSame([$a, $b], iterator_to_array($profile)); } public function testGetDuration() diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/TemplateTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/TemplateTest.php index af33c0b9..623f2a70 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/TemplateTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/TemplateTest.php @@ -15,8 +15,8 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase */ public function testDisplayBlocksAcceptTemplateOnlyAsBlocks() { - $template = $this->getMockForAbstractClass('Twig_Template', array(), '', false); - $template->displayBlock('foo', array(), array('foo' => array(new stdClass(), 'foo'))); + $template = $this->getMockForAbstractClass('Twig_Template', [], '', false); + $template->displayBlock('foo', [], ['foo' => [new stdClass(), 'foo']]); } /** @@ -24,19 +24,19 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase */ public function testGetAttributeExceptions($template, $message) { - $templates = array('index' => $template); - $env = new Twig_Environment(new Twig_Loader_Array($templates), array('strict_variables' => true)); + $templates = ['index' => $template]; + $env = new Twig_Environment(new Twig_Loader_Array($templates), ['strict_variables' => true]); $template = $env->loadTemplate('index'); - $context = array( + $context = [ 'string' => 'foo', 'null' => null, - 'empty_array' => array(), - 'array' => array('foo' => 'foo'), + 'empty_array' => [], + 'array' => ['foo' => 'foo'], 'array_access' => new Twig_TemplateArrayAccessObject(), 'magic_exception' => new Twig_TemplateMagicPropertyObjectWithException(), 'object' => new stdClass(), - ); + ]; try { $template->render($context); @@ -48,25 +48,25 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase public function getAttributeExceptions() { - return array( - array('{{ string["a"] }}', 'Impossible to access a key ("a") on a string variable ("foo") in "%s" at line 1.'), - array('{{ null["a"] }}', 'Impossible to access a key ("a") on a null variable in "%s" at line 1.'), - array('{{ empty_array["a"] }}', 'Key "a" does not exist as the array is empty in "%s" at line 1.'), - array('{{ array["a"] }}', 'Key "a" for array with keys "foo" does not exist in "%s" at line 1.'), - array('{{ array_access["a"] }}', 'Key "a" in object with ArrayAccess of class "Twig_TemplateArrayAccessObject" does not exist in "%s" at line 1.'), - array('{{ string.a }}', 'Impossible to access an attribute ("a") on a string variable ("foo") in "%s" at line 1.'), - array('{{ string.a() }}', 'Impossible to invoke a method ("a") on a string variable ("foo") in "%s" at line 1.'), - array('{{ null.a }}', 'Impossible to access an attribute ("a") on a null variable in "%s" at line 1.'), - array('{{ null.a() }}', 'Impossible to invoke a method ("a") on a null variable in "%s" at line 1.'), - array('{{ array.a() }}', 'Impossible to invoke a method ("a") on an array in "%s" at line 1.'), - array('{{ empty_array.a }}', 'Key "a" does not exist as the array is empty in "%s" at line 1.'), - array('{{ array.a }}', 'Key "a" for array with keys "foo" does not exist in "%s" at line 1.'), - array('{{ attribute(array, -10) }}', 'Key "-10" for array with keys "foo" does not exist in "%s" at line 1.'), - array('{{ array_access.a }}', 'Neither the property "a" nor one of the methods "a()", "geta()"/"isa()"/"hasa()" or "__call()" exist and have public access in class "Twig_TemplateArrayAccessObject" in "%s" at line 1.'), - array('{% from _self import foo %}{% macro foo(obj) %}{{ obj.missing_method() }}{% endmacro %}{{ foo(array_access) }}', 'Neither the property "missing_method" nor one of the methods "missing_method()", "getmissing_method()"/"ismissing_method()"/"hasmissing_method()" or "__call()" exist and have public access in class "Twig_TemplateArrayAccessObject" in "%s" at line 1.'), - array('{{ magic_exception.test }}', 'An exception has been thrown during the rendering of a template ("Hey! Don\'t try to isset me!") in "%s" at line 1.'), - array('{{ object["a"] }}', 'Impossible to access a key "a" on an object of class "stdClass" that does not implement ArrayAccess interface in "%s" at line 1.'), - ); + return [ + ['{{ string["a"] }}', 'Impossible to access a key ("a") on a string variable ("foo") in "%s" at line 1.'], + ['{{ null["a"] }}', 'Impossible to access a key ("a") on a null variable in "%s" at line 1.'], + ['{{ empty_array["a"] }}', 'Key "a" does not exist as the array is empty in "%s" at line 1.'], + ['{{ array["a"] }}', 'Key "a" for array with keys "foo" does not exist in "%s" at line 1.'], + ['{{ array_access["a"] }}', 'Key "a" in object with ArrayAccess of class "Twig_TemplateArrayAccessObject" does not exist in "%s" at line 1.'], + ['{{ string.a }}', 'Impossible to access an attribute ("a") on a string variable ("foo") in "%s" at line 1.'], + ['{{ string.a() }}', 'Impossible to invoke a method ("a") on a string variable ("foo") in "%s" at line 1.'], + ['{{ null.a }}', 'Impossible to access an attribute ("a") on a null variable in "%s" at line 1.'], + ['{{ null.a() }}', 'Impossible to invoke a method ("a") on a null variable in "%s" at line 1.'], + ['{{ array.a() }}', 'Impossible to invoke a method ("a") on an array in "%s" at line 1.'], + ['{{ empty_array.a }}', 'Key "a" does not exist as the array is empty in "%s" at line 1.'], + ['{{ array.a }}', 'Key "a" for array with keys "foo" does not exist in "%s" at line 1.'], + ['{{ attribute(array, -10) }}', 'Key "-10" for array with keys "foo" does not exist in "%s" at line 1.'], + ['{{ array_access.a }}', 'Neither the property "a" nor one of the methods "a()", "geta()"/"isa()"/"hasa()" or "__call()" exist and have public access in class "Twig_TemplateArrayAccessObject" in "%s" at line 1.'], + ['{% from _self import foo %}{% macro foo(obj) %}{{ obj.missing_method() }}{% endmacro %}{{ foo(array_access) }}', 'Neither the property "missing_method" nor one of the methods "missing_method()", "getmissing_method()"/"ismissing_method()"/"hasmissing_method()" or "__call()" exist and have public access in class "Twig_TemplateArrayAccessObject" in "%s" at line 1.'], + ['{{ magic_exception.test }}', 'An exception has been thrown during the rendering of a template ("Hey! Don\'t try to isset me!") in "%s" at line 1.'], + ['{{ object["a"] }}', 'Impossible to access a key "a" on an object of class "stdClass" that does not implement ArrayAccess interface in "%s" at line 1.'], + ]; } /** @@ -75,12 +75,12 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase public function testGetAttributeWithSandbox($object, $item, $allowed) { $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); - $policy = new Twig_Sandbox_SecurityPolicy(array(), array(), array(/*method*/), array(/*prop*/), array()); + $policy = new Twig_Sandbox_SecurityPolicy([], [], [/*method*/], [/*prop*/], []); $twig->addExtension(new Twig_Extension_Sandbox($policy, !$allowed)); $template = new Twig_TemplateTest($twig); try { - twig_get_attribute($twig, $template->getSourceContext(), $object, $item, array(), 'any', false, false, true); + twig_get_attribute($twig, $template->getSourceContext(), $object, $item, [], 'any', false, false, true); if (!$allowed) { $this->fail(); @@ -100,12 +100,12 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase public function getGetAttributeWithSandbox() { - return array( - array(new Twig_TemplatePropertyObject(), 'defined', false), - array(new Twig_TemplatePropertyObject(), 'defined', true), - array(new Twig_TemplateMethodObject(), 'defined', false), - array(new Twig_TemplateMethodObject(), 'defined', true), - ); + return [ + [new Twig_TemplatePropertyObject(), 'defined', false], + [new Twig_TemplatePropertyObject(), 'defined', true], + [new Twig_TemplateMethodObject(), 'defined', false], + [new Twig_TemplateMethodObject(), 'defined', true], + ]; } /** @@ -117,7 +117,7 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); $template = new Twig_TemplateTest($twig, 'index.twig'); try { - $template->renderBlock('unknown', array()); + $template->renderBlock('unknown', []); } catch (\Exception $e) { ob_end_clean(); @@ -133,7 +133,7 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase { $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); $template = new Twig_TemplateTest($twig, 'index.twig'); - $template->displayBlock('unknown', array()); + $template->displayBlock('unknown', []); } /** @@ -144,7 +144,7 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase { $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); $template = new Twig_TemplateTest($twig, 'parent.twig'); - $template->displayBlock('foo', array(), array('foo' => array(new Twig_TemplateTest($twig, 'index.twig'), 'block_foo')), false); + $template->displayBlock('foo', [], ['foo' => [new Twig_TemplateTest($twig, 'index.twig'), 'block_foo']], false); } public function testGetAttributeOnArrayWithConfusableKey() @@ -152,7 +152,7 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); $template = new Twig_TemplateTest($twig); - $array = array('Zero', 'One', -1 => 'MinusOne', '' => 'EmptyString', '1.5' => 'FloatButString', '01' => 'IntegerButStringWithLeadingZeros'); + $array = ['Zero', 'One', -1 => 'MinusOne', '' => 'EmptyString', '1.5' => 'FloatButString', '01' => 'IntegerButStringWithLeadingZeros']; $this->assertSame('Zero', $array[false]); $this->assertSame('One', $array[true]); @@ -189,7 +189,7 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase */ public function testGetAttributeStrict($defined, $value, $object, $item, $arguments, $type, $exceptionMessage = null) { - $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('strict_variables' => true)); + $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['strict_variables' => true]); $template = new Twig_TemplateTest($twig); if ($defined) { @@ -223,7 +223,7 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase */ public function testGetAttributeDefinedStrict($defined, $value, $object, $item, $arguments, $type) { - $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('strict_variables' => true)); + $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['strict_variables' => true]); $template = new Twig_TemplateTest($twig); $this->assertEquals($defined, twig_get_attribute($twig, $template->getSourceContext(), $object, $item, $arguments, $type, true)); @@ -241,7 +241,7 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase public function getGetAttributeTests() { - $array = array( + $array = [ 'defined' => 'defined', 'zero' => 0, 'null' => null, @@ -252,9 +252,10 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase 'baf' => 'baf', '09' => '09', '+4' => '+4', - ); + ]; $objectArray = new Twig_TemplateArrayAccessObject(); + $arrayObject = new ArrayObject($array); $stdObject = (object) $array; $magicPropertyObject = new Twig_TemplateMagicPropertyObject(); $propertyObject = new Twig_TemplatePropertyObject(); @@ -268,36 +269,37 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase $methodType = Twig_Template::METHOD_CALL; $arrayType = Twig_Template::ARRAY_CALL; - $basicTests = array( + $basicTests = [ // array(defined, value, property to fetch) - array(true, 'defined', 'defined'), - array(false, null, 'undefined'), - array(false, null, 'protected'), - array(true, 0, 'zero'), - array(true, 1, 1), - array(true, 1, 1.0), - array(true, null, 'null'), - array(true, true, 'bar'), - array(true, true, 'foo'), - array(true, 'baz', 'baz'), - array(true, 'baf', 'baf'), - array(true, '09', '09'), - array(true, '+4', '+4'), - ); - $testObjects = array( + [true, 'defined', 'defined'], + [false, null, 'undefined'], + [false, null, 'protected'], + [true, 0, 'zero'], + [true, 1, 1], + [true, 1, 1.0], + [true, null, 'null'], + [true, true, 'bar'], + [true, true, 'foo'], + [true, 'baz', 'baz'], + [true, 'baf', 'baf'], + [true, '09', '09'], + [true, '+4', '+4'], + ]; + $testObjects = [ // array(object, type of fetch) - array($array, $arrayType), - array($objectArray, $arrayType), - array($stdObject, $anyType), - array($magicPropertyObject, $anyType), - array($methodObject, $methodType), - array($methodObject, $anyType), - array($propertyObject, $anyType), - array($propertyObject1, $anyType), - array($propertyObject2, $anyType), - ); + [$array, $arrayType], + [$objectArray, $arrayType], + [$arrayObject, $anyType], + [$stdObject, $anyType], + [$magicPropertyObject, $anyType], + [$methodObject, $methodType], + [$methodObject, $anyType], + [$propertyObject, $anyType], + [$propertyObject1, $anyType], + [$propertyObject2, $anyType], + ]; - $tests = array(); + $tests = []; foreach ($testObjects as $testObject) { foreach ($basicTests as $test) { // properties cannot be numbers @@ -309,27 +311,27 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase continue; } - $tests[] = array($test[0], $test[1], $testObject[0], $test[2], array(), $testObject[1]); + $tests[] = [$test[0], $test[1], $testObject[0], $test[2], [], $testObject[1]]; } } // additional properties tests - $tests = array_merge($tests, array( - array(true, null, $propertyObject3, 'foo', array(), $anyType), - )); + $tests = array_merge($tests, [ + [true, null, $propertyObject3, 'foo', [], $anyType], + ]); // additional method tests - $tests = array_merge($tests, array( - array(true, 'defined', $methodObject, 'defined', array(), $methodType), - array(true, 'defined', $methodObject, 'DEFINED', array(), $methodType), - array(true, 'defined', $methodObject, 'getDefined', array(), $methodType), - array(true, 'defined', $methodObject, 'GETDEFINED', array(), $methodType), - array(true, 'static', $methodObject, 'static', array(), $methodType), - array(true, 'static', $methodObject, 'getStatic', array(), $methodType), + $tests = array_merge($tests, [ + [true, 'defined', $methodObject, 'defined', [], $methodType], + [true, 'defined', $methodObject, 'DEFINED', [], $methodType], + [true, 'defined', $methodObject, 'getDefined', [], $methodType], + [true, 'defined', $methodObject, 'GETDEFINED', [], $methodType], + [true, 'static', $methodObject, 'static', [], $methodType], + [true, 'static', $methodObject, 'getStatic', [], $methodType], - array(true, '__call_undefined', $magicMethodObject, 'undefined', array(), $methodType), - array(true, '__call_UNDEFINED', $magicMethodObject, 'UNDEFINED', array(), $methodType), - )); + [true, '__call_undefined', $magicMethodObject, 'undefined', [], $methodType], + [true, '__call_UNDEFINED', $magicMethodObject, 'UNDEFINED', [], $methodType], + ]); // add the same tests for the any type foreach ($tests as $test) { @@ -342,28 +344,33 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase $methodAndPropObject = new Twig_TemplateMethodAndPropObject(); // additional method tests - $tests = array_merge($tests, array( - array(true, 'a', $methodAndPropObject, 'a', array(), $anyType), - array(true, 'a', $methodAndPropObject, 'a', array(), $methodType), - array(false, null, $methodAndPropObject, 'a', array(), $arrayType), + $tests = array_merge($tests, [ + [true, 'a', $methodAndPropObject, 'a', [], $anyType], + [true, 'a', $methodAndPropObject, 'a', [], $methodType], + [false, null, $methodAndPropObject, 'a', [], $arrayType], - array(true, 'b_prop', $methodAndPropObject, 'b', array(), $anyType), - array(true, 'b', $methodAndPropObject, 'B', array(), $anyType), - array(true, 'b', $methodAndPropObject, 'b', array(), $methodType), - array(true, 'b', $methodAndPropObject, 'B', array(), $methodType), - array(false, null, $methodAndPropObject, 'b', array(), $arrayType), + [true, 'b_prop', $methodAndPropObject, 'b', [], $anyType], + [true, 'b', $methodAndPropObject, 'B', [], $anyType], + [true, 'b', $methodAndPropObject, 'b', [], $methodType], + [true, 'b', $methodAndPropObject, 'B', [], $methodType], + [false, null, $methodAndPropObject, 'b', [], $arrayType], - array(false, null, $methodAndPropObject, 'c', array(), $anyType), - array(false, null, $methodAndPropObject, 'c', array(), $methodType), - array(false, null, $methodAndPropObject, 'c', array(), $arrayType), - )); + [false, null, $methodAndPropObject, 'c', [], $anyType], + [false, null, $methodAndPropObject, 'c', [], $methodType], + [false, null, $methodAndPropObject, 'c', [], $arrayType], + ]); + + $arrayAccess = new Twig_TemplateArrayAccess(); + $tests = array_merge($tests, [ + [true, ['foo' => 'bar'], $arrayAccess, 'vars', [], $anyType], + ]); // tests when input is not an array or object - $tests = array_merge($tests, array( - array(false, null, 42, 'a', array(), $anyType, 'Impossible to access an attribute ("a") on a integer variable ("42") in "index.twig".'), - array(false, null, 'string', 'a', array(), $anyType, 'Impossible to access an attribute ("a") on a string variable ("string") in "index.twig".'), - array(false, null, array(), 'a', array(), $anyType, 'Key "a" does not exist as the array is empty in "index.twig".'), - )); + $tests = array_merge($tests, [ + [false, null, 42, 'a', [], $anyType, 'Impossible to access an attribute ("a") on a integer variable ("42") in "index.twig".'], + [false, null, 'string', 'a', [], $anyType, 'Impossible to access an attribute ("a") on a string variable ("string") in "index.twig".'], + [false, null, [], 'a', [], $anyType, 'Key "a" does not exist as the array is empty in "index.twig".'], + ]); return $tests; } @@ -373,9 +380,9 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase */ public function testGetIsMethods() { - $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('strict_variables' => true)); + $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['strict_variables' => true]); $getIsObject = new Twig_TemplateGetIsMethods(); - $template = new Twig_TemplateTest($twig, array('strict_variables' => true)); + $template = new Twig_TemplateTest($twig, ['strict_variables' => true]); // first time should not create a cache for "get" $this->assertNull(twig_get_attribute($twig, $template->getSourceContext(), $getIsObject, 'get')); // 0 should be in the method cache now, so this should fail @@ -420,7 +427,7 @@ class Twig_TemplateTest extends Twig_Template public function getDebugInfo() { - return array(); + return []; } protected function doGetParent(array $context) @@ -428,11 +435,11 @@ class Twig_TemplateTest extends Twig_Template return false; } - protected function doDisplay(array $context, array $blocks = array()) + protected function doDisplay(array $context, array $blocks = []) { } - public function block_name($context, array $blocks = array()) + public function block_name($context, array $blocks = []) { } } @@ -441,7 +448,7 @@ class Twig_TemplateArrayAccessObject implements ArrayAccess { protected $protected = 'protected'; - public $attributes = array( + public $attributes = [ 'defined' => 'defined', 'zero' => 0, 'null' => null, @@ -452,7 +459,7 @@ class Twig_TemplateArrayAccessObject implements ArrayAccess 'baf' => 'baf', '09' => '09', '+4' => '+4', - ); + ]; public function offsetExists($name) { @@ -477,7 +484,7 @@ class Twig_TemplateMagicPropertyObject { public $defined = 'defined'; - public $attributes = array( + public $attributes = [ 'zero' => 0, 'null' => null, '1' => 1, @@ -487,7 +494,7 @@ class Twig_TemplateMagicPropertyObject 'baf' => 'baf', '09' => '09', '+4' => '+4', - ); + ]; protected $protected = 'protected'; @@ -527,19 +534,21 @@ class Twig_TemplatePropertyObjectAndIterator extends Twig_TemplatePropertyObject { public function getIterator() { - return new ArrayIterator(array('foo', 'bar')); + return new ArrayIterator(['foo', 'bar']); } } class Twig_TemplatePropertyObjectAndArrayAccess extends Twig_TemplatePropertyObject implements ArrayAccess { - private $data = array( + private $data = [ 'defined' => 'defined', 'zero' => 0, 'null' => null, 'bar' => true, + 'foo' => true, 'baz' => 'baz', - ); + 'baf' => 'baf', + ]; public function offsetExists($offset) { @@ -682,6 +691,34 @@ class Twig_TemplateMethodAndPropObject } } +class Twig_TemplateArrayAccess implements ArrayAccess +{ + public $vars = [ + 'foo' => 'bar', + ]; + private $children = []; + + public function offsetExists($offset) + { + return array_key_exists($offset, $this->children); + } + + public function offsetGet($offset) + { + return $this->children[$offset]; + } + + public function offsetSet($offset, $value) + { + $this->children[$offset] = $value; + } + + public function offsetUnset($offset) + { + unset($this->children[$offset]); + } +} + class Twig_TemplateMagicMethodObject { public function __call($method, $arguments) diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/TemplateWrapperTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/TemplateWrapperTest.php index cc71052c..0e7833ed 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/TemplateWrapperTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/TemplateWrapperTest.php @@ -12,52 +12,52 @@ class Twig_Tests_TemplateWrapperTest extends \PHPUnit\Framework\TestCase { public function testHasGetBlocks() { - $twig = new Twig_Environment(new Twig_Loader_Array(array( + $twig = new Twig_Environment(new Twig_Loader_Array([ 'index' => '{% block foo %}{% endblock %}', 'index_with_use' => '{% use "imported" %}{% block foo %}{% endblock %}', 'index_with_extends' => '{% extends "extended" %}{% block foo %}{% endblock %}', 'imported' => '{% block imported %}{% endblock %}', 'extended' => '{% block extended %}{% endblock %}', - ))); + ])); $wrapper = new Twig_TemplateWrapper($twig, $twig->loadTemplate('index')); $this->assertTrue($wrapper->hasBlock('foo')); $this->assertFalse($wrapper->hasBlock('bar')); - $this->assertEquals(array('foo'), $wrapper->getBlockNames()); + $this->assertEquals(['foo'], $wrapper->getBlockNames()); $wrapper = new Twig_TemplateWrapper($twig, $twig->loadTemplate('index_with_use')); $this->assertTrue($wrapper->hasBlock('foo')); $this->assertTrue($wrapper->hasBlock('imported')); - $this->assertEquals(array('imported', 'foo'), $wrapper->getBlockNames()); + $this->assertEquals(['imported', 'foo'], $wrapper->getBlockNames()); $wrapper = new Twig_TemplateWrapper($twig, $twig->loadTemplate('index_with_extends')); $this->assertTrue($wrapper->hasBlock('foo')); $this->assertTrue($wrapper->hasBlock('extended')); - $this->assertEquals(array('foo', 'extended'), $wrapper->getBlockNames()); + $this->assertEquals(['foo', 'extended'], $wrapper->getBlockNames()); } public function testRenderBlock() { - $twig = new Twig_Environment(new Twig_Loader_Array(array( + $twig = new Twig_Environment(new Twig_Loader_Array([ 'index' => '{% block foo %}{{ foo }}{{ bar }}{% endblock %}', - ))); + ])); $twig->addGlobal('bar', 'BAR'); $wrapper = new Twig_TemplateWrapper($twig, $twig->loadTemplate('index')); - $this->assertEquals('FOOBAR', $wrapper->renderBlock('foo', array('foo' => 'FOO'))); + $this->assertEquals('FOOBAR', $wrapper->renderBlock('foo', ['foo' => 'FOO'])); } public function testDisplayBlock() { - $twig = new Twig_Environment(new Twig_Loader_Array(array( + $twig = new Twig_Environment(new Twig_Loader_Array([ 'index' => '{% block foo %}{{ foo }}{{ bar }}{% endblock %}', - ))); + ])); $twig->addGlobal('bar', 'BAR'); $wrapper = new Twig_TemplateWrapper($twig, $twig->loadTemplate('index')); ob_start(); - $wrapper->displayBlock('foo', array('foo' => 'FOO')); + $wrapper->displayBlock('foo', ['foo' => 'FOO']); $this->assertEquals('FOOBAR', ob_get_clean()); } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php index cf3593d2..fa2c67b1 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php @@ -15,7 +15,7 @@ class Twig_Tests_TokenStreamTest extends \PHPUnit\Framework\TestCase protected function setUp() { - self::$tokens = array( + self::$tokens = [ new Twig_Token(Twig_Token::TEXT_TYPE, 1, 1), new Twig_Token(Twig_Token::TEXT_TYPE, 2, 1), new Twig_Token(Twig_Token::TEXT_TYPE, 3, 1), @@ -24,13 +24,13 @@ class Twig_Tests_TokenStreamTest extends \PHPUnit\Framework\TestCase new Twig_Token(Twig_Token::TEXT_TYPE, 6, 1), new Twig_Token(Twig_Token::TEXT_TYPE, 7, 1), new Twig_Token(Twig_Token::EOF_TYPE, 0, 1), - ); + ]; } public function testNext() { $stream = new Twig_TokenStream(self::$tokens); - $repr = array(); + $repr = []; while (!$stream->isEOF()) { $token = $stream->next(); @@ -45,9 +45,9 @@ class Twig_Tests_TokenStreamTest extends \PHPUnit\Framework\TestCase */ public function testEndOfTemplateNext() { - $stream = new Twig_TokenStream(array( + $stream = new Twig_TokenStream([ new Twig_Token(Twig_Token::BLOCK_START_TYPE, 1, 1), - )); + ]); while (!$stream->isEOF()) { $stream->next(); } @@ -59,9 +59,9 @@ class Twig_Tests_TokenStreamTest extends \PHPUnit\Framework\TestCase */ public function testEndOfTemplateLook() { - $stream = new Twig_TokenStream(array( + $stream = new Twig_TokenStream([ new Twig_Token(Twig_Token::BLOCK_START_TYPE, 1, 1), - )); + ]); while (!$stream->isEOF()) { $stream->look(); $stream->next(); diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Util/DeprecationCollectorTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Util/DeprecationCollectorTest.php index 887a90af..8542560e 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Util/DeprecationCollectorTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/Util/DeprecationCollectorTest.php @@ -17,12 +17,12 @@ class Twig_Tests_Util_DeprecationCollectorTest extends \PHPUnit\Framework\TestCa public function testCollect() { $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); - $twig->addFunction(new Twig_SimpleFunction('deprec', array($this, 'deprec'), array('deprecated' => true))); + $twig->addFunction(new Twig_SimpleFunction('deprec', [$this, 'deprec'], ['deprecated' => true])); $collector = new Twig_Util_DeprecationCollector($twig); $deprecations = $collector->collect(new Twig_Tests_Util_Iterator()); - $this->assertEquals(array('Twig Function "deprec" is deprecated in deprec.twig at line 1.'), $deprecations); + $this->assertEquals(['Twig Function "deprec" is deprecated in deprec.twig at line 1.'], $deprecations); } public function deprec() @@ -34,9 +34,9 @@ class Twig_Tests_Util_Iterator implements IteratorAggregate { public function getIterator() { - return new ArrayIterator(array( + return new ArrayIterator([ 'ok.twig' => '{{ foo }}', 'deprec.twig' => '{{ deprec("foo") }}', - )); + ]); } } diff --git a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/escapingTest.php b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/escapingTest.php index 80a108ab..46a04700 100644 --- a/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/escapingTest.php +++ b/src/cadolesuser-1.0/vendor/twig/twig/test/Twig/Tests/escapingTest.php @@ -11,18 +11,19 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase /** * All character encodings supported by htmlspecialchars(). */ - protected $htmlSpecialChars = array( + protected $htmlSpecialChars = [ '\'' => ''', '"' => '"', '<' => '<', '>' => '>', '&' => '&', - ); + ]; - protected $htmlAttrSpecialChars = array( + protected $htmlAttrSpecialChars = [ '\'' => ''', /* Characters beyond ASCII value 255 to unicode escape */ 'Ā' => 'Ā', + '😀' => '😀', /* Immune chars excluded */ ',' => ',', '.' => '.', @@ -47,9 +48,9 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase '"' => '"', /* Encode spaces for quoteless attribute protection */ ' ' => ' ', - ); + ]; - protected $jsSpecialChars = array( + protected $jsSpecialChars = [ /* HTML special chars - escape without exception to hex */ '<' => '\\u003C', '>' => '\\u003E', @@ -80,9 +81,9 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase "\0" => '\\u0000', /* Encode spaces for quoteless attribute protection */ ' ' => '\\u0020', - ); + ]; - protected $urlSpecialChars = array( + protected $urlSpecialChars = [ /* HTML special chars - escape without exception to percent encoding */ '<' => '%3C', '>' => '%3E', @@ -115,9 +116,9 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase ' ' => '%20', '~' => '~', '+' => '%2B', - ); + ]; - protected $cssSpecialChars = array( + protected $cssSpecialChars = [ /* HTML special chars - escape without exception to hex */ '<' => '\\3C ', '>' => '\\3E ', @@ -144,7 +145,7 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase "\0" => '\\0 ', /* Encode spaces for quoteless attribute protection */ ' ' => '\\20 ', - ); + ]; protected $env; @@ -219,7 +220,7 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase public function testUnicodeCodepointConversionToUtf8() { $expected = ' ~ޙ'; - $codepoints = array(0x20, 0x7e, 0x799); + $codepoints = [0x20, 0x7e, 0x799]; $result = ''; foreach ($codepoints as $value) { $result .= $this->codepointToUtf8($value); @@ -259,7 +260,7 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase public function testJavascriptEscapingEscapesOwaspRecommendedRanges() { - $immune = array(',', '.', '_'); // Exceptions to escaping ranges + $immune = [',', '.', '_']; // Exceptions to escaping ranges for ($chr = 0; $chr < 0xFF; ++$chr) { if ($chr >= 0x30 && $chr <= 0x39 || $chr >= 0x41 && $chr <= 0x5A @@ -282,7 +283,7 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase public function testHtmlAttributeEscapingEscapesOwaspRecommendedRanges() { - $immune = array(',', '.', '-', '_'); // Exceptions to escaping ranges + $immune = [',', '.', '-', '_']; // Exceptions to escaping ranges for ($chr = 0; $chr < 0xFF; ++$chr) { if ($chr >= 0x30 && $chr <= 0x39 || $chr >= 0x41 && $chr <= 0x5A diff --git a/src/cadolesuser-1.0/web/uploads/header/.gitkeep b/src/cadolesuser-1.0/web/uploads/header/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/cadolesuser-1.0/web/uploads/header/header.png b/src/cadolesuser-1.0/web/uploads/header/header.png new file mode 100644 index 00000000..abd6249c Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/header/header.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/.gitkeep b/src/cadolesuser-1.0/web/uploads/icon/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_anchor.png b/src/cadolesuser-1.0/web/uploads/icon/icon_anchor.png new file mode 100755 index 00000000..af7dc561 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_anchor.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_aperture.png b/src/cadolesuser-1.0/web/uploads/icon/icon_aperture.png new file mode 100755 index 00000000..62bb7bbd Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_aperture.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_arrow-down.png b/src/cadolesuser-1.0/web/uploads/icon/icon_arrow-down.png new file mode 100755 index 00000000..2c676bcb Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_arrow-down.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_arrow-up.png b/src/cadolesuser-1.0/web/uploads/icon/icon_arrow-up.png new file mode 100755 index 00000000..dd115e7e Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_arrow-up.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_art.png b/src/cadolesuser-1.0/web/uploads/icon/icon_art.png new file mode 100755 index 00000000..45e1f766 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_art.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_bar-chart.png b/src/cadolesuser-1.0/web/uploads/icon/icon_bar-chart.png new file mode 100755 index 00000000..61f778fa Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_bar-chart.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_batteryfull.png b/src/cadolesuser-1.0/web/uploads/icon/icon_batteryfull.png new file mode 100755 index 00000000..78bb1b2b Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_batteryfull.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_batterylow.png b/src/cadolesuser-1.0/web/uploads/icon/icon_batterylow.png new file mode 100755 index 00000000..db1e48db Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_batterylow.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_bdd.png b/src/cadolesuser-1.0/web/uploads/icon/icon_bdd.png new file mode 100644 index 00000000..e717e298 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_bdd.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_bike.png b/src/cadolesuser-1.0/web/uploads/icon/icon_bike.png new file mode 100755 index 00000000..b816bb1f Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_bike.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_biker.png b/src/cadolesuser-1.0/web/uploads/icon/icon_biker.png new file mode 100755 index 00000000..9a0fbb1e Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_biker.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_bikewheel.png b/src/cadolesuser-1.0/web/uploads/icon/icon_bikewheel.png new file mode 100755 index 00000000..e328e44b Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_bikewheel.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_blimp.png b/src/cadolesuser-1.0/web/uploads/icon/icon_blimp.png new file mode 100755 index 00000000..961f1278 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_blimp.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_bolt.png b/src/cadolesuser-1.0/web/uploads/icon/icon_bolt.png new file mode 100755 index 00000000..0916bfcc Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_bolt.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_bomb.png b/src/cadolesuser-1.0/web/uploads/icon/icon_bomb.png new file mode 100755 index 00000000..5ede7f32 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_bomb.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_booklet.png b/src/cadolesuser-1.0/web/uploads/icon/icon_booklet.png new file mode 100755 index 00000000..5cb78203 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_booklet.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_bookshelf.png b/src/cadolesuser-1.0/web/uploads/icon/icon_bookshelf.png new file mode 100755 index 00000000..eb4cb999 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_bookshelf.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_briefcase.png b/src/cadolesuser-1.0/web/uploads/icon/icon_briefcase.png new file mode 100755 index 00000000..a9eae6b7 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_briefcase.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_brightness.png b/src/cadolesuser-1.0/web/uploads/icon/icon_brightness.png new file mode 100755 index 00000000..7e548ed3 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_brightness.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_browser.png b/src/cadolesuser-1.0/web/uploads/icon/icon_browser.png new file mode 100755 index 00000000..7ae24e98 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_browser.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_brush-pencil.png b/src/cadolesuser-1.0/web/uploads/icon/icon_brush-pencil.png new file mode 100755 index 00000000..f5dfa6da Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_brush-pencil.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_cadoles.png b/src/cadolesuser-1.0/web/uploads/icon/icon_cadoles.png new file mode 100644 index 00000000..8ae88870 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_cadoles.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_calculator.png b/src/cadolesuser-1.0/web/uploads/icon/icon_calculator.png new file mode 100755 index 00000000..e774c4d5 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_calculator.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_calendar.png b/src/cadolesuser-1.0/web/uploads/icon/icon_calendar.png new file mode 100755 index 00000000..a4e22bf5 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_calendar.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_camera.png b/src/cadolesuser-1.0/web/uploads/icon/icon_camera.png new file mode 100755 index 00000000..c8a5a879 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_camera.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_car.png b/src/cadolesuser-1.0/web/uploads/icon/icon_car.png new file mode 100755 index 00000000..43b4609d Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_car.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_cart.png b/src/cadolesuser-1.0/web/uploads/icon/icon_cart.png new file mode 100755 index 00000000..92abdfc2 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_cart.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_carwheel.png b/src/cadolesuser-1.0/web/uploads/icon/icon_carwheel.png new file mode 100755 index 00000000..547d6625 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_carwheel.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_caution.png b/src/cadolesuser-1.0/web/uploads/icon/icon_caution.png new file mode 100755 index 00000000..f1c2dd6d Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_caution.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_chat.png b/src/cadolesuser-1.0/web/uploads/icon/icon_chat.png new file mode 100755 index 00000000..e3a29978 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_chat.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_check.png b/src/cadolesuser-1.0/web/uploads/icon/icon_check.png new file mode 100755 index 00000000..399af357 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_check.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_circlecompass.png b/src/cadolesuser-1.0/web/uploads/icon/icon_circlecompass.png new file mode 100755 index 00000000..b49cf525 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_circlecompass.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_clapboard.png b/src/cadolesuser-1.0/web/uploads/icon/icon_clapboard.png new file mode 100755 index 00000000..d0b19330 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_clapboard.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_clipboard.png b/src/cadolesuser-1.0/web/uploads/icon/icon_clipboard.png new file mode 100755 index 00000000..ebc0dcdc Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_clipboard.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_clock.png b/src/cadolesuser-1.0/web/uploads/icon/icon_clock.png new file mode 100755 index 00000000..e68fcf11 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_clock.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_cloud.png b/src/cadolesuser-1.0/web/uploads/icon/icon_cloud.png new file mode 100755 index 00000000..20a87974 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_cloud.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_cmyk.png b/src/cadolesuser-1.0/web/uploads/icon/icon_cmyk.png new file mode 100755 index 00000000..666a5860 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_cmyk.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_colorwheel.png b/src/cadolesuser-1.0/web/uploads/icon/icon_colorwheel.png new file mode 100755 index 00000000..c847f1a6 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_colorwheel.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_compass.png b/src/cadolesuser-1.0/web/uploads/icon/icon_compass.png new file mode 100755 index 00000000..a42db4a5 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_compass.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_compose.png b/src/cadolesuser-1.0/web/uploads/icon/icon_compose.png new file mode 100755 index 00000000..278cef31 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_compose.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_computer.png b/src/cadolesuser-1.0/web/uploads/icon/icon_computer.png new file mode 100755 index 00000000..f1bc1b41 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_computer.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_cone.png b/src/cadolesuser-1.0/web/uploads/icon/icon_cone.png new file mode 100755 index 00000000..46588e21 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_cone.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_contacts.png b/src/cadolesuser-1.0/web/uploads/icon/icon_contacts.png new file mode 100755 index 00000000..edc0f566 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_contacts.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_contrast.png b/src/cadolesuser-1.0/web/uploads/icon/icon_contrast.png new file mode 100755 index 00000000..36be7059 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_contrast.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_countdown.png b/src/cadolesuser-1.0/web/uploads/icon/icon_countdown.png new file mode 100755 index 00000000..c7d938aa Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_countdown.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_creditcard.png b/src/cadolesuser-1.0/web/uploads/icon/icon_creditcard.png new file mode 100755 index 00000000..85d1f2a0 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_creditcard.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_crop.png b/src/cadolesuser-1.0/web/uploads/icon/icon_crop.png new file mode 100755 index 00000000..871e6016 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_crop.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_crossroads.png b/src/cadolesuser-1.0/web/uploads/icon/icon_crossroads.png new file mode 100755 index 00000000..4b2a9420 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_crossroads.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_crous.png b/src/cadolesuser-1.0/web/uploads/icon/icon_crous.png new file mode 100755 index 00000000..7111bc0d Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_crous.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_cruise.png b/src/cadolesuser-1.0/web/uploads/icon/icon_cruise.png new file mode 100755 index 00000000..e848d136 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_cruise.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_cursor.png b/src/cadolesuser-1.0/web/uploads/icon/icon_cursor.png new file mode 100755 index 00000000..558bc2a0 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_cursor.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_denied.png b/src/cadolesuser-1.0/web/uploads/icon/icon_denied.png new file mode 100755 index 00000000..eb58be69 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_denied.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_dev.png b/src/cadolesuser-1.0/web/uploads/icon/icon_dev.png new file mode 100755 index 00000000..2df1e9a0 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_dev.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_die.png b/src/cadolesuser-1.0/web/uploads/icon/icon_die.png new file mode 100755 index 00000000..6ae47abe Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_die.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_document.png b/src/cadolesuser-1.0/web/uploads/icon/icon_document.png new file mode 100755 index 00000000..9743d514 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_document.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_dolly.png b/src/cadolesuser-1.0/web/uploads/icon/icon_dolly.png new file mode 100755 index 00000000..17b12e8f Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_dolly.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_door.png b/src/cadolesuser-1.0/web/uploads/icon/icon_door.png new file mode 100755 index 00000000..ce9d9118 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_door.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_download.png b/src/cadolesuser-1.0/web/uploads/icon/icon_download.png new file mode 100755 index 00000000..fa1d0a50 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_download.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_easel.png b/src/cadolesuser-1.0/web/uploads/icon/icon_easel.png new file mode 100755 index 00000000..48efd8c3 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_easel.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_email.png b/src/cadolesuser-1.0/web/uploads/icon/icon_email.png new file mode 100755 index 00000000..ddd30950 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_email.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_eye.png b/src/cadolesuser-1.0/web/uploads/icon/icon_eye.png new file mode 100755 index 00000000..9acf5dbe Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_eye.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_eyedropper.png b/src/cadolesuser-1.0/web/uploads/icon/icon_eyedropper.png new file mode 100755 index 00000000..abaa9f58 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_eyedropper.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_fashion.png b/src/cadolesuser-1.0/web/uploads/icon/icon_fashion.png new file mode 100755 index 00000000..357e7b28 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_fashion.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_filmreel.png b/src/cadolesuser-1.0/web/uploads/icon/icon_filmreel.png new file mode 100755 index 00000000..48526565 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_filmreel.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_filmroll.png b/src/cadolesuser-1.0/web/uploads/icon/icon_filmroll.png new file mode 100755 index 00000000..17ad9b52 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_filmroll.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_flag.png b/src/cadolesuser-1.0/web/uploads/icon/icon_flag.png new file mode 100755 index 00000000..8b9fa42b Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_flag.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_flame.png b/src/cadolesuser-1.0/web/uploads/icon/icon_flame.png new file mode 100755 index 00000000..808b8dae Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_flame.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_flash.png b/src/cadolesuser-1.0/web/uploads/icon/icon_flash.png new file mode 100755 index 00000000..d08c4006 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_flash.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_flower.png b/src/cadolesuser-1.0/web/uploads/icon/icon_flower.png new file mode 100755 index 00000000..6d95c6e4 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_flower.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_focus.png b/src/cadolesuser-1.0/web/uploads/icon/icon_focus.png new file mode 100755 index 00000000..ebe505ba Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_focus.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_folder.png b/src/cadolesuser-1.0/web/uploads/icon/icon_folder.png new file mode 100755 index 00000000..ba7264f7 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_folder.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_frames.png b/src/cadolesuser-1.0/web/uploads/icon/icon_frames.png new file mode 100755 index 00000000..d0de0ebc Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_frames.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_gamecontroller.png b/src/cadolesuser-1.0/web/uploads/icon/icon_gamecontroller.png new file mode 100755 index 00000000..f9f85d92 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_gamecontroller.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_gas.png b/src/cadolesuser-1.0/web/uploads/icon/icon_gas.png new file mode 100755 index 00000000..866b926e Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_gas.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_gear.png b/src/cadolesuser-1.0/web/uploads/icon/icon_gear.png new file mode 100755 index 00000000..1a74a4f1 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_gear.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_genius.png b/src/cadolesuser-1.0/web/uploads/icon/icon_genius.png new file mode 100755 index 00000000..632ee243 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_genius.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_global.png b/src/cadolesuser-1.0/web/uploads/icon/icon_global.png new file mode 100755 index 00000000..a1bb645b Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_global.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_globe.png b/src/cadolesuser-1.0/web/uploads/icon/icon_globe.png new file mode 100755 index 00000000..bd458e0a Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_globe.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_gps.png b/src/cadolesuser-1.0/web/uploads/icon/icon_gps.png new file mode 100755 index 00000000..270afbbb Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_gps.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_hazard.png b/src/cadolesuser-1.0/web/uploads/icon/icon_hazard.png new file mode 100755 index 00000000..2789918d Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_hazard.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_heart.png b/src/cadolesuser-1.0/web/uploads/icon/icon_heart.png new file mode 100755 index 00000000..8109854d Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_heart.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_helicopter.png b/src/cadolesuser-1.0/web/uploads/icon/icon_helicopter.png new file mode 100755 index 00000000..0d25230d Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_helicopter.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_hotair.png b/src/cadolesuser-1.0/web/uploads/icon/icon_hotair.png new file mode 100755 index 00000000..80891492 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_hotair.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_hourglass.png b/src/cadolesuser-1.0/web/uploads/icon/icon_hourglass.png new file mode 100755 index 00000000..9856c807 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_hourglass.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_image.png b/src/cadolesuser-1.0/web/uploads/icon/icon_image.png new file mode 100755 index 00000000..9e1bd3a0 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_image.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_interstate.png b/src/cadolesuser-1.0/web/uploads/icon/icon_interstate.png new file mode 100755 index 00000000..bb8445af Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_interstate.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_key.png b/src/cadolesuser-1.0/web/uploads/icon/icon_key.png new file mode 100755 index 00000000..103fbab6 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_key.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_keyboard.png b/src/cadolesuser-1.0/web/uploads/icon/icon_keyboard.png new file mode 100755 index 00000000..c041d285 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_keyboard.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_lens.png b/src/cadolesuser-1.0/web/uploads/icon/icon_lens.png new file mode 100755 index 00000000..d549f749 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_lens.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_lightbulb.png b/src/cadolesuser-1.0/web/uploads/icon/icon_lightbulb.png new file mode 100755 index 00000000..eea9ba84 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_lightbulb.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_loading.png b/src/cadolesuser-1.0/web/uploads/icon/icon_loading.png new file mode 100755 index 00000000..a2898680 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_loading.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_location.png b/src/cadolesuser-1.0/web/uploads/icon/icon_location.png new file mode 100755 index 00000000..d8178918 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_location.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_locked.png b/src/cadolesuser-1.0/web/uploads/icon/icon_locked.png new file mode 100755 index 00000000..cd8b2280 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_locked.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_magicwand.png b/src/cadolesuser-1.0/web/uploads/icon/icon_magicwand.png new file mode 100755 index 00000000..c52ca5cd Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_magicwand.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_magnifyingglass.png b/src/cadolesuser-1.0/web/uploads/icon/icon_magnifyingglass.png new file mode 100755 index 00000000..09911689 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_magnifyingglass.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_mail.png b/src/cadolesuser-1.0/web/uploads/icon/icon_mail.png new file mode 100755 index 00000000..9a62d457 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_mail.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_map.png b/src/cadolesuser-1.0/web/uploads/icon/icon_map.png new file mode 100755 index 00000000..8c7febe9 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_map.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_megaphone.png b/src/cadolesuser-1.0/web/uploads/icon/icon_megaphone.png new file mode 100755 index 00000000..8154b9c3 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_megaphone.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_megaphone2.png b/src/cadolesuser-1.0/web/uploads/icon/icon_megaphone2.png new file mode 100755 index 00000000..7596de68 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_megaphone2.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_memorycard.png b/src/cadolesuser-1.0/web/uploads/icon/icon_memorycard.png new file mode 100755 index 00000000..02b20a65 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_memorycard.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_merge.png b/src/cadolesuser-1.0/web/uploads/icon/icon_merge.png new file mode 100755 index 00000000..b5e406c0 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_merge.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_mic.png b/src/cadolesuser-1.0/web/uploads/icon/icon_mic.png new file mode 100755 index 00000000..9343c52b Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_mic.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_microphone.png b/src/cadolesuser-1.0/web/uploads/icon/icon_microphone.png new file mode 100755 index 00000000..f48af837 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_microphone.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_money.png b/src/cadolesuser-1.0/web/uploads/icon/icon_money.png new file mode 100755 index 00000000..538c053c Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_money.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_motorcycle.png b/src/cadolesuser-1.0/web/uploads/icon/icon_motorcycle.png new file mode 100755 index 00000000..3ae8a933 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_motorcycle.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_music.png b/src/cadolesuser-1.0/web/uploads/icon/icon_music.png new file mode 100755 index 00000000..89162911 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_music.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_news.png b/src/cadolesuser-1.0/web/uploads/icon/icon_news.png new file mode 100755 index 00000000..1863fbad Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_news.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_paintbrush.png b/src/cadolesuser-1.0/web/uploads/icon/icon_paintbrush.png new file mode 100755 index 00000000..431a5959 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_paintbrush.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_paintbrush2.png b/src/cadolesuser-1.0/web/uploads/icon/icon_paintbrush2.png new file mode 100755 index 00000000..1e87e0c4 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_paintbrush2.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_paintcan.png b/src/cadolesuser-1.0/web/uploads/icon/icon_paintcan.png new file mode 100755 index 00000000..7f7f605f Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_paintcan.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_paintroller.png b/src/cadolesuser-1.0/web/uploads/icon/icon_paintroller.png new file mode 100755 index 00000000..472c69ff Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_paintroller.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_parachute.png b/src/cadolesuser-1.0/web/uploads/icon/icon_parachute.png new file mode 100755 index 00000000..856517ae Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_parachute.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_pencil.png b/src/cadolesuser-1.0/web/uploads/icon/icon_pencil.png new file mode 100755 index 00000000..a9c5e548 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_pencil.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_phone.png b/src/cadolesuser-1.0/web/uploads/icon/icon_phone.png new file mode 100755 index 00000000..1f49677c Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_phone.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_piechart.png b/src/cadolesuser-1.0/web/uploads/icon/icon_piechart.png new file mode 100755 index 00000000..ec74a324 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_piechart.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_pin.png b/src/cadolesuser-1.0/web/uploads/icon/icon_pin.png new file mode 100755 index 00000000..cfe3ad5f Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_pin.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_pin2.png b/src/cadolesuser-1.0/web/uploads/icon/icon_pin2.png new file mode 100755 index 00000000..2ddd41ea Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_pin2.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_plane.png b/src/cadolesuser-1.0/web/uploads/icon/icon_plane.png new file mode 100755 index 00000000..f94d6ee2 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_plane.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_play.png b/src/cadolesuser-1.0/web/uploads/icon/icon_play.png new file mode 100755 index 00000000..04d8d7f4 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_play.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_plugin.png b/src/cadolesuser-1.0/web/uploads/icon/icon_plugin.png new file mode 100755 index 00000000..344e8b5f Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_plugin.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_polaroid.png b/src/cadolesuser-1.0/web/uploads/icon/icon_polaroid.png new file mode 100755 index 00000000..c1fa5c0c Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_polaroid.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_polaroidcamera.png b/src/cadolesuser-1.0/web/uploads/icon/icon_polaroidcamera.png new file mode 100755 index 00000000..8a7b9d0d Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_polaroidcamera.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_polaroids.png b/src/cadolesuser-1.0/web/uploads/icon/icon_polaroids.png new file mode 100755 index 00000000..d64b72d0 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_polaroids.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_power.png b/src/cadolesuser-1.0/web/uploads/icon/icon_power.png new file mode 100755 index 00000000..d7220f30 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_power.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_present.png b/src/cadolesuser-1.0/web/uploads/icon/icon_present.png new file mode 100755 index 00000000..40c78363 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_present.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_profle.png b/src/cadolesuser-1.0/web/uploads/icon/icon_profle.png new file mode 100755 index 00000000..ccb6b6df Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_profle.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_quote.png b/src/cadolesuser-1.0/web/uploads/icon/icon_quote.png new file mode 100755 index 00000000..7a707471 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_quote.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_racingflags.png b/src/cadolesuser-1.0/web/uploads/icon/icon_racingflags.png new file mode 100755 index 00000000..444a334b Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_racingflags.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_radio.png b/src/cadolesuser-1.0/web/uploads/icon/icon_radio.png new file mode 100755 index 00000000..b6c250d7 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_radio.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_radiotower.png b/src/cadolesuser-1.0/web/uploads/icon/icon_radiotower.png new file mode 100755 index 00000000..fc84ad56 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_radiotower.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_rainbow.png b/src/cadolesuser-1.0/web/uploads/icon/icon_rainbow.png new file mode 100755 index 00000000..8e568620 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_rainbow.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_recycle.png b/src/cadolesuser-1.0/web/uploads/icon/icon_recycle.png new file mode 100755 index 00000000..b10aa595 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_recycle.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_rgb.png b/src/cadolesuser-1.0/web/uploads/icon/icon_rgb.png new file mode 100755 index 00000000..b74d24af Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_rgb.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_ribbon.png b/src/cadolesuser-1.0/web/uploads/icon/icon_ribbon.png new file mode 100755 index 00000000..9c9f94e6 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_ribbon.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_roadblock.png b/src/cadolesuser-1.0/web/uploads/icon/icon_roadblock.png new file mode 100755 index 00000000..2240dd02 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_roadblock.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_rocket.png b/src/cadolesuser-1.0/web/uploads/icon/icon_rocket.png new file mode 100755 index 00000000..b73e03e5 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_rocket.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_rulertriangle.png b/src/cadolesuser-1.0/web/uploads/icon/icon_rulertriangle.png new file mode 100755 index 00000000..cee3b45e Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_rulertriangle.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_rundeck.png b/src/cadolesuser-1.0/web/uploads/icon/icon_rundeck.png new file mode 100644 index 00000000..7bde972b Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_rundeck.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_running.png b/src/cadolesuser-1.0/web/uploads/icon/icon_running.png new file mode 100755 index 00000000..b7539463 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_running.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_sailboat.png b/src/cadolesuser-1.0/web/uploads/icon/icon_sailboat.png new file mode 100755 index 00000000..7bdb19ca Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_sailboat.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_schooolbus.png b/src/cadolesuser-1.0/web/uploads/icon/icon_schooolbus.png new file mode 100755 index 00000000..49ea70e0 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_schooolbus.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_scissors.png b/src/cadolesuser-1.0/web/uploads/icon/icon_scissors.png new file mode 100755 index 00000000..842c1c3e Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_scissors.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_scooter.png b/src/cadolesuser-1.0/web/uploads/icon/icon_scooter.png new file mode 100755 index 00000000..28078784 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_scooter.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_security.png b/src/cadolesuser-1.0/web/uploads/icon/icon_security.png new file mode 100755 index 00000000..bfddd670 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_security.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_selftimer.png b/src/cadolesuser-1.0/web/uploads/icon/icon_selftimer.png new file mode 100755 index 00000000..005832b2 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_selftimer.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_settings.png b/src/cadolesuser-1.0/web/uploads/icon/icon_settings.png new file mode 100755 index 00000000..c2e58bdc Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_settings.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_shipwheel.png b/src/cadolesuser-1.0/web/uploads/icon/icon_shipwheel.png new file mode 100755 index 00000000..6387e697 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_shipwheel.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_shoeprints.png b/src/cadolesuser-1.0/web/uploads/icon/icon_shoeprints.png new file mode 100755 index 00000000..bf6dbb78 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_shoeprints.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_shop.png b/src/cadolesuser-1.0/web/uploads/icon/icon_shop.png new file mode 100755 index 00000000..622e89f0 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_shop.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_skateboard.png b/src/cadolesuser-1.0/web/uploads/icon/icon_skateboard.png new file mode 100755 index 00000000..660b5c8e Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_skateboard.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_slr.png b/src/cadolesuser-1.0/web/uploads/icon/icon_slr.png new file mode 100755 index 00000000..115ab6c2 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_slr.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_smartphone.png b/src/cadolesuser-1.0/web/uploads/icon/icon_smartphone.png new file mode 100755 index 00000000..bdf5eef6 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_smartphone.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_spaceshuttle.png b/src/cadolesuser-1.0/web/uploads/icon/icon_spaceshuttle.png new file mode 100755 index 00000000..a438c1fa Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_spaceshuttle.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_speaker.png b/src/cadolesuser-1.0/web/uploads/icon/icon_speaker.png new file mode 100755 index 00000000..c94065e4 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_speaker.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_speedometer.png b/src/cadolesuser-1.0/web/uploads/icon/icon_speedometer.png new file mode 100755 index 00000000..624bbf3f Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_speedometer.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_spraypaint.png b/src/cadolesuser-1.0/web/uploads/icon/icon_spraypaint.png new file mode 100755 index 00000000..456cfe01 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_spraypaint.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_stack.png b/src/cadolesuser-1.0/web/uploads/icon/icon_stack.png new file mode 100755 index 00000000..9a88a27c Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_stack.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_star.png b/src/cadolesuser-1.0/web/uploads/icon/icon_star.png new file mode 100755 index 00000000..b1deca3a Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_star.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_steeringwheel.png b/src/cadolesuser-1.0/web/uploads/icon/icon_steeringwheel.png new file mode 100755 index 00000000..b2d7a578 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_steeringwheel.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_stop.png b/src/cadolesuser-1.0/web/uploads/icon/icon_stop.png new file mode 100755 index 00000000..d94da0a9 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_stop.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_sub.png b/src/cadolesuser-1.0/web/uploads/icon/icon_sub.png new file mode 100755 index 00000000..542d81a3 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_sub.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_submarine.png b/src/cadolesuser-1.0/web/uploads/icon/icon_submarine.png new file mode 100755 index 00000000..c95c68b3 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_submarine.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_support.png b/src/cadolesuser-1.0/web/uploads/icon/icon_support.png new file mode 100755 index 00000000..1e480c41 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_support.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_swatches.png b/src/cadolesuser-1.0/web/uploads/icon/icon_swatches.png new file mode 100755 index 00000000..3afd42e8 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_swatches.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_tablet.png b/src/cadolesuser-1.0/web/uploads/icon/icon_tablet.png new file mode 100755 index 00000000..0d718c2f Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_tablet.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_takeoff.png b/src/cadolesuser-1.0/web/uploads/icon/icon_takeoff.png new file mode 100755 index 00000000..319c94a0 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_takeoff.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_target.png b/src/cadolesuser-1.0/web/uploads/icon/icon_target.png new file mode 100755 index 00000000..3e61236c Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_target.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_taxi.png b/src/cadolesuser-1.0/web/uploads/icon/icon_taxi.png new file mode 100755 index 00000000..47142697 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_taxi.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_toolbox.png b/src/cadolesuser-1.0/web/uploads/icon/icon_toolbox.png new file mode 100755 index 00000000..52a155e8 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_toolbox.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_tools.png b/src/cadolesuser-1.0/web/uploads/icon/icon_tools.png new file mode 100755 index 00000000..7a10cfdb Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_tools.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_tractor.png b/src/cadolesuser-1.0/web/uploads/icon/icon_tractor.png new file mode 100755 index 00000000..75ac7b95 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_tractor.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_traffic.png b/src/cadolesuser-1.0/web/uploads/icon/icon_traffic.png new file mode 100755 index 00000000..bb7bae23 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_traffic.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_train.png b/src/cadolesuser-1.0/web/uploads/icon/icon_train.png new file mode 100755 index 00000000..1ecdd799 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_train.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_travelerbag.png b/src/cadolesuser-1.0/web/uploads/icon/icon_travelerbag.png new file mode 100755 index 00000000..bb9d6734 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_travelerbag.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_trends.png b/src/cadolesuser-1.0/web/uploads/icon/icon_trends.png new file mode 100755 index 00000000..e5ed867d Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_trends.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_tripod.png b/src/cadolesuser-1.0/web/uploads/icon/icon_tripod.png new file mode 100755 index 00000000..ea8c2552 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_tripod.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_trophy.png b/src/cadolesuser-1.0/web/uploads/icon/icon_trophy.png new file mode 100755 index 00000000..5413c9b4 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_trophy.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_truck.png b/src/cadolesuser-1.0/web/uploads/icon/icon_truck.png new file mode 100755 index 00000000..4fbc3877 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_truck.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_tv.png b/src/cadolesuser-1.0/web/uploads/icon/icon_tv.png new file mode 100755 index 00000000..05ef118c Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_tv.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_typography.png b/src/cadolesuser-1.0/web/uploads/icon/icon_typography.png new file mode 100755 index 00000000..d8807c18 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_typography.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_ufo.png b/src/cadolesuser-1.0/web/uploads/icon/icon_ufo.png new file mode 100755 index 00000000..8149060c Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_ufo.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_umbrella.png b/src/cadolesuser-1.0/web/uploads/icon/icon_umbrella.png new file mode 100755 index 00000000..c63641b1 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_umbrella.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_unicycle.png b/src/cadolesuser-1.0/web/uploads/icon/icon_unicycle.png new file mode 100755 index 00000000..b0a00287 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_unicycle.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_unlocked.png b/src/cadolesuser-1.0/web/uploads/icon/icon_unlocked.png new file mode 100755 index 00000000..15676f1b Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_unlocked.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_upload.png b/src/cadolesuser-1.0/web/uploads/icon/icon_upload.png new file mode 100755 index 00000000..35da78bd Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_upload.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_video.png b/src/cadolesuser-1.0/web/uploads/icon/icon_video.png new file mode 100755 index 00000000..89d115a4 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_video.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_videocameraclassic.png b/src/cadolesuser-1.0/web/uploads/icon/icon_videocameraclassic.png new file mode 100755 index 00000000..d98b398a Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_videocameraclassic.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_videocameracompact.png b/src/cadolesuser-1.0/web/uploads/icon/icon_videocameracompact.png new file mode 100755 index 00000000..177c39e4 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_videocameracompact.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_volume.png b/src/cadolesuser-1.0/web/uploads/icon/icon_volume.png new file mode 100755 index 00000000..b8c32a94 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_volume.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_water.png b/src/cadolesuser-1.0/web/uploads/icon/icon_water.png new file mode 100755 index 00000000..9bc53524 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_water.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_windsock.png b/src/cadolesuser-1.0/web/uploads/icon/icon_windsock.png new file mode 100755 index 00000000..9fedbf80 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_windsock.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_windy.png b/src/cadolesuser-1.0/web/uploads/icon/icon_windy.png new file mode 100755 index 00000000..3c566308 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_windy.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_zoomin.png b/src/cadolesuser-1.0/web/uploads/icon/icon_zoomin.png new file mode 100755 index 00000000..95797262 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_zoomin.png differ diff --git a/src/cadolesuser-1.0/web/uploads/icon/icon_zoomout.png b/src/cadolesuser-1.0/web/uploads/icon/icon_zoomout.png new file mode 100755 index 00000000..597e5850 Binary files /dev/null and b/src/cadolesuser-1.0/web/uploads/icon/icon_zoomout.png differ diff --git a/sso/filtres/cadolesuser.ini b/sso/filtres/cadolesuser.ini index 2d15b4fa..f61e4ce0 100644 --- a/sso/filtres/cadolesuser.ini +++ b/sso/filtres/cadolesuser.ini @@ -1,8 +1,14 @@ -[utilisateur] +[user] user=uid + +[username] +username=uid + +[firstname] firstname=givenName + +[lastname] lastname=sn -email=mail -typeadmin=typeadmin -cn=cn -user_groups=user_groups + +[email] +email=mail \ No newline at end of file diff --git a/tmpl/cadolesuser-apache.conf b/tmpl/cadolesuser-apache.conf index e558fddb..90a733cc 100644 --- a/tmpl/cadolesuser-apache.conf +++ b/tmpl/cadolesuser-apache.conf @@ -4,4 +4,6 @@ Alias /cadolesuser /var/www/html/cadolesuser/web AllowOverride All Order Allow,Deny Allow from All + Options Indexes FollowSymLinks MultiViews + php_admin_flag allow_url_fopen On \ No newline at end of file diff --git a/tmpl/cadolesuser-init-01.sql b/tmpl/cadolesuser-init-01.sql index f27605a7..aeccdd55 100644 --- a/tmpl/cadolesuser-init-01.sql +++ b/tmpl/cadolesuser-init-01.sql @@ -23,6 +23,7 @@ INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastna TRUNCATE TABLE sidebar; INSERT IGNORE INTO `sidebar` (`id`, `parent_id`, `roworder`, `label`, `path`, `fonticon`, `permission`) VALUES (1000, NULL, 1000, 'CONFIGIRATION', '', 'fa-gear', 'ROLE_ADMIN,ROLE_MODO'), +(1010, 1000, 1010, 'Générale', 'cadoles_core_config_commun', 'fa-table', 'ROLE_ADMIN'), (1200, 1000, 1200, 'Organisations', NULL, 'fa-sitemap', 'ROLE_ADMIN,ROLE_MODO'), (1210, 1200, 1210, 'Listes Blanche', 'cadoles_core_config_whitelist', 'fa-tasks', 'ROLE_ADMIN'), (1220, 1200, 1220, 'Niveau 01', 'cadoles_core_config_niveau01', 'fa-building', 'ROLE_ADMIN'), @@ -31,4 +32,22 @@ INSERT IGNORE INTO `sidebar` (`id`, `parent_id`, `roworder`, `label`, `path`, `f %end if (1240, 1200, 1240, 'Groupes', 'cadoles_core_config_group', 'fa-users', 'ROLE_ADMIN,ROLE_MODO'), (1250, 1200, 1250, 'Inscriptions', 'cadoles_core_config_registration', 'fa-pencil-square-o', 'ROLE_ADMIN,ROLE_MODO'), -(1260, 1200, 1260, 'Utilisateurs', 'cadoles_core_config_user', 'fa-child', 'ROLE_ADMIN,ROLE_MODO'); \ No newline at end of file +(1260, 1200, 1260, 'Utilisateurs', 'cadoles_core_config_user', 'fa-child', 'ROLE_ADMIN,ROLE_MODO'); + +DELETE FROM `config` WHERE `changeable` = 0; +INSERT IGNORE INTO `config` (`order`, `visible`, `changeable`, `required`, `type`, `id`, `value`, `grouped`, `help`) VALUES +('001', 1, 1, 1, 'string', 'appname', 'Cadoles User', '', 'Le titre de votre site'), +('002', 1, 0, 1, 'string', 'version', '1.0.0', '', 'Version de l\'application'), +('003', 1, 1, 0, 'string', 'subappname', 'Portail', '', 'Le sous titre de votre site'), +('004', 1, 1, 1, 'logo', 'logo', 'uploads/logo/logo.png', '', 'Le logo de votre site'), + +('040', 1, 1, 1, 'boolean', 'fgheader', '0', '', 'Utiliser une image en bannière du site'), +('041', 1, 1, 1, 'header', 'header', 'uploads/header/header.png', 'fgheader', 'Image en bannière du site'), +('042', 1, 1, 1, 'integer', 'heightheader', '100', 'fgheader', 'Hauteur de la bannière du site'), + +('050', 1, 1, 1, 'color', 'colormain', 'bfbfbf', '', 'Couleur principale de votre site'), +('051', 1, 1, 1, 'color', 'fontcolorhover', '2e3131', '', 'Couleur de la police sur couleur principale'), + +('200', 1, 1, 1, 'boolean', 'PROXYactivate', '1', '', 'Définit un Proxy'), +('201', 1, 1, 1, 'string', 'PROXYserver', '192.168.57.160', 'PROXYactivate','Adresse du Proxy'), +('202', 1, 1, 1, 'string', 'PROXYport', '8080', 'PROXYactivate','Port du Proxy'); \ No newline at end of file diff --git a/tmpl/cadolesuser-template.sav.yml b/tmpl/cadolesuser-template.sav.yml new file mode 100644 index 00000000..e4e281bb --- /dev/null +++ b/tmpl/cadolesuser-template.sav.yml @@ -0,0 +1,174 @@ +# This file is auto-generated during the composer install +parameters: + # Determine qui est le maitre de l'identitité = SQL / LDAP / SSO + # Si SQL cela veut dire que c'est l'applicatif qui gère les utilisateurs + # Sinon la source est externe soit via un annuaire soit via des attributs venant d'un SSO + # Si la source est externe de fait pas de module d'inscription ni de reset de password + # Et pas de synchronisation vers un annuaire ou vers ePortail + masteridentity: %%cadolesuser_masteridentity + + # Mode d'authentification soit SQL / LDAP / CAS / SAML + # Pour l'instant SQL - CAS - SAML Reste à faire LDAP + # Attention si le masteridentity est différent de SQL le mode d'authentification est forcement différent de SQL + # Car aucune synchronisation des password n'est possible + mode_auth: %%cadolesuser_mode_auth + + # Mode de registration : none / byuser / byadmin + # none = désactivation de l'inscription mais reset de password possible + # byuser = aucune validation par un administrateur, l'utilisateur valide son inscription par lui-même + # byadmin = validation de l'inscription par un administrateur, sauf si domaine de messagerie dans la liste blanche + %if %%getVar("cadolesuser_syncldap", 'non') == "oui" + moderegistration: %%cadolesuser_moderegistration + %else + moderegistration: none + %end if + + # Information de base de l'annuaire + ldap_host: %%adresse_ip_ldap + ldap_port: %%ldap_port + ldap_user: cn=admin,o=gouv,c=fr + ldap_password: %%pwdreader("",%%ldap_admin_passfile) + ldap_basedn: o=gouv,c=fr + + # Mise en page + libelle_etab: %%libelle_etab + numero_etab: %%numero_etab + colormain: %%cadolesuser_colormain # Couleur principale + fontcolorhover: %%cadolesuser_fontcolorhover # Couleur des polices sur fond de couleur principale + keyterm: %%cadolesuser_keyterm # Taille mini du password + labelniveau01: %%cadolesuser_niveau01label # Label singulier du niveau 01 d'organisation + labelsniveau01: %%cadolesuser_niveau01labels # Label pluriel du niveau 01 d'organisation + iconniveau01: %%cadolesuser_niveau01icon # Icon du niveau 01 d'organisation + labelsirenniveau01: SIRET # Label SIREN +%if %%getVar("cadolesuser_niveau02view", 'non') == "oui" + viewniveau02: true # Gérer un niveau 02 d'organisation + labelniveau02: %%cadolesuser_niveau02label # Label singulier du niveau 02 d'organisation + labelsniveau02: %%cadolesuser_niveau02labels # Label pluriel du niveau 02 d'organisation + iconniveau02: %%cadolesuser_niveau02icon # Icon du niveau 02 d'organisation + labelsiretniveau01: SIRET # Label SIRET +%else + viewniveau02: false # Gérer un niveau 02 d'organisation + labelniveau02: niveau02 # Label singulier du niveau 02 d'organisation + labelsniveau02: niveaus02 # Label pluriel du niveau 02 d'organisation + iconniveau02: fa-sitemap # Icon du niveau 02 d'organisation + labelsiretniveau01: SIRET # Label SIRET +%end if + + # Si masteridentity est à SQL = où sont synchronisées les datas dans l'annuaire +%if %%getVar("cadolesuser_syncldap", 'non') == "oui" + ldap_sync: true + ldap_baseuser: ou=users,ou=%%cadolesuser_organization,o=gouv,c=fr + ldap_baseniveau01: ou=%%cadolesuser_niveau01branche,ou=%%cadolesuser_organization,o=gouv,c=fr + ldap_baseniveau02: ou=%%cadolesuser_niveau02branche,ou=%%cadolesuser_organization,o=gouv,c=fr + ldap_basegroup: ou=groups,ou=%%cadolesuser_organization,o=gouv,c=fr +%else + ldap_sync: false + ldap_baseuser: + ldap_baseniveau01: + ldap_baseniveau02: + ldap_basegroup: +%end if + + # Si masteridentity est à LDAP = quel est le modele d'organisation + # Si open = rien de particulier + # Si scribe = on génére des groupes correspondant au profil / classe / niveau / option + ldap_template: scribe + + # Si masteridentity est à LDAP = quel champs sont à récupérer + ldap_username: uid + ldap_firstname: givenname + ldap_lastname: sn + ldap_email: mail + ldap_usersadmin: [admin,prof.6a] + +%if %%getVar("cadolesuser_synceportail", 'non') == "oui" + eportail_sync: true + eportail_url: /eportail + eportail_login: /eportail/login.php + eportail_database_host: '%database_host%' + eportail_database_port: 3306 + eportail_database_name: eportail + eportail_database_user: eportail + eportail_database_password: "changme" +%else + eportail_sync: false + eportail_url: # /eportail + eportail_login: # /eportail/login.php + eportail_database_host: # 172.27.7.64 + eportail_database_port: # 3306 + eportail_database_name: # eportail + eportail_database_user: # eportail + eportail_database_password: # "changme" +%end if + + # Si mode_auth = CAS + cas_host: ldapbundle.ac-arno.fr + cas_path: ~ + cas_port: 8443 + + # Si mode_aut = SAML + saml_entityid: 'http://dev.nuonet.cadoles' + saml_logout_url: 'http://172.27.7.67:8088/idp/profile/Logout' + saml_idps_list: ['http://172.27.7.67:8088/idp/shibboleth'] + + # Si mode_auth = CAS ou SAML les attributs permettant de matché avec les utilisateurs + user_attr_cas_username: username + user_attr_cas_mail: email + user_attr_cas_lastname: lastname + user_attr_cas_firstname: firstname + + user_attr_saml_username: eduPersonPrincipalName + user_attr_saml_mail: mail + user_attr_saml_lastname: sn + user_attr_saml_firstname: givenName + +%if %%is_defined("cadolesuser_smtpport") + mailer_port: '%%cadolesuser_smtpport' + mailer_encryption: %%cadolesuser_smtpencryption + mailer_authmode: %%cadolesuser_smtpauthmode + noreply: %%cadolesuser_noreply +%else + mailer_port: '2525' + mailer_encryption: null + mailer_authmode: null + noreply: %%system_mail_to +%end if + +# Doctrine Configuration +doctrine: + dbal: + default_connection: default + connections: + default: + driver: pdo_mysql + host: '%database_host%' + port: '%database_port%' + dbname: '%database_name%' + user: '%database_user%' + password: '%database_password%' + charset: UTF8 +%if %%getVar("cadolesuser_synceportail", 'non') == "oui" + eportail: + driver: pdo_mysql + host: '%eportail_database_host%' + port: '%eportail_database_port%' + dbname: '%eportail_database_name%' + user: '%eportail_database_user%' + password: '%eportail_database_password%' + charset: UTF8 +%end if + orm: + default_entity_manager: default + entity_managers: + default: + connection: default + mappings: + CadolesCoreBundle: ~ +%if %%getVar("cadolesuser_synceportail", 'non') == "oui" + eportail: + connection: eportail + mappings: + CadolesCoreBundle: ~ +%end if + + \ No newline at end of file diff --git a/tmpl/cadolesuser-template.yml b/tmpl/cadolesuser-template.yml index 1f1cf96e..0903b208 100644 --- a/tmpl/cadolesuser-template.yml +++ b/tmpl/cadolesuser-template.yml @@ -1,50 +1,87 @@ # This file is auto-generated during the composer install parameters: - mode_auth: CAS # SQL / LDAP / CAS + # Determine qui est le maitre de l'identitité = SQL / LDAP / SSO + # Si SQL cela veut dire que c'est l'applicatif qui gère les utilisateurs + # Sinon la source est externe soit via un annuaire soit via des attributs venant d'un SSO + # Si la source est externe de fait pas de module d'inscription ni de reset de password + # Et pas de synchronisation vers un annuaire ou vers ePortail + masteridentity: %%cadolesuser_masteridentity - libelle_etab: %%libelle_etab - numero_etab: %%numero_etab + # Mode d'authentification soit SQL / LDAP / CAS / SAML + # Pour l'instant SQL - CAS - SAML Reste à faire LDAP + # Attention si le masteridentity est différent de SQL le mode d'authentification est forcement différent de SQL + # Car aucune synchronisation des password n'est possible + mode_auth: %%cadolesuser_mode_auth + # Mode de registration : none / byuser / byadmin + # none = désactivation de l'inscription mais reset de password possible + # byuser = aucune validation par un administrateur, l'utilisateur valide son inscription par lui-même + # byadmin = validation de l'inscription par un administrateur, sauf si domaine de messagerie dans la liste blanche + %if %%getVar("cadolesuser_syncldap", 'non') == "oui" + moderegistration: %%cadolesuser_moderegistration + %else + moderegistration: none + %end if + + # Information de base de l'annuaire ldap_host: %%adresse_ip_ldap ldap_port: %%ldap_port ldap_user: cn=admin,o=gouv,c=fr ldap_password: %%pwdreader("",%%ldap_admin_passfile) ldap_basedn: o=gouv,c=fr -%if %%getVar("cadolesuser_syncldap", 'non') == "oui" - ldap_sync: true - ldap_baseuser: ou=users,ou=%%cadolesuser_organization,o=gouv,c=fr - ldap_baseniveau01: ou=%%cadolesuser_niveau01branche,ou=%%cadolesuser_organization,o=gouv,c=fr - ldap_baseniveau02: ou=%%cadolesuser_niveau02branche,ou=%%cadolesuser_organization,o=gouv,c=fr - ldap_basegroup: ou=groups,ou=%%cadolesuser_organization,o=gouv,c=fr - moderegistration: %%cadolesuser_moderegistration # Mode de registration : none / byuser / byadmin -%else - ldap_sync: false - ldap_baseuser: - ldap_baseniveau01: - ldap_baseniveau02: - ldap_basegroup: - moderegistration: none # Mode de registration : none / byuser / byadmin -%end if - + # Mise en page + alias: cadolesuser + libelle_etab: %%libelle_etab + numero_etab: %%numero_etab colormain: %%cadolesuser_colormain # Couleur principale fontcolorhover: %%cadolesuser_fontcolorhover # Couleur des polices sur fond de couleur principale keyterm: %%cadolesuser_keyterm # Taille mini du password labelniveau01: %%cadolesuser_niveau01label # Label singulier du niveau 01 d'organisation labelsniveau01: %%cadolesuser_niveau01labels # Label pluriel du niveau 01 d'organisation iconniveau01: %%cadolesuser_niveau01icon # Icon du niveau 01 d'organisation + labelsirenniveau01: SIREN # Label SIREN %if %%getVar("cadolesuser_niveau02view", 'non') == "oui" viewniveau02: true # Gérer un niveau 02 d'organisation labelniveau02: %%cadolesuser_niveau02label # Label singulier du niveau 02 d'organisation labelsniveau02: %%cadolesuser_niveau02labels # Label pluriel du niveau 02 d'organisation iconniveau02: %%cadolesuser_niveau02icon # Icon du niveau 02 d'organisation + labelsiretniveau02: SIRET # Label SIRET %else viewniveau02: false # Gérer un niveau 02 d'organisation labelniveau02: niveau02 # Label singulier du niveau 02 d'organisation labelsniveau02: niveaus02 # Label pluriel du niveau 02 d'organisation iconniveau02: fa-sitemap # Icon du niveau 02 d'organisation + labelsiretniveau02: SIRET # Label SIRET %end if + # Si masteridentity est à SQL = où sont synchronisées les datas dans l'annuaire +%if %%getVar("cadolesuser_syncldap", 'non') == "oui" + ldap_sync: true + ldap_baseuser: ou=users,ou=%%cadolesuser_organization,o=gouv,c=fr + ldap_baseniveau01: ou=%%cadolesuser_niveau01branche,ou=%%cadolesuser_organization,o=gouv,c=fr + ldap_baseniveau02: ou=%%cadolesuser_niveau02branche,ou=%%cadolesuser_organization,o=gouv,c=fr + ldap_basegroup: ou=groups,ou=%%cadolesuser_organization,o=gouv,c=fr +%else + ldap_sync: false + ldap_baseuser: + ldap_baseniveau01: + ldap_baseniveau02: + ldap_basegroup: +%end if + + # Si masteridentity est à LDAP = quel est le modele d'organisation + # Si open = rien de particulier + # Si scribe = on génére des groupes correspondant au profil / classe / niveau / option + ldap_template: scribe + + # Si masteridentity est à LDAP = quel champs sont à récupérer + ldap_username: uid + ldap_firstname: givenname + ldap_lastname: sn + ldap_email: mail + ldap_usersadmin: [admin,prof.6a] + %if %%getVar("cadolesuser_synceportail", 'non') == "oui" eportail_sync: true eportail_url: /eportail @@ -65,6 +102,27 @@ parameters: eportail_database_password: # "changme" %end if + # Si mode_auth = CAS + cas_host: ldapbundle.ac-arno.fr + cas_path: ~ + cas_port: 8443 + + # Si mode_aut = SAML + saml_entityid: 'http://dev.nuonet.cadoles' + saml_logout_url: 'http://172.27.7.67:8088/idp/profile/Logout' + saml_idps_list: ['http://172.27.7.67:8088/idp/shibboleth'] + + # Si mode_auth = CAS ou SAML les attributs permettant de matché avec les utilisateurs + user_attr_cas_username: username + user_attr_cas_mail: email + user_attr_cas_lastname: lastname + user_attr_cas_firstname: firstname + + user_attr_saml_username: eduPersonPrincipalName + user_attr_saml_mail: mail + user_attr_saml_lastname: sn + user_attr_saml_firstname: givenName + %if %%is_defined("cadolesuser_smtpport") mailer_port: '%%cadolesuser_smtpport' mailer_encryption: %%cadolesuser_smtpencryption diff --git a/tmpl/template.yml b/tmpl/template.yml new file mode 100644 index 00000000..e031dbc7 --- /dev/null +++ b/tmpl/template.yml @@ -0,0 +1,131 @@ +parameters: + # Determine qui est le maitre de l'identitité = SQL / LDAP / SSO + # Si SQL cela veut dire que c'est l'applicatif qui gère les utilisateurs + # Sinon la source est externe soit via un annuaire soit via des attributs venant d'un SSO + # Si la source est externe de fait pas de module d'inscription ni de reset de password + # Et pas de synchronisation vers un annuaire ou vers ePortail + masteridentity: SSO + + # Mode d'authentification soit SQL / LDAP / CAS / SAML + # Pour l'instant SQL - CAS - SAML Reste à faire LDAP + # Attention si le masteridentity est différent de SQL le mode d'authentification est forcement différent de SQL + # Car aucune synchronisation des password n'est possible + mode_auth: CAS + + # Mode de registration : none / byuser / byadmin + # none = désactivation de l'inscription mais reset de password possible + # byuser = aucune validation par un administrateur, l'utilisateur valide son inscription par lui-même + # byadmin = validation de l'inscription par un administrateur, sauf si domaine de messagerie dans la liste blanche + moderegistration: byadmin + + # Mise en page + colormain: 428BCA # Couleur principale + fontcolorhover: FFFFFF # Couleur des polices sur fond de couleur principale + keyterm: 8 # Taille mini du password + labelniveau01: Ecole # Label singulier du niveau 01 d'organisation + labelsniveau01: Ecoles # Label pluriel du niveau 01 d'organisation + labelsirenniveau01: ID Externe # Label siren du niveau 01 d'organisation + iconniveau01: fa-building # Icon du niveau 01 d'organisation + viewniveau02: false # Gérer un niveau 02 d'organisation + labelniveau02: Ecole # Label singulier du niveau 02 d'organisation + labelsniveau02: Ecoles # Label pluriel du niveau 02 d'organisation + labelsiretniveau02: ID Externe # Label siret du niveau 02 d'organisation + iconniveau02: fa-sitemap # Icon du niveau 02 d'organisation + + # Information de base de l'annuaire + ldap_host: 172.27.7.61 + ldap_port: 389 + ldap_user: cn=admin,o=gouv,c=fr + ldap_password: eole + ldap_basedn: o=gouv,c=fr + + # Si masteridentity est à SQL = où sont synchronisées les datas dans l'annuaire + ldap_sync: true + ldap_baseuser: ou=users,ou=cadoles,o=gouv,c=fr + ldap_baseniveau01: ou=departement,ou=cadoles,o=gouv,c=fr + ldap_baseniveau02: ou=service,ou=cadoles,o=gouv,c=fr + ldap_basegroup: ou=groups,ou=cadoles,o=gouv,c=fr + + # Si masteridentity est à LDAP = quel est le modele d'organisation + # Si open = rien de particulier + # Si scribe = on génére des groupes correspondant au profil / classe / niveau / option + ldap_template: scribe + + # Si masteridentity est à LDAP = quel champs sont à récupérer + ldap_username: uid + ldap_firstname: givenname + ldap_lastname: sn + ldap_email: mail + ldap_usersadmin: [admin,prof.6a] + + # Si masteridentity est à SQL où sont synchronisées les datas dans eportail + eportail_sync: true + eportail_url: /eportail + eportail_login: /eportail/login.php + eportail_database_host: '%database_host%' + eportail_database_port: 3306 + eportail_database_name: eportail + eportail_database_user: eportail + eportail_database_password: "